/* ---------- tokens ---------- */
:root {
  --accent: #ea580c;          /* Clamp Orange, one step deeper so white text on it stays legible */
  --brand: #f97316;           /* Clamp Orange (BRAND.md) — wordmark, dots, glow */
  --steel: #64748b;           /* Steel (BRAND.md) */
  --accent-strong: #c2410c;
  --accent-soft: #fff1e8;
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --fg: #0a0a0a;
  --fg-2: #525252;
  --fg-3: #737373;
  --line: #00000018;          /* borders are alpha, never grey */
  --line-soft: #00000010;
  --panel: #ffffff;
  --chip: #f4f4f5;
  --chip-fg: #525252;
  --code-bg: #ffffff;
  --tok-k: #475569;           /* steel, the logo's other half */
  --ok: #15803d;
  --on-accent: #ffffff;
  --shadow-tint: 194 65 12;   /* accent-tinted ambient shadow */
  --pad: 1.5rem;
  --container: 1536px;
  --grad: linear-gradient(256.93deg, #9a3412 -35%, #f59e0b -17%, #ea580c 12%, #c2410c 27%, #475569 68%, #dc2626 129%, #b45309 158%);
  color-scheme: light;
}
@media (min-width: 48rem) { :root { --pad: 3rem; } }
@media (min-width: 64rem) { :root { --pad: 4rem; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a; --bg-alt: #111110; --fg: #eeeeec; --fg-2: #b5b3ad; --fg-3: #8a8a85;
    --line: #ffffff20; --line-soft: #ffffff12; --panel: #111110; --chip: #1f1f1d; --chip-fg: #b5b3ad;
    --code-bg: #000000; --accent: #fb923c; --accent-strong: #fdba74; --accent-soft: #2a160a;
    --tok-k: #cbd5e1; --ok: #4ade80; --on-accent: #0a0a0a; --steel: #94a3b8;
    --grad: linear-gradient(256.93deg, #fdba74 -35%, #fcd34d -17%, #fb923c 12%, #f97316 27%, #cbd5e1 68%, #f87171 129%, #fdba74 158%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0a; --bg-alt: #111110; --fg: #eeeeec; --fg-2: #b5b3ad; --fg-3: #8a8a85;
  --line: #ffffff20; --line-soft: #ffffff12; --panel: #111110; --chip: #1f1f1d; --chip-fg: #b5b3ad;
  --code-bg: #000000; --accent: #fb923c; --accent-strong: #fdba74; --accent-soft: #2a160a;
  --tok-k: #cbd5e1; --ok: #4ade80; --on-accent: #0a0a0a; --steel: #94a3b8;
  --grad: linear-gradient(256.93deg, #fdba74 -35%, #fcd34d -17%, #fb923c 12%, #f97316 27%, #cbd5e1 68%, #f87171 129%, #fdba74 158%);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 16px/1.6 "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
code, pre, .mono { font-family: "Geist Mono", ui-monospace, monospace; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }
.frame { max-width: var(--container); margin: 0 auto; }
@media (min-width: 64rem) { .frame { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- type ---------- */
.h1 {
  margin: 1rem 0 0; font-weight: 400; letter-spacing: -0.05em; line-height: 1.02;
  font-size: clamp(2.5rem, 7.5vw, 4.75rem); text-wrap: balance;
}
.h2 {
  margin: 0; font-weight: 400; letter-spacing: -0.025em; line-height: 1;
  font-size: clamp(2.1rem, 5vw, 4rem); text-wrap: pretty;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding: .12em 0; }
.lead { color: var(--fg-2); font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.5; max-width: 36rem; text-wrap: pretty; }
.label { font: 500 11px/12px "Geist Mono", monospace; letter-spacing: .03em; text-transform: uppercase; color: var(--fg-3); }
.pill {
  display: inline-flex; align-items: center; gap: .6rem; height: 2rem; padding: 0 1rem; border-radius: 999px;
  background: var(--chip); color: var(--chip-fg); font-size: .875rem; font-weight: 500; line-height: 1;
}
.pill i { color: var(--accent); font-size: 1rem; }
.dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem; height: 3rem; padding: 0 1.5rem;
  border-radius: 999px; border: 1px solid transparent; font: inherit; font-size: 1.05rem; text-decoration: none;
  cursor: pointer; transition: background-color 60ms ease-out, border-color 60ms ease-out; white-space: nowrap;
  box-shadow: 0 1px 2px #0000000d;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-strong); }
.btn--ghost { background: var(--panel); color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg-alt); }
.btn--sm { height: 2.25rem; padding: 0 1rem; font-size: .9rem; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
@media (min-width: 64rem) { .nav__in { padding-inline: 1rem; } }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; font-size: 1.05rem; }
.brand img { width: 1.75rem; height: 1.75rem; }
.brand b { font-weight: 600; color: var(--steel); }
.brand b + b { color: var(--brand); }
.nav__links { display: none; gap: .25rem; }
.nav__links a { height: 2.25rem; display: flex; align-items: center; padding: 0 .75rem; border-radius: .5rem; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; color: var(--fg-2); }
.nav__links a[aria-current] { color: var(--fg); }
.nav__links a:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--fg); }
.nav__right { display: flex; align-items: center; gap: .5rem; }
.icon-btn { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: .5rem; border: 1px solid var(--line); background: transparent; color: var(--fg-2); cursor: pointer; font-size: 1.1rem; text-decoration: none; }
@media (min-width: 64rem) { .nav__links { display: flex; } }
@media (max-width: 30rem) { .nav__right .btn--primary { display: none; } }

/* ---------- hero ---------- */
.hero { padding: 2.5rem 0 6rem; text-align: center; position: relative; overflow: hidden; }
@media (min-width: 48rem) { .hero { padding: 6.5rem 0 8.75rem; } }
.hero__glow { position: absolute; inset: -20% -10% auto; height: 70%; background: radial-gradient(50% 60% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); pointer-events: none; }
.hero .lead { margin: 1.25rem auto 0; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2rem; }
.install {
  margin: 1.5rem auto 0; display: inline-flex; align-items: center; gap: .75rem; max-width: 100%;
  border: 1px solid var(--line); border-radius: 999px; padding: .35rem .35rem .35rem 1rem; background: var(--panel);
  font-size: .8rem; color: var(--fg-2);
}
.install code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install code b { color: var(--accent); font-weight: 500; }
.install button { flex: none; }

/* ---------- showcase: kernel resolve → freeze ---------- */
.demo {
  position: relative; margin: 4rem auto 0; max-width: 60rem; text-align: left; border-radius: 25px;
  border: 1px solid var(--line); background: var(--panel); overflow: hidden;
  box-shadow:
    0 155px 43px 0 rgb(var(--shadow-tint) / 0),
    0 99px 40px 0 rgb(var(--shadow-tint) / .02),
    0 56px 33px 0 rgb(var(--shadow-tint) / .04),
    0 25px 25px 0 rgb(var(--shadow-tint) / .07),
    0 6px 14px 0 rgb(var(--shadow-tint) / .08);
}
.demo__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); }
.demo__bar .label { flex: none; white-space: nowrap; }
.demo__cmd { font-size: .75rem; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo__body { display: grid; }
@media (min-width: 48rem) { .demo__body { grid-template-columns: 1.25fr 1fr; } }
.graph { padding: 1.25rem; border-bottom: 1px solid var(--line); display: grid; gap: .6rem; align-content: start; }
@media (min-width: 48rem) { .graph { border-bottom: 0; border-right: 1px solid var(--line); } }
.mod { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 12px; }
.mod i { font-size: 1.25rem; color: var(--accent); }
.mod b { display: block; font-weight: 500; font-size: .92rem; letter-spacing: -0.01em; }
.mod small { display: block; font: 400 .72rem/1.4 "Geist Mono", monospace; color: var(--fg-3); }
.mod .state { font: 500 10px/1 "Geist Mono", monospace; letter-spacing: .03em; text-transform: uppercase; color: var(--fg-3); }
.mod.is-ok .state { color: var(--ok); }
.mod.is-skip { opacity: .5; }
.steps-live { list-style: none; margin: 0; padding: 1.25rem; display: grid; gap: .85rem; align-content: start; }
.steps-live li { display: grid; grid-template-columns: 1.25rem 1fr; gap: .6rem; font-size: .9rem; color: var(--fg-3); }
.steps-live li i { font-size: 1.1rem; line-height: 1.4rem; }
.steps-live li.is-done { color: var(--fg); }
.steps-live li.is-done i { color: var(--ok); }
.steps-live small { display: block; font: 400 .72rem/1.4 "Geist Mono", monospace; color: var(--fg-3); }
.verdict { margin: 0 1.25rem 1.25rem; display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); font-size: .9rem; font-weight: 500; }

/* ---------- sections ---------- */
.section { border-top: 1px solid var(--line); }
.section__head { padding: 5rem var(--pad) 3rem; display: grid; gap: 1.25rem; }
@media (min-width: 64rem) { .section__head--split { grid-template-columns: 1.2fr 1fr; align-items: end; } }
.section__head p { margin: 0; color: var(--fg-2); font-size: 1.1rem; max-width: 34rem; text-wrap: pretty; }

/* ruled grid: borders come from the parent, cells stay light */
.ruled { display: grid; border-top: 1px solid var(--line); }
.ruled > * { padding: 2rem var(--pad); border-bottom: 1px solid var(--line); }
@media (min-width: 48rem) {
  .ruled--3, .ruled--4 { grid-template-columns: repeat(2, 1fr); }
  .ruled > * { padding: 2.25rem 2rem; border-right: 1px solid var(--line); }
}
@media (min-width: 64rem) {
  .ruled--3 { grid-template-columns: repeat(3, 1fr); }
  .ruled--4 { grid-template-columns: repeat(4, 1fr); }
  .ruled > *:last-child { border-right: 0; }
}
.cell i.ti { font-size: 1.5rem; color: var(--accent); }
.cell h3 { margin: 1.1rem 0 .4rem; font-size: 1.1rem; font-weight: 500; letter-spacing: -0.015em; }
.cell p { margin: 0; color: var(--fg-2); font-size: .95rem; }
.cell code { font-size: .85em; color: var(--fg); }
.cell .label { display: block; margin-top: 1.25rem; }
.badge { display: inline-flex; align-items: center; height: 1.4rem; padding: 0 .55rem; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: var(--accent-soft); color: var(--accent-strong); font: 500 11px/1 "Geist Mono", monospace; letter-spacing: .03em; text-transform: uppercase; margin-left: .5rem; vertical-align: middle; }
.badge--done { border-color: color-mix(in srgb, var(--ok) 30%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); color: var(--ok); }

/* ---------- code panel ---------- */
.code-wrap { padding: 0 var(--pad) 5rem; }
.code { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--code-bg); }
.tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs button {
  flex: none; background: none; border: 0; border-right: 1px solid var(--line); padding: .8rem 1.1rem; cursor: pointer;
  font: 500 11px/12px "Geist Mono", monospace; letter-spacing: .03em; text-transform: uppercase; color: var(--fg-3);
}
.tabs button[aria-selected="true"] { color: var(--fg); background: var(--bg-alt); box-shadow: inset 0 -2px 0 var(--accent); }
.code__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 1.1rem; border-bottom: 1px solid var(--line-soft); }
.code pre { margin: 0; padding: 1.4rem 1.25rem 1.6rem; overflow-x: auto; font-size: .82rem; line-height: 1.75; color: var(--fg-2); }
.tok-c { color: var(--fg-3); } .tok-s { color: var(--accent); } .tok-k { color: var(--tok-k); font-weight: 500; }

/* ---------- big number ---------- */
.split { display: grid; }
@media (min-width: 64rem) { .split { grid-template-columns: 1fr 1fr; } .split > :first-child { border-right: 1px solid var(--line); } }
.split > * { padding: 3.5rem var(--pad); }
.big { font-size: clamp(5rem, 14vw, 10rem); line-height: .9; letter-spacing: -0.06em; font-weight: 400; margin: 1rem 0 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 2.25rem 1fr auto; gap: .9rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.steps li:first-child { padding-top: 0; }
.steps span { font: 500 12px/1.6rem "Geist Mono", monospace; color: var(--accent); }
.steps b { font-weight: 500; }
.steps p { margin: .2rem 0 0; color: var(--fg-2); font-size: .95rem; }
.steps em { font: 500 .95rem/1 "Geist Mono", monospace; font-style: normal; color: var(--fg); white-space: nowrap; }

/* ---------- feature band (follows the theme) ---------- */
.band { background: var(--bg-alt); }

/* ---------- roadmap ---------- */
.phases { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.phases li { counter-increment: p; }
.phases li::before { content: "0" counter(p); display: block; font: 500 12px/1 "Geist Mono", monospace; color: var(--fg-3); margin-bottom: 1rem; }
.phases li.is-now { background: var(--accent-soft); }
.phases li.is-now::before { color: var(--accent-strong); }
.phases h3 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 500; }
.phases p { margin: 0; font-size: .88rem; color: var(--fg-2); }
.phases .badge { margin: .9rem 0 0; }
@media (min-width: 64rem) { .ruled--6 { grid-template-columns: repeat(6, 1fr); } .ruled--6 > * { padding: 2rem 1.25rem; } }

/* ---------- faq ---------- */
.faq { padding: 0 var(--pad) 5rem; max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.3rem 0; font-size: 1.05rem; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { color: var(--fg-3); transition: transform 150ms ease-out; }
.faq details[open] summary i { transform: rotate(45deg); }
.faq p { margin: 0 0 1.3rem; color: var(--fg-2); max-width: 44rem; }

/* ---------- cta / footer ---------- */
.cta { text-align: center; padding: 6rem var(--pad); position: relative; overflow: hidden; }
.cta .hero__glow { inset: auto -10% -40%; height: 90%; background: radial-gradient(50% 60% at 50% 100%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%); }
.footer { border-top: 1px solid var(--line); }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 2rem var(--pad); color: var(--fg-3); font-size: .85rem; }
.footer__in nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--fg); }

/* ---------- docs ---------- */
.docs { display: grid; }
@media (min-width: 64rem) { .docs { grid-template-columns: 17rem 1fr; } }
.side { padding: 2rem var(--pad) 1rem; border-bottom: 1px solid var(--line); }
@media (min-width: 64rem) {
  .side { position: sticky; top: 4rem; align-self: start; max-height: calc(100vh - 4rem); overflow-y: auto; padding: 2.5rem 1.5rem; border-bottom: 0; border-right: 1px solid var(--line); }
}
/* phones: one scrolling row of links, so the article starts near the top */
.side { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; padding-block: .75rem; }
.side .label { display: none; }
.side ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex: none; }
.side a { white-space: nowrap; }
@media (min-width: 64rem) {
  .side { display: block; padding-block: 2.5rem; }
  .side .label { display: block; margin: 1.5rem 0 .5rem; }
  .side .label:first-child { margin-top: 0; }
  .side ul { display: block; }
}
.side a { display: block; padding: .3rem .65rem; border-radius: .45rem; font-size: .92rem; text-decoration: none; color: var(--fg-2); }
.side a:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--fg); }
.side a[aria-current] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 500; }

.prose { padding: 3rem var(--pad) 5rem; max-width: 50rem; min-width: 0; }
.prose > h1 { margin: .75rem 0 1rem; font-weight: 400; letter-spacing: -0.04em; line-height: 1.05; font-size: clamp(2.2rem, 5vw, 3.25rem); text-wrap: balance; }
.prose > .lead { margin: 0 0 2.5rem; }
.prose h2 { margin: 3rem 0 .9rem; font-weight: 500; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.2; padding-top: 2rem; border-top: 1px solid var(--line); }
.prose h3 { margin: 2rem 0 .5rem; font-weight: 500; font-size: 1.1rem; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--fg-2); }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.prose li { margin: .3rem 0; }
.prose li::marker { color: var(--fg-3); }
.prose a { color: var(--accent-strong); text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.prose strong { color: var(--fg); font-weight: 500; }
.prose :not(pre) > code { font-size: .86em; padding: .1em .35em; border-radius: .35rem; background: var(--chip); color: var(--fg); }
.prose pre { margin: 0 0 1.5rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--code-bg); overflow-x: auto; font-size: .82rem; line-height: 1.75; color: var(--fg-2); }
.prose pre[data-file]::before { content: attr(data-file); display: block; margin: -.2rem 0 .7rem; font: 500 11px/12px "Geist Mono", monospace; letter-spacing: .03em; text-transform: uppercase; color: var(--fg-3); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: .92rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .65rem .8rem .65rem 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--fg-2); }
.prose th { font: 500 11px/12px "Geist Mono", monospace; letter-spacing: .03em; text-transform: uppercase; color: var(--fg-3); }
.prose td:first-child { color: var(--fg); white-space: nowrap; }
.prose .badge { margin-left: 0; }
.prose h1 .badge, .prose h2 .badge, .prose h3 .badge { margin-left: .5rem; }
.prose blockquote { margin: 0 0 1.5rem; padding: .2rem 0 .2rem 1.1rem; border-left: 2px solid var(--accent); }
.prose blockquote p { margin: 0; color: var(--fg); font-size: 1.1rem; letter-spacing: -0.01em; }
.note { margin: 0 0 1.5rem; padding: .9rem 1.1rem; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); background: var(--accent-soft); color: var(--fg); font-size: .95rem; }
.note p { margin: 0; color: inherit; }
.note b { color: var(--accent-strong); font-weight: 500; }
.flow { font-family: "Geist Mono", monospace; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 4rem; }
.pager a { display: grid; gap: .35rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--fg); font-weight: 500; }
.pager a:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.pager .next { text-align: right; grid-column: 2; }

.badge--plan { border-color: var(--line); background: var(--chip); color: var(--fg-3); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } html { scroll-behavior: auto; } }

/* ================= landing v2 ================= */
/* hero: text left, working code right */
.hero2 { position: relative; overflow: hidden; padding: 3rem 0 4.5rem; }
@media (min-width: 64rem) { .hero2 { padding: 6rem 0 7rem; } }
.hero2 .hero__glow { inset: -30% -20% auto 30%; height: 90%; background: radial-gradient(45% 55% at 60% 20%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%); }
.hero2__in { position: relative; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 64rem) { .hero2__in { grid-template-columns: 1.05fr 1fr; gap: 4rem; } }
.display { margin: 1.25rem 0 0; font-weight: 400; letter-spacing: -0.055em; line-height: .95; font-size: clamp(3rem, 8vw, 6rem); }
.display .grad { display: block; padding-bottom: .08em; }
.display small { display: block; margin-top: 1.25rem; font-size: clamp(1.25rem, 2.2vw, 1.75rem); letter-spacing: -0.025em; line-height: 1.2; color: var(--fg); }
.hero2 .lead { margin: 1.25rem 0 0; }
.hero2 .actions { justify-content: flex-start; }
.hero2 .install { margin: 1.25rem 0 0; }

.editor {
  border-radius: 20px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; min-width: 0;
  box-shadow:
    0 155px 43px 0 rgb(var(--shadow-tint) / 0),
    0 99px 40px 0 rgb(var(--shadow-tint) / .02),
    0 56px 33px 0 rgb(var(--shadow-tint) / .04),
    0 25px 25px 0 rgb(var(--shadow-tint) / .07),
    0 6px 14px 0 rgb(var(--shadow-tint) / .08);
}
.editor__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); }
.editor__file { display: inline-flex; align-items: center; gap: .5rem; font: 500 .75rem/1 "Geist Mono", monospace; color: var(--fg-2); }
.editor__file i { color: var(--brand); font-size: 1rem; }
.editor pre { margin: 0; padding: 1.25rem 1.25rem 1.4rem; overflow-x: auto; font-size: .88rem; line-height: 1.8; color: var(--fg-2); counter-reset: ln; }
.editor__term { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 1rem 1.25rem; font: 400 .8rem/1.8 "Geist Mono", monospace; color: var(--fg-3); overflow-x: auto; white-space: nowrap; }
.editor__term b { color: var(--brand); font-weight: 500; }
.editor__term .out { color: var(--fg); }
.editor__term .ok { color: var(--ok); }
.editor__stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.editor__stats div { padding: .9rem 1.1rem; border-right: 1px solid var(--line); min-width: 0; }
.editor__stats div:last-child { border-right: 0; }
.editor__stats strong { display: block; font-weight: 400; font-size: 1.5rem; letter-spacing: -0.04em; line-height: 1.1; color: var(--fg); }
.editor__stats span { font: 500 10px/1.3 "Geist Mono", monospace; letter-spacing: .03em; text-transform: uppercase; color: var(--fg-3); }

/* feature cards: ruled grid, richer cells */
.cards > .card { display: flex; flex-direction: column; transition: background-color 60ms ease-out; }
.cards > .card:hover { background: color-mix(in srgb, var(--accent) 3%, transparent); }
@media (min-width: 64rem) { .cards > .card { padding: 2.5rem 2rem 2rem; } }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card__num { font: 500 12px/1 "Geist Mono", monospace; color: var(--fg-3); }
.tile { width: 2.75rem; height: 2.75rem; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); position: relative; overflow: hidden; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(190deg, #fff5, #fff0 45%); pointer-events: none; }
.tile i { font-size: 1.35rem; color: var(--accent); }
.card h3 { margin: 1.25rem 0 .4rem; font-size: 1.15rem; font-weight: 500; letter-spacing: -0.015em; }
.card p { margin: 0; color: var(--fg-2); font-size: .95rem; }
.card code { font-size: .85em; color: var(--fg); }
.snippet { display: block; margin: 1.25rem 0 0; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-alt); font: 400 .74rem/1.6 "Geist Mono", monospace; color: var(--fg-2); white-space: pre; overflow-x: auto; }
.snippet .tok-k { font-weight: 500; }
.more { margin-top: auto; padding-top: 1.5rem; display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 500; color: var(--accent-strong); text-decoration: none; }
.more i { transition: transform 60ms ease-out; }
.more:hover i { transform: translateX(3px); }

/* layer stack: a diagram, not four identical boxes */
.stack { border-top: 1px solid var(--line); }
.stack__row { display: grid; gap: .5rem 1.5rem; padding: 1.5rem var(--pad); border-bottom: 1px solid var(--line); position: relative; }
.stack__row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line); }
.stack__row.is-works::before { background: var(--ok); }
.stack__row.is-proto::before { background: var(--accent); }
@media (min-width: 48rem) { .stack__row { grid-template-columns: 9rem 1fr auto; align-items: center; padding-block: 1.75rem; } }
.stack__layer { font: 500 12px/1.4 "Geist Mono", monospace; letter-spacing: .03em; text-transform: uppercase; color: var(--fg-3); }
.stack__row h3 { margin: 0; font-size: 1.15rem; font-weight: 500; letter-spacing: -0.015em; }
.stack__row h3 code { font-size: .75rem; font-weight: 400; color: var(--fg-3); margin-left: .5rem; }
.stack__row p { margin: .25rem 0 0; color: var(--fg-2); font-size: .95rem; max-width: 46rem; }
.stack__row .badge { margin: 0; justify-self: start; }
.stack__note { padding: 1rem var(--pad) 3rem; color: var(--fg-3); font-size: .85rem; }

/* kernel demo section */
.kernel-demo { display: grid; gap: 2.5rem; padding: 0 var(--pad) 5rem; align-items: center; }
@media (min-width: 64rem) { .kernel-demo { grid-template-columns: .8fr 1.2fr; } }
.kernel-demo .demo { margin: 0; max-width: none; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.checklist li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .75rem; color: var(--fg-2); }
.checklist i { color: var(--accent); font-size: 1.2rem; line-height: 1.5rem; }
.checklist b { color: var(--fg); font-weight: 500; }

/* control ladder */
.ladder { display: grid; border-top: 1px solid var(--line); counter-reset: l; }
@media (min-width: 48rem) { .ladder { grid-template-columns: repeat(5, 1fr); } }
.ladder div { padding: 2rem var(--pad); border-bottom: 1px solid var(--line); position: relative; }
@media (min-width: 48rem) { .ladder div { padding: 2.25rem 1.5rem; border-right: 1px solid var(--line); } .ladder div:last-child { border-right: 0; } }
.ladder b { display: block; font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.04em; line-height: 1; }
.ladder div:nth-child(1) b { color: var(--fg-3); }
.ladder div:nth-child(5) b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ladder p { margin: .75rem 0 0; color: var(--fg-2); font-size: .9rem; }

/* lifecycle strip */
.life { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 var(--pad) 5rem; }
.life span { display: inline-flex; align-items: center; gap: .5rem; height: 2.25rem; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; color: var(--fg-2); background: var(--panel); }
.life span.on { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); color: var(--accent-strong); }
.life i { color: var(--fg-3); font-size: .9rem; }

/* is / is not */
.nots { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.nots span { display: inline-flex; align-items: center; gap: .45rem; height: 2.1rem; padding: 0 .85rem; border-radius: 999px; background: var(--chip); color: var(--chip-fg); font-size: .88rem; }
.nots i { color: var(--fg-3); }

/* ================= motion & live states ================= */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--brand), var(--accent-strong)); pointer-events: none; }
.nav { transition: box-shadow 200ms ease-out; }
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px -12px rgb(var(--shadow-tint) / .18); }
.grad { background-size: 200% 100%; background-position: 0% 50%; }

/* pointer spotlight on grid cells (JS feeds --mx/--my in px) */
.card, .ruled > .cell, .ladder > div, .stack__row { position: relative; isolation: isolate; }
.card::before, .ruled > .cell::before, .ladder > div::before, .stack__row::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none; transition: opacity 250ms ease-out;
  background: radial-gradient(260px circle at calc(var(--mx, -999) * 1px) calc(var(--my, -999) * 1px), color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%);
}
.card:hover::before, .ruled > .cell:hover::before, .ladder > div:hover::before, .stack__row:hover::after { opacity: 1; }
.stack__row { --bar: 1; }
.stack__row::before { transform: scaleY(var(--bar)); transform-origin: 50% 0; }

/* hero editor */
.editor .ln { display: block; }
.caret { display: inline-block; width: .5em; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--brand); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.demo__actions { display: flex; align-items: center; gap: .75rem; }
.replay { border: 1px solid var(--line); background: transparent; color: var(--fg-2); border-radius: 999px; height: 1.75rem; padding: 0 .7rem; font: 500 11px/1 "Geist Mono", monospace; letter-spacing: .03em; text-transform: uppercase; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; transition: color 120ms, border-color 120ms; }
.replay:hover { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.mod, .steps-live li { transition: border-color 250ms ease-out, background-color 250ms ease-out, color 250ms ease-out, opacity 250ms ease-out; }
.mod.is-ok { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 5%, transparent); }
.life span { transition: background-color 300ms ease-out, border-color 300ms ease-out, color 300ms ease-out; }

/* docs: copy button on every code block, docs tag in the header, centred article */
.prose pre { position: relative; }
.pre-copy { position: absolute; top: .55rem; right: .55rem; display: inline-flex; align-items: center; gap: .3rem; height: 1.75rem; padding: 0 .6rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--fg-3); font: 500 11px/1 "Geist Mono", monospace; cursor: pointer; opacity: 0; transition: opacity 150ms, color 150ms; }
.prose pre:hover .pre-copy, .pre-copy:focus-visible { opacity: 1; }
.pre-copy:hover { color: var(--accent-strong); }
.brand__tag { margin-left: .15rem; height: 1.35rem; padding: 0 .5rem; display: inline-flex; align-items: center; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font: 500 11px/1 "Geist Mono", monospace; letter-spacing: .03em; text-transform: uppercase; }
.solo .prose { margin: 0 auto; }
.side a { transition: background-color 120ms ease-out, color 120ms ease-out; }
.pager a { transition: border-color 150ms ease-out, transform 150ms ease-out; }
.pager a:hover { transform: translateY(-2px); }
.btn { transition: background-color 60ms ease-out, border-color 60ms ease-out, box-shadow 200ms ease-out; }
.btn--primary:hover { box-shadow: 0 8px 20px -8px rgb(var(--shadow-tint) / .55); }
.card, .ruled > .cell, .ladder > div, .stack__row { --mx: -999; --my: -999; }
.hero2__in > * { min-width: 0; }
.install { max-width: 100%; }
@media (max-width: 40rem) { .nav__right .btn { display: none; } }

/* docs: the sidebar column runs the full page height; only its links stick */
.docs { min-height: calc(100vh - 4rem); }
.side-col { border-bottom: 1px solid var(--line); min-width: 0; }
.side-col .side { border: 0; }
@media (min-width: 64rem) {
  .side-col { border-bottom: 0; border-right: 1px solid var(--line); }
  .side-col .side { position: sticky; top: 4rem; max-height: calc(100vh - 4rem); overflow-y: auto; }
}
