/* atlas.css — home scenes: cover, abstract, atlas views, findings, taxonomy,
   spectrum, compare invite, method teaser, colophon. */

.scene { padding: var(--s-scene) var(--margin); border-bottom: 1px solid var(--rule); }
.scene-head { margin-bottom: var(--s-6); position: relative; }
.scene-head h2 { font-size: var(--t-section); max-width: 14ch; line-height: .98; }
.scene-no {
  position: absolute;
  top: .4em;
  right: 0;
  font-size: var(--t-caption);
  color: var(--ink-muted);
  letter-spacing: .1em;
}

/* ---- cover / hero: The Chronology ---- */
.scene-cover {
  min-height: calc(100svh - var(--head-h));
  display: grid;
  /* every row is content-sized (no 1fr band that would inflate + re-centre the
     card on tall viewports); the whole hero cluster is vertically centred and
     spare height is shared ABOVE the masthead / BELOW the panel, never injected
     between the slider and the headline/timeline. `safe` centring falls back to
     top-alignment when the hero is taller than the viewport, so the masthead is
     never clipped above the scroll. */
  grid-template-rows: repeat(5, auto);
  align-content: safe center;
  /* tight own-padding: the hero's breathing room comes from the centring above
     (and .hero-foot's margin below), so this padding is dead space that only
     pushed the panel past the fold once the info panel was height-reserved */
  padding-top: var(--s-1);
  padding-bottom: var(--s-1);
  position: relative;
  /* overflow-x: clip contains the ruler's centred month label when it sits at
     the timeline's far edge on narrow viewports (it would otherwise poke past
     the page and add a horizontal scrollbar). Only the X axis is clipped, so
     overflow-y stays visible and the hero can still exceed the viewport height
     without cropping the ruler or project details (the old full overflow:clip
     regression). */
  overflow-x: clip;
  /* tight rhythm: the headline, reel, and ruler read as one stacked instrument
     rather than three separated blocks */
  gap: clamp(.2rem, .5vh, .45rem);
}
.cover-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2);
  align-items: baseline;
}
.cover-ident {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .16em;
  color: var(--ink-muted);
}
.cover-kicker {
  font-size: var(--t-micro);
  letter-spacing: .14em;
  color: var(--ink-faint);
}

/* char-split Fraunces headline */
.cover-head {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 55, "WONK" 0;
  /* Bold and confident. The vh term keeps it from shoving the ruler + details
     off short viewports, but at a far gentler cap than before (12vh, not 7.4vh)
     so lines read ~86-100px on a laptop instead of a timid ~53px. The reel
     below is height-budgeted to make room, so nothing crops. */
  font-size: clamp(2.6rem, min(8vw, 11vh), 6.2rem);
  /* 1.05 unchanged: the mask's padding (see .head-line) is what clears the
     ascenders/descenders, so adding the clip costs NO extra leading and no fold
     budget — verified glyph-vs-clip headroom is positive on both lines */
  line-height: 1.05;
  letter-spacing: -.02em;
  display: grid;
  user-select: none;
  /* breathing room between the headline and the reel — responsive (vh) so it is
     generous on tall viewports and restrained on short ones, keeping the whole
     hero balanced and inside the fold */
  margin-bottom: clamp(.5rem, 1.3vh, 1.1rem);
}
/* Each line is a clipping mask so the letters rise out of a clean edge.
   padding-bottom holds the descenders inside the clip; the equal negative
   margin keeps the two lines' spacing exactly as before, so adding the mask
   costs no layout. (The old "never clip" rule existed because the reveal had no
   mask at all and a tight line-height cropped glyphs — the padding solves the
   crop, which is what the mask needs to look right.) */
.head-line {
  display: block;
  /* clip-path, not overflow:hidden + padding/negative-margin compensation —
     it clips pixels without participating in layout at all (see .rvl-w). Top
     and sides are expanded so ascenders and the italic line's overhang are
     never sheared; the bottom edge is the mask the letters rise out of. */
  clip-path: inset(-0.3em -0.14em -0.13em);
}
.head-line-2 { margin-left: clamp(1.5rem, 8vw, 9rem); font-style: italic; }
.head-mask { display: inline-block; }
.hc { display: inline-block; will-change: transform, opacity; }

/* the band: the DOM reel is the whole hero surface (no WebGL layer) */
.hero-band {
  position: relative;
  align-self: stretch;
  display: grid;
  /* no min-height / centring: the band is exactly the card's height, so the reel
     hugs the headline above and the ruler below at EVERY viewport height — the
     scene grid owns the vertical balance (see .scene-cover) */
}
.reel-track {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  overflow-x: auto;
  padding-bottom: var(--s-2);
  scrollbar-width: none;
  /* no CSS scroll-snap: the JS damped loop owns the settle, so the two never
     fight (which was causing a jump on drag release) */
  scroll-behavior: auto;
  cursor: grab;
  user-select: none;
}
.hero-band .reel-track { gap: clamp(1.5rem, 4vw, 3.75rem); padding-bottom: .2rem; }
.reel-track::-webkit-scrollbar { display: none; }
.reel-track.is-dragging { cursor: grabbing; }
.reel-track:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.reel-item {
  flex: 0 0 auto;
  /* 16:9 cards, sized by the smaller of a width and a HEIGHT budget so the whole
     hero still fits short viewports (the 54vh term keeps the card + the title
     gap + the tighter rhythm + the roomier project panel inside a ~900px
     viewport). Width drives the frame; height = width·9/16. Still clearly bigger
     than the old 4:3 thumbs. */
  width: clamp(340px, min(52vw, 54vh), 640px);
  text-decoration: none;
  position: relative;
  display: grid;
  gap: .4rem;
}
.reel-frame {
  display: block;
  aspect-ratio: 16 / 9;              /* matches the widescreen specimen captures */
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  /* subtle placeholder, never black — shows only until the image loads */
  background: color-mix(in srgb, var(--ink) 7%, var(--paper));
  transition: border-color var(--d-hover) var(--ease-out), box-shadow var(--d-hover) var(--ease-out);
}
.reel-item.is-active .reel-frame { border-color: var(--signal); outline: 2px solid var(--signal); outline-offset: 4px; }
.reel-img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* NO transform/scale on the resting state — the sides are never zoom-cropped.
     The 4:3 source only loses a little top/bottom to the 16:9 frame;
     object-position favours the upper band (logo / hero headline) over the
     footer. Life comes from the momentum scroll and the CSS hover below. */
  object-position: 50% 42%;
}
.reel-caption { display: flex; justify-content: space-between; align-items: baseline; }
.reel-rank { font-size: var(--t-caption); transition: color var(--d-hover) var(--ease-out); }
.reel-month {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .08em;
  color: var(--ink-muted);
  transition: color var(--d-hover) var(--ease-out);
}

/* ---- reel card hover: smooth, compositor-driven, always works ----
   Every effect stays inside the card's own box — the image zoom is clipped by
   the frame's overflow, the ring is drawn on the frame — so nothing is clipped
   by the horizontal scroller and there is never a layout jump. A plain CSS
   transition drives it, so it is immune to any rAF throttling and animates
   identically with or without the WebGL layer above it. */
.reel-img { transition: transform calc(var(--d-hover) * 1.2) var(--ease-out); }
.reel-item:hover .reel-img,
.reel-item:focus-visible .reel-img { transform: scale(1.06); }
.reel-item:hover .reel-frame,
.reel-item:focus-visible .reel-frame {
  border-color: var(--signal);
  box-shadow: inset 0 0 0 2px var(--signal);
}
.reel-item:hover .reel-rank,
.reel-item:focus-visible .reel-rank { color: var(--signal); }
.reel-item:hover .reel-month,
.reel-item:focus-visible .reel-month { color: var(--ink); }
/* keep cards calm while the reel is being dragged past the pointer */
.reel-track.is-dragging .reel-img { transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .reel-img { transition: none; }
  .reel-item:hover .reel-img, .reel-item:focus-visible .reel-img { transform: none; }
}

/* month-tick chronology ruler — a fine measurement rule with one signal cursor.
   Sparse year labels + subtle winner marks keep it quiet; the gliding cursor is
   the single designed focal point. */
.hero-ruler {
  position: relative;
  height: 36px;
  /* the timeline hugs the reel above it (it IS the reel's chronology axis) and
     is clearly separated from the project-info panel below */
  margin-top: 0;
  margin-bottom: var(--s-3);
}
.ruler-line {
  position: absolute;
  top: 16px; left: 0; right: 0;
  height: 1px;
  background: var(--rule);
}
.rtick {
  position: absolute;
  top: 16px;
  left: var(--x);
  width: 1px;
  height: 3px;
  background: var(--rule-strong);
  opacity: .55;
}
/* winner months: a slightly taller tick + a quiet dot below the line */
.rtick.has-winner { height: 5px; opacity: 1; }
.rtick.has-winner::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 3px; height: 3px;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--ink-faint);
}
.ryear {
  position: absolute;
  top: 25px;
  left: var(--x);
  font-size: var(--t-micro);
  letter-spacing: .12em;
  color: var(--ink-faint);
}
/* the focal point: signal caret + dot + gliding month label */
.ruler-cursor {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--x);
  width: 1px;
  transition: left var(--d-change) var(--ease-out);
  z-index: 2;
}
.ruler-cursor::before {           /* thin caret aligned to the line */
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  width: 1px; height: 9px;
  background: var(--signal);
}
.cursor-dot {
  position: absolute;
  top: 9px; left: 0;
  width: 6px; height: 6px;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 18%, transparent);
}
.cursor-label {
  position: absolute;
  top: -4px;
  left: 0;
  translate: -50% 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .1em;
  color: var(--signal);
  background: var(--paper);
  padding: 0 .35em;
}
@media (prefers-reduced-motion: reduce) { .ruler-cursor { transition: none; } }

.hero-foot {
  display: grid;
  /* meta (primary) on the left, navigation on the right — the block spans the
     full width so the composition reads balanced instead of clustered left */
  grid-template-columns: 1fr auto;
  gap: var(--s-2) var(--s-8);
  align-items: end;
  /* clear breathing room below the project info + nav before the fold */
  margin-bottom: var(--s-3);
}
.pos-roll { display: inline-block; }
.reel-hud {
  /* pin BOTH blocks to row 1 — without an explicit row the auto-placement
     algorithm pushed the meta to row 2, so the arrows floated up-right, out of
     line with the description. Same row + align-items:end shares one baseline. */
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: var(--s-1);
}
.reel-controls { display: inline-flex; align-items: center; gap: var(--s-2); }
.reel-btn {
  width: 2.6rem; height: 2.6rem;
  border: 1px solid var(--ink);
  display: grid;
  place-content: center;
  font-size: 1.1rem;
  transition: background var(--d-micro) var(--ease-out), color var(--d-micro) var(--ease-out);
}
.reel-btn:hover { background: var(--ink); color: var(--paper); }
.reel-pos { font-size: var(--t-caption); letter-spacing: .12em; }
.reel-hint {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .14em;
  color: var(--ink-faint);
}
/* The panel is pinned to the tallest specimen's content (measured once by
   reelMetaFit.js) so swapping specimens while dragging the reel can never
   resize .hero-foot and jump the whole hero. `align-content: start` keeps the
   month/name anchored while shorter panels simply leave the reserve unused. */
.reel-meta {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: .25rem;
  justify-items: start;
  align-content: start;
  min-height: var(--meta-h, auto);
}
.reel-meta-month { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .14em; color: var(--ink-muted); }
.reel-meta-name { font-size: clamp(1.35rem, 2vw, 2.15rem); line-height: 1.05; min-height: var(--meta-name-h, auto); }
.reel-meta-creator { font-size: var(--t-caption); color: var(--ink-muted); min-height: var(--meta-creator-h, auto); }
/* the tags sit apart from the info text, and the CTA sits clearly apart from the
   tags — so the panel reads as [identity] · [tags] · [action], not one dense run */
.reel-meta-tags { margin-top: var(--s-1); min-height: var(--meta-tags-h, auto); }
.btn-open { margin-top: var(--s-2); }

/* ---- abstract ---- */
.abstract-figures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.figure {
  background: var(--paper);
  padding: var(--s-3);
  display: grid;
  gap: .3rem;
  align-content: start;
}
.figure-n { font-size: clamp(2.6rem, 5vw, 4.5rem); line-height: 1; }
.figure-label { font-weight: 600; font-size: .9375rem; }
.figure-note { font-size: var(--t-caption); color: var(--ink-muted); }
.fn { font-size: .75em; color: var(--signal); }
.abstract-footnote { margin-top: var(--s-3); font-size: var(--t-caption); color: var(--ink-muted); max-width: 70ch; }

/* ---- atlas controls + index ---- */
.atlas-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule-strong);
}
.view-switch { display: inline-flex; border: 1px solid var(--ink); }
.view-btn {
  font-family: var(--font-mono);
  font-size: var(--t-caption);
  letter-spacing: .1em;
  padding: .5em 1em;
}
.view-btn.is-active { background: var(--ink); color: var(--paper); }
.filter-bar { display: inline-flex; align-items: center; gap: var(--s-1); flex-wrap: wrap; }
.filter-btn {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .12em;
  padding: .4em .9em;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
}
.filter-btn.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-count { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .1em; color: var(--ink-muted); }
.filter-clear { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .1em; text-decoration: underline; }
.btn-search { margin-left: auto; }

.index-list { display: grid; }
.index-row.is-filtered { display: none; }
.index-link {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto auto 4rem auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  /* --d-hover: the shared hover tempo across the atlas (see tokens.css). The
     row slide used --d-micro (200ms), which read as a twitch next to the
     card/figure hovers; every part of the row now moves on the same clock. */
  transition: padding-left var(--d-hover) var(--ease-out);
}
.index-link:hover, .index-link:focus-visible { padding-left: var(--s-2); }
.index-name, .index-meta, .index-rank, .index-score, .index-conf {
  transition: color var(--d-hover) var(--ease-out);
}
.index-link:hover .index-name, .index-link:focus-visible .index-name { color: var(--signal); }
.index-rank { color: var(--ink-muted); }
.index-name { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.05; display: block; }
.index-meta { display: block; font-size: var(--t-caption); color: var(--ink-muted); margin-top: .25em; }
.index-tags { display: inline-flex; gap: .35rem; }
.index-conf {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.index-score { text-align: right; }
.index-open {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .12em;
  color: var(--ink-faint);
  transition: color var(--d-hover) var(--ease-out), translate var(--d-hover) var(--ease-out);
}
.index-link:hover .index-open, .index-link:focus-visible .index-open { color: var(--ink); translate: .25rem 0; }

/* ---- atlas reel view (large-format) ---- */
.atlas-reel-view { padding-top: var(--s-4); }
.atlas-reel-track { align-items: stretch; }
.atlas-card {
  flex: 0 0 auto;
  width: clamp(300px, 44vw, 620px);
}
.atlas-card.is-active .atlas-card-frame { outline: 2px solid var(--signal); outline-offset: 4px; }
.atlas-card-link { text-decoration: none; display: grid; gap: var(--s-2); }
.atlas-card-frame {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: color-mix(in srgb, var(--ink) 7%, var(--paper));
}
.atlas-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translate3d(var(--px, 0), 0, 0) scale(1.14);
  will-change: transform;
}
.atlas-card-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .15rem var(--s-2);
  align-items: baseline;
}
.atlas-card-rank { font-size: var(--t-caption); }
.atlas-card-month { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .1em; color: var(--ink-muted); justify-self: end; }
.atlas-card-name { grid-column: 1 / -1; font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2.2rem); line-height: 1.02; }
.atlas-card-creator { grid-column: 1 / -1; font-size: var(--t-caption); color: var(--ink-muted); }
.atlas-card-tags { grid-column: 1 / -1; display: inline-flex; gap: .35rem; margin-top: .25rem; }

/* ---- spectrum plot ---- */
.spectrum-plot {
  position: relative;
  border: 1px solid var(--rule-strong);
  padding: var(--s-3) var(--s-3) var(--s-2);
  background: var(--paper-high);
}
.spectrum-scale { position: absolute; inset: 0 var(--s-3); pointer-events: none; }
.scale-tick { position: absolute; top: 0; bottom: 0; left: var(--t); }
.scale-tick i { position: absolute; top: 0; bottom: 1.4rem; border-left: 1px dashed var(--rule); }
.scale-tick b { position: absolute; bottom: 0; translate: -50%; font-weight: 400; font-size: var(--t-micro); color: var(--ink-faint); }
.spectrum-band { position: relative; padding: .3rem 0; }
.spectrum-band[hidden] { display: none; }
.spectrum-mark {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, var(--v)) auto auto auto;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  min-height: 1.5rem;
}
.mark-rank { font-size: var(--t-micro); color: var(--ink-muted); }
.mark-line { height: 1px; background: var(--ink); position: relative; }
.mark-line::after {
  content: "";
  position: absolute;
  right: 0; top: -2.5px;
  width: 5px; height: 5px;
  background: var(--ink);
  rotate: 45deg;
}
.mark-dot { display: none; }
.mark-name { font-size: var(--t-caption); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14rem; }
.mark-val { font-size: var(--t-micro); color: var(--ink-muted); }
.spectrum-mark:hover .mark-name, .spectrum-mark:focus-visible .mark-name { color: var(--signal); }
.spectrum-mark:hover .mark-line, .spectrum-mark:focus-visible .mark-line { background: var(--signal); }
.spectrum-mark:hover .mark-line::after, .spectrum-mark:focus-visible .mark-line::after { background: var(--signal); }

/* ---- findings ---- */
.findings { display: grid; gap: var(--s-8); }
.finding {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-4) var(--s-6);
  align-items: start;
  position: relative;
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule-strong);
}
.finding-no { position: absolute; top: var(--s-3); right: 0; font-size: var(--t-caption); color: var(--ink-muted); }
.finding-title { font-size: clamp(1.9rem, 3.6vw, 3.4rem); max-width: 14ch; }
.finding-text { margin-top: var(--s-2); max-width: 52ch; }
/* census diagram: 20-cell strip computed from the dataset */
.census { border: 1px solid var(--rule-strong); padding: var(--s-2); }
.census-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
}
.census-cell {
  aspect-ratio: 1;
  border: 1px solid var(--rule-strong);
  display: grid;
  place-content: center;
  text-decoration: none;
  font-size: var(--t-micro);
  color: var(--ink-muted);
  background: repeating-linear-gradient(-45deg, var(--rule), var(--rule) 1px, transparent 1px, transparent 5px);
  transition: outline-color var(--d-micro) var(--ease-out);
}
.census-cell.is-hit { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.census-cell:hover { outline: 2px solid var(--signal); outline-offset: 1px; }
.census-read { margin-top: var(--s-2); font-size: var(--t-caption); color: var(--ink-muted); }
.census-read .num { color: var(--ink); font-size: 1rem; margin-right: .3em; }
.finding-links { font-size: var(--t-caption); color: var(--ink-muted); }
.finding-links a { color: var(--ink); text-underline-offset: .25em; }
.finding-implication { font-size: var(--t-caption); max-width: 52ch; }

/* ---- taxonomy ---- */
.taxonomy-bands { display: grid; gap: var(--s-3); }
.tax-band {
  display: grid;
  grid-template-columns: 9rem 1fr 4.5rem;
  grid-template-areas: "label track count" "note note note";
  align-items: center;
  gap: .4rem var(--s-3);
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--s-3);
}
.tax-label { grid-area: label; font-family: var(--font-mono); font-size: var(--t-caption); letter-spacing: .12em; }
.tax-track { grid-area: track; position: relative; height: 14px; border: 1px solid var(--rule-strong); }
.tax-track i { position: absolute; inset: 2px auto 2px 2px; width: var(--w); background: var(--ink); }
.tax-count { grid-area: count; text-align: right; font-size: var(--t-caption); }
.tax-note { grid-area: note; font-size: var(--t-caption); color: var(--ink-muted); }

/* ---- spectrum ---- */
.spectrum-controls { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-bottom: var(--s-3); }
.metric-btn {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .12em;
  padding: .4em .9em;
  border: 1px solid var(--rule-strong);
}
.metric-btn.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.spectrum-field { min-height: 20rem; border: 1px solid var(--rule); margin-bottom: var(--s-3); }
.spectrum-table-wrap summary {
  font-family: var(--font-mono);
  font-size: var(--t-caption);
  letter-spacing: .08em;
  cursor: pointer;
  padding: var(--s-1) 0;
}

/* ---- compare invite + method teaser ---- */
.compare-invite-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.method-teaser-grid { display: grid; gap: var(--s-3); max-width: 70ch; }

/* ---- colophon ---- */
.scene-colophon {
  background: var(--field-dark);
  color: var(--paper-on-dark);
  border-bottom: 0;
}
.scene-colophon .scene-no { color: var(--muted-on-dark); }
.ledger { display: grid; }
.ledger-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto auto;
  gap: var(--s-3);
  align-items: baseline;
  padding: .6em 0;
  border-bottom: 1px solid var(--rule-on-dark);
  font-size: var(--t-caption);
}
.ledger-rank { color: var(--muted-on-dark); }
.ledger-name { font-family: var(--font-display); font-size: 1.25rem; text-decoration: none; }
.ledger-name:hover { color: var(--signal); }
.ledger-month { color: var(--muted-on-dark); font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .1em; }
.ledger-links { display: inline-flex; gap: var(--s-2); }
.ledger-links a {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .1em;
  color: var(--muted-on-dark);
  text-decoration: none;
}
.ledger-links a:hover { color: var(--signal); }
.colophon-close { margin-top: var(--s-8); }
.colophon-line {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 5.5rem);
  line-height: 1;
  max-width: 100%;
}
.colophon-note { margin-top: var(--s-3); font-size: var(--t-caption); color: var(--muted-on-dark); max-width: 70ch; }
.colophon-note a, .colophon-note .link-btn { color: var(--paper-on-dark); }

/* ---- short desktop/laptop viewports (≈720–820px tall) ----
   The hero's fixed-height furniture — masthead, ruler, and the height-reserved
   project panel — does not scale with the viewport, so on a 720px screen the
   scalable parts have to step down or the CTA falls below the fold. Only the
   headline cap, the card budget and the outer padding move here: the panel's
   internal rhythm (tags/CTA spacing) is deliberately untouched, both because it
   is the requested spacing and because changing it would invalidate the
   measured `--meta-h` reserve. */
@media (min-width: 741px) and (max-height: 820px) {
  .scene-cover { padding-top: 6px; padding-bottom: 6px; }
  .cover-head { font-size: clamp(2rem, min(7.2vw, 9.2vh), 4.6rem); }
  .cover-head { margin-bottom: clamp(.35rem, 1vh, .8rem); }
  .reel-item { width: clamp(280px, min(48vw, 40vh), 560px); }
  .hero-ruler { margin-bottom: var(--s-2); }
  .hero-foot { margin-bottom: var(--s-2); }
}

/* ---- tablet ---- */
@media (max-width: 1024px) {
  .abstract-figures { grid-template-columns: repeat(2, 1fr); }
  .finding { grid-template-columns: 1fr; }
  .index-link { grid-template-columns: 2.6rem 1fr auto; }
  .index-tags, .index-conf, .index-open { display: none; }
}

/* ---- mobile ---- */
@media (max-width: 740px) {
  .cover-head { font-size: clamp(2rem, 10.5vw, 3.4rem); }
  .head-line-2 { margin-left: 1.2rem; }
  /* no min-height: the band hugs its card at every size (see .hero-band) */
  .hero-foot { grid-template-columns: 1fr; }
  /* stacked: both blocks return to the single column, left-aligned */
  .reel-hud, .reel-meta { grid-column: 1; }
  .reel-hud { align-items: flex-start; text-align: left; order: 2; }
  .abstract-figures { grid-template-columns: 1fr 1fr; }
  .figure-n { font-size: 2.4rem; }
  .atlas-controls { flex-direction: column; align-items: stretch; }
  .btn-search { margin-left: 0; }
  .index-link { gap: var(--s-2); }
  .index-score { display: none; }
  .tax-band { grid-template-columns: 1fr auto; grid-template-areas: "label count" "track track" "note note"; }
  .ledger-row { grid-template-columns: 2.4rem 1fr; }
  .ledger-month { display: none; }
  .ledger-links { grid-column: 2; }
  .census-grid { grid-template-columns: repeat(5, 1fr); }
  .search-hit { grid-template-columns: 2.2rem 1fr; }
  .hit-month { display: none; }
}
