/* ============================================================
   GENRE YIELD — cinematic dark theater design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Playfair+Display:ital@1&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;

  --page-plane:     #0b0a08;
  --surface-1:      #15120f;
  --surface-2:      #1c1815;
  --text-primary:   #f4efe4;
  --text-secondary: #b8b0a3;
  --text-muted:     #7a7268;
  --gridline:       #2c2620;
  --baseline:       #3a332b;
  --border:         rgba(255,255,255,0.08);
  --border-strong:  rgba(255,255,255,0.16);

  --gold:    #e8b93e;
  --gold-2:  #c99524;
  --crimson: #e0483f;
  --crimson-2: #a8362f;

  --series-1: #3987e5; /* blue */
  --series-2: #d95926; /* orange */
  --series-3: #199e70; /* teal */
  --series-4: #c98500; /* mustard gold */
  --series-5: #d55181; /* rose */
  --series-6: #2fae2f; /* green */
  --series-7: #9085e9; /* violet */
  --series-8: #e66767; /* red */

  --radius: 14px;
  --radius-sm: 8px;
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;

  --shadow-card: 0 8px 30px rgba(0,0,0,0.45);
  --glow-gold: 0 0 0 1px rgba(232,185,62,0.25), 0 0 32px rgba(232,185,62,0.18);
}

/* ===== Reset ===== */
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--page-plane);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.05; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--gold); color: #1a1510; }

/* Thin gold scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--page-plane); }
::-webkit-scrollbar-thumb { background: var(--gold-2); border-radius: 10px; border: 2px solid var(--page-plane); }
* { scrollbar-width: thin; scrollbar-color: var(--gold-2) var(--page-plane); }

/* ===== Film grain overlay ===== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ===== Drifting ambient gradient mesh (global background, both pages) ===== */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -5;
  overflow: hidden;
  pointer-events: none;
}
.mesh-blob {
  position: absolute;
  width: min(38vw, 560px);
  height: min(38vw, 560px);
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.045;
  will-change: transform;
}
.mesh-blob-1 { background: var(--gold); top: -12%; left: -10%; animation: drift1 36s ease-in-out infinite; }
.mesh-blob-2 { background: var(--crimson); top: 35%; right: -18%; animation: drift2 44s ease-in-out infinite; }
.mesh-blob-3 { background: var(--series-3); bottom: -18%; left: 15%; animation: drift3 40s ease-in-out infinite; }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, 6vh) scale(1.15); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-9vw, -5vh) scale(0.9); } }
@keyframes drift3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, -8vh) scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  .mesh-blob { animation: none; }
}

/* ===== Payoff glow-pulse (fires once when a big stat finishes counting up) ===== */
.pulse-anchor { position: relative; }
.flash-ring {
  position: absolute;
  inset: -50px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.flash-ring.firing { animation: flash-ring-anim 0.9s ease-out; }
@keyframes flash-ring-anim {
  0% { opacity: 0; transform: scale(0.6); }
  25% { opacity: 0.4; }
  100% { opacity: 0; transform: scale(1.7); }
}
.pulse-text.firing { animation: pulse-brightness 0.9s ease-out; }
@keyframes pulse-brightness {
  0% { filter: brightness(1); }
  25% { filter: brightness(1.4); }
  100% { filter: brightness(1); }
}
@media (prefers-reduced-motion: reduce) {
  .flash-ring.firing, .pulse-text.firing { animation: none; }
}

/* ===== Scroll progress bar ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  z-index: 1000;
  box-shadow: 0 0 12px rgba(232,185,62,0.6);
}

/* ===== Nav ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 2rem;
  background: rgba(11,10,8,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.site-nav .brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-nav .brand .dot { color: var(--gold); }
.site-nav .links { display: flex; gap: 0.5rem; }
.site-nav .links a {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}
.site-nav .links a:hover { color: var(--text-primary); text-decoration: none; border-color: var(--border-strong); }
.site-nav .links a.active { color: #17140f; background: var(--gold); }
.sound-toggle {
  width: 34px;
  height: 34px;
  margin-left: 0.4rem;
  font-size: 1rem;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.sound-toggle:hover { border-color: var(--gold); }
.sound-toggle.active { border-color: var(--gold); box-shadow: var(--glow-gold); }

/* ===== Layout ===== */
.page { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem 6rem; }
.page-wide { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem 6rem; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 1.5rem 3rem;
  overflow: hidden;
  isolation: isolate;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  opacity: 0.4;
  filter: blur(1px) saturate(70%);
}
.hero-backdrop img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 2/3; }
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 30% 30%, rgba(232,185,62,0.10), transparent 60%),
    linear-gradient(180deg, rgba(11,10,8,0.55) 0%, rgba(11,10,8,0.88) 55%, var(--page-plane) 100%);
}
.hero-spotlight {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,40%), rgba(232,185,62,0.10), transparent 60%);
}
.hero .kicker {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.05rem;
  margin-bottom: 1rem;
  display: block;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: clamp(3rem, 9vw, 7rem);
  color: var(--text-primary);
  max-width: 16ch;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .byline {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-weight: 600;
  margin: 1.25rem 0 0;
  letter-spacing: 0.02em;
}
.hero .summary {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-top: 1rem;
}
.hero-stat {
  margin-top: 2.5rem;
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.hero-stat .value {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 40px rgba(232,185,62,0.35);
}
.hero-stat .desc { color: var(--text-secondary); max-width: 320px; font-size: 0.95rem; }
.scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0);} 50% { transform: translate(-50%,8px);} }

/* ===== Poster marquee ===== */
.marquee-section { padding: 2.5rem 0 3.5rem; border-bottom: 1px solid var(--gridline); }
.marquee-label {
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.marquee-track { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); }
.marquee-row { display: flex; gap: 1rem; padding: 0 0.5rem; animation: scrollX 70s linear infinite; will-change: transform; }
.marquee-row.reverse { animation-direction: reverse; animation-duration: 85s; }
.marquee-track:hover .marquee-row { animation-play-state: paused; }
@keyframes scrollX { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.poster-card {
  flex: 0 0 auto;
  width: 110px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.poster-card:hover { transform: translateY(-6px) scale(1.04); box-shadow: var(--glow-gold); }
.poster-card img { aspect-ratio: 2/3; object-fit: cover; }

/* ===== Headline stats ===== */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
  margin: 3rem 0;
}
.stat-tile {
  position: relative;
  background: linear-gradient(155deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
}
.stat-tile:hover { border-color: var(--border-strong); box-shadow: var(--glow-gold); }
.stat-tile .value {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.stat-tile .label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.4rem;
}

/* ===== Report sections: two-column, alternating sides ===== */
.finding {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(260px, 400px) 1fr;
  gap: 2.5rem;
  align-items: center;
  margin: 7rem 0;
}
.finding-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 640px;
  height: 640px;
  max-width: 90vw;
  background: radial-gradient(circle, var(--glow-color, var(--gold)) 0%, transparent 70%);
  opacity: 0.12;
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}
.finding.alt { direction: rtl; }
.finding.alt > * { direction: ltr; }
.finding-text { position: relative; }
.finding-text .ordinal {
  position: absolute;
  top: -2.6rem;
  left: -0.5rem;
  font-family: var(--font-display);
  font-size: 6rem;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  z-index: -1;
  user-select: none;
  line-height: 1;
}
.finding h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.85rem;
  color: var(--text-primary);
  margin: 0 0 1rem;
}
.finding p { color: var(--text-secondary); font-size: 1.02rem; }
.chart-card {
  position: relative;
  isolation: isolate;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  /* --glow-color is set on the ancestor .finding (report) or the specific
     .chart-card--* modifier (dashboard bento grid), so each card's ambient
     glow always matches that finding's/chart's own accent color. */
  box-shadow: var(--shadow-card), 0 0 90px -35px var(--glow-color, var(--gold));
  transition: border-color 0.25s ease;
  overflow: hidden;
}
@media (max-width: 900px) {
  .finding, .finding.alt { grid-template-columns: 1fr; direction: ltr; }
  .finding.alt > * { direction: ltr; }
  .finding-text .ordinal { top: -2.2rem; font-size: 4.5rem; }
}
.chart-card:hover { border-color: var(--border-strong); }
.chart-card .echart { width: 100%; height: 360px; }
.chart-ordinal {
  position: absolute;
  top: 0.6rem;
  right: 1rem;
  font-family: var(--font-display);
  font-size: 2.75rem;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  pointer-events: none;
  z-index: -1;
  line-height: 1;
}
.chart-caption {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  font-family: var(--font-serif);
  font-style: italic;
}

/* reveal-on-scroll base state (JS adds .is-visible) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Closing / methodology ===== */
.methodology {
  margin-top: 5rem;
  padding: 2rem;
  background: var(--surface-1);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
}
.methodology h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-serif);
}
.methodology dt { font-weight: 700; margin-top: 1rem; color: var(--gold); font-family: var(--font-body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.methodology dd { margin: 0.3rem 0 0; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
.methodology code { color: var(--text-primary); background: rgba(255,255,255,0.06); padding: 0.1em 0.4em; border-radius: 4px; }

/* ===== Dashboard ===== */
.hero.compact {
  min-height: 46vh;
  padding: 7rem 1.5rem 2.5rem;
}
.hero.compact h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); }
.hero.compact .summary { margin-top: 0.85rem; }

.dashboard-header p { color: var(--text-secondary); margin-bottom: 1.75rem; }

.mini-marquee { padding: 0 0 2.5rem; border-bottom: 1px solid var(--gridline); margin-bottom: 2.5rem; }
.mini-marquee .marquee-row { animation-duration: 60s; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}
.filter-group { display: flex; flex-direction: column; gap: 0.5rem; }
.filter-group .filter-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted);
}
.pill-group { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.pill:hover { border-color: var(--gold); color: var(--text-primary); }
.pill.active { background: var(--gold); border-color: var(--gold); color: #1a1510; }

.select-field {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-primary);
  cursor: pointer;
}
.select-field:hover { border-color: var(--gold); }

.btn-reset {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--crimson);
  background: transparent;
  color: var(--crimson);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-reset:hover { background: var(--crimson); color: #1a1510; box-shadow: 0 0 20px rgba(224,72,63,0.35); }

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.chart-grid .chart-card .echart { height: 320px; }

.table-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin-top: 1.5rem;
}
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data-table th, table.data-table td {
  text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--gridline);
  font-variant-numeric: tabular-nums;
}
table.data-table th {
  color: var(--gold); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
}
table.data-table tbody tr { transition: background 0.15s ease; }
table.data-table tbody tr:hover { background: rgba(232,185,62,0.06); }

.loading-note { color: var(--text-muted); font-size: 0.9rem; }

/* ===== Ambient genre accent (subtle, resets to gold) ===== */
:root { --accent-live: var(--gold); }
.stat-tile { position: relative; }
.stat-tile::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent-live);
  transition: background-color 0.5s ease;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tile-icon { display: block; font-size: 1.3rem; margin-bottom: 0.5rem; opacity: 0.85; }

/* ===== Segmented control (Bars/Wheel, Leaderboard/Table) ===== */
.segmented {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.segmented .seg {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.segmented .seg.active { background: var(--gold); color: #1a1510; }
.segmented .seg:not(.active):hover { color: var(--text-primary); }

/* ===== Genre picker (flip cards) ===== */
.genre-picker-section { margin: 2.5rem 0 2rem; }
.section-kicker {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); margin-bottom: 1rem;
}
.genre-picker {
  display: grid;
  grid-template-columns: repeat(10, 84px);
  justify-content: center;
  gap: 1.1rem 0.85rem;
}
@media (max-width: 1024px) {
  .genre-picker { grid-template-columns: repeat(5, 84px); }
}
@media (max-width: 460px) {
  .genre-picker { grid-template-columns: repeat(4, 74px); }
  .gcard, .gcard-label { width: 74px; }
}
.gcard {
  display: flex;
  flex-direction: column;
  width: 84px;
  perspective: 700px;
  cursor: pointer;
}
.gcard-inner {
  position: relative;
  width: 100%;
  height: 118px;
  flex: none;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}
.gcard:hover .gcard-inner, .gcard.active .gcard-inner { transform: rotateY(180deg); }
.gcard-front, .gcard-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color 0.3s ease;
}
.gcard.active .gcard-front, .gcard.active .gcard-back { border-color: var(--gold); box-shadow: var(--glow-gold); }
.gcard-front img { width: 100%; height: 100%; object-fit: cover; }
.gcard-front.all-genres {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); font-size: 1.8rem;
}
.gcard-back {
  transform: rotateY(180deg);
  background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0.4rem;
  gap: 0.2rem;
}
.gcard-back .g-name { font-family: var(--font-display); font-size: 0.9rem; color: var(--text-primary); letter-spacing: 0.02em; }
.gcard-back .g-stat { font-size: 0.7rem; color: var(--gold); font-weight: 700; }
.gcard-label {
  text-align: center; font-size: 0.68rem; color: var(--text-muted); margin-top: 0.4rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 84px;
}

/* ===== Search spotlight ===== */
.search-spotlight {
  position: relative;
  max-width: 560px;
  margin: 0 0 2.5rem;
}
.search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  font-size: 1rem; opacity: 0.7; pointer-events: none;
}
.search-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text-primary);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.search-input:focus { outline: none; border-color: var(--gold); box-shadow: var(--glow-gold); }
.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0; right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  z-index: 20;
  max-height: 320px;
  overflow-y: auto;
}
.search-result-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid var(--gridline);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(232,185,62,0.08); }
.search-result-item img { width: 30px; height: 44px; object-fit: cover; border-radius: 3px; flex: none; background: var(--surface-1); }
.search-result-item .sr-title { color: var(--text-primary); font-weight: 600; font-size: 0.88rem; }
.search-result-item .sr-meta { color: var(--text-muted); font-size: 0.76rem; }
.search-callout {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.7rem 1rem;
  background: var(--surface-2);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.search-callout strong { color: var(--gold); }

/* ===== Bento chart grid ===== */
.chart-grid.bento {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-areas:
    "hero side1"
    "hero side2"
    "wide wide";
  gap: 1.5rem;
}
.chart-card--hero { grid-area: hero; display: flex; flex-direction: column; box-shadow: var(--shadow-card), 0 0 90px -35px var(--series-1); }
.chart-card--side1 { grid-area: side1; box-shadow: var(--shadow-card), 0 0 90px -35px var(--series-3); }
.chart-card--side2 { grid-area: side2; box-shadow: var(--shadow-card), 0 0 90px -35px var(--series-5); }
.chart-card--wide { grid-area: wide; box-shadow: var(--shadow-card), 0 0 90px -35px var(--gold); }
/* The hero card is stretched tall by the grid (it spans both side-card
   rows) — let its chart fill that height instead of leaving dead space
   below a fixed-height chart. */
.chart-card--hero .echart { flex: 1 1 auto; min-height: 300px; }
.chart-card--hero .chart-caption { flex: none; }
.chart-card--side1 .echart, .chart-card--side2 .echart { height: 205px; }
.chart-card--wide .echart { height: 360px; }
@media (max-width: 900px) {
  .chart-grid.bento {
    grid-template-columns: 1fr;
    grid-template-areas: "hero" "side1" "side2" "wide";
  }
  .chart-card--hero .echart { flex: none; height: 360px; }
}

/* ===== Genre Face-Off ===== */
.faceoff-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-card), 0 0 90px -35px var(--crimson);
}
.faceoff-header h3 { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.5rem; margin-bottom: 0.25rem; }
.faceoff-header p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.faceoff-pickers { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.faceoff-vs { font-family: var(--font-display); color: var(--crimson); font-size: 1.3rem; }
.faceoff-posters { display: flex; justify-content: space-between; margin-bottom: 1.5rem; }
.faceoff-posters img { width: 90px; height: 130px; object-fit: cover; border-radius: var(--radius-sm); box-shadow: var(--shadow-card); border: 1px solid var(--border); }
.faceoff-row { margin-bottom: 1.1rem; }
.faceoff-row .fo-label { text-align: center; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.35rem; }
.faceoff-bars { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem; }
.faceoff-track { height: 10px; background: var(--gridline); border-radius: 6px; overflow: hidden; position: relative; }
.faceoff-track.left { direction: rtl; }
.faceoff-fill { height: 100%; border-radius: 6px; transition: width 0.6s cubic-bezier(0.2,0.8,0.2,1); }
.faceoff-fill.a { background: var(--series-1); }
.faceoff-fill.b { background: var(--series-8); }
.faceoff-value { font-family: var(--font-display); font-size: 1rem; min-width: 64px; text-align: center; color: var(--text-primary); }

/* ===== Leaderboard ===== */
.leaderboard-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-card), 0 0 90px -35px var(--gold);
}
.leaderboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
.leaderboard-header h3 { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.3rem; }
.lb-row {
  display: grid;
  grid-template-columns: 2.2rem 40px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--gridline);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-family: var(--font-display); font-size: 1.3rem; color: var(--text-muted); text-align: center; }
.lb-poster { width: 40px; height: 58px; border-radius: 4px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--border); }
.lb-avatar {
  width: 40px; height: 58px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.2rem; color: #1a1510; background: var(--gold);
}
.lb-info .lb-name { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.lb-info .lb-bar-track { height: 6px; background: var(--gridline); border-radius: 4px; margin-top: 0.4rem; overflow: hidden; }
.lb-info .lb-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); border-radius: 4px; transition: width 0.7s cubic-bezier(0.2,0.8,0.2,1); }
.lb-info .lb-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.35rem; }
.lb-value { font-family: var(--font-display); font-size: 1.15rem; color: var(--gold); text-align: right; white-space: nowrap; }

/* ===== Spinning film-reel motif (intermission + closing) ===== */
.reel { width: 130px; height: 130px; flex: none; }
.reel svg { width: 100%; height: 100%; animation: reel-spin 12s linear infinite; }
@keyframes reel-spin { to { transform: rotate(360deg); } }

/* ===== Intermission break (full-bleed, between report findings) ===== */
.intermission {
  position: relative;
  isolation: isolate;
  width: 100vw;
  margin: 7rem calc(50% - 50vw);
  min-height: 46vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-top: 1px solid var(--gridline);
  border-bottom: 1px solid var(--gridline);
}
.intermission-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  opacity: 0.28;
  filter: blur(2px) saturate(65%);
}
.intermission-backdrop img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 2/3; }
.intermission-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--page-plane) 0%, rgba(11,10,8,0.55) 35%, rgba(11,10,8,0.55) 65%, var(--page-plane) 100%);
}
.intermission-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 720px;
}
.intermission-content .kicker { display: block; margin-bottom: 0.75rem; }
.intermission-content h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  color: var(--text-primary);
  line-height: 1.1;
}
.intermission-content h2 em { font-style: normal; color: var(--gold); }
.intermission-content p { color: var(--text-secondary); margin-top: 0.75rem; font-size: 0.95rem; }

/* ===== Closing CTA (end of dashboard) ===== */
.closing-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding: 5rem 1.5rem 6rem;
}
.closing-cta h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text-primary);
}
.closing-cta p { color: var(--text-secondary); max-width: 480px; }
.closing-cta .btn-gold {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1510;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.closing-cta .btn-gold:hover { box-shadow: var(--glow-gold); transform: translateY(-2px); text-decoration: none; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .site-nav { padding: 0.85rem 1.1rem; }
  .hero { padding-top: 5rem; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .btn-reset { margin-left: 0; }
  .finding .ordinal { font-size: 4.5rem; }
  .faceoff-bars { grid-template-columns: 1fr; }
  .faceoff-track.left { direction: ltr; }
  .faceoff-posters img { width: 70px; height: 100px; }
  .lb-row { grid-template-columns: 1.6rem 34px 1fr auto; gap: 0.6rem; }
  .lb-poster, .lb-avatar { width: 34px; height: 48px; }
}
