/* Roboto Slab, variable weight 100-900, self-hosted so the page makes no external request (Apache License 2.0, static/fonts/LICENSE.txt) */
@font-face { font-family: "Roboto Slab"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/roboto-slab-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Slab"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/roboto-slab-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto Slab"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/roboto-slab-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }

:root {
  --paper: #e2edf9;
  --surface: #fff;
  --accent: #0a6bc7;
  --accent-dark: #0355ac;
  --accent-deep: #07296a;
  --accent-wash: #e0eaf5;
  --ink: #252e38;
  --muted: #59626d;
  --line: #dadee4;
  --ui-font: "Roboto Slab", Georgia, serif;
  --button-blue: #4a8ad2;   /* the one fill for every blue button: Paper, Code, the pressed level and robot switch */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 85px; background: var(--paper); }
body { background: var(--paper); color: var(--ink); font-family: "Roboto Slab", Georgia, serif; font-size: 16px; line-height: 1.7; }
button, input, select { font: inherit; }
sub, sup { line-height: 0; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #2f8adc; outline-offset: 4px; }
/* Caret-browsing mode (F7) parks a blinking text cursor on the title a nav link scrolls to; keep it invisible outside editable fields */
body { caret-color: transparent; }
input, textarea, [contenteditable] { caret-color: auto; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 10px 20px; background: var(--accent); color: white; border-radius: 8px; }
.skip-link:focus { top: 10px; color: white; }
.container { max-width: 1290px !important; width: calc(100% - 64px); }
.reading-width { max-width: 1040px !important; }
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(226,237,249,.96); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(10,107,199,.1); }
.navbar { min-height: 74px; background: transparent; font-family: var(--ui-font); font-size: 16px; }
.navbar-brand { min-height: 74px; }
.brand { padding-left: 0; gap: 11px; color: var(--accent-dark); font-family: "Roboto Slab", Georgia, serif; font-size: 19px; font-weight: 600; letter-spacing: -.45px; }
.brand svg { overflow: visible; fill: var(--paper); stroke: var(--accent); stroke-width: 1.7; }
.navbar-end { gap: 22px; align-items: center; }
.navbar-item { color: #4f5d6e; }
.navbar-item:hover, .navbar-item:focus { color: var(--accent) !important; background: transparent !important; }
.navbar-end .navbar-item { padding: 10px 6px; gap: 8px; }
.navbar-burger { color: var(--accent-dark); border: 0; background: transparent; margin-top: 10px; }
.hero-body { padding: 68px 0 28px; }
h1 { color: var(--accent-deep); font-size: clamp(38px, 5vw, 64px); letter-spacing: -2.4px; line-height: 1.13; font-weight: 700; margin: 17px 0 14px; }
.hero-subtitle { color: var(--accent-deep); font-size: 29px; font-weight: 350; letter-spacing: -.6px; line-height: 1.4; }
.hero-description { color: var(--muted); font-family: var(--ui-font); font-size: 16px; line-height: 1.7; margin-top: 15px; }
.authors { margin-top: 28px; font-size: 20px; color: var(--accent-deep); }
.affiliations { font-family: var(--ui-font); font-size: 16px; color: var(--muted); margin-top: 4px; }
.todo-tag { display: inline-block; background: #eee9df; color: #7c6542; border: 1px solid #ded4c0; border-radius: 4px; padding: 1px 6px; margin-right: 6px; font-family: var(--ui-font); font-size: 9px; font-weight: 700; letter-spacing: .8px; vertical-align: 2px; white-space: nowrap; }
.todo-text { color: #887353; font-size: 9px; letter-spacing: .7px; margin-right: 5px; }
.publication-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.publication-links .button { height: 52px; padding: 0 22px; gap: 10px; border-radius: 7px; font-family: var(--ui-font); font-size: 18px; font-weight: 550; }
/* Paper and Code are not clickable during review: quiet, light, no shadow, so the eye goes to the rollouts button */
.resource-button[disabled] { opacity: 1; background: var(--button-blue); border: 1px solid var(--button-blue); color: #f3f8fe; box-shadow: none; cursor: default; }
.resource-button > span:last-child { color: #d9e8fa; font-size: 15px; letter-spacing: .4px; }
.resource-button svg { fill: none; stroke: currentColor; stroke-width: 1.3; width: 18px; height: 18px; }
.code-icon { font-family: monospace; }
.explore-button { color: var(--accent); border-color: #b5c7db; background: var(--surface); }
.explore-button:hover { background: var(--accent-wash); border-color: #8cabd0; color: var(--accent-dark); }
.figure-card { margin: 0; padding: 24px 26px 22px; border: 1px solid #d0dae6; background: #fff; box-shadow: 0 8px 35px #0355ac07; border-radius: 13px; }
.figure-card img { display: block; width: 100%; height: auto; }
/* One caption style for the figure cards and the viewers: each caption sits inside its card */
.figure-card figcaption, .viewer-shell > figcaption { font-family: var(--ui-font); font-size: 18px; line-height: 1.6; color: var(--muted); text-align: center; }
.figure-card figcaption { margin-top: 20px; }
.figure-card figcaption strong, .viewer-shell > figcaption strong { color: var(--accent-dark); font-weight: 600; }
/* A caption is worded to fill whole rows of a full-width card. In a narrower card its type shrinks with the card, down to
   16 px, so that it keeps the same rows */
.figure-card, .viewer-shell { container-type: inline-size; }
.figure-card figcaption { font-size: clamp(16px, 1.4564cqw, 18px); }
.viewer-shell > figcaption { font-size: clamp(16px, calc((100cqw - 52px) * .014564), 18px); }
.teaser { margin: 48px auto 0; }
.section { padding: 26px 0; }
.section-heading { margin-bottom: 29px; }
.section-heading h2 { color: var(--accent-dark); font-size: 38px; font-weight: 500; letter-spacing: -1px; line-height: 1.3; margin: 7px 0 12px; }
.section-heading > p:last-child { color: var(--muted); font-family: var(--ui-font); font-size: 15px; }
.abstract-section { padding-top: 24px; padding-bottom: 36px; }
.abstract-section .section-heading { text-align: center; margin-bottom: 28px; }
.abstract-copy { font-size: 20px; line-height: 1.8; text-align: left; }
.abstract-copy p + p { margin-top: 19px; }
.abstract-copy strong { font-weight: 600; color: var(--accent-dark); }
.pending-manuscript { text-decoration: underline dotted #ae8d4f; text-underline-offset: 5px; }
.source-note { font-family: var(--ui-font); font-size: 11px; line-height: 1.6; color: var(--muted); margin-top: 22px; }
.viewer-section { background: #eeeae5; border-block: 1px solid #e3dddF; padding: 48px 0 44px; }
.viewer-section .section-heading { margin-bottom: 30px; }
.viewer-shell { position: relative; margin: 0; overflow: hidden; background: var(--surface); border: 1px solid #c8d4e3; border-radius: 12px; box-shadow: 0 9px 30px #18283b05; }
/* Every viewer ends with room under it, so its caption needs none above; with scripting off the caption stands alone */
.viewer-shell > figcaption { padding: 0 26px 22px; }
.viewer-shell > :empty + figcaption { padding-top: 22px; }
.viewer-topbar { padding: 0 25px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.task-tabs { display: flex; gap: 28px; }
.task-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 19px 3px 16px; color: #5d6a7a; font-family: var(--ui-font); font-size: 15px; font-weight: 650; letter-spacing: .6px; }
.task-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.task-tabs button:hover { color: var(--accent); }
/* Play and pause: one icon button per viewer, in the viewers' button style. The script draws its glyph */
.viewer-shell .viewer-play { display: inline-grid; place-items: center; flex-shrink: 0; align-self: center; width: 36px; height: 36px; padding: 0; border: 1px solid #c8d4e3; border-radius: 6px; background: var(--surface); color: var(--accent-dark); }
.viewer-shell .viewer-play:hover { background: var(--accent-wash); border-color: #8cabd0; }
.viewer-play svg { width: 18px; height: 18px; fill: currentColor; }
/* In the rollouts bar the toggle is as tall as the level buttons beside it, at every width */
.viewer-shell .rollout-levels .viewer-play { width: 40px; height: auto; align-self: stretch; }
.data-badge { font-family: var(--ui-font); font-size: 10px; color: #786944; background: #f1eee4; border: 1px solid #e5dfce; border-radius: 20px; padding: 3px 10px; }
.data-badge.arrays { background: #e9f0ea; color: #3f6d4b; border-color: #d7e6d9; }
.joint-label-line { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.keyboard-hint { font-family: var(--ui-font); font-size: 10px; color: #7d8793; }
kbd { display: inline-block; padding: 0 4px; margin-right: 1px; border: 1px solid #d5dde6; border-radius: 3px; color: #5b6f88; font-size: 10px; }
.control-help { font-family: var(--ui-font); font-size: 10px; color: #747f8d; margin-top: 9px; }
.more-joints { display: flex; align-items: center; gap: 10px; font-size: 12px; font-family: var(--ui-font); margin-top: 12px; }
.more-joints select { max-width: 100%; border: 1px solid var(--line); padding: 7px; border-radius: 5px; background: white; color: var(--accent-dark); }
.canvas-controls { display: flex; flex-wrap: wrap; align-items: center; column-gap: 25px; row-gap: 13px; margin: 0 25px 18px; padding: 15px 17px; border-radius: 8px; background: #e8eef6; font-family: var(--ui-font); font-size: 11px; color: #48596e; }
.opacity-control { width: 175px; }
.opacity-control label { display: flex; justify-content: space-between; }
.opacity-control input { width: 100%; display: block; margin-top: 7px; }
input[type="checkbox"], input[type="range"] { accent-color: var(--accent); }
.check-control { display: flex; align-items: center; gap: 6px; }
.scale-legend { display: flex; align-items: center; gap: 8px; }
.color-ramp { height: 9px; width: 80px; display: inline-block; border-radius: 3px; background: linear-gradient(90deg,#000004,#3b0f70,#8c2981,#de4968,#fe9f6d,#fcfdbf); }
.canvas-controls .control-help { width: 100%; margin: 0; }
.pack-summary { padding: 0 25px 18px; font-family: var(--ui-font); }
#task-description { font-size: 12px; font-weight: 600; color: #385373; }
#pack-note { margin-top: 5px; font-size: 11px; color: #737f8e; line-height: 1.6; max-width: 1000px; }
.comparison-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding: 0 15px 6px; scrollbar-width: thin; scrollbar-color: #a8bed7 #edf3f9; }
.comparison-table { table-layout: fixed; width: 100%; min-width: 960px; border-collapse: separate; border-spacing: 10px 12px; font-family: var(--ui-font); line-height: 1.45; }
.comparison-table.four-frames { min-width: 760px; }
.comparison-table thead th { font-size: 10px; color: #58687b; vertical-align: bottom; font-weight: 600; text-align: left; padding: 0 0 2px; }
.comparison-table thead th:first-child { width: 170px; }
.comparison-table thead th span { display: block; color: #8694a4; font-size: 10px; font-weight: 400; margin-top: 2px; }
.comparison-table tbody th { text-align: left; vertical-align: middle; padding-right: 12px; font-weight: 400; }
.model-label { color: #3f4b5b; font-size: 12px; font-weight: 650; }
.model-bsp .model-label { color: var(--accent); }
.model-bsp .model-label::before { content: ""; display: inline-block; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; margin: 0 5px 2px 0; }
.model-kind { font-size: 10px; color: #607083; line-height: 1.5; margin-top: 7px; overflow-wrap: anywhere; }
.model-note { font-size: 9px; color: #6c7c8e; line-height: 1.5; margin-top: 5px; }
.map-cell { vertical-align: middle; padding: 0; }
.map-image, .map-canvas, .pending-card { display: block; width: 100%; aspect-ratio: 1; border-radius: 4px; }
.map-image { object-fit: contain; height: auto; background: #d2dae3; }
.map-canvas { height: auto; image-rendering: pixelated; cursor: crosshair; background: #e5ebf3; }
.pending-card { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; border: 1px dashed #d2dce7; background: #f3f5f9; color: #94a4b6; font-size: 11px; }
.pending-card svg { width: 20px; height: 20px; fill: none; stroke: #becad9; stroke-width: 1.1; }
.model-psi0 .pending-card { aspect-ratio: 1.65; }
.viewer-bottom { display: flex; justify-content: space-between; gap: 14px; padding: 15px 25px; border-top: 1px solid #e2e8f0; margin-top: 5px; font-family: var(--ui-font); font-size: 10px; color: #748498; }
.viewer-bottom a { white-space: nowrap; }
.patch-readout { padding: 12px 25px; font-size: 11px; font-family: monospace; color: #35557b; }
.scroll-hint { display: none; font-family: var(--ui-font); font-size: 10px; color: #728499; margin: 0 25px 8px; }
.scroll-hint span { margin-left: 5px; }
.viewer-caption { max-width: 950px; margin: 24px auto 0; font-family: var(--ui-font); font-size: 11px; line-height: 1.8; color: #788390; }
.viewer-caption p + p { margin-top: 8px; }
.viewer-caption strong { color: #536478; font-weight: 600; }
.view-modes { display: flex; gap: 6px; margin: 18px 25px; font-family: var(--ui-font); }
.view-modes button, .episode-button, .phase-chip { border: 1px solid #c8d4e3; border-radius: 6px; background: var(--surface); color: var(--accent-dark); padding: 8px 12px; font: inherit; cursor: pointer; }
.view-modes button { font-size: 12px; }
.view-modes button[aria-pressed="true"] { background: var(--button-blue); color: white; border-color: var(--button-blue); }
.episode-button:disabled, .phase-chip:disabled { opacity: .5; cursor: default; }
#continuous-viewer { position: relative; padding: 0 25px 20px; font-family: var(--ui-font); }
.episode-source { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.episode-transport { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }
.episode-readout { margin-left: 8px; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.episode-timeline { margin: 18px 7px 12px; }
.episode-scrubber { display: block; width: 100%; margin: 0; accent-color: var(--accent); cursor: pointer; }
.phase-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.phase-chip { font-size: 10px; padding: 5px 9px; }
.phase-chip[aria-current="true"] { background: #dbe9fa; border-color: #7597bf; }
.episode-status { min-height: 20px; font-size: 11px; color: #5c6a7a; margin-block: 10px; }
.episode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.episode-model { min-width: 0; }
.episode-model .model-label { min-height: 36px; }
.episode-media { position: relative; aspect-ratio: 1; background: #e4eaf0; border-radius: 6px; overflow: hidden; }
.episode-media .map-canvas, .episode-media .pending-card { width: 100%; height: 100%; aspect-ratio: 1; }
.episode-media .map-canvas { display: block; }
.episode-model .model-kind { font-size: 11px; }
.episode-model .model-note { font-size: 10px; }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: #536478; background: #e8eef6; }
.episode-pending { margin: 25px; padding: 28px; border: 1px dashed #c8d4e3; border-radius: 8px; color: #607083; text-align: center; }
@media (max-width: 800px) {
  .episode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  #continuous-viewer { padding-inline: 16px; }
  .view-modes { margin-inline: 16px; }
  .episode-readout { flex-basis: 100%; margin-left: 0; }
}
/* Five panels: one row when wide, 3 + 2 (centered) at medium widths, 2 + 2 + 1 on phones. */
.episode-grid.five-panels { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) {
  .episode-grid.five-panels { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 14px; }
  .episode-grid.five-panels > * { grid-column: span 2; }
  .episode-grid.five-panels > :nth-child(4) { grid-column: 2 / span 2; }
}
@media (max-width: 800px) {
  .episode-grid.five-panels { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 12px; }
  .episode-grid.five-panels > :nth-child(4) { grid-column: auto / span 2; }
  .episode-grid.five-panels > :nth-child(5) { grid-column: 2 / span 2; }
}
.marker-legend { display: flex; flex-wrap: wrap; gap: 25px; justify-content: center; margin-bottom: 14px; color: #596d83; font-size: 10px; }
.marker-legend span { display: flex; align-items: center; gap: 7px; }
.marker-legend i { font-style: normal; }
.outline-key { width: 10px; height: 10px; display: inline-block; border: 1.2px solid white; outline: 1px solid #acbac9; background: #6c7b8d; }
.acting-key { color: #19818e; font-size: 18px; line-height: 1; }
.other-key { color: #5c8428; font-size: 19px; line-height: 1; }
.subsection-title { color: var(--accent-dark); font-size: 26px; font-weight: 500; letter-spacing: -.4px; margin-bottom: 6px; }
.mechanism-section .subsection-title { margin-bottom: 16px; }
.subsection-title + .viewer-shell { margin-top: 16px; }   /* a viewer sits as far under its title in every section */
.real-world-title, .mechanism-section .container > .subsection-title { margin-top: 44px; }
.subsection-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; }
.subsection-bar .subsection-title { margin-bottom: 0; }
/* A figure set shows the figure of the checked choice; each choice needs its own line in the list below. Without :has() every figure stays visible and the switch is not shown. */
.figure-switch { display: none; gap: 6px; font-family: var(--ui-font); }
.figure-switch label { position: relative; }
.figure-switch span { display: block; cursor: pointer; }
.figure-switch :focus-visible + span { outline: 3px solid #2f8adc; outline-offset: 4px; }
.figure-set .figure-card + .figure-card { margin-top: 18px; }
@supports selector(:has(*)) {
  .figure-switch { display: flex; }
  .figure-set .figure-card + .figure-card { margin-top: 0; }
  .figure-set:not(:has([value="g1"]:checked)) [data-robot="g1"],
  .figure-set:not(:has([value="fetch"]:checked)) [data-robot="fetch"],
  .figure-set:not(:has([value="franka"]:checked)) [data-robot="franka"],
  .figure-set:not(:has([value="stretch"]:checked)) [data-robot="stretch"] { display: none; }
}
.real-world-title + .real-world-shell { margin-top: 14px; }
.rollout-grid.real-world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* two wide tiles; outranks the four-column grid rule below */
.real-world-desc { margin-top: 6px; line-height: 1.5; }
.rollout-topbar { gap: 20px; }
.rollout-topbar .task-tabs { overflow-x: auto; scrollbar-width: thin; }
.rollout-levels { display: flex; gap: 6px; flex-shrink: 0; font-family: var(--ui-font); }
.rollout-levels button, .figure-switch span { border: 1px solid #c8d4e3; border-radius: 6px; background: var(--surface); color: var(--accent-dark); padding: 7px 14px; font-size: 14px; }
.rollout-levels [data-level][aria-pressed="true"], .figure-switch :checked + span { background: var(--button-blue); border-color: var(--button-blue); color: white; }
.rollout-levels .viewer-play { margin-left: 8px; }
.rollout-caption { padding: 18px 25px 0; font-family: var(--ui-font); font-size: 16px; font-weight: 600; color: #385373; }
.rollout-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; padding: 16px 25px 24px; }
.rollout-tile { margin: 0; min-width: 0; }
.rollout-tile video, .rollout-pending { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: #e4eaf0; object-fit: cover; }
.rollout-tile.is-ours video { outline: 2px solid var(--accent); outline-offset: 2px; }
.rollout-pending { display: grid; place-items: center; border: 1px dashed #d2dce7; color: #94a4b6; font-family: var(--ui-font); font-size: 14px; }
.rollout-tile figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; font-family: var(--ui-font); font-size: 16px; }
.rollout-name { font-weight: 650; color: #3f4b5b; }
/* A linked name keeps its grey and carries a faint underline that turns blue under the pointer */
a.rollout-name, a.rollout-name:hover { color: #3f4b5b; text-decoration: underline; text-decoration-color: #c6d0dc; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.rollout-name:hover, a.rollout-name:focus-visible { text-decoration-color: var(--accent); }
.rollout-tile.is-ours .rollout-name { color: var(--accent); }
.rollout-badge { font-size: 13px; padding: 1px 10px; border: 1px solid; border-radius: 12px; white-space: nowrap; }
.rollout-badge.success { color: #3f6d4b; background: #e9f0ea; border-color: #d7e6d9; }
.rollout-badge.fail { color: #8a3b2e; background: #f6ebe8; border-color: #ead6d0; }
.rollout-count { font-family: var(--ui-font); font-size: 14px; color: var(--muted); margin-top: 2px; }
.sensitivity-player { position: relative; padding: 22px 25px 0; font-family: var(--ui-font); }
.sensitivity-player .episode-status, .denoising-player .episode-status { min-height: 22px; margin: 0; padding-top: 3px; font-size: 14px; line-height: 19px; }
/* One row per task: its name, BSP's three parts, a gap, two parts of the U-Net on the same tokens. The two head rows use the same columns. */
.sensitivity-grid { display: grid; gap: 14px; }
.sensitivity-row { display: grid; grid-template-columns: 150px repeat(3, minmax(0, 1fr)) 12px repeat(2, minmax(0, 1fr)); gap: 0 14px; align-items: center; }
.sensitivity-row.is-head { align-items: end; }
.sensitivity-row.is-head + .is-head { margin-top: -7px; }
.group-title.is-own { grid-column: span 3; }
.group-title.is-baseline { grid-column: -3 / -1; grid-row: 1; }
/* The play button heads the task names, on the group titles' line; its negative margins keep that line's height */
/* The toggle hangs at the card's top-right corner at the same offsets as the denoising toggle, out of the title row's flow */
.sensitivity-row.is-head .viewer-play { position: absolute; top: 14px; right: 25px; margin: 0; }   /* 1 px card border: lands at 15 / 26 */
.group-title, .series-name, .task-name { font-size: 16px; font-weight: 650; line-height: 1.4; color: #3f4b5b; }
.group-title.is-own, .series-name.is-ours { color: var(--accent); }
.sensitivity-panel { margin: 0; min-width: 0; }
.sensitivity-panel .map-canvas { cursor: default; }
.sensitivity-panel.is-ours .episode-media { outline: 2px solid var(--accent); outline-offset: 2px; }
.denoising-player { position: relative; padding: 18px 25px 0; font-family: var(--ui-font); }
/* The loop's title: the iteration on show. It keeps its line while the steps load. */
.denoising-title { min-height: 28px; margin-bottom: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 19px; line-height: 28px; color: #293543; text-align: center; }
/* The play button sits at the right end of the title's line; the title stays centred */
.denoising-head { position: relative; }
.denoising-head .viewer-play { position: absolute; top: 50%; right: 0; transform: translateY(-50%); }
/* The three models, then the demonstration. Names of different heights leave the panels level */
.denoising-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 18px; align-items: end; }
.denoising-panel { margin: 0; min-width: 0; }
.denoising-panel.is-ours .episode-media { outline: 2px solid var(--accent); outline-offset: 2px; }
.denoising-panel canvas { display: block; width: 100%; height: 100%; }
/* Four panels leave no room for a name and its pill side by side: the name takes a line and the pill the next */
.denoising-panel figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin-bottom: 10px; font-size: 16px; font-weight: 650; color: #3f4b5b; }
.denoising-name { padding-left: 26px; }
.denoising-panel.is-ours figcaption { color: var(--accent-dark); }
.denoising-pill { padding: 1px 10px; border: 1px solid #d7e0eb; border-radius: 12px; background: #eef2f6; color: #3f4b5b; font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.denoising-error .error-label { margin-right: 6px; color: #576574; }
/* No error before the steps load */
.denoising-error.is-off { visibility: hidden; }
/* One colour per model, shared by the key beside its name and its curve. Ours takes the darker accent, which stays
   apart from the left arm's blue in the panels. */
.arm-0 { color: var(--accent-dark); }
.arm-1 { color: #898781; }
.arm-2 { color: #52514e; }
/* The key is as tall as the name and hangs in its left padding, so a name that wraps stays aligned */
.arm-key { display: inline-block; width: 17px; height: 1em; margin: 0 9px 0 -26px; border-radius: 3px; background: currentColor; vertical-align: -.15em; }
/* The demonstration has no curve, so no key */
.denoising-panel.is-truth .denoising-name { padding-left: 0; }
.denoising-legend { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 16px; font-size: 15px; color: var(--muted); }
.denoising-legend i { display: inline-block; margin-right: 8px; vertical-align: middle; }
.key-line { width: 26px; height: 4px; border-radius: 2px; }
.key-line.is-next { height: 7px; background: #52514e; box-shadow: 0 0 0 1px #0b0b0b8c; }
.key-line.is-later { height: 3px; background: #52514e; opacity: .8; }
.key-line.is-demo { height: 3px; background: #fff; box-shadow: 0 0 0 1px #6d7987; }
.denoising-chart-title { margin-top: 20px; font-size: 15px; color: var(--muted); }
.denoising-chart { margin-top: 4px; }
/* The chart's script sets its margins from this font size */
.denoising-chart svg { display: block; width: 100%; overflow: visible; font-size: 13px; }
.denoising-chart text { font-family: var(--ui-font); fill: var(--muted); }
.denoising-chart .grid { stroke: #e3e9f0; }
.denoising-chart .axis { stroke: #abb8c8; }
.denoising-chart .curve { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.denoising-chart .curve.arm-0 { stroke-width: 2.8; }
.denoising-chart .curve-label { fill: currentColor; font-weight: 600; }
.denoising-chart .cursor { stroke: var(--accent-dark); opacity: .5; }
.denoising-chart .cursor-dot { fill: currentColor; stroke: var(--surface); stroke-width: 1.5; }
/* A press or a drag along the chart picks the iteration; a vertical swipe still scrolls the page */
.denoising-chart svg { cursor: pointer; touch-action: pan-y; }
.citation-section { padding: 40px 0 70px; }
.citation-heading { display: flex; align-items: center; justify-content: space-between; }
.citation-heading .section-heading { margin-bottom: 8px; }
.copy-button { border-radius: 5px; font-family: var(--ui-font); font-size: 10px; background: transparent; color: #4b698d; border-color: #becde0; }
.citation-note { font-family: var(--ui-font); font-size: 11px; color: #8493a5; margin-bottom: 18px; }
pre { background: #e5ebf3; color: #485d75; padding: 24px 28px; border-radius: 8px; font-size: 12px; line-height: 1.85; border: 1px solid #d1ddec; tab-size: 2; overflow-x: auto; }
.copy-status { font-family: var(--ui-font); font-size: 11px; color: #5b6e85; min-height: 18px; margin-top: 8px; }
.footer { border-top: 1px solid #d8e0eb; background: var(--paper); padding: 27px 0 33px; font-family: var(--ui-font); font-size: 14px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer p { color: #4e5e72; }
.footer-inner > div { display: flex; gap: 22px; }
.footer a { color: #576574; font-size: 14px; }
.noscript-message { padding: 20px; margin-top: 20px; border: 1px solid #bacbdf; border-radius: 8px; font-size: 16px; }
@media (max-width: 1100px) {
  .comparison-scroll { padding-inline: 6px; }
  .comparison-table thead th:first-child { width: 150px; }
  .scroll-hint { display: block; }
}
@media (max-width: 1023px) {
  .navbar-menu { background: var(--paper); box-shadow: none; padding: 0 0 15px; }
  .navbar-end .navbar-item { padding: 10px 5px; }
  .navbar-menu.is-active { border-top: 1px solid var(--line); }
  .rollout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .container { width: calc(100% - 36px); }
  .navbar, .navbar-brand { min-height: 61px; }
  .navbar-burger { margin-top: 4px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand svg { width: 23px; }
  .hero-body { padding-top: 43px; padding-bottom: 22px; }
  h1 { letter-spacing: -1.5px; margin-top: 16px; font-size: clamp(33px,7.4vw,46px); }
  .hero-subtitle { font-size: 22px; }
  .hero-description { font-size: 14px; margin-top: 13px; }
  .authors { margin-top: 22px; font-size: 17px; }
  .affiliations { font-size: 14px; }
  .publication-links { gap: 8px; }
  .publication-links .button { padding: 0 13px; height: 46px; font-size: 14px; gap: 7px; }
  .resource-button > span:last-child { font-size: 10px; }
  .figure-card { padding: 14px 12px; }
  .figure-card figcaption, .viewer-shell > figcaption { font-size: 15px; }
  .figure-card figcaption { margin-top: 14px; }
  .viewer-shell > figcaption { padding: 0 16px 14px; }
  .viewer-shell > :empty + figcaption { padding-top: 14px; }
  .teaser { margin-top: 33px; }
  .section { padding: 20px 0; }
  .abstract-section { padding-top: 18px; }
  .section-heading h2 { font-size: 30px; }
  .section-heading > p:last-child { font-size: 13px; }
  .abstract-copy { font-size: 17px; line-height: 1.75; }
  .source-note { font-size: 10px; }
  .viewer-section .section-heading { padding: 0 10px; }
  .viewer-topbar { padding: 0 16px; }
  .task-tabs { gap: 21px; }
  .task-tabs button { padding-block: 15px 12px; font-size: 13px; }
  .data-badge { font-size: 9px; padding: 3px 8px; }
  .control-help { font-size: 10px; }
  .canvas-controls { margin-inline: 16px; flex-direction: column; align-items: flex-start; }
  .opacity-control { width: 100%; }
  .pack-summary { padding: 0 16px 14px; }
  #pack-note { font-size: 10px; }
  .scroll-hint { margin-inline: 16px; }
  .comparison-table, .comparison-table.four-frames { min-width: calc(var(--frame-count,6) * 146px + 124px); border-spacing: 7px 12px; }
  .comparison-table thead th:first-child { width: 117px; }
  .comparison-table tr > th:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 6px 0 8px #fdfcf9; }
  .comparison-table tbody th { padding-right: 9px; }
  .model-label { font-size: 11px; }
  .model-kind, .model-note { font-size: 9px; }
  .viewer-bottom { padding: 12px 16px; font-size: 9px; align-items: center; }
  .viewer-caption { padding-inline: 9px; font-size: 10px; margin-top: 20px; }
  .marker-legend { gap: 15px; font-size: 9px; }
  .rollout-topbar { flex-direction: column; align-items: stretch; gap: 10px; padding-bottom: 12px; }
  .subsection-bar { margin-bottom: 14px; }
  .figure-switch { flex-basis: 100%; }
  .figure-switch label { flex: 1; text-align: center; }
  .rollout-caption { padding-inline: 16px; font-size: 14px; }
  .rollout-levels button, .figure-switch span { font-size: 13px; padding: 6px 11px; }
  .rollout-badge { font-size: 11px; padding: 1px 8px; }
  .rollout-count { font-size: 12px; }
  .rollout-grid { padding: 12px 16px 18px; gap: 14px 10px; }
  .rollout-grid.real-world-grid { grid-template-columns: 1fr; }
  .rollout-tile figcaption { flex-wrap: wrap; font-size: 13px; }
  .sensitivity-player { padding: 16px 16px 0; }
  .sensitivity-player .episode-status, .denoising-player .episode-status { min-height: 18px; }
  .sensitivity-row { grid-template-columns: repeat(3, minmax(0, 1fr)) 2px repeat(2, minmax(0, 1fr)); gap: 0 8px; }
  .sensitivity-row .task-name { grid-column: 1 / -1; margin-bottom: 6px; font-size: 14px; }
  .sensitivity-row.is-head .task-name { display: none; }
  .group-title { font-size: 13px; line-height: 1.35; }
  /* The names shrink with a very narrow screen, and the last one may reach left of its column rather than out of the card */
  .series-name { font-size: min(10px, 2.9vw); line-height: 1.35; }
  .series-name:last-child { justify-self: end; text-align: right; }
  .sensitivity-panel.is-ours .episode-media { outline-offset: 1px; }
  /* No column for the task names: the play button takes a line of its own above the group titles */
  .sensitivity-row.is-head .viewer-play { position: static; grid-column: 1 / -1; grid-row: 1; justify-self: end; margin: 0 0 6px; }
  .group-title.is-baseline { grid-row: 2; }
  .denoising-player { padding: 12px 16px 0; }
  .denoising-title { margin-bottom: 6px; font-size: 15px; }
  .denoising-legend { gap: 5px 16px; font-size: 13px; }
  .denoising-legend i { margin-right: 6px; }
  .key-line { width: 20px; }
  .denoising-chart-title { font-size: 13px; }
  .denoising-chart svg { font-size: 11px; }
  .viewer-shell .viewer-play { width: 32px; height: 32px; }
  .viewer-shell .rollout-levels .viewer-play { width: 34px; height: auto; }
  .viewer-play svg { width: 16px; height: 16px; }
  /* On a phone the four panels are two rows of two */
  .denoising-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .denoising-panel figcaption { gap: 3px; margin-bottom: 6px; font-size: min(13px, 3.1vw); }
  .denoising-name { padding-left: 17px; }
  .arm-key { width: 11px; margin: 0 6px 0 -17px; border-radius: 2px; }
  .denoising-panel.is-ours .episode-media { outline-offset: 1px; }
  .denoising-pill { padding-inline: 7px; font-size: min(12px, 3vw); }
  .subsection-title { font-size: 22px; }
  .sensitivity-player .episode-status, .denoising-player .episode-status { font-size: 12px; }
  .citation-section { padding-top: 15px; }
  pre { font-size: 10px; padding: 18px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 13px; }
  .footer-inner > div { gap: 22px; }
  .desktop-break { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
