/* QuantumCat marketing site — "paper & glass".
   Two kinds of surface alternate down every page: warm PAPER sections carry
   the argument, and black CINEMA sections carry the product — the terminal
   bleeds edge to edge with no window chrome, because it is dark by nature and
   is the art. `.cinema` re-scopes every token, so the same components
   (buttons, cells, frames, forms) render correctly on either surface, and
   `[data-theme=dark]` turns paper into charcoal while cinema stays black.
   Type: Instrument Sans (UI), Instrument Serif italic (the display word),
   JetBrains Mono (every number, label and tool name). All self-hosted. */

@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/instrument-sans-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url(/fonts/instrument-sans-italic.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-italic.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/jetbrains-mono-normal.woff2) format("woff2"); }

/* ---------- tokens ---------- */
:root {
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
  /* three radii, no drift: --r-sm for anything inset in a card (fields, rows,
     chips), --r for a card, --r-lg for a panel */
  --r-sm: 10px;
  --r: 18px;
  --r-lg: 26px;
  color-scheme: light;

  --paper: #f4f2ec;
  --paper-2: #fcfbf8;
  --paper-3: #e9e6de;
  --ink: #0f1115;
  --ink-2: #565b66;
  --ink-3: #676b75;
  --line: rgba(15, 17, 21, 0.09);
  --line-2: rgba(15, 17, 21, 0.18);
  --accent: #1f3fe6;
  --accent-2: #1633c4;
  --accent-soft: rgba(31, 63, 230, 0.10);
  --accent-glow: rgba(31, 63, 230, 0.22);
  --on-accent: #ffffff;
  --btn: #0f1115;
  --on-btn: #ffffff;
  --up: #0a7f57;
  --down: #d7263d;
  --win: #07080b;
  --win-line: rgba(255, 255, 255, 0.12);
  --shadow-win: 0 50px 120px -40px rgba(15, 17, 21, 0.55), 0 16px 40px -20px rgba(15, 17, 21, 0.35);
  --grain-opacity: 0.045;
  --nav-bg: rgba(252, 251, 248, 0.78);
  --nav-fg: #0f1115;
  --nav-line: rgba(15, 17, 21, 0.09);
  /* a field has to read as a hole you can type into, not as the card it sits in */
  --field: #ffffff;
  /* one raised-surface recipe for every card-like box (see the .graphic group) */
  --lift: 0 1px 0 rgba(15, 17, 21, 0.04), 0 12px 32px -24px rgba(15, 17, 21, 0.25);
}

/* DARK IS NOT CINEMA. Cinema is black because the product is black; the dark
   THEME is charcoal paper, and it needs more separation than the light one:
   at #0e0f13 with 9% hairlines the cards, the frames and the page all merged. */
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #101218;
  --paper-2: #191c24;
  --paper-3: #0b0d12;
  --ink: #f2f3f6;
  --ink-2: #a3a7b2;
  --ink-3: #7b8090;
  --line: rgba(242, 243, 246, 0.12);
  --line-2: rgba(242, 243, 246, 0.24);
  --field: #23262f;
  --lift: 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 44px -28px rgba(0, 0, 0, 0.85);
  --accent: #8b9cff;
  --accent-2: #a5b2ff;
  --accent-soft: rgba(139, 156, 255, 0.14);
  --accent-glow: rgba(139, 156, 255, 0.22);
  --on-accent: #0a0c1a;
  --btn: #f2f3f6;
  --on-btn: #0f1115;
  --up: #2fcf8f;
  --down: #ff5c6c;
  --shadow-win: 0 50px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --grain-opacity: 0.06;
  --nav-bg: rgba(21, 23, 29, 0.72);
  --nav-fg: #f2f3f6;
  --nav-line: rgba(255, 255, 255, 0.09);
}

/* the black surfaces: same tokens, re-scoped, so every component just works */
.cinema {
  color-scheme: dark;
  --paper: #07080b;
  --paper-2: #0e1016;
  --paper-3: #04050a;
  --ink: #f2f3f6;
  --ink-2: #a0a5b1;
  --ink-3: #7b8090;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --accent: #8b9cff;
  --accent-2: #a5b2ff;
  --accent-soft: rgba(139, 156, 255, 0.14);
  --accent-glow: rgba(139, 156, 255, 0.26);
  --on-accent: #0a0c1a;
  --btn: #ffffff;
  --on-btn: #0f1115;
  --up: #2fcf8f;
  --down: #ff5c6c;
  --shadow-win: 0 60px 140px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --field: #14171f;
  --lift: 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 50px -30px rgba(0, 0, 0, 0.9);
  background: var(--paper);
  color: var(--ink);
}

/* Cards and product frames need a visible edge once the page itself is dark —
   a hairline of light, not a heavier border. */
[data-theme="dark"] .frame,
[data-theme="dark"] .tile {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), var(--shadow-win);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  background: var(--paper);
  scroll-behavior: smooth;
  overflow-x: clip; /* never `hidden`: it kills position:sticky on the stage */
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  font-feature-settings: "ss01", "cv11";
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: multiply;
}
[data-theme="dark"] body::before { mix-blend-mode: screen; }
main, header, footer { position: relative; z-index: 1; }

a { color: inherit; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: 84px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap.narrow { max-width: 920px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

kbd {
  font-family: var(--mono);
  font-size: 0.8em;
  padding: 1px 7px 2px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink);
}
code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--paper-3);
  color: var(--ink);
}

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow b, .eyebrow strong { color: var(--accent); font-weight: 500; }
.display {
  font-size: clamp(46px, 7.6vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-weight: 600;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(34px, 4.8vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.042em;
  font-weight: 600;
  text-wrap: balance;
}
.h3 { font-size: clamp(22px, 2.5vw, 32px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; }
/* the sans→serif splice: the italic's own side-bearing eats the word space, so
   it gets one back, and it no longer outgrows the roman it interrupts */
h1 em, h2 em, .display em, .h2 em, .h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.04em;
  letter-spacing: -0.02em;
  line-height: 0.9;
  margin-left: 0.06em;
}
.lede { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.48; color: var(--ink-2); letter-spacing: -0.012em; text-wrap: pretty; }
.lede strong { color: var(--ink); font-weight: 600; }
.body { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.body strong { color: var(--ink); font-weight: 600; }
.fine { font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.fine a { color: var(--ink-2); }
.k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.k b { color: var(--accent); font-weight: 500; }

/* ---------- nav: one floating glass pill ---------- */
.nav {
  position: fixed;
  top: 14px; left: 0; right: 0;
  z-index: 60;
  display: flex; justify-content: center;
  padding: 0 clamp(12px, 2vw, 24px);
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  position: relative;
  display: flex; align-items: center; gap: 4px;
  width: 100%; max-width: 1120px;
  height: 54px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  color: var(--nav-fg);
  background: var(--nav-bg);
  border: 1px solid var(--nav-line);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 12px 40px -18px rgba(15, 17, 21, 0.4);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), max-width 0.5s var(--ease);
}
.nav[data-tone="dark"] .nav-pill {
  --nav-bg: rgba(14, 16, 22, 0.66);
  --nav-fg: #f2f3f6;
  --nav-line: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px -14px rgba(0, 0, 0, 0.7);
}
.nav.scrolled .nav-pill { max-width: 980px; }
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .nav-pill { background: var(--paper); }
  .nav[data-tone="dark"] .nav-pill { background: #0e1016; }
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.02em;
  color: inherit;
}
.brand svg { color: var(--accent); }
.nav[data-tone="dark"] .brand svg { color: #8b9cff; }
.brand em { font-style: normal; opacity: 0.55; }
.nav-links { display: flex; gap: 2px; margin-left: 18px; }
.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  opacity: 0.68;
  padding: 7px 12px;
  border-radius: 999px;
  transition: opacity 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; background: color-mix(in srgb, currentColor 9%, transparent); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-cta .btn { --btn: var(--nav-fg); --on-btn: var(--nav-bg); padding: 9px 16px; font-size: 14px; }
.nav[data-tone="dark"] .nav-cta .btn { --btn: #ffffff; --on-btn: #0f1115; }
.nav:not([data-tone="dark"]) .nav-cta .btn { --on-btn: #ffffff; }
[data-theme="dark"] .nav:not([data-tone="dark"]) .nav-cta .btn { --on-btn: #0f1115; }
.theme-toggle, .nav-burger {
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  opacity: 0.8;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s var(--ease), opacity 0.15s var(--ease);
}
.theme-toggle:hover, .nav-burger:hover { opacity: 1; background: color-mix(in srgb, currentColor 9%, transparent); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav-burger { display: none; position: relative; }
.nav-burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; transition: transform 0.25s var(--ease), top 0.25s var(--ease); }
.nav-burger span:nth-child(1) { top: 14px; }
.nav-burger span:nth-child(2) { top: 22px; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { top: 18px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { top: 18px; transform: rotate(-45deg); }
.nav-sheet { display: none; }
.nav.open .nav-sheet {
  display: grid; gap: 2px;
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  padding: 8px 10px 12px;
  border-radius: 22px;
  color: var(--nav-fg);
  background: var(--nav-bg);
  border: 1px solid var(--nav-line);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}
.nav-sheet a { text-decoration: none; color: inherit; font-size: 17px; font-weight: 500; padding: 12px 12px; border-radius: var(--r-sm); }
.nav-sheet a:hover { background: color-mix(in srgb, currentColor 9%, transparent); }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.005em;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn);
  color: var(--on-btn);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.2s var(--ease), border-color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--btn) 70%, transparent); }
.btn:active { transform: translateY(0); }
.btn.lg { font-size: 16px; padding: 16px 28px; }
.btn.sm { font-size: 13.5px; padding: 8px 16px; font-weight: 500; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); box-shadow: none; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.btn.accent { background: var(--accent); color: var(--on-accent); }
.btn.accent:hover { background: var(--accent-2); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
/* every arrow on the site is the same drawn glyph — "↓"/"→" resolve to Apple
   Color Emoji and shipped a red arrow inside the hero's ghost button */
.arrow { display: inline-grid; place-items: center; }
/* NOT `.arrow.down`: `.down` is the market-colour utility, so the hero's
   arrow inherited --down and rendered red. */
.arrow-down svg { transform: rotate(90deg); }
.btn .arrow { opacity: 0.7; transition: transform 0.25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:hover .arrow-down { transform: translateY(3px); }

/* ---------- the hero: sticky stage, the product bleeding edge to edge ---------- */
.stage-wrap { position: relative; height: 210vh; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
}
.stage-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.stage-bg::before {
  content: "";
  position: absolute; left: 50%; top: -30vh; width: 120vw; height: 90vh; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(94, 118, 255, 0.22), rgba(94, 118, 255, 0.06) 45%, transparent 72%);
  filter: blur(20px);
}
.stage-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, rgba(7, 8, 11, 0.85) 92%, #07080b),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 96px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), #000 30%, #000);
}
.stage-copy {
  position: absolute;
  top: clamp(96px, 13vh, 150px);
  left: 0; right: 0;
  z-index: 3;
  text-align: center;
  padding: 0 var(--gutter);
  will-change: opacity, transform;
}
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 60%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: block; }
.chip.live i { background: #16c784; box-shadow: 0 0 0 3px rgba(22, 199, 132, 0.18); animation: livePulse 1.8s ease-in-out infinite; }
.stage-copy .display { max-width: 12ch; margin: 0 auto; font-size: clamp(44px, 7.4vw, 112px); }
.stage-copy .lede { max-width: 580px; margin: 26px auto 0; }
.cta-row { display: flex; gap: 12px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.stage-window {
  position: absolute;
  left: 0; right: 0;
  top: 84px;
  bottom: 176px;
  display: grid;
  place-items: center;
  z-index: 2;
  perspective: 1800px;
  perspective-origin: 50% 20%;
}
.win {
  position: relative;
  width: min(1480px, 94vw, calc((100vh - 240px) * 1.7778));
  border-radius: var(--r);
  overflow: hidden;
  background: var(--win);
  border: 1px solid var(--win-line);
  box-shadow: var(--shadow-win);
  transform-origin: 50% 60%;
  will-change: transform;
}
.win video, .win img { width: 100%; height: auto; }
.win-glow {
  position: absolute;
  left: 10%; right: 10%; bottom: 120px;
  height: 40%;
  z-index: 1;
  background: radial-gradient(closest-side, rgba(94, 118, 255, 0.45), rgba(45, 212, 191, 0.12) 50%, transparent);
  filter: blur(70px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
/* (the fake macOS title bar that used to live here was dropped when the frames
   went chrome-less — the product is the art, it doesn't get a window costume) */

.beats {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  /* height:176px clipped beat 2 the moment its title wrapped — the rail grows */
  min-height: 176px;
  z-index: 4;
  padding: 20px var(--gutter) 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.beats.on { opacity: 1; }
.beat-main { display: flex; gap: 22px; align-items: flex-start; }
.rail { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.rail li { width: 2px; height: 22px; border-radius: 2px; background: var(--line-2); transition: background 0.35s var(--ease), height 0.35s var(--ease); }
.rail li.on { background: var(--accent); height: 34px; }
.beat-copy { max-width: 620px; }
.beat-n { font-family: var(--mono); font-size: 11.5px; color: var(--accent); letter-spacing: 0.14em; margin-bottom: 8px; }
.beat-copy h2 { font-size: clamp(20px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; }
.beat-copy p { margin-top: 8px; color: var(--ink-2); font-size: clamp(14px, 1.25vw, 16px); line-height: 1.5; max-width: 56ch; }
.rec {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 6px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.rec i { width: 7px; height: 7px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.2); animation: livePulse 1.4s ease-in-out infinite; }
.scroll-hint {
  margin: 44px auto 0;
  display: grid; justify-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-3);
  transition: opacity 0.4s var(--ease);
}
.scroll-hint i { width: 1px; height: 26px; background: linear-gradient(180deg, var(--ink-3), transparent); animation: hint 2s var(--ease) infinite; }
@keyframes hint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* flat hero (phones + reduced motion): headline, then the product below it */
.flat .stage-wrap { height: auto; }
.flat .stage { position: relative; height: auto; overflow: visible; padding: 128px 0 40px; }
.flat .stage-copy { position: static; opacity: 1 !important; transform: none !important; }
.flat .stage-window { position: static; inset: auto; margin-top: 44px; perspective: none; }
.flat .win { width: min(94vw, 1200px); margin: 0 auto; transform: none !important; }
.flat .beats, .flat .scroll-hint, .flat .win-glow { display: none; }

/* ---------- the tape: a slow marquee of what the terminal does ---------- */
.tape {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.tape-track { display: flex; width: max-content; animation: tape 70s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape span {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 0 28px 0 0;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.tape span::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin-left: 14px; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- brokers strip ---------- */
.brokers {
  display: flex; align-items: center; justify-content: center; gap: 14px 30px; flex-wrap: wrap;
  padding: 22px var(--gutter) 0;
}
.brokers .eyebrow { margin-right: 8px; }
.brokers span:not(.eyebrow) { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brokers .soon { color: var(--ink-3); font-weight: 500; }
.brokers .soon::after { content: "soon"; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; margin-left: 6px; color: var(--ink-3); }

/* ---------- sections ---------- */
.section { padding: clamp(88px, 13vh, 170px) 0; position: relative; }
.section.tight { padding-top: clamp(56px, 8vh, 100px); }
.section.cinema { padding: clamp(96px, 14vh, 180px) 0; }
/* Two columns, not one 940px block stranded in a 1280 wrap: the number and the
   headline hold the left rail, the lede sits top-aligned in a measured right
   column. Stacks back to one column under 1100. */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  column-gap: clamp(28px, 4vw, 64px);
  row-gap: 20px;
  align-items: start;
  max-width: none;
}
.section-head > .idx { grid-column: 1; grid-row: 1; }
.section-head > .h2 { grid-column: 1; grid-row: 2; }
.section-head > .lede { grid-column: 2; grid-row: 1 / span 2; max-width: none; padding-top: 3px; }
.section-head .idx { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 12px; }
.section-head .idx::before { content: ""; width: 34px; height: 1px; background: var(--accent); opacity: 0.7; }
.section-head.center { grid-template-columns: minmax(0, 1fr); max-width: 940px; margin: 0 auto; text-align: center; }
.section-head.center > .idx, .section-head.center > .h2, .section-head.center > .lede { grid-column: 1; grid-row: auto; }
.section-head.center .idx { justify-content: center; }
.section-head.center .lede { max-width: 660px; margin: 0 auto; }

/* ---------- stats strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(64px, 9vh, 110px);
  border-top: 1px solid var(--line);
}
.stat { padding: 34px 28px 34px 0; border-bottom: 1px solid var(--line); }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(48px, 5.6vw, 84px); line-height: 0.95; letter-spacing: -0.05em; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 0.45em; letter-spacing: -0.02em; color: var(--accent); font-weight: 500; margin-left: 0.16em; vertical-align: 0.34em; }
.stat span { display: block; margin-top: 12px; font-size: 14px; color: var(--ink-2); line-height: 1.45; max-width: 26ch; }

/* ---------- bento: the engines at a glance ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 236px;
  gap: 12px;
  margin-top: clamp(48px, 7vh, 80px);
}
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--paper-2);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  isolation: isolate;
  transition: border-color 0.3s var(--ease), transform 0.5s var(--ease-out);
}
.tile:hover { border-color: var(--line-2); }
.tile.big { grid-column: span 4; grid-row: span 2; }
.tile.tall { grid-column: span 2; grid-row: span 2; }
.tile.wide { grid-column: span 3; }
.tile:not(.big):not(.tall):not(.wide) { grid-column: span 2; }
.tile .media { position: absolute; inset: 0; background: var(--win); }
.tile .media img, .tile .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--ox, 0%) var(--oy, 0%); transform: scale(var(--z, 1)); transform-origin: var(--ox, 0%) var(--oy, 0%); transition: transform 0.9s var(--ease-out); }
.tile .media video { opacity: 0; transition: opacity 0.5s var(--ease); }
.tile .media video.ready { opacity: 1; }
.tile:hover .media img, .tile:hover .media video { transform: scale(calc(var(--z, 1) * 1.03)); }
.tile.big { --ox: 50%; --oy: 0%; }
.tile::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(7, 8, 11, 0) 22%, rgba(7, 8, 11, 0.55) 58%, rgba(7, 8, 11, 0.92) 100%);
  pointer-events: none;
}
.tile .glow {
  position: absolute; inset: -1px; z-index: 2; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 156, 255, 0.16), transparent 60%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.tile:hover .glow { opacity: 1; }
.tile .t { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.tile .t b { display: block; font-size: 18px; letter-spacing: -0.025em; color: #f2f3f6; line-height: 1.15; }
.tile .t small { display: block; margin-top: 5px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(242, 243, 246, 0.8); }
.tile .t .go { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2); display: grid; place-items: center; color: #fff; background: rgba(7, 8, 11, 0.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background 0.25s var(--ease), transform 0.25s var(--ease-out); }
.tile:hover .t .go { background: #fff; color: #0f1115; transform: rotate(-45deg); }
.tile .idx { position: absolute; left: 14px; top: 14px; z-index: 3; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: rgba(242, 243, 246, 0.75); background: rgba(7, 8, 11, 0.55); border: 1px solid rgba(255, 255, 255, 0.1); padding: 3px 8px; border-radius: 999px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tile.big .t b { font-size: clamp(22px, 2.2vw, 30px); }

/* ---------- proof panels ----------
   Eight identical panels in a single trench read as a template, so they are
   grouped into bands and two of them (the chain, JARVIS) sit on full-bleed
   cinema — the page keeps its paper/cinema rhythm. */
.proofs { display: grid; gap: clamp(88px, 13vh, 170px); margin-top: clamp(72px, 10vh, 130px); }
.proof-band { position: relative; padding: clamp(72px, 10vh, 130px) 0; }
.proof-band .proofs { margin-top: 0; }
.proof { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; scroll-margin-top: 90px; }
.proof.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.proof.flip .proof-copy { order: 2; }
.proof-copy .idx { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.proof-copy .idx::before { content: ""; width: 28px; height: 1px; background: var(--accent); opacity: 0.7; }
.proof-copy .h2 { font-size: clamp(30px, 3.5vw, 50px); }
.proof-copy .lede { margin-top: 20px; font-size: clamp(16px, 1.3vw, 18px); }
.proof-copy ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.proof-copy li { position: relative; padding: 13px 0 13px 30px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.proof-copy li::before { content: "—"; position: absolute; left: 0; top: 13px; color: var(--accent); font-family: var(--mono); }
.proof-copy li strong { color: var(--ink); font-weight: 600; }
.proof-copy .more { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-weight: 600; font-size: 14.5px; color: var(--ink); text-decoration: none; }
.proof-copy .more .arrow { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease-out); }
.proof-copy .more:hover .arrow { background: var(--ink); color: var(--paper); transform: translateX(3px); }
.proof-media { display: grid; gap: 16px; min-width: 0; }

.frame {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--win);
  border: 1px solid var(--win-line);
  box-shadow: var(--shadow-win);
  isolation: isolate;
}
.frame::before {
  content: "";
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.frame .media { position: relative; aspect-ratio: 16 / 9; background: var(--win); }
.frame video, .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame video { opacity: 0; transition: opacity 0.5s var(--ease); }
.frame video.ready { opacity: 1; }
/* caption and duration ride one rail in the bottom-left corner and share one
   pill style — a frame used to carry three different overlay treatments */
.frame-meta { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); flex-wrap: wrap; }
.frame .cap, .dur-badge {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(232, 238, 248, 0.72);
  background: rgba(7, 8, 11, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 9px; border-radius: 999px;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.dur-badge { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.frame .cap i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #16c784; margin-right: 7px; vertical-align: 1px; animation: livePulse 1.6s ease-in-out infinite; }
.frame-wrap { position: relative; }
.frame-wrap::before {
  content: "";
  position: absolute; left: 8%; right: 8%; bottom: -8%; height: 60%; z-index: 0;
  background: radial-gradient(closest-side, var(--accent-glow), transparent);
  filter: blur(40px);
  opacity: 0.9;
  pointer-events: none;
}
.frame-wrap .frame { position: relative; z-index: 1; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* the play control on a panel: plays that engine's narrated chapter in place */
/* the site's own play affordance — the same white circle as .film-play, at 56px.
   (This used to be YouTube's 68×48 red badge, on eight panels.) */
.play-yt {
  position: absolute; left: 50%; top: 50%;
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  z-index: 4; border: 0; padding: 0;
  border-radius: 50%;
  background: #fff; color: #0f1115;
  display: grid; place-items: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out);
}
.play-yt svg { margin-left: 3px; }
.play-yt:hover { transform: scale(1.06); }
.frame.is-film .play-yt, .frame.is-film .frame-meta, .frame.is-film img { display: none; }
.frame.is-film video { opacity: 1; object-fit: contain; }

/* ---------- one raised surface, everywhere ----------
   Every card-like box lifts off the page the same way: paper-2 fill, the
   stronger hairline, and one soft shadow. Nothing was separating from the
   background before this. */
.graphic, .price, .ea-card, .card {
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--lift);
}

/* ---------- graphics beside the proofs ---------- */
.graphic {
  border-radius: var(--r);
  padding: 20px 22px 18px;
}
.graphic .gh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.graphic .gh .k { color: var(--ink-3); }
.graphic .gh-r { display: inline-flex; align-items: baseline; gap: 10px; }
.graphic .fine { margin-top: 12px; }

/* hysteresis: drag the score, watch the state hold */
.hyst-state { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease); }
.hyst-state[data-state="bullish"] { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, transparent); background: color-mix(in srgb, var(--up) 10%, transparent); }
.hyst-state[data-state="bearish"] { color: var(--down); border-color: color-mix(in srgb, var(--down) 45%, transparent); background: color-mix(in srgb, var(--down) 10%, transparent); }
.hyst-bar { position: relative; height: 44px; margin: 6px 0 4px; }
.hyst-bar .track { position: absolute; left: 0; right: 0; top: 20px; height: 4px; border-radius: 2px; background: var(--line-2); }
.hyst-bar .zone { position: absolute; top: 20px; height: 4px; border-radius: 2px; }
.hyst-bar .zone.bear { left: 0; width: 32.5%; background: color-mix(in srgb, var(--down) 55%, transparent); }
.hyst-bar .zone.bull { right: 0; width: 32.5%; background: color-mix(in srgb, var(--up) 55%, transparent); }
.hyst-bar .mark { position: absolute; top: 12px; width: 1px; height: 20px; background: var(--ink-3); }
.hyst-bar .mark::after { content: attr(data-l); position: absolute; top: 24px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--ink-3); white-space: nowrap; }
.hyst-bar input[type="range"] { position: absolute; left: 0; right: 0; top: 10px; width: 100%; height: 24px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: grab; }
.hyst-bar input[type="range"]:active { cursor: grabbing; }
.hyst-bar input[type="range"]::-webkit-slider-runnable-track { height: 24px; background: transparent; }
/* the handle is a signal, not a bullet hole: accent core, paper ring, accent halo */
.hyst-bar input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--accent); border: 3px solid var(--paper-2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 10px rgba(0, 0, 0, 0.28); }
.hyst-bar input[type="range"]::-moz-range-track { height: 24px; background: transparent; }
.hyst-bar input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--paper-2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 10px rgba(0, 0, 0, 0.28); }
.hyst-val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink); min-width: 4ch; text-align: right; }
.hyst-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 22px; }
/* the marks are bare numbers now; enter/exit is explained once, here */
.hyst-note { text-align: center; color: var(--ink-2); letter-spacing: 0.08em; }

/* JARVIS: a wall of the real tool names */
.toolwall { position: relative; display: flex; flex-wrap: wrap; gap: 6px; max-height: 176px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.toolwall span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--ink-2); padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.toolwall span.hot { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.toolwall-more { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.toolwall-more b { color: var(--ink); font-weight: 500; }

/* bots: one tree, three surfaces, same verdict */
.ruleflow { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr); gap: 14px; align-items: center; }
.xray { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); overflow: hidden; font-family: var(--mono); font-size: 11.5px; }
.xray .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n s" "v s"; column-gap: 12px; row-gap: 2px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.xray .row b { grid-area: n; }
.xray .row .v { grid-area: v; }
.xray .row .st { grid-area: s; }
.xray .row:last-child { border-bottom: 0; }
.xray .row b { color: var(--ink); font-weight: 500; }
.xray .v { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.xray .st { font-size: 9.5px; letter-spacing: 0.12em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); }
.xray .st.t { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, transparent); }
.xray .st.e { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.xray .st.u { color: var(--ink-3); border-style: dashed; }
.xray .verdict { padding: 10px 12px; background: var(--paper-3); color: var(--ink); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.xray .verdict i { font-style: normal; color: var(--ink-3); }
.rf-arrow { display: grid; gap: 4px; justify-items: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.rf-arrow svg { width: 44px; height: 14px; color: var(--ink-3); }
.rf-out { display: grid; gap: 8px; }
.rf-out div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
/* "same verdict" is agreement, not a green P&L — cobalt, like every other signal */
.rf-out div span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 500; }

/* ---------- discipline split ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-top: clamp(48px, 7vh, 80px); }

/* ---------- cells (three-up) ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(44px, 6vh, 72px); border-top: 1px solid var(--line); }
.grid3 + .grid3 { margin-top: 0; }
.cell { padding: 30px 30px 34px 0; border-bottom: 1px solid var(--line); }
.cell + .cell { padding-left: 30px; border-left: 1px solid var(--line); }
.cell .k { display: block; margin-bottom: 16px; }
.cell h3 { font-size: 19px; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 10px; font-weight: 600; }
.cell p { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.cell p strong { color: var(--ink); font-weight: 600; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(44px, 6vh, 72px); border-top: 1px solid var(--line); }
.step { padding: 30px 30px 34px 0; position: relative; }
.step + .step { padding-left: 30px; border-left: 1px solid var(--line); }
.step i { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.14em; }
.step h3 { margin: 14px 0 10px; font-size: 19px; letter-spacing: -0.02em; line-height: 1.2; font-weight: 600; }
.step p { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }

/* ---------- the architecture: what's in the trade path, and what isn't ---------- */
.arch { position: relative; margin-top: clamp(48px, 7vh, 80px); padding-top: 150px; }
.arch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.node { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper-2); padding: 22px 22px 20px; display: grid; gap: 6px; align-content: start; }
.node small { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.node b { font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -0.025em; line-height: 1.15; text-wrap: balance; }
.node span { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.node.you { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.node.you small { color: var(--accent); }
/* One drawn connector, not dotted wireframe furniture: a 1.5px solid rule with
   a real arrowhead, and the label on a paper plate resting on it. The line
   stretches (preserveAspectRatio:none + non-scaling-stroke keeps it 1.5px);
   the head is its own fixed-size svg so it never smears. */
.link { position: relative; display: grid; align-content: center; justify-items: center; gap: 0; min-width: 130px; padding: 0 6px; }
.link .wire { position: relative; display: block; width: 100%; height: 10px; color: var(--line-2); }
/* an <svg> is a replaced element: left+right+width:auto collapses it to its
   intrinsic 10px, so the span is set explicitly */
.link .wire-line { position: absolute; left: 0; top: 4px; width: calc(100% - 8px); max-width: none; height: 2px; }
.link .wire-head { position: absolute; right: 0; top: 0; }
.link .plate {
  margin-top: 7px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); text-align: center; line-height: 1.45;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 5px 9px;
}
.node.none {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: min(360px, 90%);
  border-style: dashed; border-color: var(--line-2); background: transparent;
  box-shadow: none;
  text-align: center;
  padding: 14px 18px 12px;
}
/* red is reserved for a market number that went down — an absence is grey */
.node.none b { font-size: 16px; text-decoration: line-through; text-decoration-color: var(--ink-3); text-decoration-thickness: 1.5px; color: var(--ink-2); }
.node.none span { font-size: 12.5px; }
.node.none .tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 9px; justify-self: center; margin: 2px 0 4px; }
.node.none::before { content: ""; position: absolute; left: 50%; bottom: -32px; width: 1px; height: 32px; background: var(--line-2); }
.node.none::after { content: "×"; position: absolute; left: 50%; bottom: -44px; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line-2); color: var(--ink-3); font-size: 13px; font-weight: 500; line-height: 1; }

/* ---------- compare ---------- */
.compare { width: 100%; border-collapse: collapse; margin-top: clamp(44px, 6vh, 72px); font-size: 15px; }
.compare th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding: 0 16px 14px; border-bottom: 1px solid var(--line-2); }
.compare th:first-child { padding-left: 0; }
.compare th.qc { color: var(--ink); }
.compare td { padding: 15px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.compare td:first-child { padding-left: 0; color: var(--ink); font-weight: 500; letter-spacing: -0.01em; }
.compare td:first-child small { display: block; font-weight: 400; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
/* the marks are a glyph in a narrow centred column — a word plus a dot left a
   300px void beside it, and the phone rule hid the word entirely (font-size:0) */
.compare td.y, .compare td.n { width: 16%; text-align: center; font-size: 17px; line-height: 1; }
.compare td.y { color: var(--accent); }
.compare td.n { color: var(--ink-3); }
/* the column the page is actually about gets a tint */
.compare th.qc, .compare tbody td:nth-child(3) { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.compare th.qc { color: var(--ink); }
.compare th:nth-child(2), .compare th:nth-child(3) { text-align: center; }
.compare .th-short { display: none; }
.compare tbody tr:hover td { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.compare tbody tr:hover td:nth-child(3) { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.compare tr.group td { padding-top: 34px; border-bottom: 1px solid var(--line-2); font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 500; }

/* ---------- the film: one stage, a chapter list ---------- */
.film { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; margin-top: clamp(28px, 4vh, 44px); }
.film--single { grid-template-columns: minmax(0, 1fr); }
/* two or three chapters can't fill a sidebar — full-width player, chapters as
   a row of pills under it */
.film--wide { grid-template-columns: minmax(0, 1fr); }
.film--wide .film-chapters { display: flex; flex-wrap: wrap; gap: 8px; border-top: 0; max-height: none; margin-top: 14px; overflow: visible; }
.film--wide .film-chapters li { border-bottom: 0; }
.film--wide .film-chapters button { width: auto; grid-template-columns: auto auto auto; gap: 9px; padding: 8px 15px; border: 1px solid var(--line-2); border-radius: 999px; align-items: baseline; }
.film--wide .film-chapters button[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.film--wide .film-chapters .t { font-size: 14px; }
.film-stage .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--win); opacity: 1; }
.film-play { position: absolute; left: 50%; top: 50%; width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; border: 0; cursor: pointer; z-index: 3;
  background: #fff; color: #0f1115; display: grid; place-items: center; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); transition: transform 0.25s var(--ease-out); }
.film-play:hover { transform: scale(1.06); }
.film-play svg { margin-left: 4px; }
.film.is-playing .film-play { display: none; }
.film-title { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin: 14px 4px 0; font-size: 14px; color: var(--ink); }
.film-title span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.film-chapters { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-height: 560px; overflow: auto; }
.film-chapters li { border-bottom: 1px solid var(--line); }
.film-chapters button { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 10px 12px 6px; background: none; border: 0; text-align: left;
  font: inherit; color: var(--ink); cursor: pointer; border-radius: var(--r-sm); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.film-chapters button:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.film-chapters button[aria-current="true"] { color: var(--accent); }
.film-chapters button[aria-current="true"] .n { color: var(--accent); }
.film-chapters .n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; }
.film-chapters .t { font-size: 15px; line-height: 1.3; }
.film-chapters .d { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.doc .film { margin: 24px 0 34px; }
/* .doc ol/ul indents lists; the chapter list is not prose */
.doc .film-chapters { padding-left: 0; }

/* ---------- early access ---------- */
.ea-card {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4.5vw, 64px);
  position: relative;
  overflow: hidden;
}
.ea-card::before {
  content: "";
  position: absolute; right: -20%; top: -40%; width: 60%; height: 120%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  pointer-events: none;
}
.ea-card > * { position: relative; }
.ea-card .lede { margin-top: 18px; }
.ea-card .fine { margin-top: 22px; }
.ea form { display: grid; gap: 14px; }
.ea .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ea label, .acct label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.ea input, .ea select, .acct input {
  width: 100%; padding: 14px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  /* a resting fill distinct from the card it sits in, in every theme — dark
     fields used to be holes cut out of the card */
  background: var(--field);
  color: var(--ink);
  font: inherit; font-size: 15px;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.ea input::placeholder, .acct input::placeholder { color: var(--ink-3); }
.ea input:focus, .ea select:focus, .acct input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* a stroked chevron, not a filled triangle in a hardcoded grey */
.ea select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a8e98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
[data-theme="dark"] .ea select, .cinema .ea select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236d717c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.ea select option { background: var(--paper-2); color: var(--ink); }
/* the submit is a button, not a full-width black slab; the status sits beside it */
.ea-submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.ea button[type="submit"] { width: auto; justify-self: start; padding: 14px 28px; }
.ea-msg { min-height: 18px; font-size: 14px; color: var(--ink-2); }
.ea-msg.ea-err { color: var(--down); }
.ea-done { text-align: center; padding: 20px 0; }
.ea-done .tick { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; font-size: 20px; }
.ea-done h3 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 6px; }
.ea-done p { color: var(--ink-2); font-size: 15px; }

/* ---------- pricing ----------
   One hot card and a slim note. The second card used to be a full-size box
   containing the word "Soon" — a void the same size as the offer. */
.price-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(16px, 2.5vw, 32px); margin-top: clamp(40px, 6vh, 64px); max-width: 900px; align-items: start; }
.price {
  border-radius: var(--r-lg);
  padding: 52px 32px 30px;
  display: flex; flex-direction: column;
  position: relative;
}
.price.hot { border-color: var(--ink); }
.price.hot::before { content: "Now"; position: absolute; top: 20px; left: 24px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; background: var(--ink); color: var(--paper); padding: 4px 10px; border-radius: 999px; }
.price .k { display: block; }
.price .amt { font-size: 44px; font-weight: 600; letter-spacing: -0.045em; margin: 14px 0 2px; line-height: 1; }
.price .amt small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); margin-left: 8px; }
.price ul { list-style: none; padding: 0; margin: 20px 0 28px; }
.price li { position: relative; padding: 9px 0 9px 26px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
/* one marker system on the whole site: the em dash the proof lists use */
.price li::before { content: "—"; position: absolute; left: 0; top: 9px; color: var(--accent); font-family: var(--mono); font-size: 13px; }
.price .btn { margin-top: auto; }
.price-note { background: transparent; box-shadow: none; border: 0; border-left: 1px solid var(--line-2); border-radius: 0; padding: 10px 0 10px 26px; margin-top: 12px; }
.price-note p { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; margin-top: 12px; }
.price-note .fine { margin-top: 14px; }
.price-note a { color: var(--ink); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.price-note a:hover { color: var(--accent); }

/* ---------- faq ----------
   Head on the left, questions on the right: in one 860px column the "+" floated
   an inch and a half away from a five-word question. */
.faq-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); column-gap: clamp(32px, 5vw, 72px); row-gap: 24px; align-items: start; }
.faq-layout > .section-head { grid-template-columns: minmax(0, 1fr); }
.faq-layout > .section-head > .idx, .faq-layout > .section-head > .h2, .faq-layout > .section-head > .lede { grid-column: 1; grid-row: auto; }
.faq-layout > .section-head .h2 { font-size: clamp(30px, 3.4vw, 46px); }
.faq-layout .faq { margin-top: 0; max-width: none; }
.faq { max-width: 860px; margin-top: clamp(28px, 4vh, 40px); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 22px 0;
  font-weight: 600; font-size: 17.5px; letter-spacing: -0.015em;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-weight: 400; font-size: 22px; color: var(--ink-2); transition: transform 0.25s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p { padding: 0 0 24px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; max-width: 70ch; }
.faq details p a { color: var(--accent); text-decoration: none; }
.faq details p a:hover { text-decoration: underline; }

/* ---------- final cta ---------- */
.final { position: relative; text-align: center; padding: clamp(120px, 18vh, 220px) var(--gutter) clamp(110px, 16vh, 200px); overflow: hidden; }
.final .display { font-size: clamp(40px, 6.6vw, 100px); position: relative; }
.final .cta-row { margin-top: 38px; position: relative; }
.final .fine { margin-top: 22px; position: relative; }
.final-bg { position: absolute; inset: 0; pointer-events: none; }
.final-bg::before { content: ""; position: absolute; left: 50%; bottom: -40%; width: 90vw; height: 80%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(94, 118, 255, 0.28), transparent 70%); filter: blur(30px); }
.final-bg img { position: absolute; left: 50%; bottom: -34%; width: min(1100px, 92vw); transform: translateX(-50%) perspective(1400px) rotateX(38deg); opacity: 0.22; border-radius: 14px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%); }

/* ---------- footer ---------- */
footer { padding: 0 0 36px; }
.foot-word { overflow: hidden; padding: clamp(24px, 4vh, 48px) 0 0; border-top: 1px solid var(--line); container-type: inline-size; }
/* 19.3cqw overflowed its own container and clipped the wordmark to "QuantumCa";
   17.6cqw fits at every width (verified against scrollWidth at 1280/1440/1920). */
.foot-word span { display: block; font-size: clamp(60px, 15vw, 218px); font-size: 17.6cqw; line-height: 0.82; letter-spacing: -0.06em; font-weight: 600; color: var(--ink); opacity: 0.12; white-space: nowrap; transform: translateY(0.1em); user-select: none; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; padding-top: clamp(36px, 6vh, 64px); }
.foot-brand p { margin-top: 14px; font-size: 14px; color: var(--ink-2); max-width: 30ch; line-height: 1.5; }
.foot-col .foot-h { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.foot-col a { display: block; text-decoration: none; font-size: 14px; color: var(--ink-2); padding: 4px 0; transition: color 0.15s var(--ease); }
.foot-col a:hover { color: var(--ink); }
.legal { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.7; color: var(--ink-3); max-width: 980px; }
.foot-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- page hero (sub-pages, on paper) ---------- */
.page-hero { padding: clamp(136px, 18vh, 200px) 0 0; }
.page-hero .eyebrow { margin-bottom: 20px; }
.page-hero .display { font-size: clamp(38px, 5.8vw, 84px); max-width: 16ch; }
.page-hero .lede { max-width: 660px; margin-top: 24px; }
.page-hero .cta-row { justify-content: flex-start; margin-top: 30px; }
.page-hero .frame-wrap { margin-top: clamp(44px, 7vh, 72px); }
.crumbs { display: flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 24px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { opacity: 0.6; }

/* feature hero: black, the engine bleeding out of the bottom edge */
.fhero { padding: clamp(136px, 18vh, 200px) 0 0; position: relative; overflow: hidden; }
.fhero .stage-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.fhero .wrap { position: relative; z-index: 1; }
.fhero .display { font-size: clamp(38px, 5.6vw, 84px); max-width: 18ch; }
.fhero .lede { max-width: 700px; margin-top: 24px; }
.fhero .eyebrow { margin-bottom: 20px; }
.fhero .crumbs { color: var(--ink-3); }
.fhero .cta-row { justify-content: flex-start; margin-top: 30px; }
.fhero .frame-wrap { margin-top: clamp(44px, 7vh, 72px); margin-bottom: -64px; }
.fhero .frame-wrap::before { display: none; }
.fhero .frame { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; box-shadow: 0 -30px 120px -20px rgba(94, 118, 255, 0.28), var(--shadow-win); }
.fhero .frame .media { aspect-ratio: 16 / 8.4; }
.fhero .fine { margin-top: 18px; }

/* ---------- doc pages (feature deep-dives) ---------- */
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; padding-top: clamp(56px, 8vh, 96px); }
.toc { position: sticky; top: 92px; display: grid; gap: 6px; }
.toc .k { display: block; margin-bottom: 10px; }
.toc a { display: block; text-decoration: none; font-size: 13.5px; color: var(--ink-3); padding: 4px 0 4px 14px; border-left: 1px solid var(--line); line-height: 1.4; transition: color 0.15s var(--ease), border-color 0.15s var(--ease); }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.toc .toc-back { margin-top: 18px; padding-left: 0; border-left: 0; font-weight: 600; color: var(--ink-2); }
.doc > h2, .doc > h3, .doc > p, .doc > ul, .doc > ol, .doc > table, .doc > .trail-card, .doc > .honest { max-width: 820px; }
.doc h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.032em; line-height: 1.1; margin: 64px 0 16px; padding-top: 26px; border-top: 1px solid var(--line); font-weight: 600; scroll-margin-top: 96px; }
.doc > h2:first-child, .doc > .film + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { font-size: 19px; letter-spacing: -0.02em; margin: 28px 0 8px; font-weight: 600; }
.doc p { color: var(--ink-2); margin: 10px 0; max-width: 72ch; line-height: 1.66; font-size: 16px; }
.doc p strong, .doc li strong { color: var(--ink); font-weight: 600; }
.doc ul, .doc ol { color: var(--ink-2); padding-left: 22px; margin: 12px 0; }
.doc li { margin: 8px 0; max-width: 70ch; line-height: 1.6; }
.doc a { color: var(--accent); text-decoration: none; }
.doc a:hover { text-decoration: underline; }
.doc .why { border-left: 2px solid var(--accent); padding: 4px 0 4px 14px; margin: 12px 0; }
.doc .why b { color: var(--ink); }
.trail-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-2); padding: 20px 22px; margin: 16px 0; }
.trail-card h3 { margin: 0 0 8px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.trail-card h3 .tag { font-family: var(--mono); font-size: 11.5px; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; letter-spacing: 0.06em; }
.trail-card p:last-child { margin-bottom: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 16px 0; }
.doc th { text-align: left; font-family: var(--mono); color: var(--ink-3); font-weight: 500; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.doc td { padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; line-height: 1.55; }
.doc td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.honest { border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--r); padding: 18px 22px; margin: 28px 0; background: var(--paper-2); }
.honest h3 { margin: 0 0 6px; }
.honest p { margin: 6px 0; }
.doc .frame-wrap { margin: 18px 0 8px; }
.doc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc-nav a { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; transition: border-color 0.15s var(--ease), color 0.15s var(--ease); }
.doc-nav a:hover, .doc-nav a[aria-current="page"] { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.pager a { text-decoration: none; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; display: grid; gap: 6px; background: var(--paper-2); transition: border-color 0.2s var(--ease), transform 0.3s var(--ease-out); }
.pager a:hover { border-color: var(--ink); transform: translateY(-2px); }
.pager a.next { text-align: right; }
.pager small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.pager b { font-size: 17px; letter-spacing: -0.02em; color: var(--ink); }

/* ---------- features hub ---------- */
.hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: clamp(44px, 6vh, 72px); }
.hub a {
  position: relative;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper-2);
  overflow: hidden;
  display: grid; grid-template-rows: auto 1fr;
  transition: transform 0.4s var(--ease-out), border-color 0.25s var(--ease), box-shadow 0.4s var(--ease-out);
}
.hub a:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 30px 60px -36px rgba(15, 17, 21, 0.5); }
.hub .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--win); overflow: hidden; border-bottom: 1px solid var(--line); }
/* same framing contract as .tile: --ox/--oy is the anchor, --z the zoom, set
   per card in site/pages/features.mjs so a thumb shows one readable element
   rather than the whole terminal at a quarter size */
.hub .thumb img, .hub .thumb video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--ox, 50%) var(--oy, 0%);
  transform: scale(var(--z, 1)); transform-origin: var(--ox, 50%) var(--oy, 0%);
  transition: transform 0.8s var(--ease-out);
}
.hub .thumb video { opacity: 0; transition: opacity 0.4s var(--ease); }
.hub a:hover .thumb video.ready { opacity: 1; }
.hub a:hover .thumb img, .hub a:hover .thumb video { transform: scale(calc(var(--z, 1) * 1.03)); }
.hub .t { padding: 18px 20px 22px; }
.hub .t small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.hub .t b { display: block; font-size: 18px; letter-spacing: -0.02em; margin: 8px 0 6px; color: var(--ink); }
.hub .t span { font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* ---------- setup guide ---------- */
/* auto-fit, not a fixed 3: the fourth broker card (Groww) landed alone on a
   second row, stretched to the full width. This wraps 4 → 2 → 1 instead. */
.pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 14px; margin-top: clamp(40px, 6vh, 64px); }
.pick a { text-decoration: none; border: 1px solid var(--line); border-radius: var(--r); padding: 24px 26px; background: var(--paper-2); transition: border-color 0.2s var(--ease), transform 0.3s var(--ease-out); display: grid; gap: 6px; }
.pick a:hover { border-color: var(--ink); transform: translateY(-3px); }
.pick a small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.pick a b { font-size: 22px; letter-spacing: -0.025em; color: var(--ink); }
.pick a p { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.pick a .go { color: var(--ink); font-size: 13.5px; font-weight: 600; margin-top: 8px; }
/* The sub-nav docks as a second bar directly under the nav pill: same padding,
   same max width, same glass. It used to float at its own width and its own
   offset, and every target it linked to landed under both bars. */
.subnav { position: sticky; top: 76px; z-index: 40; display: flex; justify-content: center; padding: 0 clamp(12px, 2vw, 24px); pointer-events: none; margin-top: clamp(40px, 6vh, 64px); }
.subnav div { pointer-events: auto; display: flex; justify-content: center; gap: 2px; padding: 5px; width: 100%; max-width: 980px; border-radius: 999px; background: color-mix(in srgb, var(--paper-2) 88%, transparent); border: 1px solid var(--line); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); box-shadow: 0 12px 40px -22px rgba(15, 17, 21, 0.4); overflow: auto; }
/* every anchor on the setup page has to clear the nav pill AND the sub-nav */
.setup-page [id] { scroll-margin-top: 150px; }
.subnav a { text-decoration: none; font-size: 13.5px; font-weight: 500; color: var(--ink-2); padding: 7px 14px; border-radius: 999px; white-space: nowrap; transition: background 0.15s var(--ease), color 0.15s var(--ease); }
.subnav a:hover, .subnav a[aria-current="true"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.vsteps { list-style: none; padding: 0; margin: clamp(30px, 4vh, 44px) 0 0; counter-reset: sv; max-width: 780px; }
.vsteps > li { position: relative; padding: 0 0 36px 44px; border-left: 1px solid var(--line-2); margin-left: 16px; }
.vsteps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.vsteps > li::before { counter-increment: sv; content: counter(sv, decimal-leading-zero); position: absolute; left: -17px; top: -2px; width: 34px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--paper); color: var(--accent); font-family: var(--mono); font-size: 11.5px; font-weight: 500; border: 1px solid var(--line-2); letter-spacing: 0.05em; }
.vsteps h3 { font-size: 20px; letter-spacing: -0.022em; margin: 0 0 8px; font-weight: 600; }
.vsteps p { font-size: 15px; color: var(--ink-2); margin: 0 0 10px; line-height: 1.6; max-width: 66ch; }
.vsteps p strong { color: var(--ink); font-weight: 600; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: var(--paper-2); padding: 12px 16px; margin: 10px 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.6; max-width: 66ch; }
.note b { color: var(--ink); }
.opt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-right: 8px; }
.setup-sec { padding-top: clamp(72px, 10vh, 130px); scroll-margin-top: 150px; }
.setup-sec .h2 { font-size: clamp(30px, 4vw, 54px); }
.setup-sec .lede { max-width: 660px; margin-top: 18px; }

/* ---------- small cards (download, account) ---------- */
.card { border-radius: var(--r-lg); padding: 30px 30px 28px; }
.card h2, .card h1 { font-size: 22px; letter-spacing: -0.022em; margin: 0 0 6px; font-weight: 600; }
.card .sub { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; margin-bottom: 18px; }
.dl-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(40px, 6vh, 64px); }
.dl-os { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; letter-spacing: -0.022em; }
.dl-os svg { width: 22px; height: 22px; }
.dl-ver { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin: 8px 0 18px; }
.dl-steps { margin: 18px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.dl-note { margin-top: 28px; font-size: 14px; color: var(--ink-2); line-height: 1.65; max-width: 70ch; }
.dl-err { display: none; margin-top: 16px; color: var(--down); font-size: 14.5px; }
.dl-err a { color: inherit; }
/* the "Intel Mac build" link is a small ghost button under the primary one, not
   raw mono underline. The download script reveals it with an inline
   `display:inline`; that is the only signal we have, so the pill layout is
   restored the moment it appears. */
.dl-alt { margin: 12px 0 0; min-height: 0; }
#mac-alt[style*="inline"] { display: inline-flex !important; }

.acct { max-width: 480px; margin: 0 auto; padding-top: clamp(130px, 18vh, 180px); }
.acct form { display: grid; gap: 14px; }
.acct .btn { width: auto; justify-self: start; }
.acct .acct-actions .btn { justify-self: stretch; }
.acct-msg { min-height: 18px; font-size: 13.5px; color: var(--ink-2); }
.acct-msg.err { color: var(--down); }
.acct-links { display: flex; justify-content: flex-start; gap: 18px; margin-top: 2px; flex-wrap: wrap; }
.acct-links button { background: none; border: none; color: var(--accent); font-size: 13.5px; cursor: pointer; padding: 2px; }
.acct-links button.dim2 { color: var(--ink-3); }
.plan-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.plan-row .k { color: var(--ink-2); font-family: inherit; font-size: inherit; letter-spacing: 0; text-transform: none; }
.plan-row .v { font-weight: 600; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.on { background: rgba(14, 159, 110, 0.14); color: var(--up); }
.pill.off { background: rgba(215, 38, 61, 0.12); color: var(--down); }
.acct-actions { display: grid; gap: 10px; margin-top: 18px; }
.divider { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.foot-note { font-size: 13px; color: var(--ink-3); text-align: center; margin-top: 16px; line-height: 1.6; }
.foot-note a { color: var(--ink-2); }

/* ---------- reveal + motion ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
[data-stagger] > * { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
[data-stagger].in > * { opacity: 1; transform: none; }
[data-stagger].in > :nth-child(2) { transition-delay: 0.07s; }
[data-stagger].in > :nth-child(3) { transition-delay: 0.14s; }
[data-stagger].in > :nth-child(4) { transition-delay: 0.21s; }
[data-stagger].in > :nth-child(5) { transition-delay: 0.28s; }
[data-stagger].in > :nth-child(6) { transition-delay: 0.35s; }
[data-stagger].in > :nth-child(7) { transition-delay: 0.42s; }
[data-stagger].in > :nth-child(8) { transition-delay: 0.49s; }
[data-stagger].in > :nth-child(n + 9) { transition-delay: 0.56s; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .section-head { grid-template-columns: minmax(0, 1fr); max-width: 940px; }
  .section-head > .idx, .section-head > .h2, .section-head > .lede { grid-column: 1; grid-row: auto; }
  .section-head > .lede { max-width: 660px; padding-top: 0; }
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .ruleflow { grid-template-columns: 1fr; }
  .rf-arrow svg { transform: rotate(90deg); }
  .rf-out { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .hub { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; }
  .tile.big { grid-column: span 4; }
  .tile.tall { grid-column: span 2; grid-row: span 1; }
  /* half of a four-column row, so a pair of wides still closes it */
  .tile.wide { grid-column: span 2; }
  .doc-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav { top: 10px; }
  .nav-pill { height: 50px; padding-left: 14px; }
  .nav-burger { display: block; }
  .nav-cta .btn { padding: 8px 13px; font-size: 13.5px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 24px 0; }
  .stat + .stat { padding-left: 0; border-left: none; }
  .stat:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--line); }
  .proof, .proof.flip { grid-template-columns: minmax(0, 1fr); }
  .proof > *, .proof .frame-wrap, .proof .graphic { min-width: 0; max-width: 100%; }
  .proof.flip .proof-copy { order: 0; }
  .proof .proof-media { display: contents; }
  .proof .frame-wrap { order: -1; }
  .proof .graphic { order: 1; }
  .grid3, .steps, .price-row, .dl-cards, .split { grid-template-columns: 1fr; }
  .pick { grid-template-columns: 1fr 1fr; }
  .cell, .step { padding: 22px 0; }
  .cell + .cell, .step + .step { padding-left: 0; border-left: none; }
  .ea-card { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .pager { grid-template-columns: 1fr; }
  .doc td:first-child { white-space: normal; }
  .ea .row2 { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; gap: 10px; }
  .tile.big { grid-column: span 2; grid-row: span 1; }
  .tile.tall, .tile.wide, .tile:not(.big):not(.tall):not(.wide) { grid-column: span 1; grid-row: span 1; }
  .tile .t b { font-size: 16px; }
  .tile.big .t b { font-size: 20px; }
  .arch { padding-top: 0; }
  .arch-row { grid-template-columns: 1fr; }
  .link { min-width: 0; padding: 6px 0; }
  .link i { width: 1px; height: 34px; margin: 0 auto; background: repeating-linear-gradient(180deg, var(--ink-3) 0 6px, transparent 6px 12px); }
  .link i::after { right: -4px; top: auto; bottom: -1px; border: 4.5px solid transparent; border-top: 7px solid var(--ink-3); }
  .node.none { position: static; transform: none; width: 100%; margin-bottom: 14px; }
  .node.none::after { display: none; }
  .ruleflow { grid-template-columns: 1fr; }
  .rf-arrow svg { transform: rotate(90deg); }
  /* the glyph stays legible on a phone — this used to be font-size:0, which left
     two anonymous marks under three-line headers */
  .compare td.y, .compare td.n { width: 19%; font-size: 15px; padding: 13px 6px; }
  .compare th { font-size: 9.5px; letter-spacing: 0.1em; white-space: nowrap; padding: 0 6px 12px; }
  .compare th:first-child { padding-left: 0; }
  .compare .th-long { display: none; }
  .compare .th-short { display: inline; }
  .compare td { padding: 13px 6px; }
  .compare td:first-child { padding-left: 0; }
  .price-note { border-left: 0; border-top: 1px solid var(--line-2); padding: 20px 0 0; margin-top: 0; }
  .final-bg img { display: none; }
  /* the hero goes flat: no scroll-jacking on a touch device */
  .stage-wrap { height: auto; }
  .stage { position: relative; height: auto; overflow: visible; padding: 118px 0 36px; }
  .stage-copy { position: static; opacity: 1 !important; transform: none !important; }
  .stage-window { position: static; inset: auto; margin-top: 40px; perspective: none; }
  /* a phone showing 94vw of the whole terminal shows nothing: crop to the
     ticket instead, so the hero is a legible detail, not a thumbnail */
  .win { width: min(94vw, 520px); margin: 0 auto; transform: none !important; }
  .win video, .win img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: right center; }
  .beats, .scroll-hint, .win-glow { display: none; }
  .stage-bg::after { background: linear-gradient(180deg, transparent 70%, #07080b); }
  /* the pill is over the product here — once scrolled it stops ghosting */
  .nav.scrolled:not([data-tone="dark"]) .nav-pill { --nav-bg: var(--paper-2); }
  .nav.scrolled[data-tone="dark"] .nav-pill { --nav-bg: #0e1016; }
}
@media (max-width: 560px) {
  .pick { grid-template-columns: 1fr; }
  .hyst-bar .mark::after { display: none; }
  /* one chip, the one that carries the honesty claim */
  .chips .chip:not(.live) { display: none; }
  .stage-copy .cta-row { flex-direction: column; align-items: center; }
  .stage-copy .cta-row .btn { width: min(100%, 320px); }
  .tile .t small { display: none; }
  .hyst-note { display: none; }
  .hub { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .display { font-size: clamp(38px, 11.5vw, 54px); }
  .stage-copy .display { font-size: clamp(40px, 12vw, 56px); }
  .bento { grid-template-columns: 1fr; grid-auto-rows: 190px; }
  .tile.big, .tile.tall, .tile.wide, .tile:not(.big):not(.tall):not(.wide) { grid-column: span 1; }
  .stats { grid-template-columns: 1fr; }
  .stat:nth-child(2n) { padding-left: 0; border-left: none; }
  .subnav { top: 64px; }
  .subnav div { -webkit-overflow-scrolling: touch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, [data-stagger] > * { opacity: 1; transform: none; transition: none; }
  .rail li, .beats, .hub a, .hub .thumb img, .tile .media img, .tile .media video { transition: none; }
  .frame .cap i, .chip.live i, .rec i, .scroll-hint i { animation: none; }
  .tape-track { animation: none; }
}

/* phones: a product frame at 350px shows a 1440px desktop as noise — crop to
   the subject the panel is about (the same focus points the bento uses) */
@media (max-width: 640px) {
  .proof .frame .media img, .proof .frame .media video { object-fit: cover; object-position: var(--ox, 50%) var(--oy, 50%); transform: scale(calc(var(--z, 1) * 0.8)); transform-origin: var(--ox, 50%) var(--oy, 50%); }
  .proof .frame.is-film video { transform: none; object-fit: contain; }
}
