@charset "UTF-8";

/* TARSphere project page: a gallery catalogue for a research film and its plates.
   The film stage (hero, footer, players, expanded recordings) is deep ink and ivory in
   both themes; the catalogue around it is warm paper in light and ink in dark.
   Paper figures keep their white canvas and data colours and sit on white mats.
   Order: tokens, base, header, hero, openers, plates, media, Infra, Bench, episodes,
   dialogs, closing sections, motion, breakpoints.
   Layers: header 10, media controls 2, skip link 30; dialogs use the top layer. */

@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
}

/* ------------------------------------------------------------------ Tokens */
:root {
  color-scheme: light;

  /* Type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-text: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  /* Brand */
  --brand-purple: #6B4A8A;
  --brand-violet: #8557A0;
  --brand-teal: #3D9E91;

  /* Film stage, identical in both themes */
  --film-ink: #0D0B12;
  --film-ink-2: #16131C;
  --film-ivory: #F6F1EA;
  --film-lavender: #CDB6E6;
  --film-teal: #8FD8CB;

  /* Catalogue surfaces */
  --page: #F4F0E9;
  --surface: #FBF9F5;
  --mat: #FFFFFF;
  --ink: #1D1923;
  --ink-2: #3E3845;
  --muted: #655D6B;
  --accent: #6B4A8A;
  --accent-strong: #523670;
  --accent-2: #24695F;
  --line: rgb(29 25 35 / 11%);
  --line-strong: rgb(29 25 35 / 20%);
  --selected: rgb(107 74 138 / 13%);
  --screen: #0D0B12;
  --map-ground: #ECE7DF;

  /* Elevation: paper on a warm wall */
  --shadow-plate:
    0 0 0 1px rgb(40 28 22 / 7%),
    0 1px 2px rgb(40 28 22 / 5%),
    0 6px 14px -6px rgb(40 28 22 / 9%),
    0 28px 56px -28px rgb(40 28 22 / 22%);
  --shadow-plate-hover:
    0 0 0 1px rgb(40 28 22 / 8%),
    0 2px 4px rgb(40 28 22 / 5%),
    0 12px 24px -10px rgb(40 28 22 / 12%),
    0 40px 72px -32px rgb(40 28 22 / 28%);
  --shadow-screen:
    0 0 0 1px rgb(13 11 18 / 10%),
    0 10px 24px -14px rgb(13 11 18 / 40%);
  --shadow-screen-hover:
    0 0 0 1px rgb(13 11 18 / 12%),
    0 22px 40px -20px rgb(13 11 18 / 50%);

  /* Space, on a 4px base */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --gutter: clamp(20px, 4.2vw, 64px);
  --content: 1200px;
  --stage: 1320px;
  --measure: 64ch;
  --section-space: clamp(88px, 10vw, 152px);

  /* Shape */
  --r-plate: 6px;
  --r-screen: 6px;
  --r-chip: 4px;
  --r-dialog: 14px;
  --r-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.33, 1, .68, 1);
  --dur-fast: 160ms;
  --dur: 280ms;
  --dur-reveal: 900ms;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0D0B12;
  --surface: #16131C;
  --mat: #FFFFFF;
  --ink: #F3EDE4;
  --ink-2: #D8D0C5;
  --muted: #A69D93;
  --accent: #C7AEE2;
  --accent-strong: #DDCBF1;
  --accent-2: #86D1C4;
  --line: rgb(246 241 234 / 10%);
  --line-strong: rgb(246 241 234 / 19%);
  --selected: rgb(199 174 226 / 17%);
  --screen: #050407;
  --map-ground: #1B1822;
  --shadow-plate:
    0 0 0 1px rgb(255 255 255 / 5%),
    0 2px 4px rgb(0 0 0 / 40%),
    0 30px 60px -30px rgb(0 0 0 / 85%);
  --shadow-plate-hover:
    0 0 0 1px rgb(255 255 255 / 7%),
    0 4px 8px rgb(0 0 0 / 40%),
    0 44px 80px -34px rgb(0 0 0 / 90%);
  --shadow-screen:
    0 0 0 1px rgb(246 241 234 / 9%),
    0 14px 30px -16px rgb(0 0 0 / 80%);
  --shadow-screen-hover:
    0 0 0 1px rgb(246 241 234 / 14%),
    0 24px 44px -20px rgb(0 0 0 / 90%);
}

/* Regions that belong to the film stage re-declare the palette in ivory on ink. */
.hero,
.site-header.is-on-stage,
.highlight-section,
footer,
.demo-zoom {
  --page: var(--film-ink);
  --surface: var(--film-ink-2);
  --ink: var(--film-ivory);
  --ink-2: rgb(246 241 234 / 84%);
  --muted: rgb(246 241 234 / 64%);
  --accent: var(--film-lavender);
  --accent-strong: #E4D6F3;
  --accent-2: var(--film-teal);
  --line: rgb(246 241 234 / 11%);
  --line-strong: rgb(246 241 234 / 22%);
  --selected: rgb(205 182 230 / 18%);
  --shadow-screen: 0 0 0 1px rgb(246 241 234 / 10%), 0 18px 40px -22px rgb(0 0 0 / 90%);
  --shadow-screen-hover: 0 0 0 1px rgb(246 241 234 / 18%), 0 26px 50px -24px rgb(0 0 0 / 95%);
  color-scheme: dark;
}

/* -------------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-family: var(--font-text);
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--page);
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, a, summary, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent-strong); }
a, button, summary, select {
  transition: color var(--dur-fast), background-color var(--dur-fast), border-color var(--dur-fast), opacity var(--dur-fast);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--selected); color: var(--ink); }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, h4, h5, h6, p, figure, dl, dd, blockquote { margin: 0; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
  font-kerning: normal;
}
h2 { font-size: clamp(34px, 3.8vw, 56px); line-height: 1.06; letter-spacing: -.018em; }
h3 { font-size: clamp(22px, 1.8vw, 26px); line-height: 1.2; letter-spacing: -.01em; }
h4 { font-size: clamp(24px, 2.1vw, 31px); line-height: 1.15; letter-spacing: -.012em; }
h5 { font-size: 17px; line-height: 1.3; letter-spacing: -.005em; }
p { text-wrap: pretty; }
.keep-together { white-space: nowrap; }
pre, code { font-family: var(--font-mono); }
.skip { position: fixed; z-index: 30; top: -100px; left: 20px; padding: 12px 20px; border-radius: var(--r-pill); background: var(--ink); color: var(--page); font-size: 13px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.skip:hover { color: var(--page); }

/* Inner scroll regions share one quiet scrollbar. */
.highlight-grid, .harness-grid, .task-grid, .condition-grid, .table-scroll, .infra-chapters, #condition-navigation {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

/* Eyebrows: section numbering set in small capitals. */
.teaser-heading::before,
.chapter > .chapter-heading::before,
.method-heading::before,
.contribute-intro::before {
  display: block;
  color: var(--muted);
  font-family: var(--font-text);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.teaser-heading::before { content: "01 · Overview"; content: "01 · Overview" / ""; }
#framework > .chapter-heading::before { content: "02 · Framework"; content: "02 · Framework" / ""; }
#infrastructure > .method-heading::before { content: "2.1"; content: "2.1" / ""; }
#harness > .method-heading::before { content: "2.2"; content: "2.2" / ""; }
#benchmark > .method-heading::before { content: "2.3"; content: "2.3" / ""; }
#comparison > .chapter-heading::before { content: "03 · Comparison"; content: "03 · Comparison" / ""; }
#main-results > .chapter-heading::before { content: "04 · Analysis"; content: "04 · Analysis" / ""; }
#harness-ablation > .chapter-heading::before { content: "4.2"; content: "4.2" / ""; }
#qualitative-comparison > .chapter-heading::before { content: "4.3"; content: "4.3" / ""; }
.contribute-intro::before { content: "05 · Contribute"; content: "05 · Contribute" / ""; }

/* ------------------------------------------------------------------ Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(244 240 233 / 82%);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  backdrop-filter: saturate(1.5) blur(18px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background-color var(--dur) var(--ease-soft), border-color var(--dur) var(--ease-soft), color var(--dur) var(--ease-soft);
}
:root[data-theme="dark"] .site-header { background: rgb(13 11 18 / 78%); }
.site-header.is-on-stage { background: var(--film-ink); border-color: rgb(246 241 234 / 8%); }
.header-inner {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: auto;
  min-height: 64px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand-lockup { display: flex; align-items: center; gap: 18px; margin-right: auto; flex-shrink: 0; }
.producer-zju { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.producer-zju:hover { color: var(--ink); }
.producer-zju img { width: 30px; height: 30px; object-fit: contain; }
.brand-divider { height: 22px; border-left: 1px solid var(--line-strong); }
.lab-brand { display: flex; align-items: center; width: 214px; }
.lab-brand img { display: block; width: 100%; height: auto; filter: brightness(0); opacity: .9; transition: opacity var(--dur-fast); }
.lab-brand:hover img { opacity: 1; }
/* Seals keep their official colours on an ivory disc wherever the ground is dark. */
:root[data-theme="dark"] .producer-zju img,
.site-header.is-on-stage .producer-zju img,
.hero-affiliations img { padding: 2px; border-radius: 50%; background: var(--film-ivory); }
:root[data-theme="dark"] .lab-brand img,
.site-header.is-on-stage .lab-brand img { filter: brightness(0) invert(1); opacity: .94; }
#main-navigation { display: flex; align-items: center; gap: 30px; }
#main-navigation a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: .015em;
  white-space: nowrap;
}
#main-navigation a:hover { color: var(--ink); }
#main-navigation a[aria-current="location"] { color: var(--ink); }
#main-navigation a[aria-current="location"]::after { position: absolute; content: ""; height: 1.5px; background: var(--accent); bottom: 18px; inset-inline: 0; border-radius: 1px; }
.theme-control, .menu-toggle {
  min-height: 34px;
  min-width: 64px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
}
.theme-control:hover, .menu-toggle:hover { background: var(--selected); border-color: var(--accent); }
.menu-toggle { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
main { padding-inline: var(--gutter); }

/* -------------------------------------------------------------------- Hero */
/* The full 4K film leads; publication details share the ink stage below it. */
.hero {
  --frame: min(var(--content), calc(100% - 2 * var(--gutter)));
  position: relative;
  isolation: isolate;
  margin-inline: calc(var(--gutter) * -1);
  background: var(--film-ink);
  color: var(--ink);
}
:root[data-theme="dark"] .hero { box-shadow: inset 0 -1px 0 rgb(246 241 234 / 8%); }
/* The cover: a silent loop of the film sits behind the title; the full film opens in a dialog. */
.hero-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(600px, calc(100svh - 64px), 960px);
  padding: clamp(48px, 6vw, 88px) 0 clamp(72px, 8vw, 112px);
  background: #08090c;
  overflow: hidden;
}
.hero-backdrop { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 72% 64% at 50% 46%, rgb(8 9 12 / 50%), rgb(8 9 12 / 12%) 100%),
    linear-gradient(rgb(8 9 12 / 28%), rgb(8 9 12 / 0%) 26%, rgb(8 9 12 / 0%) 54%, #08090c 100%);
}
.film-dialog {
  width: min(96vw, calc(88svh * 16 / 9));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: var(--r-screen);
  background: #000;
  color: var(--film-ivory);
  overflow: visible;
  box-shadow: 0 0 0 1px rgb(246 241 234 / 10%), 0 48px 120px -24px rgb(0 0 0 / 90%);
}
.film-dialog::backdrop { background: rgb(5 4 7 / 88%); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.film-dialog[open] { animation: film-open var(--dur) var(--ease-out); }
@keyframes film-open { from { opacity: 0; transform: translateY(12px) scale(.985); } }
#hero-film { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: inherit; object-fit: contain; background: #000; }
#hero-film::cue { font-family: Manrope, sans-serif; color: #FBF8F4; background: rgb(13 11 18 / 88%); }
.film-close {
  position: absolute;
  top: -46px;
  right: 0;
  min-height: 34px;
  padding: 6px 16px;
  border: 1px solid rgb(246 241 234 / 28%);
  border-radius: var(--r-pill);
  color: var(--film-ivory);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
}
.film-close:hover { background: rgb(246 241 234 / 12%); border-color: rgb(246 241 234 / 55%); }
.film-close:focus-visible { outline-color: var(--film-ivory); }
#hero-film-error { position: relative; margin: 0; padding: 20px; background: var(--film-ink); }
@media (prefers-reduced-motion: reduce) { .film-dialog[open] { animation: none; } }
.hero-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 7px 22px 7px 7px;
  border-radius: var(--r-pill);
  background: var(--film-ivory);
  color: var(--film-ink);
  box-shadow: 0 12px 32px -14px rgb(0 0 0 / 70%);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background-color var(--dur-fast), transform var(--dur) var(--ease-out);
}
.hero-play:hover { background: #FFFFFF; transform: translateY(-1px); }
.hero-play:focus-visible { outline-color: var(--film-ivory); outline-offset: 4px; }
.hero-play:disabled { opacity: .45; transform: none; }
.hero-play-icon { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--film-ink); }
.hero-play-icon::before { content: ""; position: absolute; top: 11px; left: 13.5px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--film-ivory); }
.hero-play-time { color: rgb(13 11 18 / 58%); font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-play-time:empty { display: none; }

/* The title, credits and abstract share one centered, interactive ink stage. */
.hero-intro { position: relative; isolation: isolate; overflow: hidden; background: #08090c; text-align: center; }
.hero-intro > .hero-atmosphere { inset: 0; mask-image: linear-gradient(transparent, #000 220px); }
.hero-atmosphere { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; mask-image: linear-gradient(#000 50%, transparent); }
.hero-light { position: absolute; width: min(86vw, 1100px); aspect-ratio: 1; border-radius: 50%; }
.hero-light-teal { top: -20%; left: -12%; background: radial-gradient(ellipse, rgb(70 147 141 / 15%), transparent 66%); }
.hero-light-lavender { top: 12%; right: -18%; background: radial-gradient(ellipse, rgb(144 102 181 / 13%), transparent 67%); }
.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 2vw, 26px);
  justify-items: center;
  width: var(--frame);
  margin: 0 auto;
  text-align: center;
  text-shadow: 0 1px 18px rgb(0 0 0 / 45%);
}
.hero h1 { margin: 0; font: inherit; color: inherit; text-shadow: 0 2px 24px rgb(0 0 0 / 35%); }
.hero-wordmark { display: block; width: clamp(230px, 24vw, 320px); max-width: 100%; height: auto; margin: 0 auto 6px; }
.hero-statement {
  display: block;
  max-width: 35em;
  margin-inline: auto;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 2.5vw, 36px);
  line-height: 1.25;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.hero-title-line { display: inline; }
.hero-title-line strong { font-weight: inherit; }
.hero-title-line .title-purple { color: var(--film-lavender); white-space: nowrap; }
.hero-title-line .title-green { color: var(--film-teal); }
.hero-publication { display: grid; justify-items: center; gap: 14px; }
.hero-publication .authors { margin: 0; }
.author-list { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; }
.author-list a { text-decoration: none; }
.author-list a:hover { text-decoration: underline; }
.author-list sup { font-size: 9px; margin-left: 3px; }
.hero-publication .author-list { justify-content: center; gap: 4px 22px; color: var(--ink-2); font-size: clamp(13.5px, 1.04vw, 15.5px); font-weight: 500; letter-spacing: .005em; line-height: 1.75; }
.hero-publication .author-list a { color: var(--ink-2); white-space: nowrap; text-decoration-color: rgb(246 241 234 / 40%); text-underline-offset: 5px; }
.hero-publication .author-list a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--film-lavender); }
.hero-publication .author-list sup { color: var(--film-lavender); font-size: .66em; font-weight: 600; margin-left: 2px; }
.university-lockup { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 12px 28px; }
.university-lockup a { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 13px; text-decoration: none; }
.university-lockup a:hover { color: var(--ink); }
.university-lockup img { width: 28px; height: 28px; object-fit: contain; }
.university-lockup a + a { padding-left: 28px; border-left: 1px solid var(--line); }
.hero-affiliations sup { font-size: 9px; font-weight: 600; color: var(--film-lavender); }
.hero-affiliations { justify-content: center; }
.hero-actions { display: grid; justify-items: center; gap: 16px; padding-top: 6px; text-shadow: none; }
.hero-resources { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero-resource {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 124px;
  min-height: 44px;
  padding: 9px 20px 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: rgb(13 11 18 / 46%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
}
.hero-resource img { flex-shrink: 0; width: 22px; height: 22px; object-fit: contain; }
.hero-resource .resource-arxiv { width: 40px; height: 19px; }
.hero-resource .resource-github { width: 21px; height: 21px; filter: invert(1); }
.hero-resource .resource-project { flex-shrink: 0; width: 22px; height: 22px; }
.hero-resource[aria-disabled="true"] { cursor: default; }
.hero-resource:not([aria-disabled="true"]):hover { background: rgb(246 241 234 / 10%); border-color: rgb(246 241 234 / 40%); }

/* ------------------------------------------------------- Section openers */
.abstract-section {
  position: relative;
  isolation: isolate;
  width: var(--frame);
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 0 88px;
  text-align: center;
}
.abstract-atmosphere { inset: -32px -12vw; mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent); }
.abstract-atmosphere .hero-light { width: min(85vw, 900px); }
.abstract-light-primary { top: 42%; left: 28%; transform: translate(-50%, -50%); background: radial-gradient(ellipse, rgb(137 89 186 / 22%), transparent 67%); }
.abstract-atmosphere.is-following .abstract-light-primary { top: 0; left: 0; }
.abstract-light-secondary { top: calc(62% - min(42.5vw, 450px)); right: -18%; background: radial-gradient(ellipse, rgb(174 132 201 / 13%), transparent 68%); }
.abstract-body { max-width: 78ch; margin-inline: auto; font-family: var(--font-display); font-size: 17.5px; line-height: 1.78; text-align: start; text-wrap: pretty; -webkit-hyphens: manual; hyphens: manual; }
.abstract-label { margin-right: 5px; font-size: 1.1em; }
.abstract-copy { display: inline; color: var(--ink-2); font: inherit; }
.abstract-copy p { display: inline; }
.abstract-copy strong { color: var(--ink); font-weight: 650; }
.teaser-section { max-width: var(--content); margin: 0 auto; padding: var(--section-space) 0; }
.hero + .teaser-section { padding-top: clamp(64px, 7vw, 100px); }
.teaser-heading { max-width: 900px; margin: 0 auto clamp(44px, 5vw, 72px); text-align: center; }
.teaser-heading::before { margin-bottom: 26px; }
.teaser-heading h2 { font-size: clamp(34px, 4.2vw, 62px); line-height: 1.07; }
.teaser-heading h2 span { color: var(--accent); }
.teaser-heading p { max-width: 54ch; margin: 24px auto 0; color: var(--ink-2); font-size: clamp(16px, 1.2vw, 18px); line-height: 1.7; }

.chapter { max-width: var(--content); margin: 0 auto; padding: var(--section-space) 0 0; }
.chapter > .chapter-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 18px;
  margin-bottom: clamp(40px, 4.6vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}
.chapter > .chapter-heading::before { grid-column: 1 / -1; margin-bottom: clamp(18px, 2vw, 28px); }
.chapter > .chapter-heading h2 { grid-column: 1; }
.chapter > .chapter-heading p { grid-column: 1; max-width: 56ch; margin: 0; color: var(--ink-2); font-size: clamp(15.5px, 1.15vw, 17px); line-height: 1.7; }
.chapter-heading p { color: var(--muted); }

.method-block { margin-top: clamp(80px, 9vw, 136px); }
.method-heading { margin-bottom: clamp(28px, 3vw, 40px); }
.method-heading::before { margin-bottom: 18px; color: var(--accent); }
.method-heading h3 { font-size: clamp(30px, 3.1vw, 44px); line-height: 1.06; letter-spacing: -.016em; }
.method-heading p { margin-top: 12px; color: var(--muted); font-family: var(--font-display); font-style: italic; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; }

.subsection-heading { margin-bottom: clamp(24px, 2.6vw, 36px); }
.subsection-heading p { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------------ Plates */
/* Each paper figure is a matted print: white mat, hairline edge, soft layered shadow. */
a.figure-image {
  position: relative;
  display: block;
  padding: clamp(12px, 2.5vw, 36px);
  border-radius: var(--r-plate);
  background: var(--mat);
  box-shadow: var(--shadow-plate);
  outline-offset: 6px;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
a.figure-image img { display: block; width: 100%; height: auto; }
a.figure-image::after {
  content: "";
  position: absolute;
  top: clamp(8px, 1vw, 14px);
  right: clamp(8px, 1vw, 14px);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    url("assets/icons/arrows-maximize.svg") center / 15px no-repeat,
    rgb(255 255 255 / 92%);
  box-shadow: 0 0 0 1px rgb(29 25 35 / 12%), 0 4px 10px -4px rgb(29 25 35 / 25%);
  opacity: 0;
  transform: scale(.92);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  pointer-events: none;
}
a.figure-image:hover { transform: translateY(-4px); box-shadow: var(--shadow-plate-hover); }
a.figure-image:hover::after, a.figure-image:focus-visible::after { opacity: 1; transform: none; }
@media (hover: none) { a.figure-image::after { opacity: 1; transform: none; } }
.teaser-section figure, .infra-original, #figure-harness, #benchmark-statistics, #curation figure, #figure-qualitative-comparison { margin: 0; }
/* Wall labels: each plate carries its one-sentence description beneath it. */
.plate-caption {
  display: flex;
  align-items: baseline;
  gap: 14px;
  max-width: 72ch;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.55;
}
.plate-caption::before { content: ""; flex: none; width: 24px; height: 1px; background: var(--line-strong); transform: translateY(-.32em); }

/* Tables: the mat is the scroll region, so narrow screens can pan the original. */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: clamp(12px, 2.5vw, 36px);
  border-radius: var(--r-plate);
  background: var(--mat);
  box-shadow: var(--shadow-plate);
  scrollbar-color: rgb(29 25 35 / 22%) transparent;
}
.paper-table a.figure-image, .paper-table .figure-image { padding: 0; border-radius: 0; background: none; box-shadow: none; transform: none; min-width: 1040px; }
.paper-table a.figure-image::after { content: none; }
.paper-table a.figure-image:focus-visible { outline-offset: 2px; }
.figure-image { display: block; }
.figure-image img { display: block; width: 100%; height: auto; }
.table-hint { display: none; }
.table-notes { max-width: var(--measure); margin-top: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.comparison-paper { position: relative; }
.comparison-image-open { display: block; }
.paper-name-link { position: absolute; z-index: 2; border-radius: 2px; }
.paper-name-link:hover { background: rgb(107 74 138 / 12%); box-shadow: 0 1px 0 #6B4A8A; }

/* ------------------------------------------------------------------- Media */
/* Recordings are screens: ink frames with a hairline, captions set below like wall labels. */
.highlight-section {
  margin-inline: calc(var(--gutter) * -1);
  padding: clamp(32px, 3.5vw, 48px) var(--gutter) clamp(48px, 5vw, 72px);
  background: var(--film-ink);
  color: var(--ink);
}
:root[data-theme="dark"] .highlight-section { background: var(--film-ink-2); box-shadow: inset 0 1px 0 rgb(246 241 234 / 8%), inset 0 -1px 0 rgb(246 241 234 / 8%); }
.highlight-section > .highlight-intro, .highlight-section > .highlight-grid { max-width: var(--content); margin-inline: auto; }

.highlight-section > .highlight-intro {
  max-width: 1100px;
  margin: 0 auto 28px;
  text-align: center;
  color: var(--film-ivory);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -.014em;
  text-wrap: balance;
}
.highlight-intro em { color: var(--film-lavender); font-weight: inherit; white-space: nowrap; }
.highlight-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); }
.highlight-card { display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 100px; }
.highlight-player { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-screen); background: var(--screen); }
.highlight-player video { display: block; width: 100%; height: 100%; object-fit: contain; }
/* All four previews share one fixed frame; absolute video keeps intrinsic sizes out of the grid. */
.highlight-card .highlight-player {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  min-height: 0;
  box-shadow: var(--shadow-screen);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.highlight-card .highlight-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Taller-than-4:3 recordings crop from the bottom, where the native HUD strip sits. */
.highlight-card .highlight-player video:not([data-preview-anchor]) { object-position: center top; }
.highlight-card video[data-preview-anchor="left"] { object-position: left center; }
.highlight-card:hover > .highlight-player,
.harness-card:hover > .task-player,
.task-card:hover > .task-player { transform: translateY(-3px); box-shadow: var(--shadow-screen-hover); }
/* The four capabilities are numbered as in the overview figure (1 to 4). */
.highlight-grid { counter-reset: capability; }
.highlight-card { counter-increment: capability; }
.highlight-copy h3::before {
  content: counter(capability, decimal-leading-zero);
  content: counter(capability, decimal-leading-zero) / "";
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
}
.highlight-copy { display: flex; flex: 1; flex-direction: column; padding: 20px 0 0; }
.highlight-copy h3 { font-size: clamp(19px, 1.5vw, 22px); line-height: 1.25; letter-spacing: -.008em; }
.highlight-copy p { flex: 1; margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.7; text-wrap: balance; }
.highlight-copy > a {
  display: inline-block;
  align-self: flex-start;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.highlight-copy > a:hover { border-color: currentColor; }

/* The expand control is a small translucent pill over the recording. */
.highlight-expand {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgb(246 241 234 / 22%);
  border-radius: var(--r-pill);
  background: rgb(13 11 18 / 58%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #F6F1EA;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}
.highlight-expand:hover { background: rgb(13 11 18 / 82%); border-color: rgb(246 241 234 / 42%); }
.highlight-expand:focus-visible { outline-color: #F6F1EA; outline-offset: 2px; }
@media (hover: hover) {
  .highlight-expand { opacity: 0; transform: translateY(-3px); transition: opacity var(--dur-fast), transform var(--dur) var(--ease-out), background-color var(--dur-fast), border-color var(--dur-fast); }
  :is(.highlight-card, .harness-card, .task-card):hover .highlight-expand,
  :is(.highlight-player, .task-player):focus-within .highlight-expand,
  .is-started > .highlight-expand { opacity: 1; transform: none; }
}
.screen-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.screen-play-icon {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgb(246 241 234 / 92%);
  box-shadow: 0 0 0 1px rgb(13 11 18 / 8%), 0 10px 28px -10px rgb(0 0 0 / 70%);
  transition: transform var(--dur) var(--ease-out), background-color var(--dur-fast);
}
.screen-play-icon::before { content: ""; position: absolute; top: 50%; left: 50%; margin: -8px 0 0 -5px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #0D0B12; }
.screen-play:hover .screen-play-icon { transform: scale(1.06); background: #FFFFFF; }
.screen-play:focus-visible { outline: 2px solid #F6F1EA; outline-offset: -5px; }
.is-started > .screen-play, #demo-zoom-host .screen-play, #highlight-zoom-host .screen-play { display: none; }
.task-player .screen-play-icon { width: 42px; height: 42px; }
.task-player .screen-play-icon::before { margin: -6.5px 0 0 -4px; border-width: 6.5px 0 6.5px 10.5px; }
.media-notice { position: absolute; z-index: 2; bottom: 52px; left: 12px; right: 12px; padding: 8px 12px; border-radius: var(--r-chip); background: rgb(13 11 18 / 82%); color: #F6F1EA; font-size: 11.5px; line-height: 1.5; }

.harness-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 24px); margin-top: clamp(28px, 3vw, 44px); }
.harness-card { min-width: 0; scroll-snap-align: start; }
.harness-card h4 { margin: 14px 0 0; font-size: 17px; line-height: 1.3; letter-spacing: -.005em; }

.task-player { position: relative; overflow: hidden; aspect-ratio: 3414 / 1920; border-radius: var(--r-screen); background: var(--screen); }
.task-player video { width: 100%; height: 100%; object-fit: contain; }
.harness-card > .task-player, .task-card > .task-player { box-shadow: var(--shadow-screen); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.task-player .highlight-expand { min-height: 26px; padding: 4px 9px; top: 8px; right: 8px; font-size: 11px; letter-spacing: .06em; }

/* Task rows (inside Bench): two families, six conditions. */
.demo-section { max-width: none; }
.method-results { margin: clamp(56px, 6vw, 88px) 0 0; scroll-margin-top: 96px; }
.method-results .chapter-heading { margin-bottom: clamp(24px, 2.6vw, 36px); }
.method-results .chapter-heading p { margin-top: 10px; font-size: 15px; }
.task-row + .task-row { margin-top: clamp(28px, 3vw, 40px); }
.task-row > h4, .condition-row > h4 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.task-row > h4::after, .condition-row > h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.task-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.task-card { min-width: 0; scroll-margin-top: 100px; }
.task-copy { padding-top: 12px; }
.task-copy h5 { margin: 0 0 2px; min-height: 2.6em; font-size: 16px; line-height: 1.3; }
.task-copy select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-height: 34px;
  padding: 4px 20px 6px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background-color: transparent;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 8px) 55%, calc(100% - 3px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  cursor: pointer;
}
.task-copy select:hover { color: var(--ink); border-color: var(--accent); }
.task-copy select:focus-visible { outline-offset: 2px; }
.demo-footnote { max-width: var(--measure); margin-top: 22px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }

/* ------------------------------------------------------------- Infra film */
.infra-original { margin-bottom: clamp(28px, 3vw, 40px); }
.infra-film { position: relative; overflow: hidden; border-radius: var(--r-plate); background: var(--mat); box-shadow: var(--shadow-plate); }
.infra-film video { display: block; width: 100%; aspect-ratio: 16 / 9; }
.infra-film video:not([controls]) { cursor: pointer; }
.infra-rail { display: flex; align-items: center; margin-top: 18px; }
.infra-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px 22px 12px 18px;
  border-radius: var(--r-pill);
  background: var(--film-ink);
  color: var(--film-ivory);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .02em;
}
.infra-play::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 5.5px 0 5.5px 9px; border-color: transparent transparent transparent currentColor; }
.infra-play:hover { background: var(--brand-purple); }
:root[data-theme="dark"] .infra-play { background: var(--film-ivory); color: var(--film-ink); }
:root[data-theme="dark"] .infra-play:hover { background: #FFFFFF; }
.infra-play:focus-visible { outline-color: var(--accent); }
.infra-play[hidden] { display: none; }
.infra-chapters { display: flex; gap: 6px 28px; margin: 18px 0 0; overflow-x: auto; box-shadow: inset 0 -1px 0 var(--line); }
.infra-chapters button { flex: none; min-height: 44px; padding: 8px 0 10px; border-bottom: 1.5px solid transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.infra-chapters button:hover { color: var(--ink); }
.infra-chapters button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); }
.infra-chapters button:focus-visible { outline-offset: -2px; }
.media-provenance { max-width: 82ch; margin-top: 16px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.architecture-detail { margin-top: 28px; }
.architecture-detail summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 2px;
  border-block: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}
.architecture-detail summary::-webkit-details-marker { display: none; }
.architecture-detail summary::after, .resources summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur) var(--ease-out);
}
.architecture-detail[open] summary::after, .resources details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.architecture-detail summary:hover { color: var(--accent); }
.architecture-detail figure { margin-top: 24px; }
.infra-transcript ol { max-width: 72ch; margin: 26px 0 8px; padding-left: 22px; }
.infra-transcript li { margin: 0 0 16px; padding-left: 10px; color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }
.infra-transcript li::marker { color: var(--accent); font-family: var(--font-display); font-size: 16px; }
.infra-transcript strong { color: var(--ink); font-weight: 650; }

/* ------------------------------------------------------------------ Bench */
/* Four facts read as a specification row: serif figures over small labels. */
.benchmark-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 clamp(44px, 5vw, 64px);
  padding: 0;
  border-block: 1px solid var(--line-strong);
}
.benchmark-facts > div { display: flex; align-items: baseline; gap: 14px; min-width: 0; padding: 22px clamp(12px, 2vw, 28px); }
.benchmark-facts > div:first-child { padding-left: 0; }
.benchmark-facts > div + div { border-left: 1px solid var(--line); }
.benchmark-facts dt {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.025em;
  font-variant-numeric: lining-nums;
  word-spacing: -.12em;
  white-space: nowrap;
}
.benchmark-facts dd { max-width: 17ch; color: var(--ink-2); font-size: 14px; font-weight: 550; line-height: 1.45; text-wrap: balance; }
#curation { margin-top: clamp(72px, 8vw, 120px); }

/* ---------------------------------------------------------- Episode browser */
.episode-browser { margin: clamp(72px, 8vw, 120px) 0 0; }
.episode-heading p { margin-top: 10px; font-size: 15px; color: var(--muted); }
.condition-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 24px 0 clamp(28px, 3vw, 40px); border-bottom: 1px solid var(--line); }
#condition-navigation { display: flex; width: 100%; justify-content: space-between; gap: 24px; overflow-x: auto; padding: 0; flex-wrap: nowrap; }
#condition-navigation button { flex-shrink: 0; min-height: 48px; padding: 10px 0 12px; margin-bottom: 0; border-bottom: 1.5px solid transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
#condition-navigation button:hover { color: var(--ink); }
#condition-navigation button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); }
#condition-navigation button:focus-visible { outline-offset: -2px; }
#condition-description { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.condition-row + .condition-row { margin-top: clamp(32px, 3.4vw, 44px); }
.condition-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; overflow-x: auto; position: relative; scroll-snap-type: x proximity; padding-bottom: 4px; overscroll-behavior-x: contain; }
.condition-card { min-width: 0; scroll-snap-align: start; }
.condition-preview {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-plate);
  background: var(--map-ground);
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.condition-preview:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-strong), 0 16px 30px -18px rgb(29 25 35 / 45%); }
.condition-card.is-selected .condition-preview { box-shadow: 0 0 0 1.5px var(--accent), 0 16px 30px -18px rgb(29 25 35 / 40%); }
.condition-preview:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.condition-map { aspect-ratio: 1; }
.condition-map svg { display: block; width: 100%; height: auto; }
.condition-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgb(251 249 245 / 90%);
  color: #1D1923;
  box-shadow: 0 0 0 1px rgb(29 25 35 / 8%);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: .01em;
  text-align: left;
}
/* The JS writes a ↗ glyph; it is replaced by the shared maximize icon. */
.condition-expand {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgb(251 249 245 / 92%);
  box-shadow: 0 0 0 1px rgb(29 25 35 / 10%);
  color: transparent;
  font-size: 0;
  opacity: .9;
  transition: opacity var(--dur-fast);
}
.condition-expand::before { content: ""; position: absolute; inset: 0; background: #1D1923; -webkit-mask: url("assets/icons/arrows-maximize.svg") center / 13px no-repeat; mask: url("assets/icons/arrows-maximize.svg") center / 13px no-repeat; }
.condition-preview:hover .condition-expand { opacity: 1; }
.condition-card h5 { margin: 14px 0 4px; font-size: 16px; line-height: 1.3; }
.condition-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }

/* Occupancy routes and authored episode maps (vector data on native floor plans). */
.bev-floor { opacity: .9; }
.bev-route-halo { stroke: #fff; stroke-width: 19; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.bev-route { stroke: #785797; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.return-route { stroke-dasharray: 18 19; }
.bev-marker circle, .bev-marker ellipse { fill: #73558d; stroke: white; stroke-width: 6; }
.bev-marker text { fill: white; font-size: 24px; font-weight: 700; font-family: Manrope, sans-serif; }
.bev-marker.person circle, .bev-marker.person ellipse { fill: #fafafa; stroke: #514a5b; stroke-width: 4; }
.bev-marker.person text { fill: #514a5b; font-size: 23px; }
.bev-marker.target circle { fill: #fafafa; stroke: #73558d; stroke-width: 4; }
.bev-marker.target text { fill: #73558d; }
.bev-marker.event circle, .bev-marker.event ellipse { fill: #fcfaff; stroke: #73558d; stroke-dasharray: 6 5; stroke-width: 3; }
.bev-marker.event text { fill: #73558d; }
.bev-target circle { fill: #785797; stroke: white; stroke-width: 4; }
.bev-robot circle { fill: #785797; stroke: white; stroke-width: 5; }
.bev-robot path { fill: #785797; stroke: white; stroke-width: 3; stroke-linejoin: round; }
.bev-route.planned-route { stroke-width: 7; }
.bev-route-halo.planned-route { stroke-width: 14; opacity: .95; }
.bev-route.planned-route.return-route { stroke: #a38db5; stroke-width: 5; stroke-dasharray: 13 12; }
.bev-route-halo.planned-route.return-route { stroke-width: 8; stroke-dasharray: none; }
.bev-direction { fill: none; stroke: #634779; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.recorded-route { stroke-width: 6; }
.bev-route-halo.recorded-route { stroke-width: 11; }
.semantic-route { stroke-dasharray: 9 15; stroke-width: 5; }
.bev-route-halo.semantic-route { stroke-width: 11; }
.episode-dag svg { width: 100%; height: auto; display: block; }
.dag-edge { fill: none; stroke: #b9abca; stroke-width: 1.6; color: #9a86ae; }
.dag-node circle { fill: #f3eef7; stroke: #76588e; stroke-width: 1.8; }
.dag-node.event circle { fill: #fff; stroke-dasharray: 4 3; }
.dag-icon { fill: none; stroke: #65467e; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dag-number { fill: #76588e; font: 600 15px Manrope, sans-serif; }
.dag-label { fill: #645d6a; font: 500 14px Manrope, sans-serif; }

/* --------------------------------------------------------------- Dialogs */
dialog { color: var(--ink); }
.demo-zoom {
  width: min(96vw, 1720px);
  max-width: none;
  max-height: 96dvh;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--r-dialog);
  background: var(--film-ink);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgb(246 241 234 / 10%), 0 40px 120px rgb(0 0 0 / 50%);
}
.demo-zoom::backdrop, .episode-detail::backdrop, .story-dialog::backdrop {
  background: rgb(10 8 14 / 78%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.demo-zoom-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px 16px 26px; }
.demo-zoom-header h3 { font-size: clamp(18px, 1.6vw, 22px); }
.demo-zoom-header button, .episode-detail-close {
  flex-shrink: 0;
  min-height: 36px;
  padding: 7px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.demo-zoom-header button:hover, .episode-detail-close:hover { background: var(--selected); border-color: var(--accent); }
#demo-zoom-host video, #highlight-zoom-host video { max-height: calc(96dvh - 100px); object-fit: contain; }
.demo-zoom-open { overflow: hidden; }
.highlight-zoom { width: min(96vw, 1280px); }
#highlight-zoom-host .highlight-player { border-radius: 0; width: min(100%, 1180px); max-height: calc(96dvh - 100px); margin: auto; }
#highlight-zoom-host .highlight-player video { object-fit: contain; object-position: center; }
#highlight-zoom-host .highlight-expand, #demo-zoom-host .highlight-expand { display: none; }
#highlight-zoom-host video { display: block; }
#demo-zoom-host .task-player { aspect-ratio: 3414 / 1920; max-height: 72dvh; margin-inline: auto; border-radius: 0; }
.task-expanded-copy { display: grid; gap: 12px; max-width: 1000px; padding: 24px 26px 28px; }
.task-expanded-copy p { color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.task-expanded-copy p:first-child { color: var(--ink); font-family: var(--font-display); font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; }
.task-expanded-copy a { font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid transparent; }
.task-expanded-copy a:hover { border-color: currentColor; }
.demo-detail-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 6px; }

.episode-detail {
  width: min(1080px, calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
  padding: clamp(24px, 3vw, 40px);
  border: 0;
  border-radius: var(--r-dialog);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 40px 120px rgb(10 8 14 / 40%);
}
.episode-detail-close { position: sticky; top: 0; float: right; z-index: 2; margin: 0 0 12px 12px; background: var(--surface); }
.episode-condition { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.episode-detail h3 { margin: 10px 72px 0 0; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; }
.episode-stage { display: grid; grid-template-columns: 1.1fr 1fr; gap: 42px; align-items: start; padding-top: 28px; }
.episode-detail .episode-stage { grid-template-columns: 1fr 1fr; gap: clamp(24px, 3vw, 40px); }
.episode-copy, .episode-map-pane { min-width: 0; }
.episode-map-pane { overflow: hidden; border-radius: var(--r-plate); background: var(--map-ground); box-shadow: 0 0 0 1px var(--line); }
.episode-map { padding: 0 18px; }
.episode-map svg { width: 100%; height: auto; display: block; }
.map-legend { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 14px 20px 18px; color: var(--muted); font-size: 11px; }
.map-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.route-key { width: 22px; border-top: 2px solid #785797; }
.return-key { border-top-style: dashed; }
.episode-copy h4 { margin: 9px 0 18px; font-size: clamp(22px, 2.4vw, 29px); line-height: 1.3; }
.episode-detail .episode-copy h4 { margin: 26px 0 12px; font-size: 18px; }
.episode-detail .episode-copy > p { color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.episode-copy blockquote { margin: 0; padding: 2px 0 2px 16px; border-left: 1px solid var(--line-strong); color: var(--ink-2); font-family: var(--font-display); font-style: italic; font-size: 16px; line-height: 1.7; }
.episode-dag { max-width: 450px; margin: 10px auto 0; padding: 10px; border-radius: var(--r-plate); background: #FFFFFF; box-shadow: 0 0 0 1px var(--line); }
.episode-dag-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.episode-detail .episode-dag-heading h4 { margin: 0; }
.episode-dag-heading span { color: var(--muted); font-size: 11px; }
.episode-detail .episode-copy .episode-guards { margin: 12px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.episode-download { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.episode-download a { font-weight: 650; text-decoration: none; }
.episode-download a:hover { text-decoration: underline; }
.episode-detail .episode-download { margin-top: 26px; }
.episode-detail > .media-provenance { margin-top: 24px; }

/* The opening story dialog, when present, uses the film stage. */
.story-dialog { width: min(94vw, 1680px); max-width: none; max-height: 94dvh; padding: 0; overflow: auto; border: 0; border-radius: var(--r-dialog); background: var(--film-ink); color: var(--film-ivory); }
html.story-open { overflow: hidden; }

/* -------------------------------------------------------- Closing sections */
.resources { max-width: var(--content); margin: 0 auto; }
.contribute-section { padding: var(--section-space) 0 clamp(56px, 6vw, 88px); }
.contribute-intro { max-width: none; }
.contribute-intro h2 { max-width: 15ch; }
.contribute-intro::before { margin-bottom: clamp(32px, 3.4vw, 48px); padding-top: 22px; border-top: 1px solid var(--line-strong); }
.contribute-intro h2 { font-size: clamp(40px, 5.2vw, 76px); line-height: 1.02; letter-spacing: -.022em; }
.contribute-intro > p { max-width: 58ch; margin-top: 26px; color: var(--ink-2); font-size: clamp(16px, 1.25vw, 18.5px); line-height: 1.7; }
.contribution-directions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); margin-top: clamp(48px, 5vw, 72px); }
.contribution-directions article { min-width: 0; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.contribution-directions h3 { font-size: clamp(21px, 1.7vw, 25px); }
.contribution-directions p { margin-top: 12px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.contribute-contact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-top: clamp(56px, 6vw, 88px);
  padding: 28px 0;
  border-block: 1px solid var(--line-strong);
}
.contribute-contact p { color: var(--ink-2); font-family: var(--font-display); font-style: italic; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; }
.contribute-contact a {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.2;
  letter-spacing: -.01em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(107 74 138 / 40%);
  text-underline-offset: 7px;
  overflow-wrap: anywhere;
}
:root[data-theme="dark"] .contribute-contact a { text-decoration-color: rgb(199 174 226 / 40%); }
.contribute-contact a:hover { color: var(--accent-strong); text-decoration-color: currentColor; }

#citation { padding: clamp(40px, 4vw, 56px) 0 var(--section-space); }
#citation h2 { font-size: clamp(28px, 2.6vw, 38px); }
.resources > p { max-width: var(--measure); margin-top: 14px; color: var(--muted); font-size: 15px; }
.resources details { margin-top: 28px; padding: 0 clamp(18px, 2.4vw, 32px); border-radius: var(--r-plate); background: var(--surface); box-shadow: var(--shadow-plate); }
.resources summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; }
.resources summary::-webkit-details-marker { display: none; }
.resources summary:hover { color: var(--accent); }
.copy-citation { min-height: 34px; padding: 6px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); color: var(--ink); font-size: 12px; font-weight: 600; }
.copy-citation:hover { background: var(--selected); border-color: var(--accent); }
#copy-status { padding-left: 12px; color: var(--accent); font-size: 12px; }
pre { margin: 18px 0 26px; padding-top: 18px; border-top: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); font-size: 12.5px; line-height: 1.85; }

/* The film stage returns as the colophon. */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding: 44px max(var(--gutter), calc((100% - var(--content)) / 2));
  background: var(--film-ink);
  color: var(--ink);
}
footer > a:first-child { display: block; }
.footer-logo { width: 156px; height: auto; margin-left: -9px; }
:root[data-theme="dark"] footer { box-shadow: inset 0 1px 0 rgb(246 241 234 / 8%); }
footer p { color: var(--muted); font-family: var(--font-display); font-style: italic; font-size: 15px; }
footer > a:last-child { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
footer > a:last-child:hover { color: var(--ink); }

/* ------------------------------------------------------------------ Motion */
/* One entrance: headings, plates and screens rise gently as they arrive. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .reveal-pending { opacity: 0; transform: translateY(22px); }
  .reveal-visible { opacity: 1; transform: none; transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); }
}

/* ------------------------------------------------------------- Breakpoints */
@media (max-width: 1279px) {
  .header-inner { gap: 20px; }
  #main-navigation { gap: 22px; }
  .lab-brand { width: 214px; }
  .brand-lockup { gap: 14px; }
}
@media (max-width: 1100px) {
  .task-grid { grid-template-columns: repeat(6, 232px); overflow-x: auto; padding-bottom: 18px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  .task-card { scroll-snap-align: start; }
}
@media (max-width: 1023px) {
  .header-inner { gap: 12px; }
  .lab-brand { width: 174px; }
  #main-navigation { gap: 10px; }
  .producer-zju span { display: none; }
  .table-hint { display: block; margin: 0 0 14px; color: var(--muted); font-size: 12px; }
  .chapter > .chapter-heading { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 18px; overflow-x: auto; padding-bottom: 20px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  .highlight-card { scroll-snap-align: start; }
  .benchmark-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benchmark-facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .benchmark-facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .hero-copy { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .hero h1, .hero-publication, .hero-actions { grid-column: 1; grid-row: auto; }
  .hero-statement { max-width: 35em; }
}
@media (max-width: 900px) {
  .condition-grid { grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: 14px; padding-bottom: 14px; }
  .harness-grid { grid-template-columns: repeat(4, minmax(240px, 72vw)); overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  #condition-description { display: none; }
  .contribution-directions { grid-template-columns: 1fr; gap: 0; }
  .contribution-directions article { padding-block: 20px 24px; }
}
@media (max-width: 767px) {
  html { scroll-padding-top: 84px; }
  .header-inner { min-height: 60px; padding-inline: 20px; gap: 10px; flex-wrap: wrap; }
  .brand-lockup { gap: 10px; }
  .producer-zju img { width: 28px; height: 28px; }
  .lab-brand { width: 166px; }
  .brand-divider { height: 18px; }
  .theme-control, .menu-toggle { min-height: 44px; min-width: 56px; padding: 6px 12px; font-size: 11.5px; }
  .menu-toggle { display: block; }
  #main-navigation { display: none; flex: 0 0 100%; order: 4; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 12px; }
  #main-navigation.is-open { display: flex; }
  #main-navigation a { min-height: 46px; padding: 10px 2px; border-top: 1px solid var(--line); font-size: 15px; }
  #main-navigation a[aria-current="location"]::after { top: 50%; bottom: auto; left: auto; right: 2px; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%); }
  main { padding-inline: 20px; }
  :root { --gutter: 20px; }

  .hero-stage { min-height: 0; padding: 44px 0 64px; }
  .hero-play { min-height: 44px; gap: 9px; padding: 5px 16px 5px 5px; font-size: 13px; }
  .hero-play-icon { width: 32px; height: 32px; }
  .hero-play-icon::before { top: 10px; left: 12.5px; }
  .hero-copy { row-gap: 20px; }
  .hero h1, .hero-publication, .hero-actions { grid-column: 1; grid-row: auto; }
  .hero-statement { font-size: clamp(25px, 6.8vw, 32px); line-height: 1.2; }
  .hero-publication { gap: 12px; }
  .hero-publication .author-list { gap: 2px 16px; font-size: 13.5px; }
  .university-lockup { gap: 10px 22px; }
  .university-lockup a { font-size: 12.5px; gap: 8px; }
  .university-lockup img { width: 26px; height: 26px; }
  .university-lockup a + a { padding-left: 0; border-left: 0; }
  .hero-actions { width: 100%; max-width: 420px; padding-top: 6px; }
  .hero-resources { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .hero-resource { flex: 1; min-width: 0; min-height: 44px; gap: 7px; padding: 8px 10px; font-size: 12.5px; }
  .hero-resource img { width: 21px; height: 21px; }
  .hero-resource .resource-arxiv { width: 34px; height: 17px; }
  .hero-resource .resource-github { width: 19px; height: 19px; }
  .hero-resource .resource-project { width: 21px; height: 21px; }

  .abstract-section { padding-block: 10px 56px; }
  .abstract-body { font-size: 16px; line-height: 1.75; text-align: start; -webkit-hyphens: manual; hyphens: manual; }
  .teaser-section { padding-top: 72px; padding-bottom: 64px; }
  .teaser-heading { margin-bottom: 36px; }
  .teaser-heading::before { margin-bottom: 20px; }
  .teaser-heading h2 { font-size: clamp(32px, 9vw, 40px); }
  .teaser-heading p { font-size: 15.5px; margin-top: 18px; }
  .highlight-section { padding-block: 32px 44px; }
  .highlight-section > .highlight-intro { font-size: 22px; margin-bottom: 24px; }
  .highlight-grid { grid-template-columns: repeat(4, minmax(270px, 82vw)); gap: 16px; }
  .highlight-copy { padding-top: 16px; }

  .chapter { padding-top: 88px; }
  .chapter > .chapter-heading { margin-bottom: 32px; padding-top: 18px; }
  .chapter > .chapter-heading::before { margin-bottom: 18px; }
  .chapter > .chapter-heading p { font-size: 15.5px; margin-top: 16px; }
  h2 { font-size: clamp(32px, 8.6vw, 40px); }
  .method-block { margin-top: 72px; }
  .method-heading { margin-bottom: 24px; }
  .method-heading::before { margin-bottom: 14px; }
  .method-heading h3 { font-size: 32px; }
  .method-heading p { font-size: 18px; margin-top: 8px; }
  .benchmark-facts > div { flex-direction: column; gap: 8px; padding-block: 18px; }
  .benchmark-facts dt { font-size: 40px; }
  .benchmark-facts dd { font-size: 12.5px; }
  .task-grid { grid-template-columns: repeat(6, minmax(250px, 78vw)); gap: 16px; }
  .table-scroll { padding: 12px; }
  .table-notes, .demo-footnote, .media-provenance { font-size: 12px; }
  .infra-play { min-height: 42px; padding: 10px 18px 10px 15px; font-size: 12px; }
  .infra-chapters { gap: 4px 22px; }
  .highlight-expand, .task-copy select, .infra-chapters button,
  .demo-zoom-header button, .episode-detail > button, .copy-citation { min-height: 44px; }

  .demo-zoom-header { padding: 12px 14px 12px 18px; gap: 12px; }
  .demo-zoom-header h3 { font-size: 15px; }
  .demo-zoom-header button { max-width: 120px; padding-inline: 12px; font-size: 11px; line-height: 1.25; }
  .task-expanded-copy { padding: 18px; }
  .episode-stage, .episode-detail .episode-stage { grid-template-columns: 1fr; gap: 26px; }
  .episode-copy { padding-inline: 2px; }

  .contribute-section { padding-top: 88px; }
  .contribute-intro h2 { font-size: clamp(36px, 10vw, 46px); }
  .contribute-intro > p { font-size: 15.5px; margin-top: 20px; }
  .contribute-contact { margin-top: 48px; }
  .resources details { padding-inline: 18px; }
  pre { font-size: 11px; }

  footer { flex-wrap: wrap; gap: 16px; padding-block: 32px; }
  .footer-logo { width: 136px; }
  footer p { order: 3; width: 100%; font-size: 14px; }
  footer > a:last-child { margin-left: auto; }
}
@media (max-width: 600px) {
  .episode-detail { padding: 24px 18px; }
  .episode-detail h3 { font-size: 23px; }
  #condition-navigation { gap: 18px; }
  .university-lockup a + a { padding-left: 0; border-left: 0; }
}
@media (max-width: 374px) {
  .header-inner { padding-inline: 14px; gap: 8px; }
  .brand-lockup { gap: 8px; }
  .lab-brand { width: 132px; }
  .hero-play { gap: 7px; padding-right: 12px; font-size: 12px; }
  .hero-resources { gap: 6px; }
  .hero-resource { padding-inline: 8px; gap: 5px; font-size: 11.5px; }
  .hero-resource img { width: 19px; height: 19px; }
  .hero-resource .resource-arxiv { width: 30px; height: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-pending { opacity: 1; transform: none; }
  a.figure-image:hover, .condition-preview:hover,
  .highlight-card:hover > .highlight-player, .harness-card:hover > .task-player, .task-card:hover > .task-player { transform: none; }
}
@media (forced-colors: active) {
  a.figure-image, .table-scroll, .highlight-player, .task-player, .condition-preview { border: 1px solid CanvasText; }
}

/* Benchmark catalogue: the existing paper, type and route palette at readable scale. */
.episode-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; }
.episode-heading p { margin-bottom:0; }
.explore-all-episodes { flex-shrink:0; padding:12px 0; color:var(--accent); font-size:14px; font-weight:650; text-decoration:none; border-bottom:1px solid var(--accent); }
.explore-all-episodes span { margin-left:20px; }
.explorer-filters label, .episode-detail-selectors label { color:var(--muted); font-size:12px; font-weight:600; }
.explorer-filters select, .episode-detail-selectors select { width:100%; min-height:44px; padding:10px 32px 10px 12px; border:1px solid var(--line-strong); border-radius:var(--r-chip); background:var(--surface); color:var(--ink); font:500 13px var(--font-text); }
.episode-gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:38px 28px; }
.episode-gallery .condition-map { aspect-ratio:1.16; overflow:hidden; display:grid; align-items:center; }
.episode-gallery .condition-map svg { width:100%; height:100%; }
.episode-gallery .condition-badge { top:14px; left:14px; padding:5px 10px; font-size:11px; }
.episode-gallery .condition-expand { bottom:14px; right:14px; }
.episode-gallery .episode-card-context { margin:16px 0 5px; font-size:10px; letter-spacing:.07em; text-transform:uppercase; }
.episode-gallery .condition-card h5 { margin:0 0 8px; font-family:var(--font-display); font-size:25px; font-weight:500; }
.episode-gallery .episode-card-caption { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:3.2em; font-size:13px; }
.episode-compare-link { display:inline-block; margin-top:12px; min-height:32px; color:var(--accent); font-size:12px; font-weight:600; text-underline-offset:4px; text-decoration-color:var(--line-strong); }
.episode-compare-link:hover { text-decoration-color:currentColor; }
.episode-map-error { display:block; padding:48px 20px; color:var(--muted); font:13px var(--font-text); }
.episode-detail-selectors { display:grid; grid-template-columns:1.1fr 1fr 1fr; gap:12px; margin-top:24px; }
.episode-detail-selectors label { display:grid; gap:7px; }
.episode-events details { border-bottom:1px solid var(--line); padding:12px 0; }
.episode-events summary { cursor:pointer; font-size:12px; line-height:1.6; }
.episode-events p, .episode-events blockquote { margin:10px 0; font-size:12px; line-height:1.65; }
.episode-events > p { color:var(--muted); }
.episode-guards ul { padding-left:16px; margin:0; }
.episode-guards li + li { margin-top:6px; }
.episode-retry { padding:12px; margin-top:16px; border:1px solid var(--line-strong); border-radius:4px; }
.explorer-header { display:flex; align-items:center; justify-content:space-between; gap:24px; width:min(var(--content),calc(100% - var(--gutter)*2)); margin:0 auto; padding:24px 0; border-bottom:1px solid var(--line); }
.explorer-brand { color:var(--ink); font-size:21px; letter-spacing:-.04em; font-weight:700; text-decoration:none; }
.explorer-brand span { color:var(--accent); font-family:var(--font-display); font-style:italic; font-weight:400; margin-left:6px; }
.explorer-header > div { display:flex; align-items:center; gap:24px; }
.explorer-back { color:var(--muted); font-size:12px; text-decoration:none; }
.explorer-main { padding-inline:0; max-width:var(--content); margin:0 auto; width:calc(100% - var(--gutter)*2); }
.explorer-intro { padding:72px 0 52px; }
.explorer-kicker { color:var(--accent); font-size:12px; letter-spacing:.09em; text-transform:uppercase; }
.explorer-intro h1 { margin:18px 0 24px; font-family:var(--font-display); font-weight:400; font-size:clamp(44px,6vw,76px); line-height:1.03; letter-spacing:-.045em; }
.explorer-intro > p:last-child { color:var(--muted); font-size:15px; line-height:1.85; }
.explorer-filters { display:flex; align-items:flex-end; gap:16px; padding:24px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.explorer-filters label { flex:1; display:grid; gap:10px; min-width:0; }
.explorer-filters button { min-height:44px; padding:10px 0 10px 12px; font-size:12px; color:var(--accent); white-space:nowrap; }
.explorer-result-heading { display:flex; align-items:baseline; justify-content:space-between; gap:24px; padding:30px 0 22px; }
.explorer-result-heading h2 { margin:0; font-size:15px; font-weight:600; line-height:1.6; scroll-margin-top:20px; }
.explorer-result-heading p { max-width:52ch; margin:0; font-size:12px; line-height:1.7; color:var(--muted); }
.episode-pagination { display:flex; align-items:center; justify-content:center; gap:32px; margin:48px 0; }
.episode-pagination button { min-height:44px; padding:10px 18px; border:1px solid var(--line-strong); border-radius:4px; font-size:13px; }
.episode-pagination button:disabled { opacity:.4; cursor:default; }
.episode-pagination span { font-size:12px; color:var(--muted); }
.explorer-provenance { max-width:92ch; margin:48px auto 72px; text-align:center; }
.explorer-footer { display:flex; justify-content:space-between; gap:24px; padding:28px var(--gutter); font-size:11px; }
@media(max-width:900px) {
  .episode-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:30px 20px; }
  .episode-heading { align-items:flex-start; flex-direction:column; gap:12px; }
  .explorer-result-heading { flex-direction:column; gap:8px; }
}
@media(max-width:600px) {
  .episode-gallery { grid-template-columns:1fr; }
  .episode-gallery .condition-map { aspect-ratio:1.15; }
  .episode-gallery .episode-compare-link { min-height:44px; padding-top:8px; }
  .episode-detail-selectors { grid-template-columns:1fr 1fr; }
  .episode-detail-selectors label:first-child { grid-column:1/-1; }
  .explorer-header { padding:18px 0; }
  .explorer-header > div { gap:14px; }
  .explorer-back { max-width:9ch; line-height:1.4; }
  .explorer-intro { padding:48px 0 32px; }
  .explorer-intro h1 { font-size:42px; }
  .explorer-filters { flex-wrap:wrap; gap:14px; }
  .explorer-filters label { flex-basis:calc(50% - 14px); }
  .explorer-filters label:first-child { flex-basis:100%; }
  .explorer-filters button { padding-left:0; }
  .explorer-footer { flex-wrap:wrap; }
  .explorer-footer span { order:3; width:100%; }
}
.episode-detail .episode-copy .episode-condition-note { margin-top:12px; padding-left:12px; border-left:2px solid var(--accent-2); color:var(--accent-2); font-size:12px; }
