:root {
  --bg: #ffffff;
  --ink: #222222;
  --muted: #5f6368;
  --faint: #8a8f96;
  --key: #2f5597;
  --key-dark: #23427a;
  --key-soft: #e8eef8;
  --ff: #d9643a;
  --sfm: #8a8a8a;
  --hybrid: #a676b2;
  --video: #c89450;
  --part-a: #3e7cb1;
  --part-b: #d9643a;
  --line: #e3e5e8;
  --line-strong: #d0d3d8;
  --soft: #f6f7f9;
  --font: "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --head: "Google Sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--key); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 2px solid var(--key); outline-offset: 2px;
}
[hidden] { display: none !important; }
.wrap { width: min(1040px, calc(100% - 48px)); margin-left: auto; margin-right: auto; }
.wrap.narrow { width: min(820px, calc(100% - 48px)); }

/* Title block */
.title-block { text-align: center; padding: 56px 0 8px; }
h1 { margin: 0; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.method-name { color: var(--key); }
.authors { margin-top: 22px; display: flex; justify-content: center; gap: 6px 24px; flex-wrap: wrap; font-size: 18px; }
.authors a, .authors span { color: var(--key); }
.authors sup { font-size: 11px; margin-left: 1px; color: var(--ink); }
.affiliations { margin: 10px auto 0; font-size: 14.5px; color: var(--muted); line-height: 1.7; }
.venue { margin: 8px 0 0; font-size: 15px; font-weight: 600; }
.venue:empty { display: none; }
.resource-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.button {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 20px; font-size: 15px;
  background: #2b2f36; color: #fff; border: 1px solid #2b2f36;
}
.button:hover { background: #000; text-decoration: none; }
.button.disabled { background: transparent; color: var(--faint); border-color: var(--line-strong); pointer-events: none; }
.button.disabled span { font-size: 12px; }

/* Sections */
section { margin-top: 48px; }
section:first-of-type { margin-top: 28px; }
/* A rule between sections, the same width whatever the section's own column width. */
main > section + section::before {
  content: ""; display: block; height: 1px; background: var(--line); margin: 0 0 44px 50%;
  width: min(1040px, calc(100vw - 48px)); transform: translateX(-50%);
}
h2 { font-size: 26px; line-height: 1.3; font-weight: 700; margin: 0 0 14px; text-align: center; }
h3 { line-height: 1.4; }
h1, h2, h3 { font-family: var(--head); }
.lead { max-width: 820px; margin: 0 auto 22px; font-size: 15.5px; line-height: 1.7; text-align: justify; hyphens: auto; }
.abstract p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.7; text-align: justify; hyphens: auto; }
.figure-note { max-width: 820px; margin: 8px auto 0; font-size: 13px; color: var(--muted); text-align: center; }

/* Teaser */
.teaser { margin: 0; }
.hero-stage { position: relative; height: clamp(280px, 44vw, 480px); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fafbfc; }
.hero-stage canvas { display: block; opacity: 0; transition: opacity 0.6s; }
.teaser.ready canvas { opacity: 1; }
.hero-chip { position: absolute; left: 14px; top: 12px; z-index: 2; pointer-events: none; }
.hero-step { font: 500 12.5px/1 var(--mono); color: var(--ink); background: #ffffffe6; border: 1px solid var(--line); border-radius: 4px; padding: 7px 10px; display: inline-block; }
.hero-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.hero-progress i { display: block; height: 100%; width: 0; background: var(--key); }
.teaser figcaption { display: flex; gap: 16px; align-items: baseline; justify-content: space-between; font-size: 13.5px; color: var(--muted); margin-top: 10px; text-align: left; }
.hero-controls { display: flex; gap: 14px; flex: none; }
.hero-controls button { border: 0; background: none; color: var(--key); font-size: 13.5px; padding: 0; white-space: nowrap; }
.hero-controls button:hover { text-decoration: underline; }
.hero-stage canvas { cursor: grab; touch-action: pan-y; }
.hero-stage canvas:active { cursor: grabbing; }
.teaser.no-webgl .hero-stage { display: none; }

.flow { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 0.7fr 1fr 1.8fr 1fr; gap: 30px; }
.flow li {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; container-type: inline-size;
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px 11px; text-align: center; background: #fff;
  box-shadow: 0 1px 2px #1f2a3a0d; transition: border-color 0.3s, box-shadow 0.3s, opacity 0.3s; opacity: 0.6;
}
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -23px; top: 50%; width: 15px; height: 1.5px; background: #8f959e; }
.flow li:not(:last-child)::before { content: ""; position: absolute; right: -26px; top: 50%; margin-top: -4.5px; border-left: 7px solid #8f959e; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.flow li[data-state="done"] { opacity: 1; }
.flow li[data-state="active"] { opacity: 1; border-color: var(--key); box-shadow: 0 0 0 3px var(--key-soft); }
.flow strong { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.flow li > span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.flow .flow-value { font: 12px var(--mono); color: var(--ink); min-height: 17px; }
/* Fixed line heights inside the blocks, so they keep their size while methods and values change. */
.flow li { height: 128px; }
.flow li > span, .flow .flow-value { height: 18px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; flex: none; }
.flow-grid, .flow-loop, .flow-photos { flex: none; }
.flow-method b { font-weight: 600; color: var(--muted); }
.flow-method b[data-chosen="true"] { color: var(--ff); }
.flow-photos { position: relative; width: 96px; height: 50px; margin: 2px 0; }
.flow-photos i { position: absolute; top: 4px; left: 50%; width: 60px; height: 40px; margin-left: -30px; border: 2px solid #fff; border-radius: 3px; box-shadow: 0 1px 3px #1f2a3a40; background-repeat: no-repeat; }
.flow-photos i:nth-child(1) { transform: translateX(-17px) rotate(-8deg); }
.flow-photos i:nth-child(3) { transform: translateX(17px) rotate(8deg); }
.flow-grid { display: grid; grid-template-columns: repeat(17, 7px); gap: 2px; justify-content: center; min-height: 34px; align-content: center; }
.flow-grid i { width: 7px; height: 7px; border-radius: 1.5px; background: #e3e5e8; transition: background 0.25s; }
.flow-loop { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; justify-content: center; min-height: 34px; max-width: 100%; }
/* The loop row shrinks with its block instead of running out of it. */
@container (max-width: 330px) { .flow-loop { gap: 3px; } .flow-loop b { font-size: 10.5px !important; padding: 2px 4px !important; } .flow-inner { gap: 2px !important; padding: 3px 4px !important; } }
@container (max-width: 268px) { .flow-loop > u, .flow-inner u { display: none; } .flow-loop b { font-size: 10px !important; padding: 2px 3px !important; } }
.flow-inner { transition: border-color 0.35s, box-shadow 0.35s; display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--line-strong); border-radius: 6px; padding: 3px 5px; }
.flow-loop b { font-size: 11.5px; font-weight: 500; border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 6px; background: #fff; color: var(--ink); white-space: nowrap; transition: border-color 0.35s, box-shadow 0.35s; }
.flow-loop > b[data-state="active"], .flow-inner[data-state="active"] { border-color: var(--key); border-style: solid; box-shadow: 0 0 0 3px #2f559733, 0 0 10px #2f559755; }
.flow-loop u { text-decoration: none; color: #8f959e; font-size: 13px; }
.flow-rounds { display: flex !important; align-items: center; gap: 8px; justify-content: center; width: 100%; }
.flow-bar { flex: 1; max-width: 150px; height: 6px; border-radius: 3px; background: #d9dce1; overflow: hidden; }
.flow-bar i { display: block; height: 100%; width: 0; background: var(--key); }
.flow-rounds em { font: 12px var(--mono); font-style: normal; color: var(--muted); white-space: nowrap; }
.tagline { text-align: center; font-size: 17px; line-height: 1.6; color: var(--ink); margin: 0 auto 22px; max-width: 760px; }
.teaser-body { position: relative; }
.flow-results {
  position: absolute; right: 12px; bottom: 15px; z-index: 2; width: 318px; padding: 10px 12px 8px; pointer-events: none;
  background: #ffffffeb; border: 1px solid var(--line); border-radius: 6px; opacity: 0; transition: opacity 0.5s;
}
.flow-results[data-visible="true"] { opacity: 1; }
.res-title { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; }
.res-title span { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.res-row { display: grid; grid-template-columns: 74px 1fr 92px; align-items: center; gap: 8px; height: 22px; opacity: 0; transition: opacity 0.4s; }
.res-row[data-shown="true"] { opacity: 1; }
.res-row b { font-size: 12.5px; font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.res-row b i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.res-track { position: relative; height: 12px; }
.res-track::before { content: ""; position: absolute; left: 0; right: 0; top: 5.5px; height: 1px; background: var(--line-strong); }
.res-line { position: absolute; top: 4.5px; height: 3px; left: var(--s); width: 0; background: #2f559766; border-radius: 2px; transition: width 0.9s ease; }
.res-start, .res-end { position: absolute; top: 2px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; }
.res-start { left: var(--s); background: #fff; border: 1.6px solid var(--muted); }
.res-end { left: var(--s); background: var(--key); opacity: 0; transition: left 0.9s ease, opacity 0.3s; }
.res-row[data-shown="true"] .res-line { width: calc(var(--e) - var(--s)); }
.res-row[data-shown="true"] .res-end { left: var(--e); opacity: 1; }
.res-row em { font: 11.5px var(--mono); font-style: normal; color: var(--muted); text-align: right; white-space: nowrap; }
.res-row em strong { color: var(--key); font-weight: 600; }
.hero-thumbs { position: absolute; inset: 52px 7% 26px; z-index: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; align-content: center; pointer-events: none; }
.hero-thumbs i { display: block; border-radius: 3px; border: 1px solid var(--line-strong); background-repeat: no-repeat; opacity: 0; will-change: transform, opacity; }

/* Viewer shell (round player, explorer, chunking) */
.viewer-shell { border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: #fff; }
.viewer-topbar { min-height: 46px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); gap: 12px; background: var(--soft); }
.scene-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.scene-tabs button { border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; color: var(--ink); font-size: 13.5px; padding: 4px 12px; cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.scene-tabs button:hover { border-color: var(--key); color: var(--key); }
.scene-tabs .tab-group { align-self: center; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); padding: 0 4px 0 2px; }
.scene-tabs.grouped { flex-direction: column; align-items: stretch; gap: 6px; }
.scene-tabs .tab-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.scene-tabs.grouped .tab-group { width: 128px; flex: none; color: var(--muted); }
.scene-tabs button[aria-pressed="true"] { background: var(--key); border-color: var(--key); color: #fff; }
.phase-strip { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.phases { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
.phase { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 3px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.phase + .phase::before { content: ""; width: 26px; height: 1px; background: var(--line-strong); margin: 0 10px; }
.phase i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); font: 500 11px/18px var(--mono); text-align: center; color: var(--muted); background: #fff; flex: none; }
.phase:hover span { color: var(--key); }
.phase[data-state="done"] i { border-color: var(--key); color: var(--key); }
.phase[data-state="active"] { color: var(--ink); font-weight: 600; }
.phase[data-state="active"] i { background: var(--key); border-color: var(--key); color: #fff; }
.phase em { font: 400 11.5px var(--mono); color: var(--muted); min-width: 92px; text-align: left; }
.scene-name { font-size: 13.5px; font-weight: 600; padding: 4px 4px; }
.viewer-top-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.point-viewer { height: 470px; position: relative; overflow: hidden; background: #fafbfc; }
.point-viewer.tall { height: 540px; }
.point-viewer canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.point-viewer canvas:active { cursor: grabbing; }
.viewer-message { position: absolute; z-index: 3; top: 45%; left: 50%; transform: translate(-50%, -50%); max-width: 85%; background: #fff; border: 1px solid var(--line); padding: 10px 16px; border-radius: 4px; font-size: 13.5px; text-align: center; color: var(--muted); }
.viewer-hint { position: absolute; pointer-events: none; bottom: 10px; right: 12px; font-size: 11.5px; white-space: nowrap; color: var(--faint); }
.scene-overlay { position: absolute; z-index: 1; left: 14px; top: 12px; pointer-events: none; }
.small-badge { font-size: 12px; color: var(--muted); }
.scene-overlay h3 { font-size: 15px; margin: 0 0 1px; font-weight: 600; }
.scene-overlay p { font-size: 12px; color: var(--muted); margin: 0; }
.viewer-toolbar { padding: 9px 14px; background: var(--soft); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px 20px; flex-wrap: wrap; color: var(--ink); }
.toolbar-group { display: flex; gap: 6px 18px; align-items: center; flex-wrap: wrap; min-width: 0; }
.viewer-toolbar button { border: 0; background: transparent; font-size: 13px; color: var(--key); padding: 2px 0; white-space: nowrap; }
.viewer-toolbar button:hover { text-decoration: underline; }
.viewer-toolbar .fullscreen { font-size: 16px; line-height: 1; text-decoration: none; }
.camera-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.camera-toggle input, .point-size-label input { accent-color: var(--key); }
.point-size-label { font-size: 13px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.point-size-label input { width: 70px; }
.viewer-shell:fullscreen { display: flex; flex-direction: column; border: 0; border-radius: 0; }
.viewer-shell:fullscreen .point-viewer { height: auto; flex: 1; }
.error-legend { display: flex; align-items: center; gap: 7px; font: 11.5px var(--mono); color: var(--muted); }
.error-legend .ramp { width: 86px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #3f7cc8, #e2a62b 50%, #cd3e2c); }
.error-legend .legend-label { font-family: var(--font); font-size: 13px; margin-right: 3px; }

/* Round player */
.player-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; }
.player-side { background: #fff; border-left: 1px solid var(--line); display: grid; grid-template-rows: repeat(4, 1fr); }
.stat-tile { padding: 11px 16px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.stat-tile:last-child { border-bottom: 0; }
.stat-tile > span { font-size: 12.5px; color: var(--muted); }
.stat-tile b { font: 500 20px/1.35 var(--mono); font-variant-numeric: tabular-nums; }
.sparkline { width: 100%; height: 34px; margin-top: auto; overflow: visible; }
.stat-tile small { font-size: 11.5px; color: var(--faint); line-height: 1.3; }
.tick-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tick-legend i { display: inline-block; width: 2px; border-radius: 1px; }
.tick-legend i.tri { height: 14px; background: var(--ff); }
.tick-legend i.inner { height: 9px; background: #b5b9c0; margin-left: 8px; }
.step-caption { position: absolute; z-index: 2; left: 14px; top: 12px; max-width: min(430px, calc(100% - 28px)); pointer-events: none; background: #ffffffeb; border: 1px solid var(--line); border-radius: 4px; padding: 7px 11px; }
.step-caption strong { display: block; font-size: 13px; line-height: 1.5; font-weight: 600; }
.step-caption span { display: block; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.timeline-slot { background: var(--soft); border-top: 1px solid var(--line); min-height: 74px; }
.timeline { display: flex; align-items: center; gap: 14px; padding: 28px 20px 12px 14px; }
.tl-play { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #2b2f36; position: relative; }
.tl-play:hover { background: #000; }
.tl-play::before { content: ""; position: absolute; left: 13px; top: 10px; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.tl-play[data-state="pause"]::before { left: 11px; top: 10px; width: 4px; height: 14px; border: 0; border-left: 4px solid #fff; border-right: 4px solid #fff; }
.tl-play[data-state="replay"]::before { content: "↺"; border: 0; color: #fff; font-size: 18px; left: 8.5px; top: 2px; }
.tl-track { position: relative; flex: 1; height: 22px; cursor: pointer; touch-action: none; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: #d9dce1; }
.tl-fill { position: absolute; left: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--key); pointer-events: none; }
.tl-head { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--key); pointer-events: none; }
.tl-tick { position: absolute; top: 6px; width: 2px; height: 10px; margin-left: -1px; background: #b5b9c0; border-radius: 1px; pointer-events: none; }
.tl-tick.triangulate { top: 2px; height: 18px; background: var(--ff); }
.tl-tick.init { top: 2px; height: 18px; background: var(--ink); }
.tl-tick.chunks { top: 2px; height: 18px; background: var(--ink); }
.tl-tick.round_end { background: var(--key); }
.tl-band { position: absolute; top: -20px; height: 46px; pointer-events: none; border-left: 1px dashed var(--line-strong); }
.tl-band span { position: absolute; left: 5px; top: 0; font-size: 11.5px; line-height: 1; color: var(--muted); white-space: nowrap; }

/* Explorer */
.method-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 9px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.method-bar-label { font-size: 13px; color: var(--muted); margin-right: 6px; }
.method-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); background: #fff; border-radius: 4px; padding: 4px 11px 4px 9px; font-size: 13px; color: var(--ink); }
.method-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--sfm); }
.method-chip.kind-ff i { background: var(--ff); }
.method-chip.kind-ours i { background: var(--key); }
.method-chip.kind-hybrid i { background: var(--hybrid); }
.method-chip.kind-gt i { background: var(--ink); }
.method-chip:hover { border-color: var(--ink); }
.method-chip[aria-pressed="true"] { background: #2b2f36; border-color: #2b2f36; color: #fff; }
.method-readout { position: absolute; z-index: 2; right: 12px; top: 12px; width: 270px; pointer-events: none; background: #ffffffeb; border: 1px solid var(--line); border-radius: 4px; padding: 10px 13px; }
.readout-kind { font-size: 12px; color: var(--muted); }
.method-readout strong { display: block; font-size: 14.5px; margin: 0 0 6px; }
.method-readout dl { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin: 0; font-size: 12.5px; }
.method-readout dt { color: var(--muted); white-space: nowrap; }
.method-readout dd { margin: 0; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.method-readout p { display: none; }

/* Reserve room for the parts that load later, so the page does not jump. */
#round-player { min-height: 690px; }
#explorer { min-height: 690px; }
#pipeline { min-height: 470px; }
#chunk-demo { min-height: 640px; }
#sequence-player { min-height: 690px; }
#gain { min-height: 500px; }

/* Diagrams */
.diagram-card { border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; overflow: hidden; }
.diagram-scroll { overflow-x: auto; }
.diagram-scroll svg { display: block; width: 100%; min-width: 820px; height: auto; }
.diagram-footer { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--soft); }
.diagram-caption { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; }
.diagram-caption strong { font-weight: 600; margin-right: 10px; }
.step-buttons { display: flex; gap: 6px; flex: none; }
.step-buttons button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-size: 13px; line-height: 1; }
.step-buttons button:hover { border-color: var(--ink); }
.step-buttons button.primary { background: #2b2f36; border-color: #2b2f36; color: #fff; }
@keyframes node-pulse {
  0% { stroke-width: 4; stroke-opacity: 0.45; }
  100% { stroke-width: 16; stroke-opacity: 0; }
}
.pulse-ring.pulse { animation: node-pulse 0.5s ease-out; }
.paper-figure { margin-top: 12px; }
.paper-figure summary { cursor: pointer; font-size: 13.5px; color: var(--key); width: fit-content; }
.paper-figure img { display: block; width: 100%; height: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 12px; background: #fff; }
.paper-figure img.narrow { max-width: 620px; }

/* Chunking */
.chunk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; }
.chunk-side { border-left: 1px solid var(--line); background: #fff; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.chunk-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: step; }
.chunk-steps button { width: 100%; text-align: left; border: 1px solid transparent; background: none; border-radius: 4px; padding: 7px 9px; display: grid; grid-template-columns: 20px 1fr; gap: 2px 6px; color: var(--muted); }
.chunk-steps button::before { counter-increment: step; content: counter(step) "."; font-size: 13.5px; grid-row: span 2; }
.chunk-steps b { font-size: 13.5px; font-weight: 600; }
.chunk-steps span { font-size: 12.5px; line-height: 1.5; color: var(--muted); display: none; }
.chunk-steps button:hover { color: var(--ink); }
.chunk-steps button[aria-current="true"] { background: var(--soft); border-color: var(--line); color: var(--ink); }
.chunk-steps button[aria-current="true"] span { display: block; }
.chunk-side .step-buttons { align-items: center; margin-top: auto; }
.step-counter { font-size: 12.5px; color: var(--muted); margin-left: 8px; white-space: nowrap; }
.step-buttons button:disabled { opacity: 0.4; }
.strip-card { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.strip-card svg { display: block; width: 100%; height: auto; }

/* Results chart */
.gain-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; justify-content: center; }
.gain-tabs button { border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; color: var(--ink); font-size: 13px; padding: 4px 11px; }
.gain-tabs button:hover { border-color: var(--ink); }
.gain-tabs button[aria-pressed="true"] { background: #2b2f36; border-color: #2b2f36; color: #fff; }
.gain-card { border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; padding: 16px 18px 12px; }
.gain-card svg { display: block; width: 100%; height: auto; overflow: visible; }
.gain-grid { display: grid; gap: 26px; align-items: start; }
.gain-panel h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.gain-panel p { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.gain-legend { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 12px; align-items: center; justify-content: center; }
.gain-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.gain-legend .diamond { background: var(--muted); border-radius: 0; width: 8px; height: 8px; transform: rotate(45deg); }
.gain-replay { border: 0; background: none; color: var(--key); font-size: 12.5px; margin-left: auto; padding: 0; }
.gain-replay:hover { text-decoration: underline; }

/* Qualitative results */
.qual-body { display: flex; flex-direction: column; gap: 22px; }
.qual-scene { overflow-x: auto; }
.qual-grid { display: grid; gap: 5px 6px; align-items: center; min-width: 620px; }
.qual-grid > b { font-size: 13px; font-weight: 600; text-align: center; line-height: 1.3; padding-bottom: 1px; }
.qual-row { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11.5px; color: var(--muted); text-align: center; justify-self: center; white-space: nowrap; }
.qual-row.strong { color: var(--ink); font-weight: 600; }
.qual-panel { position: relative; border: 1px solid var(--line); background: #fff; line-height: 0; }
.qual-panel img { display: block; width: 100%; height: auto; }
.qual-auc { position: absolute; right: 3px; bottom: 3px; background: #ffffffe6; padding: 1px 4px; font: 10.5px/1.4 var(--mono); color: var(--ink); border-radius: 2px; }
.qual-auc.strong { font-weight: 600; color: var(--key); }
.qual-context { text-align: center; line-height: 1.2; }
.qual-context img { display: block; width: 78%; height: auto; margin: 0 auto 3px; }
.qual-context strong { font-size: 12.5px; font-weight: 600; }
.qual-more { display: block; margin: 14px auto 0; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; color: var(--ink); font-size: 13px; padding: 4px 14px; }
.qual-more:hover { border-color: var(--ink); }
.qual-caption { max-width: 900px; margin: 10px auto 0; font-size: 13px; line-height: 1.6; color: var(--muted); text-align: center; }

/* BibTeX and footer */
.citation-box { position: relative; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.citation-box button { position: absolute; top: 8px; right: 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; color: var(--ink); font-size: 12.5px; padding: 3px 10px; }
.citation-box button:hover { border-color: var(--ink); }
pre { font: 13px/1.65 var(--mono); overflow: auto; padding: 16px 18px; margin: 0; }
#copy-status { font-size: 13px; margin: 6px 0 0; color: var(--muted); }
#copy-status:empty { display: none; }
footer { margin-top: 48px; padding: 18px 0 36px; border-top: 1px solid var(--line); text-align: center; }
footer p { font-size: 12.5px; color: var(--faint); margin: 0; }
.skip-link { position: fixed; top: -100px; left: 15px; z-index: 100; background: #fff; padding: 10px; }
.skip-link:focus { top: 10px; }
.noscript { padding: 20px; text-align: center; }

@media (max-width: 1000px) {
  .flow { gap: 22px; grid-template-columns: 0.65fr 0.95fr 1.9fr 0.95fr; }
  .flow li { padding-left: 8px; padding-right: 8px; }
  .flow li:not(:last-child)::after { right: -17px; width: 11px; }
  .flow li:not(:last-child)::before { right: -19px; }
  .flow-grid { grid-template-columns: repeat(17, 6px) !important; }
  .flow-grid i { width: 6px; height: 6px; }
}
@media (max-width: 900px) {
  .player-grid { grid-template-columns: 1fr; }
  .player-side { border-left: 0; border-top: 1px solid var(--line); grid-template-rows: none; grid-template-columns: repeat(2, 1fr); }
  .stat-tile:nth-child(odd) { border-right: 1px solid var(--line); }
  .stat-tile:nth-child(3) { border-bottom: 0; }
  .chunk-grid { grid-template-columns: 1fr; }
  .chunk-side { border-left: 0; border-top: 1px solid var(--line); }
  .method-readout { position: static; width: auto; border-radius: 0; border-width: 1px 0 0; pointer-events: auto; }
  .point-viewer.tall { height: auto; display: flex; flex-direction: column; }
  .point-viewer.tall canvas { height: 420px !important; flex: none; }
}
@media (max-width: 760px) {
  .wrap, .wrap.narrow { width: calc(100% - 32px); }
  .title-block { padding-top: 36px; }
  .authors { font-size: 16px; gap: 4px 16px; }
  section { margin-top: 36px; }
  main > section + section::before { width: calc(100vw - 32px); margin-bottom: 34px; }
  h2 { font-size: 22px; }
  .lead, .abstract p { text-align: left; }
  .phases { flex-direction: column; align-items: flex-start; gap: 2px; }
  .phase + .phase::before { display: none; }
  .scene-tabs.grouped .tab-group { width: 100%; }
  .point-viewer { height: 380px; }
  .viewer-top-label, .viewer-hint { display: none; }
  .teaser figcaption { flex-direction: column; gap: 4px; }
  .flow-results { position: static; width: auto; margin-top: 8px; }
  .hero-thumbs { grid-template-columns: repeat(6, 1fr); inset: 48px 5% 20px; gap: 5px; }
  .tl-band span { font-size: 0; }
  .tl-band span::after { content: attr(data-n); font-size: 11px; }
  .diagram-footer { flex-wrap: wrap; }
}
/* The flow strip becomes a 2 x 2 grid before the rest of the page changes layout. */
@media (max-width: 860px) {
  .flow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .flow li { min-width: 0; height: 152px; }
  .flow-method { height: 34px !important; white-space: normal !important; line-height: 17px !important; }
  .flow-method b { display: block; }
  .flow-grid { grid-template-columns: repeat(17, 4px) !important; gap: 1.5px; }
  .flow-grid i { width: 4px !important; height: 4px !important; }
  .flow-loop b { font-size: 10.5px; padding: 2px 4px; }
  .flow-inner { flex-direction: column; gap: 3px; padding: 4px 6px; }
  .flow-inner u, .flow-loop > u { display: none; }
  .flow li::after, .flow li::before { display: none; }
  .flow li { padding: 8px 6px; }
  .flow-loop { flex-wrap: wrap; }
  .flow-grid { grid-template-columns: repeat(17, 5px); }
  .flow-grid i { width: 5px; height: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition: none !important; animation: none !important; }
}
