/* ==========================================================================
   CoHuB project page
   Tokens follow the paper's figures: the CoHuB gradient, Geist / Geist Mono,
   teal = non-collaborative phase, green = collaborative phase (Figure 4).
   ========================================================================== */

:root {
  color-scheme: light;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #ffffff;
  --bg-alt: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #eff3f1;
  --ink: #0f1514;
  --ink-2: #3f4a47;
  --ink-3: #66716e;
  --line: #e2e7e5;
  --line-2: #cbd4d1;
  --hover: rgba(15, 21, 20, 0.045);
  --accent: #007757;
  --accent-soft: #e2f3eb;
  --brand-a: #3a8fb5;
  --brand-b: #2db070;
  --brand-c: #86c05a;
  --brand-gradient: linear-gradient(100deg, var(--brand-a) 0%, var(--brand-b) 55%, var(--brand-c) 100%);
  --move-ink: #2b7598;
  --couple-ink: #15804c;
  --nc: #79b1cd;        /* paper Figure 4: non-collaborative */
  --c: #b2d4a6;         /* paper Figure 4: collaborative */
  --nc-soft: #e2eef4;
  --c-soft: #e8f2e4;
  --bar-neutral: #2a8f72;
  --band-task: #eaf0f8;
  --band-multi: #e8f4ec;
  --tile-bg: #dfe4e2;
  --glass: rgba(255, 255, 255, 0.55);
  --avg-bg: color-mix(in srgb, var(--ink) 6%, var(--surface));
  --shadow: 0 1px 2px rgba(15, 21, 20, 0.05), 0 12px 32px rgba(15, 21, 20, 0.09);
  --radius: 16px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --hero-gap: 3px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c1010;
    --bg-alt: #111716;
    --surface: #151b1a;
    --surface-2: #1c2423;
    --ink: #eef3f1;
    --ink-2: #bcc7c3;
    --ink-3: #8b9894;
    --line: #242d2b;
    --line-2: #34413e;
    --hover: rgba(255, 255, 255, 0.05);
    --accent: #51daa7;
    --accent-soft: #10271f;
    --move-ink: #6fb8dc;
    --couple-ink: #4fd197;
    --nc-soft: #1f3037;
    --c-soft: #26352a;
    --bar-neutral: #41ab8b;
    --band-task: #17212c;
    --band-multi: #15231b;
    --tile-bg: #1c2423;
    --glass: rgba(12, 16, 16, 0.46);
    --avg-bg: color-mix(in srgb, var(--ink) 9%, var(--surface));
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px rgba(0, 0, 0, 0.45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1010;
  --bg-alt: #111716;
  --surface: #151b1a;
  --surface-2: #1c2423;
  --ink: #eef3f1;
  --ink-2: #bcc7c3;
  --ink-3: #8b9894;
  --line: #242d2b;
  --line-2: #34413e;
  --hover: rgba(255, 255, 255, 0.05);
  --accent: #51daa7;
  --accent-soft: #10271f;
  --move-ink: #6fb8dc;
  --couple-ink: #4fd197;
  --nc-soft: #1f3037;
  --c-soft: #26352a;
  --bar-neutral: #41ab8b;
  --band-task: #17212c;
  --band-multi: #15231b;
  --tile-bg: #1c2423;
  --glass: rgba(12, 16, 16, 0.46);
  --avg-bg: color-mix(in srgb, var(--ink) 9%, var(--surface));
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px rgba(0, 0, 0, 0.45);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
p { margin: 0; }
sub { line-height: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--brand-b) 30%, transparent); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 880px; }
.center { text-align: center; }
.brand-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ==========================================================================
   Hero: 4 / 2 / 4 video mosaic with a glass title card in the middle
   ========================================================================== */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 560px;
  background: var(--bg);
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  display: grid;
  grid-template-rows: 1fr 1.7fr 1fr; /* keep in sync with .hero-scroll top */
  gap: var(--hero-gap);
}
.hero-row { display: grid; gap: var(--hero-gap); min-height: 0; }
.hero-row--top, .hero-row--bottom { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hero-row--middle { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tile {
  position: relative; display: block; min-height: 0; overflow: hidden;
  background: var(--tile-bg); color: #fff; cursor: pointer;
  border: 0; padding: 0; text-align: left;
  transition: opacity 0.8s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 55ms + 180ms);
}
.tile video, .tile img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(6, 10, 9, 0.6) 0%, rgba(6, 10, 9, 0.16) 30%, rgba(6, 10, 9, 0) 52%);
}
.tile:hover video, .tile:focus-visible video { transform: scale(1.045); }
.tile:focus-visible { outline: 3px solid var(--brand-b); outline-offset: -3px; border-radius: 0; }
.tile__label {
  position: absolute; left: 14px; right: 14px; bottom: 11px; z-index: 1;
  display: flex; flex-direction: column; gap: 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.tile__name { font: 600 15px/1.2 var(--font-mono); letter-spacing: -0.01em; }
.tile__meta {
  font: 500 12.5px/1.35 var(--font-mono); opacity: 0; max-height: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
}
.tile:hover .tile__meta, .tile:focus-visible .tile__meta { opacity: 0.95; max-height: 3em; transform: none; }
.tile__badge {
  position: absolute; left: 14px; top: 14px; z-index: 1;
  font: 600 12px/1 var(--font-mono); letter-spacing: 0.02em;
  padding: 7px 10px; border-radius: 999px;
  color: #0f1514; background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.tile--right .tile__label { align-items: flex-end; text-align: right; }
.tile--right .tile__badge { left: auto; right: 14px; }
.tile--placeholder { cursor: default; }

/* Glass title card, centred on the hero (over the two three-humanoid videos) */
.hero-card {
  position: absolute; z-index: 4; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  /* hug the text so the sides keep only the padding */
  width: max-content; max-width: calc(100vw - 32px);
  padding: clamp(18px, 3vh, 36px) clamp(24px, 2.4vw, 44px) clamp(16px, 2.6vh, 30px);
  border-radius: 28px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: 0 20px 60px rgba(6, 12, 10, 0.26);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.3vh, 14px);
  transition: opacity 0.8s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-card::before {
  /* gradient hairline border that works on a translucent fill */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 60%, var(--brand-c));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.wordmark {
  font: 700 clamp(56px, min(8.4vw, 11.5vh), 140px)/0.95 var(--font-sans);
  letter-spacing: -0.04em;
  padding-bottom: 0.05em;
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-card__title { font-size: clamp(18px, min(2.8vw, 3.6vh), 38px); line-height: 1.25; font-weight: 620; letter-spacing: -0.01em; color: var(--ink); }
.hero-card__facts {
  font: 650 clamp(14px, min(1.9vw, 2.6vh), 24px)/1.3 var(--font-mono); color: var(--ink);
  padding-top: clamp(6px, 1vh, 10px); border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

.hero-scroll {
  /* Sits on the boundary between the middle row and the bottom row, clear of tile labels. */
  position: absolute; z-index: 5; left: 50%; top: calc(2.7 / 3.7 * 100% - 20px);
  width: 40px; height: 40px; margin-left: -20px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); color: var(--ink-2);
  box-shadow: var(--shadow);
  animation: bob 2.4s ease-in-out infinite;
  transition: opacity 0.4s ease;
}
.hero-scroll:hover { text-decoration: none; color: var(--accent); }
.hero-scroll .icon { width: 20px; height: 20px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* Opening shot: one task fills the hero, the rest of the mosaic waits */
.hero-progress {
  position: absolute; left: 0; bottom: 0; z-index: 6; height: 3px; width: 100%;
  background: var(--brand-gradient); transform-origin: left center; transform: scaleX(0); opacity: 0;
}
.hero-intro .hero { background: #0b0f0e; }
.hero-intro .hero-row > .tile { opacity: 0; transform: scale(1.07); }
/* The opening task shrinks to its cell's measured box, so that cell must not be scaled. */
.hero-intro .hero-row > .tile--placeholder { transform: none; }
.hero-intro .hero-progress { opacity: 1; }
/* The title card, tile labels and the scroll cue appear only once all ten tasks are in. */
.hero-intro .hero-card, .hero-assembling .hero-card { opacity: 0; transform: translate(-50%, -50%) scale(0.86); pointer-events: none; }
.hero-intro .hero-scroll, .hero-assembling .hero-scroll { opacity: 0; pointer-events: none; }
.hero-intro .tile__label, .hero-intro .tile__badge, .hero-intro .tile::after,
.hero-assembling .tile__label, .hero-assembling .tile__badge, .hero-assembling .tile::after { opacity: 0; }
.tile__label, .tile__badge, .tile::after { transition: opacity 0.6s ease 0.25s; }
/* No hover details until the mosaic and the title card are in place. */
.hero-locked .tile { pointer-events: none; }
.tile--intro {
  position: absolute; z-index: 3; top: 0; left: 0; width: 100%; height: 100%;
  transition: none;
}

/* ==========================================================================
   Top navigation (appears after the hero) with a reading-progress line
   ========================================================================== */
.topnav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}
.topnav.is-visible { transform: none; }
.topnav__inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  height: 60px; display: flex; align-items: center; gap: 24px;
}
.topnav__brand {
  font: 800 22px/1 var(--font-sans); letter-spacing: -0.04em;
  background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topnav__brand:hover { text-decoration: none; }
.topnav__links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.topnav__links::-webkit-scrollbar { display: none; }
.topnav__links a {
  color: var(--ink-2); font-size: 15px; font-weight: 500; white-space: nowrap;
  padding: 8px 12px; border-radius: 9px;
}
.topnav__links a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.topnav__links a.is-active { color: var(--accent); background: var(--accent-soft); }
.topnav__progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--brand-gradient); transform-origin: left center; transform: scaleX(0);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(80px, 9vw, 128px) 0; }
.section--alt { background: var(--bg-alt); }
.section--intro { padding-top: clamp(64px, 8vw, 104px); }
.section-head { max-width: 1060px; margin: 0 auto clamp(36px, 4.5vw, 56px); text-align: center; }
.section-head h2, .section-head .lead { text-wrap: balance; }
.section-head--left { text-align: left; margin-left: 0; }
.eyebrow {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  font: 650 clamp(15px, 1.35vw, 18.5px)/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); background: var(--surface);
  padding: 13px 24px 13px 20px; border-radius: 999px; margin-bottom: 26px;
  box-shadow: 0 2px 4px rgba(15, 21, 20, 0.06), 0 14px 32px -6px rgba(15, 21, 20, 0.18);
}
.eyebrow::before {
  /* gradient hairline border */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(120deg, var(--brand-a), var(--brand-b) 55%, var(--brand-c));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.eyebrow::after { content: ""; order: -1; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--brand-gradient); }
.section-head h2 { font-size: clamp(34px, 4.4vw, 54px); letter-spacing: -0.03em; }
.lead { margin-top: 18px; font-size: clamp(19px, 1.6vw, 22px); color: var(--ink-2); line-height: 1.55; }
.hint { margin-top: 24px; text-align: center; font-size: 16px; color: var(--ink-3); }

/* ---------- Intro: title, authors, links ---------- */
.venue {
  display: inline-block; margin-bottom: 26px;
  font: 600 13.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2); padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2);
}
.title { display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.4vw, 16px); }
.title__brand {
  font: 800 clamp(88px, 13vw, 176px)/0.9 var(--font-sans); letter-spacing: -0.055em;
  padding: 0 0.04em 0.06em;
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.title__text {
  font-size: clamp(28px, 3.6vw, 48px); line-height: 1.12; font-weight: 650; letter-spacing: -0.03em;
  text-wrap: balance; max-width: 22ch;
}
.br-wide { display: inline; }
.authors { margin-top: 28px; font-size: 20px; }
.authors__list { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.authors__line { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.authors__list a, .authors__list span { color: var(--ink); font-weight: 500; }
.authors__list a:hover { color: var(--accent); }
.authors__list .author--equal > :first-child { font-weight: 700; }
.authors__list sup { color: var(--ink-3); font-size: 0.7em; margin-left: 1px; }
.authors__affil { margin-top: 8px; color: var(--ink-2); font-size: 17px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; }
.authors__note { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; }
.authors__note sup { color: var(--ink-3); }

.link-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.link-row:empty { display: none; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--bg);
  font: 550 16px/1 var(--font-sans); cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn .icon { width: 19px; height: 19px; }
.btn--soon { background: var(--surface-2); color: var(--ink-3); cursor: default; }
.btn--soon:hover { transform: none; }
.btn__soon {
  font: 700 10.5px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 7px; border-radius: 6px; background: var(--line); color: var(--ink-2);
}

/* ---------- Stats ---------- */
.stats {
  list-style: none; padding: 0; margin: clamp(52px, 7vw, 76px) 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: var(--line); gap: 1px;
}
.stat { background: var(--surface); padding: 28px 26px; display: flex; flex-direction: column; gap: 8px; }
.stat__value {
  font: 750 clamp(44px, 4.8vw, 62px)/1 var(--font-sans); letter-spacing: -0.04em;
  background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
  width: fit-content;
}
.stat__label { color: var(--ink-2); font-size: 17px; }
.abstract-card {
  position: relative; margin-top: clamp(56px, 6vw, 76px);
  padding: clamp(36px, 4.4vw, 52px) clamp(22px, 4.4vw, 56px) clamp(28px, 3.6vw, 44px);
  border-radius: 26px;
  background:
    radial-gradient(90% 80% at 0% 0%, color-mix(in srgb, var(--brand-a) 14%, transparent), transparent 70%),
    radial-gradient(90% 80% at 100% 100%, color-mix(in srgb, var(--brand-c) 18%, transparent), transparent 70%),
    color-mix(in srgb, var(--brand-b) 5%, var(--surface));
  box-shadow: var(--shadow);
}
.abstract-card::before {
  /* gradient hairline border */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 55%, var(--brand-c));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.abstract-card__title {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  font: 650 15px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: #fff;
  background: var(--brand-gradient); padding: 11px 22px; border-radius: 999px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand-b) 32%, transparent);
}
.abstract { color: var(--ink); font-size: 19.5px; line-height: 1.75; text-align: justify; hyphens: auto; }
.abstract mark {
  color: inherit; font-weight: 600; padding: 0 1px;
  background: linear-gradient(transparent 58%, color-mix(in srgb, var(--brand-c) 38%, transparent) 58%);
}
.abstract__name {
  font-weight: 750; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.acr { font-weight: 750; }
.acr--a { color: var(--brand-a); }
.acr--b { color: var(--brand-b); }
.acr--c { color: var(--brand-c); }

/* ==========================================================================
   Task taxonomy: 2 x 2 quadrants with crossing axes (paper Figure 2)
   ========================================================================== */
.axis-defs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 48px;
  max-width: 1000px; margin: 0 auto 40px; font-size: 19.5px; line-height: 1.45; color: var(--ink-2);
}
.axis-defs > div {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 24px 28px 26px; border-radius: 22px; background: var(--surface);
  border: 1.5px solid color-mix(in srgb, var(--axis, var(--line-2)) 55%, transparent);
  box-shadow: 0 2px 4px rgba(15, 21, 20, 0.05), 0 18px 40px -10px rgba(15, 21, 20, 0.2);
}
.axis-defs > div:first-child { --axis: var(--brand-a); }
.axis-defs > div:last-child { --axis: var(--brand-b); }
.axis-defs dt { white-space: nowrap; }
.axis-defs dt.axis-word { font-size: 22px; }
.axis-defs dd { margin: 0; text-wrap: balance; }
.axis-word { font: 700 14px/1.2 var(--font-mono); letter-spacing: 0.02em; }
.axis-word--move { color: var(--move-ink); }
.axis-word--couple { color: var(--couple-ink); }

.taxo { position: relative; padding-top: 80px; }
.taxo__grid {
  position: relative;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr 1fr;
  gap: 60px;
}
.taxo__axis { position: absolute; z-index: 1; pointer-events: none; }
.taxo__axis--y {
  left: 50%; top: -40px; bottom: -8px; width: 3px; margin-left: -1.5px;
  background: linear-gradient(to top, color-mix(in srgb, var(--brand-b) 26%, var(--bg-alt)), var(--brand-b));
  border-radius: 2px;
}
.taxo__axis--y::before {
  content: ""; position: absolute; left: 50%; top: 1px; transform: translate(-50%, -100%);
  border: 8px solid transparent; border-bottom: 13px solid var(--brand-b); border-top: 0;
}
.taxo__axis--x {
  top: 50%; left: -8px; right: 10px; height: 3px; margin-top: -1.5px;
  background: linear-gradient(to right, color-mix(in srgb, var(--brand-a) 26%, var(--bg-alt)), var(--brand-a));
  border-radius: 2px;
}
.taxo__axis--x::after {
  content: ""; position: absolute; top: 50%; right: 1px; transform: translate(100%, -50%);
  border: 8px solid transparent; border-left: 13px solid var(--brand-a); border-right: 0;
}
.taxo__label {
  position: absolute; z-index: 1; white-space: nowrap;
  font: 700 14.5px/1 var(--font-mono); letter-spacing: 0.04em;
}
.taxo__label--y { left: 50%; top: -60px; transform: translate(-50%, -100%); color: var(--couple-ink); }
.taxo__label--x { right: 12px; top: 50%; transform: translateY(12px); color: var(--move-ink); }

.quad {
  position: relative; z-index: 2;
  border: 1.5px dashed var(--line-2); border-radius: 20px; background: var(--surface);
  padding: 16px; display: flex; flex-direction: column; gap: 14px;
}
.quad__head { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font: 650 16.5px/1.3 var(--font-mono); color: var(--ink); text-align: center; }
.quad__head .axis-word { font-size: 16.5px; }
.td-tags .quad__head { font-size: 13.5px; justify-content: flex-start; }
.td-tags .quad__head .axis-word { font-size: 13.5px; }
.quad__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.task-card {
  display: flex; flex-direction: column; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  padding: 0; transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.task-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.task-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--tile-bg); overflow: hidden; }
.task-card__media video, .task-card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.task-card:hover .task-card__media video { transform: scale(1.06); }
.task-card__body { padding: 12px 14px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.task-card__name { font: 650 17px/1.2 var(--font-mono); color: var(--ink); overflow-wrap: anywhere; transition: color 0.2s ease; }
.task-card:hover .task-card__name { color: var(--accent); }
.task-card__summary { font-size: 15px; line-height: 1.45; color: var(--ink-2); }

.trio { margin-top: 36px; border: 1.5px dashed var(--line-2); border-radius: 20px; padding: 16px; background: var(--surface); }
.trio__title { font-size: 18px; display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.trio__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 650 13px/1 var(--font-mono); padding: 7px 11px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
}
.chip--solid { background: var(--ink); color: var(--bg); }

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font: 650 0.78em/1 var(--font-mono); letter-spacing: 0.01em;
  padding: 0.45em 0.7em; border-radius: 999px; white-space: nowrap; vertical-align: 0.12em;
  color: var(--ink);
}
.tag::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: currentColor; }
.tag--nc { background: var(--nc-soft); }
.tag--nc::before { background: var(--nc); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--nc) 55%, #000); }
.tag--c { background: var(--c-soft); }
.tag--c::before { background: var(--c); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, #000); }

/* ---------- Segmented tabs ---------- */
.seg { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.seg--left { justify-content: flex-start; }
.seg button {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font: 550 14.5px/1 var(--font-mono); padding: 10px 14px; border-radius: 999px; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.seg button:hover { color: var(--ink); border-color: var(--ink-3); }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg-groups { display: grid; gap: 10px; width: fit-content; max-width: 100%; margin: 0 0 24px; }
.seg-groups--center { margin-left: auto; margin-right: auto; }
.seg-group { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: start; gap: 12px; }
.seg-group .seg { margin: 0; justify-content: flex-start; }
.seg-group__label { padding-top: 13px; font: 650 13px/1 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Egocentric viewer ---------- */
.ego-scroll { overflow-x: auto; border-radius: var(--radius); }
.ego-stage { position: relative; background: #0d1111; border-radius: var(--radius); overflow: hidden; min-width: var(--ego-min, 640px); }
.ego-stage video { display: block; width: 100%; height: auto; aspect-ratio: var(--ego-ratio, 4 / 1); background: #0d1111; }
.ego-labels {
  position: absolute; inset: 0; pointer-events: none;
  display: grid; grid-template-columns: var(--ego-cols, repeat(3, minmax(0, 1fr)));
}
.ego-labels span {
  align-self: start; justify-self: start; margin: 12px;
  font: 650 13.5px/1 var(--font-mono); color: #fff;
  background: rgba(8, 12, 11, 0.62); padding: 7px 10px; border-radius: 8px;
  backdrop-filter: blur(4px);
}
.ego-caption { margin-top: 14px; font-size: 15px; color: var(--ink-3); text-align: center; }
.ego-hint { display: none; margin-top: 10px; font: 550 13.5px/1.3 var(--font-mono); color: var(--ink-2); text-align: center; }

/* ---------- Paper figure (Figure 3) and dataset facts ---------- */
.paper-fig { margin: 0; }
.pipeline__frame {
  background: #fff; border-radius: 20px; padding: clamp(10px, 2vw, 24px);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.pipeline__stage { position: relative; }
.pipeline__stage img { display: block; width: 100%; height: auto; }
.pipeline__img { transition: filter 0.45s ease, opacity 0.45s ease; }
.pipeline.is-focus .pipeline__img { filter: blur(3px) saturate(0.6); opacity: 0.42; }
/* one clipped copy per step; the active one rises out of the blurred figure */
.pipeline__layer {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease;
}
.pipeline__layer.is-active {
  opacity: 1; transform: translateY(-1.4%) scale(1.035);
  filter: drop-shadow(0 16px 22px rgba(15, 21, 20, 0.22)) drop-shadow(0 3px 6px rgba(15, 21, 20, 0.12));
}
.pipeline__hot {
  position: absolute; top: 0; bottom: 0; left: calc(var(--l) * 1%); right: calc(var(--r) * 1%);
  border: 0; padding: 0; background: none; cursor: pointer; border-radius: 14px;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.pipeline__hot:focus-visible { outline: 3px solid var(--brand-b); outline-offset: 2px; }
.pipeline__steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.pipeline__steps span {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 550 14.5px/1 var(--font-mono); color: var(--ink-2);
  padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.pipeline__steps span b { color: var(--ink); }
.pipeline__steps span.is-active { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.pipeline__steps span.is-active b { color: var(--bg); }
.paper-fig figcaption { margin: 16px auto 0; max-width: 860px; text-align: center; font-size: 16px; color: var(--ink-3); }

.kpis {
  list-style: none; padding: 0; margin: 44px 0 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px;
}
/* In the 2-column layouts an odd last card takes the full row. */
@media (max-width: 1100px) { .kpis li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.kpis li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 6px; }
.kpis__v { font: 750 clamp(30px, 3vw, 40px)/1 var(--font-sans); letter-spacing: -0.03em; }
.kpis__l { font-size: 16px; color: var(--ink-2); }
.spec-chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.spec-chips li {
  font: 550 14.5px/1 var(--font-mono); color: var(--ink-2);
  padding: 11px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
}

/* ==========================================================================
   Evaluation protocol
   ========================================================================== */
.protocols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.protocol {
  display: flex; align-items: center; gap: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 28px;
}
.protocol__v {
  font: 800 clamp(48px, 5vw, 66px)/1 var(--font-sans); letter-spacing: -0.04em;
  background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.protocol__l { font-size: 16.5px; color: var(--ink-2); line-height: 1.4; }
.protocol__l strong { display: block; font-size: 19px; color: var(--ink); font-weight: 650; margin-bottom: 2px; }

.phase-example { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.phase-example__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.phase-example__head h3 { font-size: 22px; }
.phase-example__head .seg { margin: 0; }

.phase-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) 44px minmax(0, 1fr); align-items: stretch; }
.phase-flow__arrow { display: grid; place-items: center; color: var(--ink-2); }
.phase-flow__arrow .icon { width: 30px; height: 30px; stroke-width: 2.2; }
.phase {
  border-radius: 16px; padding: 18px 18px 20px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.phase--nc { background: var(--nc-soft); border-color: color-mix(in srgb, var(--nc) 75%, transparent); }
.phase--c { background: var(--c-soft); border-color: color-mix(in srgb, var(--c) 90%, transparent); }
.phase__top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.phase__p { font: 750 16px/1 var(--font-mono); color: var(--ink); }
.phase__name { font-weight: 650; font-size: 19px; line-height: 1.25; }
.phase__kind { font: 650 13px/1 var(--font-mono); color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.phase__kind::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.phase--nc .phase__kind::before { background: var(--nc); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--nc) 55%, #000); }
.phase--c .phase__kind::before { background: var(--c); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, #000); }
.phase__cond { font-size: 16px; color: var(--ink-2); line-height: 1.5; }
.phase-note { margin-top: 14px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); text-align: center; text-wrap: balance; }
.td-phases + .phase-note { text-align: left; margin-top: 10px; }

.families { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.family { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.family__name { font: 650 13.5px/1.2 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.family__methods { font-size: 18px; font-weight: 650; color: var(--ink); }

/* ==========================================================================
   Results
   ========================================================================== */
.result-block {
  margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(20px, 3vw, 36px);
}
.result-block__head { margin-bottom: 22px; }
.result-block__head h3 { font-size: clamp(24px, 2.4vw, 30px); margin-bottom: 8px; text-wrap: balance; }
.result-block__head p { color: var(--ink-2); font-size: 17px; }
/* Marker highlights in the paper's Figure 4 colors (NC teal, C green); the text stays ink for contrast. */
.hl { padding: 0 3px; margin: 0 -1px; border-radius: 4px; white-space: nowrap; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl--nc { background: linear-gradient(transparent 52%, color-mix(in srgb, var(--nc) 75%, transparent) 52%); }
.hl--c { background: linear-gradient(transparent 52%, color-mix(in srgb, var(--c) 90%, transparent) 52%); }
.result-block--split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.result-block--split .result-block__head { margin-bottom: 0; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar__spacer { flex: 1; }
.link-btn {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font: 550 15px/1 var(--font-sans); padding: 9px 12px; border-radius: 9px;
}
.link-btn:hover { background: var(--surface-2); color: var(--ink); }
.link-btn .icon { width: 17px; height: 17px; }
.link-btn[hidden] { display: none; }
.note { margin-top: 14px; font-size: 14.5px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 22px; }
.note .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }

/* ---------- Paper-style tables (booktabs rules, bands for training regime) ---------- */
.table-scroll { overflow-x: auto; }
.lb { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 16px; }
.lb thead tr:first-child th { border-top: 2px solid var(--ink); }
.lb th, .lb td { padding: 10px 5px; text-align: center; white-space: nowrap; }
.lb .lb__groups th {
  font: 650 13.5px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  padding: 14px 8px 10px;
}
.lb .lb__groups th.lb__grouped { border-bottom: 1px solid var(--line-2); }
.lb .lb__cols th { border-bottom: 1.5px solid var(--ink); vertical-align: bottom; white-space: normal; }
.lb .lb__cols th button {
  background: none; border: 0; padding: 4px 4px; border-radius: 6px; cursor: pointer;
  font: 650 14px/1.25 var(--font-sans); color: var(--ink);
}
.lb .lb__cols th button:hover, .lb .lb__cols th button[data-dir] { color: var(--accent); }
.lb .lb__cols th button[data-dir="desc"]::after { content: " ↓"; }
.lb .lb__cols th button[data-dir="asc"]::after { content: " ↑"; }
.lb .lb__method {
  position: sticky; left: 0; z-index: 1; background: var(--surface);
  text-align: left; font-weight: 650; padding-left: 12px; padding-right: 10px;
}
.lb .lb__cols .lb__method { font: 650 13.5px/1 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.lb tr.lb__family th {
  text-align: left; padding: 9px 14px; font: italic 500 15.5px/1.2 var(--font-sans); color: var(--ink-2);
}
.lb tr.lb__family--task th { background: var(--band-task); }
.lb tr.lb__family--multi th { background: var(--band-multi); }
.lb tr.lb__family th span { position: sticky; left: 14px; }
.lb tbody td, .lb tfoot td { font-size: 18.5px; }
.lb--compact tbody td { font-size: inherit; }
.lb td.is-avg, .lb .lb__cols th.is-avg { background: var(--avg-bg); }
.lb .sep { border-left: 1px solid var(--line-2); }
.lb td.is-best b {
  font-weight: 750; color: var(--accent); background: var(--accent-soft);
  padding: 3px 8px; border-radius: 999px;
}
.lb td.is-na { color: var(--ink-3); }
.lb tbody tr:not(.lb__family):hover td, .lb tbody tr:not(.lb__family):hover th { background: var(--hover); }
.lb tbody tr:not(.lb__family):hover .lb__method { background: color-mix(in srgb, var(--surface) 94%, var(--ink)); }
.lb td.is-col { background: var(--hover); }
.lb tbody tr:not(.lb__family):hover td.is-avg, .lb td.is-avg.is-col { background: color-mix(in srgb, var(--avg-bg) 88%, var(--ink)); }
.lb tfoot th, .lb tfoot td { border-top: 1.5px solid var(--ink); border-bottom: 2px solid var(--ink); font-style: italic; color: var(--ink-2); font-size: 16px; }
.lb tfoot .lb__method { font-weight: 550; }
.lb--compact { font-size: 17px; }
.lb--compact tbody tr:last-child > * { border-bottom: 2px solid var(--ink); }
.lb .lb__left { text-align: left; }
.lb--compact td.is-best { font-weight: 750; }
.lb .fam-tag { font: 550 12px/1 var(--font-mono); color: var(--ink-3); margin-left: 8px; font-style: normal; }
.lb sup { color: var(--ink-3); font-weight: 500; }

/* ---------- Bar charts, styled after the paper's Figure 4 (pgfplots) ----------
   Monospace type, black-outlined bars with a hard offset shadow, light grid,
   black-framed legend box. Plain HTML/CSS so the bars animate and respond. */
.bc {
  --h: 300px; --top: 36px; --bar-w: 30%;
  --bc-ink: #111111; --bc-muted: #6f6f6a; --bc-grid: #d6d6d3;
  --bar-nc: #79b1cd; --bar-c: #b2d4a6; --bar-n: #8cc9a3; --drop: #dc0000;
  --bar-p1: #c6e8d1; --bar-p2: #8cc9a3; --bar-p3: #3f9a61;
  position: relative; color: var(--bc-ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bc { background: #fbfbf9; border-radius: 16px; padding: 18px 16px 10px; }
}
:root[data-theme="dark"] .bc { background: #fbfbf9; border-radius: 16px; padding: 18px 16px 10px; }

.bc__legend {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; max-width: 100%;
  margin-bottom: 18px; padding: 11px 16px; border: 1.5px solid var(--bc-ink); background: #ffffff;
  font: 500 14.5px/1.25 var(--font-mono); color: var(--bc-ink);
}
.bc__key {
  display: inline-flex; align-items: center; gap: 10px; border: 0; background: none;
  padding: 4px 6px; margin: -4px -6px; border-radius: 6px; cursor: pointer; font: inherit; color: inherit;
}
.bc__key:hover { background: rgba(0, 0, 0, 0.05); }
.bc__key[aria-pressed="false"] { opacity: 0.4; }
.bc__sw { width: 20px; height: 15px; flex: none; border: 1.5px solid var(--bc-ink); box-shadow: 2px 2px 0 var(--bc-ink); background: var(--bar-n); }
.bc__sw[data-kind="nc"] { background: var(--bar-nc); }
.bc__sw[data-kind="c"] { background: var(--bar-c); }
.bc__sw[data-kind="p1"], .bc__bar[data-kind="p1"] { background: var(--bar-p1); }
.bc__sw[data-kind="p2"], .bc__bar[data-kind="p2"] { background: var(--bar-p2); }
.bc__sw[data-kind="p3"], .bc__bar[data-kind="p3"] { background: var(--bar-p3); }
.bc--three .bc__val { font-size: 12.5px; letter-spacing: -0.02em; }
.bc__caption { flex-basis: 100%; font-size: 13.5px; color: var(--bc-muted); }
.bc__note b { color: var(--drop); font-weight: 600; margin-right: 6px; }
.bc__legend-sep { display: none; }
.bc__phases { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; flex-basis: 100%; }
.bc__key ~ .bc__phases { padding-top: 10px; border-top: 1px solid var(--bc-grid); }
.bc__phase { display: inline-flex; align-items: center; gap: 9px; }
.bc__phase b { font-weight: 700; }
.bc__arrow { display: inline-flex; color: var(--bc-muted); }
.bc__arrow .icon { width: 17px; height: 17px; }

.bc__scroll { overflow-x: auto; padding-bottom: 4px; }
.bc__body { display: grid; grid-template-columns: 24px 44px minmax(0, 1fr); min-width: 760px; }
.bc__ytitle { margin-top: var(--top); height: var(--h); display: flex; align-items: center; justify-content: center; }
.bc__ytitle span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font: 500 14px/1 var(--font-mono); color: var(--bc-ink); }
.bc__yaxis { position: relative; height: var(--h); margin-top: var(--top); border-right: 1.5px solid var(--bc-ink); }
.bc__yaxis span {
  position: absolute; right: 12px; bottom: calc(var(--y) * 1%); transform: translateY(50%);
  font: 500 13.5px/1 var(--font-mono); color: var(--bc-ink); font-variant-numeric: tabular-nums;
}
.bc__yaxis span::after { content: ""; position: absolute; right: -12px; top: 50%; width: 6px; height: 1.5px; margin-top: -0.75px; background: var(--bc-ink); }
.bc__plot { position: relative; }
.bc__grid { position: absolute; left: 0; right: 0; top: var(--top); height: var(--h); pointer-events: none; }
.bc__grid span { position: absolute; left: 0; right: 0; bottom: calc(var(--y) * 1%); height: 1px; background: var(--bc-grid); }
.bc__grid span:first-child { height: 1.5px; margin-bottom: -0.75px; background: var(--bc-ink); }
.bc__families { position: relative; display: flex; gap: 16px; padding: 0 8px; }
.bc__family { position: relative; flex: var(--n) 1 0; min-width: 0; display: flex; flex-direction: column; }
.bc__family--split::before {
  content: ""; position: absolute; left: -9px; top: 0; height: calc(var(--top) + var(--h));
  border-left: 1.5px dashed var(--bc-muted);
}
.bc__groups { display: flex; }
.bc__group {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; border-radius: 10px; outline: none;
  transition: opacity 0.25s ease, background 0.25s ease;
}
.bc__top { height: var(--top); display: flex; align-items: flex-start; justify-content: center; font: 500 16px/1 var(--font-mono); color: var(--drop); font-variant-numeric: tabular-nums; }
.bc__top.is-max { font-weight: 800; }
.bc__area { position: relative; height: var(--h); display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.bc__bar {
  position: relative; width: var(--bar-w); max-width: 36px; min-width: 12px;
  height: calc(var(--v, 0) * 1%);
  background: var(--bar-n); border: 1.5px solid var(--bc-ink); box-shadow: 3px 3px 0 var(--bc-ink);
  transition: height 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.25s ease;
  transition-delay: calc(var(--gi, 0) * 45ms + var(--i, 0) * 30ms), 0s;
}
.bc__bar[data-kind="nc"] { background: var(--bar-nc); }
.bc__bar[data-kind="c"] { background: var(--bar-c); }
.bc__bar[data-zero] { border-color: transparent; box-shadow: none; }
.bc__val {
  position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -5px);
  font: 500 13.5px/1 var(--font-mono); color: var(--bc-ink); white-space: nowrap; font-variant-numeric: tabular-nums;
  transition: opacity 0.3s ease 0.6s;
}
.bc__na { position: absolute; inset: auto 0 12px; text-align: center; font: 500 12.5px/1.3 var(--font-mono); color: var(--bc-muted); }
.bc__subs { display: flex; justify-content: center; gap: 8px; margin-top: 9px; }
.bc__sub { width: var(--bar-w); max-width: 36px; min-width: 12px; text-align: center; font: 500 12.5px/1 var(--font-mono); color: var(--bc-muted); }
.bc__label { margin-top: 12px; text-align: center; font: 500 15px/1.2 var(--font-mono); color: var(--bc-ink); white-space: nowrap; }
.bc__family-label { margin: 12px 8px 0; text-align: center; font: 500 13.5px/1.2 var(--font-mono); color: var(--bc-muted); }
.bc__family-label::before { content: ""; display: block; height: 8px; margin-bottom: 8px; border: 1.5px solid var(--bc-muted); border-top: 0; }
.bc.is-pending .bc__bar { height: 0; }
.bc.is-pending .bc__val { opacity: 0; }
.bc.has-hot .bc__group:not(.is-hot) { opacity: 0.3; }
.bc__group.is-hot { background: rgba(0, 0, 0, 0.045); }
.bc[data-off-nc] .bc__bar[data-kind="nc"], .bc[data-off-c] .bc__bar[data-kind="c"] { opacity: 0.12; }
.bc[data-off-nc] .bc__bar[data-kind="nc"] .bc__val, .bc[data-off-c] .bc__bar[data-kind="c"] .bc__val { opacity: 0; }
.bc--compact { --h: 210px; --top: 26px; }
.bc--compact .bc__body { min-width: 700px; }

/* ---------- Agentic model (GPT-6 Astra) ---------- */
.astra {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 3.6vw, 52px); align-items: center;
  padding: clamp(24px, 3.4vw, 40px); border-radius: 24px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.astra__text { display: flex; flex-direction: column; gap: 14px; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.astra__text strong { color: var(--ink); }
.astra__id { display: flex; align-items: center; gap: 16px; }
.astra__id h3 { font-size: clamp(26px, 2.6vw, 32px); letter-spacing: -0.02em; color: var(--ink); }
.astra__logo {
  width: 56px; height: 56px; flex: none; border-radius: 16px; background: var(--ink); position: relative;
}
.astra__logo::after {
  content: ""; position: absolute; inset: 12px; background: var(--bg);
  -webkit-mask: url("../img/openai-logo.svg") center / contain no-repeat; mask: url("../img/openai-logo.svg") center / contain no-repeat;
}
.astra__tag { font: 650 13px/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.astra__stat { display: flex; align-items: center; gap: 16px; padding: 4px 0; }
.astra__v { font: 750 clamp(48px, 5vw, 64px)/1 var(--font-sans); letter-spacing: -0.04em; }
.astra__l { font-size: 16px; line-height: 1.45; color: var(--ink-2); max-width: 260px; }
.astra__note { font-size: 14.5px; color: var(--ink-3); line-height: 1.5; }

/* --lab: task-name column, --pad: room right of the bars for value labels */
.ab { --astra: linear-gradient(90deg, var(--brand-a), var(--brand-b) 60%, var(--brand-c)); --best: #d9d9d4; --lab: 136px; --pad: 100px; }
.bc__sw[data-kind="astra"] { background: var(--astra); }
.bc__sw[data-kind="best"] { background: var(--best); }
.ab .bc__legend { margin-bottom: 14px; }
.ab__rows { position: relative; display: flex; flex-direction: column; }
.ab__row {
  display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 7px 0; border-radius: 8px;
}
.ab__row:hover { background: rgba(0, 0, 0, 0.04); }
.ab__task { font: 500 14.5px/1.2 var(--font-mono); color: var(--bc-ink); text-align: right; }
.ab__row.is-win .ab__task { font-weight: 750; }
.ab__bars {
  position: relative; display: flex; flex-direction: column; gap: 5px; padding-right: var(--pad);
  border-left: 1.5px solid var(--bc-ink);
  background: repeating-linear-gradient(90deg, transparent 0 calc((100% - var(--pad)) / 5 - 1px), var(--bc-grid) 0 calc((100% - var(--pad)) / 5));
  background-size: calc(100% - var(--pad)) 100%; background-repeat: no-repeat;
}
.ab__bar {
  position: relative; height: 15px; width: calc(var(--v) * 1%);
  border: 1.5px solid var(--bc-ink); box-shadow: 2px 2px 0 var(--bc-ink);
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ab__bar[data-kind="astra"] { background: var(--astra); }
.ab__bar[data-kind="best"] { background: var(--best); }
.ab__bar[data-zero] { border-color: transparent; box-shadow: none; }
.ab.is-pending .ab__bar { width: 0; }
.ab__val {
  position: absolute; left: 100%; top: 50%; transform: translate(8px, -50%);
  font: 500 13.5px/1 var(--font-mono); color: var(--bc-ink); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ab__who { margin-left: 7px; font-size: 12.5px; color: var(--bc-muted); }
.ab__axis { position: relative; height: 22px; margin: 6px var(--pad) 0 calc(var(--lab) + 12px); border-top: 1.5px solid var(--bc-ink); }
.ab__axis span {
  position: absolute; left: calc(var(--x) * 1%); top: 7px; transform: translateX(-50%);
  font: 500 12.5px/1 var(--font-mono); color: var(--bc-ink);
}
.ab__title { margin: 6px var(--pad) 0 calc(var(--lab) + 12px); text-align: center; font: 500 13.5px/1 var(--font-mono); color: var(--bc-ink); }

/* ---------- Failure carousel ---------- */
.carousel__track {
  /* two cards side by side fill the row exactly (100% minus the one 20px gap, halved) */
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 20px) / 2);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 2px 2px 10px; scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.fail-card { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.fail-card__frames { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.fail-card__frames figure { margin: 0; position: relative; }
.fail-card__frames img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tile-bg); }
.fail-card__frames figcaption {
  position: absolute; left: 8px; top: 8px; font: 650 11.5px/1 var(--font-mono); color: #fff;
  background: rgba(8, 12, 11, 0.6); padding: 5px 8px; border-radius: 6px;
}
.fail-card__video video { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tile-bg); }
.fail-card__body { padding: 18px 20px 20px; }
.fail-card__name { margin-bottom: 8px; }
.fail-card__text { font-size: 16px; color: var(--ink-2); line-height: 1.5; }
.carousel__nav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.carousel__count { font: 550 14px/1 var(--font-mono); color: var(--ink-3); margin-right: auto; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  transition: background 0.2s ease, opacity 0.2s ease;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn .icon { width: 20px; height: 20px; }

/* ---------- BibTeX & footer ---------- */
.bibtex { position: relative; }
.bibtex pre {
  margin: 0; overflow-x: auto; padding: 24px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  font: 400 15px/1.7 var(--font-mono); color: var(--ink);
}
.bibtex__copy {
  position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer;
  font: 550 14px/1 var(--font-sans); padding: 9px 12px; border-radius: 9px;
}
.bibtex__copy:hover { color: var(--ink); }
.bibtex__copy .icon { width: 16px; height: 16px; }
.bibtex__soon {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 22px 26px;
  border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line-2);
  color: var(--ink-2); font-size: 16px;
}
.acknowledgements { margin-top: 32px; color: var(--ink-2); font-size: 16px; }
.footer { border-top: 1px solid var(--line); padding: 34px 0 42px; font-size: 15px; color: var(--ink-2); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer__muted { color: var(--ink-3); }

/* ---------- Task dialog ---------- */
.task-dialog {
  width: min(1120px, calc(100vw - 32px)); max-width: none;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 22px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); overflow: hidden;
}
.task-dialog[open] { display: flex; flex-direction: column; animation: dialog-in 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.task-dialog::backdrop { background: rgba(6, 10, 9, 0.6); backdrop-filter: blur(3px); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.td-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px 16px 26px; border-bottom: 1px solid var(--line); flex: none; }
.td-head h2 { font: 700 26px/1.2 var(--font-mono); letter-spacing: -0.02em; }
.td-head .td-tags { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-right: auto; align-items: center; }
.td-scroll { overflow-y: auto; padding: 26px; overscroll-behavior: contain; }
.td-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 30px; }
.td-video { position: relative; border-radius: 16px; overflow: hidden; background: #0d1111; aspect-ratio: 16 / 9; }
.td-video video { width: 100%; height: 100%; object-fit: cover; }
.td-summary { font-size: 18px; line-height: 1.55; margin: 16px 0 4px; }
.td-meta { font: 550 14px/1.5 var(--font-mono); color: var(--ink-3); }
.td-section-title { font: 650 13px/1 var(--font-mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); margin: 26px 0 12px; }
.td-grid > div > .td-section-title:first-child { margin-top: 0; }
.td-phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.td-phases .phase { padding: 14px 16px; gap: 6px; }
.td-phases .phase__cond { font-size: 15px; }
.instr-text { font-size: 16.5px; line-height: 1.6; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); min-height: 76px; }
.td-results { margin-top: 30px; }
.td-foot { display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); flex: none; }
.td-foot .link-btn { font-family: var(--font-mono); }
.deflist { margin: 0; }
.deflist > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.deflist > div:last-child { border-bottom: 0; }
.deflist dt { font: 650 12.5px/1.5 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.deflist dd { margin: 0; font-size: 16px; color: var(--ink); line-height: 1.5; }
.deflist .muted { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-3); }

/* ---------- Tooltip ---------- */
.tooltip {
  position: fixed; z-index: 200; pointer-events: none; max-width: 300px;
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 11px 13px;
  font-size: 14.5px; line-height: 1.45; box-shadow: var(--shadow);
}
.tooltip strong { font: 750 16px/1.2 var(--font-sans); }
.tooltip .tt-title { font-weight: 650; margin-bottom: 4px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 8px; }
.tooltip .tt-key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.tooltip .tt-muted { opacity: 0.75; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .result-block { padding: 22px 16px; }
  .lb { font-size: 15.5px; }
  .lb th, .lb td { padding: 9px 3px; }
  .lb .lb__cols th button { font-size: 13px; padding: 4px 2px; }
  .lb .lb__method { padding-left: 8px; padding-right: 8px; }
  .lb td.is-best b { padding: 3px 7px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .families { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-block--split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .astra { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .hero-card__facts { display: none; }
  .taxo { padding-top: 0; }
  .taxo__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 20px; }
  .taxo__axis, .taxo__label { display: none; }
  .axis-defs { grid-template-columns: minmax(0, 1fr); }
  .protocols { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-grid { grid-template-columns: minmax(0, 1fr); }
  .phase-flow { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 40px auto 40px auto; }
  .phase-flow__arrow .icon { transform: rotate(90deg); }
}

/* Portrait tablets: keep the mosaic but let tiles keep a landscape shape. */
@media (orientation: portrait) and (min-width: 701px) {
  .hero { height: auto; min-height: 0; }
  .hero-grid { position: relative; grid-template-rows: auto auto auto; }
  .hero-row--top .tile, .hero-row--bottom .tile { aspect-ratio: 4 / 3; }
  .hero-row--middle .tile { aspect-ratio: 16 / 11; }
  .hero-scroll { display: none; }
}

@media (max-width: 700px) {
  .carousel__track { grid-auto-columns: 86%; }
  body { font-size: 17px; }
  .hero { height: auto; min-height: 0; }
  .hero-grid { position: relative; grid-template-rows: auto; }
  .hero-row--top, .hero-row--bottom, .hero-row--middle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { aspect-ratio: 16 / 10; }
  .tile__name { font-size: 13px; }
  .tile__meta { display: none; }
  .tile__badge { font-size: 10.5px; padding: 5px 7px; left: 8px; top: 8px; }
  .tile--right .tile__badge { right: 8px; }
  .hero-card {
    position: relative; left: auto; top: auto; transform: none; width: auto; max-width: none;
    margin: 0; border-radius: 0; box-shadow: none; padding: 26px 18px 22px;
    background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .hero-card::before { display: none; }
  /* Flatten the rows so the title card sits between the top tiles and the three-humanoid pair. */
  .hero { display: flex; flex-direction: column; gap: var(--hero-gap); }
  .hero-grid { display: contents; }
  .hero-row--top { order: 1; }
  .hero-card { order: 2; }
  .hero-row--middle { order: 3; }
  .hero-row--bottom { order: 4; }
  .hero-card__facts { display: block; }
  .hero-scroll { display: none; }
  .br-wide { display: none; }
  .quad__cards, .trio__cards { grid-template-columns: minmax(0, 1fr); }
  .kpis, .families { grid-template-columns: minmax(0, 1fr); }
  .seg-group { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .seg-group__label { padding-top: 0; }
  .stat { padding: 22px 18px; }
  .protocol { padding: 20px; gap: 16px; }
  .deflist > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .task-dialog { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .td-scroll { padding: 18px 16px; }
  .topnav__brand { font-size: 19px; }
  .topnav__inner { gap: 12px; height: 56px; }
  .abstract { text-align: left; }
  .ego-hint { display: block; }
  .ab { --lab: 100px; --pad: 34px; }
  .eyebrow { font-size: 13.5px; letter-spacing: 0.07em; padding: 11px 18px 11px 16px; text-align: left; }
  .ab__task { font-size: 12.5px; }
  .ab__who { display: none; }
  .phase-example { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline__layer.is-active { transform: none; }
  html { scroll-behavior: auto; }
  .hero-scroll { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tile, .tile video, .task-card, .task-card__media video, .task-dialog[open], .bc__bar, .hero-card { transition: none; animation: none; }
  .tile:hover video, .task-card:hover .task-card__media video { transform: none; }
  .carousel__track { scroll-behavior: auto; }
}

@media print {
  .hero, .topnav, .carousel__nav, .bibtex__copy { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
