/* ==========================================================================
   CIRCA · site design system v4 — "instrument"
   Matches circa.ai: achromatic greys (7 → 22 %), one amber accent
   (hsl 40 95 % 55 %, used solid or at 15 / 25 %), 8 px controls, hairlines.
   Monospace is the voice. Green appears only as a status signal.
   Nothing rotates, nothing bounces. Layers: reset → tokens → base →
   components → chrome → pages → motion
   ========================================================================== */

@layer reset, tokens, base, components, chrome, pages, motion;

/* ─────────────── RESET ─────────────── */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: none; text-size-adjust: none; }
  img, svg, canvas, video { display: block; max-width: 100%; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { background: none; border: 0; cursor: pointer; }
  a { color: inherit; text-decoration: none; }
  ul, ol { list-style: none; padding: 0; }
  [hidden] { display: none !important; }
  table { border-collapse: collapse; }
}

/* ─────────────── TOKENS ─────────────── */
@layer tokens {
  :root {
    color-scheme: dark;

    /* Neutrals — the circa.ai ladder, no hue */
    --bg:        hsl(0 0% 7%);
    --bg-2:      hsl(0 0% 8.5%);
    --surface:   hsl(0 0% 10%);
    --surface-2: hsl(0 0% 12%);
    --surface-3: hsl(0 0% 15%);
    --surface-4: hsl(0 0% 18%);
    --line:      hsl(0 0% 100% / 0.07);
    --line-2:    hsl(0 0% 100% / 0.11);
    --line-3:    hsl(0 0% 100% / 0.18);

    --text:   hsl(0 0% 98%);
    --text-2: hsl(0 0% 75%);
    --text-3: hsl(0 0% 55%);
    --text-4: hsl(0 0% 50%);   /* ≈4.6:1 on --bg — the floor for readable text */

    /* Accent — Circa amber */
    --amber:     hsl(40 95% 55%);
    --amber-90:  hsl(40 95% 55% / 0.9);
    --amber-25:  hsl(40 95% 55% / 0.25);
    --amber-15:  hsl(40 95% 55% / 0.15);
    --amber-08:  hsl(40 95% 55% / 0.08);

    /* Status only */
    --ok: hsl(150 70% 45%);

    --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --f-sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;

    --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 14px;

    --ease: cubic-bezier(0, 0, .2, 1);
    --dur: 220ms;
    --wrap: 1240px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 64px;
  }
}

/* ─────────────── BASE ─────────────── */
@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
  body {
    background: var(--bg); color: var(--text-2);
    font: 400 15.5px/1.65 var(--f-sans);
    -webkit-font-smoothing: antialiased; overflow-x: clip;
  }
  ::selection { background: var(--amber); color: var(--bg); }
  :focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: var(--r-sm); }

  h1, h2, h3, h4 { color: var(--text); text-wrap: balance; }
  p, li, dd { text-wrap: pretty; }
  em { font-style: normal; color: var(--amber); }
  b, strong { font-weight: 550; color: var(--text); }

  .display, .h1, .h2, .h3, .h4 { font-family: var(--f-mono); font-weight: 500; }
  .display { font-size: clamp(2.3rem, 1.2rem + 3.4vw, 4.1rem); line-height: 1.04; letter-spacing: -0.045em; }
  .h1 { font-size: clamp(2.1rem, 1.2rem + 2.8vw, 3.6rem); line-height: 1.06; letter-spacing: -0.04em; }
  .h2 { font-size: clamp(1.7rem, 1.2rem + 1.7vw, 2.6rem); line-height: 1.1; letter-spacing: -0.045em; }
  .h3 { font-size: clamp(1.1rem, 1rem + .35vw, 1.3rem); line-height: 1.3; letter-spacing: -0.035em; }
  .h4 { font-size: 1rem; line-height: 1.35; letter-spacing: -0.03em; }
  .lede { font-size: clamp(1.02rem, .98rem + .25vw, 1.15rem); line-height: 1.6; color: var(--text-2); max-width: 60ch; }
  .muted { color: var(--text-3); }
  .small { font-size: 14px; }
  .mono { font-family: var(--f-mono); letter-spacing: -0.02em; }
  .kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--amber);
    &::before { content: ""; width: 6px; height: 6px; background: var(--amber); }
  }

  .wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
  .skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--amber); color: var(--bg); padding: 8px 14px; border-radius: var(--r-md); }
  .skip:focus { top: 12px; }
}

/* ─────────────── COMPONENTS ─────────────── */
@layer components {
  .ic { width: 18px; height: 18px; flex: none; }
  c-icon { display: contents; }

  .btn {
    --h: 40px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: var(--h); padding-inline: 18px; border-radius: var(--r-md);
    font: 500 13px/1 var(--f-mono); letter-spacing: -0.01em; white-space: nowrap;
    transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur);
    & .ic { width: 15px; height: 15px; transition: transform var(--dur) var(--ease); }
    &:hover .ic { transform: translateX(3px); }
  }
  .btn-sm { --h: 32px; padding-inline: 12px; font-size: 12px; }
  .btn-lg { --h: 48px; padding-inline: 26px; font-size: 14px; }
  .btn-primary { background: var(--amber); color: var(--bg); &:hover { background: var(--amber-90); } }
  .btn-inverse { background: var(--text); color: var(--bg); &:hover { background: hsl(0 0% 88%); } }
  .btn-soft { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-3); &:hover { background: var(--surface-2); } }
  .btn-quiet { color: var(--text-2); &:hover { color: var(--text); background: var(--surface-2); } }

  .link {
    display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1.2 var(--f-mono); color: var(--text);
    & .ic { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
    &:hover { color: var(--amber); & .ic { transform: translateX(3px); } }
  }
  .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; &.center { justify-content: center; } }

  .tag {
    display: inline-flex; align-items: center; height: 20px; padding-inline: 7px; border-radius: var(--r-xs); vertical-align: middle;
    font: 500 10.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-3);
    &.amber { color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-25); background: var(--amber-08); }
    &.ok { color: var(--ok); box-shadow: inset 0 0 0 1px hsl(150 70% 45% / .3); }
  }
  .chip {
    height: 30px; padding-inline: 12px; border-radius: var(--r-sm); font: 500 12px var(--f-mono); color: var(--text-3);
    box-shadow: inset 0 0 0 1px var(--line-2); transition: all var(--dur) var(--ease);
    &:hover { color: var(--text); }
    &.on, &[aria-pressed="true"] { color: var(--text); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-3); }
  }

  .tile {
    display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-md);
    color: var(--text-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2);
    transition: color var(--dur), box-shadow var(--dur);
    &.lg { width: 44px; height: 44px; & .ic { width: 20px; height: 20px; } }
    &.sm { width: 28px; height: 28px; border-radius: var(--r-sm); & .ic { width: 14px; height: 14px; } }
  }
  :is(a, .card):hover > .tile, :is(a, .card):hover .top > .tile { color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-25); }

  .card {
    --mx: 50%; --my: 0%;
    position: relative; isolation: isolate; border-radius: var(--r-lg); background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--dur) var(--ease), background var(--dur);
    &::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
      background: radial-gradient(420px circle at var(--mx) var(--my), hsl(0 0% 100% / .035), transparent 45%); opacity: 0; transition: opacity 300ms var(--ease); }
  }
  a.card:hover, .card.lift:hover { box-shadow: inset 0 0 0 1px var(--line-3); &::before { opacity: 1; } }
  .pad { padding: clamp(22px, 3vw, 32px); }

  .feature { display: flex; flex-direction: column; gap: 12px; padding: 26px; & p { color: var(--text-3); font-size: 14.5px; } }

  .section { padding-block: clamp(72px, 9vw, 120px); position: relative; }
  .section.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
  .section.tight { padding-block: clamp(40px, 5vw, 64px); }
  .section-head { display: grid; gap: 16px; max-width: 780px; margin-bottom: clamp(32px, 4.5vw, 56px);
    &.center { margin-inline: auto; text-align: center; justify-items: center; }
    &.row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; & > div { display: grid; gap: 16px; max-width: 720px; } } }
  .grid { display: grid; gap: 12px; }
  .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: center;
    &.rev > :first-child { order: 2; }
    & .copy { display: grid; gap: 20px; justify-items: start; } }

  /* Background: the circa.ai grid + one static amber pool */
  .gridbg { position: absolute; inset: 0; pointer-events: none; z-index: -1;
    background-image: linear-gradient(hsl(0 0% 100% / .025) 1px, transparent 1px), linear-gradient(90deg, hsl(0 0% 100% / .025) 1px, transparent 1px); background-size: 40px 40px;
    mask: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 80%); }
  .gridbg::after { content: ""; position: absolute; left: 50%; top: -30%; width: min(1100px, 120vw); aspect-ratio: 2; translate: -50% 0; background: radial-gradient(closest-side, var(--amber-08), transparent); }

  .checks { display: grid; gap: 11px;
    & li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text-2); }
    & li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: var(--r-xs);
      background: var(--amber-15) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F7B32A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M6 12.5l4 4 8-9'/></svg>") center/11px no-repeat; } }

  .steps { display: grid; gap: 12px; counter-reset: step;
    & li { counter-increment: step; display: grid; gap: 10px; align-content: start; padding: 26px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
    & li::before { content: counter(step, decimal-leading-zero); font: 500 11px/1 var(--f-mono); color: var(--amber); letter-spacing: .06em; margin-bottom: 10px; }
    & p { color: var(--text-3); font-size: 14.5px; } }

  .stats { display: flex; flex-wrap: wrap; gap: 20px 48px;
    & dt { font: 500 10.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
    & dd { font: 500 clamp(1.9rem, 1.5rem + 1.3vw, 2.7rem)/1 var(--f-mono); color: var(--text); margin-top: 10px; letter-spacing: -.06em; } }

  .faq { display: grid; max-width: 860px; margin-inline: auto; border-top: 1px solid var(--line);
    & details { border-bottom: 1px solid var(--line); }
    & summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 4px; cursor: pointer; list-style: none; font: 500 15px var(--f-mono); letter-spacing: -.03em; color: var(--text); }
    & summary::-webkit-details-marker { display: none; }
    & summary::after { content: "+"; flex: none; font: 400 18px/1 var(--f-mono); color: var(--text-3); transition: transform var(--dur) var(--ease); }
    & details[open] summary::after { transform: rotate(45deg); color: var(--amber); }
    & details > div { padding: 0 4px 22px; color: var(--text-3); font-size: 15px; max-width: 70ch; }
    &::details-content { transition: height 260ms var(--ease), content-visibility 260ms allow-discrete; height: 0; overflow: clip; }
    & details[open]::details-content { height: auto; } }

  .code { margin: 0; padding: 22px 24px; border-radius: var(--r-lg); overflow-x: auto; white-space: pre;
    background: hsl(0 0% 5%); color: var(--text-2); font: 12.5px/1.8 var(--f-mono); box-shadow: inset 0 0 0 1px var(--line-2);
    & .k { color: var(--amber); } & .s { color: var(--text); } & .c { color: var(--text-4); } & .p { color: var(--text-3); } & .n { color: var(--amber); } }

  .form { display: grid; gap: 16px; }
  .form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .field { display: grid; gap: 8px;
    & label { font: 500 12px var(--f-mono); color: var(--text-2); }
    & input, & select, & textarea { width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 0; background: var(--bg); font-size: 15px; color: var(--text);
      box-shadow: inset 0 0 0 1px var(--line-2); outline: 0; transition: box-shadow var(--dur); }
    & textarea { min-height: 130px; resize: vertical; }
    & :is(input, select, textarea):focus { box-shadow: inset 0 0 0 1px var(--amber), 0 0 0 3px var(--amber-15); } }
  .form-ok { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px hsl(150 70% 45% / .3); color: var(--ok); font: 500 13px var(--f-mono); }

  .crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 500 11.5px var(--f-mono); color: var(--text-3); letter-spacing: -.01em;
    & a:hover { color: var(--text); } & span[aria-hidden] { opacity: .4; } }

  /* Product windows — flat, precise */
  .mock { position: relative; z-index: 1; border-radius: var(--r-lg); overflow: hidden; text-align: left; background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 80px -40px hsl(0 0% 0% / .8); }
  .mock-bar { display: flex; align-items: center; gap: 6px; height: 38px; padding-inline: 14px; border-bottom: 1px solid var(--line); background: var(--bg-2);
    & i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-4); }
    & span { margin-left: 10px; font: 500 11.5px var(--f-mono); color: var(--text-3); } }
  .mock-body { padding: 16px; display: grid; gap: 12px; }
  .tbl { display: grid; font-size: 13px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
  .m-row { display: grid; grid-template-columns: 1fr 1.2fr 88px; gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line);
    & > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    & > span:first-child { color: var(--text); }
    & > span:nth-child(2) { color: var(--text-3); }
    &.head { border-top: 0; background: var(--bg-2); padding-block: 8px; font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); & > span { color: inherit !important; } }
    &.sel { background: var(--amber-08); } }
  .conf { display: flex; align-items: center; gap: 8px;
    & i { flex: 1; height: 3px; border-radius: 2px; background: var(--surface-4); position: relative; overflow: hidden; }
    & i::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--v)); background: var(--ok); animation: grow 1.1s var(--ease) both; }
    & b { font: 500 11px var(--f-mono); width: 20px; text-align: right; color: var(--text-2); }
    &.low i::after { background: var(--amber); } &.low b { color: var(--amber); } }

  .post { display: flex; flex-direction: column; gap: 12px; padding: 10px 10px 22px;
    & .art { aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden; position: relative; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
    & .meta { padding: 8px 10px 0; font: 500 10.5px var(--f-mono); color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }
    & h3 { padding-inline: 10px; }
    & p { padding-inline: 10px; font-size: 14px; color: var(--text-3); } }
  /* Generative covers — monochrome line art, one amber point */
  .art::before, .art::after { content: ""; position: absolute; }
  .art.m1::before { inset: 0; background: repeating-radial-gradient(circle at 30% 70%, transparent 0 16px, hsl(0 0% 100% / .06) 16px 17px); }
  .art.m1::after, .art.m3::after { width: 6px; height: 6px; background: var(--amber); }
  .art.m1::after { left: calc(30% - 3px); top: calc(70% - 3px); }
  .art.m2::before { inset: 0; background: repeating-linear-gradient(90deg, transparent 0 20px, hsl(0 0% 100% / .045) 20px 21px), repeating-linear-gradient(0deg, transparent 0 20px, hsl(0 0% 100% / .045) 20px 21px); }
  .art.m2::after { left: 10%; right: 10%; top: 20%; bottom: 20%; border-bottom: 1px solid var(--amber); clip-path: polygon(0 100%, 0 70%, 15% 55%, 30% 65%, 45% 35%, 60% 45%, 75% 15%, 100% 5%, 100% 100%); background: linear-gradient(var(--amber-15), transparent); }
  .art.m3::before { inset: 0; margin: auto; width: 46%; aspect-ratio: 1; height: auto; border-radius: 50%; box-shadow: inset 0 0 0 1px hsl(0 0% 100% / .12), 0 0 0 24px hsl(0 0% 100% / .02), 0 0 0 25px hsl(0 0% 100% / .07); }
  .art.m3::after { inset: 0; margin: auto; }
  .art.m4::before { inset: 22%; background: linear-gradient(90deg, hsl(0 0% 100% / .1) 1px, transparent 1px) 0 0 / 25% 100%, linear-gradient(hsl(0 0% 100% / .1) 1px, transparent 1px) 0 0 / 100% 33.3%; box-shadow: inset 0 0 0 1px hsl(0 0% 100% / .1); }
  .art.m4::after { left: calc(47% - 3px); top: calc(55% - 3px); width: 6px; height: 6px; background: var(--amber); }
  .art.m5::before { inset: 0; background: radial-gradient(circle, hsl(0 0% 100% / .18) 1px, transparent 1.5px) 0 0 / 16px 16px; mask: radial-gradient(circle at 50% 50%, #000, transparent 70%); }
  .art.m5::after { left: 58%; top: 40%; width: 6px; height: 6px; background: var(--amber); box-shadow: 0 0 0 6px var(--amber-15); }
  .art.m6::before { inset: 24% 20%; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
  .art.m6::after { left: 26%; right: 44%; top: 34%; height: 5px; background: var(--amber); box-shadow: 0 14px 0 hsl(0 0% 100% / .1), 0 28px 0 hsl(0 0% 100% / .1); }

  .note { font: 500 11px var(--f-mono); color: var(--text-4); }
}

/* ─────────────── CHROME ─────────────── */
@layer chrome {
  .hdr { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); transition: background 300ms var(--ease), box-shadow 300ms var(--ease);
    &[data-scrolled], &:has(.mega.open) { background: hsl(0 0% 7% / .8); backdrop-filter: blur(20px); box-shadow: inset 0 -1px 0 var(--line); } }
  .hdr-bar { height: 100%; width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
  .brand { justify-self: start; display: block; & img { height: 22px; width: auto; } }
  .nav ul { display: flex; gap: 2px; }
  .nav-trigger, .nav-link {
    display: inline-flex; align-items: center; gap: 5px; height: 34px; padding-inline: 12px; border-radius: var(--r-md);
    font: 500 13px/1 var(--f-mono); letter-spacing: -.01em; color: var(--text-2); transition: color var(--dur), background var(--dur);
    &:hover, &[aria-expanded="true"] { color: var(--text); background: var(--surface-2); }
    &[aria-current], &[data-current] { color: var(--amber); } }
  .chev { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; opacity: .6; transition: transform var(--dur) var(--ease);
    [aria-expanded="true"] > & { transform: rotate(180deg); } }
  .hdr-actions { justify-self: end; display: flex; gap: 6px; align-items: center; }
  .burger { display: none; width: 38px; height: 38px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line-2); place-content: center; gap: 5px;
    & span { display: block; width: 16px; height: 1.5px; background: var(--text); } }

  .mega { --x: 0px; --w: 600px; --h: 300px; position: absolute; top: calc(100% - 2px); left: 0; width: 100%; height: 0; pointer-events: none; }
  .mega-bg { position: absolute; top: 0; left: var(--x); width: var(--w); height: var(--h); border-radius: var(--r-lg);
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 60px -20px hsl(0 0% 0% / .8);
    opacity: 0; transform: translateY(-4px); transition: left 340ms var(--ease), width 340ms var(--ease), height 340ms var(--ease), opacity 180ms, transform 240ms var(--ease);
    .mega.open & { opacity: 1; transform: none; pointer-events: auto; } }
  .mega.no-anim .mega-bg { transition: opacity 180ms, transform 240ms var(--ease); }
  .mm-panel { position: absolute; top: 0; left: var(--x); padding: 8px; width: max-content;
    opacity: 0; visibility: hidden; transform: translateX(calc(var(--dir, 0) * 20px));
    transition: opacity 200ms var(--ease), transform 340ms var(--ease), left 340ms var(--ease), visibility 0s 340ms;
    &.active { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 50ms, 0s, 0s, 0s; } }
  .mega.no-anim .mm-panel { transition: opacity 200ms var(--ease), visibility 0s; }
  .mm-layout { display: grid; gap: 8px; &.with-aside { grid-template-columns: auto 240px; } }
  .mm-items { display: grid; grid-template-columns: repeat(2, 280px); gap: 2px; .two & { grid-template-columns: repeat(var(--cols, 2), 260px); } .with-aside & { grid-template-columns: 320px; } }
  .mm-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); transition: background var(--dur);
    & b { display: flex; align-items: center; gap: 8px; font: 500 13.5px var(--f-mono); letter-spacing: -.02em; margin-bottom: 4px; }
    & .mm-txt > span { display: block; font-size: 13px; line-height: 1.45; color: var(--text-3); }
    &:hover, &[aria-current] { background: var(--surface-2); & .tile { color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-25); } } }
  .two .mm-item { flex-direction: column; padding: 16px; & .tile { margin-bottom: 6px; } }
  .mm-foot { display: flex; justify-content: space-between; align-items: center; margin: 4px; padding: 12px 14px; border-top: 1px solid var(--line);
    font: 500 12px var(--f-mono); color: var(--text-3);
    & .ic { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
    &:hover { color: var(--text); & .ic { transform: translateX(3px); color: var(--amber); } } }
  .mm-aside { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--r-md); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
    & .kicker { font-size: 10.5px; } }
  .mm-stat { font-size: 13px; color: var(--text-3); & b { display: block; font: 500 30px/1 var(--f-mono); letter-spacing: -.06em; margin-bottom: 6px; } }
  .mm-search { display: flex; align-items: center; gap: 8px; height: 38px; padding-inline: 12px; border-radius: var(--r-md); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2);
    & .ic { width: 14px; height: 14px; color: var(--text-3); }
    & input { width: 100%; border: 0; outline: 0; background: none; font: 12.5px var(--f-mono); }
    &:focus-within { box-shadow: inset 0 0 0 1px var(--amber); } }
  .mm-note { margin-top: auto; font-size: 12px; color: var(--text-3); }
  .mm-post { transition: background var(--dur); & b { font: 500 13.5px/1.4 var(--f-mono); letter-spacing: -.02em; } &:hover { background: var(--surface-2); } }
  .mm-art { height: 90px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line);
    background: radial-gradient(circle at 70% 45%, var(--amber) 0 2px, var(--amber-15) 3px, transparent 26px), repeating-linear-gradient(90deg, hsl(0 0% 100% / .05) 0 1px, transparent 1px 14px), var(--bg); }

  .mnav { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; border: 0; padding: 0 var(--gutter) 20px; margin: 0;
    background: var(--bg); color: var(--text); flex-direction: column; opacity: 0;
    transition: opacity 240ms var(--ease), overlay 240ms allow-discrete, display 240ms allow-discrete;
    &:popover-open { display: flex; opacity: 1; @starting-style { opacity: 0; } } }
  .mn-head { height: var(--header-h); flex: none; display: flex; align-items: center; justify-content: space-between; }
  .mn-close { width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-2); }
  .mn-body { flex: 1; overflow: hidden auto; padding-top: 8px;
    & details, & .mn-link { border-bottom: 1px solid var(--line); }
    & summary, & .mn-link { display: flex; justify-content: space-between; align-items: center; padding: 18px 2px; font: 500 19px/1 var(--f-mono); letter-spacing: -.04em; cursor: pointer; list-style: none; }
    & summary::-webkit-details-marker { display: none; }
    & summary::after { content: "+"; font: 400 20px/1 var(--f-mono); color: var(--text-3); transition: transform var(--dur) var(--ease); }
    & details[open] summary::after { transform: rotate(45deg); }
    & details a { display: flex; align-items: center; gap: 12px; padding: 8px 2px; font: 500 14px var(--f-mono); color: var(--text-2); }
    & details[open] { padding-bottom: 14px; } }
  .mn-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 16px; }

  .cta-band { padding-block: clamp(40px, 6vw, 80px) clamp(64px, 8vw, 110px); }
  .cta-card { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl); padding: clamp(56px, 8vw, 100px) var(--gutter);
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px;
    background: radial-gradient(60% 80% at 50% 0%, var(--amber-08), transparent 70%), var(--surface); box-shadow: inset 0 0 0 1px var(--line);
    & .h2 { max-width: 20ch; } & .lede { max-width: 48ch; } & .actions { margin-top: 12px; } }
  .cta-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(hsl(0 0% 100% / .025) 1px, transparent 1px), linear-gradient(90deg, hsl(0 0% 100% / .025) 1px, transparent 1px); background-size: 40px 40px; mask: radial-gradient(ellipse 60% 80% at 50% 0%, #000, transparent); }
  .cta-mark { width: 40px; height: auto; }

  .ftr { padding-top: 64px; border-top: 1px solid var(--line); background: hsl(0 0% 5.5%); }
  .ftr-top { display: grid; grid-template-columns: 1fr 2.3fr; gap: 64px; }
  .ftr-brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; & > p { color: var(--text-3); font-size: 14.5px; max-width: 34ch; } }
  .news { display: grid; gap: 10px; width: 100%; max-width: 360px; margin-top: 12px;
    & label { font: 500 11.5px var(--f-mono); color: var(--text-3); }
    & div { display: flex; gap: 6px; padding: 4px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line-2); }
    & input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding-left: 10px; font-size: 14px; }
    & div:focus-within { box-shadow: inset 0 0 0 1px var(--amber); } }
  .ftr-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
    & h4 { font: 500 10.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); margin-bottom: 18px; }
    & div { display: flex; flex-direction: column; gap: 11px; align-items: flex-start; }
    & a { font-size: 13.5px; color: var(--text-2); transition: color var(--dur); & .tag { margin-left: 6px; } }
    & a:hover { color: var(--text); } }
  .ftr-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 64px; padding: 22px 0 30px; border-top: 1px solid var(--line); font: 500 11.5px var(--f-mono); color: var(--text-4);
    & a:hover { color: var(--text); } }
  .ftr-legal { display: flex; gap: 22px; }
  .ftr-status { display: inline-flex; align-items: center; gap: 8px; & i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); } }
}

/* ─────────────── PAGES ─────────────── */
@layer pages {
  .phero { position: relative; padding: calc(var(--header-h) + clamp(40px, 6vw, 80px)) 0 clamp(56px, 7vw, 88px); overflow: clip; isolation: isolate; border-bottom: 1px solid var(--line); }
  .phero-inner { display: grid; gap: 20px; justify-items: start; max-width: 860px;
    &.center { margin-inline: auto; text-align: center; justify-items: center; } }
  .phero-split { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 5vw, 80px); align-items: center; }

  /* ── Home hero ── */
  .home-hero { padding-bottom: 0; border-bottom: 0; }
  .hero-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 56px); align-items: center; }
  .hero-copy { display: grid; gap: 22px; justify-items: start; }
  .pill { display: inline-flex; align-items: center; gap: 10px; height: 28px; padding: 0 10px; border-radius: var(--r-sm); font: 500 11.5px var(--f-mono); color: var(--text-2);
    box-shadow: inset 0 0 0 1px var(--amber-25); background: var(--amber-08);
    & b { color: var(--amber); font-weight: 500; } & .ic { width: 12px; height: 12px; color: var(--amber); }
    &:hover { color: var(--text); } }

  /* The god's-eye supply-chain view */
  .godview { position: relative; height: 540px; border-radius: var(--r-lg); background: hsl(0 0% 5.5%); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; }
  .godview canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
  .gv-head, .gv-foot { position: absolute; left: 0; right: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 26px; font: 500 10.5px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); pointer-events: none; }
  .gv-head { top: 0; border-bottom: 1px solid var(--line); background: hsl(0 0% 5.5% / .8); backdrop-filter: blur(6px); }
  .gv-head b { color: var(--text); font-weight: 500; }
  .gv-head .live { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); &::before { content: ""; width: 6px; height: 6px; background: var(--amber); animation: blink 1.6s steps(1) infinite; } }
  .gv-foot { bottom: 0; border-top: 1px solid var(--line); }
  .gv-foot .legend { display: flex; gap: 16px; align-items: center; }
  .gv-foot .legend i { display: inline-block; width: 14px; height: 2px; background: var(--text-4); margin-right: 6px; vertical-align: middle; }
  .gv-foot .legend i.hot { background: var(--amber); }
  .godview::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background: linear-gradient(var(--amber) 0 0) 10px 10px / 10px 1px, linear-gradient(var(--amber) 0 0) 10px 10px / 1px 10px,
                linear-gradient(var(--amber) 0 0) calc(100% - 10px) 10px / 10px 1px, linear-gradient(var(--amber) 0 0) calc(100% - 10px) 10px / 1px 10px,
                linear-gradient(var(--amber) 0 0) 10px calc(100% - 10px) / 10px 1px, linear-gradient(var(--amber) 0 0) 10px calc(100% - 19px) / 1px 10px,
                linear-gradient(var(--amber) 0 0) calc(100% - 10px) calc(100% - 10px) / 10px 1px, linear-gradient(var(--amber) 0 0) calc(100% - 10px) calc(100% - 19px) / 1px 10px;
    background-repeat: no-repeat; opacity: .6; }

  /* Intent switcher — the three buttons that change the content below */
  .intent { margin-top: clamp(40px, 5vw, 64px); }
  .intent-q { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
  .intent-track { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line-2); background: var(--surface); }
  .intent-thumb { --tx: 0px; --tw: 0px; --th: 0px; --ty: 0px;
    position: absolute; left: 0; top: 0; width: var(--tw); height: var(--th); translate: var(--tx) var(--ty); border-radius: var(--r-lg);
    background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--amber-25), inset 0 2px 0 var(--amber);
    transition: translate 420ms var(--ease), width 420ms var(--ease), height 420ms var(--ease); }
  .intent-btn { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 3px; align-items: baseline; padding: 18px 20px; text-align: left; border-radius: var(--r-lg);
    & + & { box-shadow: -1px 0 0 var(--line); }
    & .k { grid-row: span 2; font: 500 11px var(--f-mono); color: var(--text-4); }
    & .t { font: 500 15px/1.3 var(--f-mono); letter-spacing: -.03em; color: var(--text-2); }
    & .s { font-size: 13px; color: var(--text-4); }
    &:hover .t { color: var(--text); }
    &[aria-selected="true"] { & .t { color: var(--text); } & .k { color: var(--amber); } & .s { color: var(--text-3); } } }
  .stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 56px); align-items: center; padding-block: clamp(40px, 5vw, 64px) clamp(72px, 8vw, 110px); }
  .stage-copy { view-transition-name: stage-copy;
    & > div { display: grid; gap: 18px; justify-items: start; }
    & p { max-width: 46ch; } & .actions { margin-top: 10px; } }
  .stage-view { view-transition-name: stage-view; }
  .sv-body { min-height: 360px; }
  .ticks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 8px; font: 500 12px var(--f-mono); color: var(--text-3);
    & li { display: inline-flex; align-items: center; gap: 8px; } & li::before { content: ""; width: 5px; height: 5px; background: var(--amber); } }
  .lib-q-mini { display: flex; align-items: center; gap: 10px; height: 42px; padding-inline: 12px; border-radius: var(--r-md); background: var(--bg); box-shadow: inset 0 0 0 1px var(--amber); font: 500 13px var(--f-mono); color: var(--text);
    & .ic { width: 15px; height: 15px; color: var(--text-3); } & .caret { width: 1.5px; height: 16px; background: var(--amber); margin-left: -6px; animation: blink 1s steps(1) infinite; } }
  .lib-rows { display: grid; font-size: 13px;
    & li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 10px 4px; border-top: 1px solid var(--line); }
    & li b { font-weight: 500; } & li span { font: 500 11px var(--f-mono); color: var(--text-4); grid-column: 1; }
    & li .p { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 500 12.5px var(--f-mono); color: var(--text); } & li .p.free { color: var(--ok); } }
  .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    & > div { padding: 14px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 6px; }
    & .l { font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); }
    & b { font: 500 24px/1 var(--f-mono); letter-spacing: -.05em; } & .d { font: 500 11px var(--f-mono); color: var(--ok); } }
  .spark { width: 100%; height: 100px; & .draw { stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 1.4s var(--ease) forwards; } }

  .sources { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 40px;
    & p { font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); }
    & .list { display: flex; flex-wrap: wrap; gap: 12px 40px; }
    & span { font: 500 15px/1 var(--f-mono); color: var(--text-3); letter-spacing: -.03em; transition: color var(--dur); }
    & a:hover span { color: var(--text); } }

  .prod { display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 3vw, 36px); overflow: hidden;
    & .top { display: flex; align-items: center; gap: 12px; }
    & h3 { font: 500 30px/1 var(--f-mono); letter-spacing: -.06em; }
    & > p { font-size: 15px; color: var(--text-2); max-width: 48ch; }
    & .mock { margin-top: 10px; margin-bottom: -50px; box-shadow: inset 0 0 0 1px var(--line-2); } }

  .pipeline { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
    & li { position: relative; display: grid; gap: 8px; padding: 26px; align-content: start; }
    & li + li { box-shadow: -1px 0 0 var(--line); }
    & li:not(:last-child)::after { content: "→"; position: absolute; right: -10px; top: 32px; z-index: 1; width: 20px; height: 20px; display: grid; place-items: center; font: 11px var(--f-mono); color: var(--text-3); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); border-radius: var(--r-xs); }
    & .n { font: 500 10.5px var(--f-mono); color: var(--amber); letter-spacing: .08em; text-transform: uppercase; }
    & p { font-size: 14px; color: var(--text-3); } & .tile { margin-bottom: 8px; } }

  .sol { display: grid; gap: 12px; padding: 24px; align-content: start; & p { color: var(--text-3); font-size: 14px; } & .link { margin-top: 6px; } }

  .price-strip { display: grid; grid-template-columns: repeat(2, 1fr); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
    & > div { padding: 30px; display: grid; gap: 8px; }
    & > div + div { box-shadow: -1px 0 0 var(--line); }
    & .mono { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
    & b { font: 500 42px/1 var(--f-mono); letter-spacing: -.07em; }
    & b small { font: 500 12px var(--f-mono); color: var(--text-3); margin-left: 6px; letter-spacing: 0; }
    & p { font-size: 14px; color: var(--text-3); } }

  .tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }
  .tier { display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
    & .name { display: flex; align-items: center; gap: 10px; font: 500 11px var(--f-mono); color: var(--text-2); text-transform: uppercase; letter-spacing: .1em; }
    & .amount { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; & b { font: 500 52px/1 var(--f-mono); letter-spacing: -.08em; } & span { color: var(--text-3); font: 500 12px var(--f-mono); } }
    & > p { color: var(--text-2); min-height: 3em; }
    & .checks { padding: 22px 0 28px; border-top: 1px solid var(--line); margin-top: 4px; flex: 1; align-content: start; }
    & .btn { --h: 46px; }
    &.featured { box-shadow: inset 0 0 0 1px var(--amber-25), inset 0 2px 0 var(--amber); } }
  .compare { width: 100%; font-size: 14px;
    & th, & td { padding: 14px 22px; text-align: left; border-bottom: 1px solid var(--line); }
    & thead th { font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); background: var(--bg-2); }
    & tbody th { font: 500 13px var(--f-mono); letter-spacing: -.02em; color: var(--text); }
    & td { color: var(--text-2); } & tr:last-child > * { border-bottom: 0; }
    & .y { color: var(--ok); } & .n { color: var(--text-4); } }
  .table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

  .lib { padding: 16px; display: grid; gap: 14px; }
  .lib-q { display: flex; align-items: center; gap: 12px; height: 50px; padding-inline: 16px; border-radius: var(--r-md); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow var(--dur);
    & .ic { color: var(--text-3); }
    & input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 14.5px var(--f-mono); letter-spacing: -.02em; color: var(--text); }
    & kbd { font: 500 10.5px var(--f-mono); color: var(--text-3); padding: 3px 7px; border-radius: var(--r-xs); box-shadow: inset 0 0 0 1px var(--line-2); }
    &:focus-within { box-shadow: inset 0 0 0 1px var(--amber), 0 0 0 3px var(--amber-15); } }
  .lib-filters { display: flex; flex-wrap: wrap; gap: 6px; }
  .lib-list { display: grid; min-height: 380px; align-content: start;
    & li { display: grid; grid-template-columns: 1fr auto; gap: 3px 16px; padding: 12px 10px; border-top: 1px solid var(--line); transition: background var(--dur); animation: rise .3s var(--ease) both; }
    & li:hover { background: var(--surface-2); }
    & .n { color: var(--text); font-size: 14px; & mark { background: var(--amber-25); color: var(--text); border-radius: 2px; padding: 0 1px; } }
    & .m { display: flex; gap: 10px; font: 500 11px var(--f-mono); color: var(--text-4); }
    & .p { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 500 12.5px var(--f-mono); color: var(--text); &.free { color: var(--ok); } }
    & .empty { color: var(--text-3); padding: 24px 10px; } }

  .pubs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .pub { display: grid; gap: 10px; padding: 24px; align-content: start;
    & h3 { font: 500 20px/1.15 var(--f-mono); letter-spacing: -.05em; margin-top: 6px; }
    & p { color: var(--text-3); font-size: 14px; }
    & .row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--text-3); }
    &.dashed { background: transparent; box-shadow: none; border: 1px dashed var(--line-3); } }
  .facts { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
    & div { padding: 22px 24px; display: grid; gap: 8px; } & div + div { box-shadow: -1px 0 0 var(--line); }
    & dt { font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
    & dd { font: 500 15px var(--f-mono); letter-spacing: -.03em; color: var(--text); } }

  .timeline { display: grid; max-width: 880px; margin-inline: auto; position: relative;
    &::before { content: ""; position: absolute; left: 150px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
    & article { display: grid; grid-template-columns: 150px 1fr; gap: 40px; padding-bottom: 52px; position: relative; }
    & article::before { content: ""; position: absolute; left: 147px; top: 6px; width: 7px; height: 7px; background: var(--amber); box-shadow: 0 0 0 4px var(--bg); }
    & time { font: 500 12px var(--f-mono); color: var(--text-3); padding-top: 2px; }
    & .entry { display: grid; gap: 12px; padding-left: 8px; justify-items: start; }
    & .entry p, & .entry li { color: var(--text-2); font-size: 15px; }
    & .entry ul { display: grid; gap: 6px; padding-left: 18px; list-style: square; } }

  .people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .person { display: grid; gap: 4px; padding: 10px 10px 18px;
    & .ph { aspect-ratio: 1; border-radius: var(--r-md); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; display: grid; place-items: center; color: var(--text-4); font: 500 22px var(--f-mono); }
    & b { padding-inline: 6px; font: 500 14px var(--f-mono); letter-spacing: -.02em; } & span { padding-inline: 6px; font-size: 13.5px; color: var(--text-3); } }
  .jobs { display: grid; border-top: 1px solid var(--line); }
  .job { display: grid; grid-template-columns: 1fr auto auto auto; gap: 24px; align-items: center; padding: 20px 6px; border-bottom: 1px solid var(--line); transition: background var(--dur);
    & b { font: 500 15px var(--f-mono); letter-spacing: -.03em; } & span { font: 500 12px var(--f-mono); color: var(--text-3); }
    & .ic { width: 16px; height: 16px; color: var(--text-3); transition: transform var(--dur) var(--ease); }
    &:hover { background: var(--surface); & .ic { transform: translateX(3px); color: var(--amber); } } }

  .contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
  .contact-list { display: grid; gap: 10px;
    & > a, & > div { display: flex; gap: 16px; align-items: center; padding: 18px; }
    & b { display: block; font: 500 14px var(--f-mono); letter-spacing: -.02em; } & span { font-size: 13.5px; color: var(--text-3); } }

  .doc-search { display: flex; align-items: center; gap: 12px; height: 52px; width: min(100%, 620px); padding-inline: 18px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
    & input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 14.5px var(--f-mono); letter-spacing: -.02em; }
    & .ic { color: var(--text-3); }
    &:focus-within { box-shadow: inset 0 0 0 1px var(--amber), 0 0 0 3px var(--amber-15); } }

  @media (max-width: 1080px) {
    .nav, .hide-md { display: none; }
    .burger { display: grid; }
    .hdr-bar { grid-template-columns: 1fr auto; }
    .hero-top, .stage { grid-template-columns: 1fr; }
    .godview { height: 460px; }
    .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split, .phero-split, .contact-grid { grid-template-columns: 1fr; }
    .split.rev > :first-child { order: 0; }
    .pipeline { grid-template-columns: 1fr 1fr; & li:nth-child(3) { box-shadow: 0 -1px 0 var(--line); } & li:nth-child(4) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); } & li:nth-child(2)::after { display: none; } }
    .tiers { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
    .pubs, .people { grid-template-columns: repeat(2, 1fr); }
    .facts { grid-template-columns: 1fr 1fr; & div:nth-child(3) { box-shadow: 0 -1px 0 var(--line); } & div:nth-child(4) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); } }
    .ftr-top { grid-template-columns: 1fr; }
    .ftr-cols { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  }
  @media (max-width: 760px) {
    .g2, .g3, .g4, .price-strip, .pipeline, .pubs { grid-template-columns: 1fr; }
    .price-strip > div + div, .pipeline li + li { box-shadow: 0 -1px 0 var(--line) !important; }
    .pipeline li::after { display: none; }
    .intent-track { grid-template-columns: 1fr; }
    .intent-btn + .intent-btn { box-shadow: 0 -1px 0 var(--line); }
    .godview { height: 400px; }
    .gv-foot .legend { display: none; }
    .sv-body { min-height: 0; }
    .m-row { grid-template-columns: 1fr 72px; & > span:nth-child(2) { display: none; } }
    .facts { grid-template-columns: 1fr; & div:nth-child(n) { box-shadow: 0 -1px 0 var(--line) !important; } & div:first-child { box-shadow: none !important; } }
    .job { grid-template-columns: 1fr auto; & span:nth-of-type(2) { display: none; } }
    .timeline { &::before { left: 3px; } & article { grid-template-columns: 1fr; gap: 10px; padding-left: 28px; } & article::before { left: 0; } }
    .ftr-cols { grid-template-columns: 1fr 1fr; }
    .form .row2 { grid-template-columns: 1fr; }
    .hdr-actions .btn-primary { --h: 34px; padding-inline: 12px; }
    .mn-actions .btn { --h: 46px; padding-inline: 12px; }
    .pill { font-size: 10.5px; }
  }
}

/* ─────────────── MOTION ─────────────── */
@layer motion {
  @keyframes grow { from { transform: scaleX(0); } }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } }
  @keyframes blink { 50% { opacity: 0; } }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes reveal { from { opacity: 0; transform: translateY(20px); } }

  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 50%; }
    }
  }

  /* Page-to-page and intent-switch transitions */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 140ms ease-in both vt-fade-out; }
  ::view-transition-new(root) { animation: 240ms var(--ease) both vt-fade-in; }
  ::view-transition-old(stage-copy), ::view-transition-old(stage-view) { animation: 160ms ease-in both vt-fade-out; }
  ::view-transition-new(stage-copy) { animation: 320ms var(--ease) 60ms both vt-up; }
  ::view-transition-new(stage-view) { animation: 360ms var(--ease) 40ms both vt-up; }
  @keyframes vt-fade-out { to { opacity: 0; } }
  @keyframes vt-fade-in { from { opacity: 0; } }
  @keyframes vt-up { from { opacity: 0; transform: translateY(10px); } }
  .hdr { view-transition-name: site-header; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  }
}

/* ─────────────── DATA COMPONENTS (rendered from js/library.js) ─────────────── */
@layer pages {
  library-stats, library-table, methods-matrix, region-bars, dataset-facts, quality-gate, en15804-list, reel-scope { display: block; }

  /* Headline numbers band */
  .lstats { display: grid; grid-template-columns: repeat(5, 1fr); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; text-align: left;
    & > div { padding: 22px 24px; display: grid; gap: 6px; align-content: start; }
    & > div + div { box-shadow: -1px 0 0 var(--line); }
    & dt { font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
    & dd { font: 500 clamp(1.7rem, 1.3rem + 1vw, 2.3rem)/1.05 var(--f-mono); letter-spacing: -.06em; color: var(--text); }
    & span { font-size: 13px; color: var(--text-4); } }

  /* Comparison table */
  .dtable { width: 100%; font-size: 13.5px; min-width: 860px;
    & th, & td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
    & thead th { font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); background: var(--bg-2); white-space: nowrap; position: sticky; top: 0; }
    & thead th.num { color: var(--text-3); font-family: var(--f-mono); }
    & thead th button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; display: inline-flex; gap: 6px; }
    & thead th button:hover { color: var(--text); }
    & .num { text-align: right; font-family: var(--f-mono); letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
    & td.num small, & td small { display: block; font: 500 10.5px var(--f-mono); color: var(--text-4); letter-spacing: 0; margin-top: 2px; }
    & td { color: var(--text-2); }
    & .c-name a { font-family: var(--f-mono); letter-spacing: -.02em; }
    & .c-name b { font-weight: 500; }
    & .c-name a:hover b { color: var(--amber); }
    & .v { color: var(--text-3); }
    & .var { font: 500 10.5px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 2px 5px; border-radius: var(--r-xs); box-shadow: inset 0 0 0 1px var(--line-2); margin-left: 4px; }
    & .c-methods, & .c-systemModel { font-size: 13px; }
    & tbody tr { transition: background var(--dur); }
    & tbody tr:hover { background: var(--surface-2); }
    & tbody tr[data-status="Coming soon"] td:not(.c-access) { opacity: .6; }
    & tr:last-child > * { border-bottom: 0; }
    &.compact { min-width: 0; }
    &.matrix { min-width: 700px; & .c { text-align: center; } } }
  .dnote { margin-top: 12px; }
  library-table .lib-filters { margin-bottom: 16px; }
  .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-3);
    &.on { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-15); } }

  /* Region bars */
  .rbars { display: grid; gap: 8px; align-content: start; height: 100%; padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .rb-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font: 500 12.5px var(--f-mono); letter-spacing: -.02em;
    & span { color: var(--text-4); font-size: 11px; } }
  .rb { display: grid; grid-template-columns: 64px 1fr 56px 48px; gap: 12px; align-items: center; font: 500 12px var(--f-mono); }
  .rb-k { color: var(--text); }
  .rb-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden;
    & i { display: block; height: 100%; width: calc(var(--w) * 100%); background: var(--text-3); transform-origin: left; animation: grow 1s var(--ease) both; } }
  .rb:first-of-type .rb-bar i { background: var(--amber); }
  .rb-n { text-align: right; color: var(--text-2); } .rb-p { text-align: right; color: var(--text-4); }

  /* Quality gate */
  .gate { display: grid; grid-template-columns: repeat(5, 1fr); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .gate-step, .gate-out { position: relative; display: grid; gap: 8px; align-content: start; padding: 24px 22px;
    & b { font: 500 15px var(--f-mono); letter-spacing: -.03em; }
    & p { font-size: 13.5px; color: var(--text-3); } }
  .gate > * + * { box-shadow: -1px 0 0 var(--line); }
  .gs-n { font: 500 11px var(--f-mono); color: var(--text-4); }
  .gs-c { font: 500 11px var(--f-mono); color: var(--amber); letter-spacing: .04em; text-transform: uppercase; }
  .gate-out { background: var(--amber-08); border-radius: 0 var(--r-lg) var(--r-lg) 0; & .gs-c { color: var(--ok); } }

  /* Indicator list & scope list */
  .ilist { display: grid; border-top: 1px solid var(--line);
    & div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
    & dt { font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding-top: 2px; }
    & dd { font: 500 13.5px var(--f-mono); color: var(--text); letter-spacing: -.02em; } }
  .scope { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
    & li { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); font: 500 13px var(--f-mono); color: var(--text); letter-spacing: -.02em; }
    & li::before { content: ""; width: 5px; height: 5px; background: var(--amber); flex: none; } }

  /* Anatomy of a datapoint */
  .anatomy { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
  .record { font-size: 13.5px;
    & .rec-h { padding: 18px 18px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
    & .rec-h b { font: 500 17px var(--f-mono); letter-spacing: -.04em; color: var(--text); }
    & dl { display: grid; }
    & dl div { display: grid; grid-template-columns: 26px 150px 1fr; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--line); align-items: baseline; }
    & dl div:last-child { border-bottom: 0; }
    & dt { font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
    & dd { color: var(--text); font-family: var(--f-mono); letter-spacing: -.02em; font-size: 12.5px; }
    & .pin { font: 500 10.5px var(--f-mono); color: var(--amber); width: 20px; height: 20px; display: grid; place-items: center; border-radius: var(--r-xs); box-shadow: inset 0 0 0 1px var(--amber-25); } }
  .anno { display: grid; gap: 0; counter-reset: a; border-top: 1px solid var(--line);
    & li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 16px 2px; border-bottom: 1px solid var(--line); }
    & li::before { counter-increment: a; content: counter(a); font: 500 10.5px var(--f-mono); color: var(--amber); width: 20px; height: 20px; display: grid; place-items: center; border-radius: var(--r-xs); box-shadow: inset 0 0 0 1px var(--amber-25); }
    & b { display: block; font: 500 14px var(--f-mono); letter-spacing: -.03em; margin-bottom: 3px; }
    & p { font-size: 14px; color: var(--text-3); } }

  @media (max-width: 1080px) {
    .lstats { grid-template-columns: repeat(3, 1fr); & > div:nth-child(4) { box-shadow: 0 -1px 0 var(--line); } & > div:nth-child(5) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); } }
    .gate { grid-template-columns: 1fr 1fr; & > :nth-child(n+3) { box-shadow: 0 -1px 0 var(--line); } & > :nth-child(4) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); } & .gate-out { grid-column: 1 / -1; border-radius: 0 0 var(--r-lg) var(--r-lg); } }
    .anatomy { grid-template-columns: 1fr; }
  }
  @media (max-width: 760px) {
    .lstats { grid-template-columns: 1fr 1fr; & > div { box-shadow: 0 -1px 0 var(--line) !important; } & > div:nth-child(-n+2) { box-shadow: none !important; } & > div:nth-child(2n) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line) !important; } & > div:nth-child(2) { box-shadow: -1px 0 0 var(--line) !important; } }
    .gate { grid-template-columns: 1fr; & > * { box-shadow: 0 -1px 0 var(--line) !important; } & > :first-child { box-shadow: none !important; } }
    .scope { grid-template-columns: 1fr; }
    .ilist div { grid-template-columns: 1fr; gap: 4px; }
    .record dl div { grid-template-columns: 26px 1fr; & dd { grid-column: 2; } }
    .rb { grid-template-columns: 56px 1fr 48px; & .rb-p { display: none; } }
  }
}

/* ─────────────── INTERACTIVE PIECES ─────────────── */
@layer pages {
  publisher-grid, cost-calc { display: block; }

  /* Publisher cards with their numbers */
  .pubgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .pubc { display: flex; flex-direction: column; gap: 10px; padding: 24px; cursor: pointer;
    & .pc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
    & h3 { font: 500 21px/1.1 var(--f-mono); letter-spacing: -.05em; }
    & .by { font: 500 11px var(--f-mono); color: var(--text-4); margin-top: -4px; }
    & p { font-size: 14px; color: var(--text-3); }
    & .link { margin-top: 4px; }
    &:hover, &:focus-visible { box-shadow: inset 0 0 0 1px var(--line-3); & .tile { color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-25); } & .link { color: var(--amber); } }
    &.soon { & h3, & .pc-m dd { color: var(--text-2); } } }
  .pc-m { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px;
    & dt { font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); }
    & dd { font: 500 16px var(--f-mono); letter-spacing: -.04em; color: var(--text); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }

  /* Matrix crosshair */
  .matrix tbody tr:hover td, .matrix .col-hl { background: var(--surface-2); }
  .matrix thead th.col-hl { color: var(--amber); }

  /* Anatomy linking */
  .record [data-pin], .anno [data-pin] { transition: background var(--dur); cursor: default; }
  .record div.hl, .anno li.hl { background: var(--amber-08); }
  .record div.hl .pin, .anno li.hl::before { background: var(--amber); color: var(--bg); }

  /* Runnable quality gate */
  .gate-ctl { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; & .btn[disabled] { opacity: .5; cursor: progress; } }
  .gate-step { --p: 1;
    & .gs-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--amber); transform-origin: left; transform: scaleX(var(--p)); opacity: .9; transition: transform 80ms linear; }
    &.on { background: var(--surface-2); & .gs-n { color: var(--amber); } }
    &.done .gs-c { color: var(--ok); } }
  .gate-out { transition: background 300ms var(--ease); &.done { background: hsl(150 70% 45% / .08); } }

  /* Cost calculator */
  .calc { display: grid; grid-template-columns: 1.2fr 1fr; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
  .calc-in { display: grid; gap: 22px; padding: 30px; }
  .calc-out { display: grid; gap: 14px; align-content: start; padding: 30px; background: var(--bg-2); box-shadow: -1px 0 0 var(--line); }
  .rng { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center;
    & .rl { font: 500 12.5px var(--f-mono); color: var(--text-2); }
    & output { font: 500 15px var(--f-mono); color: var(--text); letter-spacing: -.03em; }
    & input { --p: .5; grid-column: 1 / -1; appearance: none; -webkit-appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; }
    & input::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--amber) calc(var(--p) * 100%), var(--surface-4) 0); }
    & input::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--amber) calc(var(--p) * 100%), var(--surface-4) 0); }
    & input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5.5px; border-radius: var(--r-xs); background: var(--text); box-shadow: 0 0 0 4px var(--bg); }
    & input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: var(--r-xs); background: var(--text); box-shadow: 0 0 0 4px var(--bg); }
    & input:focus-visible { outline: none; } & input:focus-visible::-webkit-slider-thumb { background: var(--amber); } }
  .calc-total { display: flex; align-items: baseline; gap: 10px; & b { font: 500 clamp(2.4rem, 1.8rem + 2vw, 3.4rem)/1 var(--f-mono); letter-spacing: -.07em; color: var(--amber); } & span { font: 500 12px var(--f-mono); color: var(--text-3); } }
  .calc-dl { display: grid; border-top: 1px solid var(--line);
    & div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
    & dt { font-size: 14px; color: var(--text-3); } & dd { font: 500 14px var(--f-mono); color: var(--text); } }

  /* Monte Carlo */
  .mc { display: grid; gap: 14px; padding: 18px; }
  .mc canvas { width: 100%; height: 200px; }
  .mc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; & .btn[disabled] { opacity: .5; } }
  .mc-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); padding-top: 12px;
    & dt { font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); }
    & dd { font: 500 17px var(--f-mono); letter-spacing: -.04em; color: var(--text); margin-top: 4px; }
    & div:nth-child(2) dd { color: var(--amber); } }

  /* Code tabs */
  .codetabs { border-radius: var(--r-lg); background: hsl(0 0% 5%); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden;
    & .code { border-radius: 0; box-shadow: none; background: transparent; } }
  .ct-bar { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--bg-2);
    & button { height: 30px; padding-inline: 12px; border-radius: var(--r-sm); font: 500 12px var(--f-mono); color: var(--text-3); }
    & button:hover { color: var(--text); }
    & button[aria-selected="true"] { color: var(--text); background: var(--surface-3); box-shadow: inset 0 -2px 0 var(--amber); }
    & .ep { margin-left: auto; align-self: center; padding-right: 8px; font: 500 11px var(--f-mono); color: var(--text-4); } }

  /* Alia review picker */
  .opt { width: 100%; text-align: left; cursor: pointer; transition: background var(--dur);
    &:hover { background: var(--surface-2); }
    &.sel { background: var(--amber-08); box-shadow: inset 2px 0 0 var(--amber); } }

  @media (max-width: 1080px) { .pubgrid { grid-template-columns: repeat(2, 1fr); } .calc { grid-template-columns: 1fr; } .calc-out { box-shadow: 0 -1px 0 var(--line); } }
  @media (max-width: 760px) { .pubgrid { grid-template-columns: 1fr; } .calc-in, .calc-out { padding: 22px; } .ct-bar .ep { display: none; } }
}

/* ─────────────── CREDITS & OPEN-IN-APP ─────────────── */
@layer pages {
  credit-table { display: block; }
  .cr { font: 500 13px var(--f-mono); color: var(--amber); letter-spacing: -.02em; white-space: nowrap; &.free { color: var(--ok); } }
  .dtable td.c-access { white-space: nowrap; & small { margin-top: 6px; } }
  .dtable:not(.compact):not(.credits):not(.matrix) { min-width: 1080px; }
  .dtable .c-name { min-width: 200px; & .var { white-space: nowrap; } }
  .dtable.credits { min-width: 520px;
    & thead th small { display: block; font-size: 10.5px; letter-spacing: .06em; color: var(--text-4); margin-top: 3px; text-transform: none; }
    & td { vertical-align: middle; padding-block: 16px; }
    & .c-name b { font: 500 14px var(--f-mono); color: var(--text); }
    & .cr { font-size: 15px; } }
  .presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -10px; }

  /* Open-in-app affordances */
  .lib-q .lib-open { flex: none; & .ic { width: 13px; height: 13px; } }
  .lib-q:has(input:placeholder-shown) kbd { display: inline-block; }
  .lib-list li { grid-template-columns: 1fr auto auto; align-items: center; }
  .lib-list .row-open { grid-row: 1 / span 2; grid-column: 3; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding-inline: 10px; border-radius: var(--r-sm);
    font: 500 11.5px var(--f-mono); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); opacity: 0; transition: opacity var(--dur), color var(--dur), box-shadow var(--dur);
    & .ic { width: 12px; height: 12px; }
    &:hover { color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-25); } }
  .lib-list li:hover .row-open, .lib-list .row-open:focus-visible { opacity: 1; }
  @media (hover: none) { .lib-list .row-open { opacity: 1; } }
  .lib-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line);
    & .link .ic { width: 13px; height: 13px; } & .link:hover .ic { transform: translate(2px, -2px); } }
  .mm-open { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: var(--r-md); font: 500 12px var(--f-mono); color: var(--bg); background: var(--amber);
    & .ic { width: 12px; height: 12px; } &:hover { background: var(--amber-90); } }

  @media (max-width: 760px) {
    .lib-q { flex-wrap: wrap; height: auto; padding-block: 10px; & .lib-open { width: 100%; } & kbd { display: none !important; } }
    .lib-list li { grid-template-columns: 1fr auto; }
    .lib-list .row-open { grid-row: auto; grid-column: 1 / -1; justify-self: start; margin-top: 6px; }
  }
}

/* ─────────────── LIBRARY FINDER (search → preview → open in app) ─────────────── */
@layer pages {
  .finder { display: grid; gap: 0; text-align: left; border-radius: var(--r-xl); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 90px -40px hsl(0 0% 0% / .9); overflow: hidden; }
  .f-bar { display: flex; align-items: center; gap: 14px; height: 68px; padding-inline: 22px; background: var(--surface); border-bottom: 1px solid var(--line);
    & > .ic { width: 20px; height: 20px; color: var(--amber); }
    & input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 500 17px var(--f-mono); letter-spacing: -.03em; color: var(--text); }
    & input::placeholder { color: var(--text-4); }
    & select { height: 36px; padding: 0 30px 0 12px; border: 0; border-radius: var(--r-md); background: var(--bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round'><path d='M3 4.5l3 3 3-3'/></svg>") right 10px center / 12px no-repeat;
      appearance: none; font: 500 12.5px var(--f-mono); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; }
    & select:focus-visible { outline: 0; box-shadow: inset 0 0 0 1px var(--amber); }
    & kbd { font: 500 11px var(--f-mono); color: var(--text-4); padding: 4px 8px; border-radius: var(--r-xs); box-shadow: inset 0 0 0 1px var(--line-2); }
    &:focus-within { box-shadow: inset 0 -1px 0 var(--amber); } }
  .f-sugg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1px solid var(--line);
    & span { font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); margin-right: 6px; }
    & button { height: 26px; padding-inline: 10px; border-radius: var(--r-full); font: 500 12px var(--f-mono); color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line-2); }
    & button:hover { color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-25); } }
  .f-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); min-height: 420px; }
  .f-list { padding: 8px; align-content: start; display: grid; gap: 2px;
    & li { display: grid; gap: 3px; padding: 12px 14px; border-radius: var(--r-md); cursor: pointer; box-shadow: inset 2px 0 0 transparent; transition: background var(--dur); }
    & li[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--amber); }
    & .fl-n { font-size: 14.5px; color: var(--text); & mark { background: none; color: var(--amber); } }
    & .fl-m { font: 500 11px var(--f-mono); color: var(--text-4); }
    & .empty { cursor: default; color: var(--text-3); font-size: 14px; } }
  .f-prev { display: flex; flex-direction: column; gap: 14px; padding: 26px; background: var(--surface); border-left: 1px solid var(--line);
    & .kicker { font-size: 10.5px; }
    & .f-name { font: 500 20px/1.25 var(--f-mono); letter-spacing: -.04em; color: var(--text); }
    & .btn { align-self: flex-start; margin-top: 4px; & .ic { width: 13px; height: 13px; } }
    & .note { margin-top: auto; } }
  .f-dl { display: grid; border-top: 1px solid var(--line);
    & div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
    & dt { font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); }
    & dd { font: 500 12.5px var(--f-mono); color: var(--text-2); text-align: right; } }
  .f-price { display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    & div { display: grid; gap: 4px; padding: 12px; border-radius: var(--r-md); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
    & span { font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); }
    & b { font: 500 16px var(--f-mono); letter-spacing: -.03em; color: var(--amber); &.free { color: var(--ok); } } }
  .f-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface);
    & .link .ic { width: 13px; height: 13px; } }
  .phero .finder { max-width: 1040px; margin-inline: auto; }

  @media (max-width: 860px) {
    .f-body { grid-template-columns: 1fr; min-height: 0; }
    .f-prev { border-left: 0; border-top: 1px solid var(--line); }
    .f-bar { flex-wrap: wrap; height: auto; padding-block: 14px; row-gap: 10px; & input { flex-basis: calc(100% - 40px); height: 32px; font-size: 15px; } & select { flex: 1; } & kbd { display: none; } }
  }
}

/* ─────────────── REVIEW FIXES (Sep 2026) ─────────────── */
@layer pages {
  /* Intent stage: all panels share one grid cell, so switching never shifts the page */
  .stage-copy { display: grid; & > [data-for] { grid-area: 1 / 1; } }
  .stage-view .mock { display: grid; grid-template-rows: auto 1fr; & > .mock-bar { grid-row: 1; } & > [data-for] { grid-row: 2; grid-column: 1; } }
  [data-off] { visibility: hidden; pointer-events: none; }
}

@layer pages {
  /* Headline emphasis: the italic-free amber phrase is the site's signature (client choice).
     Never dim it to grey. */
  .h1 em, .h2 em { color: var(--amber); }
  .h1.accent em, .cta-card .h2 em { color: var(--amber); }

  /* "Free" is a price, not a status — no green */
  .cr.free, .lib-rows .p.free, .lib-list .p.free, .f-price b.free { color: var(--text); }

  /* Homepage hero: an action above the fold, tighter rhythm */
  .hero-copy .actions { margin-top: 6px; }
  .intent { margin-top: 32px; }
  .godview { height: 480px; }

  /* Publisher card values wrap instead of truncating */
  .pc-m dd { white-space: normal; overflow: visible; font-size: 14.5px; line-height: 1.25; }

  @media (max-width: 1080px) { .godview { height: 420px; } }
  @media (max-width: 760px) { .godview { height: 360px; } }
  @media (max-width: 480px) { .gv-head .live { display: none; } }
}

@layer pages {
  .m-row > span small { display: block; margin-top: 2px; font: 500 11px var(--f-mono); color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ─────────────── HERO VARIANTS (switchable production-graph views) ─────────────── */
@layer pages {
  .godview { display: grid; grid-template-rows: auto 1fr auto; }
  .godview .gv-head, .godview .gv-foot { position: relative; inset: auto; }
  .gv-stage { position: relative; min-height: 0; overflow: hidden; view-transition-name: hero-stage; }
  .gv-stage > canvas:first-child, .gv-stage > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .gv-head { pointer-events: auto; }
  .gv-switch { display: flex; gap: 2px; padding: 2px; border-radius: var(--r-md); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: auto;
    & button { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding-inline: 9px; border-radius: var(--r-sm);
      font: 500 10.5px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); transition: color var(--dur), background var(--dur); }
    & button span { color: var(--text-4); }
    & button:hover { color: var(--text); }
    & button[aria-pressed="true"] { color: var(--text); background: var(--surface-3); box-shadow: inset 0 -2px 0 var(--amber); & span { color: var(--amber); } } }
  .gv-foot .live { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); &::before { content: ""; width: 6px; height: 6px; background: var(--amber); animation: blink 1.6s steps(1) infinite; } }
  ::view-transition-old(hero-stage) { animation: 180ms ease-in both vt-fade-out; }
  ::view-transition-new(hero-stage) { animation: 320ms var(--ease) both vt-fade-in; }
  @media (max-width: 480px) { .gv-head > span { display: none; } .gv-head { justify-content: flex-end; } .gv-switch button { padding-inline: 7px; } .gv-switch button span { display: none; } }
}
@layer pages {
  .godview { height: 540px; }
  @media (max-width: 1080px) { .godview { height: 480px; } }
  @media (max-width: 760px) { .godview { height: 400px; } }
}

@layer pages {
  .gv-foot > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  @media (max-width: 480px) { .gv-foot [data-gv-status] { display: none; } .gv-foot { justify-content: flex-end; } }

  /* Cost curve: annual licenses vs. pay as you go (chart colors validated for the dark surface: CVD dE 25.8) */
  .cc { --s-c: #c58409; --s-t: #6b8ce0; display: grid; gap: 22px; padding: 28px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .cc-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
  .cc .seg { display: flex; gap: 6px; }
  .cc-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--text-2);
    & span { display: inline-flex; align-items: center; gap: 8px; } & i { width: 16px; height: 2px; } & .c { background: var(--s-c); }
    & .t { background: repeating-linear-gradient(90deg, var(--s-t) 0 5px, transparent 5px 9px); } }
  .cc-chart { position: relative; min-width: 0;
    & svg { display: block; width: 100%; height: auto; overflow: visible; }
    & .gl { stroke: var(--line); } & .bl { stroke: var(--line-3); } & .ax { fill: var(--text-3); font: 11px var(--f-mono); }
    & .tl { fill: none; stroke: var(--s-t); stroke-width: 2; stroke-dasharray: 6 5; stroke-linejoin: round; }
    & .cl { fill: none; stroke: var(--s-c); stroke-width: 2; stroke-linejoin: round; } & .ca { fill: var(--s-c); opacity: .12; }
    & .td { fill: var(--s-t); stroke: var(--surface); stroke-width: 2; } & .cd { fill: var(--s-c); stroke: var(--surface); stroke-width: 2; }
    & .lb { fill: var(--text); font: 600 13px var(--f-sans); } & .ls { fill: var(--text-2); font: 12px var(--f-sans); } & .xh { stroke: var(--line-3); } }
  .cc-tip { position: absolute; top: 12px; min-width: 200px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-3); font-size: 12.5px; pointer-events: none;
    & b { display: block; margin-bottom: 6px; font: 500 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
    & div { display: flex; justify-content: space-between; gap: 16px; color: var(--text-2); } & strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; } }
  .cc-h { font: 500 11.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  .cc-team { display: grid; grid-template-columns: auto 1fr 1fr; gap: 16px 32px; align-items: center; padding-block: 18px; border-block: 1px solid var(--line); }
  .cc-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .cc-side { display: grid; gap: 20px; align-content: start; min-width: 0; padding: 22px; border-radius: var(--r-md); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
    & header { display: grid; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
    & header .cc-h { display: inline-flex; align-items: center; gap: 8px; }
    & header .cc-h::before { content: ""; width: 14px; height: 2px; }
    &.c header .cc-h::before { background: var(--s-c); } &.t header .cc-h::before { background: repeating-linear-gradient(90deg, var(--s-t) 0 5px, transparent 5px 9px); }
    & header b { font: 500 clamp(1.8rem, 1.3rem + 1.4vw, 2.4rem)/1 var(--f-mono); letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
    &.c header b { color: var(--amber); } &.t header b { color: var(--text); }
    & .cc-sub { font-size: 13px; color: var(--text-3); } }
  .cc-opt { display: grid; gap: 10px; } .cc-opt .presets { margin-top: 0; }
  .cc .rl { font: 500 12.5px var(--f-mono); color: var(--text-2); }
  .cc-fine { margin: 0; font-size: 13px; color: var(--text-3); }
  @media (max-width: 900px) { .cc-team, .cc-sides { grid-template-columns: 1fr; } .cc { padding: 20px; } .cc-side { padding: 18px; } }
}
