/* DeVA project page.
   Palette = the paper's figure palette (plot_*.py): rose is "ours", blue /
   lavender / periwinkle are baselines, with ink outlines and hard shadows
   like the bar charts. */
:root {
  --rose: #eab5c9;        /* DeVA (ours) */
  --rose-soft: #f8e6ed;
  --rose-ink: #a03c66;    /* rose dark enough for text on paper */
  --blue: #a9c1e4;        /* baselines */
  --blue-soft: #e6edf7;
  --blue-ink: #3a5d94;
  --lav: #cfc3e8;         /* DeVA w/o grounding, grounding decoder */
  --lav-soft: #efebf8;
  --peri: #b3b8e3;
  --mist: #cdd9ea;
  --teal: #a8d5d5;
  --peach: #f9cdb4;

  --paper: #fcfbfd;
  --paper-raised: #f5f3f9;
  --ink: #1b1924;
  --ink-soft: #46425a;
  --ink-faint: #6f6a85;
  --line: #1b192420;
  --line-strong: #1b192440;

  --hero-bg: #17151f;
  --hero-ink: #f7f5fb;
  --hero-faint: #f7f5fba6;

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 920px;      /* media width */
  --measure: 920px;    /* text width, same as media so both edges line up */
  --side: 180px;
  --shadow: 4px 4px 0 var(--ink);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
code, pre { font-family: var(--font-mono); }
::selection { background: var(--rose); }
:focus-visible { outline: 2px solid var(--rose-ink); outline-offset: 3px; }

.mark {
  font-weight: 700;
  background: linear-gradient(transparent 58%, var(--rose) 58%, var(--rose) 92%, transparent 92%);
  padding: 0 .08em;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer; color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .14s, box-shadow .14s, background .14s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); background: var(--rose-soft); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--primary { background: var(--rose); }
.btn--primary:hover { background: var(--rose); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 60;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 10px 24px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity .22s, transform .22s;
}
.topbar[data-scrolled="true"] { opacity: 1; pointer-events: auto; transform: none; }
.topbar__mark { font-size: 20px; text-decoration: none; }
.topbar__links { display: flex; gap: 10px; }

/* ---------- hero ---------- */
.dv-hero {
  position: relative;
  background:
    radial-gradient(90% 60% at 12% 0%, #eab5c92b, transparent 60%),
    radial-gradient(70% 60% at 100% 100%, #a9c1e426, transparent 62%),
    var(--hero-bg);
  color: var(--hero-ink);
  padding: 26px 28px 74px;
}
.hero__inner { max-width: 1360px; margin: 0 auto; }
.hero__bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 8px 24px; margin-bottom: 18px;
}
.hero__mark { font-size: 30px; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.hero__mark::after { content: ""; display: block; height: 5px; margin-top: 5px; background: var(--rose); border-radius: 3px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--hero-faint);
}
.hero__eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 4px #eab5c933; flex: none; }

.wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.wall .slot--featured { grid-column: span 2; grid-row: span 2; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--hero-faint); text-decoration: none;
}
.hero__scroll .chev { width: 11px; height: 11px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: rotate(45deg) translate(0, 0); } 50% { transform: rotate(45deg) translate(3px, 3px); } }
@media (prefers-reduced-motion: reduce) { .hero__scroll .chev { animation: none; } }

/* ---------- video / placeholder tile ---------- */
.slot { margin: 0; min-width: 0; }
.slot__frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: #0f0e15;
  border: 1.5px solid var(--ink);
}
.slot__frame video, .slot__still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot__frame video { cursor: pointer; }
.dv-hero .slot__frame { border-color: #f7f5fb30; }

.slot__tags { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.dv-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px;
  border: 1.5px solid var(--ink); color: var(--ink); background: var(--paper);
  line-height: 1.5;
}
.tag--deva { background: var(--rose); }
.tag--base { background: var(--blue); }
.tag--success { background: var(--teal); }
.tag--fail { background: var(--peach); }

.slot__cap {
  position: absolute; inset: auto 0 0 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 34px 14px 11px;
  background: linear-gradient(transparent, #0b0a10d9);
  color: #fff; pointer-events: none;
}
.slot__cap-name { font-size: 16px; font-weight: 600; line-height: 1.25; }
.slot__cap-text { font-size: 15px; font-style: italic; color: #ffffffcc; line-height: 1.35; }
.slot--featured .slot__cap-name { font-size: 22px; }
.slot--featured .slot__cap { padding: 60px 20px 16px; }

/* placeholder */
.slot--empty .slot__frame { background: #1f1c2b; border-style: dashed; }
.dv-hero .slot--empty .slot__frame { border-color: #f7f5fb4d; }
.slot--empty .slot__still { opacity: .3; filter: grayscale(.7) blur(1.5px); transform: scale(1.04); }
.slot__ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 34px 12px 12px; text-align: center;
  background: repeating-linear-gradient(135deg, #cfc3e81f 0 2px, transparent 2px 14px);
  color: #fff;
}
.slot__ph-title { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: #ffffffd9; }
.slot__ph-file {
  font-size: 11.5px; color: var(--ink); background: var(--lav);
  padding: 2px 8px; border-radius: 4px; max-width: 100%; overflow-wrap: anywhere;
}
.slot--empty .slot__cap { padding-top: 12px; background: none; }

/* ---------- article layout ---------- */
.article { padding: 64px 24px 40px; }
.article__layout {
  display: grid;
  grid-template-columns: var(--side) minmax(0, var(--shell)) var(--side);
  justify-content: center; align-items: start; gap: 0 44px;
}
.shell { grid-column: 2; min-width: 0; }
.shell > * { max-width: var(--measure); }
.shell > .fig--wide, .shell > .title-block, .shell > .dv-footer, .shell > .stats, .shell > .cards { max-width: none; }

.outline { grid-column: 1; position: sticky; top: 84px; font-family: var(--font-mono); font-size: 13px; }
.outline nav { display: flex; flex-direction: column; border-left: 1px solid var(--line-strong); }
.outline a {
  margin-left: -1px; padding: 5px 0 5px 16px;
  border-left: 2px solid transparent;
  color: var(--ink-faint); text-decoration: none; line-height: 1.35;
  transition: color .14s, border-color .14s;
}
.outline a:hover { color: var(--ink); }
.outline a[aria-current="true"] { color: var(--ink); border-left-color: var(--rose-ink); font-weight: 600; }

/* ---------- title block ---------- */
.title-block { padding-bottom: 32px; border-bottom: 1px solid var(--line-strong); }
.title-block h1 {
  margin: 0; max-width: 21em;
  font-size: clamp(32px, 4.6vw, 50px); font-weight: 600; line-height: 1.12; letter-spacing: -.015em;
  text-wrap: balance;
}
.authors { margin: 22px 0 0; font-size: 19px; line-height: 1.6; }
.authors a { text-decoration: none; border-bottom: 1px solid transparent; }
.authors a:hover { border-bottom-color: var(--rose-ink); }
.authors sup, .affiliations sup { color: var(--rose-ink); font-size: .7em; }
.affiliations { margin: 4px 0 0; font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-faint); }
.title-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- text ---------- */
.shell h2 {
  margin: 68px 0 14px; scroll-margin-top: 80px;
  font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em;
}
.shell h2 span { background: linear-gradient(transparent 62%, var(--rose) 62%, var(--rose) 94%, transparent 94%); padding: 0 .1em; margin-left: -.1em; }
.shell h3 { margin: 40px 0 6px; scroll-margin-top: 80px; font-size: 23px; font-weight: 600; line-height: 1.3; }
.shell p { margin: 0 0 18px; }
.shell p a, .dv-footer a { color: var(--rose-ink); text-underline-offset: 3px; }
.lead { font-size: 20px; }
.note { font-size: 16px; color: var(--ink-soft); }
strong { font-weight: 700; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 30px 0 8px; }
.stat {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px 20px;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--blue-soft); box-shadow: var(--shadow);
}
.stat--ours { background: var(--rose-soft); }
.stat__num { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 16px; line-height: 1.45; color: var(--ink-soft); }

/* ---------- figures ---------- */
.fig { margin: 34px 0; }
.fig img {
  width: 100%; height: auto;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow);
}
.fig img.plot { padding: 18px 18px 14px; }
.fig figcaption { margin-top: 16px; max-width: var(--measure); font-size: 16.5px; line-height: 1.55; color: var(--ink-soft); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; align-items: start; }
.pair .fig { margin: 22px 0; }

/* ---------- rollouts ---------- */
.rollouts { margin: 26px 0 34px; }
.rollouts__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.dv-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  height: 38px; padding: 0 16px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .14s, box-shadow .14s, transform .14s;
}
.tab:hover { background: var(--rose-soft); }
.tab[aria-selected="true"] { background: var(--rose); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.speed { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.speed button {
  height: 34px; min-width: 44px; padding: 0 12px; border: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-size: 13px; cursor: pointer;
}
.speed button + button { border-left: 1.5px solid var(--ink); }
.speed button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.dv-panel {
  padding: 22px; border: 1.5px solid var(--ink); border-radius: 14px;
  background: var(--paper-raised); box-shadow: var(--shadow);
}
.panel__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 18px 36px; align-items: center; margin-bottom: 20px; }
.panel__instruction { margin: 4px 0 0 !important; font-size: 22px; font-style: italic; line-height: 1.35; }
.sr { display: grid; gap: 7px; }
.sr__title { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.sr__row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12.5px; }
.sr__track { height: 16px; border: 1.5px solid var(--ink); border-radius: 4px; background: #fff; overflow: hidden; }
.sr__fill { display: block; height: 100%; border-right: 1.5px solid var(--ink); }
.sr__fill--deva { background: var(--rose); }
.sr__fill--base { background: var(--lav); }
.sr__value { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.clips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 26px 0 12px; }
.triple .slot__frame { box-shadow: var(--shadow); }
.triple__cap { margin-top: 12px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 30px 0 10px; }
.dv-card { padding: 18px 20px 6px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--lav-soft); }
.dv-card:nth-child(1) { background: var(--blue-soft); }
.dv-card:nth-child(3) { background: var(--rose-soft); }
.dv-card h3 { margin: 4px 0 8px; font-size: 21px; }
.dv-card p { font-size: 17px; line-height: 1.55; }

/* ---------- tables ---------- */
.table-wrap { margin: 28px 0 34px; overflow-x: auto; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 16.5px; line-height: 1.4; }
caption { caption-side: top; text-align: left; padding: 14px 18px 12px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-faint); border-bottom: 1.5px solid var(--ink); }
th, td { padding: 8px 18px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; background: var(--paper-raised); border-bottom: 1.5px solid var(--ink); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.group th { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; background: var(--blue-soft); border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
tr.ours td { background: var(--rose); font-weight: 700; border-top: 1.5px solid var(--ink); border-bottom: 0; }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- bibtex / footer ---------- */
.bib { position: relative; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--paper-raised); box-shadow: var(--shadow); }
.bib pre { margin: 0; padding: 20px 22px; overflow-x: auto; font-size: 14px; line-height: 1.65; }
.bib__copy { position: absolute; top: 12px; right: 12px; }
.dv-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .article__layout { grid-template-columns: minmax(0, var(--shell)); }
  .shell { grid-column: 1; }
  .outline { display: none; }
}
@media (max-width: 900px) {
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel__head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 18px; }
  .dv-hero { padding: 20px 16px 70px; }
  .article { padding: 44px 16px 32px; }
  .wall { gap: 8px; }
  .slot--featured .slot__cap-name { font-size: 18px; }
  .wall .slot:not(.slot--featured) .slot__ph-file { display: none; }
  .stats, .cards, .pair { grid-template-columns: minmax(0, 1fr); }
  .clips, .triple { grid-template-columns: minmax(0, 1fr); }
  .shell h2 { font-size: 27px; margin-top: 52px; }
  .dv-panel { padding: 16px; }
  .panel__instruction { font-size: 19px; }
  .fig img.plot { padding: 10px; }
  th, td { padding: 8px 12px; }
}

/* ---------- small fixes ---------- */
.shell .authors { margin: 22px 0 0; }
.shell .affiliations { margin: 4px 0 0; }
sub, sup { line-height: 0; }
.tab { padding: 0 13px; font-size: 12.5px; }


/* =====================================================================
   v2: interactive method diagram, animated charts, reveal
   ===================================================================== */
.will-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.will-reveal.is-revealed { opacity: 1; transform: none; }
.stats .stat:nth-child(2) { transition-delay: .1s; }
.stats .stat:nth-child(3) { transition-delay: .2s; }

.more { margin: 22px 0 8px; }
.more summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--ink-soft);
  padding: 6px 14px; border: 1.5px solid var(--line-strong); border-radius: 999px;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; font-weight: 600; }
.more[open] summary::before { content: "–"; }
.more summary:hover { border-color: var(--ink); color: var(--ink); }
.more > p { margin-top: 16px; font-size: 17.5px; color: var(--ink-soft); }
.shell > .more { max-width: none; }
.shell > .more > p { max-width: var(--measure); }

/* segmented control */
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--paper); }
.seg button {
  height: 34px; padding: 0 14px; border: 0; background: transparent; color: var(--ink);
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button:hover { background: var(--rose-soft); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* chart card */
.card-chart {
  margin: 22px 0 34px; padding: 22px 24px 20px;
  border: 1.5px solid var(--ink); border-radius: 14px; background: #fff; box-shadow: var(--shadow);
}
.card-chart__lead { font-size: 18px !important; margin: 0 0 18px !important; max-width: 42em; }
.chart__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 18px; }
.chart__note { margin: 10px 0 0 !important; font-size: 15px; color: var(--ink-faint); }
.card-chart .chart + .chart { margin-top: 30px; padding-top: 24px; border-top: 1px dashed var(--line-strong); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.legend__item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 7px; border: 1px solid transparent; border-radius: 999px; background: transparent;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink); cursor: pointer;
  transition: opacity .2s, background .15s, border-color .15s;
}
button.legend__item:hover { background: var(--paper-raised); border-color: var(--line-strong); }
.legend__item[aria-pressed="false"] { opacity: .38; text-decoration: line-through; }
.legend__item.is-ours { font-weight: 600; }
.legend--static .legend__item { cursor: default; }
.legend__swatch { width: 13px; height: 13px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--c); flex: none; }
.legend__swatch.is-hatch, .bar.is-hatch { background-image: repeating-linear-gradient(135deg, #1b192455 0 1.5px, transparent 1.5px 5px); background-color: var(--c); }
.legend__line { width: 22px; height: 0; border-top: 3px solid; flex: none; }
.lc-deva { color: var(--rose-ink); stroke: var(--rose-ink); }
.lc-base { color: #8b8799; stroke: #8b8799; }

/* tooltip */
.tip {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  display: grid; gap: 1px; min-width: 120px; padding: 9px 12px;
  background: var(--ink); color: var(--paper); border-radius: 8px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.45;
  opacity: 0; transition: opacity .12s;
}
.tip[data-on="true"] { opacity: 1; }
.tip b { font-weight: 600; color: var(--rose); }
.tip strong { font-size: 17px; font-weight: 600; }
.tip span { color: #ffffffb3; }

/* grouped bars */
.gb__scroll { overflow-x: auto; padding: 6px 4px 2px 0; }
.gb__plot { position: relative; min-width: 640px; height: 320px; padding: 22px 0 46px 44px; }
.gb__grid { position: absolute; inset: 22px 0 46px 44px; }
.gb__line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.gb__line:first-child { border-top: 1.5px solid var(--ink); }
.gb__line span { position: absolute; right: 100%; top: -9px; margin-right: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); white-space: nowrap; }
.gb__groups { position: relative; display: flex; height: 100%; gap: 10px; }
.gb__group { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 0 6px; }
.gb__group.is-summary { background: var(--paper-raised); border-radius: 8px 8px 0 0; }
.gb__bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.gb__label { position: absolute; left: 0; right: 0; top: 100%; padding-top: 9px; text-align: center; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.3; color: var(--ink-soft); }
.gb__group.is-summary .gb__label { font-weight: 600; color: var(--ink); }
.bar {
  position: relative; flex: 1 1 0; max-width: 34px; min-width: 0; height: 0;
  background-color: var(--c); border: 1.5px solid var(--ink); border-bottom: 0; border-radius: 3px 3px 0 0;
  box-shadow: 2.5px 0 0 var(--ink);
  transition: height .9s cubic-bezier(.2,.8,.2,1) var(--d), flex-grow .45s ease, max-width .45s ease, opacity .3s, margin .45s ease, border-width .45s;
  cursor: default;
}
.bar.is-off { flex-grow: 0; max-width: 0; margin-left: -4px; border-width: 0; opacity: 0; box-shadow: none; pointer-events: none; transition-delay: 0s; }
.bar.is-dim { opacity: .25; }
.bar__val {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 4px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); white-space: nowrap;
  opacity: 0; transition: opacity .3s ease calc(var(--d) + .6s);
}
.is-live .bar__val { opacity: 1; }
.bar.is-ours .bar__val { font-weight: 700; color: var(--ink); font-size: 11.5px; }
.bar.is-off .bar__val { opacity: 0; transition-delay: 0s; }

/* stacked bars */
.sb__row { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 14px; margin-top: 10px; }
.sb__name { font-family: var(--font-mono); font-size: 12.5px; text-align: right; color: var(--ink-soft); line-height: 1.3; }
.sb__row.is-ours .sb__name { font-weight: 700; color: var(--ink); }
.sb__track { display: flex; height: 30px; border: 1.5px solid var(--ink); border-radius: 5px; overflow: hidden; background: var(--paper-raised); box-shadow: 2.5px 2.5px 0 var(--ink); }
.sb__seg {
  width: 0; min-width: 0; background: var(--c); display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink);
  transition: width .8s cubic-bezier(.2,.8,.2,1) var(--d), opacity .2s;
}
.sb__seg + .sb__seg { box-shadow: inset 1.5px 0 0 var(--ink); }
.sb__seg.is-dim { opacity: .2; }
.sb__row.is-ours .sb__seg:first-child { font-weight: 700; }

/* ranked bars / dots */
.rb__row { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: center; gap: 14px; max-height: 40px; margin-top: 7px; overflow: visible; transition: max-height .4s ease, opacity .3s, margin .4s; }
.rb__row.is-off { max-height: 0; margin-top: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.rb__name { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); text-align: right; line-height: 1.25; }
.rb__tag { font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; }
.rb__row.is-ours .rb__name { font-weight: 700; color: var(--ink); }
.rb__track { position: relative; height: 22px; margin-right: 46px; }
.rb__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--blue); border: 1.5px solid var(--ink); border-radius: 0 4px 4px 0; box-shadow: 2px 2px 0 var(--ink); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.rb__row.is-ours .rb__fill { background: var(--rose); }
.rb__val { position: absolute; top: 50%; left: 0; transform: translate(9px, -50%); font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); transition: left .9s cubic-bezier(.2,.8,.2,1); }
.rb__row.is-ours .rb__val { font-weight: 700; color: var(--ink); }
.rb--dot .rb__row { grid-template-columns: 330px minmax(0, 1fr); margin-top: 12px; }
.rb--dot .rb__track { height: 20px; }
.rb--dot .rb__track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px dashed var(--line-strong); }
.rb--dot .rb__fill { top: 50%; bottom: auto; height: 5px; margin-top: -2.5px; border: 0; box-shadow: none; border-radius: 3px; background: var(--blue); }
.rb--dot .rb__fill::after { content: ""; position: absolute; right: -9px; top: 50%; width: 16px; height: 16px; margin-top: -9.5px; border-radius: 50%; background: inherit; border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.rb--dot .rb__val { transform: translate(18px, -50%); }
.rb__ref { position: absolute; top: -8px; bottom: -8px; border-left: 1.5px dashed var(--ink-faint); }
.rb__axis { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.rb__scale { position: relative; height: 34px; margin-right: 46px; border-top: 1.5px solid var(--ink); font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.rb__scale span { position: absolute; top: 5px; transform: translateX(-50%); white-space: nowrap; }
.rb__scale .rb__reflabel { top: 19px; color: var(--ink-soft); }

/* line chart */
.lc__svg { display: block; width: 100%; height: auto; overflow: visible; }
.lc__grid { stroke: var(--line); stroke-width: 1; }
.lc__frame { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.lc__tick, .lc__axis, .lc__reftext { font-family: var(--font-mono); font-size: 12px; fill: var(--ink-faint); stroke: none; }
.lc__axis { fill: var(--ink-soft); }
.lc__ref { stroke: var(--ink-faint); stroke-width: 1.5; stroke-dasharray: 5 5; }
.lc__area { fill: var(--rose); opacity: .38; transition: opacity .7s ease .9s; }
.lc__line { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s cubic-bezier(.3,.7,.2,1); }
.lc__dot { fill: #fff; stroke-width: 2.5; transition: opacity .3s ease var(--d); }
.is-idle .lc__line { stroke-dashoffset: 1; transition: none; }
.is-idle .lc__area, .is-idle .lc__dot { opacity: 0; transition: none; }
.lc__guide { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0; }
.lc__hover { fill: #fff; stroke-width: 3; opacity: 0; }
.is-hover .lc__guide, .is-hover .lc__hover { opacity: 1; }

/* ablation tabs */
.abl { margin: 22px 0 34px; }
.abl .dv-tabs { margin-bottom: 16px; }
.abl .card-chart { margin: 0; }

/* key frames inside a task panel */
.keyframes { margin: 20px 0 0; }
.keyframes img { width: 100%; height: auto; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; }
.keyframes figcaption { margin-top: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.sr__fill { width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.sr__row:nth-child(3) .sr__fill { transition-delay: .12s; }

/* ---------- method widget ---------- */
.method { margin: 22px 0 18px; padding: 20px 22px 18px; border: 1.5px solid var(--ink); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.method__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.method__scroll { overflow-x: auto; }
.method__svg { display: block; width: 100%; min-width: 660px; height: auto; font-family: var(--font-mono); }
.method__svg text { fill: var(--ink); font-size: 12px; }
.method__svg .title { font-family: var(--font-serif); font-size: 19px; font-weight: 600; }
.method__svg .sub { font-size: 11px; fill: var(--ink-faint); }
.method__svg .lab { font-size: 11.5px; fill: var(--ink-soft); }
.method__svg .lab--in { fill: var(--ink); }
.method__svg .quote { font-family: var(--font-serif); font-style: italic; font-size: 13px; }
.method__svg .badge { font-size: 10px; font-weight: 600; fill: #fff; paint-order: stroke; stroke: #1b1924; stroke-width: 3px; }
.method__svg .frame { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.method__svg .frame--fill { fill: var(--rose-soft); }
.method__svg image { clip-path: inset(0 round 6px); }
.method__svg .chip { fill: var(--paper-raised); stroke: var(--ink); stroke-width: 1.5; }
.method__svg .mod { stroke: var(--ink); stroke-width: 1.5; fill: var(--blue-soft); transition: fill .4s; }
.n--dec .mod { fill: var(--lav-soft); }
.n--act .mod { fill: var(--rose-soft); }
.method__svg .layer { fill: #fff; stroke: var(--ink); stroke-width: 1.2; }
.method__svg .cells rect { fill: #fff; stroke: var(--ink); stroke-width: 1.2; }
.method__svg .mini { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.acts circle { fill: var(--rose); stroke: var(--ink); stroke-width: 1.5; }
.traj { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.e { stroke: var(--ink); stroke-width: 1.8; }
.elabels text { font-size: 10.5px; fill: var(--ink-soft); }

/* build-up: pending is faint, current is lit, earlier steps stay visible */
.method [data-s] { opacity: .16; transition: opacity .45s ease, transform .45s ease; }
.method [data-s].is-done { opacity: .62; }
.method [data-s].is-on { opacity: 1; }
.method .n[data-go] { cursor: pointer; }
.n.is-on .mod { filter: drop-shadow(4px 4px 0 #1b1924); }
.n--video.is-on .mod { fill: var(--blue); }
.n--dec.is-on .mod { fill: var(--lav); }
.n--act.is-on .mod { fill: var(--rose); }
.is-on .layer--hot { fill: var(--rose-soft); }
.e.is-on { stroke-width: 2.6; stroke-dasharray: 7 6; animation: flow .7s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -13; } }
.heat { transform-box: fill-box; transform-origin: center bottom; transform: translateY(10px) scale(.86); opacity: 0; transition: transform .5s cubic-bezier(.2,.9,.3,1.3) calc(var(--i) * .28s + .2s), opacity .4s ease calc(var(--i) * .28s + .2s); }
.heats.is-on .heat, .heats.is-done .heat { transform: none; opacity: 1; }
.acts.is-on .traj, .acts.is-done .traj { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s ease .3s; }
.acts circle { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .3s ease; }
.acts.is-on circle, .acts.is-done circle { transform: scale(1); }
.acts.is-on circle:nth-of-type(1), .acts.is-done circle:nth-of-type(1) { transition-delay: .3s; }
.acts.is-on circle:nth-of-type(2), .acts.is-done circle:nth-of-type(2) { transition-delay: .8s; }
.acts.is-on circle:nth-of-type(3), .acts.is-done circle:nth-of-type(3) { transition-delay: 1.3s; }
.n--video.is-on .layer { animation: pulse 1.6s ease-in-out infinite; }
.n--video.is-on .layer:nth-of-type(3) { animation-delay: .15s; }
.n--video.is-on .layer:nth-of-type(4) { animation-delay: .3s; }
.n--video.is-on .layer:nth-of-type(5) { animation-delay: .45s; }
@keyframes pulse { 0%, 100% { fill: #fff; } 50% { fill: var(--mist); } }
.n--dec.is-on .cells rect:nth-child(odd) { animation: pulse2 1.8s ease-in-out infinite; }
.n--dec.is-on .cells rect:nth-child(3) { animation-delay: .2s; }
.n--dec.is-on .cells rect:nth-child(5) { animation-delay: .4s; }
.n--dec.is-on .cells rect:nth-child(7) { animation-delay: .6s; }
@keyframes pulse2 { 0%, 100% { fill: #fff; } 50% { fill: var(--rose); } }

/* grounding off */
.ghost { display: none; }
.ghost rect { fill: none; stroke: var(--ink-faint); stroke-width: 1.5; stroke-dasharray: 7 6; }
.ghost text { font-family: var(--font-serif); font-size: 18px; font-style: italic; fill: var(--ink-soft); }
.method[data-mode="base"] .g-only { opacity: 0 !important; pointer-events: none; }
.method[data-mode="base"] .ghost { display: block; }

.method__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.method__steps button {
  position: relative; display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 12px;
  border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; cursor: pointer; overflow: hidden; text-align: left;
  transition: background .2s, box-shadow .2s, transform .2s;
}
.method__steps b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink); font-size: 11.5px; background: #fff; flex: none; }
.method__steps button:hover { background: var(--rose-soft); }
.method__steps button.is-done { background: var(--paper-raised); }
.method__steps button[aria-selected="true"] { background: var(--rose); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.method__caption { min-height: 3.2em; margin: 16px 2px 0 !important; font-size: 19px; line-height: 1.5; max-width: 44em; }
.method__caption.is-in { animation: capin .45s ease; }
@keyframes capin { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .e.is-on, .n--video.is-on .layer, .n--dec.is-on .cells rect { animation: none; }
  .bar, .sb__seg, .rb__fill, .rb__val, .lc__line, .heat, .traj { transition: none !important; }
}
@media (max-width: 720px) {
  .card-chart, .method { padding: 16px 14px; }
  .sb__row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sb__name { text-align: left; }
  .rb__row, .rb--dot .rb__row { grid-template-columns: minmax(0, 1fr); gap: 3px; max-height: 70px; }
  .rb__name { justify-content: flex-start; text-align: left; }
  .rb__axis { grid-template-columns: minmax(0, 1fr); }
  .rb__axis > span:first-child { display: none; }
  .method__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method__caption { font-size: 17px; min-height: 5.5em; }
}

/* v2 fixes */
.gb__plot { padding-right: 12px; }
.gb__grid { right: 12px; }
.method__svg .cells rect:nth-child(even) { fill: url(#cells); stroke: none; animation: none !important; }
.method [data-s].is-done { opacity: .72; }


/* simulation: three compact charts in a row */
.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 22px 0 34px; }
.mini__card { padding: 18px 16px 12px; border: 1.5px solid var(--ink); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.mini__head { display: flex; flex-direction: column; gap: 1px; margin-bottom: 26px; }
.mini__title { font-size: 21px; font-weight: 600; line-height: 1.2; }
.mini__sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); }
.mini__plot { display: flex; gap: 6px; height: 190px; border-bottom: 1.5px solid var(--ink); }
.mini__col { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.mini__area { flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.mini .bar { max-width: 30px; width: 100%; flex: none; }
.mini .bar__val { font-size: 10.5px; }
.mini__label {
  position: absolute; top: 100%; right: 50%; margin-top: 7px; white-space: nowrap;
  transform-origin: right top; transform: rotate(-38deg);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft);
}
.mini__col.is-ours .mini__label { font-weight: 700; color: var(--ink); }
.mini__axis { margin-top: 74px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); text-align: right; }
@media (max-width: 860px) { .mini { grid-template-columns: minmax(0, 1fr); } .mini .bar { max-width: 44px; } }
.mini__plot { padding-left: 18px; }


/* simulation rollout gallery */
.sim { margin: 22px 0 26px; padding: 20px 22px 22px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper-raised); box-shadow: var(--shadow); }
.sim__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.sim__note { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.sim .dv-tabs { margin-bottom: 16px; }
.sim .tab { height: 32px; font-size: 12px; }
.sim__grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 14px; }
.sim__grid[hidden] { display: none; }
.sim__clip { margin: 0; border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: #fff; transition: transform .18s ease, box-shadow .18s ease; }
.sim__clip:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.sim__clip video { width: 100%; aspect-ratio: var(--ar); object-fit: cover; background: #0f0e15; cursor: pointer; }
.sim__clip figcaption { padding: 7px 11px; border-top: 1.5px solid var(--ink); font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim__grid.is-in .sim__clip { animation: simin .45s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(var(--i) * 50ms); }
@keyframes simin { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .sim__grid.is-in .sim__clip { animation: none; } }
@media (max-width: 860px) { .sim__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sim__grid { grid-template-columns: minmax(0, 1fr); } .sim { padding: 14px; } }


/* ================= v3: full-bleed hero montage + large rollout player ================= */
.dv-hero { padding: 0; width: 100%; height: 100vh; height: 100svh; min-height: 360px; overflow: hidden; background: var(--hero-bg); }
/* Portrait screens: filling the full height would crop most of a 16:9 frame, so cap it. */
@media (max-aspect-ratio: 1/1) { .dv-hero { height: auto; min-height: 0; aspect-ratio: 4 / 3; } }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(transparent 62%, #0b0a10cc);
}
.hero__bar { position: absolute; inset: 0 0 auto 0; margin: 0; padding: 26px 32px; pointer-events: none; }
.hero__eyebrow { color: #f7f5fbd9; }
.hero__foot { position: absolute; inset: auto 0 0 0; padding: 0 32px 64px; pointer-events: none; }
.hero__cap { display: flex; flex-direction: column; gap: 4px; max-width: 760px; margin-bottom: 18px; }
.hero__cap.is-in { animation: capIn .45s ease both; }
@keyframes capIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero__cap-name { font-size: clamp(26px, 3.6vw, 46px); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.hero__cap-text { font-size: clamp(16px, 1.5vw, 21px); font-style: italic; color: #ffffffd9; line-height: 1.35; }
.hero__ticks { display: flex; gap: 6px; pointer-events: auto; }
.hero__tick {
  flex: 1 1 0; height: 22px; padding: 9px 0; border: 0; background: none; cursor: pointer;
  position: relative;
}
.hero__tick::before, .hero__tick-fill { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; }
.hero__tick::before { background: #ffffff47; }
.hero__tick-fill { background: var(--rose); transform: scaleX(0); transform-origin: left; }
.hero__tick:hover::before { background: #ffffff80; }
.hero__tick:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.hero__scroll { bottom: 14px; }
@media (prefers-reduced-motion: reduce) { .hero__cap.is-in { animation: none; } }

.player__stage {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: #0f0e15;
  box-shadow: 4px 4px 0 var(--ink);
}
.player__stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.player__bar { position: absolute; inset: auto 0 0 0; height: 14px; cursor: pointer; }
.player__bar::before, .player__fill { content: ""; position: absolute; inset: auto 0 0 0; height: 5px; }
.player__bar::before { background: #ffffff40; }
.player__fill { background: var(--rose); transform: scaleX(0); transform-origin: left; }
.player__strip { display: flex; gap: 12px; margin-top: 16px; overflow-x: auto; padding: 2px 4px 6px 2px; }
.thumb {
  flex: 0 0 150px; padding: 0; cursor: pointer; overflow: hidden; text-align: left;
  border: 1.5px solid var(--ink); border-radius: 10px; background: var(--paper);
  font: inherit; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  opacity: .72;
}
.thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1.5px solid var(--ink); }
.thumb__label { display: block; padding: 5px 9px 6px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .03em; }
.thumb--deva .thumb__label { background: var(--rose); }
.thumb--base .thumb__label { background: var(--blue); }
.thumb:hover { opacity: 1; transform: translateY(-2px); }
.thumb[aria-pressed="true"] { opacity: 1; box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.thumb:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 720px) {
  .hero__bar { padding: 18px 16px; }
  .hero__foot { padding: 0 16px 60px; }
  .thumb { flex-basis: 118px; }
}

.abstract { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }


.dv-panel .player__strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; padding: 0 3px 3px 0; }
@media (max-width: 720px) { .dv-panel .player__strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
.dv-panel .player__stage { box-shadow: none; }

/* ================= method widget v2: follows the paper figure ================= */
.method__svg { min-width: 820px; }
.method__svg text { font-size: 10.5px; }
.method__svg .title { font-size: 15px; font-weight: 700; }
.method__svg image { clip-path: none; }
.method__svg .frame { stroke-width: 1.2; }
.method__svg .frame--back { fill: #d9d5e3; }
.method__svg .band { fill: #ffffffd9; }
.method__svg .imglab { font-family: var(--font-serif); font-size: 11px; font-weight: 700; }
.method__svg .tagbox { fill: #fff; }
.method__svg .tagtxt { font-size: 10px; }
.method__svg .ltxt { font-size: 11.5px; }
.method__svg .layer { fill: var(--paper-raised); stroke-width: 1.4; }
.method__svg .tok { stroke: var(--ink); stroke-width: 1.2; }
.tok--clean { fill: var(--blue); }
.tok--noisy { fill: url(#speck); stroke: var(--blue-ink) !important; }
.tok--g { fill: var(--lav); }
.tok--vf { fill: url(#hatch); stroke: var(--blue-ink) !important; }
.tok--kv { fill: url(#kv); }
.tok--state { fill: #fbf3dc; }
.tok--act { fill: #dcdae3; }
.method__svg .dot3 { fill: var(--ink); }
.method__svg .vf { fill: #fff; stroke: var(--blue-ink); stroke-width: 1.3; }
.method__svg .vf + .gl, .method__svg .gl { fill: none; stroke: var(--blue-ink); stroke-width: 1; }
.method__svg .gf { fill: var(--lav); stroke: #6b4fa3; stroke-width: 1.3; }
.method__svg .gf--back { fill: #e3dbf3; }
.method__svg .fm .gl { stroke: #6b4fa3; }
.method__svg .gblock { fill: #dcdae3; stroke: none; }
.method__svg .gbt { font-size: 9.5px; }
.method__svg .mini { stroke-width: 1.2; }
.method__svg .mini--big { stroke-width: 1.8; }
.method__svg .rd { fill: var(--ink); }
.method__svg .pin { fill: #e08a8a; stroke: #6b4fa3; stroke-width: 1.6; }
.method__svg .tlabel { fill: #e79a9a; }
.method__svg .tl { font-size: 11px; }
.method__svg .instr { font-size: 11.5px; }
.method__svg .hl { fill: #b06ad0; }
.method__svg .trap { fill: #dcdae3; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.method__svg .enc { font-family: var(--font-serif); font-size: 13px; font-weight: 700; }
.method__svg .kvbox { fill: none; stroke: var(--ink-faint); stroke-width: 1; stroke-dasharray: 4 3; }
.method__svg .kv { font-size: 11px; font-weight: 700; fill: var(--ink); }
.method__svg .axes path { fill: none; stroke-width: 1.8; stroke: var(--blue-ink); }
.method__svg .axes path:nth-child(1) { stroke: #c2410c; }
.method__svg .axes circle { fill: var(--ink); }
.method__svg .squig { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.e { stroke-width: 1.6; }
.e--dash { stroke-dasharray: 6 4; }
.e--soft { stroke: var(--ink-faint); }
.e.is-on { stroke-width: 2.2; }
.b-only { display: none; }
.method[data-mode="base"] .b-only { display: inline; }
.ghost text { font-size: 16px; }
.ghost .sub { font-family: var(--font-mono); font-size: 10.5px; font-style: normal; }
/* coarse-to-fine build-up inside the decoder */
.n--dec .fm { transform-box: fill-box; transform-origin: center bottom; transform: scale(.55); opacity: .25; transition: transform .5s cubic-bezier(.2,.9,.3,1.3) calc(var(--i) * .32s + .15s), opacity .4s ease calc(var(--i) * .32s + .15s); }
.n--dec .col { --i: 0; }
.n--dec.is-on .fm, .n--dec.is-done .fm { transform: none; opacity: 1; }
.n--dec.is-on .gblock { animation: gpulse 1.9s ease-in-out infinite; animation-delay: calc(var(--i) * .32s); }
@keyframes gpulse { 0%, 100% { fill: #dcdae3; } 45% { fill: var(--rose); } }
.n--video.is-on .tok--noisy { animation: tpulse 1.4s ease-in-out infinite; }
@keyframes tpulse { 50% { opacity: .45; } }
.flat.is-on .tok { animation: tpulse 1.6s ease-in-out infinite; }
.n--act.is-on .layer--hot { fill: var(--rose-soft); animation: gpulse2 1.8s ease-in-out infinite; }
@keyframes gpulse2 { 0%, 100% { fill: var(--paper-raised); } 50% { fill: #fff; } }
.acts .heat { transform-origin: center bottom; }
.acts.is-on .heat, .acts.is-done .heat { transform: none; opacity: 1; }
.method__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 9px 12px; list-style: none; border: 1px solid var(--line-strong); border-radius: 8px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); }
.method__legend li { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.lg { display: inline-block; width: 15px; height: 15px; border: 1.3px solid var(--ink); border-radius: 3px; flex: none; }
.lg--clean { background: var(--blue); }
.lg--noisy { border-color: var(--blue-ink); background: conic-gradient(var(--mist) 25%, #fff 0 50%, var(--mist) 0 75%, #fff 0) 0 0 / 7px 7px; }
.lg--vfm { border-color: var(--blue-ink); border-radius: 0; background: linear-gradient(var(--blue-ink), var(--blue-ink)) 50% 0 / 1px 100% no-repeat, linear-gradient(var(--blue-ink), var(--blue-ink)) 0 50% / 100% 1px no-repeat, #fff; }
.lg--vft { border-color: var(--blue-ink); background: repeating-linear-gradient(45deg, var(--blue) 0 2px, #fff 2px 4px); }
.lg--gfm { border-color: #6b4fa3; border-radius: 0; background: var(--lav); }
.lg--pin { width: 11px; height: 11px; border-radius: 50%; border-color: #6b4fa3; background: #e08a8a; }
@media (prefers-reduced-motion: reduce) { .n--dec .fm { transition: none; } .n--dec.is-on .gblock, .n--video.is-on .tok--noisy, .flat.is-on .tok, .n--act.is-on .layer--hot { animation: none; } }
.method__svg .edges, .method__svg .elabels { pointer-events: none; }
.method__svg .elabels text { font-size: 9.5px; }

/* method widget v3: roomier layout, bolder arrows */
.e { stroke-width: 2.2; }
.e.is-on { stroke-width: 2.8; }
.e--dash { stroke-dasharray: 7 5; }
.e--soft { stroke: var(--ink-soft); }
.method__svg .mini { stroke-width: 1.8; }
.method__svg .mini--big { stroke-width: 2.4; }

/* arrows inside the grounding decoder flow while it is the active step */
.n--dec.is-on .mini[marker-end] { stroke-dasharray: 7 6; animation: flow .7s linear infinite; }
@media (prefers-reduced-motion: reduce) { .n--dec.is-on .mini[marker-end] { animation: none; stroke-dasharray: none; } }

/* video feature maps are hatched, like the video feature tokens */
.method__svg .vf { fill: url(#hatch); }
.lg--vfm { background: linear-gradient(var(--blue-ink), var(--blue-ink)) 50% 0 / 1px 100% no-repeat, linear-gradient(var(--blue-ink), var(--blue-ink)) 0 50% / 100% 1px no-repeat, repeating-linear-gradient(45deg, var(--blue) 0 2px, #fff 2px 4px); }
/* legend: equal-width cells */
.method__legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; padding: 11px 16px; }
@media (max-width: 720px) { .method__legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.method__svg .band--span { fill: #fffffff0; stroke: var(--ink); stroke-width: 1.2; }
.method__svg .spanline { display: none; }
.heats .span { opacity: 0; transition: opacity .4s ease .2s; }
.heats.is-on .span, .heats.is-done .span { opacity: 1; }

/* ================= task stages: caption on the video, stage list, task notes ================= */
.stagecap {
  position: absolute; left: 14px; top: 14px; max-width: calc(100% - 28px);
  display: flex; flex-direction: column; gap: 3px; padding: 9px 14px 10px;
  background: #0b0a10d1; color: #fff; border-radius: 8px; border-left: 5px solid var(--rose);
  pointer-events: none;
}
.stagecap[hidden] { display: none; }
.stagecap.is-in { animation: capIn .4s ease both; }
.stagecap__num { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rose); }
.stagecap__goal { font-size: clamp(17px, 2.2vw, 24px); font-weight: 600; line-height: 1.2; }
.player__ticks { position: absolute; inset: auto 0 0 0; height: 5px; pointer-events: none; }
.player__ticks i { position: absolute; top: -3px; width: 3px; height: 11px; margin-left: -1.5px; background: #fff; border-radius: 1px; box-shadow: 0 0 0 1px #1b192499; }
.stages { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.stages li { margin: 0; display: flex; }
.stage {
  flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 9px 12px 10px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit;
  transition: background .2s, box-shadow .2s, transform .2s, opacity .2s;
}
.stage__num { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.stage__goal { font-size: 16.5px; line-height: 1.3; }
.stage:hover { background: var(--rose-soft); }
.stage[aria-current="true"] { background: var(--rose); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.stage[aria-current="true"] .stage__num { color: var(--ink); }
.stage:disabled { opacity: .4; cursor: default; }
.stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.stages__note { margin: 8px 0 0 !important; font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.about { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.about p { margin: 0 0 10px !important; font-size: 18px; line-height: 1.6; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.about p:last-child { margin-bottom: 0 !important; }
.about b { font-weight: 700; }
@media (max-width: 720px) {
  .stages { grid-auto-flow: row; }
  .stagecap { left: 8px; top: 8px; padding: 6px 10px 7px; }
  .about p { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .stagecap.is-in { animation: none; } }

/* ---------- tasks: row of five cells, one large video, notes ---------- */
.taskshow { margin: 26px 0 22px; }
.taskrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 10px; }
.taskcell { position: relative; display: block; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden;
  border-radius: 6px; opacity: .62; transition: opacity .2s, box-shadow .2s; font: inherit; color: #fff; }
.taskcell:hover { opacity: .9; }
.taskcell[aria-selected="true"] { opacity: 1; box-shadow: 0 0 0 3px var(--c); }
.taskcell__name { display: block; background: var(--c); padding: 5px 4px; font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taskcell video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.taskcell__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #ffffff40; }
.taskcell__fill { display: block; height: 100%; width: 0; background: #fff; }
.taskvid { margin: 0; }
.taskvid video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; }
.tasknotes { display: grid; margin: 0 0 34px; }
.tasknote { grid-area: 1 / 1; visibility: hidden; }
.tasknote.is-active { visibility: visible; }
.tasknote p { margin: 0 0 8px !important; font-size: 18px; line-height: 1.6; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.tasknote b { font-weight: 700; }
@media (max-width: 640px) { .taskcell__name { font-size: 10.5px; padding: 3px 2px; } .taskrow { gap: 4px; } }

/* =====================================================================
   Nerfies adaptation. The page skeleton is the Nerfies template (Bulma +
   static/css/index.css); this block maps our components onto its look:
   Google Sans / Noto Sans, white page, soft borders. Rose stays the
   colour for "ours", as in the paper figures.
   ===================================================================== */
:root {
  --font-serif: "Noto Sans", sans-serif;
  --font-mono: "Noto Sans", sans-serif;
  --font-head: "Google Sans", "Noto Sans", sans-serif;
  --paper: #fff;
  --paper-raised: #f7f8fa;
  --edge: #dcdde3;
  --shadow: 0 1px 4px rgba(10, 10, 20, .10);
  --radius: 10px;
}
body { background: #fff; color: #363636; font-family: "Noto Sans", sans-serif; font-size: 1rem; line-height: 1.5; }
strong { color: inherit; }
pre, code, .bib pre { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; }
code { color: inherit; background: none; padding: 0; }
td.num, th.num { text-align: right; }
.section { padding: 2.5rem 1.5rem; scroll-margin-top: 12px; }
.section .title.is-3 { font-family: var(--font-head); margin-bottom: 1rem; }
.section .title.is-4 { font-family: var(--font-head); margin: 2.25rem 0 .6rem; scroll-margin-top: 20px; }
.section .content { margin-bottom: 1rem; }
.section .content p { font-size: 1.05rem; line-height: 1.65; }
.section .content p.note { font-size: .92rem; color: #666; }
.section .content p.lead { font-size: 1.2rem; }
.section .content a { color: var(--rose-ink); }
.publication-title .mark { background: linear-gradient(transparent 62%, var(--rose) 62%, var(--rose) 92%, transparent 92%); }
#article-title .hero-body { padding: 3rem 1.5rem 1rem; }
.publication-authors + .publication-authors { color: #666; margin-top: .25rem; }
.footer { padding: 2.5rem 1.5rem 3rem; margin-top: 2rem; }
.footer a { color: var(--rose-ink); }

/* sidebar (as on Nerfies-derived pages) */
.sidebar-nav {
  position: fixed; left: 24px; top: 50%; transform: translateY(-50%); z-index: 50;
  width: 168px; padding: 14px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .10); font-family: var(--font-head); font-size: .86rem;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.sidebar-nav.is-shown { opacity: 1; pointer-events: auto; }
.sidebar-nav .sidebar-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #999; padding: 0 10px 6px; border-bottom: 1px solid #eee; margin-bottom: 6px; }
.sidebar-nav li { margin: 2px 0; }
.sidebar-nav a { display: block; padding: 6px 10px; border-radius: 6px; color: #777; text-decoration: none; border-left: 2px solid transparent; transition: all .15s ease; }
.sidebar-nav a:hover { color: #222; background: rgba(0, 0, 0, .04); }
.sidebar-nav a.active { color: var(--rose-ink); font-weight: 600; border-left-color: var(--rose-ink); background: var(--rose-soft); }
@media screen and (max-width: 1380px) { .sidebar-nav { display: none; } }

/* soft surfaces instead of ink outlines and hard shadows */
.dv-panel, .card-chart, .bib, .table-wrap, .method, .sim { border: 1px solid var(--edge) !important; box-shadow: var(--shadow) !important; border-radius: 12px; }
.dv-panel { background: var(--paper-raised); }
.player__stage, .slot__frame, .thumb, .thumb img { border-color: var(--edge) !important; }
.player__stage, .triple .slot__frame, .dv-panel .player__stage { box-shadow: none !important; border: 0 !important; }
.thumb { border: 1px solid var(--edge); }
.thumb img { border-bottom: 1px solid var(--edge); }
.thumb[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--rose-ink) !important; transform: none !important; }
.tab, .seg, .speed, .btn { border: 1px solid #c9cad2 !important; box-shadow: none !important; font-family: var(--font-head); }
.tab { font-size: .88rem; height: 36px; }
.tab:hover, .btn:hover { transform: none !important; }
.tab[aria-selected="true"] { background: #363636 !important; color: #fff !important; border-color: #363636 !important; transform: none !important; }
.seg button + button, .speed button + button { border-left: 1px solid #c9cad2 !important; }
.seg button[aria-pressed="true"], .speed button[aria-pressed="true"] { background: #363636; color: #fff; }
.btn { background: #fff; }
.kicker, .sr__title, .thumb__label, .triple__cap { letter-spacing: .04em; }
.triple__cap { text-align: center; font-size: .9rem; }
.panel__instruction { font-family: var(--font-head); font-style: normal !important; font-size: 1.25rem !important; }
.tasknote p, .card-chart__lead { font-size: 1.05rem !important; line-height: 1.65 !important; }
.abl .dv-tabs { margin-bottom: 4px; }
.method__steps button { border: 1px solid #c9cad2 !important; box-shadow: none !important; transform: none !important; font-family: var(--font-head); }
.method__steps button[aria-selected="true"] { background: var(--rose); border-color: var(--rose-ink) !important; }
.method__steps b { border-width: 1px; }
.method__legend { border-color: var(--edge); }
.taskshow { margin-top: 1.25rem; }
.stage { border: 1px solid #c9cad2 !important; box-shadow: none !important; transform: none !important; font-family: var(--font-head); }
.stage[aria-current="true"] { border-color: var(--rose-ink) !important; }
.taskcell { color: var(--ink); opacity: .7; }
.taskcell[aria-selected="true"] { box-shadow: 0 0 0 2px var(--ink); }
.taskcell__fill { background: var(--ink); }
.taskcell__bar { background: #ffffff80; }

/* alternating section backgrounds */
body > .section:nth-of-type(even) { background: #f5f6f8; }
body > .section:nth-of-type(even) .dv-panel { background: #fff; }
.footer { margin-top: 0; background: #fff; border-top: 1px solid #ececf0; }

/* highlighted phrases in the task note, in the task's colour */
.hl { background: color-mix(in srgb, var(--c) 55%, #fff); color: inherit; padding: .08em .28em; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Action DiT: the paper figure's warm beige, a little deeper so it reads on screen (was rose) */
.n--act .mod { fill: #f5ebe5; }
.n--act.is-on .mod { fill: #ead3c6; }
.n--act.is-on .layer--hot { fill: #fbf2ec; }

/* ---------- baseline vs DeVA comparison ---------- */
.cmp { display: grid; gap: 28px; margin: 1.5rem 0 2.5rem; }
.cmp__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.cmp__task { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: #363636; }
.cmp__instr { color: #666; font-size: 1rem; }
.cmp__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cmp__col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cmp__chip { font-family: var(--font-head); font-weight: 600; font-size: .92rem; padding: 3px 12px; border-radius: 6px; }
.cmp__col--base .cmp__chip { background: #fde8e6; color: #b3362b; }
.cmp__col--deva .cmp__chip { background: var(--rose-soft); color: var(--rose-ink); }
.cmp__col video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; }
.cmp__sr { font-size: .95rem; color: #555; }
.cmp__col--base .cmp__sr b { color: #b3362b; }
.cmp__col--deva .cmp__sr b { color: var(--rose-ink); }
@media (max-width: 640px) { .cmp__pair { grid-template-columns: minmax(0, 1fr); } }
.cmp__col--deva .cmp__chip { background: #e3f4e8; color: #1f7a3d; }
.cmp__col--deva .cmp__sr b { color: #1f7a3d; }
.cmp__note { align-self: stretch; margin: 2px 0 0; font-size: .98rem; line-height: 1.55; color: #444; text-align: left; }
.cmp { gap: 34px; margin-bottom: 1rem; }
.cmp__note { margin-top: 12px; font-size: 1.02rem; line-height: 1.6; text-align: justify; }
.sidebar-nav .nav-sub a { padding: 4px 10px 4px 22px; font-size: .78rem; color: #9a9a9a; }
.section .title.is-3 + .title.is-4 { margin-top: .5rem; }

/* line charts as small multiples: 2 metrics x 2 datasets in one row */
.lc__groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.lc__title { margin: 0 0 6px !important; font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: #363636; display: flex; justify-content: space-between; align-items: baseline; }
.lc__title span { font-weight: 400; font-size: .82rem; color: #888; }
.lc__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lc__panel { margin: 0; }
.lc__panel figcaption { font-size: .8rem; color: #666; text-align: center; margin-bottom: 2px; }
.lc__groups .lc__line { stroke-width: 2.5; }
.lc__groups .lc__dot { stroke-width: 1.8; }
.lc__groups .lc__frame { stroke-width: 1; }
.lc__groups .lc__tick, .lc__groups .lc__axis { font-size: 10.5px; }
.lc__groups .chart__note { margin-top: 4px !important; font-size: .82rem; line-height: 1.4; }
.lc .chart__head { margin-bottom: 10px; }
@media (max-width: 760px) { .lc__groups { grid-template-columns: minmax(0, 1fr); } }
.lc__groups .lc__tick, .lc__groups .lc__axis { font-size: 12px; }

/* analysis lines in the page palette: rose = DeVA, lavender = without grounding (a little deeper so thin lines read) */
.lc-deva { color: #e58fb0; stroke: #e58fb0; }
.lc-base { color: #a596d8; stroke: #a596d8; }
.lc__area { fill: var(--rose); opacity: .3; }
.lc__title { justify-content: flex-start; gap: 8px; align-items: center; }
.lc__title .lc__metric { font-family: var(--font-head); font-weight: 700; font-size: .85rem; color: var(--ink); background: var(--rose-soft); border: 1px solid var(--rose); border-radius: 6px; padding: 1px 8px; }
.lc__groups .lc__ylabel { font-size: 13px; font-weight: 700; fill: var(--ink); }

/* analysis lines: the paper figure's colours (orange = with grounding, grey = without) */
.lc-deva { color: #e8874f; stroke: #e8874f; }
.lc-base { color: #8c8c8c; stroke: #8c8c8c; }
.lc__area { fill: #f6c9a8; opacity: .38; }
.lc__title .lc__metric { background: #fbeadf; border-color: #f0b995; }

/* analysis lines: the pink version of the paper figure (pink = with grounding, grey = without) */
.lc-deva { color: #e56ea2; stroke: #e56ea2; }
.lc-base { color: #8c8c8c; stroke: #8c8c8c; }
.lc__area { fill: var(--rose); opacity: .32; }
.lc__title .lc__metric { background: var(--rose-soft); border-color: var(--rose); }

/* a paper figure shown as-is */
.paperfig { background: #fff; text-align: center; }
.paperfig img { display: block; width: 100%; max-width: 700px; height: auto; margin: 0 auto; }
.paperfig figcaption { margin: 12px auto 0; max-width: 700px; font-size: .9rem; line-height: 1.5; color: #555; text-align: left; }

/* interactive t-SNE */
.ts__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ts__panel { margin: 0; }
.ts__panel figcaption { font-size: .85rem; color: #666; text-align: center; margin-bottom: 4px; }
.ts__svg { display: block; width: 100%; height: auto; border: 1px solid var(--edge); border-radius: 8px; background: #fff; }
.ts__dot { stroke: #555; stroke-width: .4; transition: transform 1.3s cubic-bezier(.45, .05, .25, 1), opacity .25s ease; }
.ts__dot--idle { stroke: none; opacity: .8; }
.ts__dot.is-dim { opacity: .08; }
.ts__sw { border-radius: 50% !important; border-width: 1px !important; border-color: #555 !important; }
.ts .legend__item[aria-pressed="false"] { text-decoration: none; }
.ts + .chart__note { margin-top: 12px !important; font-size: .9rem; line-height: 1.5; color: #555; }
@media (max-width: 640px) { .ts__grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .ts__dot { transition: opacity .25s ease; } }

/* method widget: steps that have not happened yet show only as faint module outlines.
   Their arrows (between modules and inside them) stay hidden until the step is reached. */
.method .e[data-s]:not(.is-on):not(.is-done),
.method .rd[data-s]:not(.is-on):not(.is-done),
.method .elabels [data-s]:not(.is-on):not(.is-done) { opacity: 0; }
.method .n[data-s]:not(.is-on):not(.is-done) .mini,
.method .n[data-s]:not(.is-on):not(.is-done) .kv { opacity: 0; }
.method .mini, .method .kv { transition: opacity .45s ease; }
.method .acts:not(.is-on):not(.is-done) .traj { marker-end: none; }
/* the read-out diamond inside the decoder belongs to step 4 (Readout & Flatten) */
#method-widget .n--dec > .rd { opacity: 0; transition: opacity .45s ease; }
#method-widget[data-step="4"] .n--dec > .rd { opacity: 1; }

/* t-SNE: example clips. Ringed dots have a clip; the preview shows the phase under the pointer. */
.ts__svg--hover { cursor: crosshair; touch-action: none; }
.ts__dot--ex { stroke: #1b1924; stroke-width: 1.3; }
.ts__dot.is-active { stroke: #1b1924; stroke-width: 2.4; r: 5.2px; opacity: 1 !important; }
.ts__preview { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--edge); border-radius: 10px; background: var(--paper-raised); min-height: 150px; }
.ts__pvhead { margin: 0 0 8px !important; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; color: #555; }
.ts__pvhead b { font-family: var(--font-head); font-size: 1rem; color: #363636; text-transform: capitalize; }
.ts__preview img { display: block; width: 100%; height: auto; border-radius: 6px; }

/* t-SNE: floating clip next to the pointer */
.ts__pop { position: fixed; z-index: 200; width: min(460px, calc(100vw - 16px)); padding: 8px; pointer-events: none;
  background: #fff; border: 1px solid var(--edge); border-radius: 10px; box-shadow: 0 8px 28px rgba(10, 10, 20, .22); }
.ts__pop[hidden] { display: none; }
.ts__pophead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-family: var(--font-head); }
.ts__pophead b { font-size: .98rem; color: #363636; text-transform: capitalize; }
.ts__pop video { display: block; width: 100%; aspect-ratio: 3 / 1; border-radius: 6px; background: #000; }
.ts__popfoot { margin-top: 4px; font-size: .74rem; color: #888; text-align: center; letter-spacing: .02em; }

/* hero: the title sits on a translucent band across the video */
.dv-hero__band { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); padding: clamp(22px, 4.5vh, 48px) 24px;
  background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  text-align: center; color: #14141f; pointer-events: none; }
.dv-hero__title { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(40px, 6vw, 76px); line-height: 1.05; letter-spacing: -.01em; color: #14141f; }
.dv-hero__sub { margin: 10px auto 0; max-width: 900px; font-family: "Noto Sans", sans-serif; font-size: clamp(17px, 2.1vw, 28px); line-height: 1.3; color: #2c2c3a; }
.dv-hero__meta { margin: 16px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; font-family: var(--font-head); font-size: clamp(14px, 1.2vw, 17px); color: #333; }
.dv-hero__meta span + span { color: #666; }
/* a slight white wash over the whole hero video */
.hero__shade { background: linear-gradient(transparent 62%, #0b0a10b3), rgba(255, 255, 255, .14); }
.hero__shade { background: linear-gradient(transparent 62%, #0b0a1099), rgba(255, 255, 255, .26); }
.hero__shade { background: linear-gradient(transparent 62%, #0b0a1080), rgba(255, 255, 255, .44); }
.hero__cap-name, .hero__cap-text { text-shadow: 0 1px 10px rgba(0, 0, 0, .55); }
/* no band: the title sits directly on the washed video */
.dv-hero__band { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.dv-hero__title, .dv-hero__sub, .dv-hero__meta { text-shadow: 0 0 14px rgba(255, 255, 255, .9), 0 0 3px rgba(255, 255, 255, .7); }
.dv-hero__meta span + span { color: #444; }

/* current-frame-only failure rollouts: one row of three head-camera videos */
.cf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 1.25rem 0 .75rem; }
.cf__item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cf__task { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: #363636; }
.cf__chip { font-family: var(--font-head); font-weight: 600; font-size: .86rem; padding: 3px 12px; border-radius: 6px; background: #fde8e6; color: #b3362b; }
.cf__item video { display: block; width: 100%; aspect-ratio: 4 / 3; background: #000; border-radius: 10px; }
.cf__sr { font-size: .86rem; color: #555; text-align: center; }
.cf__sr b { color: #b3362b; } .cf__sr b.ours { color: #1f7a3d; }
@media (max-width: 700px) { .cf { grid-template-columns: minmax(0, 1fr); } }
.cf__sr { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .9rem; }
.cf__cur, .cf__cur b { color: #b3362b; }
.cf__deva, .cf__deva b { color: #1f7a3d; }

/* training signal: four contact visualisations, two per row */
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 1.25rem 0 .5rem; }
.contact__item { margin: 0; }
.contact__item video { display: block; width: 100%; aspect-ratio: 1080 / 742; background: #000; border-radius: 10px; cursor: pointer; }
.contact__item figcaption { margin-top: 6px; text-align: center; font-size: .9rem; color: #555; }
@media (max-width: 640px) { .contact { grid-template-columns: minmax(0, 1fr); } }
.contact__item video { background: #f6f0e6; border: 1px solid var(--edge); }
.c-grasp { color: #2a9a45; } .c-force { color: #d9770a; } .c-both { color: #c9302c; }
.contact__item video { aspect-ratio: 1080 / 728; }

/* layout-OOD concept figure */
.oodfig { margin: 1rem 0 0; }
.oodfig img { max-width: none; width: 100%; border: 1px solid var(--edge); border-radius: 10px; background: #fff; }
.oodfig img { border-radius: 0; }

/* rollouts under the layout figure */
.oodvids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 1.25rem 0 0; }
.oodvids__item { margin: 0; }
.oodvids__item video { display: block; width: 100%; aspect-ratio: 4 / 3; background: #000; }
.oodvids__item figcaption { margin-top: 6px; text-align: center; font-size: .9rem; color: #555; }
@media (max-width: 640px) { .oodvids { grid-template-columns: minmax(0, 1fr); } }
/* layout rollouts: rounded, cropped to 16:9 like the comparison videos (the crop removes mostly the wall at the top) */
.oodvids__item video { aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 80%; border-radius: 10px; }
.oodvids { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.oodvids__item figcaption { font-size: .84rem; }
@media (max-width: 640px) { .oodvids { grid-template-columns: minmax(0, 1fr); } }

/* "More results" under Scene layout: figure on the left, two rollouts to its right */
.oodmore { margin: 1.25rem 0 0; }
.oodmore summary { font-family: var(--font-head); font-size: .92rem; background: #fff; border: 1px solid #c9cad2; }
.oodrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; align-items: start; }
.oodrow figure { margin: 0; }
.oodrow__fig img { display: block; width: 100%; height: auto; border: 1px solid var(--edge); background: #fff; }
.oodrow__vid video { display: block; width: 100%; aspect-ratio: 1280 / 1032; object-fit: cover; object-position: 50% 70%; border-radius: 10px; background: #000; }
@media (max-width: 640px) { .oodrow { grid-template-columns: minmax(0, 1fr); } }
.oodwide { margin: 12px 0 0; }
.oodwide img { display: block; width: 100%; height: auto; border: 1px solid var(--edge); background: #fff; }
.oodrow--two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.oodnote { margin: 8px 0 0; font-size: .84rem; color: #777; }

/* base next to DeVA in the bottles row */
.oodrow--four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.oodrow__vid { position: relative; }
.oodbadge { position: absolute; left: 8px; top: 8px; z-index: 2; font-family: var(--font-head); font-weight: 600; font-size: .74rem; padding: 2px 8px; border-radius: 5px; pointer-events: none; }
.oodbadge--base { background: #fde8e6; color: #b3362b; }
.oodbadge--deva { background: #e3f4e8; color: #1f7a3d; }
@media (max-width: 640px) { .oodrow--four { grid-template-columns: minmax(0, 1fr); } }

/* task name above each block in the Robustness section */
.oodtask { margin: 1.1rem 0 .5rem; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: #363636; }
.oodmore .oodtask:first-of-type { margin-top: .9rem; }
.oodtask + .oodrow, .oodtask + .oodfig { margin-top: 0; }
#top.hero .hero-body { padding: 3rem 1.5rem 1rem; }

/* bridge layout figure: one cell, three block colours to switch between */
.oodswap { position: relative; }
.oodswap__tabs { position: absolute; left: 8px; top: 8px; z-index: 2; display: flex; gap: 4px; }
.oodswap__tabs button { font-family: var(--font-head); font-weight: 600; font-size: .72rem; padding: 2px 8px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--c); background: #fff; color: var(--c); }
.oodswap__tabs button[aria-pressed="true"] { background: var(--c); color: #fff; }

/* robot-init perturbation: two presentations side by side */
.initcmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 1rem 0 0; }
.initcmp figure { margin: 0; }
.initcmp figcaption { font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: #555; margin-bottom: 6px; }
.initcmp img, .initcmp video { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; background: #ddd; }
@media (max-width: 640px) { .initcmp { grid-template-columns: minmax(0, 1fr); } }
.initfig { margin: 1rem auto 0; max-width: 640px; }
.initfig video { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; background: #ddd; }

/* robot-init: start-pose clip on the left, a grid of small rollouts on the right */
.initrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 14px; margin: 1rem 0 0; align-items: start; }
.initrow .initfig { margin: 0; max-width: none; }
.initgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.initgrid figure { margin: 0; }
.initgrid video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #000; }
.initgrid figcaption { margin-top: 3px; font-size: .74rem; color: #666; text-align: center; }
.initgrid .oodbadge { font-size: .64rem; left: 5px; top: 5px; padding: 1px 6px; }
@media (max-width: 760px) { .initrow { grid-template-columns: minmax(0, 1fr); } }
/* robot-init row: start-pose clip takes half the row (its original size), rollouts fill the other half two per row */
.initrow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.initgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.initgrid figure { position: relative; }
.initgrid figcaption { position: absolute; left: 5px; bottom: 5px; margin: 0; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .66rem; pointer-events: none; }

/* head-camera perturbation: one column of cycling views per task, two rollouts to the right */
.camrow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 12px; margin: 1rem 0 0; align-items: start; }
.camcols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.camcols figure, .camvids figure { margin: 0; position: relative; }
.camcols video { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 6px; background: #ddd; }
.camcols figcaption { margin-top: 3px; font-size: .68rem; line-height: 1.25; color: #555; text-align: center; }
.camvids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.camvids video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #000; }
.camvids figcaption { position: absolute; left: 5px; bottom: 5px; margin: 0; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .66rem; pointer-events: none; }
.camvids .oodbadge { font-size: .64rem; left: 5px; top: 5px; padding: 1px 6px; }
@media (max-width: 760px) { .camrow { grid-template-columns: minmax(0, 1fr); } }

/* main colour: purple (between #d1b1f0 and #ba88eb) instead of rose. The token names keep "rose" so existing rules follow. */
:root {
  --rose: #c59cee;
  --rose-soft: #f2e9fc;
  --rose-ink: #6d3fb0;
}
::selection { background: #d9c2f5; }
.lc-deva { color: #9a5fe0; stroke: #9a5fe0; }
.lc__area { fill: #c59cee; opacity: .3; }
.lc__title .lc__metric { background: var(--rose-soft); border-color: var(--rose); }

/* lighter main purple (the light end of the range) */
:root { --rose: #d1b1f0; --rose-soft: #f6f0fd; --rose-ink: #7a4dc0; }
::selection { background: #e2d0f7; }
.lc-deva { color: #a877e6; stroke: #a877e6; }
.lc__area { fill: #d1b1f0; opacity: .3; }
.rb__row.is-ours .rb__fill { background: #eab5c9; }  /* bar charts keep the paper-figure colours */

/* "DeVA" in the title: gradient text across the purple range, no underline band */
.mark, .publication-title .mark {
  padding: 0;
  background: linear-gradient(90deg, #d1b1f0, #ba88eb);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* architecture step buttons: light grey instead of purple */
.method__steps button:hover { background: #f1f2f4; }
.method__steps button.is-done { background: #fafafa; }
.method__steps button[aria-selected="true"] { background: #e6e7eb; border-color: #a9abb5 !important; color: #363636; }
/* selected step stands out: bold label and a darker, thicker outline (inset, so the button does not change size) */
.method__steps button[aria-selected="true"] { font-weight: 700; border-color: #55576a !important; box-shadow: inset 0 0 0 1px #55576a !important; }
.method__steps button[aria-selected="true"] b { border-color: #363636; border-width: 1.5px; }
/* selected step: the hard dark offset shadow is back (grey fill, no purple) */
.method__steps button[aria-selected="true"] { font-weight: 500; background: #e6e7eb; border: 1.5px solid var(--ink) !important; box-shadow: 3px 3px 0 var(--ink) !important; transform: translate(-1px, -1px) !important; }
.method__steps button[aria-selected="true"] b { border-color: var(--ink); }

/* architecture overview: module names in the colours of the diagram */
.mk { padding: 0 .25em; border-radius: 4px; font-weight: 600; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mk--video { background: #a9c1e4; color: #23406e; }
.mk--dec { background: #cfc3e8; color: #4a3484; }
.mk--act { background: #ead3c6; color: #7a4a30; }
