/* =========================================================================
   DuetJudge — project page
   Reinforcement Learning for Music Generation with Pairwise Reward Modeling
   ========================================================================= */

@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);

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

  --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;

  --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.84);
  --bg-2: #f2f2ec;
  --surface: #ffffff;
  --surface-2: #f6f6f1;
  --text: #1c1d1a;
  --text-2: #4b4f55;
  --text-3: #62676e;
  --green-text: #4d7a00;
  --focus: #3f6600;
  --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: #2a2b28;
  --mega-stroke: rgba(0, 0, 0, 0.3);
  --btn-bg: #1c1d1a;
  --btn-text: #ffffff;
  --pill-bg: rgba(255, 255, 255, 0.72);
  --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.03), 0 18px 50px -30px rgba(0, 0, 0, 0.28);
  --row-base: rgba(30, 30, 30, 0.05);
  --row-ours: rgba(118, 185, 0, 0.15);
  --down: #b42318;
  --wave: #9aa3ad;
  --wave-ours: #86b23a;
  --mark-ink: #1c1d1a;
}

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: #8a8a8a;
  --green-text: #8fd21e;
  --focus: #8fd21e;
  --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);
  --row-base: rgba(255, 255, 255, 0.05);
  --row-ours: rgba(118, 185, 0, 0.17);
  --down: #ff7b76;
  --wave: #6e767f;
  --wave-ours: #a6d354;
  --mark-ink: #eeeeee;
}

/* ---------- 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, blockquote { 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(--focus); outline-offset: 3px; border-radius: 4px; box-shadow: 0 0 0 5px var(--bg); }
[hidden] { display: none !important; }

.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));
}
.container-narrow { max-width: 900px; }
.mono { font-family: var(--font-mono); }
.nv { color: var(--green); }
.ours { color: var(--accent); font-weight: 600; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Crop marks ---------- */
.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.92;
  letter-spacing: -0.05em;
  color: var(--mega);
  -webkit-text-stroke: 0.6px var(--mega-stroke);
  text-wrap: balance;
}
.kicker {
  display: inline-flex; align-items: flex-start; 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; margin-top: 0.5em; background: var(--green); border-radius: 1px; flex: none; }

.section { position: relative; padding: clamp(76px, 10vw, 136px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { text-align: center; margin: 0 auto clamp(40px, 5.6vw, 76px); max-width: 980px; }
.section-head .mega { font-size: clamp(2.8rem, 8.6vw, 6.8rem); margin-top: 18px; }
.section-head .lede, .lede {
  margin: 24px auto 0; max-width: 780px;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--text-2); text-wrap: pretty;
}
.section-head.left { text-align: left; margin-left: 0; }
.section-head.left .lede { margin-left: 0; }

.subhead {
  display: flex; align-items: baseline; gap: 14px;
  margin: clamp(52px, 6.6vw, 90px) 0 20px; 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.4rem, 2.5vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }

.prose p + p, .prose p + .eq, .prose .eq + p, .prose p + h4, .prose h4 + p { margin-top: 16px; }
.prose p { max-width: 78ch; color: var(--text); text-wrap: pretty; }
.prose .lede { max-width: 780px; margin-left: 0; }
.prose > * + * { margin-top: 18px; }
.prose > .subhead { margin-top: clamp(52px, 6.6vw, 90px); }
.prose > .subhead + * { margin-top: 0; }
.prose h4.para, .prose h3.para {
  font-size: 1rem; font-weight: 700; letter-spacing: -0.005em; margin-top: 26px; color: var(--text);
}
.prose h4.para + p, .prose h3.para + p { margin-top: 6px; }
.prose-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px clamp(24px, 3vw, 40px); }
.prose-2 p { max-width: none; }
.prose a:not(.pill):not(.fig-pdf):not(.ref-link) { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.2em; }
.prose a:not(.pill):hover { color: var(--accent); text-decoration-color: currentColor; }
.prose code { white-space: nowrap; font-size: 0.86em; padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); }
.prose em { font-style: italic; }

/* ---------- 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);
}
.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-right, 0px)) 0 calc(clamp(14px, 2.2vw, 28px) + env(safe-area-inset-left, 0px));
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; color: var(--text); }
.brand-mark { width: 44px; height: 22px; color: var(--text); }
.brand-mark .mark-note { fill: var(--green); }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.brand-name .nv { color: var(--green-text); }
.primary-nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.primary-nav a {
  position: relative; padding: 8px 11px; font-size: 14px; 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: 4px; margin-left: auto; }
.primary-nav + .header-actions { margin-left: 0; }
.hero > .container { min-width: 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; left: 0; right: 0; top: var(--header-h);
  display: grid; gap: 2px; padding: 10px calc(var(--pad-x)) 18px;
  background: var(--bg-glass); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a { padding: 12px 10px; border-radius: 8px; font-weight: 600; color: var(--text); }
.mobile-menu a:hover { background: var(--line); }
.mobile-menu a small { margin-right: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); font-weight: 500; }

/* ---------- 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 .tag, .tag {
  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);
}
.pill.pill-primary { background: var(--btn-bg); color: var(--btn-text); border-color: transparent; }
.pill.pill-primary:hover { background: var(--green); color: #0b0b0b; }
.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(560px, 86svh, 900px); padding: 30px 0 56px;
  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(60px, 8.5vw, 104px) var(--pad-x); }
.hero-title { font-size: clamp(3.2rem, 13.5vw, 10rem); margin: 26px 0 0; white-space: nowrap; }
.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: 940px;
  font-size: clamp(1.2rem, 2.5vw, 2.05rem); 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; }
.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-text); 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: 0.98rem; 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-text); font-weight: 700; }
.affil-notes a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.2em; }
.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(60px, 8vw, 104px); }
.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;
  -webkit-mask-image: radial-gradient(ellipse 72% 56% at 50% 32%, #000 25%, transparent 80%);
  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(60px, 7.5vw, 104px); }
html[data-theme="dark"] .hype { 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);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker-wrap { position: relative; }
.ticker-track { display: flex; width: max-content; animation: ticker 80s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track, .ticker.is-paused .ticker-track { animation-play-state: paused; }
.ticker-toggle { position: absolute; right: 10px; top: 50%; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; transform: translateY(-50%); border: 1px solid var(--line-2); border-radius: 50%; background: var(--bg); color: var(--text-2); }
.ticker-toggle svg { width: 11px; height: 11px; }
.ticker-toggle .i-play, .ticker-wrap:has(.ticker.is-paused) .ticker-toggle .i-pause { display: none; }
.ticker-wrap:has(.ticker.is-paused) .ticker-toggle .i-play { display: block; }
.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 { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hype-head { max-width: 1040px; margin: 0 auto clamp(36px, 5vw, 64px); text-align: center; }
.hype-title { margin-top: 20px; font-weight: 700; }
.hype-pre { display: block; font-size: clamp(1.3rem, 3vw, 2.4rem); 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.6rem, 8vw, 6.8rem); }
.hype-big em { font-style: normal; color: var(--green); -webkit-text-stroke: 0; text-shadow: 0 0 48px rgba(118, 185, 0, 0.45); }
html[data-theme="light"] .hype-big em { color: var(--green-600); text-shadow: 0 0 36px rgba(118, 185, 0, 0.28); }
.board-wrap { border-top: 1px solid var(--line-2); overflow-x: auto; }
.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; }
.board tbody th, .board tbody td { padding-top: clamp(16px, 2vw, 26px); padding-bottom: clamp(16px, 2vw, 26px); border-bottom: 1px solid var(--line); }
.board tbody tr { transition: background-color 0.25s var(--ease); }
.board tbody tr:hover { background: rgba(127, 127, 127, 0.06); }
.board .b-name { font-size: clamp(1rem, 1.3vw, 1.14rem); font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.board .b-name 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); }
.board .b-tag { display: inline-block; margin-left: 8px; padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; color: var(--text-2); vertical-align: middle; }
.board .b-tag.ood { color: var(--accent); border-color: currentColor; }
.pairv { display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.pairv s { color: var(--text-3); text-decoration: none; font-size: 0.95rem; }
.pairv i { font-style: normal; color: var(--text-3); }
.pairv b { font-size: clamp(1.15rem, 1.7vw, 1.5rem); font-weight: 700; color: var(--text); }
.gain { display: inline-block; margin-left: 10px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.board .b-metric.peak .gain { color: var(--green-600); text-shadow: 0 0 28px rgba(118, 185, 0, 0.3); }
.updots { display: inline-flex; gap: 4px; vertical-align: middle; margin-right: 8px; }
.updots i { width: 9px; height: 9px; border-radius: 2px; background: var(--green); }
.board .b-up { font-family: var(--font-mono); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.board .b-up b { color: var(--text); }
.board .b-up small { display: block; margin-top: 5px; font-size: 11.5px; color: var(--text-3); }
.updots i { cursor: help; }
.updots i:hover { outline: 2px solid var(--line-2); outline-offset: 1px; }
.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; }

/* ---------- Bands ---------- */
.band-green {
  --text: #121212; --text-2: rgba(18, 18, 18, 0.8); --text-3: rgba(18, 18, 18, 0.72); --focus: #121212; --bg: #76b900; --green-text: #1f3a00;
  --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;
  --surface: rgba(255, 255, 255, 0.34); --surface-2: rgba(255, 255, 255, 0.5);
  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: #0d0d0d; --bg-2: #131313; --surface: #161616; --surface-2: #1c1c1c;
  --text: #eeeeee; --text-2: #b3b3b3; --text-3: #8a8a8a; --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; --green-text: #8fd21e; --focus: #8fd21e;
  --pill-bg: rgba(255, 255, 255, 0.05); --btn-bg: #76b900; --btn-text: #0b0b0b; --shadow-card: 0 20px 60px -35px rgba(0, 0, 0, 0.9);
  --row-base: rgba(255, 255, 255, 0.05); --row-ours: rgba(118, 185, 0, 0.17); --wave: #6e767f; --wave-ours: #a6d354; --mark-ink: #eeeeee;
  background: var(--bg); color: var(--text); color-scheme: dark;
}
html[data-theme="dark"] .band-ink { background: #080808; }
.section.band-green, .section.band-ink, .band-green + .section, .band-ink + .section { border-top: 0; }

/* ---------- TL;DR ---------- */
.tldr-head .mega { font-size: clamp(2.6rem, 8vw, 6.2rem); }
.tldr-head .mega em { font-style: normal; color: #1f3a00; -webkit-text-stroke: 0; }
.tldr-head .lede { color: var(--text); max-width: 880px; font-weight: 500; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.col, .tl-spot {
  position: relative; isolation: isolate; padding: clamp(20px, 2.6vw, 30px); border-radius: var(--radius-lg);
  border: 1px solid rgba(18, 18, 18, 0.2); background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 24px 60px -36px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.col::before, .tl-spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background-image: radial-gradient(rgba(70, 60, 20, 0.16) 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%);
}
.col-idx, .tl-spot-label { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.col h3 { margin: 12px 0 6px; font-size: clamp(1.15rem, 1.6vw, 1.38rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; color: #16150f; }
.col .col-sub { font-size: 0.95rem; line-height: 1.45; color: var(--text-2); margin-bottom: 18px; }
.col-foot { margin-top: 12px; font-size: 0.82rem; line-height: 1.45; color: var(--text-3); }
.hbars { display: grid; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(130px, 44%) 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; background: rgba(18, 18, 18, 0.06); border-radius: 2px; overflow: hidden; }
.hbar-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: 2px;
  width: calc((var(--v) - var(--min, 0)) / (var(--max, 100) - var(--min, 0)) * 100%);
  background: rgba(18, 18, 18, 0.45); transform-origin: left center;
}
.js .hbar-fill { transform: scaleX(0); }
.col.play .hbar-fill { transform: scaleX(1); transition: transform 1.1s cubic-bezier(0.34, 1.3, 0.64, 1); transition-delay: calc(300ms + var(--d, 0) * 140ms); }
.hbar.hi .hbar-fill { background: linear-gradient(90deg, #2c4c00, #3f6f00); }
.hbar.hi .hbar-label { color: var(--text); font-weight: 700; }
.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: #1f3a00; }
.hbar-axis { display: grid; grid-template-columns: minmax(130px, 44%) 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-spot { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px clamp(22px, 3vw, 40px); margin-top: clamp(16px, 2vw, 24px); align-items: center; }
.tl-spot h3 { margin-top: 12px; font-size: clamp(1.5rem, 2.7vw, 2.2rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; color: #16150f; text-wrap: balance; }
.tl-spot h3 em { font-style: normal; color: #1f3a00; }
.tl-spot-sub { margin-top: 12px; max-width: 560px; font-size: 1.02rem; line-height: 1.5; color: var(--text-2); }
.tl-spot-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tl-stat { padding: 6px 0 4px 14px; border-left: 1px solid rgba(18, 18, 18, 0.3); }
.tl-stat b { display: block; font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: #16150f; }
.tl-stat .tl-vs { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--text-3); }
.tl-stat > span:not(.tl-vs) { display: block; margin-top: 6px; font-size: 0.9rem; font-weight: 600; line-height: 1.35; color: var(--text); }
.tl-spot-note { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.03em; color: var(--text-3); }
.js .col, .js .tl-spot { opacity: 0; transform: translateY(40px) scale(0.97); }
.col.play, .tl-spot.play { opacity: 1; transform: none; transition: opacity 0.7s var(--ease-out), transform 0.9s cubic-bezier(0.34, 1.2, 0.64, 1); }

/* ---------- Cards / stats ---------- */
.cards { display: grid; gap: clamp(14px, 1.8vw, 22px); align-items: start; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: clamp(18px, 2.2vw, 26px);
  border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); min-width: 0;
}
.card-ours { border-color: var(--green-line); background: linear-gradient(180deg, var(--green-soft), transparent 70%) padding-box, var(--surface); }
.card-label { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.card-ours .card-label { color: var(--accent); }
.card-stat { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--text); }
.card-stat small { display: block; margin-top: 8px; font-size: 0.85rem; font-weight: 500; letter-spacing: 0; color: var(--text-3); }
.card h4, .card .card-title { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.card-text { font-size: 0.98rem; line-height: 1.5; color: var(--text-2); }
.card-list { display: grid; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--text-2); }
.card-list li { display: flex; gap: 8px; align-items: baseline; }
.card-list li::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--green); flex: none; transform: translateY(-2px); }
.card-list b { color: var(--text); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 22px; }
.stat { padding: 8px 0 6px 16px; border-left: 1px solid var(--line-2); }
.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; color: var(--text); }
.stat b small { margin-left: 3px; font-size: 0.42em; font-weight: 700; letter-spacing: 0; color: var(--text-3); }
.stat > span { display: block; margin-top: 8px; font-size: 0.88rem; line-height: 1.35; color: var(--text-2); }

/* ---------- Tables ---------- */
.table-card { margin: 26px 0; min-width: 0; }
.table-title { margin-bottom: 12px; font-size: 0.95rem; line-height: 1.5; color: var(--text-2); }
.table-title b { color: var(--text); font-weight: 700; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-card);
  background: linear-gradient(90deg, var(--surface) 30%, transparent), linear-gradient(90deg, transparent, var(--surface) 70%) 100% 0, radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.16), transparent), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.16), transparent) 100% 0;
  background-color: var(--surface); background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
.data-table { background: transparent; }
.data-table thead th, .data-table .row-base th, .data-table .row-base td, .data-table .row-ours th, .data-table .row-ours td, .data-table .row-group th { background-clip: padding-box; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; line-height: 1.35; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.data-table thead th {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
  background: var(--surface-2); text-align: center; white-space: nowrap; vertical-align: bottom;
}
.data-table thead tr:first-child > th:first-child { text-align: left; }
.data-table thead tr:first-child th[colspan] { border-bottom: 1px solid var(--line-2); }
.data-table thead tr + tr th { font-size: 10.5px; }
.data-table tbody th { font-weight: 500; color: var(--text); white-space: nowrap; }
.data-table tbody th:not([colspan]), .data-table thead tr:first-child > th:first-child { position: sticky; left: 0; z-index: 1; background-color: var(--surface); }
.data-table thead tr:first-child > th:first-child { z-index: 2; background-color: var(--surface-2); }
.data-table td.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13.5px; white-space: nowrap; }
.data-table td.num b { font-weight: 700; color: var(--text); }
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover > td { background-color: rgba(127, 127, 127, 0.06); }
.data-table .row-ref th, .data-table .row-ref td { color: var(--text-3); }
.data-table .row-ref td.num { color: var(--text-3); }
.data-table .row-base td { background: var(--row-base); }
.data-table .row-base th { background-image: linear-gradient(var(--row-base), var(--row-base)); }
.data-table .row-ours td { background: var(--row-ours); }
.data-table .row-ours th { background-image: linear-gradient(var(--row-ours), var(--row-ours)); }
.data-table .row-ours th { font-weight: 700; color: var(--accent); }
.data-table .row-ours th::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 1px; background: var(--green); vertical-align: 1px; }
.data-table .row-group th {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2);
  background: var(--surface-2); padding-top: 12px; padding-bottom: 8px; border-top: 1px solid var(--line-2); white-space: normal;
}
.data-table .row-sub th { font-style: italic; font-weight: 600; color: var(--text-2); font-size: 13.5px; padding-top: 12px; }
.data-table .row-total th, .data-table .row-total td { font-weight: 700; border-top: 1px solid var(--line-2); }
.data-table .row-total td.num { color: var(--text); }
.mark-target { color: var(--text-3); font-weight: 400; margin-left: 1px; }
.down { color: var(--down); }
.mark-down { color: var(--down); font-weight: 400; margin-left: 1px; }
.table-note { margin-top: 10px; font-size: 0.85rem; line-height: 1.55; color: var(--text-3); }

/* ---------- Figures ---------- */
.fig-card { margin: 26px 0; min-width: 0; }
.fig-media {
  padding: clamp(10px, 1.4vw, 18px); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  background: #fff; box-shadow: var(--shadow-card);
}
.fig-media img { width: 100%; height: auto; border-radius: 6px; }
.fig-media a, .fig-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; }
.fig-card figcaption { margin-top: 14px; font-size: 0.92rem; line-height: 1.55; color: var(--text-2); }
.fig-card figcaption b { color: var(--text); font-weight: 700; }
.fig-pdf {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--line-2); border-radius: 999px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); vertical-align: 1px;
}
.fig-pdf:hover { color: var(--accent); border-color: var(--green-line); background: var(--green-soft); }
.fig-row { display: grid; gap: clamp(14px, 1.8vw, 22px); margin: 26px 0; }
.fig-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fig-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fig-row-3 > .fig-card:nth-child(3) { grid-column: 1 / -1; width: calc(50% - 11px); justify-self: center; }
.fig-row .fig-card { margin: 0; }
.fig-small figcaption { font-size: 0.86rem; }
.split { display: grid; gap: clamp(18px, 2.6vw, 34px); align-items: center; margin: 26px 0; }
.split-45-55 { grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); }
.split-55-45 { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
.split > .table-card, .split > .fig-card { margin: 0; }

/* ---------- Disclosures ---------- */
.disclosures { display: grid; gap: 10px; margin: 26px 0; }
.disclosure { border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.disclosure > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; list-style: none; cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:hover { background: var(--surface-2); }
.disclosure-title { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.disclosure-hint { margin-left: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.disclosure > summary::after {
  content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%;
  font-family: var(--font-mono); font-size: 16px; color: var(--text-2); transition: transform 0.25s var(--ease);
}
.disclosure[open] > summary::after { transform: rotate(45deg); }
.disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.disclosure-body { padding: 6px 20px 22px; }
.disclosure-body > * + * { margin-top: 16px; }
.disclosure-body p { max-width: 80ch; }
.disclosure-body h4.para { margin-top: 22px; font-size: 0.98rem; font-weight: 700; }
.disclosure-body h4.para + p { margin-top: 6px; }
.disclosure-body .table-card, .disclosure-body .fig-card, .disclosure-body .fig-row { margin: 18px 0; }
.disclosure-body .table-wrap, .disclosure-body .fig-media { box-shadow: none; }
.disclosure-body .subhead { border-top: 0; margin: 26px 0 8px; padding-top: 0; }
.disclosure-body .subhead h3 { font-size: 1.2rem; }

.callout {
  margin: 26px 0; padding: 16px 20px; border-left: 3px solid var(--green); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--green-soft); font-size: 1rem; line-height: 1.55; color: var(--text);
}
.callout b { color: var(--accent); }
.takeaways { display: grid; gap: 12px; margin: 26px 0; }
.takeaways li { position: relative; padding-left: 26px; font-size: 1rem; line-height: 1.55; color: var(--text-2); }
.takeaways li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; border-radius: 2px; background: var(--green); }
.takeaways b { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { display: inline-block; line-height: 1.5; padding: 4px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-2); background: var(--surface); }
.chip sub { vertical-align: sub; font-size: 0.72em; line-height: 0; }

/* ---------- Abstract ---------- */
.abstract { margin: 0 auto clamp(36px, 4.6vw, 60px); max-width: 1040px; padding: clamp(20px, 2.6vw, 32px); border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.abstract p + p { margin-top: 14px; columns: 2; column-gap: clamp(28px, 3vw, 44px); font-size: 0.98rem; line-height: 1.62; color: var(--text-2); text-wrap: pretty; }
@media (max-width: 900px) { .abstract p + p { columns: 1; } }

/* ---------- Overview / why pairwise ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 22px); margin-top: 26px; }
.why { padding: 2px 0 0 clamp(16px, 1.6vw, 22px); border-left: 1px solid var(--line-2); }
.why-label { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.why h3 { margin: 16px 0 10px; font-size: clamp(1.15rem, 1.7vw, 1.4rem); letter-spacing: -0.02em; line-height: 1.2; }
.why p { color: var(--text-2); font-size: 0.98rem; }
.contrib { counter-reset: contrib; }
.contrib .card { padding-top: 22px; }
.contrib .card::before {
  counter-increment: contrib; content: "0" counter(contrib);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; color: var(--accent);
}

/* ---------- RL flow diagram ---------- */
.flow { margin: 28px 0 38px; }
.flow-rail { list-style: none; padding: 0; margin: 0; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; align-items: stretch; }
.flow-node { position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; padding: 18px 16px; margin: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); min-height: 150px; }
.flow-node.judge { border-color: var(--green-line); box-shadow: 0 0 0 4px var(--green-soft), var(--shadow-card); }
.flow-node.judge .flow-title { color: var(--accent); }
.flow-step { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.flow-title { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; line-height: 1.2; }
.flow-title .katex { font-size: 1em; }
.flow-node p { font-size: 0.86rem; line-height: 1.45; color: var(--text-2); }
.flow-node + .flow-node::before {
  content: ""; position: absolute; left: -29px; top: 50%; width: 30px; height: 1.6px; background: var(--line-2); transform: translateY(-50%);
}
.flow-node + .flow-node::after {
  content: ""; position: absolute; left: -7px; top: 50%; width: 7px; height: 7px; border-top: 1.6px solid var(--line-2); border-right: 1.6px solid var(--line-2); transform: translateY(-50%) rotate(45deg);
}
.flow-loop { display: flex; align-items: center; gap: 12px; margin: 10px 14px 0; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--text-3); }
.flow-loop::before, .flow-loop::after { content: ""; flex: 1; border-top: 1.6px dashed var(--line-2); }
.flow-loop span { white-space: nowrap; }
.flow-loop b { color: var(--text-2); font-weight: 600; }
.flow-loop .loop-icon { width: 14px; height: 14px; display: inline-block; vertical-align: -3px; margin-right: 4px; }

/* ---------- Listening board ---------- */
.listen-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 22px; }
.listen-head .lede { margin: 12px 0 0; }
.headphone-note { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.headphone-note svg { width: 16px; height: 16px; flex: none; }
.comparison-board { border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.board-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.toolbar-note { display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--text-3); }
.toolbar-note svg { width: 16px; height: 16px; flex: none; }
.model-panel { padding: 22px 22px 16px; }
.sample-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sample-toolbar h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.sample-toolbar h3 small { display: block; margin-top: 2px; font-size: 0.8rem; font-weight: 400; color: var(--text-3); }
.sample-switch { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sample-switch > span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.sample-tabs { display: flex; gap: 5px; }
.sample-tabs button { width: 34px; height: 32px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text-2); font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }
.sample-tabs button[aria-selected="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.sample-tabs button:hover:not([aria-selected="true"]) { border-color: var(--text-3); color: var(--text); }
.caption-box { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 14px 18px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.caption-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); padding-top: 4px; }
.caption-text { font-size: 1.02rem; line-height: 1.55; overflow-wrap: anywhere; }
.caption-text::before, .caption-text::after { content: "\201C"; color: var(--text-3); }
.caption-text::after { content: "\201D"; }
.track-heading, .audio-row { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: center; }
.track-heading { padding: 0 18px 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.audio-list { display: grid; gap: 4px; }
.audio-row { padding: 9px 17px; min-height: 54px; border: 1px solid transparent; border-radius: 10px; transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease); }
.audio-row.is-ready { cursor: pointer; }
.audio-row.is-ready:hover, .audio-row.is-playing { background: var(--surface-2); border-color: var(--line); }
.audio-row.primary { min-height: 64px; padding-block: 11px; }
.audio-row.base { background: var(--row-base); border-color: var(--line); }
.audio-row.ours { background: var(--row-ours); border-color: var(--green-line); }
.audio-row.ours.is-playing, .audio-row.ours.is-ready:hover { background: var(--row-ours); border-color: var(--green); }
.audio-row.divider-after { margin-bottom: 6px; }
.audio-divider { display: flex; align-items: center; gap: 12px; padding: 10px 18px 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.audio-divider::after { content: ""; flex: 1; border-top: 1px dashed var(--line-2); }
.method-name { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; line-height: 1.4; }
.method-name strong { font-size: 0.95rem; font-weight: 600; }
.audio-row.primary .method-name strong { font-size: 1.05rem; font-weight: 700; }
.audio-row.ours .method-name strong { color: var(--accent); }
.method-subtitle { font-size: 0.78rem; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
.method-badge { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 999px; padding: 2px 7px; border: 1px solid var(--line-2); color: var(--text-2); }
.ours .method-badge { color: var(--accent); border-color: var(--green-line); }
.audio-slot { min-width: 0; }
.compact-player { display: grid; grid-template-columns: 34px minmax(0, 1fr) 70px; align-items: center; gap: 11px; }
.play-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--text-2); transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease); }
.play-button svg { width: 16px; height: 16px; grid-area: 1 / 1; }
.play-button:hover { border-color: var(--green); color: var(--accent); }
.is-playing .play-button { background: var(--green); border-color: var(--green); color: #0b0b0b; }
.pause-glyph, .is-playing .play-glyph { display: none; }
.is-playing .pause-glyph { display: block; }
.seek-control { position: relative; height: 34px; }
.waveform { position: absolute; inset: 2px 0; pointer-events: none; }
.waveform svg { display: block; width: 100%; height: 100%; }
.wave-background { fill: var(--wave); opacity: 0.55; }
.ours .wave-background { fill: var(--wave-ours); opacity: 0.6; }
.wave-played { fill: var(--accent); }
.seek-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seek-control:focus-within { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.seek-cursor { position: absolute; top: 3px; bottom: 3px; left: var(--progress, 0%); width: 1px; background: var(--accent); opacity: 0; pointer-events: none; }
.seek-control:hover .seek-cursor, .seek-control:focus-within .seek-cursor { opacity: 0.65; }
.play-time { display: flex; align-items: center; justify-content: flex-end; gap: 3px; white-space: nowrap; color: var(--text-2); font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.time-divider, .play-time [data-duration] { color: var(--text-3); }
.audio-placeholder { min-height: 34px; display: flex; align-items: center; gap: 12px; padding: 5px 13px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--text-3); font-size: 0.8rem; }
.board-footnote { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 10px 22px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); font-size: 0.8rem; }
.volume-control { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.volume-button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: var(--text-2); }
.volume-button:hover { background: var(--line); color: var(--text); }
.volume-button svg { width: 18px; height: 18px; }
.mute-cross, .is-muted .sound-waves { display: none; }
.is-muted .mute-cross { display: block; }
.volume-slider { width: 72px; height: 24px; margin: 0; accent-color: var(--green); cursor: pointer; }
.comparison-key { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); white-space: nowrap; font-size: 0.8rem; font-weight: 600; }
.comparison-key > span { color: var(--text-3); margin-inline: 2px; }
.comparison-key i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.base-key { background: var(--text-3); }
.ours-key { background: var(--green); }
.noscript-note { margin-top: 14px; font-size: 0.9rem; color: var(--text-3); }

/* ---------- Conclusion ---------- */
.closing { max-width: 920px; padding: clamp(20px, 2.6vw, 32px) clamp(22px, 3vw, 36px); border-left: 3px solid var(--green); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; background: var(--surface); box-shadow: var(--shadow-card); }
.closing p { font-size: clamp(1.02rem, 1.4vw, 1.16rem); line-height: 1.62; color: var(--text); text-wrap: pretty; }

/* ---------- Be the judge (blind A/B) ---------- */
.judge-game { margin-bottom: clamp(22px, 3vw, 34px); padding: clamp(18px, 2.4vw, 28px); border: 1px solid var(--green-line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 0 0 4px var(--green-soft), var(--shadow-card); }
.jg-head h3 { margin-top: 12px; font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
.jg-head p:not(.kicker) { margin-top: 10px; max-width: 70ch; font-size: 0.98rem; color: var(--text-2); }
.judge-game .caption-box { margin-top: 18px; }
.jg-pair .audio-row { background: var(--surface-2); border-color: var(--line); }
.jg-pair .audio-row.ours { background: var(--row-ours); border-color: var(--green-line); }
.jg-pair .audio-row.base { background: var(--row-base); border-color: var(--line-2); }
.jg-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 4px; }
.jg-pager > span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-right: 2px; }
.jg-pager button { position: relative; width: 36px; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text-2); font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }
.jg-pager button:hover { border-color: var(--text-3); color: var(--text); }
.jg-pager button[aria-pressed="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.jg-pager button.done::after { content: ""; position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.jg-pager .jg-model { margin-left: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-3); }
.jg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.jg-actions .pill { height: 42px; }
.jg-actions .pill:disabled { cursor: default; opacity: 0.55; }
.jg-actions .pill.is-picked { opacity: 1; background: var(--text); color: var(--bg); border-color: var(--text); }
.jg-result { margin-top: 14px; padding: 12px 16px; border-left: 3px solid var(--green); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--green-soft); font-size: 0.98rem; }
.jg-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.jg-tally { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.jg-foot .pill { height: 40px; }

/* ---------- References & BibTeX ---------- */
.bibtex { position: relative; margin-top: 26px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.bibtex pre { margin: 0; padding: 20px 22px; overflow-x: auto; font-size: 13px; line-height: 1.6; color: var(--text); }
.bibtex .copy-btn {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2);
}
.bibtex .copy-btn:hover { border-color: var(--green-line); color: var(--accent); background: var(--green-soft); }
.bibtex .copy-btn svg { width: 14px; height: 14px; }

/* ---------- 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; }
.footer-logo { height: 22px; width: auto; }
html[data-theme="dark"] .footer-logo { filter: brightness(0) invert(1) opacity(0.9); }
html[data-theme="dark"] .fig-media { background: #e9e9e4; }
html[data-theme="dark"] .fig-media img { filter: brightness(0.92); }
.brand-divider { width: 1px; height: 20px; background: var(--line-2); }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1600px); max-height: 94vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox img { max-width: min(96vw, 1600px); max-height: 94vh; width: auto; height: auto; border-radius: 10px; background: #fff; padding: 10px; }
.lightbox-close { position: fixed; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; }
.lightbox-close svg { width: 18px; height: 18px; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .flow-node:nth-child(4)::before, .flow-node:nth-child(4)::after { display: none; }
}
@media (max-width: 900px) {
  .primary-nav { display: none; }
  .primary-nav + .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-grid; }
  .cols3, .cards-3, .why-grid, .fig-row-3 { grid-template-columns: 1fr; }
  .fig-row-3 > .fig-card:nth-child(3) { width: auto; }
  .disclosure > summary { flex-wrap: wrap; row-gap: 4px; }
  .disclosure-title { flex: 1 1 calc(100% - 60px); }
  .disclosure-hint { order: 3; flex-basis: 100%; margin-left: 0; }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-spot { grid-template-columns: 1fr; }
  .split-45-55, .split-55-45 { grid-template-columns: 1fr; }
  .prose-2 { grid-template-columns: 1fr; }
  .board .b-metric .gain { display: block; margin: 6px 0 0; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .bibtex pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
  .site-footer.crop::before { display: none; }
  .data-table tbody th { white-space: normal; max-width: 150px; }
  .hero { min-height: 0; padding-bottom: 60px; }
  .hero-inner { padding: 72px 10px 50px; }
  .hero-title { font-size: clamp(2.4rem, 14vw, 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.9rem; }
  .hero-links .pill { height: 44px; padding: 0 15px 0 13px; font-size: 14.5px; }
  .cards-2, .cards-3, .cards-4, .fig-row-2 { 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: 10px 16px; padding: 18px 2px; border-bottom: 1px solid var(--line); }
  .board tbody th, .board tbody td { display: block; padding: 0; border: 0; }
  .board .b-name, .board .b-up { grid-column: 1 / -1; }
  .board .b-metric::before { content: attr(data-label); display: block; margin-bottom: 4px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
  .flow-rail { grid-template-columns: 1fr; row-gap: 26px; }
  .flow-node { margin: 0; min-height: 0; }
  .flow-node + .flow-node::before { left: 50%; top: -27px; width: 1.6px; height: 26px; transform: translateX(-50%); }
  .flow-node + .flow-node::after { left: 50%; top: -9px; transform: translateX(-50%) rotate(135deg); }
  .flow-node:nth-child(4)::before, .flow-node:nth-child(4)::after { display: block; }
  .flow-loop { margin-inline: 0; }
  .flow-loop span { white-space: normal; text-align: center; }
  .track-heading { display: none; }
  .audio-row { display: block; padding: 10px 12px; }
  .method-info { margin-bottom: 8px; }
  .caption-box { display: block; padding: 12px 14px; }
  .caption-label { display: block; margin-bottom: 6px; }
  .board-toolbar, .model-panel { padding-inline: 14px; }
  .toolbar-note { font-size: 0.78rem; }
  .board-footnote { padding-inline: 14px; }
  .player-help { width: 100%; order: 3; }
  .hbar { grid-template-columns: minmax(96px, 38%) 1fr auto; font-size: 13px; }
  .hbar-axis { grid-template-columns: minmax(96px, 38%) 1fr auto; }
  .tl-spot-stats { grid-template-columns: 1fr; gap: 10px; }
  .tl-stat { display: flex; align-items: baseline; gap: 12px; }
  .tl-stat > span { margin-top: 0; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .ticker { font-size: 10.5px; }
  .ticker-track > span { gap: 8px; padding: 11px 18px; }
  .bibtex .copy-btn { position: static; margin: 12px 14px 0; }
  .brand-name { display: none; }
  .brand-divider { display: none; }
  .section-head .mega { font-size: clamp(2.4rem, 11vw, 4rem); }
}
@media (hover: none) {
  .seek-cursor { display: none; }
}
@media (forced-colors: active) {
  .hbar-fill, .updots i, .wave-played, .wave-background { forced-color-adjust: none; background: CanvasText; fill: CanvasText; }
  [aria-selected="true"], .is-playing .play-button, .pill.is-picked { outline: 2px solid; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .js .reveal, .js .col, .js .tl-spot { opacity: 1; transform: none; transition: none; }
  .js .hbar-fill { transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
@media print {
  .site-header, .theme-toggle, .ticker, .skip-link, .hero-links, .comparison-board, .bibtex .copy-btn { display: none !important; }
  .band-green, .band-ink { background: #fff !important; color: #000 !important; }
  .section { padding: 30px 0; }
  .js .reveal, .js .col, .js .tl-spot { opacity: 1; transform: none; }
  .disclosure[open] > summary::after { display: none; }
  details:not([open]) > *:not(summary) { display: none; }
}

/* =========================================================================
   Lean rebuild: diagrams ported from the talk deck, judge card, data families, result tabs
   ========================================================================= */
:root { --over: cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ---------- Diagram panels ---------- */
.diagram {
  position: relative; margin: 22px 0; padding: clamp(16px, 2vw, 26px);
  border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); min-width: 0;
  --m-alt: var(--surface-2); --m-hair: var(--line-2); --m-ink: var(--text); --m-ink2: var(--text-2); --m-muted: var(--text-3);
  --m-gray: #9a9a9a; --m-thin: #c8c8c8; --m-grid: var(--line); --m-bg: var(--surface); --m-green-text: var(--green-text);
  --m-green-tint: #edf5dc; --m-green-line: #cfe6a3; --m-green-mid: #c9e39a; --m-green-pale: #e3f0c7; --m-base-tint: #f0f1f2; --m-red: var(--down); --m-on-green: #0b0b0b;
  --t0: 0.6s; --step: 1s;
}
html[data-theme="dark"] .diagram, .band-ink .diagram { --m-gray: #8a8a8a; --m-thin: #4a4a4a; --m-green-tint: rgba(118, 185, 0, 0.18); --m-green-line: rgba(118, 185, 0, 0.45); --m-green-mid: rgba(118, 185, 0, 0.4); --m-green-pale: rgba(118, 185, 0, 0.22); --m-base-tint: rgba(255, 255, 255, 0.06); }
.diagram + .diagram { margin-top: 18px; }
.diagram-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px 18px; margin-bottom: 14px; }
.diagram-title { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.015em; line-height: 1.25; }
.diagram-sub { margin-top: 3px; font-size: 0.9rem; line-height: 1.45; color: var(--text-3); }
.replay { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.replay:hover { border-color: var(--green-line); color: var(--accent); background: var(--green-soft); }
.diagram-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) {
  .diagram-scroll { background: linear-gradient(90deg, var(--surface) 30%, transparent), linear-gradient(90deg, transparent, var(--surface) 70%) 100% 0, radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.18), transparent), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.18), transparent) 100% 0; background-color: var(--surface); background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
}
.diagram-scroll > svg { display: block; width: 100%; height: auto; min-width: 860px; overflow: visible; }
.diagram-scroll.narrow > svg { min-width: 0; }
.diagram-scroll.narrow .mech { min-width: 520px; }
.diagram-note { margin-top: 14px; font-size: 0.95rem; line-height: 1.55; color: var(--text-2); max-width: 90ch; }
.diagram-note b { color: var(--accent); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 22px); align-items: start; margin: 22px 0; }
.duo > .diagram { margin: 0; }
.duo-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px clamp(18px, 2.4vw, 36px); }
.duo-charts .chart-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; color: var(--text-2); }
.duo-charts .diagram-scroll > svg { min-width: 0; }
.chart-sm > svg { max-width: 640px; margin: 0 auto; }

/* ---------- Mechanism diagrams (deck .mech rules, page tokens) ---------- */
.mech text { font-family: var(--font-sans); fill: var(--m-ink); font-size: 22px; }
.mech.lg text { font-size: 28px; }
.mech .t24 { font-size: 24px; } .mech .t26 { font-size: 26px; } .mech .t32 { font-size: 32px; }
.mech .bd { font-weight: 700; } .mech .md { font-weight: 500; }
.mech .mu { fill: var(--m-muted); } .mech .ink2 { fill: var(--m-ink2); } .mech .gr { fill: var(--m-green-text); } .mech .rd { fill: var(--m-red); }
.mech .sup { font-size: 78%; baseline-shift: super; } .mech .sb { font-size: 78%; }
.mech .bg { fill: var(--m-bg); stroke: none; }
.mech .box { fill: var(--m-alt); stroke: var(--m-hair); stroke-width: 2; }
.mech .box.g { fill: var(--m-green-tint); stroke: var(--m-green-line); }
.mech .ghost { fill: var(--m-bg); stroke: var(--m-gray); stroke-width: 2; stroke-dasharray: 9 7; }
.mech .ar { fill: none; stroke: var(--m-gray); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.mech .ar.ink { stroke: var(--m-ink2); stroke-width: 3; }
.mech .ar.g { stroke: var(--m-green-text); stroke-width: 3; }
.mech .ar.gb { stroke: var(--green); stroke-width: 4; }
.mech .ar.net { stroke-width: 5; }
.mech .ar.thin { stroke: var(--m-thin); stroke-width: 2; }
.mech .ar.dash { stroke: var(--m-green-text); stroke-width: 2.5; stroke-dasharray: 8 7; }
.mech .arc { fill: none; stroke: var(--m-gray); stroke-width: 2.5; stroke-dasharray: 8 7; stroke-linecap: round; }
.mech .lead { fill: none; stroke: var(--m-hair); stroke-width: 2; stroke-dasharray: 4 8; }
.mech .force { fill: none; stroke-width: 8; stroke-linecap: butt; }
.mech .force.pull { stroke: var(--green); }
.mech .force.push { stroke: var(--m-ink2); }
.mech .spring { fill: none; stroke: var(--m-green-text); stroke-width: 2.5; stroke-linejoin: round; }
.mech .chipr { fill: var(--m-alt); stroke: var(--m-hair); stroke-width: 1.5; }
.mech .chipr.g { fill: var(--m-green-tint); stroke: var(--m-green-line); }
.mech .pt { stroke: var(--m-bg); stroke-width: 2; }
.mech .hol { fill: var(--m-bg); stroke-width: 3; }
.mech .halo { paint-order: stroke; stroke: var(--m-bg); stroke-width: 8px; stroke-linejoin: round; }
.mech .halo2 { paint-order: stroke; stroke: var(--m-alt); stroke-width: 8px; stroke-linejoin: round; }
.mech .wv { fill: none; stroke: var(--m-gray); stroke-width: 2; stroke-linecap: round; }

/* ---------- Charts (deck .chart rules, page tokens) ---------- */
.chart text { font-family: var(--font-sans); fill: var(--text); }
.chart .tick { font-size: 22px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .lab { font-size: 24px; fill: var(--text-2); }
.chart .lab.b { fill: var(--text); font-weight: 700; }
.chart .val { font-size: 24px; fill: var(--text-2); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--surface); stroke-width: 8px; stroke-linejoin: round; }
.chart .val.b { fill: var(--text); font-weight: 700; }
.chart .cap { font-size: 22px; fill: var(--text-3); }
.chart .ann { font-size: 22px; fill: var(--text-2); font-style: italic; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-2); stroke-width: 1.5; }
.chart .bar { fill: var(--m-gray); }
.chart .bar.ours { fill: var(--green); }
.chart .refline { stroke: var(--text-3); stroke-width: 2; stroke-dasharray: 8 8; }
.chart .guide { stroke: var(--m-gray); stroke-width: 1.5; stroke-dasharray: 3 6; }
.chart .pt { fill: var(--m-gray); stroke: var(--surface); stroke-width: 2; }
.chart .pt.ours { fill: var(--green); }
.chart .ring { fill: none; stroke: var(--green); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; }
.diagram.play .chart .ring { animation: ring 0.9s ease-out 2.2s both; }
.chart .quad { fill: var(--m-green-tint); }
.chart .lead { stroke: var(--m-gray); stroke-width: 1; }
.chart .fc-win { fill: var(--green); } .chart .fc-on-green { fill: var(--m-on-green); }
@keyframes ring { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.8); opacity: 0; } }

/* ---------- Motion: entrances and build steps (play on scroll, Replay button) ----------
   Hidden state: .js .diagram … ; play state: .js .diagram.play … (same specificity or higher, declared later, so it wins). */
.js .diagram .ent, .js .diagram .ent-pop, .js .diagram .fragment { opacity: 0; }
.js .diagram .ent { transform: translateY(12px); }
.js .diagram .ent.fade { transform: none; }
.js .diagram .ent.pop { transform: scale(0.9); }
.js .diagram .ent-grow { transform: scaleX(0); transform-origin: left center; }
.js .diagram .ent-grow.y { transform: scaleY(0); transform-origin: top center; }
.js .diagram .ent-draw, .js .diagram .fragment.draw { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); }
.js .diagram .ent-pop { transform: scale(0.6); }
.js .diagram .fragment { transform: translateY(14px); }
.js .diagram .fragment.fade-in, .js .diagram .fragment.draw { transform: none; }
.js .diagram .fragment.pop { transform: scale(0.85); }
.js .diagram .fragment.grow-x { transform: scaleX(0); transform-origin: left center; }
.js .diagram .fragment.grow-y { transform: scaleY(0); transform-origin: top center; }
.js .diagram .fragment.drift { transform: translateX(var(--dx, 0px)) scaleX(var(--sx, 1)); }
.js .diagram .fragment.travel { transform: translateX(var(--dx, 0px)); }
.js .diagram .fragment.light { opacity: 0.22; transform: none; filter: grayscale(1); }
.diagram .fragment[data-order="1"] { --k: 0; } .diagram .fragment[data-order="2"] { --k: 1; } .diagram .fragment[data-order="3"] { --k: 2; }
.diagram .fragment[data-order="4"] { --k: 3; } .diagram .fragment[data-order="5"] { --k: 4; }
.js .diagram.play .ent, .js .diagram.play .ent.fade, .js .diagram.play .ent.pop { opacity: 1; transform: none; transition: opacity 0.5s var(--ease) var(--d, 0s), transform 0.5s var(--ease) var(--d, 0s); }
.js .diagram.play .ent.pop { transition-timing-function: var(--over); }
.js .diagram.play .ent-grow, .js .diagram.play .ent-grow.y { transform: none; transition: transform var(--dur, 0.6s) var(--ease) var(--d, 0s); }
.js .diagram.play .ent-draw { stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s var(--ease) var(--d, 0s); }
.js .diagram.play .ent-pop { opacity: 1; transform: none; transition: opacity 0.3s var(--ease) var(--d, 0s), transform 0.5s var(--over) var(--d, 0s); }
.js .diagram.play .fragment, .js .diagram.play .fragment.fade-in, .js .diagram.play .fragment.draw, .js .diagram.play .fragment.pop,
.js .diagram.play .fragment.grow-x, .js .diagram.play .fragment.grow-y, .js .diagram.play .fragment.light {
  opacity: 1; transform: none; filter: none; stroke-dashoffset: 0;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease), stroke-dashoffset var(--dur, 0.6s) var(--ease), filter 0.4s var(--ease);
  transition-delay: calc(var(--t0) + var(--k, 0) * var(--step) + var(--d, 0s));
}
.js .diagram.play .fragment.pop { transition-timing-function: var(--ease), var(--over), var(--ease), var(--ease); }
.js .diagram.play .fragment.grow-x, .js .diagram.play .fragment.grow-y { transition-duration: 0.15s, var(--dur, 0.6s), 0.6s, 0.4s; }
.js .diagram.play .fragment.drift { opacity: 1; transform: none; transition: opacity 0.3s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--t0) + var(--k, 0) * var(--step) + var(--d, 0s)), calc(var(--t0) + var(--k, 0) * var(--step) + var(--dt, 0s)); }
.js .diagram.play .fragment.travel { opacity: 1; transform: none; transition: opacity 0.2s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--t0) + var(--k, 0) * var(--step) + var(--d, 0s)); }
svg .fragment, svg .ent, svg .ent-pop, svg .ent-grow { transform-box: fill-box; transform-origin: center; }
svg .fragment.grow-x, svg .ent-grow, svg .fragment.drift { transform-origin: left center; }
svg .fragment.grow-y, svg .ent-grow.y { transform-origin: top center; }
.diagram.replaying, .diagram.replaying * { transition: none !important; animation: none !important; }

/* ---------- CFG diagram: the number line replays its drift twice more after the first pass ---------- */
.js .diagram.play .nl-drift { animation: nl-drift 5s var(--ease) 6.5s 2 forwards; }
.js .diagram.play .nl-after { animation: nl-after 5s var(--ease) 6.5s 2 forwards; }
.js .diagram.play .nl-after-draw { animation: nl-after-draw 5s var(--ease) 6.5s 2 forwards; }
@keyframes nl-drift { 0%, 28% { transform: translateX(var(--dx, 0px)) scaleX(var(--sx, 1)); } 58%, 100% { transform: none; } }
@keyframes nl-after { 0%, 55% { opacity: 0; } 72%, 100% { opacity: 1; } }
@keyframes nl-after-draw { 0%, 55% { opacity: 0; stroke-dashoffset: var(--len, 1200); } 62% { opacity: 1; } 82%, 100% { opacity: 1; stroke-dashoffset: 0; } }

/* ---------- Chart emphasis + animated table rows ---------- */
.js .diagram.play .chart .bar.one { animation: barglow 0.9s ease var(--g, 2s) both; }
@keyframes barglow { 0% { filter: brightness(1); } 40% { filter: brightness(1.28); } 100% { filter: brightness(1); } }
.anim-rows tbody tr:nth-child(1) { --i: 0; } .anim-rows tbody tr:nth-child(2) { --i: 1; } .anim-rows tbody tr:nth-child(3) { --i: 2; } .anim-rows tbody tr:nth-child(4) { --i: 3; }
.anim-rows tbody tr:nth-child(5) { --i: 4; } .anim-rows tbody tr:nth-child(6) { --i: 5; } .anim-rows tbody tr:nth-child(7) { --i: 6; } .anim-rows tbody tr:nth-child(8) { --i: 7; }
.anim-rows tbody tr:nth-child(9) { --i: 8; } .anim-rows tbody tr:nth-child(10) { --i: 9; } .anim-rows tbody tr:nth-child(11) { --i: 10; } .anim-rows tbody tr:nth-child(12) { --i: 11; }
.js .anim .anim-rows tbody tr > th, .js .anim .anim-rows tbody tr > td { opacity: 0; transform: translateY(6px); }
.js .anim.play .anim-rows tbody tr > th, .js .anim.play .anim-rows tbody tr > td { opacity: 1; transform: none; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); transition-delay: calc(0.1s + var(--i, 0) * 0.11s); }
.js .anim.play .anim-rows tbody tr.row-ours > td { animation: rowflash 1.2s var(--ease) calc(0.45s + var(--i, 0) * 0.11s) both; }
@keyframes rowflash { 0% { background-color: rgba(118, 185, 0, 0.5); } 100% { background-color: var(--row-ours); } }
@media (prefers-reduced-motion: reduce) {
  .js .anim .anim-rows tbody tr > th, .js .anim .anim-rows tbody tr > td { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
  .js .diagram.play .chart .bar.one, .js .diagram.play .nl-drift, .js .diagram.play .nl-after, .js .diagram.play .nl-after-draw { animation: none !important; }
}

/* ---------- Judge card ---------- */
.judge-split { align-items: stretch; }
.jcard { display: grid; grid-template-columns: 1fr; gap: 14px; padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.jcard-label { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.jcard-in { padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.cap-chip { display: inline-block; padding: 5px 12px; border-radius: 10px; background: #eaf2fb; border: 1px solid #bcd4ef; color: #1f4e8c; font-size: 0.92rem; font-weight: 500; }
html[data-theme="dark"] .cap-chip { background: rgba(42, 120, 214, 0.18); border-color: rgba(120, 170, 240, 0.4); color: #9cc4ff; }
.jcard-clips { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.clip-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); }
.clip-chip .wave { display: inline-block; width: 56px; height: 12px; background: repeating-linear-gradient(90deg, var(--text-3) 0 2px, transparent 2px 4px); -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); opacity: 0.8; }
.jcard-model { padding: 16px 18px; border: 1px solid var(--green-line); border-radius: var(--radius); background: linear-gradient(180deg, var(--green-soft), transparent 80%); }
.jcard-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--accent); margin-bottom: 12px; }
.jcard-title small { display: block; margin-top: 2px; font-size: 0.8rem; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.jcard-crit { display: grid; gap: 8px; }
.jcard-crit li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.jcard-crit li i { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #0b0b0b; font-style: normal; font-weight: 700; font-size: 13px; }
.jcard-crit li:nth-child(2) i { background: var(--green-soft); color: var(--accent); border: 1px solid var(--green-line); }
.jcard-crit li:nth-child(3) i { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line-2); }
.jcard-crit b { display: block; font-size: 0.98rem; }
.jcard-crit small { display: block; font-size: 0.8rem; color: var(--text-3); }
.jcard-out { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); }
.pbar { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; margin: 6px 0; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.pbar i { position: relative; display: block; height: 14px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.pbar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); background: var(--text-3); opacity: 0.45; border-radius: 3px; transform-origin: left center; }
.pbar.on span { color: var(--accent); font-weight: 700; }
.pbar.on i::after { background: var(--green); opacity: 1; }
.js .jcard .pbar i::after { transform: scaleX(0); transition: transform 0.9s var(--ease) 0.5s; }
.jcard.play .pbar i::after { transform: scaleX(1); }
.jcard-verdict { display: block; margin-top: 10px; text-align: right; font-weight: 800; color: var(--accent); }

/* ---------- Data families ---------- */
.fams { margin-top: 22px; align-items: stretch; }
.fam { display: flex; flex-direction: column; gap: 10px; padding: clamp(16px, 2vw, 22px); border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); min-width: 0; }
.fam h4 { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.fam-cap { padding: 9px 12px; border-radius: 10px; background: #eaf2fb; border: 1px solid #bcd4ef; color: #1f4e8c; font-size: 0.92rem; line-height: 1.4; text-align: center; }
.fam-cap b { color: #1f4e8c; }
html[data-theme="dark"] .fam-cap { background: rgba(42, 120, 214, 0.18); border-color: rgba(120, 170, 240, 0.4); color: #9cc4ff; }
html[data-theme="dark"] .fam-cap b { color: #bcd8ff; }
.fam-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cand { padding: 10px 10px; border-radius: 10px; text-align: center; font-size: 0.9rem; line-height: 1.3; }
.cand b { display: block; font-weight: 700; }
.cand small { display: block; margin-top: 3px; font-size: 0.78rem; color: var(--text-2); }
.cand.a { background: var(--m-green-tint, #edf5dc); border: 1px solid #cfe6a3; color: var(--accent); }
.cand.b { background: #fdf5e4; border: 1px solid #ecd9a8; color: #7a5a12; }
html[data-theme="dark"] .cand.a { background: rgba(118, 185, 0, 0.16); border-color: rgba(118, 185, 0, 0.4); }
html[data-theme="dark"] .cand.b { background: rgba(230, 180, 60, 0.14); border-color: rgba(230, 180, 60, 0.4); color: #f0cf7a; }
html[data-theme="dark"] .cand small { color: var(--text-2); }
.fam-labels { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-3); }
.lbl { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-2); font-family: var(--font-mono); font-size: 12px; color: var(--text-3); opacity: 0.55; }
.lbl.on { opacity: 1; background: var(--surface-2); color: var(--text); border-color: var(--text-3); }
.fam-how { margin-left: 4px; }
.fam-teach { font-size: 0.9rem; line-height: 1.45; color: var(--text-2); padding-top: 8px; border-top: 1px solid var(--line); }
.fam-teach b { color: var(--accent); }
.fam-count { margin-top: auto; font-size: 0.9rem; color: var(--text-3); }
.fam-count b { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; margin-right: 6px; }

/* ---------- Two-stage flow (4 nodes) + recipe ---------- */
.flow-rail.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Margin matrix ---------- */
.margin-row { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; margin-top: 18px; align-items: start; }
.margin-notes { display: grid; gap: 10px; }
.mnote { padding: 10px 14px; border-left: 3px solid var(--green); background: var(--green-soft); border-radius: 0 10px 10px 0; font-size: 0.93rem; line-height: 1.5; color: var(--text-2); }
.mnote b { color: var(--text); }
.mtx-card { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface-2); }
.mtx-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.mtx-title small { display: block; letter-spacing: 0; text-transform: none; font-size: 11px; margin-top: 2px; }
.mtx { width: 100%; border-collapse: collapse; font-size: 13.5px; text-align: center; font-variant-numeric: tabular-nums; }
.mtx th, .mtx td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.mtx th { font-weight: 600; color: var(--text-2); }
.mtx tbody th { text-align: left; }
.mtx .dash { color: var(--text-3); }
.mtx td.r, .mtx th.r { color: var(--accent); font-weight: 700; border-left: 2px solid var(--green); }
.mtx .fragment { display: inline-block; }
.mtx-foot { margin-top: 10px; font-size: 0.85rem; color: var(--text-2); }

/* ---------- Result tabs & judge test cards ---------- */
.rtabs { margin-top: 18px; }
.rtabs .seg { margin-bottom: 14px; }
.rtabs .seg button small { margin-left: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
.rpanel .table-note { margin-top: 10px; }
.tests { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.test { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); font-size: 0.9rem; line-height: 1.4; color: var(--text-2); }
.test b { display: flex; align-items: center; gap: 8px; color: var(--text); margin-bottom: 4px; }
.test b svg { width: 18px; height: 18px; color: var(--accent); }
.test .vs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.test .vs em { font-style: normal; color: var(--text-3); font-size: 0.82rem; }
.test .chip { font-style: normal; padding: 3px 9px; font-size: 11px; }
.test .chip.on { background: var(--green-soft); border-color: var(--green-line); color: var(--accent); }
.abstract-toggle { margin-top: 26px; }
.abstract-toggle .disclosure-body p { max-width: none; font-size: 0.98rem; line-height: 1.65; color: var(--text-2); }

@media (max-width: 1100px) {
  .flow-rail.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-rail.cols-4 .flow-node:nth-child(3)::before, .flow-rail.cols-4 .flow-node:nth-child(3)::after { display: none; }
  .flow-rail.cols-4 .flow-node:nth-child(4)::before, .flow-rail.cols-4 .flow-node:nth-child(4)::after { display: block; }
  .margin-row { grid-template-columns: 1fr; }
  .mtx-card { max-width: 420px; }
}
@media (max-width: 900px) {
  .judge-split { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .fams.cards-3 { grid-template-columns: 1fr; }
  .tests { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .flow-rail.cols-4 { grid-template-columns: 1fr; }
  .duo-charts { grid-template-columns: 1fr; }
  .flow-rail.cols-4 .flow-node:nth-child(3)::before, .flow-rail.cols-4 .flow-node:nth-child(3)::after { display: block; }
  .diagram-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .js .diagram .ent, .js .diagram .ent-pop, .js .diagram .fragment, .js .diagram .ent-grow, .js .diagram .ent-draw, .js .diagram .fragment.draw { opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; filter: none !important; transition: none !important; }
  .diagram.play .chart .ring { animation: none !important; }
  .js .jcard .pbar i::after { transform: none !important; transition: none !important; }
  .replay { display: none; }
}
