/* ViTeX-Bench project page. Same world as the leaderboard (one foreground and
 * one background per theme, hairlines, pills), plus a single lavender accent
 * from the ViTeX logo for the venue, the Pareto front and target strings. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("../fonts/atkinson-hyperlegible-mono-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #050505;
  --bg-2: #0F0F0F;
  --fg: #F4F4F4;
  --fg-2: #A8A8A8;
  --fg-3: #7E7E7E;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.22);
  --hover: rgba(255, 255, 255, 0.045);
  --sel: rgba(255, 255, 255, 0.075);
  --glow: 1;
  --accent: #A99DF6;
  --accent-ink: #0E0A24;
  --accent-soft: rgba(169, 157, 246, 0.14);
  --ambient: 0.5;
  --ambient-filter: blur(60px) saturate(1.15) brightness(0.8);
  --plate: #F2F2F2;
  --fig-filter: brightness(0.94);
  --sans: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #E8E8E8;
  --bg-2: #F0F0F0;
  --fg: #161616;
  --fg-2: #404040;
  --fg-3: #5C5C5C;
  --line: rgba(0, 0, 0, 0.1);
  --line-2: rgba(0, 0, 0, 0.22);
  --hover: rgba(0, 0, 0, 0.035);
  --sel: rgba(0, 0, 0, 0.06);
  --glow: 0;
  --accent: #5242C2;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(82, 66, 194, 0.1);
  --ambient: 0.5;
  --ambient-filter: blur(64px) saturate(1.1) brightness(1.3) contrast(0.6);
  --plate: #F7F7F7;
  --fig-filter: none;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #E8E8E8; --bg-2: #F0F0F0; --fg: #161616; --fg-2: #404040; --fg-3: #5C5C5C;
    --line: rgba(0, 0, 0, 0.1); --line-2: rgba(0, 0, 0, 0.22); --hover: rgba(0, 0, 0, 0.035); --sel: rgba(0, 0, 0, 0.06);
    --glow: 0; --accent: #5242C2; --accent-ink: #FFFFFF; --accent-soft: rgba(82, 66, 194, 0.1); --ambient: 0.5; --ambient-filter: blur(64px) saturate(1.1) brightness(1.3) contrast(0.6); --plate: #F7F7F7; --fig-filter: none; color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 400ms var(--ease), color 400ms var(--ease);
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 0.2em; text-decoration-thickness: 1px; transition: text-decoration-color 200ms; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 1.5px solid var(--fg); outline-offset: 3px; border-radius: 2px; }
code { font: 400 0.9em/1 var(--mono); padding: 0.12em 0.38em; border: 1px solid var(--line); border-radius: 4px; }
sub { font-size: 0.72em; line-height: 0; vertical-align: -0.25em; }
sup { font: 400 0.68em/0 var(--mono); vertical-align: 0.55em; margin-left: 1px; color: var(--fg-3); }
strong { font-weight: 500; color: var(--fg); }
h1, h2, h3 { text-wrap: balance; }
html { scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px; background: var(--fg); color: var(--bg); border-radius: 4px; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.offscreen-video { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { font-weight: 600; font-size: 16px; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a, .top__lb { font-size: 14px; color: var(--fg-2); text-decoration: none; transition: color 200ms; }
.nav a:hover, .top__lb:hover { color: var(--fg); }
.top__lb { display: inline-flex; align-items: center; gap: 4px; padding-left: 26px; border-left: 1px solid var(--line); height: 22px; }
.top__lb .icon { width: 14px; height: 14px; }
.top__inner .icon-btn + .icon-btn { margin-left: -18px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 1px solid var(--line-2); border-radius: 50%; color: var(--fg-2); cursor: pointer; transition: color 200ms, border-color 200ms; flex: none; }
.icon-btn:hover { color: var(--fg); border-color: var(--fg-3); }
.icon-btn .icon { width: 16px; height: 16px; }
:root[data-theme="dark"] .icon--moon, :root[data-theme="light"] .icon--sun { display: none; }

/* ---------- Share panel ---------- */
.share-scrim { position: fixed; inset: 0; z-index: 29; background: transparent; }
.share-scrim[hidden] { display: none; }
.share {
  position: fixed; z-index: 30; top: 70px; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  width: min(440px, calc(100vw - 2 * var(--gutter))); max-height: calc(100svh - 86px); overflow-y: auto; overscroll-behavior: contain;
  background: color-mix(in srgb, var(--bg-2) 96%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); border-radius: 16px; padding: 16px 18px 14px; animation: share-in 280ms var(--ease);
}
.share[hidden] { display: none; }
@keyframes share-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes share-up { from { transform: translateY(24px); opacity: 0; } }
.share__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.share__title { margin: 0; font-size: 16px; font-weight: 500; }
.share__close { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--fg-3); cursor: pointer; }
.share__close:hover { color: var(--fg); background: var(--hover); }
.share__close .icon { width: 16px; height: 16px; }
.share__url { display: flex; align-items: center; gap: 10px; padding: 5px 5px 5px 14px; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 18px; }
.share__url code { flex: 1; min-width: 0; border: 0; padding: 0; font-size: 13px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share__group { margin: 0 0 6px; font-size: 12.5px; color: var(--fg-3); }
.share__grid { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px 4px; }
.share__tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 8px 2px 6px; border: 0; border-radius: 10px;
  background: none; color: var(--fg-2); text-decoration: none; font: 500 11.5px/1.2 var(--sans); cursor: pointer; text-align: center; transition: color 200ms;
}
.share__tile svg { box-sizing: content-box; width: 19px; height: 19px; padding: 11px; border-radius: 50%; border: 1px solid var(--line-2); fill: var(--fg); transition: border-color 200ms, fill 200ms, background-color 200ms; }
.share__tile span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share__xhs text { font: 700 12px/1 var(--sans); fill: var(--bg-2); }
.share__tile:hover .share__xhs text { fill: var(--bg-2); }
.share__tile:hover { color: var(--fg); }
.share__tile:hover svg { border-color: var(--accent); fill: var(--accent); }
.share__tile[aria-expanded="true"] svg { background: var(--accent); border-color: var(--accent); fill: var(--accent-ink); }
.share__qr { display: flex; align-items: center; gap: 14px; margin: -4px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.share__qr[hidden] { display: none; }
.share__qrplate { flex: none; width: 128px; padding: 6px; border-radius: 8px; background: #fff; }
.share__qrsvg { display: block; width: 100%; height: auto; }
.share__qr p { margin: 0; font-size: 13.5px; color: var(--fg-2); }
.share__qr b { color: var(--fg); font-weight: 600; }
.share__hint { margin: 0 0 12px; font-size: 12px; line-height: 1.5; color: var(--fg-3); }
.share__native[hidden] { display: none; }
.share__toast { margin: 0; font-size: 13px; color: var(--accent); }
.share__toast:not(:empty) { margin-top: 10px; }

/* ---------- Buttons, pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 22px;
  font: 500 14.5px/1 var(--sans); text-decoration: none; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg); transition: opacity 200ms, border-color 200ms, background-color 200ms, color 200ms;
}
.btn:hover { opacity: 0.86; }
.btn .icon { width: 17px; height: 17px; }
.btn--ghost { background: none; color: var(--fg); border-color: var(--line-2); }
.btn--ghost:hover { opacity: 1; border-color: var(--accent); }
.btn--ghost .icon { color: var(--accent); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 13px; gap: 7px; }
.btn--sm .icon { width: 15px; height: 15px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 500 11.5px/1 var(--sans); letter-spacing: 0.01em; white-space: nowrap; }
.pill svg { width: 11px; height: 11px; }

/* Segmented controls (scene chips, view tabs) */
.tabs, .scenes--inline, .views { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.tabs button, .scenes button, .views button {
  font: 500 13px/1 var(--sans); color: var(--fg-2); background: none; border: 0; border-radius: 999px; padding: 9px 14px;
  cursor: pointer; white-space: nowrap; transition: color 200ms, background-color 200ms;
}
.tabs button:hover, .scenes button:hover, .views button:hover { color: var(--fg); }
.tabs button[aria-checked="true"], .scenes button[aria-checked="true"], .views button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.scenes button { font-family: var(--mono); font-weight: 400; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.scenes button .icon { width: 12px; height: 12px; stroke-width: 1.7; }

/* ---------- First viewport: the paper ---------- */
.intro { padding-top: clamp(44px, 7vh, 96px); }
.intro__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; column-gap: 48px; align-items: end; }
.intro h1 { grid-column: 1 / -1; font-weight: 300; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.05; letter-spacing: -0.024em; margin: 0 0 22px; max-width: 34ch; }
.intro h1 b { font-weight: 500; }
.authors { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 18px; }
.authors a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.22em; transition: color 200ms, text-decoration-color 200ms; }
.authors a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.affil { margin: 10px 0 0; font-size: 14.5px; color: var(--fg-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; }
.affil a { text-decoration: none; }
.affil a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.affil__sep { display: inline-block; width: 18px; }
.venue { margin: 22px 0 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14.5px; }
.venue__badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 11px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; letter-spacing: 0.005em; }
.venue__badge svg { width: 14px; height: 14px; fill: currentColor; }
.venue__track { color: var(--fg); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.credit { border-left: 1px solid var(--line-2); padding: 4px 0 4px 28px; }
.credit p { margin: 0; }
.credit a { text-decoration: none; }
.credit a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.credit__lab { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.credit__uni { font-size: 15px; color: var(--fg-2); margin-top: 4px !important; }
.credit__note { font-size: 13px; color: var(--fg-3); margin-top: 18px !important; }
.credit__note a { text-decoration: underline; text-decoration-color: var(--line-2); }

/* ---------- The glyph stage: a word changing on a real clip ---------- */
.glyph { position: relative; overflow: hidden; isolation: isolate; }
.glyph__ambient {
  position: absolute; inset: -8%; width: 116%; height: 116%; z-index: -1;
  filter: var(--ambient-filter); opacity: var(--ambient);
  -webkit-mask-image: linear-gradient(to bottom, transparent 8%, #000 30%, #000 58%, transparent 90%); mask-image: linear-gradient(to bottom, transparent 8%, #000 30%, #000 58%, transparent 90%);
  transition: opacity 600ms var(--ease);
}
.glyph__inner {
  max-width: var(--max); margin: 0 auto; padding: clamp(28px, 4vh, 48px) var(--gutter) clamp(20px, 3vh, 36px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: 1fr auto; column-gap: clamp(32px, 4vw, 64px);
  grid-template-areas: "word wipe" "foot wipe"; align-items: center;
}
.wipe--hero { grid-area: wipe; }
.glyph__word { grid-area: word; align-self: end; min-width: 0; }
.glyph__foot { grid-area: foot; align-self: start; padding-top: 22px; min-width: 0; }

.word { margin: 0; font-weight: 300; font-size: 96px; line-height: 1; letter-spacing: -0.03em; display: grid; white-space: nowrap; }
.word > span:not(.visually-hidden) { grid-area: 1 / 1; justify-self: start; }
.word .ch { display: inline-block; transition: opacity 520ms var(--ease), filter 520ms var(--ease), transform 620ms var(--ease); transition-delay: calc(var(--i, 0) * 38ms); }
.word__tgt { color: var(--accent); }
.word__tgt .ch { opacity: 0; filter: blur(12px); transform: translateY(0.14em); }
.word[data-state="tgt"] .word__src .ch { opacity: 0; filter: blur(12px); transform: translateY(-0.14em); }
.word[data-state="tgt"] .word__tgt .ch { opacity: 1; filter: none; transform: none; }

.scenes { display: flex; flex-wrap: wrap; gap: 6px; }
.glyph__foot .scenes button { position: relative; overflow: hidden; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, transparent); }
.glyph__foot .scenes button[aria-checked="true"] { border-color: var(--fg); background: var(--fg); }
.glyph__foot .scenes button::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--prog, 0) * 100%); background: var(--accent); }
.glyph__cap { margin: 18px 0 0; font-size: 13.5px; color: var(--fg-2); max-width: 44ch; }

/* ---------- The one-minute overview ---------- */
.promo { position: relative; isolation: isolate; padding: clamp(28px, 4vh, 48px) 0 0; }
.promo::before {
  content: ""; position: absolute; left: 0; right: 0; top: 8%; bottom: -14%; z-index: -1;
  background: url("../images/posters/promo.jpg?v=3") center / cover no-repeat;
  filter: blur(70px) saturate(1.2); opacity: calc(var(--ambient) * 0.8);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 30%, transparent 100%);
}
.promo__inner { display: flex; justify-content: center; }
.promo__frame { position: relative; margin: 0; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line-2); }
.promo__frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.promo__play {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; gap: 14px;
  padding: clamp(16px, 2.6vw, 28px); background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 45%); border: 0; cursor: pointer; color: #fff; text-align: left;
  transition: opacity 300ms var(--ease);
}
.promo__disc {
  width: clamp(52px, 5.4vw, 72px); flex: none; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease);
}
:root[data-theme="light"] .promo__disc { background: #A99DF6; color: #0E0A24; box-shadow: 0 0 0 10px rgba(169, 157, 246, 0.25); }
.promo__disc svg { width: 42%; height: 42%; fill: currentColor; margin-left: 6%; }
.promo__play:hover .promo__disc { transform: scale(1.06); box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 26%, transparent); }
.promo__play:focus-visible { outline: none; }
.promo__play:focus-visible .promo__disc { outline: 2px solid #fff; outline-offset: 6px; }
.promo__label { display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; font: 500 clamp(15px, 1.4vw, 18px)/1.1 var(--sans); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5); }
.promo__time { font: 400 13px/1 var(--mono); color: rgba(255, 255, 255, 0.78); }
.promo__frame.is-playing .promo__play { opacity: 0; pointer-events: none; }

/* The task section: the glyph stage under its own heading. */
.task .section__head { margin-bottom: 8px; }

/* Desktop: the title block and the overview video share exactly one screen.
   The video takes whatever height is left and is sized from it (container
   units), so it is never cut off at the fold. */
@media (min-width: 1101px) and (min-height: 560px) {
  .fold { display: flex; flex-direction: column; height: clamp(560px, calc(100svh - 60px), 1000px); }
  .intro { flex: none; padding-top: clamp(20px, 3.6vh, 56px); }
  .intro h1 { font-size: clamp(2rem, min(3.7vw, 5.2vh), 3.4rem); margin-bottom: clamp(12px, 2vh, 22px); }
  .venue { margin-top: clamp(10px, 1.6vh, 20px); }
  .links { margin-top: clamp(12px, 2vh, 24px); }
  .promo { flex: 1 1 auto; min-height: 0; padding-top: clamp(16px, 2.6vh, 36px); padding-bottom: clamp(16px, 2.6vh, 36px); }
  .promo__inner { height: 100%; container-type: size; }
  .promo__frame { width: min(100cqw, 100cqh * 16 / 9); height: auto; }
}


/* ---------- Wipe (shared by hero and comparator) ---------- */
.wipe {
  --p: 0.5;
  position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 12px; overflow: hidden; background: #000;
  touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none;
  box-shadow: 0 0 0 1px var(--line);
}
.wipe__canvas { display: block; width: 100%; height: 100%; }
.wipe__line { position: absolute; top: 0; bottom: 0; left: calc(var(--p) * 100%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18); pointer-events: none; }
.wipe__handle {
  position: absolute; top: 50%; left: calc(var(--p) * 100%); width: 42px; height: 42px; margin: -21px 0 0 -21px;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(8, 8, 8, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; cursor: ew-resize; padding: 0;
  transition: transform 200ms var(--ease), background-color 200ms;
}
.wipe__handle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wipe__handle:hover, .wipe.is-dragging .wipe__handle { transform: scale(1.08); background: rgba(8, 8, 8, 0.7); }
.wipe__handle:focus-visible { outline: 1.5px solid #fff; outline-offset: 3px; border-radius: 50%; }
.wipe__tag {
  position: absolute; top: 12px; padding: 6px 10px; border-radius: 999px; pointer-events: none;
  font: 500 12px/1 var(--sans); color: #fff; background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis;
}
.wipe__tag--l { left: 12px; }
.wipe__tag--r { right: 12px; }
.wipe__status { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.7); font-size: 14px; background: rgba(0, 0, 0, 0.35); }
.wipe__status[hidden] { display: none; }

/* ---------- Sections ---------- */
.section { padding-top: clamp(88px, 12vw, 152px); }
.section--tight { padding-top: clamp(64px, 9vw, 112px); }
.section__head { margin-bottom: 40px; max-width: 640px; }
.section__head h2, .h-side { font-weight: 300; font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 14px; }
.section__head p { margin: 0; color: var(--fg-2); }

.abstract, .cite { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; padding-top: 32px; background: linear-gradient(var(--line), var(--line)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px; }
.abstract strong { white-space: nowrap; }
.abstract .h-side, .cite .h-side { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.abstract__body { max-width: 68ch; }
.abstract__body p { margin: 0 0 1.1em; color: var(--fg-2); font-size: 16.5px; }
.abstract__body p.lede { font-size: clamp(1.25rem, 1.9vw, 1.5rem); line-height: 1.4; font-weight: 300; color: var(--fg); letter-spacing: -0.01em; margin-bottom: 1.2em; }

/* ---------- Comparator ---------- */
.cmp__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 24px; }
.scenes--inline { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.scenes--inline::-webkit-scrollbar { display: none; }
.cmp { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.cmp[data-mode="grid"] { grid-template-columns: minmax(0, 1fr); }
.cmp[data-mode="grid"] .cmp__methods { display: none; }
.cmp__methods { display: flex; flex-direction: column; gap: 18px; }
.mgroup__label { margin: 0 0 6px; font-size: 12.5px; color: var(--fg-3); }
.mgroup__list { display: flex; flex-direction: column; gap: 2px; }
.mbtn {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 999px;
  font: 500 14px/1.2 var(--sans); color: var(--fg-2); background: none; border: 1px solid transparent; cursor: pointer;
  transition: color 200ms, background-color 200ms, border-color 200ms;
}
.mbtn:hover { color: var(--fg); background: var(--hover); }
.mbtn[aria-checked="true"] { background: var(--fg); color: var(--bg); }
.mbtn svg { width: 12px; height: 12px; flex: none; }
.mbtn .sym-fill { fill: currentColor; }
.mbtn .sym-ring { fill: none; stroke: currentColor; stroke-width: 1.2; }
.mbtn .sym--front .sym-fill, .mbtn .sym--front .sym-ring { fill: var(--accent); stroke: var(--accent); }
.mbtn .sym--front .sym-ring { fill: none; }
.mbtn[aria-checked="true"] .sym--front .sym-fill { fill: currentColor; }
.mbtn[aria-checked="true"] .sym--front .sym-ring { stroke: currentColor; }

.readout { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); align-items: start; }
.readout__name { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.readout__meta { margin: 0; font-size: 13px; color: var(--fg-3); }
.readout__m dt { font: 400 12.5px/1.2 var(--mono); color: var(--fg-3); }
.readout__m dd { margin: 6px 0 0; font: 400 20px/1 var(--mono); font-variant-numeric: tabular-nums; }
.readout__m dd small { display: block; margin-top: 6px; font: 400 12px/1.2 var(--mono); color: var(--fg-3); }
.readout__m { margin: 0; }
.readout__note { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--fg-3); }

.grid { position: relative; }
.grid__canvas { display: block; width: 100%; border-radius: 12px; background: #000; }
.grid__cells { position: absolute; inset: 0; }
.gcell { position: absolute; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 6px; }
.gcell span { position: absolute; left: 8px; top: 8px; padding: 5px 8px; border-radius: 999px; font: 500 11.5px/1 var(--sans); color: #fff; background: rgba(0, 0, 0, 0.58); max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcell:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.gcell:focus-visible { outline: 1.5px solid #fff; outline-offset: -3px; }
.gcell--src span { background: #fff; color: #000; }
.gcell--pair { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 18px; border: 1px solid var(--line); cursor: default; }
.gcell--pair { align-items: center; text-align: center; }
.gcell--pair p { margin: 0; font: 400 clamp(13px, 1.6vw, 20px)/1.2 var(--mono); color: var(--fg); }
.gcell--pair p:first-child { color: var(--fg-2); }
.gcell--pair p:last-child { color: var(--accent); }
.gcell--pair .icon { width: 16px; height: 16px; color: var(--fg-3); transform: rotate(90deg); }

/* ---------- Failures ---------- */
.fails { list-style: none; margin: 0; padding: 0; }
.fail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); padding: 40px 0; border-top: 1px solid var(--line); }
.fail:last-child { border-bottom: 1px solid var(--line); }
.fail h3 { margin: 0 0 10px; font-weight: 400; font-size: clamp(1.45rem, 2.3vw, 1.85rem); line-height: 1.15; letter-spacing: -0.015em; }
.neq { color: var(--accent); font-weight: 300; padding: 0 0.08em; }
.fail__meta { margin: 0 0 14px; font-size: 13.5px; color: var(--fg-3); }
.fail__task { margin: 0 0 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--fg-2); }
.fail__task code { font-size: 13.5px; color: var(--fg); }
.fail__task code.tgt { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.fail__task .icon { width: 14px; height: 14px; color: var(--fg-3); }
.fail__text > p:not([class]) { margin: 0 0 18px; color: var(--fg-2); font-size: 15.5px; max-width: 52ch; }
.sig { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sig li { font: 400 12.5px/1 var(--mono); padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg-2); }
.sig li.sig__catch { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.fail__media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-self: start; }
.fail__media figure { margin: 0; min-width: 0; }
.fail__media video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #000; box-shadow: 0 0 0 1px var(--line); }
.fail__media figcaption { margin-top: 8px; font-size: 12.5px; color: var(--fg-3); }

/* ---------- Protocol ---------- */
.axes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.ax { padding: 28px 28px 8px 0; }
.ax + .ax { padding-left: 28px; border-left: 1px solid var(--line); }
.ax h3 { margin: 0 0 6px; font-size: 19px; font-weight: 500; }
.ax > p { margin: 0 0 18px; font-size: 14.5px; color: var(--fg-2); }
.ax ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ax li { font: 400 13px/1 var(--mono); padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg-2); }
.ax li.prim { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ax > p.ax__prim { margin: 16px 0 0; font-size: 13.5px; color: var(--fg-3); max-width: 40ch; }
.ax__prim b { font: 400 13px var(--mono); color: var(--accent); }

.space { margin-top: clamp(72px, 9vw, 112px); }
.space__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.space__title { font-weight: 300; font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 14px; }
.space__head p { margin: 0; color: var(--fg-2); max-width: 60ch; }
.views { flex-wrap: wrap; border-radius: 22px; }
.space__stage { position: relative; height: clamp(420px, 44vw, 580px); }
.space__stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.space__stage canvas.is-dragging { cursor: grabbing; }
.space__stage canvas.is-hover { cursor: pointer; }
.space__status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--fg-3); font-size: 14px; }
.space__status[hidden] { display: none; }
.space__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; flex-wrap: wrap; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--fg-2); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend svg { width: 16px; height: 16px; }
.lg-fill { fill: var(--fg); }
.lg-acc { fill: var(--accent); }
.lg-acc-ring { fill: none; stroke: var(--accent); stroke-width: 1; }
.lg-dim { fill: var(--fg-2); }
.lg-ring { fill: none; stroke: var(--fg); stroke-width: 1; opacity: 0.8; }
.space__note { margin: 0; font-size: 13px; color: var(--fg-3); }

.pick { margin-top: 22px; min-height: 1px; }
.pick:empty { display: none; }
.pick__row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto; gap: 20px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pick__name { margin: 0; font-size: 18px; font-weight: 500; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pick__meta { margin: 2px 0 0; font-size: 13px; color: var(--fg-3); }
.pick dl { margin: 0; }
.pick dt { font: 400 12.5px/1.2 var(--mono); color: var(--fg-3); }
.pick dd { margin: 5px 0 0; font: 400 17px/1 var(--mono); font-variant-numeric: tabular-nums; }
.pick dd small { font-size: 12px; color: var(--fg-3); margin-left: 6px; }
.linkbtn { font: 500 13px/1 var(--sans); color: var(--fg); background: none; border: 0; padding: 8px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.linkbtn .icon { width: 15px; height: 15px; }

.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: 56px; }
.notes p { margin: 0; font-size: 15px; color: var(--fg-2); max-width: 56ch; }
.calib { margin: 56px 0 44px; }
.calib h3 { margin: 0 0 18px; font-size: 19px; font-weight: 500; }
.calib ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.calib li { border-top: 1px solid var(--line-2); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.calib__v { font: 400 19px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.calib li span:last-child { font-size: 14px; color: var(--fg-2); }

/* ---------- Release ---------- */
.rel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.rel__item { padding: 28px 28px 8px 0; display: flex; flex-direction: column; }
.rel__item + .rel__item { padding-left: 28px; border-left: 1px solid var(--line); }
.rel__item h3 { margin: 0 0 10px; font-size: 21px; font-weight: 500; letter-spacing: -0.01em; }
.rel__item > p { margin: 0 0 22px; font-size: 14.5px; color: var(--fg-2); }
.rel__item dl { margin: 0 0 24px; }
.rel__item dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.rel__item dl div:last-child { border-bottom: 1px solid var(--line); }
.rel__item dt { font-size: 13.5px; color: var(--fg-3); }
.rel__item dd { margin: 0; font: 400 13.5px/1.4 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.rel__link { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; text-decoration: none; padding: 6px 0; }
.rel__links { margin-top: auto; display: flex; flex-wrap: wrap; column-gap: 22px; }
.rel__links .rel__link { margin-top: 0; }
.rel__link:hover { text-decoration: underline; }
.rel__link .icon { width: 15px; height: 15px; }

.figs { margin-top: clamp(56px, 7vw, 88px); display: grid; gap: 48px; }
.fig { margin: 0; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: end; }
.fig--wide { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.fig__plate { display: block; background: var(--plate); border-radius: 12px; padding: clamp(12px, 2.4vw, 28px); transition: background-color 400ms var(--ease); }
.fig__plate img { display: block; width: 100%; height: auto; filter: var(--fig-filter); border-radius: 4px; }
.fig figcaption { font-size: 14px; color: var(--fg-2); max-width: 72ch; }
.fig figcaption strong { color: var(--fg); }

/* ---------- Cite ---------- */
.cite pre { margin: 0 0 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; white-space: normal; font: 400 12.5px/1.7 var(--mono); color: var(--fg-2); }
.cite pre code { border: 0; padding: 0; font-size: inherit; line-height: inherit; }
.cite .bl { display: block; white-space: pre-wrap; overflow-wrap: break-word; padding-left: 14ch; text-indent: -14ch; }
.cite .bl:first-child, .cite .bl:last-child { padding-left: 0; text-indent: 0; }
.nw { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fig figcaption a { color: var(--fg); }
.cite__body { min-width: 0; }
.cite__contact { margin: 18px 0 0; font-size: 14px; color: var(--fg-2); }

/* ---------- Footer ---------- */
.foot { margin-top: clamp(96px, 13vw, 168px); border-top: 1px solid var(--line); padding: 32px 0 calc(44px + env(safe-area-inset-bottom)); }
.foot__grid { display: flex; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; align-items: baseline; }
.foot__credit { margin: 0; font-size: 14.5px; color: var(--fg-2); }
.foot__credit a { color: var(--fg); text-decoration-color: var(--line-2); }
.foot__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot__links a { font-size: 14px; color: var(--fg-3); text-decoration: none; }
.foot__links a:hover { color: var(--fg); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .glyph__inner { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "wipe" "word" "foot"; row-gap: 0; }
  .glyph__word { padding-top: 26px; align-self: start; }
  .glyph__foot { padding-top: 18px; }
  .intro__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .credit { margin-top: 28px; border-left: 0; border-top: 1px solid var(--line-2); padding: 20px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
  .credit__note { flex-basis: 100%; margin-top: 8px !important; }
  .cmp { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cmp__methods { flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px; }
  .cmp__methods::-webkit-scrollbar { display: none; }
  .mgroup { display: contents; }
  .mgroup__label { display: none; }
  .mgroup__list { flex-direction: row; gap: 6px; }
  .mbtn { width: auto; white-space: nowrap; border-color: var(--line); padding: 9px 13px; font-size: 13.5px; }
  .readout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .readout__id { grid-column: 1 / -1; }
  .fail { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pick__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pick__id, .pick__act { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .top__lb { margin-left: auto; border-left: 0; padding-left: 0; }
  .axes, .rel { grid-template-columns: minmax(0, 1fr); }
  .ax, .rel__item { padding: 24px 0 8px; }
  .ax + .ax, .rel__item + .rel__item { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .rel__item { padding-bottom: 24px; }
  .notes, .calib ul { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .abstract, .cite { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fig { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .fig:not(.fig--wide) .fig__plate { max-width: 560px; }
  .space__stage { height: clamp(440px, 120vw, 580px); }
}
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .wipe { border-radius: 10px; }
  .wipe__tag { top: 8px; padding: 5px 8px; font-size: 11px; }
  .wipe__tag--l { left: 8px; }
  .wipe__tag--r { right: 8px; }
  .wipe__handle { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .glyph__cap { font-size: 13px; }
  .glyph__inner { padding-top: 20px; }
  .authors { font-size: 16px; gap: 4px 14px; }
  .links { display: grid; grid-template-columns: 1fr 1fr; }
  .links .btn { padding: 0 14px; font-size: 14px; }
  .cmp__bar { flex-direction: column; align-items: stretch; }
  .cmp__bar .tabs { align-self: flex-start; }
  .readout__m dd { font-size: 17px; }
  .fail__media { gap: 8px; }
  .fail__media figcaption { font-size: 12px; }
  .views { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 20px; }
  .views button { white-space: normal; line-height: 1.25; }
  .cite .bl { padding-left: 4ch; text-indent: -4ch; }
  .promo__play { padding: 12px; gap: 10px; }
  .promo__disc { width: 42px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent); }
  .promo__label { font-size: 13.5px; gap: 3px; padding-bottom: 1px; }
  .promo__time { font-size: 11.5px; }
  .share-scrim { background: rgba(0, 0, 0, 0.45); }
  .share { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 86svh; border-radius: 20px 20px 0 0; border-bottom: 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); animation-name: share-up; }
  .share__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .gcell span { left: 4px; top: 4px; font-size: 10px; padding: 3px 6px; max-width: calc(100% - 8px); }
  .pick__row { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .word .ch { transition-duration: 1ms; transition-delay: 0ms; filter: none !important; }
  * { animation-duration: 1ms !important; }
}
