:root {
  --ink: #222222;
  --ink-2: #555555;
  --muted: #8a8a8a;
  --rule: #bbbbbb;
  --sep: #dddddd;
  --fill: #f2f2f0;
  --page: #ffffff;

  --predictor: #3c9485;   /* teal */
  --planner: #356d91;     /* slate */
  --controller: #8c7eb8;  /* lavender */
  --future: #b1695b;      /* terracotta: the future image only */
  --task4: #5e7f3d;
  --task5: #8e5468;

  --dark: #0c0c0d;
  --dark-ink: #f5f5f7;
  --dark-2: #a1a1a6;

  --col: 680px;
  --wide: 1080px;
  --gutter: 20px;
  font-size: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--ui);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--planner); text-decoration-thickness: 1px; text-underline-offset: 2px; }
b { font-weight: 600; }
sub, sup { line-height: 0; }
.muted { color: var(--muted); }
.math { white-space: nowrap; }
.sc, .label, .eyebrow {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
}

/* ---------- hero ---------- */
.hero { background: var(--dark); color: var(--dark-ink); }
.hero-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 72px var(--gutter) 64px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}
.eyebrow { color: var(--dark-2); margin: 0 0 18px; font-size: 1.05rem; }
.hero h1 { margin: 0; font-weight: 400; font-size: 4.4rem; line-height: 1; }
.psi sub { font-size: 0.5em; vertical-align: -0.12em; }
.subtitle {
  margin: 18px 0 0;
  font-size: 1.62rem;
  line-height: 1.3;
  font-variant-caps: small-caps;
  letter-spacing: 0.02em;
}
.authors { margin: 22px 0 0; color: var(--dark-2); }
.links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.links a {
  color: var(--dark-ink);
  text-decoration: none;
  border: 1px solid #4a4a4e;
  border-radius: 999px;
  padding: 5px 16px 6px;
  font-size: 0.95rem;
  transition: border-color .15s, background .15s;
}
.links a:hover { border-color: var(--dark-2); background: #1c1c1f; }
.hero-media { margin: 0; }
.hero-media video { border-radius: 6px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-media figcaption { color: var(--dark-2); font-size: 0.85rem; margin-top: 10px; }
.todo { outline: 1px dashed rgba(177, 105, 91, 0.7); outline-offset: 3px; }

/* ---------- layout ---------- */
main { padding: 0 var(--gutter); }
main > section, .toc, .tldr { max-width: var(--col); margin: 0 auto; }
main > section { padding-top: 56px; }
.wide { max-width: var(--wide); margin-left: auto; margin-right: auto; }
main > section.wide { max-width: var(--wide); }
figure.wide { width: min(var(--wide), calc(100vw - 2 * var(--gutter))); margin-left: 50%; transform: translateX(-50%); }
figure { margin: 32px 0; position: relative; }
h2 { font-weight: 500; font-size: 1.7rem; line-height: 1.25; margin: 0 0 18px; }
h2 .num { color: var(--muted); margin-right: 14px; font-weight: 400; }
h2.sc { font-size: 1.45rem; }
h3 { font-weight: 600; font-size: 1.12rem; margin: 34px 0 8px; }
p { margin: 0 0 16px; }
.equation { text-align: center; margin: 20px 0; font-size: 1.08rem; }
figcaption, .caption { font-size: 0.86rem; line-height: 1.5; color: var(--ink-2); margin-top: 12px; }
.caption { max-width: var(--col); }
figure.wide > figcaption { max-width: 820px; }
.label { color: var(--ink-2); font-size: 1.02rem; margin: 0 0 6px; }

/* ---------- tldr / toc ---------- */
.tldr { margin-top: 56px; padding: 20px 26px 6px; background: var(--fill); border-radius: 6px; }
.tldr p:last-child { font-size: 1.06rem; }
.toc { margin-top: 44px; border-top: 1px solid var(--sep); border-bottom: 1px solid var(--sep); padding: 16px 0 10px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 36px; font-size: 0.95rem; }
.toc li { margin-bottom: 4px; break-inside: avoid; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--planner); }

/* ---------- long routine ---------- */
.demo { padding-top: 64px; }
.demo h2 { max-width: var(--col); margin-left: auto; margin-right: auto; }
.player { background: var(--dark); border-radius: 8px; overflow: hidden; }
.player video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.routine { padding: 14px 20px 16px; color: var(--dark-ink); }
.routine-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.95rem; }
.routine-clock { color: var(--dark-2); font-variant-numeric: tabular-nums; }
.routine-bar { display: flex; gap: 3px; margin: 12px 0 10px; height: 26px; }
.routine-bar button {
  position: relative; border: 0; padding: 0; cursor: pointer; border-radius: 3px; overflow: hidden;
  background: #2a2a2e; color: var(--dark-ink); font: inherit; font-size: 0.8rem;
}
.routine-bar .fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); opacity: 0.9; }
.routine-bar .n { position: relative; z-index: 1; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; text-align: left; }
.routine-bar button:focus-visible { outline: 2px solid var(--dark-ink); outline-offset: 1px; }
.routine-prompt { margin: 0; font-size: 0.95rem; color: var(--dark-ink); min-height: 1.6em; }
.routine-prompt .muted { color: var(--dark-2); font-variant-caps: all-small-caps; letter-spacing: 0.05em; margin-right: 8px; }
.demo > .caption { margin: 12px auto 0; }

/* ---------- frames, tags, toggles ---------- */
.frame { position: relative; margin: 0; }
.frame img, .frame video { width: 100%; border-radius: 3px; background: #111; }
.frame.future img { outline: 2px solid var(--future); outline-offset: -2px; }
.frame.empty img { aspect-ratio: 448 / 256; background: #f3efee; color: transparent; }
.tag {
  position: absolute; top: 0; left: 0;
  background: rgba(0, 0, 0, 0.62); color: #fff;
  font-size: 0.78rem; padding: 2px 8px 3px; border-radius: 3px 0 3px 0;
}
.future-tag { background: var(--future); }
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.seg-label { font-size: 0.82rem; color: var(--ink-2); margin-right: 6px; font-variant-caps: all-small-caps; letter-spacing: 0.06em; min-width: 7.5em; }
.seg button, .play, .fig-toggle {
  font: inherit; font-size: 0.88rem; color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 999px;
  padding: 3px 14px 4px; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.seg button:hover, .play:hover, .fig-toggle:hover { border-color: var(--ink-2); }
.seg button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- overview ---------- */
.scroll-x { overflow-x: auto; }
.flow-svg { font-family: var(--ui); }

/* ---------- steer ---------- */
.steer-controls { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.steer-pair, .replay-pair { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 10px; }
.replay-pair { grid-template-columns: 1fr 1fr; gap: 16px; }
.arrow-future { height: 2px; background: var(--future); position: relative; }
.arrow-future::after { content: ""; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left: 9px solid var(--future); }
.steer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; max-width: 560px; margin-left: auto; }
.steer-grid button { border: 0; padding: 0; background: none; cursor: pointer; position: relative; border-radius: 3px; overflow: hidden; opacity: 0.55; transition: opacity .15s; }
.steer-grid button[aria-pressed="true"], .steer-grid button:hover { opacity: 1; }
.steer-grid button[aria-pressed="true"] { outline: 2px solid var(--future); outline-offset: -2px; }
.steer-grid span { position: absolute; left: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 0.68rem; padding: 0 6px 1px; border-radius: 0 3px 0 0; }

/* ---------- replay ---------- */
.replay-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 20px; }
.replay-task { font-size: 0.9rem; color: var(--ink-2); margin: 0 0 12px; }
.replay-timeline { position: relative; margin-top: 18px; padding-bottom: 4px; }
.replay-steps { display: flex; gap: 2px; height: 30px; }
.replay-steps div {
  border-radius: 3px; font-size: 0.78rem; line-height: 30px; padding: 0 8px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .2s, color .2s;
  background: color-mix(in srgb, var(--c, #c9c9c9) 26%, white); color: var(--ink);
}
.replay-steps div.on { background: var(--c); color: #fff; }
.replay-steps div.idle { background: #e4e4e4; }
.replay-polls { position: relative; height: 22px; margin-top: 4px; }
.replay-polls i { position: absolute; bottom: 4px; width: 2px; height: 8px; background: #b5b5b5; transform: translateX(-1px); }
.replay-polls i.sw { height: 18px; bottom: 0; width: 3px; background: var(--ink); }
.replay-polls i.past { background: #6f6f6f; }
.replay-polls i.sw.past { background: var(--ink); }
.replay-head-line { position: absolute; top: -4px; bottom: 18px; width: 2px; background: var(--future); pointer-events: none; left: 0; }
#replay-scrub { width: 100%; margin: 4px 0 0; accent-color: var(--future); }
.replay-foot { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.replay-status { margin: 0; font-size: 0.9rem; color: var(--ink-2); min-height: 1.5em; }
.replay-status b { color: var(--ink); }

/* ---------- pretrain ---------- */
.pre-row { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 18px; align-items: center; }
.pre-mid { text-align: center; }
.pre-steps { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; min-height: 54px; align-content: center; }
.pre-steps i { width: 9px; height: 22px; border-radius: 2px; background: var(--planner); opacity: 0; transform: scaleY(0.4); transition: opacity .25s, transform .25s; }
.pre-steps i.on { opacity: 0.85; transform: none; }
.pre-label { font-size: 0.85rem; color: var(--ink-2); margin: 10px 0 0; }

/* ---------- action vector ---------- */
.fig-action { max-width: var(--col); }
.action-vec { display: flex; gap: 3px; height: 40px; }
.action-vec .part { border-radius: 3px; display: flex; align-items: center; padding: 0 10px; font-size: 0.85rem; color: #fff; white-space: nowrap; overflow: hidden; }
.action-vec .hand { background: var(--planner); }
.action-vec .token { background: var(--controller); }
.action-vec .neck { background: #6d6d6d; padding: 0; }
.action-note { text-align: right; font-size: 0.85rem; color: var(--ink-2); margin: 4px 0 0; }

/* ---------- charts ---------- */

.chart text { font-size: 13px; fill: var(--ink-2); }
.chart .row-label { fill: var(--ink); font-size: 14px; }
.chart .group-label { fill: var(--ink); font-size: 13px; font-weight: 600; }
.chart .ours-label { fill: var(--ink); font-size: 13px; font-weight: 600; }
.chart .grid { stroke: #ececec; }
.chart .axis { stroke: var(--rule); }
.chart .hit { fill: transparent; cursor: default; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; color: var(--ink-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { width: 14px; height: 14px; flex: none; }
.legend span.nm { display: inline; }
.table-view { font-size: 0.85rem; margin-top: 8px; }
.table-view summary { cursor: pointer; color: var(--ink-2); }
.table-view table { border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; width: 100%; }
.table-view th, .table-view td { padding: 4px 8px; text-align: right; border-bottom: 1px solid var(--sep); }
.table-view th:first-child, .table-view td:first-child { text-align: left; }
.table-view tr.ours td { font-weight: 600; }
.tooltip {
  position: fixed; z-index: 10; pointer-events: none;
  background: #fff; color: var(--ink); border: 1px solid var(--sep); border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08); padding: 6px 10px; font-size: 0.82rem; line-height: 1.4;
}

/* ---------- ablation ---------- */
.ablation { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 18px; align-items: center; font-size: 0.88rem; }
.ablation .h { color: var(--ink-2); font-variant-caps: all-small-caps; letter-spacing: 0.06em; }
.ablation .name { color: var(--ink); }
.ablation .name small { color: var(--ink-2); font-size: 0.8rem; display: block; }
.ablation .bar { position: relative; height: 18px; background: #f0f0ee; border-radius: 3px; margin-right: 48px; }
.ablation .bar i { position: absolute; inset: 0 auto 0 0; background: #9a9a9a; border-radius: 3px; }
.ablation .bar.full i { background: var(--planner); }
.ablation .bar b { position: absolute; left: calc(100% + 6px); top: -1px; font-weight: 400; font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; }
.ablation .row-sep { grid-column: 1 / -1; border-top: 1px solid var(--sep); }

/* ---------- tasks ---------- */
.figure-img { border-radius: 4px; width: 100%; }
.clips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; width: min(var(--wide), calc(100vw - 2 * var(--gutter))); margin-left: 50%; transform: translateX(-50%); }
.clips figure { margin: 0; }
.clips video { border-radius: 4px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: #111; }
.clips figcaption { margin-top: 6px; font-size: 0.8rem; }

/* ---------- citation / footer ---------- */
.bibtex { background: var(--fill); border-radius: 6px; padding: 16px 20px; overflow-x: auto; font-size: 0.82rem; line-height: 1.5; }
footer { margin-top: 80px; padding: 28px var(--gutter) 40px; text-align: center; color: var(--muted); border-top: 1px solid var(--sep); font-size: 0.9rem; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  :root { font-size: 17px; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; gap: 32px; }
  .hero h1 { font-size: 3.4rem; }
  .subtitle { font-size: 1.32rem; }
  .toc ol { columns: 1; }
  .clips { grid-template-columns: repeat(2, 1fr); }
  .pre-row { grid-template-columns: 1fr 1fr; }
  .pre-mid { grid-column: 1 / -1; order: 3; }
  .equation .math { white-space: normal; }
}
@media (max-width: 560px) {
  .steer-pair { grid-template-columns: 1fr; }
  .arrow-future { display: none; }
  .replay-pair { grid-template-columns: 1fr; }
  .steer-grid { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.reading-layout { max-width: 1480px; margin: auto; }
.feature-film, .method-film { margin-block: 36px; }
.feature-film video, .method-film video, .example video { width: 100%; border-radius: 6px; }
.feature-film { margin-inline: auto; }
.examples, .poses { display: grid; gap: 20px; }
.examples { grid-template-columns: repeat(2,minmax(0,1fr)); }
.example { margin: 0; }
.example ol { padding-left: 24px; margin-top: 8px; }
.example li { color: var(--muted); }
.example button { font: inherit; text-align: left; color: var(--ink-2); border: 0; background: transparent; cursor: pointer; }
.example button[aria-current="true"] { color: var(--planner); text-decoration: underline; text-underline-offset: 3px; }
.poses { grid-template-columns: repeat(3,1fr); text-align: center; font-size: .86rem; }
.poses img { width: 100%; height: clamp(85px,14vw,185px); object-fit: contain; margin-bottom: 8px; }
#results table { border-collapse: collapse; width: 100%; font-size: .86rem; }
#results td, #results th { padding: 6px; text-align: center; }
#results thead, #results tbody { border-block: 1px solid var(--ink); }
#results tbody tr:last-child { font-weight: bold; }
.clips { grid-template-columns: repeat(2,1fr); }
@media (min-width: 1000px) {
  .reading-layout { display: grid; grid-template-columns: minmax(0,1fr) 190px; gap: 28px; padding-right: 24px; }
  main { min-width: 0; container-type: inline-size; }
  main figure.wide, .clips, .examples { width: min(var(--wide), 100cqw); }
  .examples { margin-left: 50%; transform: translateX(-50%); }
  main > .feature-film { margin-inline: auto; transform: none; }
  .toc { position: sticky; top: 28px; align-self: start; margin: 56px 0 0; }
  .toc ol { columns: 1; padding-left: 20px; font-size: .86rem; }
}
@media (max-width: 999px) {
  .reading-layout { display: flex; flex-direction: column; }
  .toc { order: -1; align-self: flex-start; margin: 12px var(--gutter) 0; }
  .toc ol { columns: 2; }
  .toc summary { cursor: pointer; }
}
@media (max-width: 640px) {
  .examples { grid-template-columns: 1fr; }
  .poses { gap: 8px; }
}

main > figure.feature-film { width: min(100%, var(--wide)); margin-inline: auto; transform: none; }
.toc summary { cursor: pointer; }
@media (max-width: 640px) {
  .toc ol { columns: 1; }
}

/* Shared reading grid: headings, prose, diagrams and captions start on one edge. */
:root { --page-width: 1352px; --page-pad: clamp(18px,4vw,64px); --measure: 72ch; }
.hero-inner, .reading-layout { max-width: var(--page-width); padding-inline: var(--page-pad); }
.hero-inner { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: clamp(24px,4vw,64px); }
.reading-layout { gap: clamp(28px,4vw,64px); }
main { padding: 0; min-width: 0; }
main > section, main > section.wide { max-width: none; margin: 0; padding-top: clamp(44px,5vw,72px); }
main > section > p, .demo > .caption { max-width: var(--measure); margin-left: 0; }
main .wide, main figure.wide, main .clips, main .examples { width: 100%; max-width: none; margin-left: 0; margin-right: 0; transform: none; }
main figure { margin-block: 24px; }
main section > h2, main .demo h2 { margin: 0 0 16px; max-width: none; font-size: clamp(27px,2.45vw,36px); line-height: 1.16; font-weight: 550; letter-spacing: -.018em; font-variant-caps: normal; }
main h3 { font-size: clamp(20px,1.55vw,24px); line-height: 1.3; margin: 32px 0 10px; }
main p { line-height: 1.58; }
main .tldr { background: transparent; border-radius: 0; padding: 40px 0 0; }
.tldr p:last-child { font-size: 1rem; margin-bottom: 0; }
main > figure.feature-film { margin-block: 22px 0; }
main section + section { margin-top: 44px; padding-top: 38px; border-top: 1px solid var(--sep); }
main .equation { text-align: left; }
main figcaption, main .caption, .poses span { font-size: .86rem; line-height: 1.46; }
.toc { border-bottom: 0; }
.toc summary, .toc ol, .expand-scene, .subtask-status { font-family: var(--ui); }
.toc ol { list-style: none; padding: 0; }
.toc li { margin: 0; padding: 5px 0; line-height: 1.35; }
.toc summary { font-size: .78rem; font-weight: 600; }
.method-film { container-type: inline-size; }
.method-film iframe { display: block; width: 100%; height: calc(56.25cqw + 53px); border: 1px solid var(--sep); border-radius: 5px; }
.expand-scene { display: inline-block; font-size: .8rem; margin-top: 8px; }
.example { margin: 0; }
.example figcaption { margin: 12px 0 8px; font-size: 1.1rem; color: var(--ink); }
.example ol { display: flex; list-style: none; gap: 3px; margin: 0; padding: 0; }
.example li { flex: 1 1 0; min-width: 0; }
.example ol button { position: relative; isolation: isolate; width: 100%; height: 28px; padding: 0 10px; overflow: hidden; background: #e5ebed; border-radius: 3px; color: #273d46; }
.segment-fill { position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: #a8c3c8; }
.segment-number { position: relative; font: 500 13px/1 var(--ui); }
.subtask-status { margin: 8px 0 0; min-height: 2.8em; font-size: .82rem; color: var(--ink-2); }
@media(min-width:1000px) { .reading-layout { grid-template-columns: 168px minmax(0,1fr); } }
@media(max-width:999px) { .reading-layout { gap: 0; } .toc { margin-right: 0; } }
@media(max-width:860px) { .hero-inner { grid-template-columns: 1fr; } }

main > section.tldr { max-width: none; margin-inline: 0; }
@media(max-width:999px) { .toc { margin-left: 0; } }
#results figure > a > img { width: 100%; }
.segment-number { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Keep the explanatory text and the figures on the same reading measure. */
.reading-layout { max-width: 1184px; }
main > section > p, main figure.wide > figcaption, main .demo > .caption { max-width: none; }
.method-flow { padding: clamp(16px,2.4vw,28px); border: 1px solid var(--sep); }
.method-flow h3 { margin: 0 0 20px; font-size: 1.12rem; }
.flow-row { display: grid; grid-template-columns: 1fr 5% 1.1fr 5% 1fr; align-items: center; }
.flow-node { min-width: 0; text-align: center; }
.flow-node img { margin: auto auto 8px; max-height: 100px; border-radius: 3px; }
.flow-node strong, .flow-node small { display: block; }
.flow-node strong { font-size: .95rem; line-height: 1.3; }
.flow-node small { color: var(--ink-2); font-size: .8rem; margin-top: 5px; }
.flow-node.model { padding: 20px 8px; background: #eff5f4; border: 1px solid #91b4ad; border-radius: 5px; }
#planner .flow-node.model { background: #eff4f8; border-color: #9cb5c7; }
.frame-pair { display: flex; gap: 5px; }
.frame-pair .flow-node { flex: 1; }
.flow-link { width: 100%; color: var(--predictor); overflow: visible; }
#planner .flow-link { color: var(--planner); }
.flow-link path { fill: none; stroke: currentColor; stroke-width: 1.6; }
.flow-link circle { fill: currentColor; animation: flow-dot 2.4s linear infinite; }
.flow-link:nth-of-type(2) circle { animation-delay: -1.2s; }
@keyframes flow-dot { 0%,45% { opacity:0; transform:translateX(0); } 50% {opacity:1;} 92% {opacity:1;} 100% {opacity:0;transform:translateX(37px);} }
.method-flow.paused circle { animation-play-state: paused; }
.method-flow figcaption { margin-top: 16px; }
.action-sequence { display:grid; grid-template-columns:repeat(10,1fr); gap:3px; max-width:150px; margin:0 auto 9px; }
.action-sequence i { height:7px; background:var(--planner); border-radius:1px; }
.chart-paper { position:relative; min-width:570px; }
.chart-paper img { width:100%; }
.chart-targets { position:absolute; inset:0; pointer-events:none; }
.chart-targets button { position:absolute; top:27%; height:68%; padding:0; border:0; background:transparent; cursor:pointer; pointer-events:auto; }
.chart-targets button.active { background:rgb(32 163 158 / .12); outline:1px solid #328c86; border-radius:3px; }
.task-results figcaption { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
@media(max-width:600px) {
 .flow-row { grid-template-columns:1fr; justify-items:center; gap:2px; }
 .flow-node.model { width:min(260px,100%); padding:12px; }
 .flow-link { width:30px; height:28px; transform:rotate(90deg); }
 .flow-node img { max-height:72px; }
 .frame-pair { max-width:240px; }
}
.credits { grid-column:1 / -1; border-top:1px solid #38383a; padding-top:18px; }
.byline { margin:0 0 8px; font-size:1rem; line-height:1.75; }
.byline span, .institutions span { display:inline-block; }
.credits sup { font-size:.64em; margin-inline:2px; }
.institutions { display:flex; flex-wrap:wrap; gap:3px 18px; margin:0; color:var(--dark-2); font-size:.84rem; }
.goal-comparison, .chunk-demo { border:1px solid var(--sep); padding:clamp(12px,2.3vw,26px); }
.goal-comparison h3, .chunk-demo h3 { margin:0 0 18px; }
.goal-input { display:flex; align-items:center; gap:16px; margin-bottom:18px; }
.goal-input img { width:25%; border-radius:3px; }
.goal-input p { margin:0; font-size:.94rem; }
.goal-grid { display:grid; grid-template-columns:minmax(110px,.92fr) repeat(3,minmax(0,1fr)); align-items:center; gap:8px; }
.goal-grid img,.chunk-frames img { width:100%; border-radius:3px; }
.goal-grid b,.grid-title,.goal-prompt { font-size:.86rem; line-height:1.25; }
.goal-grid b { text-align:center; }
.chunk-frames { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.chunk-frames > * { background:none; border:2px solid transparent; padding:3px; text-align:left; font:inherit; color:inherit; }
.chunk-frames button { cursor:pointer; }
.chunk-frames b { display:block; margin-top:4px; font-size:.86rem; }
.chunk-readout { display:flex; justify-content:space-between; align-items:center; margin:20px 0 6px; font-size:.92rem; }
.chunk-track { display:grid; grid-template-columns:repeat(40,minmax(0,1fr)); gap:2px; }
.chunk-track i { height:16px; background:#e5ebee; }
.chunk-track i.on { background:var(--planner); }
@media(max-width:600px) {
 .goal-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .goal-grid .grid-title { display:none; }
 .goal-prompt { grid-column:1 / -1; margin-top:7px; }
 .goal-input img { width:34%; }
 .chunk-frames { gap:1px; }
}
.goal-path { display:flex; align-items:center; justify-content:center; gap:8px; padding:10px 0; margin-bottom:14px; border-block:1px solid var(--sep); font-size:.86rem; line-height:1.25; }
.goal-path .flow-link { width:clamp(16px,3vw,36px); height:auto; flex:none; transform:none; }
.goal-path strong { color:var(--predictor); }
.goal-comparison.paused circle { animation-play-state:paused; }
.chunk-track i { transition:background-color .15s linear; }

.result-plot { margin:16px 0 34px; }
#long-result svg { width:100%; min-width:620px; }

/* ================= Polish pass: one UI face, shared figure chrome, focus-by-hover ================= */
:root {
  --ui: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --future-ink: #96503f;
  --frame: #fafaf8;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
::selection { background: color-mix(in srgb, var(--predictor) 26%, white); color: var(--ink); }
:focus-visible { outline: 2px solid var(--planner); outline-offset: 3px; border-radius: 3px; }
.hero :focus-visible { outline-color: var(--dark-ink); }
video { accent-color: var(--predictor); }
h2, h3 { text-wrap: balance; }
main p, figcaption { text-wrap: pretty; }

/* hero */
.report-meta { margin: 18px 0 0; color: var(--dark-2); font: 400 .8rem/1.3 var(--ui); letter-spacing: .02em; }
.links a { font-family: var(--ui); font-size: .84rem; padding: 7px 16px; }
.links a:not(.todo) { background: var(--dark-ink); color: var(--dark); border-color: var(--dark-ink); }
.links a:not(.todo):hover { background: #fff; border-color: #fff; }
.todo { outline: 0; border-style: dashed !important; border-color: #6a6a70 !important; color: var(--dark-2) !important; }

/* contents */
.toc { border-top: 0; padding-top: 0; }
.toc summary { color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-variant-caps: normal; font-size: .68rem; margin-bottom: 8px; }
.toc a { display: block; color: var(--ink-2); padding-left: 12px; border-left: 1px solid var(--sep); transition: color .2s, border-color .2s; }
.toc li { padding: 0; }
.toc li a { padding-block: 5px; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--ink); border-left-color: var(--ink); font-weight: 500; }
@media (min-width: 1280px) { .toc summary { list-style: none; pointer-events: none; } .toc summary::-webkit-details-marker { display: none; } }

/* figure chrome shared by every interactive figure */
.fig-head, .fig-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.fig-head { margin-bottom: 18px; }
.fig-head h3 { margin: 0 !important; }
.fig-bar { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--sep); }
.fig-toggle { flex: none; font: 500 .72rem/1 var(--ui); padding: 7px 12px; color: var(--ink-2); border-color: var(--sep); }
.fig-toggle:hover { color: var(--ink); border-color: var(--ink-2); }
.goal-comparison, .chunk-demo { border-radius: 10px; background: var(--frame); }
main figcaption, main .caption { color: var(--ink-2); }

/* overview diagram */
.flow-svg { width: 100%; min-width: 820px; overflow: visible; }
.flow-svg .stage-bg { fill: color-mix(in srgb, var(--c) 7%, white); stroke: var(--c); stroke-opacity: 0; stroke-width: 1.5; cursor: pointer; transition: fill .3s, stroke-opacity .3s; }
.flow-svg .stage-title { font-size: 22px; font-weight: 600; fill: var(--c); pointer-events: none; }
.flow-svg .stage:hover .stage-bg, .flow-svg .stage.on .stage-bg { fill: color-mix(in srgb, var(--c) 12%, white); }
.flow-svg .node { cursor: pointer; outline: none; transition: opacity .35s var(--ease); }
.flow-svg .module { fill: #fff; stroke: var(--c); stroke-width: 1.5; filter: drop-shadow(0 2px 3px rgb(30 40 50 / .08)); transition: stroke-width .2s, fill .25s; }
.flow-svg .module-title { font-size: 19px; font-weight: 600; fill: var(--ink); }
.flow-svg .module-sub { font: 400 13.5px var(--ui); fill: var(--ink-2); }
.flow-svg .data-label, .flow-svg .edge-label { font: 500 11.5px var(--ui); letter-spacing: .08em; fill: var(--muted); }
.flow-svg .card { fill: #fff; stroke: var(--sep); stroke-width: 1.2; }
.flow-svg .pill { fill: #fff; stroke: var(--c); stroke-width: 1.2; stroke-dasharray: 3 3; }
.flow-svg .quote { font-size: 16.5px; font-style: italic; fill: var(--ink); }
.flow-svg .quote.small { font-size: 14.5px; }
.flow-svg .photo-frame { fill: none; stroke: rgb(0 0 0 / .14); }
.flow-svg .future-frame { fill: none; stroke: var(--future); stroke-width: 2.5; }
.flow-svg .cell { fill: var(--planner); opacity: .85; }
.flow-svg .node:hover .module, .flow-svg .node:focus-visible .module, .flow-svg .node.core .module { stroke-width: 2.6; fill: color-mix(in srgb, var(--c) 8%, white); }
.flow-svg .node:focus-visible .card, .flow-svg .node:focus-visible .pill, .flow-svg .node.core .card, .flow-svg .node.core .pill { stroke: var(--ink-2); stroke-width: 2; }
.flow-svg .edge { pointer-events: none; transition: opacity .35s var(--ease); }
.flow-svg .edge-line { fill: none; stroke: var(--c); stroke-opacity: .5; stroke-width: 1.4; }
.flow-svg .edge-flow { fill: none; stroke: var(--c); stroke-width: 8; stroke-linecap: round; stroke-dasharray: .1 var(--len); animation: ov-flow var(--dur) linear infinite; }
@keyframes ov-flow { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
.flow-svg.paused .edge-flow, .flow-svg.offscreen .edge-flow { animation-play-state: paused; }
.flow-svg.has-focus .node:not(.on), .flow-svg.has-focus .edge:not(.on) { opacity: .18; }
.flow-svg.has-focus .stage:not(.on) .stage-title { opacity: .35; }
.flow-svg .edge-label { transition: opacity .35s var(--ease); }
.flow-svg.has-focus .edge-label { opacity: .3; }
.flow-svg.has-focus .edge.on .edge-line { stroke-opacity: .8; stroke-width: 1.8; }
.flow-svg.has-focus .edge.on .edge-flow { stroke-width: 9.5; }
@media (prefers-reduced-motion: reduce) { .flow-svg .edge-flow { animation: none; } }
.part-note { margin: 0; min-height: 3em; font-size: .9rem; line-height: 1.5; color: var(--muted); flex: 1; }
.part-note.on { color: var(--ink); }
.part-note b { margin-right: 4px; }

/* goal grid: row × column crosshair */
.goal-grid { gap: 10px; }
.goal-grid img { cursor: crosshair; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .3s var(--ease), outline-color .2s; }
.goal-grid.has-focus img:not(.on) { opacity: .32; }
.goal-grid img.on { outline-color: var(--future); }
.goal-grid > b, .goal-prompt { cursor: default; transition: color .2s; }
.goal-grid > b { font-family: var(--ui); font-weight: 500; font-size: .78rem; color: var(--ink-2); padding: 4px 0; border-bottom: 2px solid transparent; }
.goal-grid > b.on { color: var(--future-ink); border-bottom-color: var(--future); }
.goal-prompt { font-weight: 500; font-style: italic; }
.goal-prompt.on { color: var(--future-ink); }
.grid-title { font-family: var(--ui); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.goal-path { font-family: var(--ui); font-size: .78rem; color: var(--ink-2); }

/* action horizons */
.chunk-frames { gap: 12px; }
.chunk-frames > * { border: 0; padding: 0; }
.chunk-frames img { outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s, opacity .3s var(--ease); }
.chunk-frames b { margin-top: 8px; font: 500 .78rem/1.3 var(--ui); color: var(--ink-2); transition: color .2s; }
.chunk-frames button img { opacity: .55; }
.chunk-frames button:hover img { opacity: 1; outline-color: var(--rule); }
.chunk-frames button[aria-pressed=true] img { opacity: 1; outline-color: var(--planner); }
.chunk-frames button[aria-pressed=true] b { color: var(--planner); font-weight: 600; }
.chunk-readout { font-family: var(--ui); font-size: .8rem; }
.chunk-readout output { font-variant-numeric: tabular-nums; color: var(--planner); font-weight: 600; }
.chunk-track i { height: 14px; border-radius: 2px; }

/* segmented progress under clips */
.example ol button { height: 30px; transition: background-color .2s; }
.example ol button:hover { background: #d6e0e3; }
.example button[aria-current="true"] { text-decoration: none; box-shadow: inset 0 -2px 0 var(--planner); }
.routine-bar button { transition: background-color .2s; font-family: var(--ui); font-size: .72rem; }
.routine-bar button:hover { background: #3a3a40; }
.routine-top, .routine-prompt .muted { font-family: var(--ui); font-size: .8rem; }
.routine-prompt .muted { font-variant-caps: normal; text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; }

/* action vector */
.fig-action { max-width: none; }
.action-vec { height: 44px; gap: 2px; }
.action-vec .part { font-family: var(--ui); font-size: .78rem; border-radius: 4px; }
.action-note { font-family: var(--ui); font-size: .78rem; }
.poses span { font-family: var(--ui); font-size: .78rem !important; color: var(--ink-2); }

/* ---------- result charts ---------- */
.result-plot { margin: 16px 0 40px; }
.result-plot figcaption { margin-top: 10px; }
.plot-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.plot-legend button {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 500 .76rem/1 var(--ui); color: var(--ink);
  background: transparent; border: 1px solid var(--sep); border-radius: 999px; padding: 7px 12px 7px 10px;
  transition: opacity .3s var(--ease), border-color .2s, background-color .2s;
}
.plot-legend button::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--series); }
.plot-legend button.is-focus, .plot-legend button[aria-pressed=true] { border-color: var(--series); background: color-mix(in srgb, var(--series) 9%, white); }
.plot-legend button.is-dim { opacity: .45; }
.series-name sub { font-size: .72em; }
.result-plot svg { font-family: var(--ui); overflow: visible; }
#pnp-result svg { width: 100%; max-width: 760px; margin: 0 auto; }
#long-result svg { width: 100%; min-width: 640px; }
.plot-axis { font-size: 12.5px; fill: var(--ink-2); }
.plot-axis.strong { font-weight: 600; fill: var(--ink); }
.plot-axis-sub { font-weight: 400; fill: var(--ink-2); }
.plot-scale { font-size: 10.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.plot-value { font-size: 11.5px; font-weight: 600; fill: var(--ink); font-variant-numeric: tabular-nums; pointer-events: none; }
.halo { paint-order: stroke; stroke: #fff; stroke-width: 3.5px; stroke-linejoin: round; }
.plot-grid .ring { fill: none; stroke: #e6e9ea; }
.plot-grid .ring.outer { stroke: #cfd5d7; }
.plot-grid .spoke { stroke: #e6e9ea; }

.trace { pointer-events: none; transition: opacity .35s var(--ease); }
.trace-shape { fill: var(--series); fill-opacity: 0; stroke: var(--series); stroke-width: 1.8; stroke-linejoin: round; transition: fill-opacity .35s var(--ease), stroke-width .2s; }
.trace.is-ours .trace-shape { fill-opacity: .1; stroke-width: 2.4; }
.trace-dot { fill: var(--series); stroke: #fff; stroke-width: 1.5; transition: r .2s; }
.trace-values { opacity: 0; transition: opacity .25s; }
.trace.is-dim { opacity: .14; }
.trace.is-dim .trace-shape { fill-opacity: 0; }
.trace.is-focus .trace-shape { fill-opacity: .24; stroke-width: 3; }
.trace.is-focus .trace-dot { r: 5.5; }
.trace.is-focus .trace-values { opacity: 1; }
.hit-fill { fill: transparent; cursor: pointer; }
.hit-edge { fill: none; stroke: transparent; stroke-width: 16; stroke-linejoin: round; pointer-events: stroke; cursor: pointer; }

.gridline { stroke: #eceeef; }
.baseline { stroke: var(--rule); }
.divider { stroke: var(--sep); stroke-dasharray: 2 4; }
.bar { transition: opacity .3s var(--ease); }
.bar-ink { fill: var(--series); }
.bar-hit { fill: transparent; cursor: pointer; }
.bar .plot-value { opacity: 0; transition: opacity .2s; font-size: 10.5px; fill: var(--ink-2); font-weight: 500; }
.bar.is-dim { opacity: .16; }
.bar.is-focus .plot-value { opacity: 1; }
.bar.is-hot .plot-value { fill: var(--ink); font-weight: 700; font-size: 12px; }

.result-tip {
  position: fixed; z-index: 50; pointer-events: none; min-width: 150px; max-width: min(280px, calc(100vw - 12px));
  padding: 10px 12px; background: #fff; color: var(--ink); border: 1px solid var(--sep); border-radius: 8px;
  box-shadow: 0 6px 20px -6px rgb(20 30 34 / .22); font: 400 .72rem/1.35 var(--ui);
}
.result-tip small, .result-tip strong, .result-tip em { display: block; font-style: normal; }
.result-tip small { color: var(--muted); font-size: inherit; }
.result-tip strong { margin: 2px 0 6px; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.result-tip strong span { font-size: .72rem; font-weight: 400; color: var(--ink-2); }
.result-tip em { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.result-tip em::before { content: ""; width: 12px; height: 3px; border-radius: 2px; background: var(--series); }

/* ablation table */
#results table { font-family: var(--ui); font-size: .74rem; font-variant-numeric: tabular-nums; }
#results td, #results th { padding: 9px 10px; white-space: nowrap; }
#results thead th { font-weight: 600; color: var(--ink); }
#results thead tr:first-child th { color: var(--muted); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: .64rem; padding-bottom: 2px; }
#results thead, #results tbody { border-block: 1px solid var(--rule); }
#results thead { border-top-color: var(--ink); }
#results tbody { border-bottom-color: var(--ink); }
#results tbody tr + tr { border-top: 1px solid #eeeeec; }
#results tbody tr:hover { background: var(--frame); }
#results tbody tr:last-child { font-weight: 600; background: color-mix(in srgb, var(--predictor) 9%, white); }
#results td:nth-last-child(-n+2) { font-weight: 600; }
.mark { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.mark.yes { color: var(--predictor); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.mark.no { color: #b9b9b6; --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7h7' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }

.bibtex { font-size: .74rem; }
@media (max-width: 600px) { .fig-head { flex-direction: column; gap: 10px; } .part-note { min-height: 6em; } }
@media (prefers-reduced-motion: reduce) { .flow-link circle { animation: none; } }
#results td, #results th { padding: 9px 6px; }
#results thead tr:last-child th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
.chunk-frames button img { opacity: .72; }
@media (max-width: 600px) {
  #pnp-result .plot-axis { font-size: 19px; }
  #pnp-result .plot-scale { font-size: 15px; }
  #pnp-result .plot-value { font-size: 18px; }
  #pnp-result .trace-dot { r: 5.5; }
}
.byline a { color: inherit; text-decoration: underline; text-decoration-color: #5a5a60; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color .2s; }
.byline a:hover { text-decoration-color: var(--dark-ink); }
.example ol button { padding: 0 5px; }
.example .segment-number { font-size: 12px; text-overflow: clip; }

/* architecture figures share the overview's drawing language */
.flow-svg .kv { font: 500 12px var(--ui); letter-spacing: .04em; fill: var(--muted); }
.flow-svg .kv-v { font: italic 400 13.5px var(--ui); letter-spacing: 0; fill: var(--ink); }
.flow-svg .axis { stroke: var(--rule); stroke-width: 1.2; }
.flow-svg .latent { fill: color-mix(in srgb, var(--predictor) 18%, white); stroke: var(--predictor); stroke-width: 1.2; }
.flow-svg .latent.future { fill: color-mix(in srgb, var(--future) 16%, white); stroke: var(--future); stroke-dasharray: 4 3; }
.flow-svg .layer { fill: color-mix(in srgb, var(--c) calc(14% + var(--k) * 12%), white); }
.arch { margin-block: 28px; }
.arch .fig-head { margin-bottom: 6px; }
.stage-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: step; }
.stage-steps button { counter-increment: step; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: 500 .76rem/1 var(--ui); color: var(--ink); background: transparent; border: 1px solid var(--sep); border-radius: 999px; padding: 6px 13px 6px 6px; transition: border-color .2s, background-color .2s; }
.stage-steps button::before { content: counter(step); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--planner); color: #fff; font-size: .68rem; }
.stage-steps button:hover, .stage-steps button:focus-visible { border-color: var(--planner); background: color-mix(in srgb, var(--planner) 8%, white); }

.flow-svg .ghost { fill: none; stroke: var(--rule); stroke-dasharray: 2 3; }
.flow-svg .latent + .data-label { fill: var(--predictor); }
.flow-svg .cell.step { fill: color-mix(in srgb, var(--planner) 14%, white); opacity: 1; transition: fill .18s linear; }
.flow-svg .cell.step.on { fill: var(--planner); }
.arch .flow-svg { min-width: 700px; }
.stage-steps.plain button { padding: 7px 14px; font-variant-numeric: tabular-nums; }
.stage-steps.plain button::before { content: none; }
.stage-steps button[aria-pressed=true] { border-color: var(--planner); background: color-mix(in srgb, var(--planner) 10%, white); font-weight: 600; }
#wm-steps button[aria-pressed=true], #wm-steps button:hover { border-color: var(--future); background: color-mix(in srgb, var(--future) 10%, white); }
.steps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.steps-row .stage-steps { margin: 0; }
.steps-row span { font: 500 .68rem/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.release { margin: 22px 0 0; font: 500 .9rem/1.4 var(--ui); color: var(--dark-ink); }
.release + .links { margin-top: 14px; }
.tldr .open { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--sep); }
.tldr .open strong { font-weight: 600; }
.flow-svg .stage .module-sub { pointer-events: none; }

/* ================= Screen typography: one humanist sans for reading, the serif only for the Ψ mark ================= */
:root { font-size: 17px; --predictor-ink: #23705f; --planner-ink: #2b5f82; --controller-ink: #6252a3; }
body { line-height: 1.65; }
.psi, .math { font-family: "STIX Two Text", "Times New Roman", serif; }
.subtitle { font-variant-caps: normal; letter-spacing: -.01em; font-weight: 500; font-size: 1.5rem; line-height: 1.28; text-wrap: balance; }
.hero h1 { font-size: 4.6rem; }
.byline { font-size: .95rem; }
main section > h2, main .demo h2 { font-weight: 600; letter-spacing: -.022em; }
main h3 { font-weight: 600; letter-spacing: -.012em; }
main p { line-height: 1.65; }
main figcaption, main .caption { line-height: 1.55; }
b, strong { font-weight: 600; }
.flow-svg .stage-title { font-size: 21px; letter-spacing: -.01em; }
.flow-svg .module-title { font-size: 18px; }
.flow-svg .quote { font-size: 15.5px; }
.flow-svg .quote.small { font-size: 13.5px; }
.goal-prompt { font-size: .82rem; }
.part-note { font-size: .86rem; }
@media (max-width: 860px) { :root { font-size: 16px; } .hero h1 { font-size: 3.6rem; } .subtitle { font-size: 1.25rem; } }

/* TL;DR: a lead paragraph with the four ideas marked, then the release */
main .tldr { padding-top: 44px; }

/* ================= Academic layout: one centred column; title, authors, links, then the film ================= */
:root { --col: 920px; --pad: clamp(18px, 4vw, 40px); --ink: #17191c; --ink-2: #4a4f55; --muted: #7b8086; --sep: #e2e4e6; --rule: #c9cdd1; }

header.hero { background: var(--page); color: var(--ink); padding: clamp(48px, 7vw, 88px) var(--pad) 0; }
header.hero .hero-inner { display: block; max-width: var(--col); margin: 0 auto; padding: 0; text-align: center; }
header.hero h1 { margin: 0; font-size: inherit; font-weight: inherit; line-height: 1; }
header.hero .psi { display: block; font-size: clamp(3.6rem, 8vw, 5.4rem); font-weight: 400; line-height: 1; color: var(--ink); }
header.hero .psi sub { font-size: .46em; vertical-align: -.1em; }
header.hero .title { display: block; max-width: 22em; margin: 18px auto 0; font-size: clamp(1.45rem, 2.9vw, 2.05rem); font-weight: 600; line-height: 1.22; letter-spacing: -.022em; text-wrap: balance; }
header.hero .byline { margin: 30px auto 0; max-width: 46em; font-size: 1.02rem; line-height: 1.85; color: var(--ink); text-wrap: balance; }
header.hero .byline a { color: var(--planner-ink); text-decoration: none; }
header.hero .byline a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
header.hero .credits sup, header.hero sup { font-size: .62em; margin-left: 1px; color: var(--ink-2); }
header.hero .institutions { justify-content: center; gap: 2px 22px; margin: 12px 0 0; font-size: .88rem; color: var(--ink-2); }
header.hero .links { justify-content: center; gap: 10px; margin-top: 30px; }
header.hero .links a { font: 500 .88rem/1 var(--ui); padding: 11px 22px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; transition: background-color .2s, border-color .2s; }
header.hero .links a:hover { background: #33373c; border-color: #33373c; }
header.hero .links a.todo { background: transparent; color: var(--ink-2) !important; border: 1px dashed var(--rule) !important; }
header.hero .links a.todo:hover { background: var(--frame); }
header.hero :focus-visible { outline-color: var(--planner); }
header.hero .release { margin: 22px 0 0; font: 600 .98rem/1.4 var(--ui); color: var(--predictor-ink); }
header.hero .hero-media { max-width: var(--col); margin: clamp(32px, 5vw, 52px) auto 0; }
header.hero .hero-media video { border-radius: 10px; background: #111; }
header.hero .hero-media figcaption { margin-top: 12px; text-align: center; color: var(--ink-2); font-size: .84rem; }

/* body column: prose and figures share the same edges; contents sits in the left margin on wide screens */
.reading-layout { display: block; max-width: none; margin: 0; padding: 0 var(--pad); }
.reading-layout > main { max-width: var(--col); margin: 0 auto; }
.reading-layout > .toc { position: static; max-width: var(--col); margin: 40px auto 0; align-self: auto; order: 0; }
.reading-layout > .toc ol { columns: 2; column-gap: 32px; }
@media (min-width: 1280px) {
  .reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--col)) minmax(0, 1fr); gap: 0; }
  .reading-layout > .toc { grid-column: 1; justify-self: end; width: 176px; margin: 64px 44px 0 0; position: sticky; top: 32px; align-self: start; }
  .reading-layout > .toc ol { columns: 1; }
  .reading-layout > main { grid-column: 2; margin: 0; width: 100%; }
}
@media (max-width: 640px) { .reading-layout > .toc ol { columns: 1; } }

/* sections: a firm heading over a hairline, generous air between */
main > section.tldr { padding-top: clamp(48px, 6vw, 72px); }
main section + section { margin-top: clamp(56px, 7vw, 88px); padding-top: 0; border-top: 0; }
main section > h2, main .demo h2 { font-size: clamp(1.6rem, 2.6vw, 2.05rem); padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--ink); }
main h3 { font-size: 1.24rem; margin: 40px 0 10px; }
main p { font-size: 1.04rem; }
main > section > p { color: var(--ink); }
.tldr p { font-size: 1.14rem; line-height: 1.62; }
.tldr .open { margin: 18px 0 0; padding: 0; border: 0; background: none; color: var(--ink); }
.tldr .open strong { font-weight: 700; color: var(--predictor-ink); }
main > figure.feature-film { margin-block: 32px 0; }

/* figures: unboxed, numbered, with the title set as a small heading */
main { counter-reset: fig; }
.goal-comparison, .chunk-demo, .arch { border: 0; padding: 0; background: none; border-radius: 0; }
main figure { margin-block: 36px; }
.fig-head h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -.005em; }
main figure.wide:not(.feature-film):not(.poses) > figcaption::before, .result-plot > figcaption::before, .fig-action > figcaption::before {
  counter-increment: fig; content: "Figure " counter(fig) ". "; font-weight: 600; color: var(--ink);
}
#results figure.wide > figcaption::before { counter-increment: none; content: "Table 1. "; }
main figcaption, main .caption { font-size: .88rem; color: var(--ink-2); max-width: none; }
.goal-input { padding-bottom: 4px; }
.bibtex { background: var(--frame); border: 1px solid var(--sep); }
footer { margin-top: 96px; }
main { container-type: normal; counter-reset: none; }
.reading-layout { counter-reset: fig; }
main figure.wide:not(.feature-film):not(.poses), .result-plot, .fig-action { counter-increment: fig; }
#results figure.wide:has(table) { counter-increment: none; }
main figure.wide:not(.feature-film):not(.poses) > figcaption::before, .result-plot > figcaption::before, .fig-action > figcaption::before { counter-increment: none; }
header.hero .byline span { display: inline; white-space: nowrap; }
@media (max-width: 1279px) { main > section.tldr { padding-top: 28px; } .reading-layout > .toc { margin-top: 32px; } }

/* ================= Editorial pass: serif display over a sans text face, a paper band behind the title, quiet panels ================= */
:root { --display: "Source Serif 4", "Iowan Old Style", Georgia, serif; --paper: #f4f3ef; --panel: #f7f7f4; --col: 980px; }
.psi, .math { font-family: var(--display); }

/* contents: a floating button, a list on demand */
.reading-layout { display: block; padding: 0 var(--pad); }
.reading-layout > main { max-width: var(--col); margin: 0 auto; width: auto; }
.reading-layout > .toc { position: fixed; top: 16px; right: 16px; z-index: 40; width: auto; max-width: none; margin: 0; padding: 0; border: 0; }
.toc summary { display: inline-flex; align-items: center; gap: 9px; float: right; list-style: none; pointer-events: auto; cursor: pointer; margin: 0; padding: 9px 15px 9px 13px; font: 500 .74rem/1 var(--ui); letter-spacing: .02em; text-transform: none; color: var(--ink); background: rgb(255 255 255 / .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--sep); border-radius: 999px; box-shadow: 0 2px 10px -4px rgb(20 25 30 / .18); }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::before { content: ""; width: 14px; height: 10px; background: linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 50% / 70% 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 1.5px no-repeat; }
.toc summary:hover { border-color: var(--rule); }
.reading-layout > .toc ol { clear: both; columns: 1; width: 250px; margin: 8px 0 0; padding: 8px; float: right; background: #fff; border: 1px solid var(--sep); border-radius: 14px; box-shadow: 0 14px 40px -14px rgb(20 25 30 / .3); font-size: .84rem; }
.toc ol a { border: 0; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); }
.toc ol a:hover { background: var(--panel); color: var(--ink); }
.toc ol a[aria-current] { background: color-mix(in srgb, var(--predictor) 10%, white); color: var(--predictor-ink); font-weight: 600; border: 0; }

/* title block */
header.hero { background: linear-gradient(var(--paper), var(--paper)) top / 100% calc(100% - clamp(120px, 22vw, 300px)) no-repeat; padding-top: clamp(56px, 8vw, 104px); }
header.hero .psi { font-size: clamp(4.2rem, 9vw, 6.4rem); font-weight: 400; letter-spacing: -.02em; }
header.hero .title { font-family: var(--display); font-weight: 500; font-size: clamp(1.7rem, 3.5vw, 2.6rem); line-height: 1.16; letter-spacing: -.018em; max-width: 19em; margin-top: 22px; }
header.hero .byline { margin-top: 34px; font-size: 1.04rem; }
.affils { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 40px; list-style: none; margin: 26px 0 0; padding: 0; }
.affils li { display: flex; align-items: center; gap: 8px; }
.affils img { height: 26px; width: auto; filter: brightness(0); opacity: .78; }
.affils li:nth-child(3) img { height: 24px; }
.affils span { font: 600 1rem/1 var(--ui); letter-spacing: -.01em; color: #2d2d2d; }
.affils sup { align-self: flex-start; font-size: .68rem; color: var(--ink-2); }
header.hero .equal { margin: 14px 0 0; font-size: .8rem; color: var(--ink-2); }
header.hero .links { margin-top: 30px; }
header.hero .links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px 10px 16px; }
.links svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
header.hero .hero-media video { border-radius: 14px; box-shadow: 0 30px 60px -30px rgb(20 25 30 / .45), 0 0 0 1px rgb(0 0 0 / .06); }

/* headings carry the serif; a hairline opens each section */
main section > h2, main .demo h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.9rem, 3.2vw, 2.5rem); letter-spacing: -.02em; line-height: 1.12; border-bottom: 0; padding: 0; margin-bottom: 20px; }
main section + section { border-top: 1px solid var(--sep); padding-top: clamp(40px, 5vw, 60px); margin-top: clamp(48px, 6vw, 72px); }
main h3 { font-family: var(--display); font-weight: 600; font-size: 1.36rem; letter-spacing: -.012em; }
.fig-head h3 { font-family: var(--ui); font-size: 1.02rem; font-weight: 600; letter-spacing: -.005em; }
main > section.tldr { padding-top: clamp(56px, 7vw, 88px); }
.tldr p { font-size: 1.2rem; line-height: 1.6; letter-spacing: -.006em; }
.tldr .open { font-size: 1.04rem; }
main a { color: var(--planner-ink); }

/* interactive figures sit on a quiet panel; the caption stays inside it */
.fig-overview, .arch, .goal-comparison, .result-plot { background: var(--panel); border-radius: 16px; padding: clamp(16px, 2.6vw, 30px); }
.fig-overview .fig-bar, .arch .fig-bar, .goal-path { border-color: #e6e6e1; }
.fig-overview > figcaption, .arch > figcaption, .goal-comparison > figcaption, .result-plot > figcaption { margin-top: 16px; }
.result-plot svg .halo { stroke: var(--panel); }
.plot-legend button { background: #fff; }
.stage-steps button, .fig-toggle { background: #fff; }
.player { border-radius: 14px; }
.example video, .clips video, .figure-img { border-radius: 10px; }

/* world-model figure */
.flow-svg .frame { fill: color-mix(in srgb, var(--future) 16%, white); stroke: var(--future); stroke-width: 1.3; }
.flow-svg .frame.now { fill: color-mix(in srgb, var(--predictor) 22%, white); stroke: var(--predictor); }
.flow-svg line.ghost { stroke: #c9cdd1; stroke-dasharray: none; stroke-width: 1; opacity: .7; }
.flow-svg .tie { fill: none; stroke: var(--rule); stroke-width: 1.2; }
.flow-svg .latent.future + .data-label { fill: var(--future-ink); }
@media (max-width: 640px) { .reading-layout > .toc { top: 10px; right: 10px; } .affils { gap: 12px 26px; } .affils img { height: 20px; } }
.fig-overview { width: min(1200px, calc(100vw - 2 * var(--pad))) !important; margin-left: 50% !important; transform: translateX(-50%) !important; }

/* the mark sits in the title line */
header.hero { padding-top: clamp(40px, 5.5vw, 72px); }
header.hero h1.title { display: block; margin: 0 auto; max-width: 21em; font-family: var(--display); font-weight: 500; font-size: clamp(1.75rem, 3.6vw, 2.7rem); line-height: 1.16; letter-spacing: -.018em; text-wrap: balance; }
header.hero h1.title .psi { display: inline; font-size: 1em; font-weight: 500; letter-spacing: 0; line-height: inherit; }
header.hero h1.title .psi sub { font-size: .52em; vertical-align: -.16em; }
header.hero .byline { margin-top: 28px; }
.flow-svg .track { fill: color-mix(in srgb, var(--planner) 12%, white); }
.flow-svg .track-fill { fill: var(--planner); transition: width .7s var(--ease); }
.flow-svg .track-tick { stroke: #fff; stroke-width: 2; }

/* paper palette: the two light series need an edge to hold against the panel */
.bar-ink { stroke: color-mix(in srgb, var(--series) 62%, #3a2a20); stroke-width: .8; }
.trace-shape { stroke: color-mix(in srgb, var(--series) 82%, #3a2a20); }
.trace-dot { stroke: color-mix(in srgb, var(--series) 55%, #3a2a20); stroke-width: 1; }
.plot-legend button::before { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--series) 62%, #3a2a20); }
.result-tip em::before { height: 8px; width: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--series) 62%, #3a2a20); }
.plot-axis-sub { font-weight: 500; }

/* ================= Method figures: HTML panels in the paper's figure language, SVG connectors drawn by diagrams.js ================= */
.dgm-fig { --input: #8b9196; }
.dgm { position: relative; color: var(--ink); font-family: var(--ui); }
.dgm .wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 1; pointer-events: none; }
.dgm [data-node], .dgm [data-a], .dgm .blk, .dgm .chip, .dgm .pill, .dgm .vae { position: relative; z-index: 2; }
.dgm [data-node] { cursor: pointer; transition: opacity .3s var(--ease), box-shadow .25s, border-color .25s; }
.dgm.has-focus [data-node]:not(.on) { opacity: .22; }
.dgm.has-focus .wire:not(.on) { opacity: .12; }
.wire { transition: opacity .3s var(--ease); }
.wire-line { fill: none; stroke: var(--c); stroke-width: 1.7; stroke-opacity: .7; }
.wire.dash .wire-line { stroke-dasharray: 4 4; stroke-opacity: .6; }
.wire-dot { fill: var(--c); stroke: #fff; stroke-width: 1.5; }
.dgm-fig.paused .wire-dot { opacity: 0 !important; }
.wire-label { font: 500 10.5px var(--ui); letter-spacing: .03em; fill: var(--muted); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; }
.dgm .m { font-family: var(--display); font-style: italic; }
.dgm sub { font-size: .7em; }

.dgm .panel { position: relative; border: 1.5px solid color-mix(in srgb, var(--t) 42%, white); background: color-mix(in srgb, var(--t) 6%, white); border-radius: 16px; padding: 14px 18px 18px; transition: box-shadow .3s; }
.dgm .panel.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 18%, transparent); }
.t-pred { --t: var(--predictor); } .t-plan { --t: var(--planner); } .t-ctrl { --t: var(--controller); }
.dgm .panel > h4 { margin: 0 0 12px; font-family: var(--display); font-weight: 700; font-size: 1.32rem; letter-spacing: -.01em; color: var(--t); }
.dgm .blk { --t: var(--ink-2); background: #fff; border: 1.6px solid var(--t); border-radius: 12px; padding: 9px 14px 10px; text-align: center; box-shadow: 0 1px 2px rgb(20 25 30 / .06); }
.t-pred .blk, .dgm-sp .blk { --t: var(--predictor); } .t-plan .blk, .dgm-pre .blk, [data-node=pvlm] { --t: var(--planner); } .t-ctrl .blk, [data-node=enc] { --t: var(--controller); }
.dgm .blk b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.06rem; line-height: 1.25; }
.dgm .blk > span { display: block; margin-top: 2px; font-size: .76rem; color: var(--ink-2); }
.dgm .blk.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 22%, transparent); }
.dgm .lab { margin: 0 0 6px; font-size: .84rem; font-weight: 600; color: var(--ink); }
.dgm .lab.c { text-align: center; font-weight: 500; color: var(--ink-2); margin: 6px 0 0; }
.dgm .lab .dim { font-weight: 400; color: var(--muted); }
.dgm .key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; background: #c7c2dc; }
.dgm .key.fut { background: var(--future); }
.dgm .shot { display: block; width: 100%; border-radius: 7px; border: 2px solid #d3d6d9; background: #222; }
.dgm .shot.fut { border-color: var(--future); }
.dgm .shot-wrap { position: relative; }
.dgm .tag { position: absolute; top: 2px; left: 2px; padding: 1px 7px 2px; border-radius: 5px 0 5px 0; background: rgb(0 0 0 / .6); color: #fff; font-size: .74rem; }
.dgm .chip, .dgm .pill { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 5px 12px; border-radius: 999px; font-size: .82rem; line-height: 1.2; white-space: nowrap; }
.dgm .chip { background: color-mix(in srgb, var(--t) 12%, white); border: 1.3px solid color-mix(in srgb, var(--t) 45%, white); }
.dgm .pill { background: #fff; border: 1.3px solid #d9dcdf; color: var(--ink-2); }
.dgm .sq { display: inline-flex; gap: 3px; }
.dgm .sq i { display: block; width: 12px; height: 12px; border-radius: 3px; background: var(--sqc, #ccc); transition: transform .12s linear; }
.sq.plan { --sqc: color-mix(in srgb, var(--planner) 45%, white); } .sq.state { --sqc: #93c5ae; } .sq.noise { --sqc: #d7dadd; }
.sq.ctrl { --sqc: var(--controller); }
.sq.ctrl.flow i { background: color-mix(in srgb, var(--controller) calc(var(--k, 1) * 100%), #d7dadd); }
.dgm .ins { display: flex; justify-content: space-between; gap: 8px; }
.dgm .in { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: .74rem; color: var(--ink-2); white-space: nowrap; }
.dgm .toks { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .9rem; }
.dgm .cut { display: block; margin: 0 auto; max-width: 100%; object-fit: contain; }

/* overview */
.dgm-ov { display: grid; grid-template-columns: 190px 250px 330px 196px; justify-content: space-between; gap: 0 40px; min-width: 1080px; padding: 34px 4px 40px; }
.ov-in { display: flex; flex-direction: column; justify-content: center; }
.dgm .card.quote { margin: 0 0 22px; padding: 10px 14px; background: #fff; border: 1.5px solid #d9dcdf; border-radius: 12px; font-family: var(--display); font-style: italic; font-size: 1rem; line-height: 1.35; text-align: center; }
.dgm-ov .t-pred { display: flex; flex-direction: column; gap: 16px; }
.dgm-ov .chips { display: flex; justify-content: center; gap: 10px; }
.dgm-ov .blk.lg { padding: 14px 10px; }
.dgm-ov .blk .m.big { display: block; margin-top: 4px; font-size: 1.5rem; color: var(--ink); }
.dgm-ov [data-node=fut] { width: 78%; margin: 0 auto; }
.dgm-ov .t-plan { display: flex; flex-direction: column; gap: 22px; }
.dgm-ov .t-plan .ins { padding: 0 18px; }
.dgm-ov .t-ctrl { display: flex; flex-direction: column; gap: 22px; }
.dgm-ov .cut { max-height: 190px; }

/* subtask prediction */
.dgm-sp { min-width: 860px; padding: 4px 2px 6px; }
.sp-pipe { display: flex; align-items: center; justify-content: center; gap: 46px; margin-bottom: 52px; }
.sp-pipe .pill.out { min-width: 250px; transition: background-color .25s, border-color .25s, color .25s; }
.sp-pipe .pill.out.sw { background: color-mix(in srgb, var(--predictor) 12%, white); border-color: var(--predictor); color: var(--ink); font-weight: 600; }
.sp-frames { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 56px; gap: 12px 12px; }
.sp-f { margin: 0; position: relative; display: flex; flex-direction: column; gap: 8px; }
.sp-f img { width: 100%; border-radius: 7px; border: 2px solid transparent; opacity: .55; transition: opacity .3s, border-color .3s; }
.sp-f.now img { opacity: 1; border-color: var(--predictor); }
.sp-f .tag { top: 2px; left: 2px; }
.dec { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 999px; border: 1.3px solid #cfd3d6; background: #fff; font-size: .8rem; color: var(--ink-2); }
.dec.sw { border-color: var(--predictor); color: var(--ink); }
.dec.sw b { color: var(--predictor-ink); }
.sp-f.now .dec { box-shadow: 0 0 0 3px color-mix(in srgb, var(--predictor) 18%, transparent); }
.sp-frames .bar { display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 6px; color: #fff; font-size: .82rem; font-weight: 500; }
.bar.b1 { grid-column: 1 / 3; background: var(--planner); } .bar.b2 { grid-column: 3 / 5; background: var(--predictor); }
.bar.b3 { grid-column: 5 / 6; background: var(--controller); clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%); }

/* image world model */
.dgm-wm { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; min-width: 900px; padding: 2px 2px 34px; }
.dgm .strip { display: flex; gap: 3px; margin-bottom: 4px; }
.strip img { flex: 1; min-width: 0; height: 44px; object-fit: cover; border-radius: 3px; border: 2px solid transparent; opacity: .4; transition: opacity .35s, border-color .35s; }
.strip img.pick { opacity: 1; border-color: var(--future); }
.strip img.pick0 { opacity: 1; border-color: var(--predictor); }
.dgm .ours { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 34px 0 0; }
.ours figure { margin: 0; text-align: center; }
.ours img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; border: 2px solid var(--future); background: #222; }
.ours figure:first-child img { border-color: var(--predictor); }
.ours figcaption { margin-top: 4px; font-size: .8rem; color: var(--ink-2); }
.dgm-wm .t-pred > .lab + .ours { margin-top: 8px; }
.dgm-wm .t-pred > .lab:nth-of-type(2) { margin-top: 30px; }
.vae-row, .lat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.vae-row { margin-top: 12px; }
.dgm .vae { text-align: center; padding: 4px; border-radius: 999px; background: #fff; border: 1.3px solid #d9dcdf; font: 600 .72rem/1.2 var(--ui); letter-spacing: .08em; color: var(--ink-2); }
.vae.wide { grid-column: 2 / 6; }
.lat-row { margin-top: 26px; }
.lat { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .82rem; }
.lat:nth-child(2) { grid-column: 2 / 6; }
.dgm .sq.z0, .dgm .sq.z1 { display: inline-block; width: 22px; height: 22px; border-radius: 5px; }
.sq.z0 { background: var(--predictor); } .sq.z1 { background: color-mix(in srgb, var(--future) 80%, white); outline: 1.5px dashed var(--future); outline-offset: 2px; }
.dgm-wm .gen { display: flex; flex-direction: column; gap: 22px; }
.dgm-wm .gen .chip { white-space: normal; text-align: center; border-radius: 12px; font-size: .8rem; }
.blk.tower { text-align: left; padding: 12px 14px 14px; }
.blk.tower b { text-align: center; margin-bottom: 8px; }
.rope { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .86rem; }
.rope .sq { width: 18px !important; height: 18px !important; flex: none; }
.dgm-wm [data-node=out] { width: 82%; margin: 0 auto; }

/* planner pre-training */
.dgm-pre { min-width: 860px; padding: 2px 96px 6px 2px; }
.pre-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: end; }
.pre-shot { margin: 0; text-align: center; transition: opacity .35s; }
.pre-shot img { display: block; width: 100%; border-radius: 7px; border: 2px solid #d3d6d9; }
.pre-shot figcaption { margin-top: 5px; font-size: .84rem; }
.pre-shot:not(.cur):not(.pick) { opacity: .35; }
.pre-shot.pick img { border-color: var(--future); }
.pre-row .pill { margin-bottom: 30px; font-family: var(--display); font-style: italic; font-size: .92rem; }
.dgm-pre .blk.wide { width: 74%; margin: 46px auto 0; padding: 12px 16px; }
.dgm-pre .blk.wide b { font-size: 1.16rem; }
.dgm-pre .blk.wide > span { font-size: .84rem; }
.track-wrap { width: 74%; margin: 40px auto 0; }
.dgm .track { height: 26px; border-radius: 7px; background: color-mix(in srgb, var(--planner) 10%, white); border: 1.5px solid color-mix(in srgb, var(--planner) 40%, white); overflow: hidden; }
.track-fill { display: block; height: 100%; width: 50%; background: var(--planner); border-radius: 5px; transition: width .8s var(--ease); position: relative; }
.track-fill::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 6px; background: #fff; opacity: .7; animation: tok-head 1s ease-in-out infinite; }
@keyframes tok-head { 50% { opacity: .1; } }
.dgm-fig.paused .track-fill::after { animation: none; opacity: 0; }
.track-scale { position: relative; height: 20px; margin-top: 4px; font-size: .74rem; color: var(--muted); }
.track-scale span { position: absolute; top: 0; transform: translateX(-50%); }
.track-scale span:first-child { transform: none; } .track-scale span:last-child { transform: translateX(-100%); }
.track-note { margin: 2px 0 0; text-align: center; font-size: .9rem; }

/* post-training and execution */
.dgm-post { display: grid; grid-template-columns: 138px 252px 104px 186px 120px; grid-template-rows: auto auto; justify-content: space-between; gap: 30px 26px; align-items: center; min-width: 900px; padding: 4px 2px 8px; }
.dgm-post .frozen { grid-column: 1; grid-row: 1; }
.dgm-post .frozen > span { color: #4f86ad; font-weight: 600; letter-spacing: .04em; }
.ae-panel { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 16px; padding: 14px 14px 16px; }
.dgm-post [data-node=tok] { grid-column: 3; grid-row: 1; }
.dgm-post .sq.ctrl { flex-wrap: wrap; width: 64px; justify-content: center; }
.ctrl-panel { grid-column: 4; grid-row: 1; display: flex; flex-direction: column; gap: 18px; }
.dgm-post .cut { grid-column: 5; grid-row: 1; max-height: 160px; }
.dgm-post [data-node=data] { grid-column: 2; grid-row: 2; justify-self: center; }
.dgm-post [data-node=enc] { grid-column: 3 / 5; grid-row: 2; justify-self: start; padding: 7px 14px; }

.dgm .in > span:last-child { white-space: nowrap; }
.dgm-wm .ours { margin-top: 40px; }
.dgm .lab.ours-lab { margin: 14px 0 0; }
.dgm .chip.cap { display: block; white-space: normal; text-align: center; border-radius: 12px; font-size: .8rem; line-height: 1.4; padding: 8px 12px; }
.track-scale span { white-space: nowrap; }
.dgm-pre { padding-right: 120px; }
.dgm .lab.ours-lab { margin-left: calc((100% - 40px) / 5 + 10px); }

/* ================= The paper's Figure 3, inline and animated (paper-anim.js) ================= */
.paper-fig .paper-svg svg { display: block; width: 100%; height: auto; font-family: Arimo, Arial, Helvetica, sans-serif; }
#paper-wm .paper-svg { max-width: 760px; min-width: 620px; margin: 0 auto; }
#paper-vla .paper-svg { min-width: 760px; }
.paper-fig .pdot { pointer-events: none; }
.paper-fig.paused .pdot { opacity: 0 !important; }
.paper-fig .hit { fill: transparent; cursor: pointer; }
.paper-fig .veil { fill: #fff; opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
.paper-fig .ring { fill: none; stroke: var(--ink); stroke-width: 1.6; opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
.paper-fig.has-focus .veil { opacity: .72; }
.paper-fig.has-focus .ring { opacity: .55; }
.paper-fig .branch-veil { fill: #fff; opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.paper-fig .branch-veil.on { opacity: .62; }
.paper-fig.has-focus .branch-veil.on { opacity: 0; }
.paper-fig #tokrow rect, .paper-fig #tokrow path, .paper-fig #tokrow image { transition: opacity .12s linear; }
.paper-fig .frame-glow { fill: none; stroke-width: 3; opacity: 0; transition: opacity .35s var(--ease); pointer-events: none; }
.paper-fig .frame-glow.on { opacity: .9; }
.paper-fig .paper-svg { background: #fff; border-radius: 10px; }

/* ================= Method sections: the paper's drawing beside its examples or its text ================= */
.split { display: grid; gap: clamp(20px, 2.6vw, 36px); align-items: start; margin-block: 28px;
  width: min(1200px, calc(100vw - 2 * var(--pad))); margin-left: 50%; transform: translateX(-50%); }
.vla-split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; }
.wm-split { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); }
.split > figure { margin: 0 !important; }
.split .paper-fig .paper-svg, #paper-wm .paper-svg, #paper-vla .paper-svg { min-width: 0; max-width: none; }
.split-text > p { font-size: 1rem; }
.split-text > h3 { margin-top: 20px; }
.split .fig-head h3 { font-size: .98rem; }
#paper-ov .paper-svg { min-width: 900px; }
#paper-ov { padding: clamp(12px, 1.8vw, 22px); }
.wm-split .goal-comparison { padding: clamp(14px, 1.8vw, 22px); }
.wm-split .goal-input { margin-bottom: 14px; }
.wm-split .goal-input img { width: 38%; }
.wm-split .goal-grid { grid-template-columns: minmax(84px, .8fr) repeat(3, minmax(0, 1fr)); gap: 7px; }
.wm-split .goal-prompt { font-size: .76rem; }
.wm-split .goal-comparison figcaption { font-size: .82rem; }
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; width: auto; margin-left: 0; transform: none; }
}
.split > figure.paper-fig, .split > .goal-comparison { counter-increment: fig; }
.split > figure > figcaption::before { content: "Figure " counter(fig) ". "; font-weight: 600; color: var(--ink); }
.vla-split { align-items: start; }
.vla-split .split-text { padding-top: 8px; }

/* ================= Paper figures as horizontal strips ================= */
.paper-fig.strip .paper-svg { min-width: 700px; }
#paper-wm .paper-svg { max-width: 900px; margin: 0 auto; }
#paper-pre .paper-svg, #paper-post .paper-svg { max-width: 1000px; margin: 0 auto; }
.wm-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.wm-split #paper-wm2 .paper-svg { min-width: 0; }
.paper-fig.strip { margin-block: 26px; }

/* ================= Subtask examples: caption and chapter bar inside the clip ================= */
.examples { gap: 18px; }
.ex-frame { position: relative; overflow: hidden; border-radius: 12px; background: #111; isolation: isolate; box-shadow: 0 18px 40px -26px rgb(20 25 30 / .5); }
.ex-frame video { display: block; width: 100%; border-radius: 0 !important; cursor: pointer; }
.ex-frame::before, .ex-frame::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1; }
.ex-frame::before { top: 0; height: 34%; background: linear-gradient(rgb(0 0 0 / .5), transparent); }
.ex-frame::after { bottom: 0; height: 42%; background: linear-gradient(transparent, rgb(0 0 0 / .72)); }
.ex-title { position: absolute; top: 12px; left: 14px; right: 14px; z-index: 2; margin: 0; display: flex; align-items: baseline; gap: 10px; color: #fff; font: 600 .92rem/1.2 var(--ui); pointer-events: none; }
.ex-title span { font-weight: 400; font-size: .74rem; opacity: .75; }
.ex-now { position: absolute; left: 14px; right: 14px; bottom: 26px; z-index: 2; margin: 0; color: #fff; pointer-events: none; }
.ex-k { display: block; font: 600 .66rem/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-bottom: 5px; }
.ex-label { display: block; font: 500 1rem/1.3 var(--ui); text-shadow: 0 1px 8px rgb(0 0 0 / .4); }
.ex-bar { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ex-bar li { flex: 1 1 0; min-width: 0; }
.ex-bar button { display: block; width: 100%; height: 4px; padding: 0; border: 0; border-radius: 2px; background: rgb(255 255 255 / .32); overflow: hidden; cursor: pointer; transition: height .15s; position: relative; }
.ex-bar button::after { content: ""; position: absolute; inset: -8px 0; }
.ex-bar:hover button { height: 7px; }
.ex-bar button i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.ex-bar button[aria-current="true"] i { background: #fff; }
@media (max-width: 640px) { .ex-label { font-size: .88rem; } }
#paper-wm .paper-svg { max-width: 820px; }
.example .ex-bar { display: flex; margin: 0; }
.example .ex-bar li { color: inherit; }
.example .ex-bar button { height: 4px; padding: 0; border-radius: 2px; background: rgb(255 255 255 / .32); box-shadow: none; outline: 0; }
.example .ex-bar:hover button { height: 7px; background: rgb(255 255 255 / .4); }
.example .ex-bar button[aria-current="true"] { box-shadow: none; }
.example .ex-bar button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.split > figure.paper-fig { counter-increment: none; }
.paper-fig.strip { counter-increment: fig; }
.paper-fig.strip > figcaption::before { content: "Figure " counter(fig) ". "; font-weight: 600; color: var(--ink); }
.split > figure.paper-fig.strip { counter-increment: fig; }

/* ================= One column: every figure keeps the width of the text ================= */
.fig-overview { width: auto !important; margin-left: 0 !important; transform: none !important; }
.split { width: auto; margin-left: 0; transform: none; }
.paper-fig.strip .paper-svg, #paper-wm .paper-svg, #paper-pre .paper-svg, #paper-post .paper-svg { max-width: none; margin: 0; }
#paper-ov .paper-svg { min-width: 760px; }
.wm-split { grid-template-columns: 680fr 826fr; gap: 20px; }
.wm-split .paper-svg { min-width: 0 !important; }
.wm-split .fig-bar .part-note { font-size: .78rem; }
@media (max-width: 760px) { .wm-split { grid-template-columns: 1fr; } }
.paper-fig .frame-glow.strong { stroke-width: 6; opacity: 1; }
.paper-fig .frame-hit { fill: transparent; cursor: pointer; }

/* chapter bar in the subtask colours */
.example .ex-bar button { background: color-mix(in srgb, var(--seg) 40%, rgb(255 255 255 / .35)); }
.example .ex-bar:hover button { background: color-mix(in srgb, var(--seg) 55%, rgb(255 255 255 / .35)); }
.example .ex-bar button i { background: var(--seg); }
.example .ex-bar button[aria-current="true"] { box-shadow: 0 0 0 1px rgb(255 255 255 / .6); }
.ex-k { display: inline-block; padding: 3px 7px; border-radius: 4px; background: var(--seg, #555); opacity: 1; }
#paper-sp { margin-bottom: 22px; }

/* ================= Pre-training: the chosen future frame ================= */
.paper-fig .pick-mark { fill: none; stroke-width: 3.5; transition: x .2s, width .2s, stroke .2s; pointer-events: none; }
.paper-fig .pick-label { font: 700 13px Arimo, Arial, sans-serif; pointer-events: none; }
.paper-fig.paused .pick-mark { opacity: 1; }

/* ================= Image world model: the examples on their own ================= */
.goal-gallery { margin: 30px 0; }
.gg { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; grid-template-rows: auto 1fr auto 1fr; gap: 8px 10px; align-items: center; }
.gg-obs { grid-column: 1; grid-row: 1 / 5; margin: 0; align-self: center; padding-right: 10px; }
.gg-obs img { width: 100%; border-radius: 6px; border: 2px solid #8b9196; }
.gg-obs figcaption { margin-top: 6px; text-align: center; font-size: .86rem; color: var(--ink); }
.gg-h { grid-row: 1; text-align: center; font-family: var(--display); font-size: 1rem; color: var(--ink); }
.gg-p { grid-column: 2 / 5; margin: 6px 0 0; font-family: var(--display); font-size: 1rem; color: var(--ink); }
.gg-p::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--dot); vertical-align: 1px; }
.gg-p.cart { --dot: #0C8474; grid-row: 2; align-self: end; } .gg-p.trash { --dot: #C8374F; grid-row: 4; align-self: end; }
.gg-p.cart b { color: #0C8474; font-weight: 600; } .gg-p.trash b { color: #C8374F; font-weight: 600; }
.gg-i { width: 100%; border-radius: 6px; border: 2px solid #2B67AA; transition: transform .25s var(--ease), box-shadow .25s; }
.gg-i:hover { transform: scale(1.04); box-shadow: 0 10px 26px -12px rgb(20 30 40 / .5); position: relative; z-index: 1; }
/* the six predictions are the only <img> children of .gg: 1–3 are the cart row, 4–6 the trash-can row, Δt 0.8 / 2 / 4 s */
.gg > .gg-i:nth-of-type(-n+3) { grid-row: 3; }
.gg > .gg-i:nth-of-type(n+4) { grid-row: 5; }
.gg > .gg-i:nth-of-type(3n+1) { grid-column: 2; }
.gg > .gg-i:nth-of-type(3n+2) { grid-column: 3; }
.gg > .gg-i:nth-of-type(3n) { grid-column: 4; }
.gg > .gg-h:nth-of-type(1) { grid-column: 2; } .gg > .gg-h:nth-of-type(2) { grid-column: 3; } .gg > .gg-h:nth-of-type(3) { grid-column: 4; }
.gg { grid-template-rows: auto auto auto auto auto; }
.gg-obs { grid-row: 1 / 6; }
@media (max-width: 640px) { .gg { grid-template-columns: repeat(3, 1fr); } .gg-obs { grid-column: 1 / 4; grid-row: auto; padding: 0 20% 6px; } .gg-h { grid-row: auto; } .gg-p { grid-column: 1 / 4; grid-row: auto !important; } .gg > .gg-i { grid-row: auto !important; grid-column: auto !important; } .gg > .gg-h { grid-column: auto !important; } }

/* ================= Subtask prediction, drawn in the page ================= */
.sp-fig { --sp-blue: #2B67AA; --s1: #5A6A8E; --s2: #0C8474; --s3: #8A6CC9; margin: 26px 0 22px; }
.sp { background: #EEF4FB; border: 1.5px solid #A9C9EC; border-radius: 14px; padding: 16px 18px 18px; font-family: var(--display); }
.sp-title { margin: 0 0 12px; font: 700 1.55rem/1.1 var(--display); color: var(--sp-blue); }
.sp-flow { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.sp-pill, .sp-box { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #fff; font-size: 1.05rem; color: #7c8794; padding: 6px 18px; border: 1.8px solid #A9C9EC; white-space: nowrap; transition: border-color .25s, box-shadow .25s, color .25s, opacity .3s; cursor: pointer; }
.sp-pill:first-child { flex: 1 1 0; }
.sp-out { flex: 1.15 1 0; }
.sp-box { border-radius: 14px; border: 2.2px solid var(--sp-blue); color: var(--ink); font-weight: 700; font-size: 1.22rem; padding: 7px 18px; }
.sp-box i { font-style: italic; } .sp-box sub { font-size: .6em; }
.sp-out.on { border-color: var(--sp-blue); color: var(--ink); }
.sp-out.sw.on { border-color: var(--s2); background: color-mix(in srgb, var(--s2) 10%, white); }
.sp-wire { flex: 0 0 34px; height: 14px; overflow: visible; }
.sp-wire path { fill: none; stroke: var(--sp-blue); stroke-width: 2; }
.sp-wire .hd { fill: var(--sp-blue); stroke: none; }
.sp-wire circle { fill: var(--sp-blue); stroke: #fff; stroke-width: 1.2; animation: sp-dot 1.4s linear infinite; }
@keyframes sp-dot { from { cx: 2; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { cx: 32; opacity: 0; } }
.sp-fig.paused .sp-wire circle { animation-play-state: paused; opacity: 0; }
.sp-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 74px; gap: 8px 8px; }
.sp-grid > img:nth-child(3) { margin-left: 10px; } .sp-grid > img:nth-child(3), .sp-grid > .sp-d:nth-of-type(3) { margin-left: 10px; }
.sp-grid img { width: 100%; aspect-ratio: 590 / 376; object-fit: cover; display: block; cursor: pointer; border: 2px solid transparent; transition: border-color .25s, opacity .3s, transform .25s var(--ease); }
.sp-grid img.on { border-color: var(--sp-blue); }
.sp-d { display: flex; align-items: center; justify-content: center; gap: 0; border-radius: 999px; font-size: 1.08rem; color: var(--ink); border: 1.8px solid var(--tone); background: color-mix(in srgb, var(--tone) 14%, white); cursor: pointer; overflow: hidden; transition: box-shadow .25s, opacity .3s; height: 34px; }
.sp-d.sw { background: #fff; }
.sp-d.sw b { flex: 1; height: 100%; display: grid; place-items: center; font-weight: 700; border-right: 1.8px solid var(--tone); }
.sp-d.sw span { flex: 1.1; height: 100%; display: grid; place-items: center; background: color-mix(in srgb, var(--next) 16%, white); }
.sp-d.s1 { --tone: var(--s1); --next: var(--s2); } .sp-d.s2 { --tone: var(--s2); --next: var(--s3); }
.sp-d.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 28%, transparent); }
.sp-bar { display: flex; align-items: center; justify-content: center; height: 36px; color: #fff; font-size: 1.12rem; background: var(--tone); cursor: pointer; transition: filter .25s, opacity .3s, box-shadow .25s; }
.sp-bar.s1 { --tone: var(--s1); grid-column: 1 / 3; } .sp-bar.s2 { --tone: var(--s2); grid-column: 3 / 5; margin-left: 10px; }
.sp-bar.s3 { --tone: var(--s3); clip-path: polygon(0 0, 72% 0, 100% 50%, 72% 100%, 0 100%); }
.sp-bar.on { box-shadow: inset 0 0 0 2px rgb(255 255 255 / .7); filter: saturate(1.15); }
.sp-gap { display: block; }
.sp-fig.has-focus [data-k]:not(.on) { opacity: .38; }
.sp-fig.has-focus .sp-wire { opacity: 1; }
@media (max-width: 760px) { .sp { overflow-x: auto; } .sp > * { min-width: 700px; } }
.sp-out { min-width: 0; }
.sp-out > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-pill:first-child { flex: 0 1 auto; }
.sp-grid { grid-template-columns: 1fr 1fr 12px 1fr 1fr 64px; gap: 8px 6px; }
.sp-grid > img:nth-child(3), .sp-grid > .sp-d:nth-of-type(3) { margin-left: 0; }
.sp-grid > [data-k=f0], .sp-grid > [data-k=d0] { grid-column: 1; } .sp-grid > [data-k=f1], .sp-grid > [data-k=d1] { grid-column: 2; }
.sp-grid > [data-k=f2], .sp-grid > [data-k=d2] { grid-column: 4; } .sp-grid > [data-k=f3], .sp-grid > [data-k=d3] { grid-column: 5; }
.sp-grid > img { grid-row: 1; } .sp-grid > .sp-d { grid-row: 2; } .sp-grid > .sp-bar { grid-row: 3; }
.sp-bar.s1 { grid-column: 1 / 3; } .sp-bar.s2 { grid-column: 4 / 6; margin-left: 0; } .sp-bar.s3 { grid-column: 6; }
.sp-bar { padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-gallery > figcaption { counter-increment: fig; }
.goal-gallery > figcaption::before { content: "Figure " counter(fig) ". "; font-weight: 600; color: var(--ink); }
.sp-fig > figcaption { counter-increment: fig; }
.sp-fig > figcaption::before { content: "Figure " counter(fig) ". "; font-weight: 600; color: var(--ink); }

/* ================= Project-page voice: no figure numbers, short captions ================= */
main figure.wide:not(.feature-film):not(.poses) > figcaption::before, .result-plot > figcaption::before, .fig-action > figcaption::before,
.paper-fig.strip > figcaption::before, .split > figure > figcaption::before, .goal-gallery > figcaption::before, .sp-fig > figcaption::before,
#results figure.wide > figcaption::before { content: none !important; }
.part-note:empty { min-height: 0; }
.fig-bar { padding-top: 8px; margin-top: 8px; border-top: 0; min-height: 30px; }
.part-note { min-height: 1.4em; }
main figcaption { color: var(--muted); font-size: .86rem; margin-top: 8px; }

/* overview: the drawing itself, as wide as the text, no card */
#paper-ov, .fig-overview { background: none !important; padding: 0 !important; border-radius: 0 !important; }
#paper-ov .paper-svg { background: none; min-width: 760px; }

/* image world model: Cosmos beside the sampling */
.wm-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; margin: 26px 0 8px; }
.wm-row > figure { margin: 0 !important; }
#paper-wm .paper-svg { min-width: 0 !important; max-width: none; }
.sparse-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font: 500 .72rem/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sparse-head .stage-steps { margin: 0; }
.sparse-lab { margin: 0 0 6px; font: 600 .8rem/1.2 var(--ui); color: var(--ink-2); }
.dense { display: grid; grid-template-columns: repeat(17, 1fr); gap: 2px; position: relative; }
.dense img { width: 100%; height: 46px; object-fit: cover; border-radius: 2px; outline: 2px solid transparent; outline-offset: -2px; opacity: .55; transition: opacity .3s, outline-color .3s; }
.dense img.now { opacity: 1; outline-color: #667782; }
.dense img.pick { opacity: 1; outline-color: #4E63C6; }
.dense img.out { opacity: .18; }
.dense-axis { position: relative; height: 20px; margin: 4px 0 14px; font: .72rem/1 var(--ui); color: var(--muted); border-top: 1px solid var(--sep); }
.dense-axis span { position: absolute; top: 5px; transform: translateX(-50%); }
.dense-axis span:first-child { transform: none; } .dense-axis span:last-child { transform: translateX(-100%); }
.picked { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.picked figure { margin: 0; text-align: center; }
.picked img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; border: 2px solid #4E63C6; display: block; }
.picked .now img { border-color: #667782; }
.picked figcaption { margin-top: 3px; font-size: .78rem; color: var(--ink-2); }
.latents { display: grid; grid-template-columns: 1fr 4fr; gap: 8px; margin-top: 8px; font: 500 .74rem/1 var(--ui); text-align: center; }
.latents span { padding: 6px 4px; border-radius: 999px; background: #EDF4FB; color: #326D9D; border: 1px solid #A9C2DC; }
.latents .z0 { color: #4b5560; background: #f1f2f3; border-color: #c9ccd0; }
@media (max-width: 860px) { .wm-row { grid-template-columns: 1fr; } }

/* whole-body clips */
.wbc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.wbc figure { margin: 0; }
.wbc video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #111; display: block; }
.wbc figcaption { text-align: center; color: var(--ink-2); }
@media (max-width: 640px) { .wbc { grid-template-columns: 1fr; } }

/* subtask annotations */
.anns { margin: 18px 0 10px; display: grid; gap: 16px; }
.ann-task { margin: 0 0 6px; font-family: var(--display); font-style: italic; font-size: 1rem; color: var(--ink); }
.ann-task span { font-family: var(--ui); font-style: normal; font-size: .74rem; color: var(--muted); margin-left: 6px; }
.ann-bar { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ann-bar li { min-width: 0; height: 30px; display: flex; align-items: center; padding: 0 7px; color: #fff; font: 500 .72rem/1.15 var(--ui); background: var(--c); cursor: default; transition: filter .2s, transform .2s; overflow: hidden; }
.ann-bar li:first-child { border-radius: 6px 0 0 6px; } .ann-bar li:last-child { border-radius: 0 6px 6px 0; }
.ann-bar li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-bar li:nth-child(5n+1) { --c: #5A6A8E; } .ann-bar li:nth-child(5n+2) { --c: #0C8474; } .ann-bar li:nth-child(5n+3) { --c: #8A6CC9; }
.ann-bar li:nth-child(5n+4) { --c: #C27A2C; } .ann-bar li:nth-child(5n) { --c: #3F7FC4; }
.ann-bar li:hover { filter: brightness(1.12); }
.ann-note { margin: 2px 0 0; min-height: 1.4em; font: .84rem/1.4 var(--ui); color: var(--ink-2); }

/* pre-training: the bracket that follows the sequence */
.paper-fig .dyn-brk { fill: none; stroke: #8B71AD; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.paper-fig .dyn-bg { fill: #FFFDFC; }
.paper-fig .dyn-lab { fill: #8B71AD; }
#paper-wm, .wm-row > figure { min-width: 0; }
#paper-wm .scroll-x, #paper-wm .paper-svg { min-width: 0; }
@media (max-width: 760px) { .sp-fig { overflow-x: auto; } .sp { min-width: 700px; } .sp > * { min-width: 0; } }
.anns { grid-template-columns: minmax(0, 1fr); }
.ann, .ann-bar { min-width: 0; }
.ann-bar li { flex-basis: 0; flex-shrink: 1; }

/* ================= Sparse clip: dense strip, the window, the four taken frames ================= */
.sparse .strip { position: relative; height: 60px; border-radius: 4px; background: url(../img/sparse/strip.jpg) 0 0 / 100% 100% no-repeat; }
.sparse .strip::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--dt, 25%); right: 0; background: rgb(255 255 255 / .72); transition: left .6s var(--ease); }
.sparse .band { position: absolute; top: -5px; bottom: -5px; left: 0; width: 25%; border: 2px solid #4E63C6; border-radius: 5px; background: rgb(78 99 198 / .08); transition: width .6s var(--ease); z-index: 1; }
.sparse .tick { position: absolute; top: -12px; bottom: -12px; width: 6px; margin-left: -3px; border-radius: 3px; background: #4E63C6; box-shadow: 0 0 0 2px #fff; z-index: 2; transition: left .6s var(--ease); }
.sparse .tick.now { left: 0 !important; margin-left: 0; background: #667782; }
.sparse .dense-axis { margin-top: 14px; }
.sparse .counts { margin: 0 0 10px; font: .82rem/1.4 var(--ui); color: var(--ink-2); }
.sparse .counts b { color: #11798A; font-weight: 700; }
.picked img { border-width: 3px; }
.dense, .dense img { display: none; }

/* ================= One type family: sans for every label in figures, serif only for math ================= */
.paper-fig .paper-svg svg text { font-family: var(--ui) !important; }
.sp, .sp-title, .sp-pill, .sp-box, .sp-d, .sp-bar { font-family: var(--ui) !important; }
.sp-title { font-weight: 700; letter-spacing: -.01em; }
.sp-box { font-weight: 600; font-size: 1.05rem; }
.sp-box i, .gg i { font-family: var(--display); }
.sp-pill, .sp-d { font-size: .92rem; } .sp-bar { font-size: .95rem; font-weight: 500; }
.gg-h, .gg-p { font-family: var(--ui) !important; font-size: .92rem; }
.gg-p b { font-weight: 700 !important; }

/* steering pair */
.clips.steer { margin-bottom: 8px; }
.sparse .strip { height: 64px; margin-top: 16px; background-size: 100% 100%; }
.sparse .sparse-lab { margin-bottom: 2px; }
.sparse .dense-axis span { white-space: nowrap; }
.sparse .dense-axis { margin-right: 10px; }

/* ================= A logged run: video and the predictor's replies side by side ================= */
.runlog { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; margin: 18px 0 8px; align-items: stretch; }
.rl-video { position: relative; border-radius: 12px; overflow: hidden; background: #111; }
.rl-video video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.rl-task { position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; color: #fff; font: 500 .86rem/1.35 var(--ui); text-shadow: 0 1px 6px rgb(0 0 0 / .6); }
.rl-task span { display: inline-block; margin-right: 6px; padding: 2px 6px; border-radius: 4px; background: rgb(255 255 255 / .2); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.rl-side { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 10px; min-height: 0; font-family: var(--ui); }
.rl-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.rl-steps li { display: flex; gap: 8px; align-items: center; padding: 6px 9px; border-radius: 7px; font-size: .8rem; line-height: 1.25; color: var(--muted); border: 1px solid var(--sep); cursor: pointer; transition: background-color .25s, color .25s, border-color .25s; }
.rl-steps li b { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: var(--c); color: #fff; font-size: .7rem; opacity: .5; }
.rl-steps li.done { color: var(--ink-2); } .rl-steps li.done b { opacity: .8; }
.rl-steps li.on { color: #fff; background: var(--c); border-color: var(--c); font-weight: 600; } .rl-steps li.on b { background: #fff; color: var(--c); opacity: 1; }
.rl-fut { position: relative; display: none; }
.runlog.has-fut .rl-fut { display: block; }
.rl-fut img { display: block; width: 100%; aspect-ratio: 448 / 256; object-fit: cover; border-radius: 7px; border: 2px solid #2B67AA; }
.rl-fut span { position: absolute; top: 2px; left: 2px; padding: 1px 7px 2px; border-radius: 5px 0 5px 0; background: #2B67AA; color: #fff; font-size: .68rem; }
.rl-log { margin: 0; padding: 6px 8px; list-style: none; overflow-y: auto; min-height: 90px; max-height: 100%; border-radius: 7px; background: #f6f7f8; font-size: .74rem; line-height: 1.5; color: var(--muted); scrollbar-width: thin; }
.rl-log li { display: flex; gap: 8px; }
.rl-log time { flex: none; width: 30px; font-variant-numeric: tabular-nums; color: #a4a9ae; }
.rl-log li.sw { color: var(--ink); } .rl-log li.sw b { color: var(--c); margin-right: 2px; }
@media (max-width: 760px) { .runlog { grid-template-columns: 1fr; } .rl-log { max-height: 160px; } }
.runlog { align-items: start; }
.rl-video { aspect-ratio: 672 / 376; }
.rl-side { height: 0; min-height: 100%; align-self: stretch; grid-template-rows: auto minmax(0, 1fr); }
.rl-log { min-height: 0; height: 100%; }
@media (max-width: 760px) { .rl-side { height: auto; } .rl-log { height: 160px; } }

/* ================= TL;DR as one tinted block; numbered key points ================= */
main .tldr .tldr-box { background: color-mix(in srgb, var(--predictor) 8%, #fbfbf9); border: 1px solid color-mix(in srgb, var(--predictor) 22%, white); border-radius: 16px; padding: clamp(20px, 3vw, 32px) clamp(20px, 3.2vw, 36px); }
main .tldr .tldr-box h2 { margin: 0 0 12px; padding: 0; border: 0; font-family: var(--ui); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--predictor-ink); }
main .tldr .tldr-box p { margin: 0 0 12px; font-size: 1.12rem; line-height: 1.6; color: var(--ink); }
main .tldr .tldr-box p:last-child { margin-bottom: 0; }
main .tldr .tldr-box .open { margin-top: 16px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--predictor) 20%, white); font-size: .98rem; color: var(--ink-2); }
main .tldr .tldr-box .open strong { display: block; margin-bottom: 2px; font-size: 1.06rem; color: var(--predictor-ink); }
main ol.points { margin: 0 0 16px; padding-left: 1.3em; font-size: 1.04rem; line-height: 1.6; }
main ol.points li { margin-bottom: 6px; padding-left: 4px; }
.sparse > figcaption { margin-top: 10px; }
.runlog { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.rl-video { aspect-ratio: 4 / 3; }
.rl-steps { gap: 3px; }
.rl-steps li { padding: 4px 8px; font-size: .76rem; }
.rl-steps li b { width: 16px; height: 16px; font-size: .64rem; }
.rl-log { min-height: 120px; }
.rl-video { aspect-ratio: 672 / 384; }
.runlog { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
main .tldr .tldr-box p b { color: var(--predictor-ink); }
.release-box { margin-top: 16px; padding: 18px clamp(20px, 3.2vw, 36px) 20px; border-radius: 16px; background: #17191c; color: #fff; }
.release-head { margin: 0 0 12px !important; font: 700 1.3rem/1.2 var(--ui) !important; letter-spacing: -.01em; color: #fff !important; }
.release-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.release-list li { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; background: rgb(255 255 255 / .08); }
.release-list b { font: 600 .98rem/1.2 var(--ui); color: #7fdcc9; }
.release-list span { font: 400 .84rem/1.35 var(--ui); color: rgb(255 255 255 / .78); }
@media (max-width: 760px) { .release-list { grid-template-columns: 1fr 1fr; } }
main .tldr .tldr-box .open { margin-top: 14px; padding-top: 14px; font-size: 1.12rem; color: var(--ink); }
main .tldr .tldr-box .open b { display: inline; font-size: inherit; color: var(--predictor-ink); }
main .tldr .tldr-box .open:only-child { margin: 0; padding: 0; border: 0; }

/* the post-training strip: a looping montage laid over the drawing, at the place of the stage-2 thumbnails */
.paper-fig .paper-svg { position: relative; }
.paper-fig .fig-video { position: absolute; display: block; object-fit: cover; border-radius: 4px; background: #111; pointer-events: none; transition: opacity .3s var(--ease); }
.paper-fig.has-focus:not([data-focus="Whole-body post-training"]) .fig-video { opacity: .28; }

/* Results: does the pre-trained VLM read the future image? (assets/js/vlm-steer.js) */
.vsteer { --vs-L: #C8374F; --vs-R: #2B67AA; --vs-no: #9a9ea3; margin: 22px 0 10px; }
.vs-scenes { display: grid; grid-template-columns: repeat(6, minmax(0, 112px)); gap: 8px; margin-bottom: 16px; }
.vs-scene { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 7px; overflow: hidden; aspect-ratio: 320 / 175; opacity: .5; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .25s var(--ease), outline-color .25s var(--ease); }
.vs-scene img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vs-scene:hover { opacity: .85; }
.vs-scene.on { opacity: 1; outline-color: var(--ink); }
.vs-body { display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 3fr); gap: 12px; align-items: start; }
.vs-head, .vs-panel figcaption { margin: 0 0 7px; font: 600 .82rem/1.25 var(--ui); color: var(--ink-2, #4a4f55); letter-spacing: .01em; }
.vs-goals { display: flex; flex-direction: column; gap: 6px; }
.vs-goal { --c: var(--vs-L); position: relative; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; border-radius: 7px; overflow: hidden; aspect-ratio: 320 / 175; box-shadow: inset 0 0 0 2px transparent; opacity: .45; transition: opacity .25s var(--ease); }
.vs-goal.RR { --c: var(--vs-R); }
.vs-goal::after { content: ""; position: absolute; inset: 0; border-radius: 7px; box-shadow: inset 0 0 0 2.5px var(--c); pointer-events: none; }
.vs-goal img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vs-goal.on { opacity: 1; }
.vs-goal-lab { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 2px 7px; border-radius: 5px; background: var(--c); color: #fff; font: 600 .68rem/1.35 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-goal[aria-pressed="true"] .vs-goal-lab::before { content: "● "; font-size: .6rem; vertical-align: 1px; }
.vs-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vs-panel { margin: 0; }
.vs-view { position: relative; }
.vs-panel figcaption span { font-weight: 400; color: var(--muted); }
.vs-panel.ours figcaption { color: var(--ink); }
.vs-panel svg { display: block; width: 100%; height: auto; border-radius: 7px; background: #e9e9e6; }
.vs-panel.ours svg { box-shadow: 0 0 0 2px var(--ink); }
.vs-badge { position: absolute; top: 6px; padding: 1px 6px; border-radius: 5px; background: var(--vs-no); color: #fff; font: 700 .7rem/1.4 var(--ui); opacity: 0; transform: translateY(-2px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.vs-badge i { font-style: normal; margin-left: 4px; }
.vs-badge.L { left: 6px; } .vs-badge.R { right: 6px; }
.vs-badge.on { opacity: 1; transform: none; }
.vs-badge.L.ok { background: var(--vs-L); } .vs-badge.R.ok { background: var(--vs-R); }
.vs-arrow .halo { fill: none; stroke: #fff; stroke-width: 5.2; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.vs-arrow .line { fill: none; stroke: var(--c); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.vs-arrow.LL { --c: var(--vs-L); } .vs-arrow.RR { --c: var(--vs-R); }
.vs-arrow .start { fill: var(--c); stroke: #fff; stroke-width: 1.4; }
.vs-arrow.anim .body { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: vs-draw .85s var(--ease) forwards; }
.vs-arrow.anim .head { opacity: 0; animation: vs-fade .2s ease-out .62s forwards; }
.vs-arrow.anim .start { animation: vs-fade .2s ease-out both; }
@keyframes vs-draw { to { stroke-dashoffset: 0; } }
@keyframes vs-fade { from { opacity: 0; } to { opacity: 1; } }
.vsteer figcaption:last-child { margin-top: 12px; }
@media (max-width: 760px) {
  .vs-scenes { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
  .vs-body { grid-template-columns: 1fr; }
  .vs-goals { display: grid; grid-template-columns: 1fr 1fr; }
  .vs-head { grid-column: 1 / -1; }
  .vs-panels { grid-template-columns: 1fr; }
}

/* Tasks: the captions under the clips read as text, not as fine print */
.clips figcaption { color: var(--ink); }

/* math symbols inside the subtask figure: serif italic, like the paper's notation */
.sp-box i.m { font-family: var(--display), Georgia, "Times New Roman", serif; font-weight: 600; margin-left: 2px; }
.sp-box sub i { font-family: var(--display), Georgia, "Times New Roman", serif; }

/* How Ψ0.1 works: the focused part grows above the veil (paper-anim.js, spec.zoom) */
.paper-fig .zoom { opacity: 0; pointer-events: none; }
.paper-fig .zoom.on { opacity: 1; filter: drop-shadow(0 10px 22px rgb(20 25 30 / .22)); }
.paper-fig .zoom-bg { fill: #fff; }
#paper-ov .paper-svg, #paper-ov .paper-svg svg { overflow: visible; }
#paper-ov .scroll-x { overflow: visible; }
@media (max-width: 800px) { #paper-ov .scroll-x { overflow-x: auto; } }

/* Page colours taken from the Ψ0 project page (psi-lab.ai/Psi0): a warm paper background, cards a shade lighter with a
   hairline edge, and figures kept on white */
:root { --page: #f7efe7; --paper: #f7efe7; --panel: #fcf9f5; --frame: #fcf9f5; --fill: #efe6dc; --card-edge: rgb(76 79 105 / .08); }
html, body { background: var(--page); }
header.hero { background: var(--page); }   /* one colour from the top: no band behind the title and the video */
.fig-overview, .arch, .goal-comparison, .result-plot { border: 1px solid var(--card-edge); }
.paper-fig .paper-svg, .figure-img { box-shadow: 0 1px 0 var(--card-edge); }

/* Figures sit on the page colour, not on white cards; the spotlight veil takes the page colour too */
.paper-fig .paper-svg { background: transparent; }
.paper-fig .veil, .paper-fig .branch-veil { fill: var(--page); }
.paper-fig .zoom-bg { fill: var(--page); }
#paper-ov rect[width="2376"] { fill: none; }      /* the overview's canvas */
.paper-fig #tokrow > rect:first-child { fill: var(--page); }   /* backdrop of the redrawn token row: page colour */
.paper-fig.fig-overview { border: 0; }
.paper-fig .paper-svg { box-shadow: none; }
.paper-fig .dyn-bg { fill: var(--page); }
/* the Cosmos strip and the sparse-clip widget: same height, captions on one line */
.wm-row { align-items: stretch; }
.wm-row > figure { display: flex; flex-direction: column; }
.wm-row > figure > figcaption:last-child { margin-top: auto; padding-top: 10px; }
#paper-ov path[fill="rgb(98.431396%, 98.431396%, 98.823547%)"][stroke="rgb(90.196228%, 91.372681%, 93.333435%)"] { fill: none; stroke: none; }   /* the overview's outer panel */
