:root {
  /* Palette shared with the demo (app/src/styles.css) and the README badges */
  --brand: #0f766e;
  --brand-hover: #115e59;
  --brand-soft: #e8f3f1;
  --ink: #252a31;
  --muted: #696f78;
  --line: #e0e3e7;
  --soft: #f5f6f8;
  --static: #7d97a8;
  --dynamic: #de933e;
  --rest: #c5e1db;
  --col: 56rem;
}
* { box-sizing: border-box; }
p { text-wrap: pretty; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 1.0625rem/1.65 "DM Sans", system-ui, sans-serif; }
a { color: var(--brand); text-underline-offset: .2em; }
a:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
sup { font-size: .65em; }

header, main section, footer { width: min(var(--col), 100% - 2rem); margin-inline: auto; }

/* Page rhythm: three parts (Method, Results, Efficiency). Parts are separated by large gaps and
   alternating bands; sections inside a part sit closer together. */
.part { padding-block: clamp(3.5rem, 8vw, 6rem); }
.part.band { background: var(--soft); }
.part > section + section { padding-top: clamp(4rem, 9vw, 6.5rem); }
main > section:not(.teaser) { padding-block: clamp(3.5rem, 8vw, 5rem) 0; }

/* Hero */
.hero { text-align: center; padding-top: clamp(3rem, 8vw, 5rem); }
.mark { display: inline-grid; margin: 0; font-size: clamp(4.5rem, 14vw, 8.5rem); font-weight: 700; line-height: .85; letter-spacing: -.055em; }
.mark .layer { grid-area: 1 / 1; }
.mark .layer:not(.top) { color: transparent; -webkit-text-stroke: 1.5px var(--c); }
.mark .layer:nth-child(1) { --c: var(--static); transform: translate(.09em, -.09em); }
.mark .layer:nth-child(2) { --c: color-mix(in oklab, var(--static), var(--dynamic)); transform: translate(.06em, -.06em); }
.mark .layer:nth-child(3) { --c: var(--dynamic); transform: translate(.03em, -.03em); }
.mark .layer.top { color: var(--brand); }
@media (prefers-reduced-motion: no-preference) {
  .mark .layer:not(.top) { animation: settle 1.2s cubic-bezier(.2, .7, .1, 1) .2s backwards; }
  @keyframes settle { from { transform: none; opacity: 0; } }
}
.title { width: min(80rem, 100vw - 2rem); margin: 2rem 0 1.1rem 50%; translate: -50% 0; font-size: clamp(1.5rem, 2.6vw, 2.35rem); font-weight: 600; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.authors { margin: 0; font-size: clamp(1.0625rem, 1.5vw, 1.3rem); }
.affil { margin: .45rem 0 0; color: var(--muted); font-size: clamp(.9375rem, 1.2vw, 1.0625rem); }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; margin-top: 1.75rem; }
.links a {
  color: var(--ink); background: #fff; border: 1px solid #ccd1d8; text-decoration: none; font-weight: 500;
  padding: .55rem 1.25rem; border-radius: 8px; font-size: 1.0625rem; transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.links a:hover { color: var(--brand); border-color: var(--accent-border, #9fcdc6); background: var(--brand-soft); }

/* Sections */
h2 { text-align: center; font-size: clamp(1.7rem, 3.4vw, 2.25rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; margin: 0 0 .6rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 2.2rem 0 .8rem; }
h2 + * { margin-top: 1.6rem; }
.abstract { text-align: justify; hyphens: auto; margin: 1rem 0 0; }
.teaser { padding: 2.5rem 0 clamp(2.5rem, 6vw, 3.5rem); }

.tldr { display: grid; grid-template-columns: auto minmax(0, max-content); justify-content: center; column-gap: .55em; width: min(80rem, 100vw - 2rem); margin: 2.25rem 0 0 50%; translate: -50% 0; font-size: clamp(1.0625rem, 1.6vw, 1.3rem); line-height: 1.6; text-wrap: pretty; }
.tldr strong { color: var(--brand); font-weight: 700; }
.tldr > span > span { display: block; }
.tldr > span > span + span { margin-top: .2rem; }

/* Scroll cue: pinned to the bottom of the first screen, gone once the TL;DR comes into view */
.more {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 3; display: grid; place-items: center; width: 3rem; height: 3rem;
  translate: -50% 0; border-radius: 50%; color: var(--brand); background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .14), 0 8px 24px rgb(15 118 110 / .16);
  transition: opacity .35s ease, translate .35s ease, visibility 0s linear .35s, box-shadow .2s ease;
}
.more svg { width: 1.35rem; height: 1.35rem; }
.more:hover { box-shadow: 0 1px 3px rgb(0 0 0 / .14), 0 10px 28px rgb(15 118 110 / .28); }
.more::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--brand); opacity: 0; }
.more.gone { opacity: 0; visibility: hidden; translate: -50% .75rem; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .more svg { animation: more-bob 1.8s ease-in-out infinite; }
  .more::after { animation: more-ring 2.4s ease-out infinite; }
  @keyframes more-bob { 0%, 100% { translate: 0 -2px; } 50% { translate: 0 3px; } }
  @keyframes more-ring { 0% { opacity: .5; scale: 1; } 80%, 100% { opacity: 0; scale: 1.5; } }
}

/* Media */
video, .still { display: block; width: 100%; aspect-ratio: 5 / 3; object-fit: cover; background: var(--soft); border-radius: 6px; }
#teaser { aspect-ratio: 16 / 9; }
.cell { position: relative; }
.tag { position: absolute; top: .45rem; left: .45rem; font-size: .8125rem; line-height: 1.3; padding: .15rem .5rem; border-radius: 4px; color: #fff; background: rgb(20 23 28 / .62); pointer-events: none; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row { display: grid; gap: .5rem; margin-bottom: 1rem; }
.row.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row.r4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prompt { margin: .45rem 0 0; color: var(--muted); font-size: .9375rem; line-height: 1.5; text-wrap: pretty; }

/* Readout wipe */
.wipe { position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 5 / 3; }
.wipe video { position: absolute; inset: 0; height: 100%; border-radius: 0; }
.wipe-over { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x, 33%)) 0 0); }
.wipe-over::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--x, 33%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .15); }
.wipe { cursor: pointer; touch-action: pan-y; }
.wipe.near { cursor: ew-resize; }
/* Kept for the keyboard only: the divider follows a drag, never jumps to a click. */
.wipe input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; pointer-events: none; }
.wipe .tag.right { left: auto; right: .45rem; }
.wipe-over video { opacity: 0; }
.wipe-over video.on { opacity: 1; }

/* Readout grid: all four cases at once, each close to the clips' native 560 px */
.quad { width: var(--sw); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.slide .quad { width: auto; }
section > .quad { margin-left: 50%; translate: -50% 0; }  /* wider than the text column, centred on the page */
/* Result card: the result fills the card, the input sits in a small window at the lower left */
.card { position: relative; }
.pip { position: absolute; left: .55rem; bottom: .55rem; width: 31%; border-radius: 4px; overflow: hidden;
  box-shadow: 0 0 0 2px #fff, 0 2px 10px rgb(0 0 0 / .28); }
.pip video, .pip img { display: block; width: 100%; aspect-ratio: 5 / 3; object-fit: cover; border-radius: 0; }
.pip .tag { top: .25rem; left: .25rem; font-size: .6875rem; padding: .05rem .35rem; }
/* Video editing: the edit instruction under each result, like a prompt */
.edited { margin: 0; }
.edited figcaption { display: flex; gap: .45rem; align-items: baseline; margin-top: .55rem; font-size: .9375rem; line-height: 1.4; color: var(--ink); }
.edited figcaption::before { content: "Edit"; flex: none; font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: var(--brand);
  background: var(--brand-soft); border-radius: 4px; padding: .05rem .4rem; }
/* Multiple views: four views by camera position, the input view in the centre */
.mvq { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: .5rem; }
.mvq .c1 .tag { left: auto; right: .45rem; }
.mvq .r1 .tag { top: auto; bottom: .45rem; }
.mvq .center { position: absolute; left: 50%; top: 50%; width: 30%; translate: -50% -50%; border-radius: 5px; overflow: hidden;
  box-shadow: 0 0 0 3px #fff, 0 4px 18px rgb(0 0 0 / .3); }
.mvq .center video { border-radius: 0; }
.mvq .center .tag { font-size: .75rem; }
.quad .grip { width: 2rem; height: 2rem; margin: -1rem 0 0 -1rem; }
.quad .grip::before { left: .22rem; } .quad .grip::after { right: .22rem; }
@media (max-width: 640px) { .quad { grid-template-columns: 1fr; width: 90vw; } }

/* Representation switch above the readout wipe (button style shared with the Demo) */
.reps { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.rep-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.rep-tabs button {
  padding: .4rem .9rem; border: 1px solid #ccd1d8; border-radius: 8px; background: #fff; color: var(--ink);
  font: 500 .9375rem/1.2 "DM Sans", sans-serif; cursor: pointer; transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.rep-tabs button:hover { background: var(--soft); border-color: #a8b1bc; }
.rep-tabs button[aria-pressed="true"] { color: #fff; background: var(--brand); border-color: var(--brand); }

/* Multi-view */
.mv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; margin-bottom: 1.5rem; align-items: start; }
.mv .views { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

/* Long horizon */
.long { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .5rem; margin-bottom: 1rem; align-items: start; }

/* Cost */
.cost { display: grid; grid-template-columns: minmax(0, 2.2fr) auto auto; gap: 1.6rem 2.5rem; align-items: center; }
.accum { margin: 0; }
.accum.wide-row { grid-column: 1 / -1; margin-top: .6rem; }
.cost-head { display: block; margin: 0 0 .7rem; font-weight: 500; font-size: .9375rem; }
.accum input { display: block; }
.accum label { display: block; font-weight: 500; margin-bottom: .3rem; font-size: .9375rem; }
.accum input { width: min(22rem, 100%); accent-color: var(--brand); margin: 0 0 .8rem; }
.accum .bar i { transition: width .3s ease; }
.bar-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 13rem; gap: .8rem; align-items: center; margin-bottom: .55rem; font-size: .9375rem; }
.bar-row span:last-child { color: var(--muted); text-align: right; }
.bar { height: .7rem; background: var(--soft); border-radius: 3px; overflow: hidden; }
.bar { display: flex; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--dynamic); transition: width .3s ease; }
.bar i.cond { min-width: 3px; }
.bar i.rest { background: var(--rest); }
.legend { margin: .3rem 0 0; color: var(--muted); font-size: .875rem; }
.legend i { display: inline-block; width: .7em; height: .7em; background: var(--dynamic); border-radius: 2px; margin: 0 .4em 0 0; vertical-align: -.05em; }
.legend i.rest { background: var(--rest); margin-left: 1.2em; }
.cost .note { grid-column: 1 / -1; margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.fact { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.3; }
.fact strong { display: block; color: var(--ink); font-size: 2.4rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }

/* Compare */
.cmp-head { margin: 0 0 .4rem; font-size: 1rem; font-weight: 600; }
.cmp-head.ours { color: var(--brand); }
.cmp .row { margin-bottom: 1.1rem; }
.cmp .row:last-child { margin-bottom: 0; }
.stack { aspect-ratio: 5 / 3; }
.stack video { position: absolute; inset: 0; height: 100%; opacity: 0; }
.stack video.on { opacity: 1; }

pre { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1.1rem 1.4rem; overflow-x: auto; margin-top: 1rem; }
pre code { font: 500 .9375rem/1.65 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink); }
footer { padding: 4rem 0 3rem; color: var(--muted); font-size: .875rem; text-align: center; }
footer p { margin: 0 0 1rem; }
/* Sources & Credits: collapsed by default, tables left-aligned under a centred toggle */
.credits { text-align: left; border-top: 1px solid var(--line); padding-top: 1rem; }
.credits summary { width: max-content; margin: 0 auto; cursor: pointer; color: var(--ink); font-weight: 500; }
.credits summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.credits-note { margin: .9rem 0 0; text-align: center; }
.credit-group h3 { margin: 1.6rem 0 .5rem; color: var(--ink); font-size: .9375rem; font-weight: 600; }
.credit-scroll { overflow-x: auto; }
.credits table { width: 100%; border-collapse: collapse; font-size: .8125rem; line-height: 1.45; }
.credits th, .credits td { padding: .35rem .6rem .35rem 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.credits th { color: var(--ink); font-weight: 600; white-space: nowrap; }
.credits td:first-child { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .grid.two, .mv, .long { grid-template-columns: 1fr; }
  .row.r4 { grid-template-columns: 1fr 1fr; }
  .row.r3 { grid-template-columns: 1fr; }
  .cost { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .cost .accum { grid-column: 1 / -1; }
  .bar-row { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .bar-row span:last-child { grid-column: 2; text-align: left; margin-top: -.3rem; }
}

/* Carousel: one example block per slide, neighbours peek in at the sides */
/* The carousel is wider than the text column so the shown block keeps the column's width
   while its neighbours peek in at the sides (slide 88% of 70.5rem = 62rem). */
:root { --sw: min(56rem, 86vw); }
[hidden] { display: none !important; }  /* parts switched off in index.html */  /* width of one example block: about two native 560 px clips across */
.carousel { width: min(calc(100vw - 2rem), 80rem); margin-left: 50%; translate: -50% 0; }
.stage { position: relative; }
.track {
  display: flex; gap: 1rem; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  scrollbar-width: none; align-items: flex-start; padding-inline: calc((100% - var(--sw)) / 2); transition: height .3s ease;
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 8px; }
.slide { flex: 0 0 var(--sw); scroll-snap-align: center; opacity: .35; transition: opacity .3s ease; cursor: pointer; }
.slide.on { opacity: 1; cursor: pointer; position: relative; }
/* Clicking the shown example pauses the whole area; a small mark says it is paused. */
#readout { position: relative; }
.held .slide.on::after, #readout.held::after {
  content: "❚❚"; position: absolute; top: .5rem; right: .5rem; z-index: 3; padding: .2rem .5rem; border-radius: 6px;
  background: rgb(0 0 0 / .55); color: #fff; font: 600 .75rem/1.2 "DM Sans", sans-serif; letter-spacing: -.1em; pointer-events: none;
}
#readout.held::after { top: 50%; right: auto; left: 50%; translate: -50% -50%; }  /* where the four readouts meet */
.single .slide { opacity: 1; }
.slide .row, .slide .mv, .slide .long, .slide figure { margin: 0; }
.arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 3rem; height: 3rem; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--ink); font: 500 1.25rem/1 "DM Sans", sans-serif;
  box-shadow: 0 1px 3px rgb(0 0 0 / .18), 0 6px 16px rgb(0 0 0 / .12);
  transition: transform .15s ease, opacity .2s ease;
}
.arrow.prev { left: calc((100% - var(--sw)) / 2 - 1.5rem); }
.arrow.next { right: calc((100% - var(--sw)) / 2 - 1.5rem); }
.arrow:hover:not(:disabled) { transform: translateY(-50%) scale(1.06); }
.arrow:disabled { opacity: 0; pointer-events: none; }
.arrow:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.under { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; width: var(--sw); margin: 1rem auto 0; font-size: .9375rem; }
.single .under { grid-template-columns: 1fr; }
.under .name { font-weight: 500; }
.under .count { justify-self: end; color: var(--muted); font-variant-numeric: tabular-nums; }
.dots { display: flex; gap: .45rem; }
.dots button { width: .5rem; height: .5rem; padding: 0; border: 0; border-radius: 999px; background: #cfd4da; cursor: pointer; transition: width .25s ease, background .25s ease; }
.dots button[aria-current="true"] { width: 1.4rem; background: var(--brand); }

/* Wipe handle */
.grip {
  position: absolute; top: 50%; left: var(--x, 33%); z-index: 1; width: 2.6rem; height: 2.6rem; margin: -1.3rem 0 0 -1.3rem;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); pointer-events: none;
}
.grip::before, .grip::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -.35rem; border: .35rem solid transparent; }
.grip::before { left: .35rem; border-right-color: var(--ink); }
.grip::after { right: .35rem; border-left-color: var(--ink); }

/* Link icons */
.links a { display: inline-flex; align-items: center; gap: .45rem; }
.links svg { width: 1.1rem; height: 1.1rem; flex: none; }
.links .i-arxiv { color: #b31b1b; }
.links .i-gh { color: var(--ink); }
.links .i-hf { color: #3a3b45; }
.links .i-hf circle { fill: #ffd21e; }

/* BibTeX copy */
.bib { position: relative; }
.copy {
  position: absolute; top: .65rem; right: .65rem; display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; border: 1px solid #ccd1d8; border-radius: 8px; background: #fff; color: var(--ink);
  font: 500 .8125rem/1.2 "DM Sans", sans-serif; cursor: pointer; transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.copy:hover { background: var(--soft); border-color: #a8b1bc; }
.copy.done { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.copy svg { width: .95rem; height: .95rem; }

@media (max-width: 720px) {
  :root { --sw: 90vw; }
  .carousel { width: 100vw; }
  .track { gap: .6rem; }
  .arrow { width: 2.4rem; height: 2.4rem; font-size: 1rem; }
  .arrow.prev { left: .2rem; } .arrow.next { right: .2rem; }
  .under { grid-template-columns: 1fr auto; }
  .under .dots { display: none; }
}

/* Composed videos keep their own canvas shape */
video.montage { border-radius: 4px; background: #fff; }

/* Inside grey bands */
.band .bar { background: #e6e9ed; }
.band video, .band .still { background: #e9ecef; }
.band pre { background: #fff; }

/* Side rail: the parts are nodes (large titles, grey until reached); the current part opens
   to list its sections underneath. On wide screens the page shifts right to make room. */
html { scroll-padding-top: 1.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.rail { display: none; }
@media (min-width: 1400px) {
  /* Content stays centred; carousels give up their side peeks until the rail has room. */
  /* 56rem content; carousels may grow to 64rem so the neighbouring slides peek in. */
  :root { --sw: 56rem; }
  .carousel { width: max(var(--sw), min(calc(100vw - 30rem), 64rem)); }
  .arrow.prev { left: max(calc((100% - var(--sw)) / 2 - 1.5rem), .75rem); }
  .arrow.next { right: max(calc((100% - var(--sw)) / 2 - 1.5rem), .75rem); }
  .rail {
    display: block; position: fixed; z-index: 5; top: 50%; left: max(1.5rem, calc(50vw - 37.5rem - 14rem));
    width: 12rem; translate: -1rem -50%; opacity: 0; visibility: hidden;
    transition: opacity .45s ease, translate .6s cubic-bezier(.2, .7, .1, 1), visibility 0s linear .45s;
  }
  .rail.shown { opacity: 1; visibility: visible; translate: 0 -50%; transition-delay: 0s; }
}
.rail ol { position: relative; list-style: none; margin: 0; padding: 0 0 0 2rem; }
.rail .top {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 0 0 1.5rem -8px;
  border-radius: 50%; color: var(--muted); background: #fff; box-shadow: inset 0 0 0 1.5px var(--line);
  transition: color .25s ease, box-shadow .25s ease, translate .25s ease;
}
.rail .top svg { width: 16px; height: 16px; }
.rail .top:hover { color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); translate: 0 -2px; }
.rail ol::before, .rail .fill { content: ""; position: absolute; left: 6px; width: 2px; border-radius: 1px; top: var(--top, 0); }
.rail ol::before { height: var(--span, 0); background: var(--line); }
.rail .fill { height: var(--fill, 0); background: var(--brand); transition: height .5s cubic-bezier(.3, .7, .2, 1); }
.rail ol > li + li { margin-top: 1.6rem; }
.rail .part-name {
  position: relative; display: block; color: #a9b0b8; font-size: 1.5rem; font-weight: 600; line-height: 1.15;
  letter-spacing: -.02em; text-decoration: none; transition: color .3s ease, translate .3s ease;
}
.rail .part-name::before {
  content: ""; position: absolute; left: calc(-2rem - 1px); top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #c9ced4;
  transition: background-color .3s ease, box-shadow .3s ease, scale .3s ease;
}
.rail .part-name:hover { color: var(--ink); }
.rail .part-name:hover::before { box-shadow: inset 0 0 0 2px var(--brand); }
.rail li.done > .part-name { color: var(--muted); }
.rail li.done > .part-name::before { background: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); scale: .62; }
.rail li.on > .part-name { color: var(--brand); }
.rail li.on > .part-name::before { background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
@media (prefers-reduced-motion: no-preference) {
  .rail li.on > .part-name::before { animation: node-pulse 2.4s ease-out infinite; }
  @keyframes node-pulse {
    0% { box-shadow: 0 0 0 0 rgb(15 118 110 / .35), 0 0 0 5px var(--brand-soft); }
    70%, 100% { box-shadow: 0 0 0 12px rgb(15 118 110 / 0), 0 0 0 5px var(--brand-soft); }
  }
}
/* Sections of the current part open below it */
.rail .subs { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s cubic-bezier(.3, .7, .2, 1), opacity .3s ease; }
.rail li.on > .subs { grid-template-rows: 1fr; opacity: 1; }
.rail ul { min-height: 0; overflow: hidden; list-style: none; margin: 0 0 0 -1.25rem; padding: 0 0 0 1.25rem; }
.rail ul li:first-child { padding-top: .75rem; }
.rail ul a {
  display: block; padding: .32rem 0; color: var(--muted); font-size: .9375rem; line-height: 1.4; text-decoration: none;
  text-wrap: balance; transition: color .25s ease, translate .25s ease;
}
.rail ul a:hover { color: var(--ink); translate: .25rem 0; }
.rail ul a.on { color: var(--ink); font-weight: 600; translate: .5rem 0; }
.rail ul a::before {
  content: ""; position: absolute; left: -.9rem; top: 50%; width: .55rem; height: 2px; margin-top: -1px; border-radius: 1px;
  background: var(--brand); scale: 0 1; transform-origin: left; transition: scale .3s ease;
}
.rail ul a.on::before { scale: 1 1; }
.rail ul a { position: relative; }

/* Method figures: caption under the figure; the tall 4LC-Video figure sits beside its text on wide screens */
.fig { margin: 2.25rem 0 0; }
.fig img { display: block; width: 100%; height: auto; border-radius: 8px; background: #fff; }
.fig figcaption { margin-top: 1rem; color: var(--muted); font-size: .9375rem; line-height: 1.65; text-wrap: pretty; }
.fig figcaption b { color: var(--ink); font-weight: 600; }
.fig figcaption p { margin: 0; }
.fig figcaption p + p { margin-top: .8rem; }
h2 + .fig { margin-top: 1.6rem; }
/* 4LC-Video: task table (left) and framework figure (right), as in the paper */
.duo { display: grid; gap: 2rem; margin-top: 1.6rem; }
.duo .fig { margin: 0; }
.cap { margin: 0 0 .9rem; color: var(--muted); font-size: .9375rem; line-height: 1.65; text-wrap: pretty; }
.cap b { color: var(--ink); font-weight: 600; }
.tasks { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.35; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.tasks th, .tasks td { padding: .7rem .5rem; text-align: center; vertical-align: middle; }
.tasks thead th { font-weight: 600; font-size: .875rem; border-bottom: 1px solid var(--ink); }
.tasks th[scope="row"], .tasks thead th:first-child { text-align: left; padding-left: 0; font-weight: 500; }
.tasks thead th:first-child { font-weight: 600; }
.tasks tbody tr + tr > * { border-top: 1px solid var(--line); }
.tasks math { font-size: 1.05em; }
@media (min-width: 960px) {
  .duo { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2.5rem; align-items: start; }
}
@media (max-width: 959px) {
  .duo-fig { order: -1; }
}
.fact strong small { font-size: .4em; font-weight: 500; color: var(--muted); margin-right: .3em; letter-spacing: 0; }
