/* Shiva Agents marketing site. One stylesheet, six cascade layers, zero external requests.
   Order matters: later layers always win over earlier ones, whatever the selector weight. */
@layer reset, tokens, base, layout, components, motion;

/* ------------------------------------------------------------------ fonts (self-hosted) */
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/shared/fonts/hanken-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/shared/fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/shared/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/shared/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter (variable, OFL — /shared/fonts/OFL-Inter.txt): the text face on every OS, so Windows matches the Mac. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/shared/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/shared/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("/shared/fonts/inter-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("/shared/fonts/inter-latin-ext-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* metric-matched fallback while Inter loads */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"); ascent-override: 90.2%; descent-override: 22.48%; line-gap-override: 0%; size-adjust: 107.4%; }

/* Cross-page view transitions: one line, no JS. Only when the visitor is fine with motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* ====================================================================== reset */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100dvh; }
  img, picture, video, canvas { display: block; max-width: 100%; height: auto; }
  svg { max-width: 100%; }
  input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; }
  ul, ol { padding: 0; }
  ul[role="list"], ol[role="list"] { list-style: none; }
  table { border-collapse: collapse; border-spacing: 0; }
  fieldset { border: 0; padding: 0; min-width: 0; }
  p, li, h1, h2, h3, h4, dd, dt, figcaption { overflow-wrap: break-word; }
  [hidden] { display: none !important; }
}

/* ===================================================================== tokens */
@layer tokens {
  :root {
    color-scheme: light dark;

    /* surfaces: cool neutrals, hue 265 */
    --bg:        light-dark(oklch(.977 .005 265), oklch(.145 .02 266));
    --bg-sunk:   light-dark(oklch(.952 .008 265), oklch(.118 .018 266));
    --surface:   light-dark(oklch(.996 .002 265), oklch(.19 .024 266));
    --surface-2: light-dark(oklch(.963 .007 265), oklch(.228 .028 266));
    --surface-3: light-dark(oklch(.93 .01 265),   oklch(.27 .032 266));

    --line:        light-dark(oklch(.24 .03 265 / .11), oklch(1 0 0 / .09));
    --line-strong: light-dark(oklch(.24 .03 265 / .22), oklch(1 0 0 / .18));

    --ink:   light-dark(oklch(.19 .028 266), oklch(.97 .006 265));
    --ink-2: light-dark(oklch(.37 .028 266), oklch(.84 .014 265));
    --muted: light-dark(oklch(.49 .026 266), oklch(.71 .018 265));

    /* THE one accent: AskShiva electric blue */
    --accent:        light-dark(oklch(.565 .207 262.4), oklch(.655 .184 262));
    --accent-strong: light-dark(oklch(.504 .204 263),   oklch(.72 .16 262));
    --accent-text:   light-dark(oklch(.5 .2 263),       oklch(.78 .13 262));
    --accent-soft:   light-dark(oklch(.565 .207 262.4 / .1), oklch(.655 .184 262 / .16));
    --accent-line:   light-dark(oklch(.565 .207 262.4 / .32), oklch(.655 .184 262 / .45));
    --on-accent: #fff;

    /* Shiva saffron: ONLY the always-on / live signal. Never a second brand colour. */
    --live: oklch(.728 .171 55);

    --good: light-dark(oklch(.52 .13 155), oklch(.78 .15 155));
    --warn: light-dark(oklch(.56 .13 70),  oklch(.83 .14 80));
    --bad:  light-dark(oklch(.55 .19 25),  oklch(.72 .16 25));

    /* categorical series (departments, node kinds): muted, never chrome */
    --series-0: light-dark(oklch(.58 .08 250), oklch(.74 .08 250));
    --series-1: light-dark(oklch(.55 .1 205),  oklch(.76 .1 205));
    --series-2: light-dark(oklch(.58 .14 30),  oklch(.75 .13 30));
    --series-3: var(--accent);
    --series-4: light-dark(oklch(.54 .12 152), oklch(.76 .12 152));
    --series-5: light-dark(oklch(.55 .13 310), oklch(.76 .12 310));

    --glass: light-dark(oklch(.985 .004 265 / .74), oklch(.15 .02 266 / .7));
    --code-bg: light-dark(oklch(.205 .03 266), oklch(.115 .02 266));
    --code-ink: oklch(.93 .01 265);

    /* depth */
    --shadow-1: 0 1px 1px light-dark(oklch(.2 .03 265 / .06), oklch(0 0 0 / .3)),
                0 6px 16px -6px light-dark(oklch(.2 .03 265 / .1), oklch(0 0 0 / .4));
    --shadow-2: 0 1px 1px light-dark(oklch(.2 .03 265 / .05), oklch(0 0 0 / .25)),
                0 10px 20px -8px light-dark(oklch(.2 .03 265 / .14), oklch(0 0 0 / .45)),
                0 34px 70px -24px light-dark(oklch(.2 .03 265 / .25), oklch(0 0 0 / .6));
    --shadow-post: 0 2px 2px oklch(0 0 0 / .1),
                   0 14px 28px -10px light-dark(oklch(.2 .05 265 / .28), oklch(0 0 0 / .45)),
                   0 40px 90px -30px light-dark(oklch(.25 .08 263 / .42), oklch(0 0 0 / .65));
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

    /* type */
    --f-display: "Hanken Grotesk", "Avenir Next", ui-sans-serif, system-ui, sans-serif;
    --f-text: "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", "Helvetica Neue", Arial, sans-serif;
    --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

    /* shape + layout */
    --r-s: 10px; --r-m: 14px; --r-l: 22px; --r-xl: 30px;
    --gutter: clamp(16px, 4vw, 44px);
    --max: 1240px;
    --max-wide: 1440px;
    --hdr: 68px;

    /* motion */
    --ease:    cubic-bezier(.22, 1, .36, 1);
    --ease-io: cubic-bezier(.65, 0, .35, 1);
  }
  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"]  { color-scheme: dark; }

  @media (min-width: 1900px) { :root { --max: 1480px; --max-wide: 1680px; } }
}

/* ======================================================================= base */
@layer base {
  html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 20px); }
  @media (min-width: 1900px) { html { font-size: 112.5%; } }
  @media (min-width: 2300px) { html { font-size: 125%; } }

  body {
    font: 400 1rem/1.6 var(--f-text); color: var(--ink); background: var(--bg);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
    overflow-x: clip;
  }
  h1, h2, h3, h4 { font-family: var(--f-display); color: var(--ink); text-wrap: balance; font-weight: 700; }
  h1 { font-size: clamp(2.55rem, 1.2rem + 5.2vw, 5.6rem); font-weight: 760; letter-spacing: -.045em; line-height: 1.0; }
  h2 { font-size: clamp(1.95rem, 1.2rem + 2.7vw, 3.5rem); letter-spacing: -.035em; line-height: 1.05; }
  h3 { font-size: clamp(1.2rem, 1.06rem + .55vw, 1.5rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.18; }
  h4 { font-size: 1.04rem; font-weight: 650; letter-spacing: -.012em; line-height: 1.3; }
  p { text-wrap: pretty; }
  a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: .22em; }
  a:hover { text-decoration-thickness: 2px; }
  strong, b { font-weight: 650; }
  code, kbd, samp, pre { font-family: var(--f-mono); font-size: .9em; }
  :not(pre) > code { padding: .12em .4em; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: .86em; color: var(--ink); white-space: nowrap; }
  :focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
  :focus:not(:focus-visible) { outline: none; }
  main:focus { outline: none; }
  ::selection { background: var(--accent); color: var(--on-accent); }
  /* thin themed scrollbars on Windows / Linux; macOS keeps native overlay scrollbars */
  :root:not([data-os="mac"])::-webkit-scrollbar, :root:not([data-os="mac"]) ::-webkit-scrollbar { width: 11px; height: 11px; }
  :root:not([data-os="mac"])::-webkit-scrollbar-track, :root:not([data-os="mac"]) ::-webkit-scrollbar-track, :root:not([data-os="mac"]) ::-webkit-scrollbar-corner { background: transparent; }
  :root:not([data-os="mac"])::-webkit-scrollbar-thumb, :root:not([data-os="mac"]) ::-webkit-scrollbar-thumb { min-height: 40px; border-radius: 99px; border: 3px solid transparent; background: color-mix(in oklab, var(--ink) 22%, transparent) padding-box; }
  :root:not([data-os="mac"])::-webkit-scrollbar-thumb:hover, :root:not([data-os="mac"]) ::-webkit-scrollbar-thumb:hover { background-color: color-mix(in oklab, var(--ink) 36%, transparent); border-width: 2px; }
  :root:not([data-os="mac"]) ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
  @supports not selector(::-webkit-scrollbar) {
    :root:not([data-os="mac"]) { scrollbar-width: thin; scrollbar-color: color-mix(in oklab, var(--ink) 22%, transparent) transparent; }
  }
  :lang(hi) { font-family: var(--f-text); }
  hr { border: 0; border-top: 1px solid var(--line); }
  abbr[title] { text-decoration: underline dotted; text-underline-offset: .2em; }
}

/* ===================================================================== layout */
@layer layout {
  .wrap      { width: min(100% - 2 * var(--gutter), var(--max));      margin-inline: auto; }
  .wrap-wide { width: min(100% - 2 * var(--gutter), var(--max-wide)); margin-inline: auto; }
  .section       { padding-block: clamp(72px, 9vw, 140px); position: relative; }
  .section-tight { padding-block: clamp(48px, 6vw, 88px); position: relative; }
  /* consecutive plain sections share one gap; banded sections keep their own */
  .section + .section { padding-top: 0; }
  .section.band, .section.sunk, .section.band + .section, .section.sunk + .section { padding-top: clamp(72px, 9vw, 140px); }
  .section-tight + .section-tight { padding-top: 0; }
  .sunk { background: var(--bg-sunk); border-block: 1px solid var(--line); }

  .bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); }
  .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
  .span-12 { grid-column: 1 / -1; }
  @media (max-width: 980px) { .bento > * { grid-column: span 12; } .bento > .span-3, .bento > .span-4 { grid-column: span 6; } }
  @media (max-width: 640px) { .bento > *, .bento > .span-3, .bento > .span-4 { grid-column: 1 / -1; } }

  .grid { display: grid; gap: clamp(12px, 1.4vw, 20px); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 280px)), 1fr)); }
  @media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

  .split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
  .split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split > .sticky { position: sticky; top: calc(var(--hdr) + 32px); }
  @media (max-width: 900px) { .split, .split.even, .split.flip { grid-template-columns: minmax(0, 1fr); } .split > .sticky { position: static; } }

  .stack { display: grid; gap: var(--gap, 16px); align-content: start; }
  .row { display: flex; flex-wrap: wrap; gap: var(--gap, 12px); align-items: center; }
  .center { text-align: center; }
  .mt-s { margin-top: 16px; } .mt-m { margin-top: clamp(24px, 3vw, 40px); } .mt-l { margin-top: clamp(40px, 6vw, 80px); }
}

/* ================================================================= components */
@layer components {
  /* ---------- small primitives */
  .i { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .mono { font-family: var(--f-mono); font-size: .86em; letter-spacing: -.01em; }
  .muted { color: var(--muted); }
  .tnum { font-variant-numeric: tabular-nums; }
  .accent-text { color: var(--accent-text); }
  .nowrap { white-space: nowrap; }

  .eyebrow { display: inline-flex; align-items: center; gap: .7em; font: 600 .74rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
  .eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
  .lede { font-size: clamp(1.05rem, .98rem + .35vw, 1.28rem); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
  .prose { max-width: 70ch; color: var(--ink-2); }
  .prose > * + * { margin-top: 1em; }
  .h-sm { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.4rem); letter-spacing: -.02em; }
  .h-md { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); letter-spacing: -.03em; line-height: 1.08; }

  .section-head { display: grid; gap: 16px; max-width: 780px; margin-bottom: clamp(32px, 5vw, 60px); justify-items: start; }
  .section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
  .section-head.center .lede { margin-inline: auto; }
  .section-head .row { margin-top: 8px; }

  /* ---------- skip link */
  .skip { position: absolute; left: 12px; top: -120px; z-index: 300; padding: .75em 1.1em; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 650; text-decoration: none; box-shadow: var(--shadow-2); transition: top .25s var(--ease); }
  .skip:focus { top: 12px; }

  /* ---------- buttons */
  .btn {
    --bx: 0px; --by: 0px;
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
    padding: .86em 1.35em; border-radius: 999px; font-weight: 650; font-size: 1rem; line-height: 1; white-space: nowrap;
    text-decoration: none; border: 1px solid transparent;
    transform: translate(var(--bx), var(--by));
    transition: transform .35s var(--ease), background-color .2s, box-shadow .3s, border-color .2s, color .2s;
  }
  .btn .i { transition: transform .35s var(--ease); }
  .btn:hover .i-arrow { transform: translateX(3px); }
  .btn-primary {
    background: var(--accent); color: var(--on-accent);
    box-shadow: 0 1px 0 oklch(1 0 0 / .38) inset, 0 -2px 0 oklch(0 0 0 / .14) inset, 0 10px 24px -10px var(--accent), 0 2px 4px oklch(0 0 0 / .14);
  }
  .btn-primary:hover { background: var(--accent-strong); box-shadow: 0 1px 0 oklch(1 0 0 / .38) inset, 0 -2px 0 oklch(0 0 0 / .14) inset, 0 14px 32px -10px var(--accent), 0 2px 4px oklch(0 0 0 / .14); }
  .btn-primary:active { transform: translate(var(--bx), calc(var(--by) + 1px)); }
  .btn-ghost { border-color: var(--line-strong); background: color-mix(in oklab, var(--surface) 55%, transparent); color: var(--ink); box-shadow: 0 1px 0 oklch(1 0 0 / .06) inset; }
  .btn-ghost:hover { border-color: color-mix(in oklab, var(--ink) 35%, transparent); background: var(--surface); }
  .btn-ghost:active { transform: translate(var(--bx), calc(var(--by) + 1px)); }
  .btn-sm { padding: .66em 1.05em; font-size: .9rem; }
  .btn-lg { padding: 1em 1.6em; font-size: 1.04rem; }
  .btn[disabled] { opacity: .6; pointer-events: none; }
  .link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 650; text-decoration: none; color: var(--accent-text); }
  .link-arrow .i { transition: transform .35s var(--ease); }
  .link-arrow:hover .i { transform: translateX(3px); }

  .icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 55%, transparent); color: var(--ink-2); transition: color .2s, border-color .2s, background-color .2s; }
  .icon-btn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
  .icon-btn .i { width: 18px; height: 18px; }

  /* theme toggle shows the icon of the theme you would switch TO */
  .theme-btn .i-sun { display: none; }
  :root[data-theme="dark"] .theme-btn .i-sun { display: block; }
  :root[data-theme="dark"] .theme-btn .i-moon { display: none; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
    :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
  }

  /* ---------- chips, badges, status */
  .chip { display: inline-flex; align-items: center; gap: .45em; padding: .42em .75em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 550 .8rem/1.1 var(--f-text); color: var(--ink-2); white-space: nowrap; text-decoration: none; }
  a.chip:hover { border-color: var(--line-strong); color: var(--ink); }
  .chip-mono { font: 500 .72rem/1.1 var(--f-mono); letter-spacing: .01em; }
  .chip .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--accent)); flex: none; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; }

  .badge { display: inline-flex; align-items: center; gap: .4em; padding: .32em .6em; border-radius: 999px; font: 600 .68rem/1 var(--f-mono); letter-spacing: .04em; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
  .badge-accent { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent-line); }

  .status { display: inline-flex; align-items: center; gap: .6em; padding: .5em .9em .5em .75em; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 70%, transparent); font: 600 .74rem/1 var(--f-mono); color: var(--ink-2); letter-spacing: .02em; white-space: nowrap; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .status .dot { --dot: var(--muted); position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); flex: none; }
  .status[data-state="live"] .dot { --dot: var(--live); }
  .status[data-state="paused"] .dot { --dot: var(--warn); }
  .status[data-state="stopped"] .dot { --dot: var(--bad); }
  .status[data-state="offline"] .dot { --dot: var(--muted); background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }

  /* ---------- header */
  .site-header { position: sticky; top: 0; z-index: 100; background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; view-transition-name: site-header; }
  .site-header[data-scrolled="true"] { border-bottom-color: var(--line); box-shadow: 0 10px 30px -24px light-dark(oklch(.2 .03 265 / .3), oklch(0 0 0 / .8)); }
  .hdr { display: flex; align-items: center; gap: 14px; min-height: var(--hdr); }
  .brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--ink); text-decoration: none; font: 720 1.1rem/1 var(--f-display); letter-spacing: -.025em; }
  .brand img { width: 32px; height: 32px; border-radius: 50%; box-shadow: var(--shadow-1); }
  .brand:hover { text-decoration: none; }
  .nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in oklab, var(--surface) 60%, transparent); }
  .nav a { padding: .58em .95em; border-radius: 999px; font-size: .9rem; font-weight: 560; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: color .2s, background-color .2s; }
  .nav a:hover { color: var(--ink); background: var(--surface-2); }
  .nav a[aria-current="page"] { color: var(--on-accent); background: var(--accent); box-shadow: 0 1px 0 oklch(1 0 0 / .35) inset, 0 6px 16px -8px var(--accent); }
  .nav .nav-cta { display: none; }
  .nav a.nav-cta, .nav a.nav-cta:hover { color: var(--on-accent); background: var(--accent); justify-content: center; }
  .nav a.nav-cta:hover { background: var(--accent-strong); }
  .hdr-actions { display: flex; align-items: center; gap: 8px; flex: none; }
  .menu-btn { display: none; }
  .menu-btn .i-close { display: none; }
  .menu-btn[aria-expanded="true"] .i-close { display: block; }
  .menu-btn[aria-expanded="true"] .i-menu { display: none; }

  @media (min-width: 1041px) {
    .nav a[aria-current="page"] { view-transition-name: nav-pill; }
  }
  @media (max-width: 1040px) {
    html.js .menu-btn { display: grid; }
    html.js .hdr-actions { margin-left: auto; }
    html.js .nav {
      position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--hdr) + 8px);
      flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border-radius: var(--r-l);
      background: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow-2);
      max-height: calc(100dvh - var(--hdr) - 24px); overflow: auto;
      opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top center;
      transition: opacity .25s, transform .35s var(--ease), visibility 0s .35s;
    }
    html.js .nav[data-open="true"] { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .35s var(--ease); }
    html.js .nav a { padding: .95em 1em; font-size: 1.02rem; border-radius: var(--r-m); }
    html.js .nav .nav-cta { display: flex; margin-top: 6px; padding: .95em 1em; border-radius: var(--r-m); }
    html:not(.js) .hdr { flex-wrap: wrap; padding-block: 10px; }
    html:not(.js) .nav { order: 3; width: 100%; overflow-x: auto; border-radius: var(--r-m); justify-content: flex-start; }
  }
  @media (max-width: 520px) { html.js .hdr-actions .btn-open { display: none; } }

  /* ---------- breadcrumbs + page hero */
  .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .55em; font: 500 .8rem/1 var(--f-mono); color: var(--muted); list-style: none; padding: 0; }
  .crumbs li + li::before { content: "/"; margin-right: .55em; opacity: .6; }
  .crumbs a { color: inherit; text-decoration: none; }
  .crumbs a:hover { color: var(--ink); }
  .crumbs [aria-current] { color: var(--ink-2); }

  .hero, .page-hero { position: relative; isolation: isolate; overflow: clip; }
  .hero { padding-block: clamp(40px, 6vw, 96px) clamp(56px, 7vw, 110px); }
  .page-hero { padding-block: clamp(32px, 5vw, 72px) clamp(40px, 6vw, 88px); border-bottom: 1px solid var(--line); }
  .hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
  .hero-bg::before {
    content: ""; position: absolute; inset: 0;
    background:
      radial-gradient(55% 60% at 78% 4%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 70%),
      radial-gradient(38% 40% at 4% 30%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 70%);
  }
  .hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px; background-position: center top;
    -webkit-mask-image: radial-gradient(70% 70% at 62% 12%, #000 10%, transparent 72%); mask-image: radial-gradient(70% 70% at 62% 12%, #000 10%, transparent 72%);
    opacity: .75;
  }
  .grain { position: absolute; inset: 0; background: var(--grain); opacity: .07; mix-blend-mode: overlay; pointer-events: none; }
  .page-hero .crumbs { margin-bottom: clamp(20px, 3vw, 36px); }
  .page-hero h1 { font-size: clamp(2.35rem, 1.3rem + 4vw, 4.6rem); max-width: 18ch; }
  .page-hero .lede { margin-top: 20px; }
  .page-hero .row { margin-top: 28px; }
  .toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
  .toc a { padding: .5em .9em; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 60%, transparent); font: 550 .82rem/1 var(--f-text); color: var(--ink-2); text-decoration: none; transition: border-color .2s, color .2s; }
  .toc a:hover { color: var(--ink); border-color: var(--line-strong); }

  /* home hero */
  .hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(36px, 5vw, 80px); align-items: center; }
  .hero-copy { display: grid; gap: 24px; justify-items: start; }
  .hero h1 .accent-text { display: block; }
  .hero .lede { max-width: 54ch; }
  .hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 500 .78rem/1.4 var(--f-mono); color: var(--muted); }
  .hero-meta span { display: inline-flex; align-items: center; gap: .5em; }
  .hero-meta span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }
  @media (max-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

  /* ---------- the console (hero illustration) */
  .console-stage { position: relative; padding-bottom: 48px; }
  .console { position: relative; border-radius: var(--r-xl); background: color-mix(in oklab, var(--surface) 92%, transparent); border: 1px solid var(--line-strong); box-shadow: var(--shadow-post); overflow: hidden; isolation: isolate; }
  .console::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 oklch(1 0 0 / .14); background: linear-gradient(120deg, oklch(1 0 0 / .05), transparent 35%); }
  .console-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
  .console-dots { display: flex; gap: 6px; flex: none; }
  .console-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
  .console-title { font: 650 .92rem/1.2 var(--f-display); letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .console-bar .chip { margin-left: auto; }
  .run { list-style: none; padding: 20px 20px 8px; display: grid; position: relative; }
  .run-step { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding-bottom: 20px; }
  .run-step::before { content: ""; position: absolute; left: 18.5px; top: 38px; bottom: 2px; width: 1.5px; background: var(--line-strong); }
  .run-step:last-child::before { display: none; }
  .run-step.is-done::before { background: color-mix(in oklab, var(--accent) 55%, var(--line-strong)); }
  .run-node { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink-2); font: 700 .72rem/1 var(--f-mono); }
  .run-node .i { width: 17px; height: 17px; }
  .is-done .run-node { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
  .is-now .run-node { color: var(--on-accent); background: var(--accent); border-color: transparent; box-shadow: 0 0 0 5px var(--accent-soft), 0 8px 20px -8px var(--accent); }
  .run-body { display: grid; gap: 3px; min-width: 0; padding-top: 2px; }
  .run-body b { font: 650 .95rem/1.25 var(--f-display); letter-spacing: -.01em; }
  .run-body span { font-size: .84rem; color: var(--muted); line-height: 1.4; }
  .run-tag { font: 500 .68rem/1 var(--f-mono); color: var(--muted); padding-top: 6px; white-space: nowrap; }
  .is-now .run-tag { color: var(--accent-text); }
  .run-actions { display: flex; gap: 6px; margin-top: 8px; }
  .fake-btn { display: inline-flex; padding: .45em .8em; border-radius: 999px; font: 650 .74rem/1 var(--f-text); border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--surface); }
  .fake-btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 1px 0 oklch(1 0 0 / .35) inset; }
  .console-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 20px 42px; border-top: 1px solid var(--line); font: 500 .7rem/1.3 var(--f-mono); color: var(--muted); }
  .console-foot span { display: inline-flex; align-items: center; gap: .5em; }
  .console-foot .i { width: 13px; height: 13px; color: var(--accent-text); }
  .float-card { position: absolute; right: clamp(-28px, -2vw, 0px); bottom: 0; width: min(330px, 86%); padding: 14px 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
  .float-card p { font-size: .84rem; color: var(--ink-2); line-height: 1.4; }
  .float-card b { display: block; font: 650 .88rem/1.25 var(--f-display); color: var(--ink); }
  .float-card .mono { color: var(--muted); font-size: .7rem; }
  @media (max-width: 980px) { .float-card { right: 12px; } }
  @media (max-width: 640px) {
    .console-stage { padding-bottom: 0; }
    .float-card { position: relative; right: auto; bottom: auto; margin: -30px 12px 0 auto; }
  }

  /* ---------- glyph tile (agents) */
  .glyph { --cat: var(--accent); display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; flex: none;
    font: 700 .8rem/1 var(--f-mono); letter-spacing: .02em;
    color: color-mix(in oklab, var(--cat) 78%, var(--ink));
    background: color-mix(in oklab, var(--cat) 14%, var(--surface));
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--cat) 32%, transparent), inset 0 1px 0 oklch(1 0 0 / .12); }
  .glyph.sm { width: 32px; height: 32px; border-radius: 10px; font-size: .66rem; }
  .run-node.glyph { width: 38px; height: 38px; border-radius: 12px; }

  /* ---------- cards */
  .card {
    --mx: 50%; --my: 0%;
    position: relative; isolation: isolate; overflow: hidden; display: block;
    border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface);
    box-shadow: var(--shadow-1); padding: clamp(20px, 2.4vw, 32px); color: inherit;
    transition: border-color .3s, box-shadow .4s, transform .4s var(--ease);
  }
  .card::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in oklab, var(--accent) 15%, transparent), transparent 65%);
    opacity: 0; transition: opacity .4s;
  }
  .card:hover::before { opacity: 1; }
  .card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
  a.card { text-decoration: none; }
  a.card:hover { transform: translateY(-2px); }
  .card h3 + p, .card h4 + p { margin-top: 10px; color: var(--ink-2); }
  .card-k { font: 600 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .card .link-arrow { margin-top: 18px; }
  .card.flat { box-shadow: none; }
  .card.sunk { background: var(--surface-2); box-shadow: none; }

  /* pillars */
  .pillar { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 3vw, 40px); }
  .pillar .link-arrow { margin-top: auto; padding-top: 8px; align-self: flex-start; }
  .pillar-n { font: 600 .78rem/1 var(--f-mono); color: var(--accent-text); letter-spacing: .08em; }
  .pillar h3 { font-size: clamp(1.4rem, 1.15rem + .9vw, 1.9rem); letter-spacing: -.03em; }
  .pillar > p { color: var(--ink-2); }
  .ticks { list-style: none; padding: 0; display: grid; gap: 10px; }
  .ticks li { position: relative; padding-left: 28px; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
  .ticks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
  .ticks li::after { content: ""; position: absolute; left: 5.5px; top: calc(.2em + 5.5px); width: 7px; height: 4px; border-left: 1.6px solid var(--accent-text); border-bottom: 1.6px solid var(--accent-text); transform: rotate(-45deg); }

  /* bento tiles */
  .tile { display: grid; gap: 14px; align-content: start; min-height: 100%; }
  .tile h3 { max-width: 24ch; }
  .tile > p { color: var(--ink-2); max-width: 56ch; }
  .tile .viz { margin-top: 10px; }
  .tile-k { display: inline-flex; align-items: center; gap: .55em; font: 600 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .tile-k .i { width: 15px; height: 15px; color: var(--accent-text); }

  /* heartbeat timeline */
  .hb { --now: -1; position: relative; display: grid; gap: 10px; padding: 16px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); }
  .hb-row { display: grid; grid-template-columns: minmax(0, 132px) minmax(0, 1fr); gap: 12px; align-items: center; }
  .hb-name { font: 600 .82rem/1.2 var(--f-display); display: grid; }
  .hb-name small { font: 500 .66rem/1.3 var(--f-mono); color: var(--muted); }
  .hb-track { position: relative; height: 18px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
  .hb-track[data-every] { background-image: repeating-linear-gradient(90deg, color-mix(in oklab, var(--accent) 70%, transparent) 0 2px, transparent 2px calc(100% / var(--n))); background-position: 0 0; }
  .hb-track i { position: absolute; top: 3px; bottom: 3px; left: calc(var(--h) / 24 * 100%); width: 3px; border-radius: 2px; background: var(--accent); }
  .hb-axis { display: grid; grid-template-columns: minmax(0, 132px) minmax(0, 1fr); gap: 12px; }
  .hb-axis > span { font: 500 .64rem/1.2 var(--f-mono); color: var(--muted); }
  .hb-axis div { display: flex; justify-content: space-between; font: 500 .64rem/1 var(--f-mono); color: var(--muted); }
  .hb-now { position: absolute; top: 10px; bottom: 26px; width: 0; border-left: 1.5px dashed var(--live); left: calc(16px + 132px + 12px + (100% - 16px * 2 - 132px - 12px) * var(--now)); display: none; }
  .hb[data-now] .hb-now { display: block; }
  .hb-now::before { content: ""; position: absolute; top: -4px; left: -4.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
  @media (max-width: 520px) {
    .hb-row, .hb-axis { grid-template-columns: minmax(0, 96px) minmax(0, 1fr); }
    .hb-now { left: calc(16px + 96px + 12px + (100% - 16px * 2 - 96px - 12px) * var(--now)); }
  }

  /* small svg vizzes */
  .viz-svg { width: 100%; height: auto; overflow: visible; }
  .v-line { fill: none; stroke: color-mix(in oklab, var(--accent) 55%, var(--line-strong)); stroke-width: 2; }
  .v-fork { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 5 5; }
  .v-done { fill: var(--accent); }
  .v-ring { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
  .v-ghost { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2; }
  .v-label { font: 500 11px var(--f-mono); fill: var(--muted); }
  .v-label.strong { fill: var(--accent-text); font-weight: 600; }

  /* memory blocks */
  .mem { display: grid; gap: 8px; }
  .mem-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: center; font: 500 .74rem/1 var(--f-mono); color: var(--ink-2); }
  .mem-bar { height: 10px; border-radius: 5px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
  .mem-bar::after { content: ""; display: block; height: 100%; width: var(--fill); border-radius: inherit; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 55%, transparent), var(--accent)); }
  .mem-note { font: 500 .7rem/1.4 var(--f-mono); color: var(--muted); margin-top: 4px; }

  /* autonomy ladder (risk classes allowed per level) */
  .ladder { display: grid; gap: 7px; }
  .ladder-row { display: grid; grid-template-columns: 92px repeat(5, minmax(0, 1fr)); gap: 4px; align-items: center; }
  .ladder-row > span:first-child { font: 600 .74rem/1 var(--f-mono); color: var(--ink-2); white-space: nowrap; }
  .ladder-row i { height: 14px; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
  .ladder-row i.on { background: var(--accent); box-shadow: inset 0 1px 0 oklch(1 0 0 / .3); }
  .ladder-row i.crit { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 4px, color-mix(in oklab, var(--warn) 30%, transparent) 4px 6px); }
  .ladder-head { display: grid; grid-template-columns: 92px repeat(5, minmax(0, 1fr)); gap: 4px; font: 500 .58rem/1 var(--f-mono); color: var(--muted); letter-spacing: -.02em; }
  .ladder-head span { text-align: center; overflow: hidden; white-space: nowrap; }

  /* endpoint list */
  .endpoints { list-style: none; padding: 0; display: grid; gap: 6px; font: 500 .76rem/1.35 var(--f-mono); }
  .endpoints li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
  .endpoints b { color: var(--accent-text); font-weight: 600; }
  .endpoints span { overflow-wrap: anywhere; color: var(--ink-2); }

  /* models list (live) */
  .models { list-style: none; padding: 0; display: grid; gap: 8px; }
  .models li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
  .models .m-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
  .models [data-healthy="true"] .m-dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in oklab, var(--good) 20%, transparent); }
  .models [data-healthy="false"] .m-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
  .models b { font: 600 .9rem/1.2 var(--f-display); display: block; }
  .models small { font: 500 .7rem/1.3 var(--f-mono); color: var(--muted); }
  .models em { font: 500 .68rem/1 var(--f-mono); font-style: normal; color: var(--muted); }

  .devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr)); gap: 10px; }
  .device { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); }
  .device b { font: 650 .95rem/1.2 var(--f-display); }
  .device span { font: 500 .7rem/1.3 var(--f-mono); color: var(--muted); }

  /* ---------- live counters board */
  .live-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
  .counters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
  .counter { display: grid; gap: 10px; align-content: start; padding: clamp(16px, 2vw, 26px); border-left: 1px solid var(--line); }
  .counter:first-child { border-left: 0; }
  .counter dt { font: 600 .68rem/1.25 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .counter dd { font: 700 clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem)/1 var(--f-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--ink); }
  .counter dd[data-empty] { color: var(--muted); }
  .live-note { margin-top: 14px; font: 500 .76rem/1.5 var(--f-mono); color: var(--muted); }
  @media (max-width: 980px) {
    .counters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .counter:nth-child(3n + 1) { border-left: 0; }
    .counter:nth-child(n + 4) { border-top: 1px solid var(--line); }
  }
  @media (max-width: 560px) {
    .counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .counter { border-left: 1px solid var(--line); border-top: 0; }
    .counter:nth-child(odd) { border-left: 0; }
    .counter:nth-child(n + 3) { border-top: 1px solid var(--line); }
  }

  /* ---------- topology tiles (team patterns strip) */
  .topos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
  .topo { display: grid; gap: 10px; align-content: start; padding: 18px; }
  .topo svg { width: 100%; height: 64px; }
  .topo h3 { font-size: 1.02rem; letter-spacing: -.015em; }
  .topo p { font-size: .86rem; color: var(--ink-2); line-height: 1.45; margin: 0; }
  .topo .lin { font: 500 .7rem/1.35 var(--f-mono); color: var(--accent-text); }
  .t-e { fill: none; stroke: var(--line-strong); stroke-width: 1.6; }
  .t-e.acc { stroke: color-mix(in oklab, var(--accent) 70%, transparent); }
  .t-e.dash { stroke-dasharray: 3 4; }
  .t-n { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.6; }
  .t-h { fill: var(--accent); stroke: none; }
  .t-r { fill: var(--accent-soft); stroke: var(--accent-line); stroke-width: 1.2; }

  /* ---------- how it works */
  .steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); counter-reset: step; }
  .step { display: grid; gap: 12px; align-content: start; }
  .step-n { font: 600 .78rem/1 var(--f-mono); color: var(--accent-text); letter-spacing: .08em; display: flex; align-items: center; gap: 10px; }
  .step-n::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent-line), transparent); }
  .step p { color: var(--ink-2); font-size: .95rem; }
  .step-viz { margin-top: 6px; padding: 12px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); font-size: .82rem; color: var(--ink-2); line-height: 1.45; }
  .step-viz .mono { font-size: .72rem; color: var(--muted); display: block; margin-bottom: 6px; }
  .step-viz .glyphs { display: flex; gap: 6px; }
  .on-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-right: .5em; vertical-align: .05em; }
  @media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 600px) { .steps { grid-template-columns: minmax(0, 1fr); } }

  /* ---------- band (governance, dark-ish) */
  .band { position: relative; isolation: isolate; overflow: clip; background: var(--bg-sunk); border-block: 1px solid var(--line); }
  .band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 100% 0%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 70%); }
  .band .grain { z-index: -1; }
  .controls { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
  .controls li { padding: 16px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
  .controls b { font: 650 .98rem/1.25 var(--f-display); letter-spacing: -.01em; }
  .controls span { font-size: .87rem; color: var(--ink-2); line-height: 1.45; }
  @media (max-width: 560px) { .controls { grid-template-columns: minmax(0, 1fr); } }

  /* ---------- tables */
  .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1); }
  .data { width: 100%; min-width: 620px; font-size: .94rem; }
  .data th, .data td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
  .data tr:last-child > * { border-bottom: 0; }
  .data thead th { font: 600 .7rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
  .data tbody th { font: 650 .95rem/1.35 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
  .data td { color: var(--ink-2); }
  .data .us { color: var(--ink); font-weight: 600; background: var(--accent-soft); }
  .data thead .us { color: var(--accent-text); background: color-mix(in oklab, var(--accent) 14%, var(--surface-2)); }
  .data caption { caption-side: bottom; text-align: left; padding: 12px 18px; font: 500 .74rem/1.5 var(--f-mono); color: var(--muted); border-top: 1px solid var(--line); }
  .cell { display: inline-flex; align-items: center; gap: .45em; padding: .3em .6em; border-radius: 999px; font: 600 .72rem/1 var(--f-mono); white-space: nowrap; }
  .cell.run { color: var(--good); background: color-mix(in oklab, var(--good) 12%, transparent); }
  .cell.ask { color: light-dark(oklch(.48 .12 65), var(--warn)); background: color-mix(in oklab, var(--warn) 14%, transparent); }
  .matrix td, .matrix th { text-align: center; padding: 12px 8px; }
  .matrix tbody th { padding-left: 14px; white-space: nowrap; }
  .matrix tbody th { text-align: left; }

  /* ---------- FAQ */
  .faq { border-top: 1px solid var(--line); }
  .faq details { border-bottom: 1px solid var(--line); }
  .faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 22px 0; font: 650 clamp(1.02rem, .98rem + .3vw, 1.18rem)/1.35 var(--f-display); letter-spacing: -.012em; }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; flex: none; font: 400 1.5rem/1 var(--f-text); color: var(--accent-text); transition: transform .35s var(--ease-io); }
  .faq details[open] summary::after { transform: rotate(45deg); }
  .faq summary:hover { color: var(--accent-text); }
  .faq .answer { padding: 0 0 24px; color: var(--ink-2); max-width: 70ch; display: grid; gap: .8em; }

  /* ---------- CTA band */
  .cta { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl); padding: clamp(36px, 6vw, 88px) clamp(22px, 5vw, 72px); border: 1px solid var(--accent-line); background: var(--surface); box-shadow: var(--shadow-2); display: grid; gap: 22px; justify-items: start; }
  .cta::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(70% 120% at 100% 0%, color-mix(in oklab, var(--accent) 26%, transparent), transparent 70%), radial-gradient(50% 90% at 0% 100%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 70%); }
  .cta .grain { z-index: -1; opacity: .09; }
  .cta h2 { max-width: 18ch; }
  .cta-mark { position: absolute; right: clamp(-40px, -2vw, 0px); bottom: -30px; width: clamp(180px, 26vw, 360px); color: var(--accent); opacity: .12; z-index: -1; pointer-events: none; }

  /* ---------- footer */
  .site-footer { position: relative; overflow: hidden; isolation: isolate; background: var(--bg-sunk); border-top: 1px solid var(--line); padding-top: clamp(56px, 7vw, 100px); }
  .foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); position: relative; z-index: 1; }
  .foot-brand { display: grid; gap: 16px; align-content: start; justify-items: start; }
  .foot-brand p { color: var(--ink-2); max-width: 32ch; font-size: .95rem; }
  .foot-col h2 { font: 600 .7rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
  .foot-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
  .foot-col a { color: var(--ink-2); text-decoration: none; font-size: .94rem; }
  .foot-col a:hover { color: var(--ink); text-decoration: underline; }
  .foot-base { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: clamp(48px, 6vw, 80px); padding-block: 22px clamp(110px, 17vw, 260px); border-top: 1px solid var(--line); font: 500 .78rem/1.5 var(--f-mono); color: var(--muted); }
  .foot-base a { color: inherit; }
  .foot-mega { position: absolute; left: 50%; bottom: -.2em; translate: -50% 0; z-index: 0; white-space: nowrap;
    font: 800 clamp(7rem, 24vw, 24rem)/.8 var(--f-display); letter-spacing: -.06em;
    color: transparent; -webkit-text-stroke: 1px var(--line-strong); opacity: .8; pointer-events: none; user-select: none; }
  .foot-brand .status { white-space: normal; line-height: 1.3; }
  @media (max-width: 1100px) { .foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
  @media (max-width: 640px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

  /* ---------- library */
  .lib-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
  .lib-stat { display: grid; gap: 6px; padding: 14px 18px; border-radius: var(--r-m); border: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 70%, transparent); min-width: 120px; }
  .lib-stat b { font: 700 1.7rem/1 var(--f-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
  .lib-stat span { font: 600 .66rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

  .toolbar { position: sticky; top: var(--hdr); z-index: 20; padding-block: 14px; background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--line); }
  .toolbar-row { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: 14px; align-items: center; }
  @media (max-width: 820px) { .toolbar { position: static; } .toolbar-row { grid-template-columns: minmax(0, 1fr); } }
  .search { position: relative; }
  .search .i { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
  .search input { width: 100%; padding: .78em 1em .78em 2.6em; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: .95rem; transition: border-color .2s, box-shadow .2s; }
  .search input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  .search input::-webkit-search-cancel-button { cursor: pointer; }
  .filter { position: relative; display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: thin; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); padding-right: 28px; }
  .chip-btn { display: inline-flex; align-items: center; gap: .5em; flex: none; padding: .55em .9em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 560 .84rem/1 var(--f-text); white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s; }
  .chip-btn:hover { color: var(--ink); border-color: var(--line-strong); }
  .chip-btn .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--muted)); }
  .chip-btn .n { font: 500 .7rem/1 var(--f-mono); color: var(--muted); }
  .chip-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 1px 0 oklch(1 0 0 / .35) inset, 0 6px 16px -8px var(--accent); }
  .chip-btn[aria-pressed="true"] .n { color: color-mix(in oklab, var(--on-accent) 80%, transparent); }
  .chip-btn[aria-pressed="true"] .sw { background: var(--on-accent); }

  .results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; font: 500 .8rem/1.4 var(--f-mono); color: var(--muted); }
  .results-bar button { font: 600 .8rem/1 var(--f-text); color: var(--accent-text); text-decoration: underline; text-underline-offset: .2em; }
  .agent-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
  .agent-card { display: grid; gap: 14px; align-content: start; height: 100%; padding: 20px; }
  .agent-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
  .agent-name { font: 680 1.08rem/1.2 var(--f-display); letter-spacing: -.015em; }
  .agent-role { font-size: .84rem; color: var(--muted); line-height: 1.3; margin-top: 2px; }
  .agent-goal { font-size: .9rem; color: var(--ink-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .agent-meta { display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1.5fr); gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: auto; }
  .agent-meta div { display: grid; gap: 4px; min-width: 0; }
  .agent-meta dt { font: 600 .6rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .agent-meta dd { font: 550 .8rem/1.25 var(--f-text); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .auto { display: inline-flex; align-items: center; gap: 6px; font: 600 .66rem/1 var(--f-mono); color: var(--ink-2); white-space: nowrap; }
  .auto .pips { display: inline-flex; gap: 2px; }
  .auto .pips i { width: 4px; height: 11px; border-radius: 2px; background: var(--line-strong); }
  .auto[data-level="0"] .pips i:nth-child(-n + 1),
  .auto[data-level="1"] .pips i:nth-child(-n + 2),
  .auto[data-level="2"] .pips i:nth-child(-n + 3),
  .auto[data-level="3"] .pips i:nth-child(-n + 4) { background: var(--accent); }
  .lineage { font: 500 .7rem/1.35 var(--f-mono); color: var(--accent-text); }
  .is-focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-2); }

  .empty, .notice { display: grid; gap: 10px; justify-items: start; padding: clamp(24px, 4vw, 44px); border-radius: var(--r-l); border: 1px dashed var(--line-strong); background: var(--surface-2); color: var(--ink-2); }
  .notice h3 { font-size: 1.15rem; }
  .sk { height: 196px; border-radius: var(--r-l); background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%) 0 0 / 300% 100%; border: 1px solid var(--line); animation: shimmer 1.6s linear infinite; }

  .blueprints { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
  .bp-card { display: grid; gap: 14px; align-content: start; height: 100%; }
  .bp-card h3 { font-size: 1.2rem; }
  .bp-card p { color: var(--ink-2); font-size: .92rem; }
  .stack-glyphs { display: flex; }
  .stack-glyphs .glyph { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 1px color-mix(in oklab, var(--cat) 32%, transparent); }
  .stack-glyphs .glyph:first-child { margin-left: 0; }
  .bp-foot { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: auto; }

  .patterns { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
  .pt-card { display: grid; gap: 12px; align-content: start; height: 100%; padding: 0; }
  .pt-graph { padding: 14px; height: 168px; display: grid; place-items: center; background-color: var(--surface-2); background-image: radial-gradient(var(--line-strong) 1px, transparent 1.2px); background-size: 16px 16px; border-bottom: 1px solid var(--line); }
  .pt-body { display: grid; gap: 10px; padding: 4px 20px 20px; }
  .pt-body h3 { font-size: 1.1rem; }
  .pt-body p { font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
  .pt-out { font-size: .84rem !important; color: var(--ink) !important; padding-left: 12px; border-left: 2px solid var(--accent-line); }
  .pt-foot { display: flex; flex-wrap: wrap; gap: 6px; }

  .mini-graph { width: 100%; height: 100%; max-height: 140px; overflow: visible; }
  .mini-graph .g-edge { fill: none; stroke: color-mix(in oklab, var(--ink) 30%, transparent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
  .mini-graph .g-edge.e-loop { stroke-dasharray: 4 4; }
  .mini-graph .g-edge.e-fail { stroke: color-mix(in oklab, var(--bad) 70%, transparent); stroke-dasharray: 3 4; }
  .mini-graph .g-node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
  .mini-graph .g-node .g-stack { fill: var(--surface-2); }
  .mini-graph .g-dot { fill: var(--muted); }
  .mini-graph .g-skel { fill: var(--line-strong) !important; stroke: none !important; }
  .mini-graph text { font: 600 26px var(--f-text); fill: var(--ink); }
  .mini-graph .k-trigger > rect:not(.g-skel) { fill: var(--accent); stroke: transparent; }
  .mini-graph .k-trigger .g-dot { fill: var(--on-accent); }
  .mini-graph .k-trigger text { fill: var(--on-accent); }
  .mini-graph .k-trigger .g-skel { fill: color-mix(in oklab, var(--on-accent) 55%, transparent) !important; }
  .mini-graph .k-agent > rect:not(.g-skel):not(.g-stack) { fill: color-mix(in oklab, var(--accent) 10%, var(--surface)); stroke: var(--accent-line); }
  .mini-graph .k-agent .g-dot { fill: var(--accent); }
  .mini-graph .k-logic .g-dot { fill: var(--series-1); }
  .mini-graph .k-human .g-dot { fill: var(--warn); }
  .mini-graph .k-io .g-dot { fill: var(--series-4); }
  .mini-graph .k-data .g-dot { fill: var(--series-5); }

  /* ---------- solutions */
  .dept-card { display: grid; gap: 14px; align-content: start; height: 100%; }
  .dept-card .head { display: flex; align-items: center; gap: 12px; }
  .dept-card h3 { font-size: 1.2rem; }
  .dept-card > p { color: var(--ink-2); font-size: .94rem; }
  .map-list { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: auto; }
  .map-list > div { display: grid; gap: 6px; }
  .map-list dt { font: 600 .62rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .map-list dd { display: flex; flex-wrap: wrap; gap: 6px; }
  .ind-card { display: grid; gap: 14px; align-content: start; height: 100%; }
  .ind-card h3 { font-size: 1.25rem; }
  .ind-card .ticks li { font-size: .9rem; }
  .guard { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-m); background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: .85rem; color: var(--ink); line-height: 1.45; }
  .guard .i { color: var(--accent-text); margin-top: 1px; }

  /* ---------- platform */
  .arch-wrap { overflow-x: auto; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-post); padding: clamp(14px, 2vw, 28px); }
  .arch { display: block; width: 100%; min-width: 900px; height: auto; }
  .arch text { font-family: var(--f-text); fill: var(--ink); }
  .arch .a-t { font: 650 15px var(--f-display); letter-spacing: -.01em; }
  .arch .a-s { font: 500 11.5px var(--f-mono); fill: var(--muted); }
  .arch .a-k { font: 600 10.5px var(--f-mono); letter-spacing: .14em; fill: var(--accent-text); }
  .arch .a-box { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.2; }
  .arch .a-zone { fill: color-mix(in oklab, var(--accent) 5%, var(--surface)); stroke: var(--accent-line); stroke-width: 1.2; stroke-dasharray: 6 6; }
  .arch .a-acc { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.4; }
  .arch .a-solid { fill: var(--accent); }
  .arch .a-solid-t { fill: var(--on-accent); font: 650 14px var(--f-display); }
  .arch .a-solid-s { fill: color-mix(in oklab, var(--on-accent) 82%, transparent); font: 500 11px var(--f-mono); }
  .arch .a-line { fill: none; stroke: color-mix(in oklab, var(--ink) 38%, transparent); stroke-width: 1.4; }
  .arch .a-flow { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 5 7; }
  .arch .a-head { fill: color-mix(in oklab, var(--ink) 50%, transparent); }
  .arch .a-head-acc { fill: var(--accent); }
  .arch .a-live { fill: var(--live); }
  .arch-cap { margin-top: 14px; font: 500 .76rem/1.5 var(--f-mono); color: var(--muted); }
  .scroll-hint { display: none; font: 500 .72rem/1 var(--f-mono); color: var(--muted); margin-bottom: 10px; }
  @media (max-width: 960px) { .scroll-hint { display: block; } }

  .spec { display: grid; gap: 0; border-top: 1px solid var(--line); }
  .spec > div { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .spec dt { font: 600 .74rem/1.5 var(--f-mono); letter-spacing: .04em; color: var(--ink); }
  .spec dd { color: var(--ink-2); font-size: .95rem; }
  @media (max-width: 560px) { .spec > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

  .node-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
  .node-group h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin-bottom: 14px; }
  .node-group h3 .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--cat); }
  .node-group ul { list-style: none; padding: 0; display: grid; gap: 12px; }
  .node-group li { display: grid; gap: 2px; }
  .node-group li b { font: 640 .94rem/1.3 var(--f-display); }
  .node-group li span { font-size: .86rem; color: var(--ink-2); line-height: 1.45; }

  .feature { display: grid; gap: 14px; align-content: start; }
  .feature-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .feature-list li { padding: 18px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); display: grid; gap: 6px; align-content: start; }
  .feature-list b { font: 650 1rem/1.3 var(--f-display); letter-spacing: -.01em; }
  .feature-list span { font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
  @media (max-width: 640px) { .feature-list { grid-template-columns: minmax(0, 1fr); } }

  /* audit chain */
  .chain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; position: relative; }
  .chain-block { position: relative; padding: 16px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line-strong); font: 500 .74rem/1.6 var(--f-mono); color: var(--ink-2); display: grid; gap: 2px; min-width: 0; }
  .chain-block b { color: var(--ink); font-weight: 600; }
  .chain-block span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chain-block .h { color: var(--accent-text); }
  .chain-block + .chain-block::before { content: ""; position: absolute; left: -19px; top: 50%; width: 20px; height: 1.5px; background: var(--accent); }
  @media (max-width: 760px) {
    .chain { grid-template-columns: minmax(0, 1fr); }
    .chain-block + .chain-block::before { left: 24px; top: -19px; width: 1.5px; height: 20px; }
  }

  /* ---------- code */
  .code { border-radius: var(--r-l); overflow: hidden; background: var(--code-bg); color: var(--code-ink); box-shadow: var(--shadow-2); border: 1px solid light-dark(transparent, oklch(1 0 0 / .08)); min-width: 0; }
  .code-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid oklch(1 0 0 / .08); font: 500 .72rem/1 var(--f-mono); color: oklch(.72 .02 265); }
  .code-head .lang { padding: .35em .55em; border-radius: 6px; background: oklch(1 0 0 / .07); color: oklch(.86 .06 262); }
  .code-head .title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .code-copy { margin-left: auto; display: inline-flex; align-items: center; gap: .4em; padding: .45em .7em; border-radius: 8px; color: oklch(.86 .01 265); border: 1px solid oklch(1 0 0 / .12); font: 600 .7rem/1 var(--f-mono); transition: background-color .2s, border-color .2s; }
  .code-copy:hover { background: oklch(1 0 0 / .08); border-color: oklch(1 0 0 / .22); }
  .code-copy .i { width: 13px; height: 13px; }
  .code pre { margin: 0; padding: 18px 20px 20px; overflow-x: auto; font: 450 .82rem/1.7 var(--f-mono); tab-size: 2; color: var(--code-ink); }
  .code pre:focus-visible { outline-offset: -3px; }
  .code .c { color: oklch(.62 .025 265); font-style: italic; }
  .code .s { color: oklch(.82 .11 255); }
  .code .k { color: oklch(.97 .005 265); font-weight: 600; }
  .code .p { color: oklch(.72 .02 265); }
  .code .n { color: oklch(.86 .07 230); }
  .code + .code { margin-top: 14px; }

  /* ---------- forms */
  .form { display: grid; gap: 18px; }
  .form .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  @media (max-width: 560px) { .form .two { grid-template-columns: minmax(0, 1fr); } }
  .field { display: grid; gap: 8px; }
  .field label { font-weight: 620; font-size: .92rem; }
  .field label .opt { font-weight: 450; color: var(--muted); font-size: .85rem; }
  .input { width: 100%; padding: .85em 1em; border-radius: var(--r-m); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
  .input::placeholder { color: color-mix(in oklab, var(--muted) 85%, transparent); }
  .input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  .input:user-invalid { border-color: var(--bad); }
  textarea.input { min-height: 128px; resize: vertical; line-height: 1.5; }
  .form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
  .form-note { font-size: .82rem; color: var(--muted); max-width: 46ch; }
  .form-status { display: none; padding: 14px 16px; border-radius: var(--r-m); font-size: .94rem; line-height: 1.45; }
  .form-status:focus { outline: none; }
  .form-status[data-state] { display: flex; gap: 10px; align-items: flex-start; }
  .form-status[data-state="ok"] { background: color-mix(in oklab, var(--good) 12%, var(--surface)); border: 1px solid color-mix(in oklab, var(--good) 40%, transparent); color: var(--ink); }
  .form-status[data-state="error"] { background: color-mix(in oklab, var(--bad) 10%, var(--surface)); border: 1px solid color-mix(in oklab, var(--bad) 40%, transparent); color: var(--ink); }
  .form-status[data-state="sending"] { color: var(--muted); }
  .form-status[data-state="closed"] { margin-bottom: 18px; background: color-mix(in oklab, var(--accent) 9%, var(--surface)); border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); color: var(--ink); }
  .form.is-closed .field, .form.is-closed .form-foot { opacity: .55; }
  .form-card { padding: clamp(22px, 3.4vw, 44px); }

  .path-card { display: grid; gap: 12px; align-content: start; height: 100%; }
  .path-card .n { font: 600 .78rem/1 var(--f-mono); color: var(--accent-text); }
  .path-card p { color: var(--ink-2); font-size: .94rem; }
  .path-card .row { margin-top: auto; padding-top: 8px; }
  .ol-steps { list-style: none; padding: 0; display: grid; gap: 22px; counter-reset: s; }
  .ol-steps > li { counter-increment: s; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; }
  .ol-steps > li::before { content: counter(s, decimal-leading-zero); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-text); font: 600 .74rem/1 var(--f-mono); }
  .ol-steps h3 { font-size: 1.08rem; margin-top: 6px; }
  .ol-steps p { color: var(--ink-2); font-size: .94rem; margin-top: 6px; }
  .ol-steps .code { margin-top: 12px; }

  /* ---------- 404 */
  html:not(.js) .sk { display: none; }
  .lost { position: relative; isolation: isolate; overflow: clip; min-height: calc(100dvh - var(--hdr) - 120px); display: grid; place-items: center; text-align: center; }
  .lost-code { font: 800 clamp(6rem, 4rem + 14vw, 14rem)/.9 var(--f-display); letter-spacing: -.06em; color: transparent; background: linear-gradient(180deg, var(--accent) 10%, color-mix(in oklab, var(--accent) 12%, transparent) 95%); -webkit-background-clip: text; background-clip: text; padding-inline: .04em; }
  .lost .stack { justify-items: center; --gap: 20px; }
}

/* ===================================================================== motion */
@layer motion {
  /* reveal: content is visible without JS; hidden only once theme-init confirms JS.
     If site.js never arrives, the fallback animation shows everything after 1.8 s. */
  html.js .rv { opacity: 0; }
  html.js:not(.rv-on) .rv { animation: rv-in .6s var(--ease) 1.8s both; }
  html.js .rv.in { animation: rv-in .9s var(--ease) both; animation-delay: calc(var(--d, 0) * 70ms); }
  @keyframes rv-in { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }

  .pop { animation: pop .5s var(--ease) both; animation-delay: calc(min(var(--i, 0), 14) * 22ms); }
  @keyframes pop { from { opacity: 0; translate: 0 10px; } }

  /* live dot: a ring that breathes out, the always-on signal */
  .status[data-state="live"] .dot::after, .on-dot.live { animation: ping 2.4s var(--ease) infinite; }
  .status .dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  @keyframes ping {
    0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--live) 60%, transparent); }
    70%, 100% { box-shadow: 0 0 0 8px color-mix(in oklab, var(--live) 0%, transparent); }
  }

  /* work flowing along edges */
  .flow { stroke-dasharray: 5 7; animation: flow 1.4s linear infinite; }
  @keyframes flow { to { stroke-dashoffset: -24; } }
  .is-now .run-node { animation: nudge 2.4s var(--ease-io) infinite; }
  @keyframes nudge { 50% { box-shadow: 0 0 0 9px color-mix(in oklab, var(--accent) 6%, transparent), 0 8px 20px -8px var(--accent); } }
  .run-step.is-done::before { transform-origin: top; animation: grow .9s var(--ease) both; animation-delay: calc(var(--d, 0) * 220ms + .3s); }
  @keyframes grow { from { transform: scaleY(0); } }
  @keyframes shimmer { to { background-position: -300% 0; } }

  /* view transitions */
  ::view-transition-old(root) { animation: 260ms var(--ease-io) both vt-out; }
  ::view-transition-new(root) { animation: 460ms var(--ease) both vt-in; }
  @keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
  ::view-transition-group(site-header) { animation-duration: 0s; }
  ::view-transition-group(nav-pill) { animation-duration: .45s; animation-timing-function: var(--ease); }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: .001ms !important; animation-iteration-count: 1 !important;
      transition-duration: .001ms !important; scroll-behavior: auto !important;
    }
    html.js .rv, html.js .rv.in, .pop { animation: none !important; opacity: 1 !important; translate: none !important; }
    html { scroll-behavior: auto; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  }
}

/* ---- blog (pages under /blog) ---- */
@layer components {
  .post-hero h1 { max-width: 22ch; font-size: clamp(2rem, 1.2rem + 3.2vw, 3.6rem); }
  .post-meta { margin-top: 16px; color: var(--muted); font-size: .9rem; }
  .post-body { padding-block: clamp(32px, 5vw, 64px) clamp(48px, 7vw, 96px); max-width: min(100% - 2 * var(--gutter), 72ch); }
  .post-body h2 { margin-top: 2.2em; font-size: clamp(1.35rem, 1.15rem + .8vw, 1.8rem); letter-spacing: -.02em; color: var(--ink); }
  .post-body p, .post-body li { line-height: 1.7; }
  .post-body ul, .post-body ol { padding-left: 1.3em; display: grid; gap: .45em; }
  .post-body strong { color: var(--ink); }
  .post-body a { color: var(--accent-text); text-underline-offset: .18em; }
  .post-intro { font-size: 1.12rem; color: var(--ink); }
  .post-body blockquote { margin: 1.2em 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--r-m) var(--r-m) 0; font-size: .95rem; }
  .post-fig { margin: 1.8em 0; }
  .post-fig img { display: block; width: 100%; height: auto; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); }
  .post-fig figcaption { margin-top: 8px; font-size: .84rem; color: var(--muted); }
  .post-table { overflow-x: auto; margin: 1.2em 0; }
  .post-table table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
  .post-table th, .post-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
  .post-table th { color: var(--ink); font-weight: 650; }
  .post-next { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--line); }
  .post-cta { margin-top: 2.6em; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--r-l, 18px); background: var(--surface); }
  .post-cta h2 { margin-top: 0; }
  .post-cta .row { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
  .post-card { display: grid; gap: 12px; align-content: start; }
  .post-card-img img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; object-position: top; border-radius: var(--r-m); border: 1px solid var(--line); }
  .post-card .n { font: 600 .74rem/1.3 var(--f-mono); color: var(--accent-text); }
  .post-card h2 a { color: var(--ink); text-decoration: none; }
  .post-card h2 a:hover { text-decoration: underline; }
  .post-card p { color: var(--ink-2); font-size: .94rem; }
}
