/* Living Code OS — site design system
   One token set, shared by every page and the embedded product-preview windows,
   so the site reads as a window left open on the real board, not a brochure. */

:root {
  /* stepped near-black, cool-biased — never pure black, never flat grey */
  --bg-0: #05060a;
  --bg-1: #0a0c12;
  --bg-2: #10131c;
  --bg-3: #161a26;
  --glass: rgba(14, 17, 26, 0.62);
  --glass-strong: rgba(12, 14, 22, 0.82);

  --ink-1: #eef0f8;
  --ink-2: #aab0c6;
  --ink-3: #6f7491;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* the product's own signature glow */
  --accent: #9b8cfb;
  --accent-soft: #cfc5ff;
  --accent-dim: rgba(155, 140, 251, 0.18);
  --teal: #5fe0c7;
  --amber: #f2b84b;
  --rose: #f47fb0;
  --green: #57d18a;

  /* dock hues — the same grammar the graph uses for entity kinds */
  --hue-chat: #5b8cff;
  --hue-hive: #9b7cf6;
  --hue-memory: #5fe0c7;
  --hue-approvals: #f2b84b;
  --hue-archive: #e0855a;
  --hue-phone: #57d18a;
  --hue-studio: #d874e8;
  --hue-calendar: #f47fb0;
  --hue-files: #e8c860;
  --hue-apps: #f16a5a;
  --hue-settings: #6c7de0;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.32, 0.72, 0, 1);

  --font-display: 'Syne', 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --max: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-0);
  color: var(--ink-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 4px; }
img, svg, video, canvas { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow.accent { color: var(--accent-soft); }
.eyebrow .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 10px var(--teal); }

/* ------------------------------------------------------------ background graph */
#graph {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.graph-labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.graph-label {
  position: absolute; transform: translate(-50%, -130%);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--ink-1); white-space: nowrap;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(10, 12, 18, 0.7); border: 1px solid var(--line-strong);
  opacity: 0; transition: opacity 0.5s var(--ease);
}
.graph-label.on { opacity: 1; }
.graph-label small { color: var(--ink-3); margin-left: 6px; }

.page { position: relative; z-index: 2; }
/* long-form pages dim the constellation further so running text stays legible */
body:has(.prose) .veil, body:has(.log-entry) .veil {
  background:
    radial-gradient(900px 600px at 18% 14%, rgba(5, 6, 10, 0.5), transparent 70%),
    linear-gradient(180deg, rgba(5, 6, 10, 0.45), rgba(5, 6, 10, 0.5) 40%, rgba(5, 6, 10, 0.62) 100%);
}

/* a soft vignette so copy stays legible over the busiest parts of the graph */
.veil { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 18% 14%, rgba(5, 6, 10, 0.42), transparent 70%),
    linear-gradient(180deg, rgba(5, 6, 10, 0.18), rgba(5, 6, 10, 0.05) 40%, rgba(5, 6, 10, 0.4) 100%);
}

/* ------------------------------------------------------------ glass */
.glass {
  background: linear-gradient(rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 42%), var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.7), 0 30px 60px -30px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.06);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass { backdrop-filter: blur(18px) saturate(1.35); -webkit-backdrop-filter: blur(18px) saturate(1.35); }
}

/* window chrome, as on the board */
.win { display: flex; flex-direction: column; overflow: hidden; }
.win-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.win-title { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; gap: 9px; }
.win-title .glyph { width: 16px; height: 16px; color: var(--hue-chat); }
.win-spacer { flex: 1; }
.win-pill {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--ink-2); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.win-btn { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--ink-3); cursor: pointer; }
.win-btn:hover { color: var(--ink-1); background: rgba(255, 255, 255, 0.05); border-color: var(--line); }

/* ------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 12px var(--gutter);
  background: linear-gradient(rgba(5, 6, 10, 0.85), rgba(5, 6, 10, 0.55));
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) { .nav { backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); } }
.nav-inner { width: 100%; max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 22px; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--ink-1); font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; white-space: nowrap; flex: none; }
.wordmark .mark { width: 22px; height: 22px; }
.wordmark span { color: var(--ink-3); font-weight: 500; }
.nav-links { display: flex; gap: 4px; margin-left: 10px; }
.nav-links a { font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 7px 11px; border-radius: 8px; transition: color 0.15s var(--ease), background 0.15s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink-1); background: rgba(255, 255, 255, 0.05); }
.nav-cta { margin-left: auto; }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid var(--line-strong); border-radius: 8px; width: 38px; height: 34px; color: var(--ink-1); cursor: pointer; }
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 10px var(--gutter) 16px; background: rgba(5, 6, 10, 0.96); border-bottom: 1px solid var(--line); }
  .nav.open .nav-links { display: flex; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; letter-spacing: 0.01em;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); color: var(--ink-1); cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.3s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); color: #fff; }
.btn.primary {
  background: linear-gradient(135deg, rgba(155, 140, 251, 0.35), rgba(155, 140, 251, 0.15)), var(--bg-3);
  border-color: rgba(155, 140, 251, 0.55); color: #fff;
  box-shadow: 0 0 0 1px rgba(155, 140, 251, 0.15), 0 0 24px -6px rgba(155, 140, 251, 0.6);
}
.btn.primary:hover { box-shadow: 0 0 0 1px rgba(155, 140, 251, 0.3), 0 0 36px -4px rgba(155, 140, 251, 0.8); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.pill-mono { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ------------------------------------------------------------ layout */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section.block { padding: clamp(64px, 9vw, 120px) 0; }
section.block.tight { padding-top: clamp(28px, 4vw, 52px); }
.sec-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08; margin: 12px 0 14px; font-weight: 700; }
.sec-head p { color: var(--ink-2); font-size: 17px; max-width: 62ch; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ hero */
.hero { padding: clamp(40px, 7vw, 90px) 0 clamp(32px, 5vw, 56px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 {
  font-size: clamp(38px, 5.6vw, 72px); line-height: 0.98; letter-spacing: -0.025em; font-weight: 800;
  margin: 18px 0 22px; max-width: 12ch;
}
.hero h1 .w { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(18%); animation: wordin 0.9s var(--ease) forwards; }
@keyframes wordin { to { opacity: 1; filter: blur(0); transform: none; } }
.hero h1 em { font-style: normal; color: var(--accent-soft); text-shadow: 0 0 28px rgba(155, 140, 251, 0.45); }
.hero .dek { font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-2); max-width: 52ch; margin-bottom: 26px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .ctas .hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.04em; }

/* ------------------------------------------------------------ dock strip */
.dock {
  display: inline-flex; gap: 8px; padding: 9px; border-radius: 22px;
  background: rgba(10, 12, 18, 0.7); border: 1px solid var(--line);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.9), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.dock::-webkit-scrollbar { display: none; }
@supports (backdrop-filter: blur(1px)) { .dock { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); } }
.tile {
  --c: var(--accent);
  position: relative; flex: none;
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  box-shadow: inset 0 0 16px -8px var(--c);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  cursor: default;
}
.tile svg { width: 22px; height: 22px; }
.tile:hover { transform: translateY(-3px); box-shadow: inset 0 0 16px -8px var(--c), 0 0 22px -6px var(--c); }
.tile::after {
  content: attr(data-label); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-1);
  background: rgba(10, 12, 18, 0.9); border: 1px solid var(--line-strong); padding: 3px 8px; border-radius: 6px;
  opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity 0.2s var(--ease);
}
.tile:hover::after { opacity: 1; }
.tile .dotlive { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }

/* ------------------------------------------------------------ jeffery window */
.jeffery { min-height: 460px; max-height: min(640px, 78vh); }
.jeffery .win-title .glyph { color: var(--hue-chat); }
.j-body { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.j-msg { font-size: 14.5px; line-height: 1.55; max-width: 60ch; }
.j-msg .who { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); margin-right: 6px; }
.j-msg.you { color: var(--accent-soft); }
.j-msg.you .who { color: rgba(207, 197, 255, 0.7); }
.j-msg.bot { color: var(--ink-1); }
.j-msg .txt { white-space: pre-wrap; word-break: break-word; }
.j-msg .cursor { display: inline-block; width: 7px; height: 14px; background: var(--accent-soft); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(2) infinite; border-radius: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.j-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.j-tool { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-2); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 9px; }
.j-tool.hl { color: var(--teal); border-color: rgba(95, 224, 199, 0.35); }
.j-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.j-chip {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.j-chip:hover { color: var(--ink-1); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }
.j-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.j-input input {
  flex: 1; min-width: 0; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--ink-1); font: inherit; font-size: 14px; padding: 10px 12px; outline: none;
}
.j-input input::placeholder { color: var(--ink-3); }
.j-input input:focus { border-color: rgba(155, 140, 251, 0.5); box-shadow: 0 0 0 3px rgba(155, 140, 251, 0.12); }
.j-ibtn {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); color: var(--ink-2); cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.3s var(--ease);
}
.j-ibtn:hover { color: var(--ink-1); background: rgba(255, 255, 255, 0.08); }
.j-ibtn.send { background: linear-gradient(135deg, rgba(155, 140, 251, 0.4), rgba(155, 140, 251, 0.18)); border-color: rgba(155, 140, 251, 0.5); color: #fff; }
.j-ibtn.mic.live { color: var(--rose); border-color: rgba(244, 127, 176, 0.6); box-shadow: 0 0 0 4px rgba(244, 127, 176, 0.15); animation: pulse 1.2s ease-in-out infinite; }
.j-ibtn.speak.on { color: var(--teal); border-color: rgba(95, 224, 199, 0.5); }
.j-ibtn svg { width: 17px; height: 17px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(244, 127, 176, 0.05); } }
.j-foot { display: flex; justify-content: space-between; gap: 10px; padding: 6px 14px 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.04em; }
.j-foot .err { color: var(--amber); }

/* ------------------------------------------------------------ pillars */
.pillar {
  --c: var(--accent);
  padding: 22px 22px 20px; border-radius: var(--radius-lg);
  background: linear-gradient(rgba(255, 255, 255, 0.03), transparent 40%), var(--glass-strong);
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease);
}
.pillar::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 28%, transparent), transparent); filter: blur(12px); pointer-events: none; opacity: 0.8; }
.pillar:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 35%, var(--line)); }
.pillar .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); display: flex; align-items: center; gap: 8px; }
.pillar .k svg { width: 16px; height: 16px; }
.pillar h3 { font-size: 20px; margin: 12px 0 8px; font-weight: 700; line-height: 1.2; }
.pillar p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.pillar .more { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--accent-soft); }
.pillar details { margin-top: 12px; }
.pillar summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent-soft); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.pillar summary::-webkit-details-marker { display: none; }
.pillar summary::after { content: "↓"; font-family: var(--font-mono); transition: transform 0.25s var(--ease); }
.pillar details[open] summary::after { transform: rotate(180deg); }
.pillar details p { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.pillar details code { font-family: var(--font-mono); font-size: 12px; color: var(--ink-1); background: rgba(255, 255, 255, 0.05); padding: 1px 5px; border-radius: 4px; }

/* ------------------------------------------------------------ scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ------------------------------------------------------------ stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { padding: 18px 20px; border-radius: var(--radius-md); background: var(--glass-strong); border: 1px solid var(--line); }
.stat .v { font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
.stat .n { font-size: 13px; color: var(--ink-2); margin-top: 8px; }

/* ------------------------------------------------------------ approval card demo */
.tray-card { padding: 18px 20px; border-radius: var(--radius-md); border: 1px solid rgba(242, 184, 75, 0.35); background: linear-gradient(rgba(242, 184, 75, 0.07), rgba(242, 184, 75, 0.02)), var(--glass-strong); }
.tray-card .eyebrow { color: var(--amber); }
.tray-card .payload { margin-top: 10px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); white-space: pre-wrap; }
.tray-card .payload b { color: var(--ink-1); font-weight: 500; }
.tray-card .acts { display: flex; gap: 8px; margin-top: 14px; }
.tray-card .acts .btn { padding: 7px 14px; font-size: 12.5px; }
.tray-card .acts .ok { border-color: rgba(87, 209, 138, 0.5); color: var(--green); }
.tray-card .acts .no { border-color: rgba(244, 127, 176, 0.4); color: var(--rose); }

/* ------------------------------------------------------------ waitlist */
.waitlist { padding: clamp(26px, 4vw, 40px); border-radius: var(--radius-xl); position: relative; overflow: hidden; }
.waitlist::before { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(155, 140, 251, 0.22), transparent); filter: blur(20px); pointer-events: none; }
.waitlist h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.08; margin: 10px 0 10px; }
.waitlist p { color: var(--ink-2); max-width: 56ch; }
.wl-form { display: grid; gap: 12px; margin-top: 18px; position: relative; }
.wl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .wl-row { grid-template-columns: 1fr; } }
.wl-form label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.wl-form input, .wl-form textarea {
  width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--ink-1); font: inherit; font-size: 15px; padding: 12px 14px; outline: none;
}
.wl-form textarea { min-height: 84px; resize: vertical; }
.wl-form input:focus, .wl-form textarea:focus { border-color: rgba(155, 140, 251, 0.55); box-shadow: 0 0 0 3px rgba(155, 140, 251, 0.12); }
.wl-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.wl-actions .note { font-size: 12.5px; color: var(--ink-3); }
.wl-status { font-size: 14px; font-weight: 700; min-height: 20px; }
.wl-status.ok { color: var(--teal); }
.wl-status.bad { color: var(--amber); }
.wl-done { padding: 22px; border-radius: var(--radius-md); border: 1px solid rgba(95, 224, 199, 0.35); background: rgba(95, 224, 199, 0.06); }

/* ------------------------------------------------------------ footer */
footer { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 36px 0 48px; background: linear-gradient(transparent, rgba(5, 6, 10, 0.9)); }
.foot { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-start; justify-content: space-between; }
.foot .cols { display: flex; flex-wrap: wrap; gap: 28px 40px; }
.foot .col { display: grid; gap: 8px; font-size: 13.5px; }
.foot .col b { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.foot .col a { color: var(--ink-2); }
.foot .col a:hover { color: var(--ink-1); }
.foot .fine { width: 100%; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ------------------------------------------------------------ prose pages */
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(24px, 3vw, 34px); margin: 2.4em 0 0.6em; line-height: 1.15; }
.prose h3 { font-size: 19px; margin: 1.8em 0 0.5em; }
.prose p, .prose li { color: var(--ink-2); font-size: 16.5px; }
.prose p strong, .prose li strong { color: var(--ink-1); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--accent); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; color: var(--ink-1); background: rgba(255, 255, 255, 0.05); padding: 1px 6px; border-radius: 4px; }
.prose pre { overflow-x: auto; padding: 16px 18px; border-radius: var(--radius-md); background: var(--bg-1); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 2px solid var(--accent); background: rgba(155, 140, 251, 0.06); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-1); font-size: 16px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 1em 0; }
.prose th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line-strong); }
.prose td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.prose td:first-child { color: var(--ink-1); font-weight: 700; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

.page-head { padding: clamp(44px, 7vw, 90px) 0 clamp(20px, 3vw, 36px); }
.page-head h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.02; letter-spacing: -0.02em; font-weight: 800; margin: 14px 0 16px; max-width: 16ch; }
.page-head .dek { font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-2); max-width: 58ch; }

.toc { position: sticky; top: 84px; align-self: start; display: grid; gap: 2px; }
.toc a { font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 6px 10px; border-left: 2px solid transparent; border-radius: 6px; }
.toc a:hover { color: var(--ink-1); }
.toc a.active { color: var(--accent-soft); border-left-color: var(--accent); }
.with-toc { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
@media (max-width: 900px) { .with-toc { grid-template-columns: 1fr; } .toc { display: none; } }

/* ------------------------------------------------------------ diagrams */
.diagram { padding: 20px; border-radius: var(--radius-lg); background: var(--glass-strong); border: 1px solid var(--line); overflow-x: auto; margin: 1.4em 0; }
.diagram svg { width: 100%; height: auto; min-width: 560px; }
.diagram .cap { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; margin-top: 10px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12.5px; }
.flow .node { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-3); color: var(--ink-1); }
.flow .node.hl { border-color: rgba(155, 140, 251, 0.5); color: var(--accent-soft); box-shadow: 0 0 20px -8px rgba(155, 140, 251, 0.6); }
.flow .node.warn { border-color: rgba(242, 184, 75, 0.5); color: var(--amber); }
.flow .arr { color: var(--ink-3); }

/* ------------------------------------------------------------ build log */
.log-entry { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
@media (max-width: 700px) { .log-entry { grid-template-columns: 1fr; gap: 8px; } }
.log-entry .when { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em; }
.log-entry .when b { display: block; color: var(--ink-1); font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.log-entry h3 { font-size: 20px; margin: 0 0 8px; }
.log-entry p { color: var(--ink-2); font-size: 15px; }
.log-entry .cost { display: inline-flex; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 11.5px; color: var(--teal); border: 1px solid rgba(95, 224, 199, 0.3); border-radius: 999px; padding: 3px 10px; margin-top: 6px; }

/* ------------------------------------------------------------ utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.center { text-align: center; }
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 32px; } .mt-4 { margin-top: 48px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
