/* Dynamic Shape Control project page. Same system as the SoftAE page; the model colours
   follow the paper's figures (aSSM #2ecc40, ERA #ff851b, DMDc #b10dc9, LOpInf #0f9baf).
   On white, aSSM and ERA use darker shades so marks keep 3:1 contrast; on the dark
   replay stage, DMDc and LOpInf use lighter ones. Every coloured mark also has a label. */
:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --paper-2: #efede6;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-2: #3b404a;
  --muted: #646a75;
  --line: #e3e0d8;
  --line-2: #cfcabf;
  --accent: #197a35;
  --accent-bright: #6fe07a;
  --assm: #2ecc40;
  --assm-ink: #26a734;
  --era: #ff851b;
  --era-ink: #ea6d00;
  --dmdc: #b10dc9;
  --dmdc-light: #c35ad6;
  --lopinf: #0f9baf;
  --lopinf-light: #22b8cc;
  --ppo: #3a68c9;
  --target: #f0e442;
  --stage: #131519;
  --night: #121418;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas, video { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
ol[role='list'], ul[role='list'] { list-style: none; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: #cdeccf; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.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; }
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 50; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 12px; }

/* Shared pieces */
.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); }
.dot-assm { --c: var(--assm-ink); }
.dot-era { --c: var(--era-ink); }
.dot-dmdc { --c: var(--dmdc); }
.dot-lopinf { --c: var(--lopinf); }
.kicker { font: 500 .75rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.eyebrow { display: flex; align-items: center; gap: 12px; font: 500 .75rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.eyebrow .num { color: var(--accent); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 7px; letter-spacing: 0; }
.fig-tag { display: inline-block; margin-right: 6px; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 4px; font: 500 .6875rem/1.5 var(--mono); letter-spacing: .02em; color: var(--ink-2); white-space: nowrap; vertical-align: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink); font: 600 .9375rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, transform .2s; }
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #2c3039; }
.btn-quiet { border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn-note { font: 500 .6875rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font: 600 .8125rem/1 var(--sans); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-group { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; cursor: pointer; }
.text-link:hover { text-decoration-color: var(--accent); }
.card, .platform-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.zoomable { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; }
.zoomable img { width: 100%; height: auto; border-radius: 8px; }
figcaption { font-size: .875rem; line-height: 1.6; color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(246, 245, 241, .86); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: calc(var(--maxw) + 2 * var(--gutter)); min-height: 68px; margin-inline: auto; padding-inline: var(--gutter); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 700 1.125rem/1 var(--sans); letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.wordmark b { color: var(--accent); font-weight: 700; }
.site-header nav { display: flex; gap: 28px; font-size: .9375rem; color: var(--ink-2); }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.institution-logos { display: flex; align-items: center; gap: 18px; }
.institution-logos a { display: block; }
.institution-logos a + a { padding-left: 18px; border-left: 1px solid var(--line-2); }
.institution-logos img { width: auto; height: 30px; }
.institution-logos a + a img { height: 26px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 64px); align-items: start; padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(48px, 6vw, 72px); }
.hero-copy { padding-top: 6px; }
.venue { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 500 .8125rem/1.4 var(--mono); letter-spacing: .04em; color: var(--ink-2); }
.venue-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--assm-ink); box-shadow: 0 0 0 4px rgba(38, 167, 52, .16); }
h1 { margin: 22px 0 22px; font: 500 clamp(2.5rem, 4.6vw, 4.35rem)/1.03 var(--serif); letter-spacing: -.022em; font-variation-settings: 'opsz' 72; text-wrap: balance; }
.lead { max-width: 36em; font-size: clamp(1.0625rem, 1.35vw, 1.1875rem); line-height: 1.6; color: var(--ink-2); }
.lead strong { color: var(--ink); }
.authors { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 26px 0 0; padding: 0; list-style: none; font-weight: 500; font-size: 1rem; }
.authors a { text-decoration-color: var(--line-2); }
.authors a:hover { text-decoration-color: var(--accent); }
.authors sup, .affiliations sup { margin-left: 1px; font: 500 .6875rem/1 var(--mono); color: var(--muted); }
.affiliation-logos { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 30px; margin: 20px 0 0; padding: 0; list-style: none; }
.affiliation-logos li { display: flex; align-items: flex-start; gap: 4px; }
.affiliation-logos sup { font: 500 .6875rem/1 var(--mono); color: var(--muted); }
/* Logos share a bottom line so the names under them line up. */
.aff { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: .8125rem; line-height: 1.3; text-decoration: none; }
.aff:hover { color: var(--ink); }
.aff-logo { display: flex; align-items: flex-end; height: 30px; opacity: .88; transition: opacity .2s; }
.aff:hover .aff-logo { opacity: 1; }
.aff-logo img { width: auto; }
.aff-srl { height: 26px; }
.aff-imes { height: 30px; }
.affiliations { margin-top: 12px; font-size: .875rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* Replay */
.explorer { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 48px -32px rgba(22, 24, 29, .28); }
.explorer-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 16px; margin: 2px 2px 14px; }
.explorer-title { margin-top: 6px; font: 600 1.1875rem/1.25 var(--sans); letter-spacing: -.01em; }
.explorer-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.explorer-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; background: var(--stage); }
.explorer-canvas { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.explorer-canvas:active { cursor: grabbing; }
.explorer-canvas:focus-visible { outline-offset: -3px; border-radius: 12px; }
.explorer-fallback { width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.stage-status { position: absolute; left: 12px; top: 10px; display: flex; flex-direction: column; gap: 2px; padding: 6px 10px 7px; border-radius: 8px; background: rgba(19, 21, 25, .72); color: #f2f1ec; pointer-events: none; }
/* Not uppercased: the model names (aSSM, LOpInf) are case-sensitive. */
.stage-method { font: 500 .6875rem/1.3 var(--mono); letter-spacing: .02em; color: #aeb3bc; }
.stage-value { font: 600 1rem/1.25 var(--sans); font-variant-numeric: tabular-nums; }
.stage-value.is-reached { color: var(--accent-bright); }
.explorer-hud, .hud-keys { position: absolute; pointer-events: none; font: 500 .75rem/1.3 var(--mono); color: #d7dae0; }
.hud-keys { top: 10px; right: 10px; display: inline-flex; flex-wrap: wrap; gap: 12px; padding: 5px 9px; border-radius: 6px; background: rgba(19, 21, 25, .72); }
.hud-keys > span { display: inline-flex; align-items: center; gap: 6px; }
.key-target { width: 11px; height: 11px; border: 2px solid var(--target); border-radius: 50%; }
.key-body { width: 9px; height: 9px; border-radius: 50%; background: var(--assm); box-shadow: 0 0 0 1.5px var(--stage), 0 0 0 2.5px rgba(255, 255, 255, .5); }
.explorer-hud { left: 10px; right: 10px; bottom: 10px; display: flex; }
.hud-time { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 2px 9px; border-radius: 6px; background: rgba(19, 21, 25, .72); }
.hud-time > span { flex: none; font-variant-numeric: tabular-nums; }
.hud-time b { font-weight: 500; color: #fff; }
/* A 24 px hit area around a 4 px track; --p is the played fraction, set by replay.js. */
.hud-scrub { flex: 1 1 auto; min-width: 0; height: 24px; margin: 0; background: transparent; cursor: pointer; pointer-events: auto; -webkit-appearance: none; appearance: none; }
.hud-scrub::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(#d7dae0, #d7dae0) 0 0 / calc(var(--p, 0) * (100% - 14px) + 7px) 100% no-repeat, #464b55; }
.hud-scrub::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5px; border: 2px solid var(--stage); border-radius: 50%; background: #fff; -webkit-appearance: none; appearance: none; }
.hud-scrub::-moz-range-track { height: 4px; border-radius: 2px; background: #464b55; }
.hud-scrub::-moz-range-progress { height: 4px; border-radius: 2px; background: #d7dae0; }
.hud-scrub::-moz-range-thumb { width: 10px; height: 10px; border: 2px solid var(--stage); border-radius: 50%; background: #fff; }
.explorer-targets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.targets-label { font: 500 .75rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chip-num { min-width: 32px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.drag-hint { margin-left: auto; font: 400 .75rem/1.3 var(--mono); color: var(--muted); }
.explorer-methods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.method-card { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 7px 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); text-align: left; cursor: pointer; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.method-card:hover { border-color: var(--line-2); }
.method-card[aria-pressed='true'] { border-color: var(--ink); background: var(--surface); box-shadow: inset 0 3px 0 var(--c, var(--ink)); }
.method-card[data-method='assm'] { --c: var(--assm-ink); }
.method-card[data-method='era'] { --c: var(--era-ink); }
.method-card[data-method='dmdc'] { --c: var(--dmdc); }
.method-card[data-method='lopinf'] { --c: var(--lopinf); }
.mini-wrap { position: relative; display: block; aspect-ratio: 1; margin-bottom: 4px; overflow: hidden; border-radius: 6px; background: var(--stage); }
.mini-view { position: absolute; inset: 0; width: 100%; height: 100%; }
.method-name { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 600; font-size: .875rem; line-height: 1.3; }
.method-name .dot { align-self: center; }
.method-name small { font: 500 .6875rem/1 var(--mono); color: var(--muted); }
.method-live { min-height: 1.35em; font: 500 .75rem/1.35 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.method-live.is-reached { color: var(--accent); }
.method-live.is-failed { color: var(--muted); }
.explorer-note { margin: 12px 2px 0; font-size: .8125rem; }

/* Key numbers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: 0 clamp(56px, 7vw, 88px); }
.stat { padding: 26px 26px 4px; border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat-value { font: 600 clamp(2.4rem, 4vw, 3.4rem)/1 var(--sans); letter-spacing: -.035em; }
.stat-label { max-width: 22em; margin-top: 12px; font-size: .9375rem; line-height: 1.55; color: var(--muted); }
.stat-open { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.stat-open .stat-value, .stat-open .stat-label { display: block; }
.stat-open .stat-value { transition: color .2s; }
.stat-open:hover .stat-value { color: var(--accent); }
.stat-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font: 500 .75rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.stat-open:hover .stat-more { text-decoration: underline; text-underline-offset: 3px; }

/* Film band */
.film { padding-block: clamp(64px, 8vw, 112px); background: var(--night); color: #f2f1ec; }
.film .eyebrow { color: #a9adb6; }
.film-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: 32px; }
.film h2 { margin-top: 16px; font: 500 clamp(2.1rem, 3.6vw, 3.25rem)/1.06 var(--serif); letter-spacing: -.018em; }
.film-head > p { max-width: 30em; color: #b9bdc5; }
.yt-player { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: #000; color: #fff; text-decoration: none; }
.yt-player img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s; }
.yt-player:hover img { transform: scale(1.015); opacity: .92; }
.yt-player video { width: 100%; height: 100%; background: #000; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: rgba(255, 255, 255, .94); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); transition: transform .25s; }
.yt-play::after { content: ''; position: absolute; left: 34px; top: 27px; border-style: solid; border-width: 15px 0 15px 24px; border-color: transparent transparent transparent var(--ink); }
.yt-player:hover .yt-play { transform: scale(1.06); }
.yt-label { position: absolute; left: 16px; bottom: 14px; display: flex; flex-direction: column; padding: 8px 12px; border-radius: 8px; background: rgba(18, 20, 24, .92); font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.yt-label small { font: 400 .75rem/1.4 var(--mono); color: #c7cad1; }
.hero-strip { margin-top: 28px; }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.strip li { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.strip img { width: 100%; height: auto; border-radius: 10px; background: #000; }
.strip span { font-size: .875rem; color: #c7cad1; }
.hero-strip figcaption { margin-top: 14px; color: #a9adb6; }
.hero-strip .fig-tag { border-color: #4a4f59; color: #d6d8dd; }

/* Sections */
.section { padding-block: clamp(72px, 9vw, 120px); border-top: 1px solid var(--line); }
.section-alt { background: var(--paper-2); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin: 22px 0 clamp(36px, 5vw, 52px); }
.section h2, .paper-section h2 { font: 500 clamp(2.1rem, 3.6vw, 3.25rem)/1.06 var(--serif); letter-spacing: -.018em; text-wrap: balance; }
.section-head > p { max-width: 34em; color: var(--ink-2); }
.figure-note { margin-top: 18px; font-size: .875rem; color: var(--muted); }

/* 01 Robot: the panels of Fig. 2 sit on one black band of equal height (the photos have
   black backgrounds), so the cards can share the width evenly. */
.robot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 1.25fr); gap: 18px; align-items: stretch; }
.concept { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.concept .zoomable, .concept .zoomable img { border-radius: 0; }
.concept .zoomable { height: clamp(200px, 19vw, 250px); background: #000; }
.concept .zoomable img { height: 100%; object-fit: contain; }
.concept h3 { margin: 20px 22px 0; font: 600 1.125rem/1.3 var(--sans); }
.concept p { margin: 8px 22px 24px; font-size: .9375rem; color: var(--muted); }
.concept-ours { border-color: rgba(38, 167, 52, .55); box-shadow: 0 0 0 3px rgba(38, 167, 52, .08); }

/* 02 Method */
.loop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.loop li { position: relative; padding: 22px 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.loop li:not(:last-child)::after { content: '→'; position: absolute; right: -22px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.125rem; }
.loop-step { font: 500 .75rem/1 var(--mono); color: var(--accent); }
.loop h3 { margin-top: 12px; font: 600 1.125rem/1.3 var(--sans); }
.loop p { margin-top: 8px; font-size: .9375rem; color: var(--muted); }
.zero-shot { display: grid; grid-template-columns: 220px 1fr; gap: 12px 32px; align-items: baseline; margin-top: 18px; padding: 24px 28px; border-radius: var(--radius); background: var(--ink); color: #f2f1ec; }
.zero-shot-label { font: 500 .8125rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-bright); }
.zero-shot p:last-child { font-size: 1.125rem; line-height: 1.55; }
.method-more { margin-top: 18px; font-size: .9375rem; color: var(--muted); }
.method-more a { color: var(--ink); font-weight: 600; text-decoration-color: var(--line-2); }
.method-more a:hover { text-decoration-color: var(--accent); }

/* 03 Results */
.method-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-bottom: 18px; font-size: .875rem; color: var(--ink-2); }
.method-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.tablist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tablist [role='tab'] { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 14px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: transparent; text-align: left; cursor: pointer; transition: background-color .2s, border-color .2s; }
.tablist [role='tab'] img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; background: #000; }
.tablist [role='tab'] span { display: flex; flex-direction: column; min-width: 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.tablist [role='tab'] small { margin-top: 3px; font: 400 .75rem/1.3 var(--mono); color: var(--muted); }
.tablist [role='tab']:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .6); }
.tablist [role='tab'][aria-selected='true'] { border-color: var(--ink); background: var(--surface); box-shadow: inset 0 -3px 0 var(--ink); }
.tabpanel { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.6fr); gap: 20px; align-items: start; margin-top: 20px; }
.tabpanel + .tabpanel { margin-top: 40px; }
.platforms.is-enhanced .tabpanel + .tabpanel { margin-top: 20px; }
.panel-note { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--muted); }
.panel-note b { color: var(--ink); }
.platform-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.platform-card h3 { font: 600 1.1875rem/1.3 var(--sans); }
.specs { display: grid; gap: 10px; }
.specs > div { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.specs dt { font: 500 .6875rem/1.7 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.specs dd { font-size: .9375rem; line-height: 1.5; }
/* Each tab leads with its chapter of the supplementary video; figures open from the links. */
.result-media { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.clip-frame { position: relative; }
.clip video { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; background: #000; object-fit: cover; }
.clip-toggle { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(18, 20, 24, .78); color: #fff; cursor: pointer; transition: background-color .2s; }
.clip-toggle:hover { background: rgba(18, 20, 24, .94); }
.clip-toggle::before { content: ''; width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.clip-toggle[data-state='paused']::before { width: 0; height: 0; margin-left: 4px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent currentColor; }
.clip-label { margin-top: 8px; font: 400 .75rem/1.4 var(--mono); color: var(--muted); }
.takeaway { padding-left: 14px; border-left: 3px solid var(--assm-ink); color: var(--ink-2); }
.fig-links { display: flex; flex-wrap: wrap; gap: 8px; }
.media-subhead { margin: 14px 0 0; padding-top: 22px; border-top: 1px solid var(--line); font: 600 1.0625rem/1.3 var(--sans); color: var(--ink); }
.fig-link { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: .875rem; font-weight: 500; line-height: 1.3; text-align: left; text-decoration: none; cursor: zoom-in; transition: border-color .2s; }
.fig-link[data-dialog] { cursor: pointer; }
.fig-link:hover { border-color: var(--ink); }
.fig-link > [aria-hidden] { margin-left: 5px; color: var(--muted); }

/* 04 More */
.more-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.4fr); gap: 18px; align-items: stretch; }
.card { display: flex; flex-direction: column; padding: 16px 16px 22px; }
.card-tag { margin-top: 14px; }
.card h3 { margin-top: 8px; font: 600 1.125rem/1.3 var(--sans); }
.card h3 + p { margin-top: 6px; font-size: .9375rem; color: var(--muted); }

/* Chart cards and dialogs */
.chart-sub { margin-top: 4px; font-size: .8125rem; color: var(--muted); }
.chart-callout { margin-top: 16px; font-size: .9375rem; color: var(--ink-2); }
.chart-callout strong { color: var(--ink); }
.slope-chart, .reach-chart, .ball-chart, .ppo-chart { width: 100%; height: auto; margin-top: 14px; overflow: visible; }
.grid path { stroke: var(--line); stroke-width: 1; fill: none; }
.ticks text { font: 400 11px var(--mono); fill: var(--muted); text-anchor: middle; }
.slope-chart .ticks text, .ppo-chart .ticks-y text { text-anchor: end; }
.slope-chart .axis text { font: 500 13px var(--sans); fill: var(--ink-2); text-anchor: middle; }
.slope-chart .axis .axis-note, .ppo-chart .axis-title { font: 400 11px var(--mono); fill: var(--muted); }
.slope-chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; transition: stroke-width .15s; }
.slope-chart .hit { fill: none; stroke: transparent; stroke-width: 20; }
.slope-chart .pt { stroke: var(--surface); stroke-width: 1.5; }
.slope-chart .end { font: 500 12.5px var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.slope-chart .end.strong { font-weight: 700; }
.slope-chart .series { outline: none; }
.slope-chart .series:hover .line, .slope-chart .series:focus-visible .line { stroke-width: 4; }
.slope-chart .series:focus-visible .hit { stroke: rgba(25, 122, 53, .12); }
.line.assm { stroke: var(--assm-ink); } .pt.assm { fill: var(--assm-ink); }
.line.era { stroke: var(--era-ink); } .pt.era { fill: var(--era-ink); }
.line.dmdc { stroke: var(--dmdc); } .pt.dmdc { fill: var(--dmdc); }
.line.lopinf { stroke: var(--lopinf); } .pt.lopinf { fill: var(--lopinf); }
.reach-chart .row, .ball-chart .row { outline: none; }
.reach-chart .hit, .ball-chart .hit { fill: transparent; }
.reach-chart .row:hover .hit, .reach-chart .row:focus-visible .hit, .ball-chart .row:hover .hit, .ball-chart .row:focus-visible .hit { fill: rgba(22, 24, 29, .04); }
.reach-chart .row:focus-visible .hit, .ball-chart .row:focus-visible .hit { stroke: var(--accent); stroke-width: 1.5; }
.reach-chart .name, .ball-chart .name { font: 500 13px var(--sans); fill: var(--ink-2); }
.ball-chart .name.strong { font-weight: 700; fill: var(--ink); }
.reach-chart .val, .ball-chart .val { font: 500 12px var(--mono); fill: var(--ink); }
.ball-chart .val.strong { font-weight: 700; }
.reach-chart .reach { fill: var(--assm-ink); }
.reach-chart .hold { fill: rgba(46, 204, 64, .4); }
.reach-chart .limit { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.reach-chart .baseline-note { font: 400 12.5px var(--sans); fill: var(--muted); }
.ball-chart .baseline { stroke: var(--line-2); }
.bar.assm, .more.assm, .key.assm { fill: var(--assm-ink); }
.bar.era, .key.era { fill: var(--era-ink); }
.bar.dmdc, .key.dmdc { fill: var(--dmdc); }
.bar.lopinf, .key.lopinf { fill: var(--lopinf); }
.bar.ppo, .key.ppo { fill: var(--ppo); }
.ppo-chart .band { fill: rgba(58, 104, 201, .2); }
.ppo-chart .mean { fill: none; stroke: var(--ppo); stroke-width: 2.2; stroke-linejoin: round; }
.ppo-chart .peak { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.ppo-chart .peak-label { font: 500 11px var(--mono); fill: var(--ink-2); }
.key-reach, .key-hold, .key-band, .key-line { display: inline-block; vertical-align: -1px; margin: 0 4px 0 2px; }
.key-reach, .key-hold { width: 18px; height: 10px; border-radius: 2px; background: var(--assm-ink); }
.key-hold { margin-left: 10px; background: rgba(46, 204, 64, .4); }
.key-band { width: 18px; height: 10px; border-radius: 2px; background: rgba(58, 104, 201, .2); }
.key-line { width: 18px; height: 3px; margin-left: 10px; border-radius: 2px; background: var(--ppo); vertical-align: 2px; }

/* 05 Paper */
.paper-section { padding-block: clamp(72px, 9vw, 120px); border-top: 1px solid var(--line); }
.paper-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 32px 56px; align-items: start; margin-top: 22px; }
.paper-full-title { margin-top: 22px; font: 400 1.375rem/1.35 var(--serif); font-style: italic; }
.paper-authors { margin-top: 12px; color: var(--ink-2); }
.paper-venue { margin-top: 6px; font-size: .9375rem; color: var(--muted); }
.code-card { padding: 26px 26px 24px; border-radius: var(--radius); background: var(--ink); color: #f2f1ec; }
.code-card .kicker { color: var(--accent-bright); }
.code-card h3 { margin-top: 10px; font: 500 1.5rem/1.2 var(--serif); }
.code-card ul { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; font-size: .9375rem; color: #c9ccd3; }
.code-card li { position: relative; padding-left: 22px; }
.code-card li::before { content: '·'; position: absolute; left: 4px; top: -.05em; font-weight: 700; color: var(--accent-bright); }
.abstract { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.abstract summary { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; list-style: none; cursor: pointer; font: 500 1.375rem/1.2 var(--serif); }
.abstract summary::-webkit-details-marker { display: none; }
.abstract summary span { font: 400 1.5rem/1 var(--sans); color: var(--accent); transition: transform .2s; }
.abstract[open] summary span { transform: rotate(45deg); }
.abstract p { max-width: 62em; padding-bottom: 26px; color: var(--ink-2); }
.citation { margin-top: 36px; }
.citation-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.citation-top h3 { font: 600 1.125rem/1.3 var(--sans); }
.citation pre { margin: 14px 0 0; padding: 22px 24px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font: 400 .8125rem/1.75 var(--mono); color: var(--ink-2); }
.contact { margin-top: 28px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding: 28px var(--gutter) 36px; font-size: .8125rem; color: var(--muted); }
.footer-inner .wordmark { font-size: 1rem; color: var(--ink); }
.footer-inner a { text-decoration-color: var(--line-2); }

/* Dialogs and tooltip */
.media-dialog { width: min(1100px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 14px; background: #0f1114; color: #f2f1ec; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.media-dialog::backdrop { background: rgba(10, 11, 14, .74); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 10px 10px 18px; }
.dialog-bar h2 { font: 600 .9375rem/1.3 var(--sans); }
.dialog-close { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid #3b3f48; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.dialog-close:hover { background: #262a31; }
.media-dialog--figure { width: auto; max-width: 96vw; background: var(--surface); color: var(--ink); }
.media-dialog--chart { width: min(640px, 94vw); background: var(--surface); color: var(--ink); }
.media-dialog--chart .dialog-bar { padding: 14px 12px 0 22px; }
.media-dialog--chart .dialog-bar h2 { font: 600 1.0625rem/1.35 var(--sans); }
.media-dialog--chart .dialog-close { border-color: var(--line-2); }
.media-dialog--chart .dialog-close:hover { background: var(--paper); }
.dialog-body { padding: 0 22px 22px; }
.dialog-note { margin-top: 12px; font-size: .8125rem; line-height: 1.55; color: var(--muted); }
.media-dialog--figure .dialog-bar { justify-content: flex-end; padding: 8px; }
.media-dialog--figure .dialog-close { border-color: var(--line-2); }
.media-dialog--figure .dialog-close:hover { background: var(--paper); }
.dialog-figure { max-width: min(1600px, 92vw); max-height: calc(92vh - 72px); width: auto; height: auto; margin: 0 16px 16px; }
.dialog-caption { max-width: min(760px, 88vw); margin: -4px 16px 18px; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.tip { position: fixed; z-index: 60; max-width: 280px; padding: 7px 10px; border-radius: 7px; background: var(--ink); color: var(--paper); font: 500 .75rem/1.45 var(--sans); pointer-events: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }

/* Responsive */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 760px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
  .loop li:nth-child(2)::after { content: none; }
  .tabpanel { grid-template-columns: minmax(0, 1fr); }
  .tablist [role='tab'] { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tablist [role='tab'] img { width: 100%; height: 72px; }
  .tabpanel > .result-media { order: -1; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .robot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .robot-grid > :nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 900px) {
  .site-header nav { display: none; }
  .section-head, .film-head, .paper-grid, .more-grid { grid-template-columns: minmax(0, 1fr); }
  .more-grid { max-width: 720px; }
  .zero-shot { grid-template-columns: minmax(0, 1fr); }
  .strip { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 72px; }
  body { font-size: 1rem; }
  .header-inner { min-height: 60px; gap: 12px; }
  .wordmark { font-size: 1rem; gap: 8px; }
  .wordmark img { width: 26px; height: auto; }
  .wm-extra { display: none; }
  .institution-logos { gap: 10px; }
  .institution-logos a + a { padding-left: 10px; }
  .institution-logos img { height: 22px; }
  .institution-logos a + a img { height: 19px; }
  .actions .btn { flex: 1 1 auto; padding: 0 16px; }
  .explorer { padding: 12px; border-radius: 14px; }
  .explorer-stage { aspect-ratio: 4 / 3.4; }
  .hud-keys { display: none; }
  .explorer-hud { left: 6px; right: 6px; bottom: 6px; font-size: .6875rem; }
  .stage-status { left: 8px; top: 8px; }
  .drag-hint { display: none; }
  .explorer-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat, .stat:nth-child(3) { padding: 22px 0 18px; border-left: 0; }
  .loop { grid-template-columns: minmax(0, 1fr); }
  .loop li:not(:last-child)::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -24px; transform: translateX(-50%); }
  .loop li:nth-child(2)::after { content: '↓'; }
  .robot-grid { grid-template-columns: minmax(0, 1fr); }
  .robot-grid > :nth-child(2) { grid-column: auto; grid-row: auto; }
  .concept .zoomable { height: auto; }
  .concept .zoomable img { height: auto; }
  .tablist { gap: 6px; }
  .tablist [role='tab'] { padding: 8px; font-size: .75rem; }
  .tablist [role='tab'] small { font-size: .6875rem; }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .specs > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .yt-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .yt-play::after { left: 26px; top: 20px; border-width: 12px 0 12px 19px; }
  .yt-label { left: 10px; bottom: 10px; padding: 6px 10px; font-size: .8125rem; }
  .yt-label small { display: none; }
  .citation pre { padding: 16px; font-size: .75rem; }
  .dialog-body { padding: 0 16px 18px; }
  .media-dialog--chart .dialog-bar { padding-left: 16px; }
  .slope-chart .axis text, .reach-chart .name, .ball-chart .name { font-size: 18px; }
  .slope-chart .end, .reach-chart .val, .ball-chart .val { font-size: 17px; }
  .ticks text { font-size: 16px; }
  .reach-chart .baseline-note { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
