/* ============================================================
   Dying to Work — design system
   Dead-channel dark: near-black phosphor ground, pale ink,
   greys for context, ONE glowing accent for selection, and a
   warm/cool pair for predator/prey. CRT flair (scanlines,
   chromatic fringe, vignette) as accent — never as noise.
   ============================================================ */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/newsreader-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
}

:root {
  --ground: #0c0d0f;
  --ground-translucent: rgba(12, 13, 15, 0.88);
  --ink: #e9e7e2;
  --ink-soft: #9a978f;
  --grey: #6f6d66;
  --grey-faint: #26272b;
  --accent: #ffb424;            /* selected actor — phosphor amber */
  --predator: #d0492f;          /* Apex Predators */
  --prey: #6c96c4;              /* Popular Prey */
  --cast: #855FC8;              /* The Dying Cast */
  --uncredited: #2fbf8a;        /* The Uncredited Dead */
  --balanced: #7d7a72;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Archivo", -apple-system, Helvetica, sans-serif;
  --measure: 34rem;
  --step-pad: 1.25rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- CRT atmosphere (fixed, non-interactive) ---------- */

/* faint scanlines over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.28) 0 1px,
    transparent 1px 3px
  );
  opacity: 0.28;
}
/* tube vignette + a whisper of screen glare */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 299;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 60% at 50% 38%, rgba(233, 231, 226, 0.045), transparent 70%),
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
}

/* ---------- utilities ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 0.5rem; top: -3rem;
  z-index: 100;
  background: var(--ink); color: var(--ground);
  padding: 0.5rem 1rem;
  font-family: var(--sans);
  transition: top 0.15s;
}
.skip-link:focus { top: 0.5rem; }

/* ---------- utility bar (search) ---------- */

.utility-bar {
  position: fixed;
  top: 0.75rem; right: 0.75rem;
  z-index: 50;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.actor-search input {
  font-family: var(--sans);
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--grey);
  border-radius: 999px;
  background: var(--ground-translucent);
  backdrop-filter: blur(6px);
  color: var(--ink);
  width: 10.5rem;
}
.actor-search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.clear-selection {
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--ground);
  cursor: pointer;
}

/* ---------- prose ---------- */

.prose, .masthead {
  max-width: var(--measure);
  margin-inline: auto;
  padding: 0 var(--step-pad);
}

.masthead {
  padding-top: clamp(4rem, 18vh, 9rem);
  text-align: center;
}
.kicker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.brand-logo {
  position: relative;
  display: block;
  text-decoration: none;
  border: 0;
}
.brand-logo-mast { width: min(100%, 7.7rem); }
.brand-logo-end {
  width: min(92vw, 48rem);
  margin: 2.75rem auto 0.5rem;
}
.brand-logo img {
  width: 100%;
  height: auto;
  display: block;
  /* same red/cyan fringe and phosphor glow as the display type */
  filter:
    drop-shadow(-2px 0 rgba(255, 64, 64, 0.55))
    drop-shadow(2px 0 rgba(64, 210, 255, 0.45))
    drop-shadow(0 0 16px rgba(233, 231, 226, 0.28));
  /* hard cuts, uneven holds: a tube that mostly glows and sometimes dips */
  animation: crt-flicker 7.4s steps(1, end) infinite;
}
.brand-logo:hover img,
.brand-logo:focus-visible img {
  filter:
    drop-shadow(-2px 0 rgba(255, 64, 64, 0.7))
    drop-shadow(2px 0 rgba(64, 210, 255, 0.6))
    drop-shadow(0 0 22px rgba(233, 231, 226, 0.45));
}
.brand-logo:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 6px;
}
.brand-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 48%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.32) 0 1px,
      transparent 1px 3px
    );
  -webkit-mask-image: url("assets/hero/Gravesite-logo.svg");
  mask-image: url("assets/hero/Gravesite-logo.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background-repeat: no-repeat, repeat;
  animation: crt-hum 9s linear infinite;
}
@keyframes crt-flicker {
  0%, 7%, 11%, 27%, 46%, 63%, 79%, 91%, 100% {
    opacity: 1;
    transform: none;
  }
  8%  { opacity: 0.78; transform: translateX(0.5px); }
  10% { opacity: 0.9; }
  28% { opacity: 0.66; transform: translateX(-0.6px); }
  47% { opacity: 0.84; }
  64% { opacity: 0.52; transform: translateX(0.8px); }
  65% { opacity: 0.88; transform: translateX(-0.3px); }
  80% { opacity: 0.74; }
  92% { opacity: 0.93; transform: translateX(0.4px); }
}
@keyframes crt-hum {
  0%   { opacity: 0.82; background-position: 0 0, 0 0; }
  37%  { opacity: 1; }
  38%  { opacity: 0.45; }
  40%  { opacity: 0.95; }
  71%  { opacity: 0.88; }
  72%  { opacity: 0.6; }
  74%  { opacity: 1; }
  100% { opacity: 0.86; background-position: 0 0, 0 6px; }
}
h1 {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
  line-height: 1.02;
  margin: 0.5rem 0 1rem;
  /* chromatic aberration + phosphor glow on the display type */
  text-shadow:
    -2px 0 rgba(255, 64, 64, 0.4),
    2px 0 rgba(64, 210, 255, 0.35),
    0 0 24px rgba(233, 231, 226, 0.22);
}
.dek {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}
.byline {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin: 0 0 clamp(2rem, 7vh, 3.5rem);
}
.byline a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  transition: color 0.15s, border-color 0.15s, text-shadow 0.15s;
}
.byline a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 12px rgba(255, 180, 36, 0.35);
}

/* ---------- hero film strip ---------- */

.hero-film {
  position: relative;
  overflow: hidden;
  margin: 0 0 clamp(3rem, 12vh, 6rem);
}
/* Edge fade is painted on top of the strip. A CSS mask on this box
   stops the drift on iOS: Safari composites the mask once and never
   repaints the animated track underneath it. */
.hero-film::before,
.hero-film::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12%;
  z-index: 2;
  pointer-events: none;
}
.hero-film::before {
  left: 0;
  background: linear-gradient(90deg, var(--ground), transparent);
}
.hero-film::after {
  right: 0;
  background: linear-gradient(270deg, var(--ground), transparent);
}
.hero-film-track {
  display: flex;
  gap: clamp(0.8rem, 2vw, 1.5rem);
  width: max-content;
  /* duration scales with the set: seven frames now, was five at 94s.
     translate3d keeps the drift on the compositor, including iOS. */
  -webkit-animation: hero-drift 132s linear infinite;
  animation: hero-drift 132s linear infinite;
  will-change: transform;
}
.hero-film img {
  height: clamp(170px, 26vh, 250px);
  width: auto;
  border-radius: 10px;
  display: block;
  filter: saturate(0.85) contrast(1.05);
  box-shadow:
    0 0 0 1px rgba(233, 231, 226, 0.07),
    0 0 34px rgba(233, 231, 226, 0.07);
}
/* silent local loops, same frame height as the stills */
.hero-film-clip {
  position: relative;
  flex: none;
  height: clamp(170px, 26vh, 250px);
  width: auto;
  border-radius: 10px;
  overflow: hidden;
  pointer-events: none;
  background: #000;
  filter: saturate(0.85) contrast(1.05);
  box-shadow:
    0 0 0 1px rgba(233, 231, 226, 0.07),
    0 0 34px rgba(233, 231, 226, 0.07);
}
.hero-film-clip video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.hero-film-clip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, 0.5) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.2) 0 1px,
      transparent 1px 3px
    );
}
/* strip holds two copies of the set; sliding one set-width reads as an
   endless gentle drift to the right */
@-webkit-keyframes hero-drift {
  from { -webkit-transform: translate3d(-50%, 0, 0); }
  to   { -webkit-transform: translate3d(0, 0, 0); }
}
@keyframes hero-drift {
  from { transform: translate3d(-50%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}
h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 1rem;
}
h2.display {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  margin: 4rem 0 1.5rem;
  text-shadow:
    -1.5px 0 rgba(255, 64, 64, 0.28),
    1.5px 0 rgba(64, 210, 255, 0.24),
    0 0 18px rgba(233, 231, 226, 0.16);
}

.questions { padding-left: 1.4rem; }
.questions li { margin-bottom: 0.5rem; }

.role-predator { color: var(--predator); }
.role-prey { color: var(--prey); }
.role-cast { color: var(--cast); }
.role-uncredited { color: var(--uncredited); }
.stunt-mark {
  color: var(--ink);
}
.stunt-dot {
  display: inline-block;
  width: 1.45em;
  height: 1.45em;
  margin: 0 0.1em 0 0.2em;
  vertical-align: -0.28em;
  fill: var(--ink);
  overflow: visible;
}
.stunt-dot-core { fill: var(--cast); }
.footnote, .fn-ref {
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.footnote { margin-top: 1rem; }
.fn-ref { text-decoration: none; }

.ed-note {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  border-left: 3px solid var(--grey-faint);
  padding-left: 0.9rem;
}

a { color: inherit; text-decoration-color: var(--grey); text-underline-offset: 3px; }

/* gold highlight on the lede, with a curve down to the Roberts clip */
.lede-close { position: relative; }
.victim-mark {
  background-color: var(--accent);
  color: var(--ground);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.12em;
}
.lede-arrow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.lede-arrow path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lede-arrow-head { fill: var(--accent); stroke: none; }
a:hover { text-decoration-color: var(--accent); }

/* clickable actor names */
button.actor, a.actor, .popup-trigger {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  transition: background-color 0.15s;
}
button.actor:hover, a.actor:hover, .popup-trigger:hover { background: rgba(255, 180, 36, 0.16); }
button.actor:focus-visible, a.actor:focus-visible, .popup-trigger:focus-visible,
.clear-selection:focus-visible, .popup-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button.actor[aria-pressed="true"], a.actor[aria-pressed="true"] {
  background: var(--accent);
  color: var(--ground);
  border-radius: 2px;
}
.popup-trigger { border-bottom-style: dashed; border-bottom-color: var(--prey); }

/* ---------- scrollytelling frame (mobile-first) ---------- */

#scrolly { position: relative; }

#stage {
  position: sticky;
  top: 0;
  height: 100svh;
  margin: 0;
  z-index: 0;
  overflow: hidden;
}
#stage-svg { width: 100%; height: 100%; display: block; position: relative; z-index: 1; pointer-events: all; }
#stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#stage-annotations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: var(--sans);
  z-index: 2; /* above the SVG so callouts aren’t buried under marks */
}
.actor-reel {
  position: relative;
  margin: 1.25rem 0 0.35rem;
}
.reel-play[hidden] {
  display: none;
}
.reel-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.reel-play::before,
.reel-play::after {
  content: "";
  grid-area: 1 / 1;
}
.reel-play::before {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(12, 12, 12, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 180, 36, 0.75);
}
.reel-play::after {
  width: 0;
  height: 0;
  margin-left: 0.22rem;
  border-style: solid;
  border-width: 0.55rem 0 0.55rem 0.95rem;
  border-color: transparent transparent transparent #fff;
}
.actor-reel video {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 6px;
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 14px 28px rgba(255, 180, 36, 0.32);
}
.anno {
  position: absolute;
  max-width: 15rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink);
  transition: opacity 0.5s;
}
.anno .anno-title { font-weight: 700; }
.anno .anno-num { font-weight: 600; font-variant-numeric: tabular-nums; }
.anno.accent { color: var(--accent); }
.anno.center { text-align: center; }
/* shared identity for the kill:death-ratio encoding: amber rings */
.anno.ratio-note .anno-title {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(255, 180, 36, 0.3);
}
.ring-glyph {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border: 2px solid var(--accent);
  border-radius: 50%;
  vertical-align: -0.05em;
  box-shadow: 0 0 8px rgba(255, 180, 36, 0.4);
}
.dot-glyph {
  display: inline-block;
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  vertical-align: 0.05em;
  box-shadow: 0 0 6px currentColor;
}
.anno.big {
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  max-width: 20rem;
}
.hover-anno {
  background: var(--ground-translucent);
  border: 1px solid var(--grey-faint);
  border-radius: 4px;
  padding: 0.35rem 0.55rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: opacity 0.15s;
  z-index: 5;
}
.hover-anno.victim-hover {
  max-width: 16.5rem;
  pointer-events: none;
}
.hover-anno.victim-hover .victim-kicker,
.hover-anno.victim-hover .victim-note {
  display: block;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.35;
}
.hover-anno.victim-hover .victim-kicker { margin-top: 0.15rem; }
.hover-anno.victim-hover .victim-note { margin-top: 0.3rem; }
.hover-anno.victim-hover ul {
  list-style: none;
  margin: 0.28rem 0 0;
  padding: 0;
}
.hover-anno.victim-hover li {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  line-height: 1.4;
}

/* pinned tooltip for the selected actor */
.anno.selection-card {
  pointer-events: auto;
  background: var(--ground-translucent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.45rem 1.7rem 0.45rem 0.6rem;
  box-shadow:
    0 3px 14px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(255, 180, 36, 0.18);
  color: var(--ink);
  z-index: 6;
  max-width: 15rem;
}
.anno.selection-card .anno-title { color: var(--accent); }
.anno-close {
  position: absolute;
  top: 0.2rem;
  right: 0.25rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.25rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.anno-close:hover,
.anno-close:focus-visible { color: var(--ink); }

/* unit strip inside the Lung-Wei Wang annotation */
.unit-strip {
  display: block;
  margin: 0.4rem 0 0.2rem;
  max-width: 13rem;
  line-height: 0;
}
.unit-strip .cell {
  display: inline-block;
  width: 9px; height: 12px;
  margin: 0 2px 2px 0;
  border: 1px solid var(--prey);
  background: transparent;
}
.unit-strip .cell.dead { background: var(--cast); }
.strip-key {
  display: block;
  font-size: 0.68rem;
  color: var(--ink-soft);
}

#steps {
  position: relative;
  z-index: 1;
  margin-top: -100svh;   /* steps scroll over the pinned stage */
  padding-bottom: 30vh;
  /* the lane itself is transparent to taps/clicks — only the cards catch
     them — so marks on the stage stay interactive between steps (mobile) */
  pointer-events: none;
}
.step { pointer-events: auto; }

.step {
  max-width: var(--measure);
  margin: 0 auto 85vh;
  padding: var(--step-pad) calc(var(--step-pad) + 0.25rem);
  background: var(--ground-translucent);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border: 1px solid rgba(233, 231, 226, 0.09);
  border-radius: 6px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  opacity: 0.45;
  transition: opacity 0.35s;
}
.step.is-active { opacity: 1; }
.step:first-of-type { margin-top: 12vh; }
.step:last-of-type { margin-bottom: 60vh; }
.step p:last-child { margin-bottom: 0; }
.step h2 { margin-top: 0.25rem; }

.anno.graphic-note {
  max-width: 18rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ---------- desktop: text column beside sticky graphic ---------- */

@media (min-width: 64rem) {
  #scrolly {
    display: grid;
    grid-template-columns: minmax(24rem, 30rem) 1fr;
    gap: 0;
    max-width: 90rem;
    margin-inline: auto;
  }
  #stage {
    order: 2;
    grid-column: 2;
    height: 100vh;
  }
  #steps {
    order: 1;
    grid-column: 1;
    margin-top: 0;
    padding-left: var(--step-pad);
  }
  .step {
    margin-left: 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ---------- stage svg marks ---------- */

.actor-node { cursor: pointer; }
.actor-node circle.mark {
  stroke: var(--ground);
  stroke-width: 1;
}
.actor-node circle.stunt-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.35;
  stroke-dasharray: 2.2 1.6;
  pointer-events: none;
}
.actor-node.is-selected circle.mark {
  stroke: var(--accent);
  stroke-width: 3;
  filter: drop-shadow(0 0 7px rgba(255, 180, 36, 0.65));
}
.actor-node text.mark-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--ground);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}
.actor-node line.unit {
  stroke-linecap: round;
}
.actor-node text.rate {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  fill: var(--ink);
  pointer-events: none;
}
.edge { fill: none; }
.decor text {
  font-family: var(--sans);
  fill: var(--ink-soft);
}
.decor-item.legend-label {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  fill: var(--ink-soft);
}
.decor-item.legend-title {
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  fill: var(--grey);
}
.decor-item.legend-title.is-ratio { fill: var(--accent); }

.data-info-anchor {
  --info: var(--ink-soft);
  position: absolute;
  z-index: 5;
  color: var(--info);
  pointer-events: none;
}
.data-info-anchor[data-tone="accent"] { --info: var(--accent); }
.data-info-anchor[data-tone="prey"] { --info: var(--prey); }
.data-info-anchor[data-tone="cast"] { --info: var(--cast); }
.data-info-anchor[data-tone="uncredited"] { --info: var(--uncredited); }
.data-info-anchor[data-tone="accent"] .data-cyl { stroke-dasharray: 1.5 1.15; }
.data-info-inline { position: relative; }
.data-info,
.data-info-pop { pointer-events: auto; }
.data-info {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--info);
  border-radius: 5px;
  background: rgba(12, 13, 15, 0.82);
  color: inherit;
  cursor: pointer;
}
.data-info svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.data-info:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}
.data-info-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: min(17rem, calc(100vw - 2.5rem));
  padding: 0.7rem 0.8rem 0.8rem;
  background: var(--ground);
  border: 1px solid var(--info);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.data-info-inline .data-info-pop {
  bottom: auto;
  top: calc(100% + 8px);
}
#data-info-opening .data-info-pop,
#data-info-archetypes .data-info-pop {
  width: min(28rem, calc(100vw - 2.5rem));
}
#data-info-stage .data-info-pop {
  left: auto;
  right: 0;
}
.data-info-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--info);
}
.data-info-body p {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink);
}
.data-info-body p + p { margin-top: 0.5rem; }
.decor-item.legend { pointer-events: none; }

/* ---------- popup ---------- */

.popup {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.68);
  padding: 1rem;
}
.popup[hidden] { display: none; }
.popup-inner {
  background: #141518;
  border: 1px solid rgba(233, 231, 226, 0.1);
  border-radius: 8px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7);
  max-width: 30rem;
  width: 100%;
  padding: 1.5rem;
  position: relative;
}
.popup-inner h3 { margin: 0 0 0.25rem; font-size: 1.35rem; }
.popup-sub, .popup-note {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.popup-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  font-family: var(--sans);
  background: none; border: 1px solid var(--grey);
  border-radius: 999px;
  width: 2rem; height: 2rem;
  cursor: pointer;
  color: var(--ink-soft);
}
#popup-chart { width: 100%; height: 200px; display: block; }

/* ---------- conclusion ---------- */

.conclusion { padding-top: 0; padding-bottom: 2rem; }

/* ---------- methodology / table / footer ---------- */

.methodology { padding-block: 4rem 2rem; }
.methodology p { font-size: 1rem; }

.data-table summary {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin: 1.5rem 0 0.5rem;
}
.data-table table {
  font-family: var(--sans);
  font-size: 0.78rem;
  border-collapse: collapse;
  width: 100%;
}
.data-table caption { text-align: left; padding-bottom: 0.5rem; color: var(--ink-soft); }
.data-table th, .data-table td {
  text-align: right;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--grey-faint);
}
.data-table th:first-child, .data-table td:first-child { text-align: left; }

/* ---------- standalone figures ---------- */

.prose-wide {
  max-width: 54rem;
  margin-inline: auto;
  padding: 0 var(--step-pad);
}
.chart {
  margin-block: 2.5rem 3rem;
}
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.9rem;
}
.chart-title {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 0.9rem;
}
.archetypes-head {
  align-items: baseline;
  margin: 2.5rem 0 1rem;
}
.archetypes-head h2 { margin: 0; }
.chart-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.profession-toggle {
  flex: none;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--ground-translucent);
  border: 1px solid var(--grey);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}
.profession-toggle[aria-pressed="true"] {
  border-color: var(--ink);
  background: rgba(233, 231, 226, 0.08);
}
.profession-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#profession-toggle-stage {
  position: absolute;
  z-index: 4;
  top: 0.85rem;
  left: 0.85rem;
}
#profession-toggle-stage[hidden] { display: none; }
.chart-body { position: relative; width: 100%; }
.chart-svg { display: block; width: 100%; overflow: visible; }
.chart-svg text {
  font-family: var(--sans);
  font-size: 11px;
  fill: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.chart-svg .panel-title { font-size: 12px; font-weight: 600; fill: var(--ink); }
.chart-svg .tick { font-size: 10px; fill: var(--grey); }
.chart-svg .axis-title { font-size: 11px; font-weight: 600; fill: var(--ink-soft); }
.chart-svg .value { font-size: 10.5px; fill: var(--ink-soft); }
.chart-svg .strong { font-weight: 700; fill: var(--ink); }
.chart-svg .selected { font-weight: 700; fill: var(--accent); }
.chart-svg .note { font-size: 10.5px; font-style: italic; fill: var(--ink-soft); }
.chart-svg .stunt-share { font-size: 12px; font-weight: 700; font-style: normal; fill: var(--ink); }
.chart-svg .stunt-share-n { font-size: 10.5px; font-weight: 600; fill: var(--ink-soft); }
.chart-svg .arch-name { font-size: 15px; font-weight: 700; }
.chart-svg .arch-credit { font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.chart-svg .arch-meta { font-size: 11px; fill: var(--ink-soft); }
.stunt-glyph {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  border: 1.5px dashed var(--ink);
  border-radius: 50%;
  vertical-align: -0.08em;
}
.chart-svg .caveat { font-style: normal; fill: var(--grey); }
.chart-svg .grid { stroke: var(--grey-faint); stroke-width: 1; }
.chart-svg .rule { stroke: var(--grey); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-svg .parity { stroke: var(--ink-soft); stroke-width: 1.25; stroke-dasharray: 5 4; }
.chart-svg .connector { fill: none; stroke-width: 1; stroke-dasharray: 2 4; }
.chart-caption {
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 0.9rem;
  max-width: 44rem;
}
.chart-source {
  display: block;
  margin-top: 0.4rem;
  color: var(--grey);
}

/* square interview clips — the file is 1:1; Shorts only displays it tall */
.clip {
  position: relative;
  margin: 1.5rem 0 0.35rem;
}
.step > .clip:first-child { margin-top: 0; }
.clip-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
}
.clip-wide .clip-stage { aspect-ratio: 16 / 9; }
.clip-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.clip-sound {
  flex: none;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ground);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  cursor: pointer;
}
.clip-sound[aria-pressed="true"] {
  color: var(--ink);
  background: rgba(12, 13, 15, 0.72);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.clip-sound:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.clip figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-top: 0.55rem;
}

.plate {
  position: relative;
  margin: 1.5rem 0;
}
.plate img,
.plate video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #000;
}
.plate-frame {
  position: relative;
}
.plate-cc {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.7rem;
  z-index: 2;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 0.65rem;
}
.plate-cc p {
  margin: 0;
  max-width: 36em;
  padding: 0.28rem 0.55rem 0.32rem;
  border-radius: 3px;
  background: rgba(8, 8, 8, 0.78);
  color: #f4f1ea;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}
.plate-cc p[hidden] { display: none; }
.cc-who {
  font-weight: 650;
}
.cc-who::after { content: ": "; }
.plate .reel-play { z-index: 3; }
.plate figcaption {
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-top: 0.55rem;
  text-align: center;
}

/* placeholders for GIFs, clips, and collages still to be produced */
.media-slot {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--grey);
  border: 1px dashed var(--grey);
  border-radius: 8px;
  padding: 1.4rem 1rem;
  margin: 1.5rem 0;
  text-align: center;
}

blockquote.pull {
  margin: 2rem 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--accent);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.4;
}
blockquote.pull + .quote-attr {
  margin: -1.25rem 0 1.75rem;
  padding-left: 1.1rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.quote-attr a { color: inherit; }

.colophon {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 2rem 1rem 3rem;
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .step, .anno, .skip-link { transition: none; }
  .brand-logo img,
  .brand-logo::after { animation: none; }
}
