

/* Title block. Bulma gives .hero-body a flat 3rem of vertical padding, which
   leaves a large dead gap between the Arxiv button and the gallery heading
   below. Tighten the bottom while keeping the top airy. Scoped to the title
   hero so the Method section's .hero.is-small spacing is left alone. */
.title-hero > .hero-body {
  padding-bottom: 1rem;
}

/* Callout in the hero, directly under the Arxiv button: sets expectations that
   the page is a visual companion to the paper, not a replacement. Left-aligned
   and boxed with a teal accent so it reads as a note, distinct from the centered
   title block above it. */
.sv-page-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 880px;
  margin: 1.75rem auto 0;
  padding: 16px 22px;
  border-left: 4px solid #157e7e;
  border-radius: 10px;
  background: linear-gradient(135deg, #eafbfa, #f8fffe 55%, #ffffff);
  box-shadow: 0 8px 24px rgba(21, 126, 126, 0.12);
  text-align: left;
}

.sv-page-note i {
  flex: 0 0 auto;
  margin-top: 3px;
  color: #157e7e;
  font-size: 1.2rem;
}

.sv-page-note p {
  margin: 0;
  color: #23282f;
  font-size: 0.96rem;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .sv-page-note {
    gap: 10px;
    padding: 14px 16px;
  }
}

.publication-links {
  margin-top: 1.25rem;
}

/* Author names and the footer's template-credit links: recolor from Bulma's
   default link blue to the page's teal accent, so every clickable link
   reads as part of one palette. Normal body/label text is untouched.
   !important is needed on the author-block rule because the template base
   (files/index.css) sets .publication-authors a's color with !important
   itself -- higher specificity alone doesn't beat that. */
.publication-authors .author-block a,
footer.footer .content a {
  color: #29baba !important;
}

.publication-authors .author-block a:hover,
.publication-authors .author-block a:focus,
footer.footer .content a:hover,
footer.footer .content a:focus {
  color: #157e7e !important;
}

.sample-video-section {
  padding: 0.5rem 1.5rem 3rem;
}

.sample-video-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 1.5rem;
}

.sample-video-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(34, 90, 170, 0.16);
  border-radius: 18px;
  background: linear-gradient(145deg, #eef5ff, #f8fbff 48%, #ffffff);
  box-shadow: 0 12px 30px rgba(18, 54, 105, 0.12);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.sample-video-card:hover,
.sample-video-card:focus {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(34, 90, 170, 0.34);
  box-shadow: 0 18px 42px rgba(18, 54, 105, 0.20);
  outline: none;
}

.sample-video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #07101f;
}

.sample-video-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(5, 16, 32, 0.66));
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.sample-video-card::after {
  content: "Compare sample";
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  background: rgba(8, 21, 45, 0.72);
  backdrop-filter: blur(6px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.sample-video-card:hover::before,
.sample-video-card:focus::before,
.sample-video-card:hover::after,
.sample-video-card:focus::after {
  opacity: 1;
}

.sample-video-card:hover::after,
.sample-video-card:focus::after {
  transform: translateY(0);
}

/* Width tracks the visible panel cards in the infographic PNGs, not the PNG
   edge: those canvases carry ~40px of side padding (out of 1480), so at a
   1040px image the card spans (1480-80)/1480 * 1040 ~= 984px. Match that so
   the widget's panes line up with the panels above and below. */

/* ==========================================================================
 * Window-characterization ablation card.
 * The seven swept windows share one stage: a <video> per window, stacked and
 * cross-faded so switching does not reflow the section or flash a white gap.
 * ========================================================================== */

/* The grids are 1920x880 (a 6x5 tiling of 704p tiles). Pin the aspect ratio so
   the stacked absolute videos have a box to fill, and so the card keeps its
   height while a source is still loading. */

/* Fullscreen affordance, parked over the top-right of the stage. Sits above the
   stacked videos, which are pointer-events: none, so it is the only hit target
   inside the stage. Kept faint until the card is hovered so it does not compete
   with the grid, but always fully opaque once focused for keyboard users. */

/* Fullscreen presentation. Keyed off a JS-toggled class rather than :fullscreen
   so one rule covers the unprefixed and -webkit- APIs. The card becomes the
   whole viewport: drop the light card chrome, and cap the stage so the controls
   below always stay on screen. The stage keeps its aspect-ratio, and the videos
   are object-fit: contain, so a shorter cap just letterboxes them. */

/* The faint-until-hover treatment relies on a mouse; in fullscreen there may be
   no hover at all before the user goes looking for the exit control. */

/* Reset the native track so the thumb sits on our own rail. Bulma's slider
   stylesheet only targets input[type=range].slider, so this class is safe. */

/* Tick dots are positioned at the exact thumb-center x for their step, via an
   inline `left` set in JS (calc((100% - 20px) * frac + 10px)) — the same
   10px/20px thumb-radius math the browser uses to place the native thumb.
   That keeps the dot under the thumb exactly, at every step, instead of the
   near-miss you get from splitting the row into equal flex cells. */

/* The meter: track = 100%, fill = VBench Tot. as a fraction of that, so
   readers can see at a glance how far local-only/global-only collapse
   relative to any composed pair. */

/* Related-projects grid. Section carries no .container, so its background
   runs full width; the cards themselves stay a fixed, compact size instead
   of stretching to fill that width (a 4-column 1fr grid here turned each
   card into a giant slab on wide screens). Flex-wrap + a fixed basis lets
   them sit centered in one row on wide viewports and wrap on narrow ones,
   without ever growing past their natural size. */
.related-projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 2rem 0 0;
  padding: 0 1.5rem;
}

.related-project-card {
  flex: 0 1 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  min-height: 84px;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.10);
  color: inherit;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.related-project-card h3 {
  min-height: auto;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.related-project-card:hover,
.related-project-card:focus {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(10, 10, 10, 0.14);
  outline: none;
}

.related-project-card p {
  margin: 0;
  color: #4a4a4a;
}

.related-project-card .project-venue {
  margin-bottom: 0.15rem;
  line-height: 1.1;
}

@media (max-width: 960px) {
  .sample-video-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sample-video-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  /* Seven "21 x 3 x 3" labels cannot share this width. Drop to the volume-
     ordered dots plus the readout above, which already names the current
     window, and let the tick buttons stay as touch targets. */
  

  

  

  
}

@media (max-width: 520px) {
  .sample-video-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  

  

  

  

  
}

/* ==========================================================================
 * "World-Equivariant Gaussian Prior": the four-panel noise strips.
 * Ported from the supplementary material's conditioning strips. Four clips per
 * strip, read left to right:
 *
 *     source video -> source noise -> target noise -> SyncVid (ours)
 *
 * The two middle panels are the SAME noise field rendered under two cameras,
 * which is the whole claim of the method in one row.
 * ========================================================================== */

/* Tracks the Method figures' 1100px, so the strips line up with the rest of the
 * page rather than running wide. The mount also sits inside the page's own
 * container and column, so it stays inside them at every viewport.
 *
 * The consequence is worth knowing, because it works against the panels' design.
 * The noise renders are 104x60, one pixel per latent cell of the 8x VAE at
 * 480x832, shipped replicated 4x to 416px. At 1100px a panel is (1100 - 18)/4 =
 * 270px, so those 4px cells now DOWNSCALE to about 2.6px instead of rendering
 * 1:1. There is no width near 1100 that makes the ratio exact: 3px cells would
 * need a 1266px strip and 2px cells only 850px, so a fractional ratio is the
 * cost of matching the page. The `image-rendering` rule below is what keeps it
 * from becoming a blurred ratio as well as a fractional one. If the blocks read
 * as soft on a large display, the fix is to re-render the noise panels at 8x
 * from the 104x60 originals, not to widen this. */
.noise-strip-wrap {
  max-width: 1100px;
  /* Top margin because the first strip's title would otherwise sit right under the
   * section's explanation text. The gap belongs here rather than on .noise-strip,
   * which spaces the strips from EACH OTHER and is already set. */
  margin: 2rem auto 0;
}

.noise-strip {
  margin-bottom: 18px;
}

.noise-strip-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a4a4a;
}

.noise-strip-chip {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #5a6b80;
  border: 1px solid #dde4ed;
}

.noise-strip-panels {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.noise-strip-panel {
  flex: 1 1 0;
  min-width: 0;
}

.noise-strip-panel .panel-label {
  font-size: 0.7rem;
  color: #7a8899;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
  text-align: center;
}

.noise-strip-panel video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  /* Reserve the box before the clip loads, so the strips do not reflow the page
   * as they buffer in. Every panel is 416x240. */
  aspect-ratio: 416 / 240;
  background: #10151c;
}

/* The noise panels must NOT be smoothed, and this rule is the reason the whole
 * port works. They are 104x60 renders, one pixel per latent cell of the 8x VAE
 * at 480x832, already replicated 4x with a nearest-neighbour filter at encode
 * time. At this page's width they are then DOWNSCALED by about 0.65, and the
 * choice of filter for that downscale is not a wash:
 *
 *   smooth  -> averages neighbouring latent cells together, which manufactures
 *              exactly the correlation the noise is constructed NOT to have.
 *              Measured neighbour correlation is 0.13 after whitening against
 *              0.31 raw, so a blurred panel would misrepresent the method as
 *              producing a smoother field than the model was handed.
 *   nearest -> keeps every block hard-edged but renders them 2 or 3 pixels wide
 *              rather than uniformly, so the grid looks slightly irregular.
 *
 * Nearest wins, because irregular block SIZES are a cosmetic artifact of this
 * page's layout while blended block VALUES would be a false claim about the
 * noise. Scoped to .is-noise deliberately: the two photographic panels SHOULD be
 * smoothed, and they are. */
.noise-strip-panel.is-noise video {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

@media screen and (max-width: 768px) {
  /* Two panels per row below tablet, not four. A 4-way flex row on a phone gives
   * each panel under 90px, at which point the latent blocks are smaller than the
   * source video's own detail and nothing in the comparison is legible. Two per
   * row also keeps each noise panel beside the photographic one it belongs to. */
  .noise-strip-panels {
    flex-wrap: wrap;
  }

  .noise-strip-panel {
    flex: 1 1 46%;
  }
}

/* ==========================================================================
 * Teaser: a row of scene tiles, then two cards side by side. Each card is a clip
 * flush on top of the WebGL2 point cloud that clip feeds, the input video and its
 * own unprojection on the left, the 3x2 grid of generations and all seven
 * together on the right. Markup is in index.html under #teaser-viewer; the viewer
 * is files/teaser_viewer.js.
 * ========================================================================== */

.sv-teaser-section {
  padding-top: 1.5rem;
}

/* Scene row: one tile per scene, the selected one driving the videos and both
   viewers below. Five across on one line, which is what the count was chosen to
   fit. Placeholder tiles keep the same footprint so the row does not reflow when
   a real scene replaces one. */
.sv-scene-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  max-width: 1200px;
  margin: 1.5rem auto 0;
}

.sv-scene {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 416 / 240;
  border: 2px solid rgba(34, 90, 170, 0.18);
  border-radius: 10px;
  background: #0b1420;
  line-height: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.sv-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: opacity 0.18s ease;
}

.sv-scene:hover img {
  opacity: 1;
}

/* The selected tile is the only one at full opacity with the accent border, so
   which scene is on screen is readable without looking for a checkmark. */
.sv-scene.is-active {
  border-color: #2f6fd0;
  cursor: default;
}

.sv-scene.is-active img {
  opacity: 1;
}

/* Scenes without VGGT-Omega outputs yet. No pointer cursor and no hover
   response: the tile should not promise a click that does nothing. */
.sv-scene.is-empty {
  cursor: default;
  border-style: dashed;
  background: repeating-linear-gradient(45deg, #f3f6fb, #f3f6fb 8px,
                                        #e8eef7 8px, #e8eef7 16px);
}

.sv-scene-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 7px;
  background: #000000;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
}

.sv-scene.is-empty .sv-scene-name {
  background: #8a97a8;
}

/* The clip that feeds a cloud, sitting flush on the top edge of that cloud's
   canvas so the two read as one card rather than as a figure that happens to be
   above a figure. Square top corners only, zero margin below, and the canvas
   below squares its own top corners to meet this: one rounded rectangle with a
   video in its upper band.

   Both cells hold the GRID video's aspect, not their own. The six trajectory
   names are HTML overlays placed at the thirds of the grid cell, so that cell
   must fill its box exactly or every label slides off the clip it names, and the
   two cells must then agree in height or the two canvases start at different
   heights and stop being comparable. The input clip is the narrower 832:480 and
   is centred inside the same box by object-fit:contain, letterboxed against the
   cell's own black. */
.sv-vid-cell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1248 / 480;
  margin: 0;
  border: 1px solid rgba(34, 90, 170, 0.18);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  background: #000000;
  line-height: 0;
}

.sv-vid-cell video {
  display: block;
  width: 100%;
  height: 100%;
}

/* contain, not cover: cropping or stretching the one clip on this page that is
   not generated would misrepresent the input. */
.sv-vid-cell.is-source video {
  object-fit: contain;
}

/* cover is exact here, since grid.mp4 is itself 1248x480. */
.sv-vid-cell.is-grid video {
  object-fit: cover;
}

/* The six names, laid out on the same 3x2 the video was tiled on, so each label
   lands on its own cell without a hard-coded percentage per tag. */
.sv-vid-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  pointer-events: none;
}

/* Solid black plate rather than a translucent one: these clips are bright and
   high-contrast, and a label that depends on what is behind it stops being
   readable the moment the subject moves under it. */
.sv-vid-tag {
  padding: 2px 7px;
  border-radius: 5px;
  background: #000000;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.sv-vid-overlay .sv-vid-tag {
  justify-self: start;
  align-self: start;
  margin: 5px;
}

.sv-vid-cell > .sv-vid-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
}

.sv-vid-tag.is-input {
  background: #15314f;
}

.sv-teaser {
  max-width: 1200px;
  margin: 1.5rem auto 0;
}

.sv-teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sv-teaser-panel {
  min-width: 0;
}

.sv-teaser-label {
  margin-bottom: 0.5rem;
  color: #15314f;
  font-size: 0.95rem;
  font-weight: 800;
}

/* The canvas carries the border rather than a wrapper, so the WebGL pixels and
   the rounded corner agree without an extra overflow:hidden layer. White
   background to match the cloud's clear colour: the clouds are photographic and
   read as floating geometry on white, where a dark stage makes the
   point-sampled surface look like noise. all-scroll rather than grab, because
   the LEFT drag moves the viewpoint around the scene and does not pick the cloud
   up; a grab cursor would promise the opposite. Right-drag does pan, but a
   cursor cannot advertise two models at once and orbiting is the common one.
   touch-action:none is load-bearing on touch devices, since without it the
   browser claims the drag for scrolling and the orbit never receives a
   pointermove. */
.sv-teaser-panel canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(34, 90, 170, 0.18);
  /* Flat on top, where the clip's cell meets it. The two share one border line:
     the cell drops its bottom edge and the canvas keeps its top, so the seam is
     1px rather than 2px of doubled border. */
  border-radius: 0 0 14px 14px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(18, 54, 105, 0.10);
  cursor: all-scroll;
  touch-action: none;
}

.sv-teaser-panel canvas:active {
  cursor: all-scroll;
}

/* Streaming progress. The bar is the only signal that a 33 MB payload is still
   arriving, and it must not leave a permanent empty rail behind once done, so
   the viewer adds .is-done to this wrapper and the bar collapses out. */
.sv-teaser-bar {
  margin-top: 0.9rem;
  transition: opacity 0.4s ease, height 0.4s ease;
}

.sv-teaser-bar.is-done {
  height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
}

.sv-teaser-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 0.4rem;
}

.sv-teaser-controls input[type="range"] {
  width: 180px;
  accent-color: #1f7a8c;
  vertical-align: middle;
}

#teaser-scrub {
  width: 320px;
}

/* Tabular figures so the point counts do not jiggle the layout every frame. */
.sv-teaser-readout {
  min-width: 20ch;
  color: #5c6b7f;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.sv-teaser-ctl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #15314f;
  font-size: 0.8rem;
  font-weight: 700;
}

@media screen and (max-width: 768px) {
  /* Stacked, not side by side. Below tablet each panel would be under 350px,
     where the subject is a few dozen pixels across and the comparison the
     figure exists to make is not legible. */
  .sv-teaser-grid {
    grid-template-columns: 1fr;
  }

  #teaser-scrub {
    width: 100%;
  }
}

/* ── Baseline comparison section ───────────────────────────────────────────── */

/* The comparison row is six scenes where the teaser row is five, so the column
   count is a modifier rather than a second row class: everything else about a
   tile (aspect, border, active state, caption) is shared. The base row's 1200px
   cap is lifted as well, so the picker and the six method panels below it both
   span the full column and line up edge to edge. */
.sv-scene-row.is-six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: none;
}

/* "Input video", above the picker. The picked tile is the input: there is no
   separate source panel, so this heading is what tells the reader that the row
   they are clicking is also the thing they are comparing against. */
.cmp-head {
  margin-top: 1.5rem;
  color: #3c4c60;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* The source clip, inside whichever tile is active (comparison_viewer.js moves
   it). Covers the tile's thumbnail exactly, under the scene-name caption, so the
   tile goes from still to moving without changing size. `cover` matches the
   thumbnail's own fit; the clip and the tile are both 16:9 to within 2%. */
#cmp-source {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b1420;
}

/* Shown only once a tile owns it. Hidden by default because before the first
   load it is still parked as a child of #cmp, which is not a positioned
   ancestor, so an `inset: 0` element there would lay itself over the page. */
.sv-scene.is-active > #cmp-source {
  display: block;
}

.cmp-traj-row {
  margin: 0.9rem 0 0.35rem;
}

/* The trajectory, between the picker and the method labels: it applies to all
   six panels, so it is stated once rather than six times. */
.cmp-traj {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  background: #eef2f7;
  color: #41536a;
  border: 1px solid #dde4ed;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Six panels across the full column width, uniformly: the reader is comparing
   the panels against each other, so nothing may be wider than its neighbour. */
.cmp-stage {
  margin-top: 0.25rem;
}

.cmp-methods {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

/* Swap the single row for 3x2, doubling every method panel's width, by adding
   is-grid to .cmp-methods in index.html. Kept here as a one-class switch because
   panel width against panel count is a judgement about the figure, not a fact
   about the data. */
.cmp-methods.is-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cmp-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #5a6b80;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
  text-align: center;
  /* Two lines reserved: "Reshoot-Anything" wraps at this width and the panels
     below it would otherwise sit 1 line lower than their neighbours. */
  min-height: 2.1em;
}

/* contain, not cover: three aspect ratios are in play across the six methods
   (720x480, 832x480, 832x464) and cropping or stretching one to match another
   would make it look distorted next to its neighbours. The box is reserved
   before the clip loads so the section does not reflow as it buffers in. */
.cmp-stage video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 832 / 480;
  object-fit: contain;
  border-radius: 6px;
  background: #10151c;
}

/* Ours is marked, since "last panel" is only obvious once you have read the
   labels. Outline rather than a fill so it does not read as a highlight on the
   video itself. */
.cmp-panel.is-ours video {
  outline: 2px solid #2f6fd0;
  outline-offset: 1px;
}

.cmp-panel.is-ours .cmp-label {
  color: #2f6fd0;
}

/* Narrow screens: six across stops being readable well before the page's own
   breakpoint, so the method row and the tile row both fold to 3x2. */
@media screen and (max-width: 900px) {
  .cmp-methods,
  .sv-scene-row.is-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Full-screen control, one per method panel, created by comparison_viewer.js.
   Hidden until the panel is hovered or the button itself is focused, so six of
   these do not compete with the clips for attention. */
.cmp-panel {
  position: relative;
}

.cmp-fs {
  position: absolute;
  top: calc(2.1em + 7px);          /* clears .cmp-label's reserved two lines */
  right: 5px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(10, 18, 30, 0.62);
  color: #fff;
  font-size: 0.72rem;
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: opacity 0.15s ease, background 0.15s ease;
}

.cmp-panel:hover .cmp-fs,
.cmp-fs:focus {
  opacity: 1;
}

.cmp-fs:hover {
  background: rgba(10, 18, 30, 0.85);
}

/* The input clip has no button: it lives inside the picker tile, which is itself
   a <button>, so a nested one would be invalid markup. Clicking the tile that is
   already active goes full screen instead, and the cursor says so. Scoped to the
   comparison row, since an active tile in the teaser row does nothing. */
.sv-scene-row.is-six .sv-scene.is-active {
  cursor: zoom-in;
}

/* In full screen the UA owns the box, so the panel-sized constraints have to get
   out of the way: a fixed aspect ratio and a 6px radius on a 4K screen would
   letterbox the clip inside its own letterbox. */
.cmp-stage video:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  outline: none;
}

#cmp-source:fullscreen {
  position: static;
  display: block;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
}

/* ── Whitening ablation grid ───────────────────────────────────────────────── */

/* A label column plus the three noise priors. The label column is fixed so the
   three video columns are exactly equal: the reader is comparing them against
   each other, so none may be wider than its neighbour. */
.abl-grid {
  display: grid;
  grid-template-columns: 150px repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  margin-top: 1.5rem;
}

.abl-corner {
  /* Empty cell under the heading, above the row labels. Here so the header row
     and the video rows share one grid rather than two that have to be kept in
     step by hand. */
}

.abl-head {
  align-self: end;
  padding-bottom: 4px;
  color: #41536a;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.abl-head.is-ours {
  color: #2f6fd0;
}

.abl-row-label {
  color: #3c4c60;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

/* The trajectory, under each row's name: it applies to all three cells of that
   row. Reuses the comparison section's chip so the two read as one component. */
.abl-row-label .cmp-traj {
  display: block;
  margin-top: 5px;
  margin-left: auto;
  width: max-content;
}

.abl-cell {
  position: relative;
}

/* Every clip in this grid is 832x480, 15 fps, 73 frames, so unlike the baseline
   comparison there is nothing to letterbox. `contain` is kept anyway so a future
   row at another resolution cannot silently stretch. */
.abl-cell video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 832 / 480;
  object-fit: contain;
  border-radius: 8px;
  background: #10151c;
}

/* Ours is marked the same way the comparison section marks it. */
.abl-cell.is-ours video {
  outline: 2px solid #2f6fd0;
  outline-offset: 1px;
}

/* The full-screen buttons are .cmp-fs, created by ablation_viewer.js, and that
   rule offsets them below .cmp-label's two reserved lines. There is no label
   inside a cell here, so pull them back up to the corner. */
.abl-cell .cmp-fs {
  top: 6px;
  right: 6px;
}

.abl-cell video:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  outline: none;
}

/* Narrow screens: the label column costs more than it is worth, so each row's
   name goes above its three clips, spanning the full width. */
@media screen and (max-width: 900px) {
  .abl-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .abl-corner {
    display: none;
  }

  .abl-row-label {
    grid-column: 1 / -1;
    margin-top: 0.6rem;
    text-align: left;
  }

  .abl-row-label .cmp-traj {
    display: inline-block;
    margin: 0 0 0 7px;
  }
}
