/* =========================================================================
   Mid-Harness project page
   ========================================================================= */

@font-face {
  font-family: "NVIDIA Sans";
  src: url("https://images.nvidia.com/etc/designs/nvidiaGDC/clientlibs_base/fonts/nvidia-sans/NALA/var/NVIDIASansVF_NALA_W_Wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --green: #76b900;
  --green-600: #5f9600;
  --green-soft: rgba(118, 185, 0, 0.13);
  --green-line: rgba(118, 185, 0, 0.45);
  --pink: #ff5fa2;
  --red: #e5484d;

  --maxw: 1200px;
  --pad-x: clamp(18px, 4.2vw, 56px);
  --header-h: 62px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;

  --font-sans: "NVIDIA Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --font-pixel: "VT323", "JetBrains Mono", ui-monospace, monospace;
  --font-math: "Cambria Math", "STIX Two Math", "Latin Modern Math", "Times New Roman", Times, serif;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfbf8;
  --bg-glass: rgba(251, 251, 248, 0.82);
  --bg-2: #f2f2ec;
  --surface: #ffffff;
  --surface-2: #f6f6f1;
  --text: #1e1e1e;
  --text-2: #4b4f55;
  --text-3: #80858c;
  --line: rgba(30, 30, 30, 0.11);
  --line-2: rgba(30, 30, 30, 0.22);
  --crop: rgba(30, 30, 30, 0.5);
  --accent: #4d7a00;
  --accent-strong: #3f6600;
  --mega: #333333;
  --mega-stroke: rgba(0, 0, 0, 0.32);
  --btn-bg: #1e1e1e;
  --btn-text: #ffffff;
  --pill-bg: rgba(255, 255, 255, 0.7);
  --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.03), 0 18px 50px -30px rgba(0, 0, 0, 0.28);

  --c-base: #7b8591;
  --c-listwise: #e25b57;
  --c-pointwise: #cc8a22;
  --c-pairwise: #23907f;
  --c-distilled: #3a61ee;
  --c-frontier: #8456c4;
  --c-bot: #e25b57;
  --c-sr: #cc8a22;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d;
  --bg-glass: rgba(13, 13, 13, 0.8);
  --bg-2: #131313;
  --surface: #161616;
  --surface-2: #1c1c1c;
  --text: #eeeeee;
  --text-2: #b3b3b3;
  --text-3: #7d7d7d;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.2);
  --crop: rgba(255, 255, 255, 0.45);
  --accent: #8fd21e;
  --accent-strong: #a6e34a;
  --mega: #ececec;
  --mega-stroke: rgba(255, 255, 255, 0.18);
  --btn-bg: #76b900;
  --btn-text: #0b0b0b;
  --pill-bg: rgba(255, 255, 255, 0.04);
  --shadow-card: 0 20px 60px -35px rgba(0, 0, 0, 0.9);

  --c-base: #9aa3ad;
  --c-listwise: #ff7b76;
  --c-pointwise: #eaa84a;
  --c-pairwise: #3cc0ad;
  --c-distilled: #6d8bff;
  --c-frontier: #b18af0;
  --c-bot: #ff7b76;
  --c-sr: #eaa84a;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, figure, pre { margin: 0; }
ol, ul { padding: 0; list-style: none; }
sub, sup { font-size: 0.68em; line-height: 0; }
code, pre, kbd { font-family: var(--font-mono); }
::selection { background: rgba(118, 185, 0, 0.35); color: inherit; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  border-radius: 6px;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: calc(var(--pad-x) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--pad-x) + env(safe-area-inset-right, 0px));
}

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.nv { color: var(--green); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Crop marks & edge glyphs ---------- */
.crop { position: relative; }
.crop::before {
  content: "";
  position: absolute;
  inset: var(--crop-inset, 22px);
  pointer-events: none;
  --c: var(--crop);
  --l: 11px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px var(--l) no-repeat;
}

.edge {
  position: absolute;
  bottom: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-3);
  pointer-events: none;
  user-select: none;
}
.edge-l { left: 8px; }
.edge-r { right: 8px; }

/* ---------- Type ---------- */
.mega {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--mega);
  -webkit-text-stroke: 0.6px var(--mega-stroke);
  text-wrap: balance;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.kicker::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 1px;
}

.section { position: relative; padding: clamp(84px, 11vw, 150px) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  text-align: center;
  margin: 0 auto clamp(44px, 6vw, 84px);
  max-width: 980px;
}
.section-head .mega {
  font-size: clamp(3.3rem, 10.5vw, 8.6rem);
  margin-top: 18px;
}
.section-head .lede {
  margin: 26px auto 0;
  max-width: 740px;
  font-size: clamp(1.06rem, 1.55vw, 1.28rem);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}

.subhead {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: clamp(56px, 7vw, 96px) 0 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
}
.subhead:first-child { margin-top: 0; }
.subhead .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  flex: none;
}
.subhead h3 {
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}
.site-header.is-scrolled,
.site-header.is-open {
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 calc(clamp(14px, 2.2vw, 28px) + env(safe-area-inset-left, 0px)) 0 calc(clamp(14px, 2.2vw, 28px) + env(safe-area-inset-right, 0px));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--text);
}
.nv-lockup { display: inline-flex; align-items: center; gap: 7px; }
.nv-eye { width: 27px; height: 27px; }
.nv-word { height: 13px; width: auto; color: var(--text); }
.brand-divider { width: 1px; height: 20px; background: var(--line-2); }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}
.primary-nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.primary-nav a:hover { color: var(--text); background: var(--line); }
.primary-nav a.is-active { color: var(--text); }
.primary-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 1px;
  background: var(--green);
}

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.primary-nav + .header-actions { margin-left: 0; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  color: var(--text-2);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover { background: var(--line); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }

.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }

.menu-toggle { display: none; }
.menu-toggle .i-close { display: none; }
.site-header.is-open .menu-toggle .i-close { display: block; }
.site-header.is-open .menu-toggle .i-menu { display: none; }

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 10px var(--pad-x) 26px;
  box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.35);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.mobile-menu a span { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; color: var(--text-3); }

/* ---------- Buttons ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px 0 17px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--pill-bg);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.pill svg { width: 17px; height: 17px; flex: none; }
.pill:hover { border-color: var(--green-line); background: var(--green-soft); }
.pill:active { transform: translateY(1px); }
.pill.is-pending { color: var(--text-3); cursor: default; }
.pill.is-pending:hover { border-color: var(--line-2); background: var(--pill-bg); }
.pill .soon {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--line);
  color: var(--text-3);
}

.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.seg button {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"],
.seg button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.seg-lg button { height: 40px; padding: 0 20px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(600px, 88svh, 940px);
  padding: 30px 0 60px;
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + 30px);
}
.hero .crop { --crop-inset: clamp(14px, 3vw, 44px); }
.hero-inner {
  position: relative;
  width: 100%;
  text-align: center;
  padding: clamp(64px, 9vw, 110px) var(--pad-x);
}
.hero-title {
  font-size: clamp(3.2rem, 14.2vw, 10.4rem);
  margin: 26px 0 0;
  white-space: nowrap;
}
.hero-title .dash { color: var(--text-3); -webkit-text-stroke: 0; font-weight: 500; }
.hero-title .nv { -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.18); }
.hero-sub {
  margin: clamp(18px, 2.4vw, 28px) auto 0;
  max-width: 900px;
  font-size: clamp(1.25rem, 2.7vw, 2.15rem);
  line-height: 1.22;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}
.authors {
  margin: clamp(26px, 3.4vw, 40px) auto 0;
  max-width: 980px;
  font-size: clamp(0.98rem, 1.35vw, 1.08rem);
  line-height: 1.75;
  color: var(--text);
}
.authors > span { white-space: nowrap; }
.authors > span:not(:last-child)::after { content: ","; margin-right: 0.55em; }
.authors a {
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
.authors a:hover { color: var(--accent); text-decoration-color: currentColor; }
.authors sup { color: var(--text-3); margin-left: 1px; font-weight: 500; }
.authors .note-mark { margin-left: 1px; color: var(--green); font-weight: 700; }
.authors .note-mark.ast { font-size: 1.7em; vertical-align: -0.4em; }
.authors .note-mark.dag { font-size: 1.35em; vertical-align: -0.08em; }
.affils,
.affil-notes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.affils { margin-top: 10px; font-size: 1.06rem; color: var(--text-2); }
.affil-notes { margin-top: 6px; font-size: 1rem; color: var(--text-3); }
.affils sup { margin-right: 2px; }
.affil-notes sup { margin-right: 3px; }
.affil-notes sup.ast { font-size: 1.5em; vertical-align: -0.05em; }
.affil-notes sup.dag { font-size: 1.15em; vertical-align: 0; }
.affil-notes strong { color: var(--green); font-weight: 700; }
.hero-links {
  margin-top: clamp(28px, 3.6vw, 44px);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
/* ---------- Headline results ---------- */
.hype {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: clamp(64px, 8vw, 110px);
}
.hype::before,
.hype::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hype::before {
  background: radial-gradient(1000px 520px at 50% 14%, rgba(118, 185, 0, 0.2), transparent 66%);
}
.hype::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 72% 56% at 50% 32%, #000 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 72% 56% at 50% 32%, #000 25%, transparent 80%);
}
html[data-theme="light"] .hype::after {
  background-image:
    linear-gradient(rgba(30, 30, 30, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 30, 30, 0.05) 1px, transparent 1px);
}
.hype > .container { padding-top: clamp(64px, 8vw, 112px); }
html[data-theme="dark"] .hype,
html[data-theme="dark"] .hype + .stage-section { background: #080808; }

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 70s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  white-space: nowrap;
  border-right: 1px solid var(--line);
}
.ticker-track i { font-style: normal; color: var(--line-2); }
.ticker-track b { color: var(--accent); font-weight: 600; }
@keyframes ticker { to { transform: translateX(-50%); } }

.hype-head {
  max-width: 1040px;
  margin: 0 auto clamp(40px, 5.4vw, 72px);
  text-align: center;
}
.hype-title { margin-top: 20px; font-weight: 700; }
.hype-pre {
  display: block;
  font-size: clamp(1.35rem, 3.2vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--text-2);
}
.hype-big {
  display: block;
  margin-top: clamp(6px, 1vw, 12px);
  font-size: clamp(2.8rem, 8.6vw, 7.4rem);
}
.hype-big em {
  font-style: normal;
  color: var(--green);
  -webkit-text-stroke: 0;
  text-shadow: 0 0 48px rgba(118, 185, 0, 0.45);
}
.board-wrap { border-top: 1px solid var(--line-2); }
.board { width: 100%; border-collapse: collapse; }
.board th,
.board td {
  padding: 0 clamp(10px, 1.4vw, 18px);
  text-align: left;
  vertical-align: middle;
  font-weight: inherit;
}
.board thead th {
  padding-top: 14px;
  padding-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--line);
}
.board thead th span { display: block; margin-top: 3px; letter-spacing: 0.04em; text-transform: none; opacity: 0.75; }
.board thead th:nth-child(1) { width: 22%; }
.board thead th:nth-child(2) { width: 36%; }
.board thead th:nth-child(3),
.board thead th:nth-child(4) { width: 21%; }
.board tbody tr { transition: background-color 0.25s var(--ease); }
.board tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.board tbody th,
.board tbody td {
  padding-top: clamp(18px, 2.2vw, 28px);
  padding-bottom: clamp(18px, 2.2vw, 28px);
  border-bottom: 1px solid var(--line);
}
.board .b-bench { font-size: clamp(1rem, 1.3vw, 1.14rem); font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.board .b-bench small { display: block; margin-top: 5px; font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: 0.02em; color: var(--text-3); }
.agent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.95rem; color: var(--text-2); }
.agent b { color: var(--text); font-weight: 600; }
.agent .x { color: var(--text-3); }
.agent .sz,
.agent .vt {
  padding: 4px 7px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.agent .vt.zs { color: var(--c-pairwise); border-color: currentColor; }
.agent .vt.dist { color: var(--c-distilled); border-color: currentColor; }
.gain {
  display: flex;
  align-items: baseline;
  font-size: clamp(2.3rem, 4.3vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(118, 185, 0, 0.3);
}
.gain small { margin-left: 0.18em; font-size: 0.32em; font-weight: 600; letter-spacing: 0; color: var(--text-2); text-shadow: none; }
.b-metric.peak .gain { color: #b5ec4f; text-shadow: 0 0 44px rgba(143, 210, 30, 0.6); }
html[data-theme="light"] .hype-big em { text-shadow: 0 0 36px rgba(118, 185, 0, 0.28); }
html[data-theme="light"] .gain { text-shadow: none; }
html[data-theme="light"] .b-metric.peak .gain { color: #5f9600; text-shadow: 0 0 28px rgba(118, 185, 0, 0.3); }
html[data-theme="light"] .board tbody tr:hover { background: rgba(0, 0, 0, 0.025); }
.gain .is-counted { animation: gain-pop 0.6s var(--ease-out); }
@keyframes gain-pop {
  40% { transform: scale(1.08); text-shadow: 0 0 40px rgba(143, 210, 30, 0.8); }
}
.ba { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.ba i { font-style: normal; color: var(--accent); margin: 0 3px; }
.ba [data-count] { transition: color 0.4s var(--ease); }
.ba .is-counted { color: var(--text); }
.m-lab { display: none; }
.hype-note { margin-top: 16px; font-size: 0.86rem; line-height: 1.6; color: var(--text-3); }
.hype-note a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.2em; }
.hype-note a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* ---------- Stage (animated overview; dark, with a light variant for light pages) ---------- */
.stage-section { padding: 0 0 clamp(80px, 10vw, 140px); }
.stage {
  --s-text: #e9ece5;
  --s-dim: #8b9187;
  --s-faint: #5b6058;
  --s-line: rgba(255, 255, 255, 0.09);
  --s-flash: rgba(255, 255, 255, 0.16);
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-lg);
  padding: clamp(16px, 2.6vw, 30px);
  background:
    radial-gradient(900px 380px at 88% 118%, rgba(118, 185, 0, 0.2), transparent 62%),
    radial-gradient(700px 300px at 0% -20%, rgba(255, 255, 255, 0.05), transparent 60%),
    linear-gradient(180deg, #0f100e, #0a0b09);
  color: var(--s-text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 90px -45px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
html[data-theme="dark"] .stage { border-color: rgba(255, 255, 255, 0.11); }
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%);
}
.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(14px, 2vw, 22px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--s-dim);
}
.stage-top .live { display: inline-flex; align-items: center; gap: 9px; }
.stage-top .live::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(118, 185, 0, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(118, 185, 0, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(118, 185, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(118, 185, 0, 0); }
}
.stage-replay {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--s-text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.stage-replay:hover { border-color: var(--green); background: rgba(118, 185, 0, 0.1); }
.stage-replay svg { width: 13px; height: 13px; }

/* Shared user task, forking into both lanes */
.stage-task {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.st-who {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--s-dim);
}
.st-av {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--s-text);
}
.st-av svg { width: 15px; height: 15px; }
.st-goal {
  min-width: 0;
  font-size: clamp(1rem, 1.55vw, 1.22rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--s-text);
}
.st-goal .caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.18em;
  background: var(--green);
  animation: blink 0.9s steps(1) infinite;
}
.stage.fork .stage-task { border-color: rgba(118, 185, 0, 0.5); box-shadow: 0 0 0 4px rgba(118, 185, 0, 0.08); }
.stage-fork { position: relative; height: 30px; }
.stage-fork::before,
.stage-fork::after { content: ""; position: absolute; border: 0 solid rgba(255, 255, 255, 0.28); }
.stage-fork::after { left: 50%; top: 0; height: 12px; margin-left: -0.75px; border-left-width: 1.5px; transform-origin: top; }
.stage-fork::before { left: calc(25% - 5px); right: calc(25% - 5px); top: 12px; bottom: 4px; border-width: 1.5px 1.5px 0; border-radius: 10px 10px 0 0; }
.stage-fork i {
  position: absolute;
  bottom: 0;
  margin-left: -5px;
  border-top: 6px solid rgba(255, 255, 255, 0.4);
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}
.stage-fork i:first-child { left: calc(25% - 5px); }
.stage-fork i:last-child { left: calc(75% + 5px); }
.js .stage-task { opacity: 0; transform: translateY(8px); transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.stage.p0 .stage-task { opacity: 1; transform: none; }
.js .stage-fork::after { transform: scaleY(0); }
.js .stage-fork::before { transform: scaleX(0); }
.js .stage-fork i { opacity: 0; }
.stage.fork .stage-fork::after { transform: none; transition: transform 0.2s linear; }
.stage.fork .stage-fork::before { transform: none; transition: transform 0.4s var(--ease-out) 0.18s; }
.stage.fork .stage-fork i { opacity: 1; transition: opacity 0.25s 0.5s; }

.stage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2vw, 22px);
}

.lane {
  display: flex;
  flex-direction: column;
  border: 1px solid #333;
  background: rgba(8, 8, 8, 0.72);
  border-radius: 3px;
  box-shadow: 0 20px 40px -25px rgba(0, 0, 0, 0.9);
  min-width: 0;
}
.lane-mid { border-color: rgba(118, 185, 0, 0.55); box-shadow: 0 0 0 1px rgba(118, 185, 0, 0.12), 0 24px 60px -30px rgba(118, 185, 0, 0.35); }
.lane-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 12px 4px;
  background: #000;
  border-bottom: 1px solid #2c2c2c;
  font-family: var(--font-pixel);
  font-size: 19px;
  line-height: 1.1;
  color: #eaeaea;
}
.lane-mid .lane-bar { background: var(--green); color: #0b0b0b; border-bottom-color: var(--green); }
.lane-bar .tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.lane-body { padding: clamp(14px, 1.8vw, 20px); display: flex; flex-direction: column; gap: 14px; flex: 1; }

.lsteps { display: grid; gap: 10px; }
.lstep {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: border-color 0.35s var(--ease), background-color 0.35s var(--ease), opacity 0.35s var(--ease);
  opacity: 0.55;
}
.stage[data-active="1"] .lstep[data-step="1"],
.stage[data-active="2"] .lstep[data-step="2"],
.stage[data-active="3"] .lstep[data-step="3"] {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}
.stage.p4 .lstep { opacity: 1; }
.lstep-num { font-family: var(--font-mono); font-size: 12px; color: var(--s-faint); padding-top: 2px; }
.lstep-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 8px;
  font-size: 14px;
}
.lstep-head b { font-weight: 700; color: var(--s-text); letter-spacing: 0.01em; }
.lstep-head .mono { font-size: 12.5px; color: var(--s-dim); }
.lstep-head i { font-family: var(--font-math); font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--s-text);
  white-space: nowrap;
  text-decoration: line-through;
  text-decoration-color: transparent;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), border-color 0.4s var(--ease), background-color 0.4s var(--ease), color 0.4s var(--ease), text-decoration-color 0.4s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.chip .ps { color: var(--s-dim); }
.lane-mid .lstep[data-step="1"] .chip { height: 28px; padding: 0 8px; font-size: 12.5px; }
.stage.p1 .lstep[data-step="1"] .chip { opacity: 1; transform: none; }
.stage.settled .lane-mid .lstep[data-step="1"] .chip:not(.is-best) {
  opacity: 0.38;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.stage.settled .lane-mid .lstep[data-step="1"] .chip.is-best {
  border-color: var(--green);
  background: rgba(118, 185, 0, 0.14);
  transition-delay: 0s;
}

/* Verifier standings: each row's duel record and margin-weighted win rate */
.standings { display: grid; gap: 2px; }
.shead,
.srow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px minmax(36px, 80px) 34px;
  align-items: center;
  gap: 10px;
  padding: 2px 8px;
}
.shead {
  margin-bottom: 3px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--s-line);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--s-faint);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.shead span:nth-child(2) { text-align: center; }
.shead span:last-child { grid-column: 3 / -1; text-align: right; }
.stage.p2 .shead { opacity: 1; }
.srow {
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--s-dim);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s var(--ease-out), transform 0.6s var(--ease-out), background-color 0.4s var(--ease), color 0.4s var(--ease);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.srow code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow.pv code::before { content: "★"; display: inline-block; margin-right: 6px; color: var(--green); animation: pv-pop 0.5s var(--ease-out); }
@keyframes pv-pop { from { opacity: 0; transform: scale(0.2) rotate(-40deg); } }
.srow .rec { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.srow .rec b { display: inline-block; min-width: 1ch; font-weight: 600; color: var(--s-text); }
.srow .rec .l { margin-left: 7px; }
.srow .rec small { margin-left: 1px; font-size: 9.5px; color: var(--s-faint); }
.srow .sbar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.srow .sbar span { display: block; width: calc(var(--q, 0) * 100%); height: 100%; border-radius: inherit; background: rgba(255, 255, 255, 0.38); transition: width 0.3s var(--ease-out), background-color 0.4s var(--ease); }
.srow .q { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; transition: color 0.4s var(--ease); }
.stage.p2 .srow { opacity: 1; transform: none; }
.stage.settled .srow { transition-delay: 0s; }
.stage.settled .srow:not(.is-best) { opacity: 0.62; }
.stage.settled .srow.is-best { background: rgba(118, 185, 0, 0.16); color: var(--s-text); }
.stage.settled .srow.is-best .sbar span { background: var(--green); }
.stage.settled .srow.is-best .q { color: var(--green); font-weight: 700; }
.no-verify {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--s-faint);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.stage.p2 .no-verify { opacity: 1; }
/* The skipped Verify step fills its row, which is levelled with the Mid-Harness lane. */
.lane-base .lstep[data-step="2"] { align-items: stretch; }
.lane-base .lstep[data-step="2"] > div { display: flex; flex-direction: column; }
.lane-base .no-verify {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  text-align: center;
}

.exec-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--s-dim); }
.exec-row .chip { transition-delay: 0s; }
.stage.p3 .exec-row .chip { opacity: 1; transform: none; }
.lane-mid .exec-row .chip { border-color: var(--green); background: rgba(118, 185, 0, 0.14); }
.lane-base .exec-row .chip { border-color: rgba(229, 72, 77, 0.6); }
.exec-row .arrow { opacity: 0; transition: opacity 0.3s var(--ease); }
.stage.p3 .exec-row .arrow { opacity: 1; }

.term {
  margin-top: auto;
  padding: 12px 14px;
  min-height: calc(8 * 1.7em + 26px);
  border-radius: 6px;
  background: #050505;
  border: 1px solid #262626;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: #cfd3cb;
  overflow: hidden;
}
.term-line { position: relative; padding-left: 28px; white-space: pre; overflow: hidden; text-overflow: ellipsis; min-height: 1.7em; }
.term-line[data-prompt]::before { content: "t" attr(data-turn); position: absolute; left: 0; color: #5f655c; }
.term-line[data-type]:empty::before { content: none; }
.term-line .ps { color: #5aa0ff; }
.term-line.err { color: #ff6b6b; }
.term-line.ok { color: #9be15d; }
.term-line.dim { color: #7c8279; }
.term-line[data-type]:empty::after { content: ""; }
.term .caret {
  display: inline-block;
  width: 7px; height: 1.05em;
  margin-left: 2px;
  vertical-align: -2px;
  background: #cfd3cb;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
/* Every Mid-Harness command carries the sample → verify → forward badge. */
.term-line[data-badge] { padding-right: 90px; }
.term-line[data-badge]:not(:empty)::after {
  content: "8 → ψ → 1";
  position: absolute;
  top: 50%;
  right: 0;
  padding: 0 7px;
  border: 1px solid rgba(118, 185, 0, 0.45);
  border-radius: 999px;
  background: rgba(118, 185, 0, 0.12);
  color: #a9e45a;
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(-50%) scale(0.8);
  transition: opacity 0.25s var(--ease), transform 0.35s var(--ease-out);
}
.term-line[data-badge].vf:not(:empty)::after,
.term-line[data-badge].vd:not(:empty)::after { opacity: 1; transform: translateY(-50%); }
.term-line[data-badge].vf:not(:empty)::after { animation: verify-pulse 0.9s ease-in-out infinite; }
@keyframes verify-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(118, 185, 0, 0.55); }
  50% { box-shadow: 0 0 0 5px rgba(118, 185, 0, 0); }
}

.lturn { display: flex; align-items: center; gap: 8px; margin-bottom: -4px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--s-faint); }
.lturn b { padding: 1px 6px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 4px; color: var(--s-text); font-weight: 600; letter-spacing: 0.02em; text-transform: none; }
.lstep-head .ht { display: inline-block; }
.stage.swap .chip,
.stage.swap .srow { transition-delay: 0s; }

.lane-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.lane.finished .lane-status { opacity: 1; transform: none; }
.lane-base .lane-status { background: rgba(229, 72, 77, 0.14); color: #ff8a8d; border: 1px solid rgba(229, 72, 77, 0.35); }
.lane-mid .lane-status { background: rgba(118, 185, 0, 0.14); color: #a9e45a; border: 1px solid rgba(118, 185, 0, 0.4); }

/* Light pages get a light stage: white panels, dark text, and terminal colors dark enough to read on paper. */
html[data-theme="light"] .stage {
  --s-text: #1b1d18;
  --s-dim: #5d6358;
  --s-faint: #8d9288;
  --s-line: rgba(0, 0, 0, 0.08);
  --s-flash: rgba(60, 80, 20, 0.1);
  background:
    radial-gradient(900px 380px at 88% 118%, rgba(118, 185, 0, 0.14), transparent 62%),
    linear-gradient(180deg, #ffffff, #f6f7f2);
  border-color: rgba(20, 30, 10, 0.1);
  box-shadow: 0 40px 90px -50px rgba(30, 45, 10, 0.3);
}
html[data-theme="light"] .stage::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
}
html[data-theme="light"] .stage-replay { border-color: rgba(0, 0, 0, 0.14); }
html[data-theme="light"] .stage-task { border-color: rgba(0, 0, 0, 0.1); background: #fff; }
html[data-theme="light"] .stage.fork .stage-task { border-color: rgba(118, 185, 0, 0.6); }
html[data-theme="light"] .st-av { border-color: rgba(0, 0, 0, 0.14); background: #f3f4ef; }
html[data-theme="light"] .stage-fork::before,
html[data-theme="light"] .stage-fork::after { border-color: rgba(0, 0, 0, 0.22); }
html[data-theme="light"] .stage-fork i { border-top-color: rgba(0, 0, 0, 0.3); }
html[data-theme="light"] .lane { border-color: #dcdfd6; background: #fff; box-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.18); }
html[data-theme="light"] .lane-mid { border-color: rgba(118, 185, 0, 0.6); box-shadow: 0 0 0 1px rgba(118, 185, 0, 0.12), 0 24px 60px -30px rgba(118, 185, 0, 0.3); }
html[data-theme="light"] .lane-bar { background: #eef0ea; border-bottom-color: #dcdfd6; color: #1b1d18; }
html[data-theme="light"] .lane-mid .lane-bar { background: var(--green); border-bottom-color: var(--green); color: #0b0b0b; }
html[data-theme="light"] .lturn b { border-color: rgba(0, 0, 0, 0.14); }
html[data-theme="light"] .stage[data-active="1"] .lstep[data-step="1"],
html[data-theme="light"] .stage[data-active="2"] .lstep[data-step="2"],
html[data-theme="light"] .stage[data-active="3"] .lstep[data-step="3"] { border-color: rgba(0, 0, 0, 0.08); background: rgba(0, 0, 0, 0.025); }
html[data-theme="light"] .chip { border-color: rgba(0, 0, 0, 0.14); background: #fff; }
html[data-theme="light"] .stage.settled .lane-mid .lstep[data-step="1"] .chip:not(.is-best) { text-decoration-color: rgba(0, 0, 0, 0.35); }
html[data-theme="light"] .srow .sbar { background: rgba(0, 0, 0, 0.07); }
html[data-theme="light"] .srow .sbar span { background: rgba(0, 0, 0, 0.26); }
html[data-theme="light"] .stage.settled .srow.is-best .q { color: #4d7a00; }
html[data-theme="light"] .lane-base .no-verify { border-color: rgba(0, 0, 0, 0.14); }
html[data-theme="light"] .term { background: #f7f8f3; border-color: #e0e3da; color: #2a2d27; }
html[data-theme="light"] .term-line .ps { color: #1f6fd6; }
html[data-theme="light"] .term-line.err { color: #d03a3a; }
html[data-theme="light"] .term-line.ok { color: #3c7a00; }
html[data-theme="light"] .term-line.dim { color: #7a8075; }
html[data-theme="light"] .term-line[data-prompt]::before { color: #a0a59b; }
html[data-theme="light"] .term .caret { background: #2a2d27; }
html[data-theme="light"] .term-line[data-badge]:not(:empty)::after { border-color: rgba(118, 185, 0, 0.55); color: #3f6f00; }
html[data-theme="light"] .lane-base .lane-status { background: rgba(229, 72, 77, 0.1); color: #c43d3d; }
html[data-theme="light"] .lane-mid .lane-status { background: rgba(118, 185, 0, 0.12); color: #3f6f00; border-color: rgba(118, 185, 0, 0.5); }
/* ---------- Bands ---------- */
.band-green {
  --text: #121212;
  --text-2: rgba(18, 18, 18, 0.8);
  --text-3: rgba(18, 18, 18, 0.62);
  --line: rgba(18, 18, 18, 0.16);
  --line-2: rgba(18, 18, 18, 0.3);
  --crop: rgba(18, 18, 18, 0.6);
  --mega: #1a1a1a;
  --mega-stroke: rgba(0, 0, 0, 0.35);
  --accent: #121212;
  background: var(--green);
  color: var(--text);
}
.band-green .kicker::before { background: #121212; }
.band-green ::selection { background: rgba(0, 0, 0, 0.2); }

.band-ink {
  --bg: #0b0b0b;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --text: #ececec;
  --text-2: #b0b0b0;
  --text-3: #7a7a7a;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.2);
  --crop: rgba(255, 255, 255, 0.45);
  --mega: #ececec;
  --mega-stroke: rgba(255, 255, 255, 0.18);
  --accent: #8fd21e;
  --c-pairwise: #3cc0ad;
  --c-distilled: #6d8bff;
  background: #0b0b0b;
  color: var(--text);
  color-scheme: dark;
}
html[data-theme="dark"] .band-ink { background: #080808; }
.band-ink .seg { background: #141414; }
.band-ink .seg button[aria-selected="true"],
.band-ink .seg button[aria-pressed="true"] { background: #ececec; color: #0b0b0b; }

.section.band-green,
.section.band-ink,
.band-green + .section,
.band-ink + .section { border-top: 0; }

/* ---------- TL;DR ---------- */
.tldr-head .scramble { display: inline-block; white-space: nowrap; }
.tldr-head .sc { display: inline-block; text-align: center; }
.beats {
  margin: clamp(22px, 2.6vw, 34px) auto 0;
  max-width: 1000px;
  font-size: clamp(1.45rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
}
.beat { display: inline-block; margin: 0.06em 0.1em; }
.beat i { margin-right: 0.12em; font-family: var(--font-math); font-size: 1.08em; }
.beat.hl { position: relative; z-index: 0; padding: 0 0.24em; color: var(--green); }
.beat.hl::before {
  content: "";
  position: absolute;
  inset: 0.02em 0 -0.04em;
  z-index: -1;
  border-radius: 6px;
  background: #121212;
  transform-origin: left center;
}
.js .tldr-head .kicker,
.js .tldr-head .mega { opacity: 0; transform: translateY(18px); }
.tldr-head.play .kicker,
.tldr-head.play .mega { opacity: 1; transform: none; transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out); }
.tldr-head.play .mega { transition-delay: 0.08s; }
.js .beat { opacity: 0; transform: translateY(0.5em); filter: blur(10px); }
.tldr-head.play .beat {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition: opacity 0.6s var(--ease-out), transform 0.75s var(--ease-out), filter 0.6s var(--ease-out);
  transition-delay: calc(0.9s + var(--b, 0) * 0.42s);
}
.js .beat.hl { color: var(--text); }
.js .beat.hl::before { transform: scaleX(0); }
.tldr-head.play .beat.hl {
  color: var(--green);
  transition: opacity 0.6s var(--ease-out), transform 0.75s var(--ease-out), filter 0.6s var(--ease-out), color 0.25s var(--ease);
  transition-delay: 1.74s, 1.74s, 1.74s, 2.3s;
}
.tldr-head.play .beat.hl::before { transform: scaleX(1); transition: transform 0.55s var(--ease-out) 2.1s; }

/* Findings 01–04 share one material: beige, three ambient glows, and a slowly turning border. */
.col,
.tl-spot {
  --bg: #fbf7ee;
  --surface: #fffdf7;
  --surface-2: #efe7d6;
  --text: #1d1b15;
  --text-2: rgba(29, 27, 21, 0.74);
  --text-3: rgba(29, 27, 21, 0.52);
  --line: rgba(60, 50, 20, 0.1);
  --line-2: rgba(60, 50, 20, 0.2);
  --accent: #4d7a00;
  position: relative;
  isolation: isolate;
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(75% 95% at 0% 0%, rgba(118, 185, 0, 0.3), transparent 62%) padding-box,
    radial-gradient(65% 85% at 100% 100%, rgba(255, 95, 162, 0.24), transparent 64%) padding-box,
    radial-gradient(45% 55% at 78% 4%, rgba(96, 140, 255, 0.16), transparent 70%) padding-box,
    linear-gradient(155deg, #ece6d1, #e9e0cb 48%, #ecdcd5) padding-box,
    conic-gradient(from var(--tl-a), rgba(118, 185, 0, 0.95), rgba(255, 255, 255, 0.55) 25%, rgba(255, 95, 162, 0.9) 50%, rgba(255, 255, 255, 0.55) 75%, rgba(118, 185, 0, 0.95)) border-box;
  color: var(--text);
  box-shadow: 0 40px 80px -36px rgba(30, 60, 0, 0.55);
  animation: tl-spin 12s linear infinite;
}
.cols3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  counter-reset: tl;
}
.col {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.4vw, 28px);
  counter-increment: tl;
}
.col > * { position: relative; z-index: 1; }
.col::after {
  content: counter(tl, decimal-leading-zero);
  position: absolute;
  top: clamp(10px, 1.4vw, 16px);
  right: clamp(16px, 2vw, 24px);
  z-index: 0;
  font-size: clamp(3.8rem, 6.4vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(18, 18, 18, 0.28);
  pointer-events: none;
}
/* Blocks rise in one after another, 01 → 04; initTldr sets the order. */
.js .col,
.js .tl-spot { opacity: 0; transform: translateY(56px) scale(0.94); filter: blur(8px); }
.col.play,
.tl-spot.play {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition: opacity 0.8s var(--ease-out), transform 1.05s cubic-bezier(0.34, 1.28, 0.64, 1), filter 0.8s var(--ease-out);
}
.js .col::after { opacity: 0; transform: translateY(40%); }
.col.play::after {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out) 0.25s, transform 1s var(--ease-out) 0.25s;
}
.js .col .col-foot,
.js .col .hbar-axis { opacity: 0; }
.col.play .col-foot,
.col.play .hbar-axis { opacity: 1; transition: opacity 0.6s var(--ease) 0.9s; }
.col-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  min-height: 2.6em;
  padding-right: clamp(70px, 7.2vw, 108px);
}
.col h3 {
  margin: 18px 0 22px;
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}
.col-foot { margin-top: auto; padding-top: 18px; font-size: 0.93rem; color: var(--text-2); }

.hbars { display: grid; gap: 9px; }
.hbar-group + .hbar-group { margin-top: 8px; }
.hbar {
  display: grid;
  grid-template-columns: minmax(96px, 36%) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}
.hbar-label { color: var(--text-2); line-height: 1.2; }
.hbar-track { position: relative; height: 16px; }
.hbar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc((var(--v) - 45) / 30 * 100%);
  overflow: hidden;
  background: rgba(60, 50, 20, 0.22);
  transform-origin: left center;
}
.js .hbar-fill { transform: scaleX(0); }
.col.play .hbar-fill {
  transform: scaleX(1);
  transition: transform 1.2s cubic-bezier(0.34, 1.4, 0.64, 1);
  transition-delay: calc(400ms + var(--d, 0) * 160ms);
}
.hbar.hi .hbar-fill { background: linear-gradient(90deg, #4f8a00, #76b900); }
.hbar.hi .hbar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, 0.55) 50%, transparent 75%);
  transform: translateX(-110%);
}
.col.play .hbar.hi .hbar-fill::after {
  animation: tl-shine 0.9s var(--ease) forwards;
  animation-delay: calc(1.5s + var(--d, 0) * 160ms);
}
@keyframes tl-shine { to { transform: translateX(110%); } }
.hbar.hi .hbar-label { color: var(--text); font-weight: 600; }
.hbar-val { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; min-width: 3.6em; text-align: right; font-variant-numeric: tabular-nums; }
.hbar.hi .hbar-val { color: #3f6f00; }
.hbar-val.is-counted { animation: tl-pop 0.5s var(--ease-out); }
@keyframes tl-pop { 40% { transform: scale(1.16); } }
.hbar-axis {
  display: grid;
  grid-template-columns: minmax(96px, 36%) 1fr auto;
  gap: 10px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
}
.hbar-axis .ticks { display: flex; justify-content: space-between; border-top: 1px solid var(--line-2); padding-top: 3px; }
.hbar-axis .pad { min-width: 3.6em; }

/* TL;DR spotlight: the one-token verifier finding */
@property --tl-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.tl-spot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: clamp(36px, 4.4vw, 56px);
  padding: clamp(22px, 3vw, 36px);
}
@keyframes tl-spin { to { --tl-a: 360deg; } }
/* A faint dot grid that fades out from the headline corner. */
.col::before,
.tl-spot::before,
.open-prob::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.3px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(90% 70% at 20% 0%, #000, transparent 75%);
  mask-image: radial-gradient(90% 70% at 20% 0%, #000, transparent 75%);
  pointer-events: none;
}
.col::before,
.tl-spot::before { background-image: radial-gradient(rgba(70, 60, 20, 0.14) 1px, transparent 1.3px); }
/* Numbered like the three findings above it. */
.tl-spot::after {
  content: "04";
  position: absolute;
  top: clamp(14px, 2vw, 24px);
  right: clamp(22px, 3vw, 36px);
  z-index: 0;
  font-size: clamp(3.8rem, 6.4vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(18, 18, 18, 0.28);
  pointer-events: none;
}
.js .tl-spot::after { opacity: 0; transform: translateY(40%); }
.tl-spot.play::after { opacity: 1; transform: none; transition: opacity 0.7s var(--ease-out) 0.25s, transform 1s var(--ease-out) 0.25s; }
.tl-spot > * { position: relative; z-index: 1; }
.tl-spot-label { padding-right: clamp(70px, 7.2vw, 108px); font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.tl-spot h3 { margin-top: 14px; font-size: clamp(1.55rem, 2.8vw, 2.3rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; color: #16150f; text-wrap: balance; }
.tl-spot h3 em { font-style: normal; color: #4c8700; text-shadow: 0 0 26px rgba(118, 185, 0, 0.35); }
.tl-spot-sub { margin-top: 12px; max-width: 560px; font-size: 1.02rem; line-height: 1.5; color: var(--text-2); }
.tl-spot-sub code { padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 5px; background: rgba(255, 255, 255, 0.55); font-size: 0.88em; color: var(--text); }
.tl-spot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 20px; }
/* Pink marks TypeSafe (Jev) references. */
.tl-jev {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1.5px solid var(--pink);
  border-radius: 999px;
  background: rgba(255, 95, 162, 0.1);
  font-size: 0.98rem;
  color: var(--text);
  box-shadow: 0 0 24px -8px rgba(255, 95, 162, 0.55);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.3s var(--ease);
}
.tl-jev .ts,
.tl-jev b { color: #d42f7a; transition: color 0.2s var(--ease); }
.tl-jev b { font-weight: 800; }
.tl-jev:hover { background: var(--pink); color: #fff; box-shadow: 0 0 0 5px rgba(255, 95, 162, 0.2), 0 0 30px -4px rgba(255, 95, 162, 0.7); }
.tl-jev:hover .ts,
.tl-jev:hover b { color: #fff; }
.tl-spot-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
/* The race sits on the card as frosted glass, so the glows show through. */
.tl-spot .race {
  margin-top: 10px;
  border-color: rgba(60, 50, 20, 0.14);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 40px -30px rgba(60, 50, 20, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.tl-spot .race .race-viz {
  background:
    linear-gradient(rgba(60, 50, 20, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(60, 50, 20, 0.05) 1px, transparent 1px) 0 0 / 28px 28px;
  background-color: rgba(90, 75, 40, 0.04);
}
.tl-spot .rc-lane { border-color: rgba(60, 50, 20, 0.16); background: linear-gradient(180deg, #e2d9c4, #d9cfb6); }
.tl-spot .rc-one.done { box-shadow: 0 0 0 4px var(--green-soft), 0 0 36px -8px rgba(118, 185, 0, 0.55); }
.tl-spot .mech-replay { background: rgba(255, 255, 255, 0.3); }
.tl-spot ::selection { background: rgba(118, 185, 0, 0.3); }
.tl-stat { padding: 6px 0 4px 14px; border-left: 1px solid; border-image: linear-gradient(180deg, rgba(60, 50, 20, 0.24), rgba(60, 50, 20, 0.02)) 1; }
.tl-stat b { display: block; font-size: clamp(1.8rem, 3.2vw, 2.7rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #86c416, #5f9600 55%, #3f6f00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-stat b small { margin-left: 3px; font-size: 0.42em; font-weight: 700; letter-spacing: 0; color: var(--text-3); }
.tl-stat > span { display: block; margin-top: 8px; font-size: 0.86rem; line-height: 1.35; color: var(--text-2); }
.tl-spot-note { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.03em; color: var(--text-3); }
.band-note {
  margin-top: clamp(34px, 4vw, 50px);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

/* ---------- Method ---------- */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 3vw, 40px); }
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2px 0 0 clamp(16px, 1.6vw, 22px);
  border-left: 1px solid var(--line-2);
}
.step-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.step h4 {
  margin: 22px 0 12px;
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.step p { flex-grow: 1; color: var(--text-2); font-size: 1rem; }
.step h4 i { margin-right: 0.12em; font-family: var(--font-math); font-size: 1.08em; }
.glyph {
  align-self: flex-end;
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  margin-top: 26px;
  background: var(--green);
  color: #0e0e0e;
  font-family: var(--font-math);
  font-size: 30px;
  font-style: italic;
  line-height: 1;
  box-shadow: 4px 4px 0 var(--text);
}
.glyph.mono-g { font-family: var(--font-mono); font-style: normal; font-size: 20px; font-weight: 700; }

/* Mid-step rail: model → verifier → harness */
.midrail {
  --mr-h: 184px;
  --mr-g: 50px;
  --mr-gate: 62px;
  --mr-line: #c8cac4;
  --mr-fan: #a3a79f;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1.55fr) auto minmax(0, 1fr) auto;
  max-width: 800px;
  height: var(--mr-h);
  margin: clamp(38px, 4.4vw, 58px) auto clamp(62px, 6.4vw, 80px);
}
html[data-theme="dark"] .midrail { --mr-line: #3b3b3b; --mr-fan: #62675f; }
.mr-node { position: relative; display: flex; align-items: center; justify-content: center; }
.mr-gate { z-index: 1; }
.mr-glyph {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--mr-g);
  height: var(--mr-g);
  border: 1px solid var(--mr-line);
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-math);
  font-size: calc(var(--mr-g) * 0.54);
  font-style: italic;
  line-height: 1;
}
.mr-glyph.mono-g { font-family: var(--font-mono); font-size: calc(var(--mr-g) * 0.36); font-style: normal; font-weight: 700; }
.mr-gate .mr-glyph {
  width: var(--mr-gate);
  height: var(--mr-gate);
  border-color: transparent;
  background: var(--green);
  color: #0e0e0e;
  font-size: calc(var(--mr-gate) * 0.56);
  box-shadow: 4px 4px 0 var(--text);
}
.mr-ring {
  position: absolute;
  inset: -1px;
  border: 2px solid var(--green);
  opacity: 0;
  pointer-events: none;
}
.mr-node > b,
.mr-node > small,
.mr-step {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  line-height: 1.2;
  white-space: nowrap;
}
.mr-node > b {
  top: calc(50% + var(--mr-gate) / 2 + 13px);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}
.mr-node > small {
  top: calc(50% + var(--mr-gate) / 2 + 31px);
  font-size: 12px;
  color: var(--text-3);
}
.mr-gate > b { color: var(--text); }
.mr-gate > small { color: var(--accent); font-weight: 700; }
.mr-step {
  bottom: calc(50% + var(--mr-gate) / 2 + 12px);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mr-step b { display: inline-block; color: var(--text); }
/* Return loop: the new state goes back to the model, closing the multi-turn cycle. */
.mr-loop { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mr-back,
.mr-back-head { fill: none; stroke: var(--mr-fan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s; }
.midrail.back .mr-back,
.midrail.back .mr-back-head { stroke: var(--c-distilled); }
.mr-obs { fill: var(--c-distilled); opacity: 0; filter: drop-shadow(0 0 6px rgba(58, 97, 238, 0.9)); transition: opacity 0.15s; }
.mr-obs.go { opacity: 1; }
.mr-loop-tag {
  position: absolute;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--text-3);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  transition: color 0.3s;
}
.mr-loop-tag i { font-family: var(--font-math); font-size: 1.15em; }
.mr-loop-tag sub { font-size: 0.72em; }
.midrail.back .mr-loop-tag { color: var(--c-distilled); }
.js .midrail .mr-back { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.js .midrail .mr-back-head,
.js .midrail .mr-loop-tag { opacity: 0; }
.midrail.open .mr-back { stroke-dashoffset: 0; transition: stroke-dashoffset 0.9s var(--ease-out), stroke 0.3s; }
.midrail.open .mr-back-head { opacity: 1; transition: opacity 0.3s 0.75s, stroke 0.3s; }
.midrail.open .mr-loop-tag { opacity: 1; transition: opacity 0.4s 0.5s, color 0.3s; }
.mr-link { position: relative; }
.mr-link svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mr-path { fill: none; stroke: var(--mr-line); stroke-width: 1.4; transition: stroke 0.3s, opacity 0.3s; }
.mr-head { fill: none; stroke: var(--mr-line); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.mr-in .mr-path { stroke: var(--mr-fan); stroke-width: 2.2; }
.midrail.cut .mr-out .mr-path,
.midrail.cut .mr-head { stroke: var(--text-3); stroke-width: 2.2; }
.mr-in.pick .mr-path { opacity: 0.35; }
.mr-in .mr-path.win { stroke: var(--accent); stroke-width: 3; opacity: 1; }
.mr-tag {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-math);
  font-size: 16px;
  font-style: italic;
  line-height: 1;
  color: var(--text-3);
  white-space: nowrap;
}
.mr-tag sup { font-size: 0.68em; font-style: normal; }
.mr-in .mr-tag { bottom: calc(50% + var(--mr-h) * 0.42 + 4px); }
.mr-out .mr-tag { bottom: calc(50% + 9px); }
.mr-dot {
  fill: var(--text-3);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.25s, transform 0.3s var(--ease-out), fill 0.2s;
}
.mr-dot.go { opacity: 1; }
.mr-dot.won { fill: var(--green); transform: scale(1.6); }
.mr-dot.out { opacity: 0; transform: scale(0.2); }
.mr-star { fill: var(--green); opacity: 0; transition: opacity 0.15s; filter: drop-shadow(0 0 5px rgba(118, 185, 0, 0.9)); }
.mr-star.go { opacity: 1; }
html:not(.js) .mr-link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1.4px solid var(--mr-line);
}

/* Entrance: a plain model → harness line is drawn, then the verifier cuts into the middle of it. */
.js .midrail .mr-model,
.js .midrail .mr-harness { opacity: 0; transform: translateY(10px); }
.midrail.play .mr-model,
.midrail.play .mr-harness { opacity: 1; transform: none; transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out); }
.midrail.play .mr-harness { transition-delay: 0.1s; }
.js .midrail .mr-path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.js .midrail .mr-in .mr-path + .mr-path { visibility: hidden; }
.midrail.cut .mr-in .mr-path + .mr-path { visibility: visible; }
.midrail.play .mr-in .mr-path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.6s linear 0.3s, stroke 0.3s, opacity 0.3s; }
.midrail.play .mr-out .mr-path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.55s linear 0.9s, stroke 0.3s, opacity 0.3s; }
.js .midrail .mr-head { opacity: 0; }
.midrail.play .mr-head { opacity: 1; transition: opacity 0.2s 1.42s; }
.js .midrail .mr-gate .mr-glyph { opacity: 0; transform: scale(0.2) rotate(-18deg); }
.midrail.cut .mr-gate .mr-glyph { opacity: 1; transform: none; transition: opacity 0.2s, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.midrail.cut .mr-ring { animation: mr-ring 0.9s var(--ease-out) 0.15s; }
.js .midrail .mr-gate > b,
.js .midrail .mr-gate > small,
.js .midrail .mr-step,
.js .midrail .mr-tag { opacity: 0; }
.midrail.cut .mr-gate > b,
.midrail.cut .mr-gate > small { opacity: 1; transition: opacity 0.4s 0.3s; }
.midrail.open .mr-step,
.midrail.open .mr-tag { opacity: 1; transition: opacity 0.5s var(--ease-out); }
@keyframes mr-ring {
  from { opacity: 0.9; transform: scale(1); }
  to { opacity: 0; transform: scale(1.8); }
}

/* Verification mechanisms */
.mech {
  margin-top: clamp(80px, 9vw, 120px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.mech-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 2.4vw, 26px) clamp(18px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
}
.mech-head h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -0.02em; line-height: 1.15; }
.mech-head p { margin-top: 6px; color: var(--text-2); font-size: 0.98rem; max-width: 560px; }
.mech-head i { font-family: var(--font-math); font-size: 1.08em; }
.mech-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mech-replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.3s var(--ease);
}
.mech-replay svg { width: 14px; height: 14px; }
.mech-replay:hover { border-color: var(--green); color: var(--text); }
.mech-replay.ended { border-color: var(--green-line); color: var(--text); box-shadow: 0 0 0 4px var(--green-soft); }
.mech-replay.spin svg { animation: mv-spin 0.6s var(--ease-out); }
@keyframes mv-spin { to { transform: rotate(-360deg); } }
/* One-line summary of the selected mechanism */
.mech-sum { padding: 13px clamp(18px, 2.6vw, 30px); border-bottom: 1px solid var(--line); }
.mech-sum .mech-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 1rem; color: var(--text-2); animation: mv-sum-in 0.35s var(--ease-out); }
.mech-sum .mech-panel[hidden] { display: none; }
.mech-sum .mech-panel > b { font-weight: 700; color: var(--text); }
.mech-sum i { font-family: var(--font-math); font-size: 1.08em; }
.mech-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.mech-chips span { padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.mech-chips b { font-weight: 700; color: var(--accent); }
@keyframes mv-sum-in { from { opacity: 0; transform: translateY(4px); } }
.mech-note { margin-top: 10px; font-size: 0.85rem; color: var(--text-3); text-align: center; }
.mech-viz {
  position: relative;
  padding: clamp(22px, 3.4vw, 44px);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 28px;
  background-color: var(--surface-2);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.mv-exam { width: 100%; max-width: 900px; margin: 0 auto; }
.mv-point { width: 100%; max-width: 780px; margin: 0 auto; }
.mv-pair { display: grid; gap: 18px; }
@media (min-width: 1000px) {
  .mv-exam, .mv-point { padding: 20px 24px; }
  .mv-exam .mv-q { font-size: 1.12rem; }
  .mv-exam .mv-opts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; }
  .mv-exam .mv-opts li { padding: 8px 10px; font-size: 13.5px; }
  .mv-point .mv-plist li { padding: 5px 10px; font-size: 13.5px; }
  .mv-pair { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); grid-template-rows: auto auto; column-gap: clamp(28px, 4vw, 56px); align-items: center; }
  .mv-pair .mv-match { grid-column: 1; grid-row: 1; align-self: end; }
  .mv-pair .mv-key { grid-column: 1; grid-row: 2; align-self: start; justify-content: flex-start; }
  .mv-pair .mv-league-wrap { grid-column: 2; grid-row: 1 / span 2; }
}
html[data-theme="dark"] .mech-viz {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px;
  background-color: #111;
}
.mech-viz > *,
.mv-pair > * { min-width: 0; }
.mech-viz i { font-family: var(--font-math); }
.mech-viz sup { font-style: normal; }
.mech-viz::after,
.race-viz::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
}
.mech-viz.playing::after,
.race-viz.playing::after { opacity: 1; animation: mv-progress var(--dur, 3s) linear forwards; }
.mech-viz.played::after,
.race-viz.played::after { transform: scaleX(1); transition: opacity 0.6s var(--ease) 0.2s; }
@keyframes mv-progress { to { transform: scaleX(1); } }
.mv-card {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out);
}
.mv-card.shown { opacity: 1; transform: none; }
.mv-focus {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border: 1.5px solid var(--text-3);
  border-radius: 7px;
  background: var(--surface-2);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s var(--ease-out), width 0.24s var(--ease-out), height 0.24s var(--ease-out), opacity 0.25s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
@keyframes mv-pop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.18); }
  100% { transform: none; }
}
.mv-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mv-card-head .psi,
.mv-answer .psi { font-family: var(--font-math); font-style: italic; font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--accent); }
.mv-answer .psi { font-size: 15px; }
.mv-card-head .psi sub { font-size: 0.6em; }
.mv-legend { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); text-align: center; }

/* Listwise: a multiple-choice question */
.mv-q { margin-top: 8px; font-size: 0.98rem; font-weight: 600; color: var(--text); }
.mv-opts-wrap { position: relative; margin-top: 12px; }
.mv-opts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mv-opts li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-out), background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.3s var(--ease);
  transition-delay: calc(0.12s + var(--i, 0) * 45ms);
}
.mv-opts code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-opts .bub {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  flex: none;
  width: 22px; height: 22px;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.mv-opts .bub::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  z-index: -1;
  border-radius: 50%;
  background: var(--green);
  transform: scale(0);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mv-exam.shown .mv-opts li { opacity: 1; transform: none; }
.mv-exam.ingest .mv-opts li,
.mv-exam.answered .mv-opts li { transition-delay: 0s; }
.mv-exam.read .mv-opts li { color: var(--text); animation: mv-read 0.6s var(--ease-out); }
@keyframes mv-read { from { background-color: rgba(118, 185, 0, 0.24); } }
.mv-exam.shown .mv-opts li.is-lose { opacity: 0.4; }
.mv-opts li.is-win { border-color: var(--green-line); background: var(--green-soft); color: var(--text); }
.mv-opts li.is-win .bub { border-color: var(--green); color: #0b0b0b; }
.mv-opts li.is-win .bub::before { transform: scale(1); }
/* One frame around every candidate, then one scan line over all of them. */
.mv-opts-wrap::before {
  content: "";
  position: absolute;
  inset: -7px -9px;
  border: 1.5px solid var(--green-line);
  border-radius: 11px;
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease-out);
}
.mv-exam.ingest .mv-opts-wrap::before { opacity: 1; transform: none; }
.mv-exam.answered .mv-opts-wrap::before { opacity: 0; }
.mv-opts-wrap::after {
  content: "";
  position: absolute;
  inset: -7px -9px;
  border-radius: 11px;
  background: rgba(118, 185, 0, 0.1);
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.mv-exam.scanning .mv-opts-wrap::after { opacity: 1; animation: mv-wash 1.2s linear forwards; }
@keyframes mv-wash { to { transform: scaleY(1); } }
.mv-scan {
  position: absolute;
  left: -9px;
  right: -9px;
  top: -26px;
  z-index: 2;
  height: 26px;
  border-bottom: 2px solid var(--green);
  background: linear-gradient(180deg, rgba(118, 185, 0, 0), rgba(118, 185, 0, 0.2));
  box-shadow: 0 8px 18px -8px rgba(118, 185, 0, 0.75);
  opacity: 0;
  pointer-events: none;
}
.mv-exam.scanning .mv-scan { animation: mv-scan 1.2s linear forwards; }
@keyframes mv-scan {
  0% { top: -26px; opacity: 0; }
  8%, 92% { opacity: 1; }
  100% { top: calc(100% - 26px); opacity: 0; }
}
.mv-answer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mv-answer code { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--text-2); }
.mv-ans {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--line);
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--text);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.mv-exam.answered .mv-ans { background: var(--green); color: #0b0b0b; animation: mv-pop 0.45s var(--ease-out); }

/* Pointwise: one candidate per call */
.mv-calls b { color: var(--text); font-weight: 600; }
.mv-plist-wrap { position: relative; margin-top: 10px; }
.mv-plist { position: relative; z-index: 1; display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.mv-plist li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) minmax(60px, 260px) 44px;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(6px);
  transition: transform 0.65s var(--ease-out), opacity 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.mv-point.shown li { opacity: 0.45; transform: none; transition-delay: calc(0.12s + var(--i, 0) * 40ms); }
.mv-point.scoring li,
.mv-point li.done { transition-delay: 0s; }
.mv-point li.active,
.mv-point li.done { opacity: 1; }
.mv-point li.active { color: var(--text); }
.mv-plist .id { font-size: 14px; color: var(--text-3); }
.mv-plist code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-plist .bar { height: 7px; border-radius: 2px; background: var(--line); overflow: hidden; }
.mv-plist .bar span { display: block; height: 100%; width: calc(var(--v, 0) * 10%); background: var(--c-pointwise); transition: width 0.4s var(--ease-out); }
.mv-plist .sc { text-align: right; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.mv-point .mv-focus { border-color: var(--c-pointwise); }
.mv-point.scoring .mv-focus { opacity: 1; }
.mv-plist li.is-win { border-color: var(--green-line); background: var(--green-soft); color: var(--text); }
.mv-plist li.is-win .bar span { background: var(--green); }
.mv-plist li.is-win code::after {
  content: "arg max";
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--green);
  color: #0b0b0b;
  font-size: 10px;
  font-weight: 700;
}
.mv-point li.is-lose { opacity: 0.45; }

/* Pairwise: a league of one-on-one duels */
.mv-match { padding: 10px 14px 10px; }
.mv-match-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.mv-match-top .stg { color: var(--text-2); font-weight: 600; }
.mv-match-top .mno { margin-left: auto; }
.mv-match-top .mno b { color: var(--text); }
.mv-match-top .live { display: inline-flex; align-items: center; gap: 6px; color: #e5484d; font-weight: 600; }
.mv-match-top .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.2s steps(1) infinite; }
.mv-match.ft .live { color: var(--accent); }
.mv-match.ft .live::before { animation: none; }
.mv-match-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 64px;
  margin-top: 8px;
}
.mv-match .side { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; font-family: var(--font-mono); font-size: 13px; color: var(--text-2); transition: color 0.25s var(--ease); animation: mv-in-l 0.34s var(--ease-out) both; }
.mv-match .side.r { align-items: flex-end; animation-name: mv-in-r; }
.mv-match .side code { max-width: 100%; }
@keyframes mv-in-l { from { opacity: 0; transform: translateX(-16px); } }
@keyframes mv-in-r { from { opacity: 0; transform: translateX(16px); } }
.mv-match .side code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-match .side.won { color: var(--text); font-weight: 700; }
.mv-match .id { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 24px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 5px; font-size: 13px; color: var(--text-2); background: var(--surface-2); }
.mv-match .side.won .id { border-color: var(--green); background: var(--green); color: #0b0b0b; }
.mv-match .score { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); color: var(--text-3); font-size: 12px; text-transform: uppercase; }
.mv-match .score b {
  display: grid;
  place-items: center;
  width: 32px; height: 36px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mv-match .score b.win { background: var(--green); color: #0b0b0b; }
.mv-match .score.done b { animation: mv-flip 0.36s var(--ease-out) both; }
.mv-match .score.done b:last-child { animation-delay: 0.07s; }
@keyframes mv-flip { from { transform: perspective(160px) rotateX(90deg); } }
.mv-match .score.done span { font-size: 20px; font-weight: 700; color: var(--text); }
.mv-json { margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-pivots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; grid-column: 1 / -1; }
.mv-pv { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--green-line); border-radius: 999px; background: var(--green-soft); font-family: var(--font-mono); font-size: 11.5px; color: var(--text); }
.mv-pv b { color: var(--accent); }
.mv-champ { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; grid-column: 1 / -1; font-family: var(--font-mono); font-size: 14px; color: var(--text); }
.mv-champ .trophy { width: 26px; height: 26px; color: var(--accent); animation: mv-trophy 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes mv-trophy { from { transform: scale(0) rotate(-25deg); } }
.mv-champ .id { border-color: var(--green); background: var(--green); color: #0b0b0b; }
.mv-champ code { font-weight: 700; }
.mv-champ-q { font-size: 12px; color: var(--text-2); }
.mv-champ-q b { color: var(--accent); }

.mv-league-wrap { overflow-x: auto; scrollbar-width: thin; }
.mv-league { width: 100%; border-collapse: separate; border-spacing: 3px; }
.mv-league th, .mv-league td { padding: 0; font-weight: 400; }
.mv-league thead th { height: 22px; vertical-align: bottom; font-size: 13px; color: var(--text-3); text-align: center; }
.mv-league thead th.qh { padding-left: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; text-align: left; }
/* Column labels are the commands themselves, slanted so all eight fit above the grid. */
.mv-league thead th.ch { position: relative; height: 92px; }
.mv-league thead th.ch::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 5px; background: var(--line-2); }
.mv-league th.ch .xl {
  position: absolute;
  left: calc(50% + 2px);
  bottom: 9px;
  transform: rotate(-42deg);
  transform-origin: 0 50%;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}
.mv-league thead th.hot .xl,
.mv-league thead th.hover .xl { color: var(--accent); font-weight: 700; }
.mv-league .rh {
  padding-right: 8px;
  text-align: left;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}
.mv-league .rh > * { vertical-align: middle; }
.mv-league .rh .id { display: inline-block; min-width: 24px; margin-right: 6px; font-size: 13px; color: var(--text-3); }
.mv-league .rh .star { display: inline-block; width: 12px; font-size: 10px; color: var(--accent); opacity: 0; transform: scale(0.4); transition: opacity 0.3s var(--ease), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.mv-league tr.pv .star { opacity: 1; transform: none; }
.mv-league tr.hot .rh,
.mv-league tr.hover .rh { color: var(--text); font-weight: 700; }
.mv-league tr.hot .rh .id,
.mv-league tr.hover .rh .id { color: var(--accent); }
.mv-league td.c {
  width: 30px;
  height: 26px;
  border-radius: 4px;
  background: var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-align: center;
  color: var(--text-3);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.mv-league td.c.diag { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.mv-league td.c.nm { background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 6px); }
.mv-league td.c.l { background: var(--surface-2); color: var(--text-3); }
.mv-league td.c.w { background: var(--green); color: #0b0b0b; font-weight: 700; }
.mv-league td.c.rg { box-shadow: inset 0 0 0 1.5px var(--c-pairwise); }
.mv-league td.c.w,
.mv-league td.c.l { animation: mv-cell 0.38s var(--ease-out); }
@keyframes mv-cell { from { transform: scale(0.3); } 60% { transform: scale(1.12); } }
.mv-league td.c.hover { box-shadow: 0 0 0 2px var(--text); }
.mv-league td.c.live { box-shadow: 0 0 0 2px var(--accent); animation: mv-pulse 0.8s var(--ease) infinite alternate; }
@keyframes mv-pulse { to { box-shadow: 0 0 0 2px transparent; } }
.mv-league td.q { width: 96px; padding-left: 8px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.mv-league td.q .t { display: inline-block; vertical-align: middle; width: 50px; height: 6px; margin-right: 6px; border-radius: 2px; background: var(--line); overflow: hidden; }
.mv-league td.q .t span { display: block; height: 100%; width: calc(var(--w, 0) * 1%); background: var(--c-pairwise); transition: width 0.4s var(--ease-out); }
.mv-league td.q b { font-weight: 600; font-variant-numeric: tabular-nums; }
.mv-league tr.champ .rh { color: var(--text); font-weight: 700; }
.mv-league tr.champ .rh .id { color: var(--accent); }
.mv-league tr.champ td.q .t span { background: var(--green); }
.mv-league tr.champ td.q b { color: var(--accent); }
.mv-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.mv-key span { display: inline-flex; align-items: center; gap: 6px; }
.mv-key .k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.mv-key .k-win { background: var(--green); }
.mv-key .k-ring { background: var(--line); box-shadow: inset 0 0 0 1.5px var(--c-pairwise); }
.mv-key .k-nm { background: repeating-linear-gradient(135deg, var(--line-2) 0 2px, transparent 2px 5px); }
.mv-key .k-star { color: var(--accent); }

/* ---------- Charts ---------- */
.chart-card {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: clamp(18px, 2.6vw, 30px);
  min-width: 0;
}
.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 18px;
  margin-bottom: 16px;
}
.chart-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.chart-title { margin-top: 6px; font-size: clamp(1.15rem, 1.8vw, 1.4rem); letter-spacing: -0.02em; line-height: 1.2; max-width: 620px; text-wrap: balance; }
.chart { position: relative; width: 100%; min-height: 240px; }
.chart svg { overflow: visible; }
.chart-card figcaption { margin-top: 14px; font-size: 0.88rem; color: var(--text-3); line-height: 1.55; }
.chart-card figcaption b { color: var(--text-2); font-weight: 600; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 14px; }
/* Three categorical widths read better on a narrower plot than across the whole card. */
#chart-width,
#card-width figcaption { max-width: 860px; margin-inline: auto; }
#legend-width { justify-content: center; }
.legend button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 11px 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease);
}
.legend button:hover,
.legend button.is-on { border-color: var(--line-2); color: var(--text); background: var(--surface-2); }
.legend svg { width: 16px; height: 16px; overflow: visible; }

.mh-chart { font-family: var(--font-sans); }
.mh-chart .grid line { stroke: var(--line); shape-rendering: crispEdges; }
.mh-chart .axis-line { stroke: var(--line-2); shape-rendering: crispEdges; }
.mh-chart .tick { fill: var(--text-3); font-family: var(--font-mono); font-size: 11.5px; }
.mh-chart .axis-title { fill: var(--text-2); font-size: 12.5px; font-weight: 600; }
.mh-chart .ref { stroke: var(--text-3); stroke-dasharray: 4 4; stroke-width: 1.2; }
.mh-chart .ref-label { fill: var(--text-3); font-family: var(--font-mono); font-size: 11px; }
.mh-chart .s { --c: var(--c-base); transition: opacity 0.25s var(--ease); }
.mh-chart .k-base { --c: var(--c-base); }
.mh-chart .k-listwise { --c: var(--c-listwise); }
.mh-chart .k-pointwise { --c: var(--c-pointwise); }
.mh-chart .k-pairwise, .mh-chart .k-zeroshot { --c: var(--c-pairwise); }
.mh-chart .k-distilled, .mh-chart .k-combo { --c: var(--c-distilled); }
.mh-chart .k-frontier { --c: var(--c-frontier); }
.mh-chart .k-bot { --c: var(--c-bot); }
.mh-chart .k-sr { --c: var(--c-sr); }
.mh-chart .line { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.mh-chart .line.dashed { stroke-dasharray: 5 5; stroke-width: 1.6; opacity: 0.7; }
.mh-chart .k-proxy { --c: var(--text-3); }
.mh-chart .mark { fill: var(--c); stroke: var(--c); stroke-width: 2; transition: transform 0.15s var(--ease); }
.mh-chart .mark.hollow { fill: var(--surface); }
.mh-chart .mark.stroke-only { fill: none; stroke-width: 2.6; stroke-linecap: round; }
.mh-chart .pt.is-hover .mark { transform: scale(1.4); }
.mh-chart .val { fill: var(--c); font-family: var(--font-mono); font-size: 12px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.mh-chart .anno { fill: var(--text-2); font-size: 12px; font-weight: 600; }
.mh-chart .anno-sub { fill: var(--text-3); font-family: var(--font-mono); font-size: 11px; }
.mh-chart .anno-line { stroke: var(--text-3); stroke-width: 1; }
.mh-chart .bar { fill: var(--c); }
.mh-chart .bar.hatched { fill: url(#hatch); }
.mh-chart .cat { fill: var(--text-2); font-size: 12.5px; }
.mh-chart .hit { fill: transparent; cursor: pointer; }
.mh-chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.mh-chart.is-drawn .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease-out), opacity 0.25s var(--ease); }
.mh-chart .pop { opacity: 0; }
.mh-chart.is-drawn .pop { opacity: 1; transition: opacity 0.5s var(--ease) var(--delay, 0s); }
.mh-chart.is-drawn.is-settled .pop { transition: opacity 0.25s var(--ease); }
.mh-chart .dim,
.mh-chart.is-drawn .pop.dim { opacity: 0.12; }
.chart-tip {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  min-width: 150px;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.chart-tip.is-on { opacity: 1; transform: none; }
.chart-tip .t-title { font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 7px; }
.chart-tip .t-sw { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.chart-tip .t-row { display: flex; justify-content: space-between; gap: 14px; font-family: var(--font-mono); font-size: 11.5px; opacity: 0.85; }
.chart-tip .t-row b { font-weight: 700; opacity: 1; }

/* ---------- One-token verifier race ---------- */
.race {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.race-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px clamp(18px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
}
.race-duel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.race-label { margin-right: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.race-cand,
.rc-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px 4px 4px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text);
}
.race-cand b,
.rc-verdict b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.race-vs { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.race-viz {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
  padding: clamp(20px, 3vw, 36px);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 28px;
  background-color: var(--surface-2);
}
html[data-theme="dark"] .race-viz {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px;
  background-color: #111;
}
.rc-lane {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px 20px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.rc-one.done { border-color: var(--green-line); box-shadow: 0 0 0 4px var(--green-soft); }
.rc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.rc-name { display: inline-flex; align-items: center; gap: 8px; }
.rc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background-color 0.3s var(--ease); }
.rc-lane.live .rc-dot { background: var(--green); animation: rc-live 0.9s ease-in-out infinite; }
.rc-lane.done .rc-dot { background: var(--green); }
@keyframes rc-live { 50% { opacity: 0.25; } }
.rc-count { font-size: 12px; letter-spacing: 0.02em; text-transform: none; white-space: nowrap; }
.rc-count b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-count small { font-size: inherit; }
.rc-text { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.js .rc-tk { opacity: 0; }
.rc-tk.on { opacity: 1; }
.rc-tk.cur { position: relative; }
.rc-tk.cur::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 0.2em;
  width: 0.5em;
  height: 1.15em;
  margin-left: 2px;
  background: var(--text-3);
}
.rc-verdict {
  align-self: flex-start;
  margin-top: auto;
  border-color: var(--green-line);
  background: var(--green-soft);
  transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out);
}
.rc-verdict b { background: var(--green); color: #0e0e0e; }
.js .rc-verdict { opacity: 0; transform: translateY(8px) scale(0.96); }
.rc-verdict.on { opacity: 1; transform: none; }
.race.agree .rc-verdict { animation: rc-agree 0.8s var(--ease-out); }
@keyframes rc-agree {
  0% { box-shadow: 0 0 0 0 rgba(118, 185, 0, 0.55); }
  30% { transform: scale(1.06); }
  100% { box-shadow: 0 0 0 12px rgba(118, 185, 0, 0); transform: none; }
}
.rc-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--text-3);
  transform-origin: left center;
  transform: scaleX(var(--f, 1));
  transition: transform 0.12s linear;
}
.rc-one .rc-bar { background: var(--green); }
.rc-token { display: grid; place-items: center; padding: 4px 0 2px; }
.rc-key {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  background: var(--green);
  color: #0e0e0e;
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--text);
}
.js .rc-key { opacity: 0; transform: scale(0.4); }
.rc-key.on { opacity: 1; transform: none; animation: rc-pop 0.6s var(--ease-out); }
.rc-key.on::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid var(--green);
  opacity: 0;
  pointer-events: none;
  animation: rc-ring 0.8s var(--ease-out);
}
@keyframes rc-pop {
  0% { opacity: 0; transform: scale(0.4) rotate(-8deg); }
  55% { opacity: 1; transform: scale(1.14) rotate(3deg); }
  78% { transform: scale(0.96) rotate(-1deg); }
  100% { transform: none; }
}
@keyframes rc-ring {
  from { opacity: 0.9; transform: scale(1); }
  to { opacity: 0; transform: scale(1.7); }
}
.rc-probs { display: grid; gap: 7px; }
.rc-prob {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}
.rc-prob i { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.rc-prob i::before {
  content: "";
  display: block;
  width: calc(var(--p) * 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--text-3);
  transform-origin: left center;
  transition: transform 0.8s var(--ease-out);
}
.rc-prob.is-pick i::before { background: var(--green); }
.rc-prob b { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; transition: opacity 0.4s var(--ease) 0.3s; }
.rc-prob.is-pick b { color: var(--text); }
.js .race:not(.probs) .rc-prob i::before { transform: scaleX(0); }
.js .race:not(.probs) .rc-prob b { opacity: 0; }

/* ---------- Cost: Mid-Harness vs. parallel scaling ---------- */
.mh-chart .anno-arrow .anno-line { stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mh-chart .anno-arrow .anno { fill: var(--accent); font-size: 13px; font-weight: 700; }
/* 3.1 slides: a native scroll-snap track, so a swipe or trackpad moves it and the switch and keys scroll it. */
.cost-slider { position: relative; }
.slides-nav { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.slides-hint { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.slides-key { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); font-family: var(--font-mono); font-size: 12px; color: var(--text-2); transition: border-color 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease); }
.slides-key:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.slides-key:disabled { opacity: 0.35; cursor: default; }
.slides-hint .sw { display: none; }
@media (hover: none) {
  .slides-key { display: none; }
  .slides-hint .sw { display: inline; }
}
.slides { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 48px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.slide-note { margin-top: 12px; font-size: 0.88rem; line-height: 1.55; color: var(--text-3); }
@media (min-width: 761px) {
  .slides-nav { position: absolute; z-index: 2; top: clamp(18px, 2.6vw, 30px); right: clamp(18px, 2.6vw, 30px); flex-direction: row; margin: 0; }
  .cost-slider .chart-head { padding-right: 370px; }
}
@media (max-width: 480px) {
  .slides-nav { flex-direction: column-reverse; align-items: stretch; gap: 6px; }
  .slides-nav .seg { display: grid; grid-template-columns: 1fr 1fr; }
  .slides-nav .seg button { padding: 0 8px; }
  .slides-hint { justify-content: center; }
}
.cost-wins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.cost-win { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.cost-win b { display: block; font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--accent); }
.cost-win span { display: block; margin-top: 6px; font-size: 0.88rem; line-height: 1.45; color: var(--text-2); }

/* ---------- Transfer ---------- */
.transfer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tcard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.tcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tcard h4 { font-size: 1.05rem; letter-spacing: -0.01em; line-height: 1.25; }
.tcard h4 small { display: block; margin-top: 3px; font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--text-3); letter-spacing: 0.02em; min-height: 1.3em; }
.tcard .who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.88rem; color: var(--text); font-weight: 600; }
.tcard .who .h {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
}
.tcard-gain {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px dashed var(--line-2);
  font-size: 0.8rem;
  color: var(--text-3);
}
.tcard-gain b { font-family: var(--font-mono); font-size: 0.95rem; color: var(--accent); }
.tcard-rows { display: grid; gap: 7px; margin-top: auto; }
.trow { display: grid; grid-template-columns: 66px 1fr auto; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.trow .bar { height: 8px; border-radius: 2px; background: var(--line); overflow: hidden; }
.trow .bar span { display: block; height: 100%; width: calc(var(--v) * 1%); background: var(--c-base); border-radius: 2px; }
.trow.zs .bar span { background: var(--c-pairwise); }
.trow.dist .bar span { background: var(--c-distilled); }
.trow .v { font-family: var(--font-mono); font-size: 12px; text-align: right; color: var(--text); white-space: nowrap; }
.trow .v i { font-style: normal; color: var(--text-3); }
.transfer-note { margin: 14px 0 0; font-size: 0.88rem; color: var(--text-3); }

/* ---------- Analysis ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 24px); align-items: start; }

/* Open problem: the analysis takeaway, in amber so it reads as unsolved. */
.open-prob {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(22px, 3.6vw, 52px);
  align-items: center;
  margin-top: clamp(28px, 3.6vw, 44px);
  padding: clamp(24px, 3.2vw, 40px);
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 100% at 0% 0%, rgba(255, 170, 60, 0.26), transparent 60%) padding-box,
    radial-gradient(60% 90% at 100% 100%, rgba(96, 140, 255, 0.22), transparent 62%) padding-box,
    linear-gradient(155deg, #1c150b, #0f1012 50%, #0c1222) padding-box,
    conic-gradient(from var(--tl-a), rgba(255, 176, 64, 0.95), rgba(255, 255, 255, 0.08) 25%, rgba(109, 139, 255, 0.9) 50%, rgba(255, 255, 255, 0.08) 75%, rgba(255, 176, 64, 0.95)) border-box;
  color: #f2f2ec;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.55);
  animation: tl-spin 14s linear infinite;
}
.op-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 10px;
  border: 1px solid rgba(255, 176, 64, 0.5);
  border-radius: 999px;
  background: rgba(255, 176, 64, 0.12);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffc46b;
}
.op-tag span { width: 7px; height: 7px; border-radius: 50%; background: #ffb040; box-shadow: 0 0 10px #ffb040; animation: rc-live 1.4s ease-in-out infinite; }
.op-title { margin-top: 16px; font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; color: #fff; text-wrap: balance; }
.op-title em { font-style: normal; color: #ffb040; text-shadow: 0 0 28px rgba(255, 176, 64, 0.45); }
.op-sub { margin-top: 12px; max-width: 520px; font-size: 1.02rem; line-height: 1.5; color: rgba(242, 242, 236, 0.76); }
.op-stat { padding-left: clamp(0px, 2.6vw, 32px); border-left: 1px solid; border-image: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.02)) 1; }
.op-num { font-size: clamp(3rem, 6.4vw, 5rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #ffe2a8, #ffb040 55%, #ff8a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.op-num small { margin-left: 4px; font-size: 0.4em; letter-spacing: 0; color: rgba(242, 242, 236, 0.7); }
.op-cap { margin-top: 8px; font-size: 0.92rem; color: rgba(242, 242, 236, 0.72); }
/* The two failure types fill 67.4% of the bar, left to right, once the card is in view. */
.op-bar { height: 10px; margin-top: 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.op-bar > span { display: flex; width: 67.4%; height: 100%; clip-path: inset(0); transition: clip-path 1.3s var(--ease-out) 0.35s; }
.js .open-prob:not(.is-in) .op-bar > span { clip-path: inset(0 100% 0 0); }
.op-bar i { flex: var(--w) 0 0; }
.op-bar i:first-child { background: #ffb040; }
.op-bar i:last-child { background: #ff7a45; }
.op-key { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.88rem; color: rgba(242, 242, 236, 0.72); }
.op-key li { display: flex; align-items: center; gap: 8px; }
.op-key li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: #ffb040; }
.op-key li + li::before { background: #ff7a45; }
.op-key b { color: #fff; font-variant-numeric: tabular-nums; }
/* One example per failure type, colored like its segment in the bar above. */
.op-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 18px); margin-top: clamp(12px, 1.6vw, 18px); }
.op-ex {
  --op-c: #ffb040;
  min-width: 0;
  padding: 18px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--op-c);
  border-radius: var(--radius);
  background: radial-gradient(80% 90% at 0% 0%, rgba(255, 176, 64, 0.12), transparent 60%), #111215;
  color: #f2f2ec;
}
.op-ex + .op-ex { --op-c: #ff7a45; background: radial-gradient(80% 90% at 0% 0%, rgba(255, 122, 69, 0.12), transparent 60%), #111215; }
.op-ex-head { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--op-c); }
.op-ex-head b { margin-left: auto; letter-spacing: 0; color: #fff; font-variant-numeric: tabular-nums; }
.op-ex-q { margin-top: 8px; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.op-ex-code { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; background: rgba(255, 255, 255, 0.04); font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: #e8e8e2; white-space: pre; overflow-x: auto; }
.op-ex-code mark { padding: 0 3px; border-radius: 3px; background: rgba(255, 150, 60, 0.26); background: color-mix(in srgb, var(--op-c) 26%, transparent); color: #fff; }
.op-ex-note { margin-top: 10px; font-size: 0.9rem; line-height: 1.5; color: rgba(242, 242, 236, 0.72); }
.op-ex-note code { font-family: var(--font-mono); font-size: 0.92em; color: var(--op-c); }
.op-ex-src { margin-top: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.03em; color: var(--text-3); text-align: center; }

/* Light pages get a light open problem: paper with the same amber and blue glows, and deeper amber for text on white. */
html[data-theme="light"] .open-prob {
  background:
    radial-gradient(70% 100% at 0% 0%, rgba(255, 176, 64, 0.2), transparent 60%) padding-box,
    radial-gradient(60% 90% at 100% 100%, rgba(96, 140, 255, 0.16), transparent 62%) padding-box,
    linear-gradient(155deg, #fffaf1, #ffffff 50%, #f5f7ff) padding-box,
    conic-gradient(from var(--tl-a), rgba(240, 150, 30, 0.95), rgba(60, 50, 20, 0.1) 25%, rgba(90, 120, 240, 0.9) 50%, rgba(60, 50, 20, 0.1) 75%, rgba(240, 150, 30, 0.95)) border-box;
  color: #1b1d18;
  box-shadow: 0 40px 80px -45px rgba(120, 80, 20, 0.28);
}
html[data-theme="light"] .open-prob::before { background-image: radial-gradient(rgba(60, 50, 20, 0.12) 1px, transparent 1.3px); }
html[data-theme="light"] .op-tag { border-color: rgba(214, 140, 20, 0.45); background: rgba(255, 176, 64, 0.14); color: #a86300; }
html[data-theme="light"] .op-title { color: #16150f; }
html[data-theme="light"] .op-title em { color: #dd8700; text-shadow: 0 0 24px rgba(255, 176, 64, 0.3); }
html[data-theme="light"] .op-sub,
html[data-theme="light"] .op-cap,
html[data-theme="light"] .op-key { color: rgba(27, 29, 24, 0.72); }
html[data-theme="light"] .op-stat { border-image: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.02)) 1; }
html[data-theme="light"] .op-num { background-image: linear-gradient(180deg, #ffb13d, #f08a1c 55%, #e0561f); }
html[data-theme="light"] .op-num small { color: rgba(27, 29, 24, 0.6); }
html[data-theme="light"] .op-bar { background: rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .op-key b { color: #1b1d18; }
html[data-theme="light"] .op-ex {
  --op-c: #e8900a;
  border-right-color: rgba(0, 0, 0, 0.08);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  border-left-color: rgba(0, 0, 0, 0.08);
  background: radial-gradient(80% 90% at 0% 0%, rgba(255, 176, 64, 0.12), transparent 60%), #fff;
  color: #1b1d18;
  box-shadow: 0 20px 40px -30px rgba(120, 80, 20, 0.25);
}
html[data-theme="light"] .op-ex + .op-ex { --op-c: #e8622e; background: radial-gradient(80% 90% at 0% 0%, rgba(255, 122, 69, 0.12), transparent 60%), #fff; }
html[data-theme="light"] .op-ex-head b,
html[data-theme="light"] .op-ex-q { color: #1b1d18; }
html[data-theme="light"] .op-ex-code { border-color: rgba(0, 0, 0, 0.08); background: #f7f8f3; color: #2a2d27; }
html[data-theme="light"] .op-ex-code mark { color: #1b1d18; }
html[data-theme="light"] .op-ex-note { color: rgba(27, 29, 24, 0.72); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding: clamp(30px, 3.6vw, 44px) 0 calc(clamp(26px, 3.4vw, 40px) + env(safe-area-inset-bottom, 0px));
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  font-size: 0.9rem;
  color: var(--text-3);
}
.footer-row nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-row nav a { color: var(--text-2); }
.footer-row nav a:hover { color: var(--text); }
.footer-row nav a.is-pending { opacity: 0.5; cursor: default; }

/* ---------- Reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--rd, 0) * 90ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .primary-nav a { padding: 8px 9px; font-size: 14px; }
  .mech-viz { min-height: 380px; }
}

@media (max-width: 900px) {
  :root { --header-h: 58px; }
  .primary-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .cols3, .steps3 { grid-template-columns: 1fr; gap: 34px; }
  .cols3 { gap: 16px; }
  .open-prob { grid-template-columns: 1fr; }
  .op-examples { grid-template-columns: 1fr; }
  .op-stat { padding: 20px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); border-image: none; }
  html[data-theme="light"] .op-stat { border-image: none; border-top-color: rgba(0, 0, 0, 0.1); }
  .tl-spot .race { margin-top: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* Every step of the turning border repaints the whole card; phones step about 15 times a second instead of every frame. */
  .col, .tl-spot, .open-prob { animation-timing-function: steps(180); }
  .glyph { position: absolute; top: 0; right: 0; margin: 0; width: 46px; height: 46px; font-size: 25px; }
  .glyph.mono-g { font-size: 17px; }
  .stage-grid { grid-template-columns: 1fr; }
  /* Stacked, the base lane is read while the duels below wait for the reader, so its skip note shows early. */
  .stage.p1 .no-verify { opacity: 1; }
  .stage-fork { display: none; }
  .stage-task { margin-bottom: 14px; }
  .duo { grid-template-columns: 1fr; }
  .board, .board tbody { display: block; }
  .board thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .board tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 20px 2px; border-bottom: 1px solid var(--line); }
  .board tbody th, .board tbody td { display: block; padding: 0; border: 0; }
  .board .b-bench, .board .b-agent { grid-column: 1 / -1; }
  .board .b-metric { padding-top: 10px; }
  .m-lab { display: block; margin-bottom: 7px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
  .gain { font-size: clamp(2.4rem, 9vw, 3.4rem); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: 0; padding-bottom: 70px; }
  .hero-inner { padding: 80px 12px 56px; }
  .hero-title { font-size: clamp(2.9rem, 15.4vw, 5.4rem); letter-spacing: -0.055em; }
  .authors { font-size: 0.95rem; line-height: 1.7; }
  .affils { font-size: 0.98rem; }
  .affil-notes { font-size: 0.92rem; }
  .hero-links .pill { height: 44px; padding: 0 15px 0 13px; font-size: 14.5px; }
  .section-head .mega { font-size: clamp(3rem, 16vw, 4.6rem); }
  .midrail { --mr-h: 124px; --mr-g: 42px; --mr-gate: 52px; margin-top: 34px; margin-bottom: 96px; }
  .mr-node > b { font-size: 10.5px; letter-spacing: 0.12em; }
  .mr-node > small { top: calc(50% + var(--mr-gate) / 2 + 29px); font-size: 11px; }
  .mr-model > b, .mr-model > small { left: 0; transform: none; }
  .mr-harness > b, .mr-harness > small { left: auto; right: 0; transform: none; }
  .hbar { grid-template-columns: minmax(92px, 38%) 1fr auto; font-size: 13px; }
  .hbar-axis { grid-template-columns: minmax(92px, 38%) 1fr auto; }
  .mv-card { padding: 12px; }
  .mv-opts { grid-template-columns: 1fr; }
  .mv-plist li { grid-template-columns: 20px minmax(0, 1fr) 48px 38px; gap: 8px; padding: 4px 6px; }
  .mv-match .side { font-size: 12px; }
  .mv-match .score b { width: 28px; height: 32px; font-size: 19px; }
  .mv-json { font-size: 10px; }
  .mv-league { border-spacing: 2px; }
  .mech-viz { padding: 18px 12px; }
  .race-head { position: relative; padding: 12px 64px 12px 14px; }
  .race-head .mech-replay { position: absolute; top: 6px; right: 8px; width: 44px; padding: 0; justify-content: center; gap: 0; font-size: 0; }
  .race-label { flex-basis: 100%; }
  .race-viz { grid-template-columns: 1fr; gap: 12px; padding: 16px 12px; }
  .rc-lane { padding: 14px 14px 18px; }
  .mv-league .rh .id { display: none; }
  .mv-league .rh code { display: inline-block; max-width: 90px; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; }
  .mv-league .rh { width: 1%; padding-right: 4px; }
  .mv-league-wrap { padding-right: 10px; }
  .mv-league thead th.ch { height: 114px; }
  .mv-league th.ch .xl { font-size: 10px; transform: rotate(-62deg); }
  .mech-replay { height: 44px; padding: 0 14px; }
  .mv-league td.c { width: auto; height: 24px; font-size: 10.5px; }
  .mv-league td.q { width: 34px; padding-left: 4px; }
  .mv-league td.q .t { display: none; }
  .mv-league thead th.qh { padding-left: 4px; font-size: 0; }
  .mv-league thead th.qh::after { content: "q"; font-family: var(--font-math); font-size: 13px; font-style: italic; letter-spacing: 0; text-transform: none; }
  .chart-card { border-radius: 18px; }
  .tl-spot-stats { grid-template-columns: 1fr; gap: 10px; }
  .op-ex-code { white-space: pre-wrap; font-size: 11.5px; }
  .tl-stat { display: flex; align-items: baseline; gap: 12px; }
  .tl-stat > span { margin-top: 0; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .crop::before { --l: 9px; }
  .stage { border-radius: 18px; }
  /* The W/L record would leave commands about 13 characters; phones show the full command and the win rate. */
  .shead, .srow { grid-template-columns: minmax(0, 1fr) 34px; gap: 8px; }
  .srow .sbar, .srow .rec, .shead span:nth-child(2) { display: none; }
  .srow code { white-space: normal; overflow-wrap: anywhere; }
  .shead { letter-spacing: 0.05em; }
  .shead span:last-child { grid-column: 2; display: flex; justify-content: flex-end; white-space: nowrap; }
  .stage-task { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 14px; }
  .stage-top { font-size: 10.5px; letter-spacing: 0.08em; }
  .stage-top .live { min-width: 0; }
  .stage-top .live > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stage-top .live-tail { display: none; }
  .term { font-size: 11.5px; min-height: 0; padding: 12px; }
  .term-line { padding-left: 22px; white-space: pre-wrap; }
  .lane-status { padding: 5px 10px; font-size: 11px; }
  .term-line[data-badge] { padding-right: 56px; }
  .term-line[data-badge]:not(:empty)::after { content: "8→ψ→1"; padding: 0 5px; font-size: 9.5px; }
  .chip { font-size: 12px; height: 28px; padding: 0 8px; }
  .lane-bar { font-size: 17px; }
  .cost-wins { grid-template-columns: 1fr; gap: 8px; }
  .ticker { font-size: 10.5px; }
  .ticker-track > span { gap: 8px; padding: 11px 18px; }
  .hype-note { font-size: 0.82rem; }
}

@media (max-width: 380px) {
  .brand-name { display: none; }
  .brand-divider { display: none; }
  .hero-links { gap: 8px; }
}

@media (hover: none) {
  .tcard:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .stage-section, .theme-toggle, .ticker { display: none !important; }
  .band-green, .band-ink { background: #fff !important; color: #000 !important; }
}
