/* GEHIRNS. Brand kit: github.com/GEHIRNS/brand. Blade for display, Cut for labels and small print, red #FF3B30 on black.
   Both faces are capitals only and cover ASCII plus · dashes and curly quotes. Running text (paragraphs) is set in
   IBM Plex Sans, mixed case, for reading; code uses a system mono. */

@font-face {
  font-family: "Blade";
  src: url("/assets/fonts/GEHIRNS-Blade.woff2") format("woff2");
  font-display: block;
  /* Caps-only face: trim the line box so cap height sits centred in it. */
  ascent-override: 88%;
  descent-override: 18%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Cut";
  src: url("/assets/fonts/GEHIRNS-Cut.woff2") format("woff2");
  font-display: block;
  ascent-override: 88%;
  descent-override: 18%;
  line-gap-override: 0%;
}
/* IBM Plex Sans, SIL OFL 1.1 (see IBMPlexSans-LICENSE.txt). Latin subset, regular only. */
@font-face {
  font-family: "Plex";
  src: url("/assets/fonts/IBMPlexSans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #000;
  --ink: #f5f5f7;
  --ink-2: #c7c7cc;
  --muted: #8e8e93;
  --dim: #48484d;
  --cell: #1c1c1e;
  --line: rgba(245, 245, 247, 0.12);
  --line-2: rgba(245, 245, 247, 0.24);
  --red: #ff3b30;
  --red-2: #c72e26;
  --red-3: #7a1c17;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --text: "Plex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --nav-h: 64px;
  --frame: 1360px;
  --pad: clamp(20px, 3.4vw, 48px);
  --chamfer: 12px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  overflow-x: clip;
}
.motion { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  font: 400 15px/1.62 "Cut", var(--mono);
  letter-spacing: 0.045em;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* Lock scrolling on the root: html is the scroller (overflow-x: clip stops body propagating). */
html.boot, html.menu-open { overflow: hidden; }
h1, h2, h3, p, dl, dd, ol, ul, figure, pre { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-style: normal; color: var(--red); }
code, pre { font-family: var(--mono); text-transform: none; letter-spacing: 0; }
svg { display: block; }
::selection { background: var(--red); color: #000; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 0.9em; height: 0.9em; flex: none; display: inline-block; vertical-align: -0.08em; }
.i-go { width: 1.05em; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 300;
  background: var(--red); color: #000; padding: 10px 14px; font-size: 13px;
}
.skip:focus { top: 12px; }

/* ---------- Frame: hairline columns that run the page, rules that cross them (after prismml.com) ---------- */

.frame {
  position: relative;
  max-width: var(--frame);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
}
.sec, .foot { border-top: 1px solid var(--line); }
.reg::before, .reg::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 9px;
  height: 9px;
  z-index: 2;
  background:
    linear-gradient(var(--red), var(--red)) center / 1px 100% no-repeat,
    linear-gradient(var(--red), var(--red)) center / 100% 1px no-repeat;
  pointer-events: none;
}
.reg::before { left: -5px; }
.reg::after { right: -5px; }
/* Once the frame meets the screen edge the marks would hang off it. */
@media (max-width: 1380px) { .reg::before, .reg::after { display: none; } }
.cell { padding: var(--pad); }

/* ---------- Type ---------- */

.eyebrow {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.28em;
  color: var(--muted);
}
.eyebrow .num { color: var(--red); margin-right: 0.9em; }
.h2 {
  font-family: "Blade";
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 60px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin-top: 18px;
}
/* Running text: sentences in Plex, mixed case. Titles, labels and UI stay in Blade and Cut. */
.lede, .sec-note, .mem-note, .step p, .step-txt, .trade-lead p:last-child, .model-desc, .repro li, .bench-cap {
  font-family: var(--text);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.lede {
  color: var(--ink-2);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.6;
  max-width: 50ch;
}
.sec-note { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 44ch; }
.fig-cap { font-size: 11px; letter-spacing: 0.22em; color: var(--muted); }
.fig-cap span { color: var(--ink); margin-right: 0.8em; }

/* Masked line reveal: each child span is one line. */
.rv-mask > span { display: block; overflow: hidden; padding-block: 0.04em; }
.motion.live .rv-mask > span { clip-path: inset(0 0 100% 0); transform: translateY(0.35em); transition: clip-path 1s var(--ease-out), transform 1s var(--ease-out); }
.motion.live .rv-mask > span:nth-child(2) { transition-delay: 0.08s; }
.motion.live .rv-mask > span:nth-child(3) { transition-delay: 0.16s; }
.motion.live .rv-mask.in > span { clip-path: inset(0 0 -0.2em 0); transform: none; }

.motion.live [data-rv]:not(.rv-mask) { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.motion.live [data-rv].in:not(.rv-mask) { opacity: 1; transform: none; }

/* ---------- Buttons: chamfered, like Blade's own cut corners ---------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  --c: var(--chamfer);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  height: 48px;
  padding: 0 22px 0 24px;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.18em;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
  transition: color 0.35s var(--ease-out);
}
.btn::before, .btn::after { content: ""; position: absolute; z-index: -1; }
.btn::before { inset: 0; }
/* Hover fill sweeps in on a 45° edge. */
.btn::after {
  inset: -2px;
  background: linear-gradient(45deg, var(--fill) 50%, transparent 50.1%) no-repeat;
  background-size: 260% 260%;
  background-position: 100% 0;
  transition: background-position 0.55s var(--ease-io);
}
.btn:hover::after, .btn:focus-visible::after { background-position: 0 100%; }
.btn .i { transition: transform 0.45s var(--ease-out); }
.btn:hover .i-go { transform: translateX(4px); }
.btn:hover .i:not(.i-go) { transform: translate(2px, -2px); }

.btn-red { color: #000; --fill: var(--ink); }
.btn-red::before { background: var(--red); }
/* 1px chamfered outline: the button's own background is the line, ::before is a black plate inset by 1px. */
.btn-line { color: var(--ink); --fill: var(--red); background: var(--line-2); }
.btn-line::before {
  inset: 1px;
  background: #000;
  clip-path: polygon(0 0, calc(100% - var(--c) + 0.41px) 0, 100% calc(var(--c) - 0.41px), 100% 100%, calc(var(--c) - 0.41px) 100%, 0 calc(100% - var(--c) + 0.41px));
}
.btn-line:hover, .btn-line:focus-visible { color: #000; }

/* ---------- Boot sequence ---------- */

#boot { display: none; }
.boot #boot {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}
.boot-curtain {
  --S: 300vmax;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--S);
  height: var(--S);
  margin: calc(var(--S) / -2) 0 0 calc(var(--S) / -2);
  background: #000;
  transform: rotate(45deg);
  will-change: transform;
}
.boot-band, .boot-edge { position: absolute; top: 0; bottom: 0; right: 100%; background: var(--red); }
.boot-band { width: 16vmax; }
.boot-edge { width: 0.6vmax; margin-right: 19vmax; }
.boot-warm {
  position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px;
  background: var(--ink); opacity: 0; transform: scaleX(0);
}
.boot-stage {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center;
  gap: clamp(22px, 3.4vw, 40px);
  padding: 24px;
}
.boot-lockup { position: relative; width: min(76vw, 880px); transform-origin: 0 0; will-change: transform; }
.boot-logo { width: 100%; height: auto; overflow: visible; fill: var(--red); filter: drop-shadow(0 0 22px rgba(255, 59, 48, 0.4)); }
.boot-mark { transform-box: view-box; }
.boot .pc, .boot .lt { opacity: 0; }
.boot-tear { position: absolute; inset: 0; pointer-events: none; }
.boot-tear .pc, .boot-tear .lt { opacity: 1; }
.boot-sub { display: grid; justify-items: center; gap: 20px; }
.boot-rule { display: block; width: 56px; height: 3px; border-radius: 2px; background: var(--red); transform: scaleX(0); }
.boot-tag { min-height: 1.2em; font-size: clamp(12px, 1.4vw, 17px); letter-spacing: 0.34em; padding-left: 0.34em; color: var(--muted); white-space: nowrap; }
.boot-hud { position: absolute; inset: 0; pointer-events: none; }
.hud { position: absolute; font-size: 11px; line-height: 1; letter-spacing: 0.24em; color: var(--muted); opacity: 0; }
.hud-tl { left: 22px; top: 22px; }
.hud-tr { right: 22px; top: 22px; font-variant-numeric: tabular-nums; }
.hud-bl { left: 22px; bottom: 22px; color: var(--ink-2); }
.hud-br { right: 22px; bottom: 22px; }
.boot-grain {
  position: absolute; inset: -60px;
  opacity: 0; pointer-events: none;
  mix-blend-mode: screen;
  animation: grain 0.5s steps(1) infinite;
}
.boot-scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 3px);
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-23px, 14px); } 40% { transform: translate(17px, -31px); }
  60% { transform: translate(-9px, 27px); } 80% { transform: translate(29px, 8px); }
}
.boot .nav-logo { opacity: 0; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.nav-in { height: 100%; display: flex; align-items: center; gap: 28px; padding-inline: var(--pad); }
.nav-logo { display: block; flex: none; margin-right: auto; }
.nav-logo svg { height: 20px; width: auto; aspect-ratio: 7.8; fill: var(--red); }
.nav-links, .nav-ext { display: flex; align-items: center; gap: 26px; font-size: 12px; letter-spacing: 0.2em; }
.nav-ext { gap: 20px; padding-left: 26px; border-left: 1px solid var(--line); height: 100%; }
.nav-links a, .nav-ext a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); transition: color 0.25s; white-space: nowrap; }
.nav-links a:hover, .nav-ext a:hover, .nav-links a.is-on { color: var(--ink); }
.nav-links a.is-on::before { content: ""; width: 5px; height: 5px; background: var(--red); margin-right: 2px; }
.nav-menu { display: none; align-items: center; gap: 12px; font-size: 12px; letter-spacing: 0.22em; height: 40px; }
.nav-menu i { position: relative; width: 22px; height: 10px; }
.nav-menu i::before, .nav-menu i::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); transition: transform 0.4s var(--ease-io); }
.nav-menu i::before { top: 0; } .nav-menu i::after { bottom: 0; }
.menu-open .nav-menu i::before { transform: translateY(4px) rotate(45deg); }
.menu-open .nav-menu i::after { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 49;
  background: #000;
  overflow-y: auto;
}
.menu-in { display: flex; flex-direction: column; padding: 12px var(--pad) 40px; }
.menu-in > a {
  display: flex; align-items: baseline; gap: 18px;
  font-family: "Blade"; font-size: clamp(34px, 9vw, 56px); line-height: 1.1;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.menu-in > a span { font-family: "Cut"; font-size: 12px; letter-spacing: 0.2em; color: var(--red); }
.menu-ext { display: flex; gap: 28px; padding-top: 28px; font-size: 13px; letter-spacing: 0.2em; color: var(--ink-2); }
.menu-ext a { display: inline-flex; gap: 8px; align-items: center; }
.motion .menu:not([hidden]) .menu-in > * { animation: menuIn 0.6s var(--ease-out) both; }
.motion .menu-in > :nth-child(2) { animation-delay: 0.04s !important; }
.motion .menu-in > :nth-child(3) { animation-delay: 0.08s !important; }
.motion .menu-in > :nth-child(4) { animation-delay: 0.12s !important; }
.motion .menu-in > :nth-child(5) { animation-delay: 0.16s !important; }
.motion .menu-in > :nth-child(6) { animation-delay: 0.2s !important; }
@keyframes menuIn { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Hero ---------- */

.strip {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  height: 56px; padding-inline: var(--pad);
  font-size: 12px; letter-spacing: 0.22em; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  transition: color 0.3s;
}
.strip:hover { color: var(--ink); }
.strip .i-go { transition: transform 0.4s var(--ease-out); }
.strip:hover .i-go { transform: translateX(5px); }
.chip {
  --c: 6px;
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px 0 11px;
  background: var(--red); color: #000; font-size: 11px; letter-spacing: 0.2em;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.hero-copy {
  display: flex; flex-direction: column; justify-content: center; gap: 30px;
  min-height: min(68svh, 720px);
  border-right: 1px solid var(--line);
  padding-block: clamp(48px, 7vw, 96px);
}
.hero-title {
  font-family: "Blade";
  font-weight: 400;
  font-size: clamp(44px, 7vw, 100px);
  line-height: 0.98;
  letter-spacing: 0.005em;
}
.hero-title .ln { display: block; overflow: hidden; padding-block: 0.03em; }
.hero-title .ln > span { display: block; }
.motion.live .hero-title .ln > span { transform: translateY(105%); transition: transform 1.15s var(--ease-out); }
.motion.live .hero-title .ln:nth-child(2) > span { transition-delay: 0.09s; }
.motion.live.ready .hero-title .ln > span { transform: none; }
.motion.live [data-hero-in] { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.motion.live.ready [data-hero-in] { opacity: 1; transform: none; }
.motion.live.ready .strip[data-hero-in] { transition-delay: 0.5s; }
.motion.live.ready .hero-copy .eyebrow[data-hero-in] { transition-delay: 0.05s; }
.motion.live.ready .lede[data-hero-in] { transition-delay: 0.3s; }
.motion.live.ready .cta-row[data-hero-in] { transition-delay: 0.42s; }

.hero-art { position: relative; display: grid; place-items: center; padding: var(--pad); overflow: hidden; }
.hero-mark { width: min(100%, 520px); height: auto; overflow: visible; touch-action: pan-y; }
.hero-mark .grid path { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero-mark .grid .grid-diag { stroke: rgba(245, 245, 247, 0.06); stroke-dasharray: 2 4; }
.hero-mark .ticks text { font-family: "Cut"; font-size: 4.2px; letter-spacing: 0.1em; fill: var(--muted); text-anchor: middle; }
.hero-mark .mk { fill: var(--red); cursor: crosshair; }
.hero-mark .mk path { will-change: transform; transform-box: view-box; }
.motion.live .hero-mark .mk path { opacity: 0; }
.hero-art .fig-cap { position: absolute; left: var(--pad); bottom: 22px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: clamp(24px, 3vw, 40px) var(--pad); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-rule { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--red); margin-bottom: 26px; transform-origin: left; }
.stat-num { font-family: "Blade"; font-size: clamp(44px, 5.4vw, 78px); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-num .x { font-size: 0.6em; margin-left: 0.04em; }
.stat-lab { margin-top: 22px; font-size: 13px; letter-spacing: 0.12em; color: var(--ink); }
.stat-sub { margin-top: 8px; font-size: 12px; letter-spacing: 0.12em; color: var(--muted); }
.motion.live .stat-rule { transform: scaleX(0); transition: transform 0.9s var(--ease-io); }
.motion.live .stats.in .stat-rule { transform: none; }
.motion.live .stats .stat:nth-child(2) .stat-rule { transition-delay: 0.08s; }
.motion.live .stats .stat:nth-child(3) .stat-rule { transition-delay: 0.16s; }
.motion.live .stats .stat:nth-child(4) .stat-rule { transition-delay: 0.24s; }
.stats-note { border-top: 1px solid var(--line); padding: 16px var(--pad); font-size: 11px; letter-spacing: 0.18em; color: var(--muted); }

/* ---------- Sections ---------- */

.sec-head { padding: clamp(40px, 6vw, 80px) var(--pad) 0; }
.sec-head-2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; padding-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); }

/* MAGI-1.0 */
.magi-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.magi-copy { display: flex; flex-direction: column; gap: 30px; border-right: 1px solid var(--line); padding-top: 28px; }
.magi-title { font-family: "Blade"; font-weight: 400; font-size: clamp(56px, 7.6vw, 112px); line-height: 0.96; white-space: nowrap; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.spec > div { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec > div:nth-child(odd) { padding-right: 16px; }
.spec dt { font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.spec dd { margin: 0; font-size: 14px; letter-spacing: 0.1em; }

.cmd {
  display: flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 8px 0 18px;
  background: var(--cell);
  border-left: 3px solid var(--red);
  min-width: 0;
}
.cmd-p { font-family: var(--mono); color: var(--red); }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 14px; color: var(--ink); scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }
.copy {
  flex: none; height: 32px; padding: 0 12px;
  font-size: 11px; letter-spacing: 0.22em; color: var(--muted);
  border: 1px solid var(--line-2);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.copy:hover { color: var(--ink); border-color: var(--ink); }
.copy.is-done { color: #000; background: var(--red); border-color: var(--red); }

.magi-mem { display: flex; flex-direction: column; gap: 24px; padding-top: 28px; }
.mem-box { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; align-self: center; }
.mem-sq { position: absolute; left: 0; bottom: 0; transform-origin: 0 100%; }
.mem-bf16 { width: 100%; height: 100%; border: 1px solid var(--line-2); background: repeating-linear-gradient(-45deg, transparent 0 9px, rgba(245, 245, 247, 0.035) 9px 10px); }
/* Side = sqrt(GiB / 8.978), so area is to scale. */
.mem-q4 { width: 64.88%; height: 64.88%; border: 1px dashed var(--muted); }
.mem-magi { width: 54.36%; height: 54.36%; background: var(--red); }
.mem-lab { position: absolute; left: calc(100% + 12px); top: -1px; font-size: 11px; line-height: 1.5; letter-spacing: 0.16em; color: var(--muted); white-space: nowrap; }
.mem-lab b { font-family: "Blade"; font-weight: 400; font-size: 22px; letter-spacing: 0.02em; color: var(--ink); }
.mem-bf16 > .mem-lab { left: auto; right: 16px; top: 14px; text-align: right; }
/* Dark ink on the solid red, never light. */
.mem-magi > .mem-lab { left: 14px; top: 12px; color: #000; }
.mem-magi .mem-lab b { color: #000; }
.mem-note { font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 56ch; }
.motion.live .mem-sq:not(.mem-bf16) { transform: scale(0); transition: transform 1.3s var(--ease-io); }
.motion.live .mem-sq .mem-lab { opacity: 0; transition: opacity 0.6s 0.9s; }
.motion.live .mem-bf16 { clip-path: inset(100% 0 0 0); transition: clip-path 1.1s var(--ease-io); }
.motion.live .magi-mem.in .mem-bf16 { clip-path: inset(0); }
.motion.live .magi-mem.in .mem-sq { transform: none; }
.motion.live .magi-mem.in .mem-q4 { transition-delay: 0.35s; }
.motion.live .magi-mem.in .mem-magi { transition-delay: 0.6s; }
.motion.live .magi-mem.in .mem-lab { opacity: 1; }

/* ---------- The bits (pinned) ---------- */

.bits-track { height: 360vh; }
.bits-pin {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  overflow: hidden;
}
.bits-grid { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); height: 100%; }
.bits-copy { display: flex; flex-direction: column; border-right: 1px solid var(--line); padding-block: clamp(28px, 4.5vh, 56px); min-height: 0; }
.bits-copy .h2 { font-size: clamp(28px, 3vw, 44px); }
.steps { margin-top: clamp(28px, 7vh, 72px); display: grid; gap: 4px; }
.step {
  position: relative;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
  opacity: 0.38;
  transition: opacity 0.5s;
}
.step.is-on { opacity: 1; }
.step-n { font-size: 12px; letter-spacing: 0.2em; color: var(--muted); padding-top: 4px; }
.step.is-on .step-n { color: var(--red); }
.step > div { display: grid; grid-template-rows: auto 0fr; row-gap: 0; transition: grid-template-rows 0.6s var(--ease-io), row-gap 0.6s var(--ease-io); }
.step.is-on > div { grid-template-rows: auto 1fr; row-gap: 8px; }
.step h3 { font-family: "Blade"; font-weight: 400; font-size: 22px; line-height: 1.2; letter-spacing: 0.04em; }
.step p { min-height: 0; overflow: hidden; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 50ch; }
.step-bar { position: absolute; left: 0; right: 0; top: -1px; height: 1px; }
.step-bar > i { display: block; height: 100%; background: var(--red); transform-origin: left; transform: scaleX(var(--p, 0)); }

.bits-fig { display: flex; flex-direction: column; gap: 16px; min-height: 0; padding-block: clamp(20px, 3.5vh, 44px); }
.readout { display: grid; grid-template-columns: auto auto minmax(0, 1fr); border: 1px solid var(--line); }
.readout > div { display: grid; gap: 6px; padding: 12px 18px; border-right: 1px solid var(--line); min-width: 0; }
.readout > div:last-child { border-right: 0; }
.ro-k { font-size: 10px; letter-spacing: 0.24em; color: var(--muted); }
.ro-v { font-family: "Blade"; font-size: clamp(22px, 2.2vw, 30px); line-height: 1; font-variant-numeric: tabular-nums; }
.ro-t { font-size: 12px; line-height: 1.5; letter-spacing: 0.1em; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-t b { font-weight: 400; color: var(--ink); }
.tmap-wrap { position: relative; flex: 1; min-height: 180px; }
.tmap { position: absolute; inset: 0; display: grid; gap: 2px; padding-left: 52px; }
.trow { position: relative; display: flex; gap: 1px; min-height: 0; }
.trow-l { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); font-size: 9px; line-height: 1; letter-spacing: 0.12em; color: var(--dim); white-space: nowrap; }
.trow.is-fa .trow-l { color: var(--muted); }
.seg {
  --c: var(--dim);
  position: relative;
  min-width: 2px;
  background: #2c2c2e;
  transition: background-color 0.5s var(--ease-out), opacity 0.5s, box-shadow 0.3s;
}
.trow.is-a .seg { background: var(--c); }
.seg.is-hot { box-shadow: inset 0 0 0 1px transparent; }
.trow.is-s .seg.is-hot { background: #3a3a3c; box-shadow: inset 0 0 0 1px var(--red); }
.trow.is-a .seg.is-hot { background: var(--c); box-shadow: none; }
.seg:hover, .seg.is-pick { box-shadow: inset 0 0 0 1px var(--ink) !important; }
.tmap-scan { position: absolute; left: 52px; right: 0; height: 2px; background: var(--red); box-shadow: 0 0 12px var(--red); pointer-events: none; opacity: 0; top: 0; }
.trow-embd .trow-l { top: 12px; transform: none; }
.tmap.is-dim .seg { opacity: 0.22; }

.loops {
  position: absolute; left: 52px; right: 0; bottom: 0;
  display: grid; gap: 12px;
  padding: 22px 22px 20px;
  background: #000;
  border: 1px solid var(--line-2);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  pointer-events: none;
}
.loops.is-on { opacity: 1; transform: none; }
.loops-k { font-size: 11px; letter-spacing: 0.22em; color: var(--muted); }
.loops-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 64px; align-items: center; gap: 14px; font-size: 12px; letter-spacing: 0.14em; }
.loops-row > i { height: 22px; background: var(--cell); }
.loops-row > i > i { display: block; height: 100%; width: 0; background: var(--dim); transition: width 1.1s var(--ease-io); }
.loops-row.is-magi > i > i { background: var(--red); }
.loops.is-on .loops-row > i > i { width: var(--w); }
.loops-row b { font-family: "Blade"; font-weight: 400; font-size: 22px; text-align: right; }
.loops-row.is-magi b { color: var(--red); }
.loops-n { font-size: 10px; letter-spacing: 0.2em; color: var(--muted); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 11px; letter-spacing: 0.14em; color: var(--ink-2); padding-left: 52px; }
.legend > span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 12px; height: 12px; display: inline-block; }
.sw-8 { background: var(--red); } .sw-4 { background: var(--red-2); } .sw-3 { background: var(--red-3); } .sw-16 { background: #2c2c2e; }
.legend-n { width: 100%; color: var(--muted); font-size: 10px; }

/* ---------- Results ---------- */

.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] {
  position: relative; flex: none;
  height: 56px; padding: 0 var(--pad);
  font-size: 12px; letter-spacing: 0.22em; color: var(--muted);
  border-right: 1px solid var(--line);
  transition: color 0.25s;
}
.tabs [role="tab"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease-io); }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"]::after { transform: none; }

.bench-panel { padding: clamp(28px, 4vw, 52px) var(--pad); display: grid; gap: 28px; }
.bench-cap { font-size: 15px; line-height: 1.6; color: var(--muted); min-height: 1.6em; }
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); align-items: center; gap: 22px; }
.bar-k { text-align: right; font-size: 13px; letter-spacing: 0.1em; color: var(--muted); }
.bar.is-magi .bar-k { color: var(--ink); }
.bar-t { position: relative; display: flex; align-items: center; gap: 16px; height: 34px; }
.bar-f {
  --c: 8px;
  height: 100%; width: 0;
  background: var(--dim);
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%);
  transition: width 1s var(--ease-io), background-color 0.4s;
}
.bar[data-tone="1"] .bar-f { background: var(--red); }
.bar[data-tone="2"] .bar-f { background: var(--red-2); }
.bar[data-tone="3"] .bar-f { background: var(--red-3); }
.bar-v { font-size: 14px; letter-spacing: 0.08em; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar.is-magi .bar-v { color: var(--ink); }
.bar[data-tone="1"] .bar-v { font-family: "Blade"; font-size: 17px; }
.bar.is-best .bar-v::after { content: "BEST"; margin-left: 10px; font-family: "Cut"; font-size: 10px; letter-spacing: 0.2em; color: #000; background: var(--ink); padding: 3px 6px; vertical-align: 2px; }
.bench-foot { font-size: 11px; letter-spacing: 0.14em; color: var(--muted); padding-top: 18px; border-top: 1px solid var(--line); }

.trade { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.trade > .cell { border-right: 1px solid var(--line); }
.trade > .cell:last-child { border-right: 0; }
.trade-lead p:last-child { margin-top: 14px; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 54ch; }
.trade-pick { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.trade-if { font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.trade-use { font-family: "Blade"; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; }
.trade-pick.is-magi .trade-use { color: var(--red); }

/* ---------- Models ---------- */

.models { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.model {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 340px;
  padding: var(--pad) var(--pad) 28px;
  border-right: 1px solid var(--line);
  transition: color 0.4s var(--ease-out);
}
.model:last-child { border-right: 0; }
.model::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(45deg, var(--red) 50%, transparent 50.1%) no-repeat;
  background-size: 260% 260%;
  background-position: 100% 0;
  transition: background-position 0.65s var(--ease-io);
}
.model:hover::before, .model:focus-visible::before { background-position: 0 100%; }
.model:hover, .model:focus-visible { color: #000; }
.model:focus-visible { outline-offset: -2px; }
.model-tag { align-self: flex-start; font-size: 10px; letter-spacing: 0.24em; color: var(--muted); padding: 5px 8px; border: 1px solid var(--line-2); transition: inherit; }
.model-tag.is-red { color: var(--red); border-color: var(--red); }
.model-name { margin-top: 18px; font-family: "Blade"; font-weight: 400; font-size: clamp(22px, 2vw, 30px); line-height: 1.05; white-space: nowrap; }
.model-base { font-size: 12px; letter-spacing: 0.14em; color: var(--muted); transition: color 0.4s; }
.model-desc { font-size: 15px; line-height: 1.55; color: var(--ink-2); transition: color 0.4s; }
.model-go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.22em; }
.model.is-retired .model-name { color: var(--ink-2); }
.model:hover .model-base, .model:hover .model-desc, .model:hover .model-tag, .model:hover .model-name,
.model:focus-visible .model-base, .model:focus-visible .model-desc, .model:focus-visible .model-tag, .model:focus-visible .model-name { color: #000; border-color: #000; }
.model .i { transition: transform 0.45s var(--ease-out); }
.model:hover .i { transform: translate(3px, -3px); }

/* ---------- Run ---------- */

.run-panel { padding: clamp(24px, 3.4vw, 44px) var(--pad); }
.term { display: grid; gap: 10px; }
.term-c { font-size: 11px; letter-spacing: 0.22em; color: var(--muted); margin-top: 14px; }
.term-c:first-child { margin-top: 0; }
.term-l { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 10px 10px 18px; background: var(--cell); border-left: 3px solid var(--red); min-width: 0; }
.term-l code { flex: 1; min-width: 0; font-size: 14px; line-height: 1.6; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.term-l code::before { content: "$ "; color: var(--red); }

/* ---------- Paper ---------- */

.paper { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.paper-copy { display: flex; flex-direction: column; gap: 28px; border-right: 1px solid var(--line); padding-top: 28px; }
.paper-title { font-family: "Blade"; font-weight: 400; font-size: clamp(48px, 6.4vw, 92px); line-height: 0.98; }
.paper-meta { font-size: 12px; letter-spacing: 0.16em; color: var(--muted); }
.repro { display: grid; border-top: 1px solid var(--line); margin-top: 28px; }
.repro li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.55; color: var(--ink-2); display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.repro b { font-family: "Cut"; font-weight: 400; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--red); padding-top: 5px; }
.paper-cite { padding-top: 28px; display: flex; flex-direction: column; }
.paper-cite .term { background: var(--cell); }
.term-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.paper-cite pre { padding: 18px; overflow-x: auto; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

/* ---------- Footer ---------- */

.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 32px; padding: clamp(40px, 5vw, 64px) var(--pad); }
.foot-col { display: flex; flex-direction: column; gap: 12px; font-size: 13px; letter-spacing: 0.14em; }
.foot-col a { color: var(--ink-2); transition: color 0.2s; justify-self: start; }
.foot-col a:hover { color: var(--red); }
.foot-col .eyebrow { margin-bottom: 6px; }
.foot-replay { justify-content: flex-start; }
.foot-word { padding: 0 var(--pad) clamp(28px, 4vw, 48px); }
.foot-word svg { width: 100%; height: auto; fill: var(--red); overflow: visible; }
.motion.live .foot-word .fw { opacity: 0; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding: 18px var(--pad) calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 11px; letter-spacing: 0.2em; color: var(--muted); }

/* ---------- 404 ---------- */

.lost { min-height: calc(100svh - var(--nav-h)); display: grid; place-content: center; justify-items: center; gap: 28px; padding: 40px var(--pad); text-align: center; }
.lost svg { width: min(36vw, 180px); fill: var(--red); }
.lost h1 { font-family: "Blade"; font-weight: 400; font-size: clamp(56px, 12vw, 140px); line-height: 1; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .nav-links { gap: 18px; }
  .nav-ext { display: none; }
  .models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model:nth-child(2) { border-right: 0; }
  .model:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .trade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trade-lead { grid-column: 1 / -1; border-right: 0 !important; border-bottom: 1px solid var(--line); }
}

@media (max-width: 960px) {
  :root { --nav-h: 58px; }
  .nav-links { display: none; }
  .nav-menu { display: inline-flex; }
  .hero-grid, .magi-grid, .paper { grid-template-columns: minmax(0, 1fr); }
  .hero-copy, .magi-copy, .paper-copy { border-right: 0; }
  .hero-copy { min-height: 0; }
  .hero-art { border-top: 1px solid var(--line); min-height: 360px; }
  .hero-mark { width: min(78%, 400px); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .magi-mem, .paper-cite { border-top: 1px solid var(--line); }
  .mem-box { width: 70%; align-self: flex-start; }

  .bits-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .bits-copy { border-right: 0; border-bottom: 1px solid var(--line); padding-block: 18px 0; }
  .bits-copy .eyebrow { display: none; }
  .bits-copy .h2 { margin-top: 0; font-size: clamp(22px, 5.8vw, 36px); }
  .steps { margin-top: 14px; padding-top: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
  .step { grid-template-columns: minmax(0, 1fr); padding: 12px 0 14px; opacity: 0.45; }
  .step-n { display: none; }
  .step h3 { font-size: 16px; }
  .step p { display: none; }
  .bits-copy .step-txt { display: block; }
  .bits-fig { padding-block: 14px 18px; gap: 12px; }
  .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout > div { padding: 10px 14px; }
  .readout > div:nth-child(2) { border-right: 0; }
  .ro-hover { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .step-txt { font-size: 14px; min-height: calc(1.55em * 5); }
  .tmap, .tmap-scan, .loops, .legend { padding-left: 0; left: 0; }
  .tmap { padding-left: 0; }
  .trow-l { display: none; }
  .legend { gap: 6px 14px; font-size: 10px; }
  .legend-n { display: none; }

  .sec-head-2 { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 18px; }
  .bar { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .bar-k { text-align: left; }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-replay { grid-column: 1 / -1; }
}

@media (max-width: 960px) and (max-height: 760px) { .readout > .ro-hover { display: none; } }

/* The active step's text, shown under the step tabs on narrow screens. */
.step-txt { display: none; margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--ink-2); min-height: calc(1.55em * 4); }

@media (max-width: 640px) {
  :root { --chamfer: 10px; }
  body { font-size: 14px; }
  .strip { gap: 12px; font-size: 10px; letter-spacing: 0.16em; height: 50px; }
  .hero-title { font-size: clamp(40px, 12.2vw, 64px); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec > div:nth-child(odd) { padding-right: 0; }
  .mem-box { width: 62%; }
  .mem-lab b { font-size: 18px; }
  .models { grid-template-columns: minmax(0, 1fr); }
  .model { border-right: 0 !important; border-bottom: 1px solid var(--line); min-height: 0; }
  .model:last-child { border-bottom: 0; }
  .model-go { margin-top: 12px; }
  .trade { grid-template-columns: minmax(0, 1fr); }
  .trade > .cell { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .trade > .cell:last-child { border-bottom: 0; }
  .repro li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { padding: 0 18px 0 20px; font-size: 12px; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .hud-tr, .hud-tl { top: 16px; } .hud-bl, .hud-br { bottom: 16px; }
  .hud-tl, .hud-bl { left: 16px; } .hud-tr, .hud-br { right: 16px; }
  .hud-bl { max-width: 60vw; white-space: normal; line-height: 1.5; }
}

/* Reduced motion: final states, no pin, no boot. */
@media (prefers-reduced-motion: reduce) {
  .bits-track { height: auto; }
  .bits-pin { position: relative; top: 0; height: auto; overflow: visible; }
  .bits-grid { min-height: 0; }
  .tmap-wrap { flex: none; min-height: 0; }
  .tmap { position: relative; height: 520px; }
  .loops { position: relative; left: auto; margin: 16px 0 0 52px; opacity: 1; transform: none; }
  .step { opacity: 1; }
  .bits-copy .step p { display: block; }
  .bits-copy .step-txt { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* 404: the mark's pieces stutter on a loop, each on its own clock. */
.lost-mark path { animation: lostTube 3.4s steps(1, end) infinite; }
.lost-mark path:nth-child(2) { animation-delay: -0.7s; animation-duration: 4.1s; }
.lost-mark path:nth-child(3) { animation-delay: -1.9s; animation-duration: 5.3s; }
.lost-mark path:nth-child(4) { animation-delay: -0.3s; animation-duration: 3.7s; }
.lost-mark path:nth-child(5) { animation-delay: -2.6s; animation-duration: 4.6s; }
.lost-mark path:nth-child(6) { animation-delay: -1.2s; animation-duration: 2.9s; }
@keyframes lostTube { 0%, 71%, 77%, 83%, 100% { opacity: 1; } 70%, 74%, 80% { opacity: 0.15; } }
