/* The Data Center Record · broadcast-archive theme
   Palette: neutral tape black, warm transcript white, Prophecy lime accent,
   clay (opposed), slate (support), field gray (unclear). Stance pair validated
   for dark-surface CVD/contrast; unclear always ships with labels and gaps. */

:root {
  --tape: #0b0d0c;
  --room: #151816;
  --room-up: #1d211e;
  --line: #2a2e2b;
  --ink: #f5f4ef;
  --ink-dim: #b4b8b1;
  --ink-faint: #7e827c;
  --caption: #b2d960;
  --caption-ink: #101503;
  --oppose: #ce7a52;
  --support: #5b9bd1;
  --unclear: #74806f;
  --brand: #116911;
  --display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --dock-w: 420px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--tape);
  color: var(--ink);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--caption); color: var(--caption-ink); }

a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--caption); outline-offset: 2px; border-radius: 2px; }

/* ---------- masthead ---------- */

.masthead {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 650; font-size: 15px; letter-spacing: -0.01em;
  color: #fff; text-decoration: none;
}
.brand-mark { display: block; width: 21px; height: 24px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: clip;
  isolation: isolate;
  cursor: pointer;
}
.hero .hero-speaker { cursor: auto; }

.hero-video {
  position: absolute; inset: 0; z-index: -2; background: #000;
  transition: opacity 350ms ease;
}
.hero.switching .hero-video { opacity: 0; }
.hero-video iframe,
#hero-player {
  position: absolute;
  top: 50%; left: 50%;
  width: max(100vw, 178svh);   /* 16:9 cover */
  height: max(100svh, 56.25vw);
  transform: translate(-50%, -50%) scale(1.3); /* crop player chrome */
  pointer-events: none;
  border: 0;
}
/* When sound-on autoplay is blocked, the tape shows its own still —
   no player chrome can leak through a background image. */
.hero-poster {
  position: absolute; inset: 0; z-index: -1;
  background: #000 center / cover no-repeat;
  display: none;
}
.hero.postered .hero-poster { display: block; }
.hero.postered .hero-video { opacity: 0; }

/* Just enough contrast for the type; the footage stays true. */
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(5,6,6,0.78) 0%, rgba(5,6,6,0.38) 34%, rgba(5,6,6,0) 55%),
    linear-gradient(0deg, rgba(5,6,6,0.82) 0%, rgba(5,6,6,0.28) 22%, rgba(5,6,6,0) 38%),
    linear-gradient(180deg, rgba(5,6,6,0.5) 0%, rgba(5,6,6,0) 14%),
    linear-gradient(280deg, rgba(5,6,6,0.72) 0%, rgba(5,6,6,0.3) 20%, rgba(5,6,6,0) 42%);
}

.hero-copy {
  grid-row: 1;
  grid-column: 1;
  align-self: start;
  padding: clamp(84px, 13svh, 132px) 28px 0 min(5vw, 72px);
  max-width: 820px;
}
.hero h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, min(6.6svh, 10.5vw), 66px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.45);
}
.hero-dek { margin: 0; max-width: 30em; font-size: clamp(17px, 1.6vw, 19.5px); color: var(--ink-dim); text-shadow: 0 1px 12px rgba(0,0,0,0.5); }
.hero-dek strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* The sound affordance: a clear pill sitting just below the player's own
   center glyph. Gone once sound is on. */
.hero-big {
  position: absolute; z-index: 5;
  left: 50%; top: calc(50% + 66px);
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(8, 10, 9, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 16.5px; font-weight: 650; letter-spacing: 0.01em;
  padding: 12px 26px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: background 140ms ease, border-color 140ms ease, opacity 240ms ease;
}
.hero-big:hover { background: rgba(8, 10, 9, 0.92); border-color: rgba(255, 255, 255, 0.45); }
.hero-big.is-playing { opacity: 0; pointer-events: none; }

.hero-dots { display: inline-flex; gap: 7px; align-items: center; }
.hero-dots i {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--ink-faint); opacity: 0.6;
}
.hero-dots i.on { background: var(--caption); opacity: 1; transform: scale(1.25); }

/* the side unit: speaker card on top, the scrollable speech below */
.hero-side {
  position: absolute; z-index: 4;
  right: min(3.4vw, 56px);
  top: 50%;
  transform: translateY(-50%);
  width: min(430px, 31vw);
  height: min(72svh, 720px);
  display: flex; flex-direction: column;
  background: rgba(7, 9, 8, 0.38);
  backdrop-filter: blur(14px) brightness(0.72) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) brightness(0.72) saturate(1.05);
  border-radius: 14px;
  overflow: hidden;
  cursor: auto;
  transition: opacity 300ms ease;
}
.hero.switching .hero-side { opacity: 0; }
.hero-script {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px 40px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 88%, transparent 100%);
}
.hero-script::-webkit-scrollbar { width: 8px; }
.hero-script::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 4px; }
.hero-script::-webkit-scrollbar-track { background: transparent; }
.script-inner {
  display: flex; flex-direction: column; gap: 20px;
}
.script-p {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 19.5px;
  line-height: 1.62;
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.5);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}
.script-s {
  pointer-events: auto; cursor: pointer;
  border-radius: 3px;
  padding: 1px 3px; margin: -1px -3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: color 240ms ease, background-color 240ms ease;
}
.script-s:hover { color: rgba(255, 255, 255, 0.85); }
.script-s.past { color: rgba(255, 255, 255, 0.38); }
.script-s.on {
  background: var(--caption);
  color: var(--caption-ink);
  text-shadow: none;
  font-weight: 640;
}

@media (min-width: 1001px) {
  .hero-caption { display: none; }
}
@media (max-width: 1000px) {
  .hero-script { display: none; }
  .hero-side {
    position: absolute; inset: auto 16px 16px 16px;
    top: auto; transform: none;
    width: auto; height: auto; max-height: none;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    border-radius: 0; overflow: visible;
  }
  .hero-side .hero-speaker { border-radius: 3px; background: rgba(6, 7, 7, 0.72); border-bottom: 0; }
  .hero-stage { padding-bottom: 96px; }
}

/* the stage: big captions with the speaker attached, one control cluster */
.hero-stage {
  grid-row: 2;
  padding: 0 28px clamp(26px, 5svh, 48px) min(5vw, 72px);
  display: flex; flex-direction: column; gap: 18px; align-items: flex-start;
  transition: opacity 300ms ease, transform 300ms ease;
}
.hero.switching .hero-stage { opacity: 0; transform: translateY(8px); }
.hero-caption {
  margin: 0; max-width: 20em;
  min-height: 2.6em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(21px, min(4.6svh, 6.6vw), 44px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}
.hero-caption span {
  background: var(--caption);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 3px 14px;
  color: var(--caption-ink);
  text-shadow: none;
}

.hero-speaker {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex: none;
}
.hero-speaker .chyron-text { gap: 3px; }
.hero-speaker .chyron-name { font-size: 22px; font-weight: 750; letter-spacing: -0.015em; text-transform: none; white-space: normal; line-height: 1.12; }
.hero-speaker .chyron-place { font-size: 16.5px; font-weight: 500; color: rgba(255, 255, 255, 0.85); white-space: normal; }
.hero-speaker-side { display: flex; align-items: center; flex: none; }

.hero-timer {
  position: relative; flex: none;
  width: 34px; height: 34px; border-radius: 999px;
  margin-right: 9px;
  background: conic-gradient(var(--caption) var(--deg, 0deg), rgba(255, 255, 255, 0.16) var(--deg, 0deg));
  transition: opacity 200ms ease;
}
.hero-timer::before {
  content: ""; position: absolute; inset: 3.5px; border-radius: 999px;
  background: rgba(6, 7, 7, 0.9);
}
.hero-timer span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  color: #fff; font-variant-numeric: tabular-nums;
}

.hero-controls { display: flex; align-items: center; gap: 7px; }
.hero-controls button {
  width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 9px;
  background: rgba(255, 255, 255, 0.06); color: var(--ink);
  display: grid; place-items: center;
  transition: background 130ms ease, border-color 130ms ease;
}
.hero-controls button svg { width: 17px; height: 17px; }
.hero-controls button:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.32); }


/* chyron: the signature unit */
.chyron {
  display: flex; align-items: center; gap: 12px;
  background: var(--room-up);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 14px 8px 8px;
  min-width: 0;
}
.chyron-text { display: flex; flex-direction: column; min-width: 0; }
.chyron-name {
  font-family: var(--display); font-weight: 700; font-size: 16px;
  text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chyron-place {
  font-size: 12px; color: var(--ink-dim); letter-spacing: 0.05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.timecode {
  margin-left: auto; flex: none;
  font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums;
  color: var(--caption);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 4px 8px; background: rgba(16,19,20,0.6);
}


/* ---------- tabs: pinned to the top right ---------- */

:root { --tabbar-h: 0px; --sidetabs-w: 0px; }

.tabs-row {
  position: sticky; top: 14px; z-index: 45;
  width: fit-content;
  margin: 14px clamp(20px, 3vw, 48px) -62px auto;
  display: flex; align-items: center; gap: 4px;
  padding: 5px;
  background: color-mix(in srgb, #ffffff 72%, #faf9f5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #dcd8cb;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(19, 23, 17, 0.06);
}
.tab {
  background: none; border: 0;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--display); font-weight: 650; font-size: 15.5px;
  letter-spacing: -0.005em;
  color: #55604f;
  transition: color 130ms ease, background 130ms ease;
}
.tab:hover { color: #131711; background: rgba(19, 23, 17, 0.05); }
.tab[aria-selected="true"] { background: #131711; color: #faf9f5; font-weight: 700; }

main.daylight:not([data-tab="analysis"]) .panel-analysis,
main.daylight:not([data-tab="dataset"]) .panel-dataset,
main.daylight:not([data-tab="about"]) .panel-about { display: none; }

/* ---------- analysis story: pinned stage, scroll advances scenes ---------- */

.story-track { height: calc(100vh + 3 * 58vh); }
.story-pin {
  position: sticky; top: var(--tabbar-h);
  height: calc(100svh - var(--tabbar-h));
  max-width: 1180px; margin: 0 auto; padding: 0 28px;
  display: grid;
  grid-template-columns: minmax(290px, 400px) minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 84px);
  align-items: center;
  overflow: hidden;
}
.story-rail .section-label { margin-bottom: 10px; }
.story-steps { display: flex; flex-direction: column; }
.story-step {
  display: flex; gap: 14px; align-items: baseline;
  text-align: left; background: none; border: 0;
  border-top: 1px solid var(--line);
  padding: 17px 0;
  opacity: 0.42;
  transition: opacity 240ms ease;
}
.story-step:last-child { border-bottom: 1px solid var(--line); }
.story-step:hover { opacity: 0.75; }
.story-step.on { opacity: 1; }
.story-num { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--caption); flex: none; }
.story-rowbody { min-width: 0; }
.story-title {
  display: block;
  font-family: var(--display); font-weight: 800; font-size: 22px;
  letter-spacing: -0.015em; line-height: 1.15;
}
.story-desc {
  display: block;
  color: var(--ink-dim); font-size: 14.5px; line-height: 1.5;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 340ms ease, opacity 340ms ease, margin-top 340ms ease;
}
.story-step.on .story-desc { max-height: 7em; opacity: 1; margin-top: 5px; }

.story-stage { position: relative; height: min(72svh, 640px); }
.story-scene {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0;
}
.scene-title { display: none; }

/* issue bars: mentions per issue, split by stance */
.issue-bars { display: flex; flex-direction: column; gap: 7px; }
.ibar {
  display: grid;
  grid-template-columns: minmax(150px, 230px) 1fr 68px;
  align-items: center; gap: 16px;
  background: none; border: 0; padding: 6px 0;
  text-align: left;
}
.ibar-label {
  font-family: var(--display); font-weight: 650; font-size: 15px;
  color: var(--ink); letter-spacing: -0.01em;
  transition: color 120ms ease;
}
.ibar:hover .ibar-label { color: var(--caption); }
.ibar-track { height: 24px; border-radius: 3px; background: var(--room-up); overflow: hidden; }
.ibar-fill { display: flex; height: 100%; border-radius: 3px; overflow: hidden; }
.ibar-fill i { display: block; min-width: 1px; }
.ibar-fill .sno { background: var(--oppose); }
.ibar-fill .syes { background: var(--support); }
.ibar-fill .sun { background: var(--unclear); }
.ibar-n {
  font-family: var(--display); font-weight: 700; font-size: 15px; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--ink-dim);
}
.issue-note { margin: 16px 0 0; font-size: 13px; color: var(--ink-faint); }
.issue-legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--ink-dim); }
.issue-legend .item { display: flex; align-items: center; gap: 7px; }
.issue-legend .swatch { width: 10px; height: 10px; border-radius: 2px; }

/* ---------- voices strip ---------- */

.voices-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.strip-nav { display: flex; gap: 8px; }
.strip-nav button {
  width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--room); color: var(--ink-dim);
  display: grid; place-items: center;
  transition: color 130ms ease, border-color 130ms ease;
}
.strip-nav button svg { width: 17px; height: 17px; }
.strip-nav button:hover { color: var(--ink); border-color: var(--ink-faint); }

/* ---------- shared section chrome ---------- */

.section-label, .section-head h2 { font-family: var(--display); }
.section-label { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-dim); margin: 0; }

.section-head { padding: 0 28px; max-width: 1180px; margin: 0 auto 28px; }
.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 800; line-height: 1.02; letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--ink-dim); max-width: 46em; }

section { scroll-margin-top: 24px; }

/* ---------- stance band ---------- */

.stance-bar { display: flex; gap: 2px; height: 84px; border-radius: 4px; overflow: hidden; }
.stance-bar .seg { position: relative; min-width: 2px; }
.stance-bar .seg.no { background: var(--oppose); }
.stance-bar .seg.yes { background: var(--support); }
.stance-bar .seg.unclear { background: var(--unclear); }

.stance-legend { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 14px; font-size: 14px; color: var(--ink-dim); }
.stance-legend .item { display: flex; align-items: baseline; gap: 8px; }
.stance-legend .swatch { width: 11px; height: 11px; border-radius: 2px; align-self: center; }
.stance-legend .big {
  font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}

/* ---------- voices strip: one row, sideways ---------- */

.voices { padding: 26px 0 84px; }
.voices-strip {
  max-width: 1180px; margin: 0 auto; padding: 4px 28px 18px;
  display: flex; gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.voices-strip::-webkit-scrollbar { height: 8px; }
.voices-strip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.voices-strip .voice-card { flex: 0 0 min(340px, 82vw); scroll-snap-align: start; }
.voice-card {
  text-align: left; border: 1px solid var(--line); border-radius: 4px;
  background: var(--room);
  padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 120ms ease, transform 120ms ease;
}
.voice-card:hover { border-color: var(--ink-faint); transform: translateY(-2px); }
.voice-card.playing { border-color: var(--caption); }
.voice-quote {
  flex: 1;
  margin: 0; padding: 18px 18px 14px;
  font-size: 16.5px; line-height: 1.5; color: var(--ink);
}
.voice-quote::before { content: "“"; color: var(--caption); font-family: var(--display); font-weight: 800; }
.voice-quote::after { content: "”"; color: var(--caption); font-family: var(--display); font-weight: 800; }
.voice-card .chyron { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; margin: 0 -1px -1px; }
.voice-card .chyron-name { font-size: 14px; }
.stance-dot {
  flex: none; width: 8px; height: 8px; border-radius: 999px;
  margin-right: 2px; align-self: center;
}
.voice-card[data-stance="no"] .stance-dot { background: var(--oppose); }
.voice-card[data-stance="yes"] .stance-dot { background: var(--support); }
.voice-card[data-stance="unclear"] .stance-dot { background: var(--unclear); }

/* ---------- tile map ---------- */

.tile-map {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 5px;
}
.tile {
  grid-column: var(--col); grid-row: var(--row);
  aspect-ratio: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line); border-radius: 3px;
  background: var(--room);
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 6px 7px 0;
  font-family: var(--mono);
  transition: border-color 120ms ease;
}
.tile:hover, .tile.active { border-color: var(--caption); }
.tile .code { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-dim); }
.tile .n { font-family: var(--display); font-weight: 700; font-size: clamp(12px, 1.4vw, 18px); color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tile .strip { display: flex; height: 6px; margin: 5px -7px 0; }
.tile .strip i { display: block; }
.tile .strip .sno { background: var(--oppose); }
.tile .strip .syes { background: var(--support); }
.tile .strip .sun { background: var(--unclear); }
.tile.dim { opacity: 0.38; }
.tile.dim:hover { opacity: 1; }
.map-legend {
  margin: 14px 0 0;
  display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--ink-dim);
}
.map-legend .item { display: flex; align-items: center; gap: 7px; }
.map-legend .swatch { width: 10px; height: 10px; border-radius: 2px; }

/* ---------- explorer ---------- */

.explore { padding: 20px 0 60px; }
.controls {
  max-width: 1180px; margin: 0 auto 10px; padding: 0 28px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(4, minmax(130px, 180px));
  gap: 10px;
}
.search-wrap { position: relative; }
.controls input[type="search"], .controls select {
  width: 100%;
  background: var(--room); color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 11px 12px; font: inherit; font-size: 15px;
}
.controls input[type="search"]::placeholder { color: var(--ink-faint); }
.controls select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%), linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.search-state {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
}

.active-filters {
  max-width: 1180px; margin: 0 auto 6px; padding: 6px 28px 0;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--room-up); border: 1px solid var(--line); border-radius: 99px;
  padding: 4px 6px 4px 12px; font-size: 13px; color: var(--ink);
}
.chip button { border: 0; background: var(--line); color: var(--ink-dim); border-radius: 99px; width: 18px; height: 18px; line-height: 1; font-size: 11px; display: grid; place-items: center; }
.chip button:hover { color: var(--ink); }
.chip-clear { background: none; border: 0; color: var(--ink-faint); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.chip-clear:hover { color: var(--ink); }

.result-line {
  max-width: 1180px; margin: 10px auto 14px; padding: 0 28px;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* the dataset window: the list scrolls here, the page does not */
.record-window {
  max-width: 1180px; margin: 0 auto;
  width: calc(100% - 56px);
  height: max(400px, calc(100svh - var(--tabbar-h) - 350px));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--room);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.record-window::-webkit-scrollbar { width: 9px; }
.record-window::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.record-list { padding: 0 22px 10px; display: flex; flex-direction: column; }

.meeting-head {
  position: sticky; top: 0; z-index: 2;
  background: var(--room);
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 20px 0 10px;
  border-bottom: 1px solid var(--line);
}
.meeting-head h3 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 19px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.meeting-meta { color: var(--ink-dim); font-size: 13.5px; }
.meeting-actions { margin-left: auto; display: flex; gap: 14px; }
.meeting-actions button, .meeting-actions a {
  background: none; border: 0; padding: 0;
  color: var(--caption); font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.meeting-actions button:hover, .meeting-actions a:hover { text-decoration: underline; text-underline-offset: 3px; }

.row {
  display: grid;
  grid-template-columns: 52px minmax(180px, 240px) 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.row-play {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--room); color: var(--ink-dim);
  display: grid; place-items: center;
}
.row-play svg { width: 16px; height: 16px; fill: currentColor; }
.row-play:hover { background: var(--caption); border-color: var(--caption); color: var(--caption-ink); }
.row.playing .row-play { background: var(--caption); border-color: var(--caption); color: var(--caption-ink); }
.row-who { min-width: 0; }
.row-name { font-family: var(--display); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.2; }
.row-affil { font-size: 12.5px; color: var(--support); line-height: 1.35; margin-top: 2px; }
.row-place { font-size: 12.5px; color: var(--ink-dim); margin-top: 2px; }
.row-quote { margin: 0; font-size: 15.5px; color: var(--ink); max-width: 62ch; }
.row-quote .more { color: var(--caption); background: none; border: 0; padding: 0; font-size: 13.5px; font-weight: 600; }
.row-quote .more:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-quote mark { background: var(--caption); color: var(--caption-ink); padding: 0 2px; border-radius: 2px; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.stance-tag {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px;
}
.stance-tag.no { background: color-mix(in srgb, var(--oppose) 24%, transparent); color: #e5a98c; }
.stance-tag.yes { background: color-mix(in srgb, var(--support) 24%, transparent); color: #9cc4e8; }
.stance-tag.unclear { background: color-mix(in srgb, var(--unclear) 30%, transparent); color: #a9b0a6; }
.stance-tag.inquiry { background: color-mix(in srgb, #5b9bd1 18%, transparent); color: #9cc4e8; }
.row-side .timecode { margin: 0; }
.row-issues { font-size: 12px; color: var(--ink-faint); text-align: right; max-width: 180px; }

.list-empty { max-width: 1180px; margin: 0 auto; padding: 48px 28px; display: grid; gap: 6px; color: var(--ink-dim); }
.list-empty strong { color: var(--ink); font-size: 18px; }

.pager {
  max-width: 1180px; margin: 22px auto 0; padding: 0 28px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 14px;
}
.pager button {
  background: var(--room); border: 1px solid var(--line); border-radius: 4px;
  padding: 9px 16px; color: var(--ink-dim); font-weight: 600;
}
.pager button:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-faint); }
.pager button:disabled { opacity: 0.35; cursor: default; }
.pager-status { color: var(--ink-faint); font-family: var(--mono); font-size: 12.5px; }
.pager-jump { margin-left: auto; color: var(--ink-faint); display: flex; align-items: center; gap: 7px; }
.pager-jump input {
  width: 64px; background: var(--room); color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px; padding: 7px 9px; font: inherit;
  font-variant-numeric: tabular-nums;
}

/* ---------- limitations: one viewport of caveat cards ---------- */

.limits, .about { padding: 44px 0 72px; }

.limit-grid {
  max-width: 1180px; margin: 0 auto; padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.limit-card {
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--room);
  padding: 18px 20px;
}
.limit-card h3 {
  margin: 0 0 8px;
  font-family: var(--display); font-weight: 750; font-size: 17px;
  letter-spacing: -0.01em; line-height: 1.2;
}
.limit-card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-dim); }
.limit-card [data-agg] { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 1000px) { .limit-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .limit-grid { grid-template-columns: 1fr; } }

/* ---------- about us ---------- */

.about-body { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.about-mark { display: block; width: 28px; height: 32px; margin-bottom: 20px; }
.about-body p { margin: 0 0 14px; max-width: 60ch; font-size: 16px; line-height: 1.65; color: var(--ink-dim); }
.about-body p strong { color: var(--ink); }
.about-body a { color: var(--caption); font-weight: 600; text-decoration: none; }
.about-body a:hover { text-decoration: underline; text-underline-offset: 3px; }
.about-sign { margin-top: 24px; font-family: var(--mono); font-size: 13px; }

/* ---------- theater: video left, transcript right ---------- */

.theater-backdrop {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(4, 5, 5, 0.82);
  backdrop-filter: blur(3px);
}

.dock {
  position: fixed; z-index: 60;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(96vw, 1720px);
  height: min(92dvh, 1040px);
  background: #101312;
  border: 1px solid #262a27;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
  display: grid;
  grid-template-columns: minmax(0, 7fr) clamp(430px, 33vw, 580px);
}

.dock-stage {
  position: relative;
  background: #000;
  min-height: 0;
}
.dock-stage iframe, #dock-player, .dock-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dock-alt {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center;
  padding: 32px; background: #000; gap: 18px; color: #f5f4ef;
}
.dock-alt p { margin: 0; }
a.dock-alt-open {
  display: inline-block;
  background: #116911; color: #fff;
  font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em;
  padding: 15px 40px; border-radius: 12px;
  text-decoration: none;
  transition: background 130ms ease, transform 130ms ease;
}
a.dock-alt-open:hover { background: #0d5410; transform: translateY(-1px); }

.dock-panel {
  display: flex; flex-direction: column;
  min-height: 0;
  background: #faf9f5;
  color: #131711;
  border-left: 1px solid #262a27;
}
.dock-top {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px 12px 24px;
  border-bottom: 1px solid #e5e2d6;
}
.dock-top button { background: none; border: 0; padding: 6px; }
#dock-prev, #dock-next { font-size: 21px; color: #55604f; }
#dock-prev:hover:not(:disabled), #dock-next:hover:not(:disabled) { color: #131711; }
#dock-prev:disabled, #dock-next:disabled { opacity: 0.3; cursor: default; }
.dock-queue { font-family: var(--mono); font-size: 15px; color: #6c7265; }
.dock-top-spacer { flex: 1; }
.dock-share {
  display: inline-block;
  border: 1px solid #116911 !important;
  border-radius: 999px;
  padding: 7px 18px !important;
  font-size: 15.5px; font-weight: 700; color: #fff;
  background: #116911 !important;
  text-decoration: none;
  white-space: nowrap;
}
.dock-share:hover { background: #0d5410 !important; border-color: #0d5410 !important; }
#dock-close {
  width: 38px; height: 38px;
  border: 1px solid #dcd8cb !important; border-radius: 999px;
  background: #faf9f5; color: #131711; font-size: 16px;
}
#dock-close:hover { background: #f0eee5; }

.dock-head { padding: 16px 30px 14px; }
.dock-title-row {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 2px 10px;
}
.dock-head h3 {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: 15.5px; letter-spacing: 0; line-height: 1.4;
  color: #3c4136;
}
.dock-byline-row {
  display: flex; align-items: center; gap: 14px;
  margin: 7px 0 0;
}
.dock-byline {
  flex: 1; min-width: 0;
  margin: 0;
  font-size: 16px; line-height: 1.6; color: #3c4136;
}
.dock-byline b { font-weight: 700; color: #131711; }
.dock-byline .dock-dot { color: #b3b0a3; margin: 0 6px; }
.dock-affil-inline { color: #2e6da4; }
.stance-pill {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 14px; font-weight: 700; line-height: 1.35;
}
.stance-pill.no { background: #f8e2de; color: #a5261d; }
.stance-pill.yes { background: #e2efdd; color: #116911; }
.stance-pill.inquiry { background: #e1eafa; color: #1d4f9c; }
.stance-pill.unclear { background: #eceae0; color: #575d52; }

.dock-where {
  margin: 0;
  font-family: var(--display); font-weight: 800;
  font-size: 23px; letter-spacing: -0.015em; line-height: 1.08;
  color: #131711; white-space: nowrap;
}
.dock-where strong { font-weight: 800; }
.dock-where .dock-sep { color: #b3b0a3; margin: 0 6px; font-weight: 400; font-size: 16px; }
#dock-date { font-size: 15.5px; font-weight: 650; letter-spacing: 0; color: #6c7265; }
.dock-time { display: inline-flex; align-items: center; gap: 5px; }
.dock-time svg { width: 15px; height: 15px; color: #6c7265; }

.dock-transcript {
  flex: 1;
  min-height: 118px;
  overflow-y: auto;
  margin: 0;
  padding: 16px 30px 24px;
  border-top: 1px solid #e5e2d6;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cfccc0 transparent;
}
.tr-p {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 0 16px;
  margin: 0 0 15px;
}
.tr-time {
  font-family: var(--mono); font-size: 14px; color: #98937f;
  padding-top: 6px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.tr-body {
  margin: 0;
  font-size: 17px; line-height: 1.78; color: #23281f;
}
.dock-transcript .tr-s { cursor: pointer; border-radius: 3px; padding: 1px 2px; transition: background 120ms ease, color 120ms ease; }
.dock-transcript .tr-s:hover { background: rgba(17, 105, 17, 0.09); }
.dock-transcript .tr-s.on { background: rgba(17, 105, 17, 0.16); color: #0c2d0c; font-weight: 600; }
.tr-p.tr-other .tr-body {
  background: #f1efe7;
  border-radius: 9px;
  padding: 10px 14px 11px;
  color: #55604f;
  font-size: 15.5px; line-height: 1.7;
}
.tr-other-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 700; font-size: 14px;
  color: #8b8672;
}
.tr-p.tr-other .tr-time { color: #b5b09c; }
.dock-transcript .tr-skip {
  display: block; margin: 4px 0 15px; padding: 9px 14px;
  margin-left: 74px;
  background: #f1efe7; border-radius: 9px;
  font-size: 14.5px; font-weight: 600;
  color: #8b8672;
}
.dock-alt-hint { font-size: 20px; line-height: 1.55; color: #fff; max-width: 27em; }

/* ---- how this comment was coded ---- */

/* the person's section is the toggle: click the head, the coding unfolds */
.dock-top, .dock-head { flex-shrink: 0; }
.dock-head.expandable { cursor: pointer; }
.dock-head.expandable:hover { background: #f5f3ec; }
.dock-head-chev {
  flex: none;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid #cfccbe; border-radius: 999px;
  background: #fff;
  color: #131711; font-size: 21px; line-height: 1;
  transition: transform 160ms ease, background 130ms ease, color 130ms ease;
}
.dock-head.expandable:hover .dock-head-chev { background: #131711; border-color: #131711; color: #faf9f5; }
.dock-head[aria-expanded="true"] .dock-head-chev { transform: rotate(180deg); }
.dock-coding {
  border-top: 1px solid #e5e2d6;
  display: flex; flex-direction: column; min-height: 0;
}
.dock-coding-body {
  /* opens in full; scrolls only if a heavily-coded outlier outgrows the panel */
  overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 30px 18px;
  scrollbar-width: thin;
  scrollbar-color: #cfccc0 transparent;
}
.code-group { margin: 0 0 14px; }
.code-group h5 {
  margin: 0 0 8px;
  font-size: 14.5px; font-weight: 700; color: #55604f;
}
.code-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.code-chip {
  display: inline-flex; align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 14.5px; font-weight: 550; line-height: 1.3;
  background: #fdfdfa;
  border: 1px solid #ddd9cb;
  color: #2a2f26;
}
.code-chip.c { background: #f9efe9; border-color: #e8cfc0; }
.code-chip.b { background: #edf3f9; border-color: #c9dcee; }
.code-chip.a { background: #f9f1dd; border-color: #e7d5ac; }
.code-facts { margin-top: 4px; border-top: 1px solid #e5e2d6; padding-top: 13px; }
.code-facts p { margin: 0 0 9px; font-size: 15px; line-height: 1.55; color: #3c4136; }
.code-facts p span { font-weight: 700; color: #55604f; margin-right: 9px; }
.code-why em { color: #55604f; font-style: italic; }


/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 80;
  background: var(--caption); color: var(--caption-ink);
  font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 4px;
}


/* ---------- daylight: everything after the hero ---------- */

main.daylight {
  --tape: #faf9f5;
  --room: #ffffff;
  --room-up: #f1efe7;
  --line: #e2dfd3;
  --ink: #131711;
  --ink-dim: #55604f;
  --ink-faint: #8b948a;
  --caption: #116911;
  --caption-ink: #ffffff;
  --support: #2f6f9f;
  background: var(--tape);
  color: var(--ink);
}
main.daylight .timecode { background: var(--room-up); border-color: var(--line); color: var(--caption); }
main.daylight .stance-tag.no { background: rgba(206, 122, 82, 0.16); color: #96491f; }
main.daylight .stance-tag.yes { background: rgba(47, 111, 159, 0.14); color: #245a85; }
main.daylight .stance-tag.unclear { background: rgba(116, 128, 111, 0.16); color: #55604f; }
main.daylight .stance-tag.inquiry { background: rgba(45, 114, 210, 0.12); color: #2a5d9c; }
main.daylight .voice-card { box-shadow: 0 1px 3px rgba(20, 26, 18, 0.05); }
main.daylight .chyron { background: var(--room-up); }
main.daylight .row-play:hover { background: var(--caption); border-color: var(--caption); color: var(--caption-ink); }
main.daylight .row-quote mark { background: #d7eeab; color: #123c12; }
main.daylight .controls input[type="search"], main.daylight .controls select { background: var(--room); }
main.daylight .list-empty strong { color: var(--ink); }

/* ---------- story reveals: desktop only (mobile lays flat) ---------- */

@media (min-width: 901px) {
  .story-scene {
    opacity: 0; transform: translateY(16px);
    visibility: hidden; pointer-events: none;
    transition: opacity 420ms ease, transform 420ms ease, visibility 0s linear 420ms;
  }
  .story-scene.on {
    opacity: 1; transform: none;
    visibility: visible; pointer-events: auto;
    transition: opacity 420ms ease, transform 420ms ease;
  }
  /* the split: the bar arrives as equal thirds, then settles to the truth */
  .story-scene .stance-bar .seg { transition: flex-grow 950ms cubic-bezier(0.22, 0.61, 0.21, 1); }
  .story-scene:not(.on) .stance-bar .seg { flex-grow: 1 !important; }
  /* the map: tiles wash in on a diagonal */
  .story-scene[data-scene="1"] .tile { opacity: 0; transform: translateY(8px); }
  .story-scene[data-scene="1"].on .tile {
    opacity: 1; transform: none;
    transition: opacity 300ms ease var(--d, 0ms), transform 300ms ease var(--d, 0ms), border-color 120ms ease;
  }
  .story-scene[data-scene="1"].on .tile.dim { opacity: 0.38; }
  .story-scene[data-scene="1"].on .tile.dim:hover { opacity: 1; }
  /* the issues: bars sweep out top to bottom */
  .story-scene[data-scene="2"] .ibar-fill { transform-origin: left; transform: scaleX(0); }
  .story-scene[data-scene="2"] .ibar-n { opacity: 0; }
  .story-scene[data-scene="2"].on .ibar-fill {
    transform: scaleX(1);
    transition: transform 620ms cubic-bezier(0.22, 0.61, 0.21, 1) var(--d, 0ms);
  }
  .story-scene[data-scene="2"].on .ibar-n {
    opacity: 1;
    transition: opacity 380ms ease calc(var(--d, 0ms) + 340ms);
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .controls { grid-template-columns: 1fr 1fr; }
  .search-wrap { grid-column: 1 / -1; }
}

/* flat story: no pin, scenes stack with their own titles */
@media (max-width: 900px) {
  .story-track { height: auto; }
  .story-pin {
    position: static; height: auto;
    display: block; overflow: visible;
    padding-top: 44px;
  }
  .story-steps { display: none; }
  .story-stage { height: auto; }
  .story-scene { position: static; margin: 26px 0 52px; }
  .scene-title {
    display: block; margin: 0 0 14px;
    font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.015em;
  }
  .ibar { grid-template-columns: 1fr; gap: 5px; }
  .ibar-n { display: none; }
}

@media (max-width: 720px) {
  .hero-big { font-size: 14px; padding: 10px 18px; top: calc(50% + 54px); }
  .hero-dek { max-width: 24em; }
  .masthead { padding: 14px 16px; }
  .hero-copy { padding: 84px 16px 0; }
  .hero-stage { padding: 0 16px 20px; gap: 12px; }
  .hero-speaker { gap: 10px; padding: 8px 10px; }
  .hero-controls { margin-left: 4px; padding-left: 8px; }
  .section-head, .voices-strip, .controls,
  .active-filters, .result-line, .pager { padding-left: 16px; padding-right: 16px; }
  .story-pin { padding-left: 16px; padding-right: 16px; }
  .tabs-row { margin-right: 16px; gap: 16px; }
  .tab { white-space: nowrap; flex: none; }
  .record-window { width: calc(100% - 32px); }
  .record-list { padding: 0 14px 8px; }
  .row { grid-template-columns: 44px 1fr; }
  .row-quote { grid-column: 1 / -1; }
  .row-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; }
  .row-issues { text-align: left; max-width: none; }
  .tile-map { gap: 3px; }
  .tile { padding: 3px 4px 0; }
  .tile .code { font-size: 9px; }
  .tile .n { font-size: 10px; }
  .tile .strip { height: 4px; margin: 3px -4px 0; }
  .dock {
    width: 100vw; height: 100dvh; border-radius: 0; border: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(200px, 38dvh) minmax(0, 1fr);
  }
  .dock-panel { border-left: 0; border-top: 1px solid #e5e2d6; }
  .dock-where { font-size: 20px; }
  /* phones: timecodes sit above their paragraph so the text gets the width */
  .tr-p { grid-template-columns: 1fr; gap: 0; }
  .tr-time { text-align: left; padding-top: 0; margin-bottom: 2px; }
  .dock-transcript { padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); }
  .dock-transcript .tr-skip { margin-left: 0; }
  .tabs-row { max-width: calc(100vw - 32px); overflow-x: auto; margin-bottom: 0; }
  .hero-stage { padding-bottom: 128px; }
  .hero-controls button { width: 42px; height: 42px; }
  #dock-close { width: 44px; height: 44px; }
  .dock-top { padding: 10px 12px; }
  .dock-top button { padding: 10px; }
  .ds-minifind { font-size: 16px; }
}

/* touch landscape phones get the stacked dock sheet too */
@media (pointer: coarse) and (max-height: 520px) {
  .dock {
    width: 100vw; height: 100dvh; border-radius: 0; border: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(140px, 44dvh) minmax(0, 1fr);
  }
  .dock-panel { border-left: 0; border-top: 1px solid #e5e2d6; }
}
