/* WAVE additions on top of the Nerfies template (index.css is the Nerfies file, unmodified). */

.wave {
  font-variant: small-caps;
}

/* Task videos: a grid of looping clips with a caption under each. */
.video-grid {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}
.video-grid.is-2 { grid-template-columns: repeat(2, 1fr); }
.video-grid.is-3 { grid-template-columns: repeat(3, 1fr); }
.video-grid video {
  display: block;
  width: 100%;
  border-radius: 10px;
}
.video-grid .figure-caption { margin-top: 0.3rem; }

@media screen and (max-width: 768px) {
  .video-grid.is-3 { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 480px) {
  .video-grid.is-2, .video-grid.is-3 { grid-template-columns: 1fr; }
}

.figure-caption {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.5rem;
}

/* Tabs above the switchable charts */
.chart-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 0.75rem;
}

/* Interactive line charts (static/js/charts.js) */
.line-chart {
  position: relative;
  margin: 0.5rem 0;
}

.line-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: 'Noto Sans', sans-serif;
}

.line-chart .axis text { font-size: 12px; fill: #555; }
.line-chart .axis-title { font-size: 13px; fill: #363636; }
.line-chart .grid line { stroke: #eee; }
.line-chart .baseline { stroke: #bbb; }
.line-chart .train-band { fill: #f5f5f5; }
.line-chart .train-label { font-size: 11px; fill: #888; }
.line-chart .series path.line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .series.is-published path.line { stroke-width: 1.2; stroke-dasharray: 4 3; }
.line-chart .series.is-dashed path.line { stroke-dasharray: 5 3; stroke-width: 1.5; }
.line-chart .series path.band { opacity: 0.1; stroke: none; }
.line-chart .series circle { stroke: #fff; stroke-width: 1; }
.line-chart .series { transition: opacity 0.2s ease; }
.line-chart.has-focus .series:not(.is-focus) { opacity: 0.15; }
.line-chart .series.is-hidden { display: none; }
.line-chart .draw path.line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.line-chart.in-view .draw path.line { transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1); stroke-dashoffset: 0; }
.line-chart .draw path.band, .line-chart .draw circle { opacity: 0; }
.line-chart.in-view .draw path.band { transition: opacity 0.6s ease 0.9s; opacity: 0.1; }
.line-chart.in-view .draw circle { transition: opacity 0.4s ease 1s; opacity: 1; }
.line-chart .crosshair { stroke: #999; stroke-dasharray: 2 3; pointer-events: none; }

.chart-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: #363636;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.45;
  padding: 7px 10px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.chart-tooltip.is-visible { opacity: 1; }
.chart-tooltip .tt-head { font-weight: 700; margin-bottom: 2px; }
.chart-tooltip .tt-row { display: flex; align-items: center; gap: 6px; }
.chart-tooltip .tt-swatch { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chart-tooltip .tt-val { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.chart-tooltip .tt-range { color: #aaa; font-size: 11px; padding-left: 6px; }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin-top: 0.4rem;
  font-size: 0.85rem;
}
.chart-legend button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.chart-legend button.is-off { opacity: 0.35; }
.chart-legend .swatch { display: inline-block; width: 16px; height: 3px; border-radius: 2px; }
.chart-legend .swatch.is-dashed { background-image: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; }

/* Baselines table */
.table-container { margin-top: 1rem; }
.table.results { font-size: 0.85rem; }
.table.results td, .table.results th { text-align: center; font-variant-numeric: tabular-nums; padding-left: 0.4em; padding-right: 0.4em; }
.table.results td:first-child, .table.results th:first-child { text-align: left; }
.table.results td.zero { color: #b5b5b5; }

@media screen and (max-width: 768px) {
  .line-chart { overflow-x: auto; }
  .line-chart svg { min-width: 620px; }
  .equation { overflow-x: auto; font-size: 0.85em; }
}

/* Keep wide tables and charts inside the column instead of widening it. */
.column.is-full-width { min-width: 0; }
.table.results tr.is-ours { background: #f5f5f5; }

/* ── Light/dark theme toggle ── */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 30;
  width: 2.5em;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"],
html[data-theme="dark"] body { background: #171717; color: #c9ccd1; }
html[data-theme="dark"] .title,
html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .content h2,
html[data-theme="dark"] .content h3,
html[data-theme="dark"] strong,
html[data-theme="dark"] b { color: #eceef1; }
html[data-theme="dark"] .content,
html[data-theme="dark"] .publication-authors { color: #c9ccd1; }
html[data-theme="dark"] .publication-authors a { color: #5eb4f5 !important; }
html[data-theme="dark"] a { color: #6ea8ff; }
html[data-theme="dark"] .hero.is-light { background: #1f2227; }
html[data-theme="dark"] .footer { background: #1f2227; }
html[data-theme="dark"] .footer .icon-link { color: #eceef1; }
html[data-theme="dark"] .content pre { background: #1f2227; color: #d6d9de; }
html[data-theme="dark"] .figure-caption { color: #9aa0a8; }

/* Paper figures are drawn on white; keep them on a white card so they read in dark mode. */
html[data-theme="dark"] .teaser img,
html[data-theme="dark"] .content img { background: #fff; border-radius: 6px; padding: 8px; }

/* Buttons: toggle, tabs and the link buttons */
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .chart-tabs .button:not(.is-dark) { background: #262a30; border-color: #3a3e45; color: #c9ccd1; }
html[data-theme="dark"] .chart-tabs .button.is-dark,
html[data-theme="dark"] .publication-links .button.is-dark { background: #eceef1; color: #171717; }

/* Table */
html[data-theme="dark"] .table { background: transparent; color: #c9ccd1; }
html[data-theme="dark"] .table th { color: #eceef1; }
html[data-theme="dark"] .table td, html[data-theme="dark"] .table th { border-color: #33373d; }
html[data-theme="dark"] .table.is-hoverable tbody tr:not(.is-selected):hover { background: #23262b; }
html[data-theme="dark"] .table.results tr.is-ours { background: #262a30; }
html[data-theme="dark"] .table.results td.zero { color: #5c6168; }

/* Charts */
html[data-theme="dark"] .line-chart .axis text { fill: #9aa0a8; }
html[data-theme="dark"] .line-chart .axis-title { fill: #c9ccd1; }
html[data-theme="dark"] .line-chart .grid line { stroke: #2a2d33; }
html[data-theme="dark"] .line-chart .baseline { stroke: #4a4e55; }
html[data-theme="dark"] .line-chart .train-band { fill: #1f2227; }
html[data-theme="dark"] .line-chart .train-label { fill: #7d838b; }
html[data-theme="dark"] .line-chart .series circle,
html[data-theme="dark"] .line-chart .series rect { stroke: #171717; }
html[data-theme="dark"] .line-chart .series path.band { opacity: 0.18; }
html[data-theme="dark"] .line-chart.in-view .draw path.band { opacity: 0.18; }
html[data-theme="dark"] .chart-tooltip { background: #eceef1; color: #171717; }
html[data-theme="dark"] .chart-tooltip .tt-range { color: #6b7078; }
html[data-theme="dark"] .chart-legend { color: #c9ccd1; }
/* The near-black series (EIT distilled, multipliers only) would vanish on the dark background. */
html[data-theme="dark"] .line-chart [stroke="#3a3a3a"] { stroke: #bfc3c9; }
html[data-theme="dark"] .line-chart [fill="#3a3a3a"] { fill: #bfc3c9; }
html[data-theme="dark"] .chart-legend .swatch[style*="#3a3a3a"],
html[data-theme="dark"] .chart-tooltip .tt-swatch[style*="#3a3a3a"] { background: #bfc3c9 !important; }

/* Figures embedded as standalone HTML pages (static/figures/). The iframe is laid out at the
   figure's native size and scaled to the column width by index.js. */
.html-figure {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
}
.html-figure iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: 0 0;
}
html[data-theme="dark"] .html-figure { background: transparent; }
/* Fallback when the frame's document is not reachable: invert the whole frame from outside. */
html[data-theme="dark"] .html-figure.no-access iframe { filter: invert(0.91) hue-rotate(180deg); }

/* PNG plots with rendered frames on top (necessity_episode.png): in dark mode invert the plot
   like the HTML figures and lay an untouched copy over the frame strip (rows 100-339, columns
   199-2366 of the 2375x1150 image), so the renders keep their real colors. */
.dark-plot { position: relative; }
.dark-plot img { display: block; width: 100%; }
.dark-plot .dark-plot-keep { display: none; }
html[data-theme="dark"] .content .dark-plot img { background: none; padding: 0; border-radius: 0; }
html[data-theme="dark"] .dark-plot img:first-child { filter: invert(0.91) hue-rotate(180deg); }
html[data-theme="dark"] .dark-plot .dark-plot-keep {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  clip-path: inset(8.7% 0.3% 70.5% 8.35%);
}

/* Real-robot videos: full column width, one under the other. */
.real-video {
  display: block;
  width: 100%;
  border-radius: 10px;
  background: #000;
}

/* Affiliation logos under the author list, each with its affiliation number. */
.affiliation-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 0.75rem 0 0.25rem;
}
.affiliation-logos .logo-item {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.2rem;
  color: #4a4a4a;
}
.affiliation-logos img { display: block; height: 44px; width: auto; }
/* Fraunhofer's lettering is black, so dark mode swaps in a variant with light lettering. */
.affiliation-logos .logo-dark { display: none; }
html[data-theme="dark"] .affiliation-logos .logo-light { display: none; }
html[data-theme="dark"] .affiliation-logos .logo-dark { display: block; }
html[data-theme="dark"] .affiliation-logos .logo-item { color: #c9ccd1; }
.corresponding-author { font-size: 0.85rem; color: #4a4a4a; margin: 0.4rem 0 0; }
html[data-theme="dark"] .corresponding-author { color: #c9ccd1; }

/* ── Figure hotspots and notes (static/js/figure_notes.js) ── */
.html-figure { overflow: visible; }
.fig-hotspots {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  z-index: 2;
}
.fig-hotspot {
  position: absolute;
  display: block;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: help;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.fig-hotspot.has-link { cursor: pointer; }
.fig-hotspot:hover,
.fig-hotspot:focus-visible,
.fig-hotspot.is-active {
  border-color: rgba(31, 95, 191, 0.75);
  background: rgba(31, 95, 191, 0.06);
  outline: none;
}
.fig-popover {
  position: absolute;
  z-index: 20;
  width: min(340px, 100%);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: #fff;
  color: #4a4a4a;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s;
}
.fig-popover.is-visible { opacity: 1; visibility: visible; }
.fig-popover p { margin: 0 0 0.4rem; }
.fig-popover p:last-child { margin-bottom: 0; }
.fig-popover .fig-popover-title { font-weight: 700; color: #363636; }
.fig-popover-link { font-weight: 600; }
.figure-hint { font-size: 0.8rem; color: #7a7a7a; text-align: center; margin-top: 0.4rem; }
html[data-theme="dark"] .fig-popover { background: #23262b; color: #c9ccd1; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .fig-popover .fig-popover-title { color: #eceef1; }
html[data-theme="dark"] .fig-hotspot:hover,
html[data-theme="dark"] .fig-hotspot:focus-visible,
html[data-theme="dark"] .fig-hotspot.is-active { border-color: rgba(110, 168, 255, 0.8); background: rgba(110, 168, 255, 0.08); }
html[data-theme="dark"] .figure-hint { color: #7d838b; }

/* ── Text emphasis, in Figure 1's color code ──
   blue: trained parts (selection and warping policy), slate: the frozen skill,
   orange: the warp itself, bold: key results. */
:root {
  --c-trained: #1f5fbf;
  --c-frozen: #5b6472;
  --c-warp: #d0580f;
}
html[data-theme="dark"] {
  --c-trained: #6ea8ff;
  --c-frozen: #aab2bf;
  --c-warp: #f0894a;
}
.wave { color: var(--c-trained); font-weight: 600; }
.term-trained { color: var(--c-trained); font-weight: 600; }
.term-frozen { color: var(--c-frozen); font-weight: 600; }
.term-warp { color: var(--c-warp); font-weight: 600; }
.key { font-weight: 700; color: #363636; }
html[data-theme="dark"] .key { color: #eceef1; }
.publication-title .title-accent { color: var(--c-trained); }
.publication-title .title-warp { color: var(--c-warp); }

/* ── Table of contents: fixed on the left, collapsed behind an arrow tab ── */
.toc {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  transform: translate(-260px, -50%);
  transition: transform 0.25s ease;
}
.toc.is-open { transform: translate(0, -50%); }
.toc-panel {
  order: 1;
  width: 260px;
  max-height: 75vh;
  overflow-y: auto;
  padding: 0.9rem 1rem 0.9rem 1.1rem;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-left: 0;
  border-radius: 0 10px 10px 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  font-size: 0.85rem;
  visibility: hidden;
  transition: visibility 0.25s;
}
.toc.is-open .toc-panel { visibility: visible; }
.toc-toggle {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 56px;
  padding: 0;
  border: 1px solid #e3e3e3;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #fff;
  color: #4a4a4a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}
.toc-toggle:hover { color: var(--c-trained); }
.toc.is-open .toc-toggle { box-shadow: none; }
.toc-title {
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a7a7a;
}
.toc-list, .toc-list ol { list-style: none; margin: 0; padding: 0; }
.toc-list ol { margin: 0.1rem 0 0.3rem 0.8rem; }
.toc-list a {
  display: block;
  padding: 0.2rem 0 0.2rem 0.6rem;
  border-left: 2px solid transparent;
  color: #4a4a4a;
  line-height: 1.35;
}
.toc-list ol a { color: #7a7a7a; font-size: 0.95em; }
.toc-list a:hover { color: var(--c-trained); }
.toc-list a.is-active { color: var(--c-trained); border-left-color: var(--c-trained); font-weight: 600; }

html[data-theme="dark"] .toc-panel,
html[data-theme="dark"] .toc-toggle { background: #1f2227; border-color: #33373d; }
html[data-theme="dark"] .toc-toggle,
html[data-theme="dark"] .toc-list a { color: #c9ccd1; }
html[data-theme="dark"] .toc-list ol a,
html[data-theme="dark"] .toc-title { color: #8a9099; }
html[data-theme="dark"] .toc-list a:hover,
html[data-theme="dark"] .toc-list a.is-active { color: var(--c-trained); }

/* Section jumps land a little below the window's top edge. */
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .toc { transition: none; } }

/* Direct labels of the published methods, as in the paper's figure: gray text with a halo in the
   background color so it stays readable over lines and bands. */
.line-chart .series-label {
  font-size: 11px;
  fill: #8a8f96;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
}
.line-chart .series-label-leader { stroke: #9aa0a6; stroke-width: 1; }
.line-chart .draw .series-label, .line-chart .draw .series-label-leader { opacity: 0; }
.line-chart.in-view .draw .series-label, .line-chart.in-view .draw .series-label-leader { transition: opacity 0.4s ease 1s; opacity: 1; }
html[data-theme="dark"] .line-chart .series-label { fill: #9aa0a8; stroke: #171717; }
html[data-theme="dark"] .line-chart .series-label-leader { stroke: #6b7078; }

/* ── Warp Explorer section (static/js/warp_viewer.js) ──
   Colors follow Figure 1: slate = the frozen skill, orange = the warp. */
.warp-viewer {
  margin: 1rem 0 0.5rem;
  padding: 1rem 1.1rem 0.9rem;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  --wv-output: #9c3d0a;
}
html[data-theme="dark"] .warp-viewer { border-color: #33373d; --wv-output: #ffb27a; }
.wv-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.wv-episodes { margin: 0 !important; align-items: center; }
.wv-episodes .button { margin-bottom: 0 !important; min-width: 2.2em; }
.wv-label { font-size: 0.8rem; color: #7a7a7a; margin-right: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.wv-play { margin: 0 !important; }
.wv-scrub { flex: 1 1 200px; accent-color: var(--c-warp); }
.wv-readout { margin: 0.6rem 0 0.8rem; font-size: 0.95rem; color: #4a4a4a; }
.wv-readout b { color: #363636; }

.wv-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.wv-video video { display: block; width: 100%; border-radius: 8px; background: #000; }

.wv-block { margin-bottom: 0.9rem; }
.wv-block:last-child { margin-bottom: 0; }
.wv-block-title { font-weight: 700; font-size: 0.9rem; color: #363636; margin-bottom: 0.35rem; }
.wv-block-sub { font-weight: 400; color: #7a7a7a; }
.wv-share, .wv-act {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) 2.6rem;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.7;
}
.wv-act { grid-template-columns: 8.5rem minmax(0, 1fr); }
.wv-share-label { color: #4a4a4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv-share-track, .wv-act-track { position: relative; height: 10px; border-radius: 5px; background: #f0f0f0; overflow: hidden; }
.wv-share-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 5px; }
.is-input .wv-share-fill { background: var(--c-warp); }
.is-output .wv-share-fill { background: var(--wv-output); }
.wv-share-val { text-align: right; font-variant-numeric: tabular-nums; color: #7a7a7a; }
.wv-act-track { height: 12px; }
.wv-act-zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #c8c8c8; }
.wv-act-bar { position: absolute; height: 5px; }
.wv-act-bar.is-skill { top: 1px; background: var(--c-frozen); }
.wv-act-bar.is-warped { bottom: 1px; background: var(--c-warp); }
.wv-legend { font-size: 0.78rem; color: #7a7a7a; margin-top: 0.4rem; }
.wv-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 0.3rem 0 0.8rem; vertical-align: -1px; }
.wv-swatch:first-child { margin-left: 0; }
.wv-swatch.is-skill { background: var(--c-frozen); }
.wv-swatch.is-warped, .wv-swatch.is-input { background: var(--c-warp); }
.wv-swatch.is-output { background: var(--wv-output); }

.wv-timeline { margin-top: 1rem; }
.wv-tl-svg { display: block; width: 100%; height: 90px; cursor: pointer; touch-action: none; }
.wv-tl-in { fill: none; stroke: var(--c-warp); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wv-tl-out { fill: none; stroke: var(--wv-output); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wv-tl-mark { stroke: #9aa0a6; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.wv-tl-mark-label { font-size: 11px; fill: #7a7a7a; text-anchor: middle; }
.wv-tl-head { stroke: #363636; stroke-width: 2; vector-effect: non-scaling-stroke; }

html[data-theme="dark"] .wv-readout, html[data-theme="dark"] .wv-share-label { color: #c9ccd1; }
html[data-theme="dark"] .wv-readout b, html[data-theme="dark"] .wv-block-title { color: #eceef1; }
html[data-theme="dark"] .wv-share-track, html[data-theme="dark"] .wv-act-track { background: #2a2d33; }
html[data-theme="dark"] .wv-act-zero { background: #4a4e55; }
html[data-theme="dark"] .wv-tl-head { stroke: #eceef1; }
html[data-theme="dark"] .wv-episodes .button:not(.is-dark) { background: #262a30; border-color: #3a3e45; color: #c9ccd1; }
html[data-theme="dark"] .wv-episodes .button.is-dark, html[data-theme="dark"] .wv-play { background: #eceef1; color: #171717; }

@media screen and (max-width: 768px) {
  .wv-main { grid-template-columns: 1fr; }
  .wv-share, .wv-act { grid-template-columns: 7rem minmax(0, 1fr) 2.6rem; }
  .wv-act { grid-template-columns: 7rem minmax(0, 1fr); }
}
.wv-timeline { position: relative; }
.wv-tl-grid { stroke: #e3e3e3; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.wv-tl-axis { position: absolute; left: 0; font-size: 0.72rem; color: #9a9a9a; margin-top: -92px; background: inherit; padding-right: 4px; }
html[data-theme="dark"] .wv-tl-grid { stroke: #33373d; }

/* Step navigator, speed slider and the explanation of the warp percentages. */
.wv-nav { margin: 0 !important; }
.wv-nav .button { margin-bottom: 0 !important; }
.wv-speed { display: inline-flex; align-items: center; gap: 0.4rem; }
.wv-speed input { width: 90px; accent-color: var(--c-warp); }
.wv-speed-val { font-size: 0.82rem; min-width: 2.6em; font-variant-numeric: tabular-nums; color: #4a4a4a; }
.wv-explain { font-size: 0.78rem; line-height: 1.5; color: #7a7a7a; margin: -0.3rem 0 0.9rem; }
.warp-viewer:focus { outline: none; }
.warp-viewer:focus-visible { outline: 2px solid var(--c-trained); outline-offset: 3px; }
html[data-theme="dark"] .wv-speed-val { color: #c9ccd1; }
html[data-theme="dark"] .wv-explain { color: #8a9099; }
html[data-theme="dark"] .wv-nav .button:not(.is-dark) { background: #262a30; border-color: #3a3e45; color: #c9ccd1; }

/* 3-D view of the Warp Explorer (static/js/warp_view3d.js); the video is shown in "Video" mode. */
.wv-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.wv-viewbar .buttons, .wv-viewbar .button { margin-bottom: 0 !important; }
.wv-mode { margin: 0 !important; }
.wv-reset-btn { margin-left: auto; }
.wv-3d { display: none; }
.wv-3d canvas { display: block; width: 100%; border-radius: 8px; cursor: grab; touch-action: none; }
.wv-3d canvas:active { cursor: grabbing; }
.wv-video.is-3d .wv-3d { display: block; }
.wv-video.is-3d video { display: none; }
.wv-3d-legend { display: none; line-height: 1.8; }
.wv-video.is-3d .wv-3d-legend { display: block; }
.wv-3d-legend.is-off .wv-dot, .wv-3d-legend.is-off .wv-dash { opacity: 0.3; }
.wv-hint { display: block; color: #9a9a9a; }
.wv-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 0.3rem 0 0.7rem; vertical-align: -1px; }
.wv-dot:first-child { margin-left: 0; }
.wv-dot.is-goal { background: #d98324; }
.wv-dot.is-obj { background: #4a6fa5; }
.wv-dot.is-ee { background: #2f8f6b; }
.wv-dash { display: inline-block; width: 16px; margin: 0 0.3rem 0 0.7rem; border-top: 2px dashed #b5453a; vertical-align: 3px; }
html[data-theme="dark"] .wv-viewbar .button:not(.is-dark) { background: #262a30; border-color: #3a3e45; color: #c9ccd1; }
html[data-theme="dark"] .wv-viewbar .button.is-dark { background: #eceef1; color: #171717; }
.wv-explain.wv-explain-wide { margin: 0.9rem 0 0; }

/* Task video grids: one frame format per grid (--grid-ar); a video of another shape is fitted in
   without cropping, so every row keeps the same height. */
.video-grid.is-uniform video { aspect-ratio: var(--grid-ar); object-fit: contain; background: #6b7a8c; }

/* Warp bars: 0..5 bit scale under each block; a value above the scale fills the bar and is marked. */
.wv-scale { line-height: 1.2; margin-top: 0.1rem; }
.wv-scale-track { position: relative; height: 1em; font-size: 0.72rem; color: #9a9a9a; }
.wv-scale-min { position: absolute; left: 0; }
.wv-scale-max { position: absolute; right: 0; }
.wv-share-track { overflow: visible; }
.wv-share-fill.is-over { border-radius: 5px 0 0 5px; }
.wv-share-fill.is-over::after {
  content: "\25b8"; position: absolute; right: -0.75em; top: 50%; transform: translateY(-50%);
  font-size: 0.8rem; line-height: 1; color: #363636;
}
html[data-theme="dark"] .wv-share-fill.is-over::after { color: #eceef1; }
html[data-theme="dark"] .wv-scale-track { color: #7d838b; }

/* Warp Explorer task selector: one row of tasks per embodiment. */
.wv-tasks { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.8rem; padding-bottom: 0.8rem; border-bottom: 1px solid #ececec; }
.wv-task-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.wv-task-row .buttons { margin: 0 !important; }
.wv-task-row .button { margin-bottom: 0 !important; }
.wv-task-group { min-width: 7.5rem; }
html[data-theme="dark"] .wv-tasks { border-bottom-color: #2a2d33; }
html[data-theme="dark"] .wv-task-row .button:not(.is-dark) { background: #262a30; border-color: #3a3e45; color: #c9ccd1; }
html[data-theme="dark"] .wv-task-row .button.is-dark { background: #eceef1; color: #171717; }

/* Related Work tables: text columns wrap, first column bold, WAVE row highlighted. */
.table.related { font-size: 0.85rem; }
.table.related th { white-space: nowrap; }
.table.related td { vertical-align: top; line-height: 1.45; }
.table.related td:first-child { min-width: 9rem; }
.table.related tr.is-ours { background: #f5f5f5; font-weight: 600; }
html[data-theme="dark"] .table.related tr.is-ours { background: #262a30; }
/* BIFOLD's wordmark is wide, so it sits lower to keep the row balanced. */
.affiliation-logos img[src*="bifold"] { height: 34px; }
