/**
 * LunarCrush Reports — scrollytelling layer on top of Storm tokens.
 * Brand-matched to lunarcrush.com (apps/home/src/global.css).
 *
 * Do not edit this file inside a report folder. Edit only in _kit/.
 * If a report needs a one-off style, write it inline and flag it.
 */

@import url("./tokens.css");

/* === The Pulse — sub-brand identity color =========================
 * Mint electric `#3DFFC4` is the distinctive accent of every Pulse
 * report. Communicates "live signal" / pulse waveform without the
 * red/green trading-direction connotations. Used for kickers, active
 * panel glow, the scroll hint, the progress bar, the lead-bar value,
 * and chip outlines. Cyan `#6EC6F8` stays as the link color.
 * ================================================================== */
:root {
  --pulse-mint: #3DFFC4;
  --pulse-mint-soft: rgba(61, 255, 196, 0.55);
  --pulse-mint-glow: rgba(61, 255, 196, 0.45);
  --pulse-mint-bg: rgba(61, 255, 196, 0.08);
  --pulse-mint-border: rgba(61, 255, 196, 0.32);
}

/* === Self-hosted fonts (mirror of monorepo) ======================== */
@font-face {
  font-family: "Butler";
  src: url("./assets/fonts/Butler-Free-Lgt.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("./assets/fonts/PlusJakartaSans-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* === Reset ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: #0F1A2A;
  color: #ffffff;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

a {
  color: #6EC6F8;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: #9DD9FB; }

/* === Sticky header ================================================ */
.report-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: linear-gradient(180deg, rgba(15, 26, 42, 0.85) 0%, rgba(15, 26, 42, 0) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.report-header .brand {
  display: flex;
  align-items: center;
  gap: 16px;
  line-height: 1;
}

/* The Pulse logo already contains the "LunarCrush · THE PULSE" wordmark
   so no adjacent text label is needed. */
.report-header .brand img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

.report-header .brand span {
  display: inline-flex;
  align-items: center;
  height: 44px;
  line-height: 1;
  padding-top: 1px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
}

.report-header .meta {
  display: flex;
  gap: 24px;
  align-items: center;
  height: 44px;
  line-height: 1;
}

@media (max-width: 720px) {
  .report-header { padding: 14px 18px; }
  .report-header .meta { display: none; }
}

/* === Progress bar (top) =========================================== */
.report-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #6E3CF5 0%, #6EC6F8 50%, var(--pulse-mint) 100%);
  z-index: 101;
  transition: width 0.1s linear;
}

/* === Scene =======================================================
 * Each scene is a viewport-tall block with a single idea inside.
 * Activated via .in class added by IntersectionObserver.
 * ================================================================== */
/**
 * .scene is FULL-VIEWPORT WIDTH so atmosphere gradients reach the
 * edges. Inner content is constrained by .scene-inner (which any
 * direct child of .scene becomes by default).
 */
.scene {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 14vh 8vw 10vh;
  position: relative;
  width: 100%;
}

/* Inner content max-width — applied automatically to direct children. */
.scene > .stagger,
.scene > .center,
.scene > .col,
.scene > .bars,
.scene > .stat-grid,
.scene > .topic-grid,
.scene > .bullet-list,
.scene > details,
.scene > div:not(.h-pin) {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

/* Narrower body content (paragraphs, lists) inside .stagger */
.scene .stagger {
  max-width: 1280px;
}

@media (max-width: 720px) {
  .scene { padding: 12vh 6vw 8vh; min-height: 90vh; }
}

/* Scene number lives bottom-right by default, mono and dim. Inside
   horizontal scenes it moves to bottom-LEFT so it does not collide
   with the "scroll →" / "continue ↓" hint at bottom-right. */
.scene-num {
  position: absolute;
  bottom: 4vh;
  right: 8vw;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  z-index: 4;
}

.scene.horizontal > .scene-num {
  right: auto;
  left: 8vw;
}

@media (max-width: 720px) {
  .scene-num { right: 6vw; bottom: 3vh; }
  .scene.horizontal > .scene-num { right: auto; left: 6vw; }
}

/* === HERO scene — full bleed, dramatic, single composition ========= */
.scene.hero {
  min-height: 100vh;
  padding: 18vh 8vw 12vh;
  justify-content: space-between;
  max-width: none;
  margin: 0;
}

.scene.hero .hero-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.scene.hero .hero-mid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 6vh 0;
}

.scene.hero .hero-bottom {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.scene.hero .hero-headline {
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(44px, 6.5vw, 110px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  color: #ffffff;
  max-width: 18ch;
}

/* Atmosphere: stronger glow on hero, with a touch of Pulse mint. */
.scene.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(110, 198, 248, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 85% 70%, rgba(61, 255, 196, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 15% 85%, rgba(110, 60, 245, 0.10) 0%, transparent 65%);
  pointer-events: none;
  z-index: -1;
  opacity: 1;
}

/* === HORIZONTAL PAN scenes =========================================
 * A .scene.horizontal is a tall section. Inside it, .h-pin is sticky
 * and pinned to the viewport while the user scrolls. .h-track moves
 * horizontally based on scroll progress.
 *
 * The intro is the FIRST PANEL inside the track (`.h-panel.intro`),
 * not a separate fixed sidebar. Everything pans together — no overlap.
 *
 * Drama: inactive panels scale down, dim, and lose glow. The active
 * (centered) panel is full-scale, fully opaque, with a purple glow
 * and a brighter top accent bar. A vignette at the pin edges focuses
 * attention on the center.
 *
 * Layout:
 *   <section class="scene horizontal" data-num="6" style="--pan-height: 5;">
 *     <div class="h-pin">
 *       <div class="h-track">
 *         <div class="h-panel intro">…title slide…</div>
 *         <div class="h-panel">…</div>
 *         <div class="h-panel">…</div>
 *       </div>
 *     </div>
 *   </section>
 * ================================================================== */
.scene.horizontal {
  display: block;
  padding: 0;
  min-height: auto;
  max-width: none;
  margin: 0;
  width: 100%;
  /* Panel sizing — kept as vars so JS centering math works cleanly. */
  --panel-width: clamp(280px, 32vw, 460px);
  --intro-width: clamp(420px, 40vw, 580px);
  /* Section height = pan-height * 100vh. Set per-section in HTML. */
  height: calc(var(--pan-height, 4) * 100vh);
}

.scene.horizontal .h-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(110, 60, 245, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 90% 70% at 80% 30%, rgba(110, 198, 248, 0.06) 0%, transparent 60%);
}

/* Vignette at the pin edges to focus on the center panel. */
.scene.horizontal .h-pin::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 26, 42, 0.95) 0%, transparent 12%, transparent 88%, rgba(15, 26, 42, 0.95) 100%);
  pointer-events: none;
  z-index: 5;
}

.scene.horizontal .h-track {
  display: flex;
  align-items: center;
  height: 100%;
  gap: clamp(40px, 4vw, 80px);
  /* Padding-left lets the intro panel sit centered at scroll progress 0. */
  padding-left: calc((100vw - var(--intro-width)) / 2);
  /* Padding-right lets the last panel sit centered at scroll progress 1. */
  padding-right: calc((100vw - var(--panel-width)) / 2);
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* === H-PANEL (default data card) ================================== */
.scene.horizontal .h-panel {
  flex: 0 0 auto;
  width: var(--panel-width);
  height: 72vh;
  max-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 36px;
  background: linear-gradient(160deg, rgba(110, 198, 248, 0.05) 0%, rgba(110, 60, 245, 0.03) 100%);
  border: 1px solid rgba(110, 198, 248, 0.14);
  border-radius: 22px;
  position: relative;
  overflow: hidden;

  /* Drama defaults: inactive panels are dimmed and slightly smaller. */
  transform: scale(0.88);
  opacity: 0.4;
  filter: blur(0.4px);
  transition:
    transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 0.5s,
    box-shadow 0.5s;
}

/* Active panel (the one closest to viewport center, set by JS). */
.scene.horizontal .h-panel.in-view {
  transform: scale(1);
  opacity: 1;
  filter: blur(0);
  border-color: var(--pulse-mint-border);
  box-shadow:
    0 40px 80px -30px rgba(110, 60, 245, 0.4),
    0 0 0 1px var(--pulse-mint-border),
    0 0 60px var(--pulse-mint-glow),
    inset 0 0 60px rgba(61, 255, 196, 0.04);
}

/* Top accent bar — visible only on active panel. Mint = Pulse signal. */
.scene.horizontal .h-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #6E3CF5 0%, var(--pulse-mint) 100%);
  opacity: 0;
  transition: opacity 0.5s;
}
.scene.horizontal .h-panel.in-view::before { opacity: 1; }

/* === H-PANEL.intro — first panel, title slide ===================== */
.scene.horizontal .h-panel.intro {
  width: var(--intro-width);
  height: 72vh;
  max-height: 680px;
  background: transparent;
  border: none;
  padding: 0 24px;
  /* Intro never dims — it's the section title, always at full presence. */
  transform: scale(1);
  opacity: 1;
  filter: blur(0);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.scene.horizontal .h-panel.intro::before { display: none; }

.scene.horizontal .h-panel.intro .kicker {
  color: #6EC6F8;
  margin: 0;
}

.scene.horizontal .h-panel.intro .subhead {
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(34px, 4.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 14ch;
  color: #ffffff;
}

.scene.horizontal .h-panel.intro .body {
  font-size: clamp(15px, 1.4vw, 18px);
  color: rgba(255, 255, 255, 0.7);
  max-width: 32ch;
  margin: 0;
}

.scene.horizontal .h-panel .panel-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.4);
}

.scene.horizontal .h-panel .panel-name {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pulse-mint);
  margin-top: 8px;
}

.scene.horizontal .h-panel .panel-headline {
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.05;
  margin: 18px 0 0;
  color: #ffffff;
}

.scene.horizontal .h-panel .panel-stat {
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 24px 0 0;
  color: #ffffff;
}

.scene.horizontal .h-panel .panel-stat.cyan { color: var(--pulse-mint); } /* Pulse-branded */
.scene.horizontal .h-panel .panel-stat.purple { color: #936DF8; }
.scene.horizontal .h-panel .panel-stat.up { color: #27ae60; }
.scene.horizontal .h-panel .panel-stat.down { color: #eb5757; }

.scene.horizontal .h-panel .panel-meta {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 12px;
}

.scene.horizontal .h-panel .panel-quote {
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.4;
  color: #ffffff;
  padding: 14px 16px;
  border-left: 2px solid var(--pulse-mint);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 8px 8px 0;
  margin-top: 16px;
}

@media (max-width: 720px) {
  .scene.horizontal .h-intro { display: none; }
  .scene.horizontal .h-track { padding: 6vh 6vw; gap: 4vw; }
  .scene.horizontal .h-panel { width: 78vw; height: 68vh; padding: 28px 24px; }
}

/* Direction hint — pulses near the bottom-right of horizontal scenes.
   Swaps to a downward arrow once the pan is complete (pan-end class
   added by JS), telling the user the next interaction is a vertical
   scroll. */
.scene.horizontal .h-pin::after {
  content: "scroll →";
  position: absolute;
  bottom: 5vh;
  right: 8vw;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pulse-mint-soft);
  animation: hint-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 6;
}

.scene.horizontal.pan-end .h-pin::after {
  content: "continue ↓";
  color: var(--pulse-mint);
  animation: hint-pulse-down 1.8s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.3; transform: translateX(0); }
  50%      { opacity: 0.8; transform: translateX(6px); }
}

@keyframes hint-pulse-down {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(6px); }
}

/* === DIRECTION transition between scenes ==========================
 * .scene.from-right and .scene.from-left make the next scene slide
 * in from a direction. Driven by .in class.
 * ================================================================== */
.scene.from-right > * {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.scene.from-right.in > * { opacity: 1; transform: none; }

.scene.from-left > * {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.scene.from-left.in > * { opacity: 1; transform: none; }

/* === Reveal animation primitives =================================
 * Add .reveal to any element to fade-in on scroll. Add .stagger to
 * a parent to cascade its children.
 * ================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in { opacity: 1; transform: none; }

.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.stagger.in > * { opacity: 1; transform: none; }

.stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.in > *:nth-child(2) { transition-delay: 0.15s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.25s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.35s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.45s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.55s; }
.stagger.in > *:nth-child(7) { transition-delay: 0.65s; }
.stagger.in > *:nth-child(8) { transition-delay: 0.75s; }

/* === Typography ==================================================== */
.kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pulse-mint);
  margin-bottom: 24px;
}

.headline {
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  color: #ffffff;
  max-width: 22ch;
}

.headline.center { margin-inline: auto; text-align: center; max-width: 24ch; }

.subhead {
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  color: #ffffff;
  max-width: 24ch;
}

.lede {
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 24px;
  max-width: 60ch;
  font-weight: 400;
}

.body {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 16px;
  max-width: 62ch;
}

.body + .body { margin-top: 16px; }

.body strong { color: #ffffff; font-weight: 600; }

/* === Big stat (hero number with count-up) ========================== */
.stat-big {
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(80px, 16vw, 220px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin-bottom: 16px;
  display: block;
}

.stat-big.cyan   { color: var(--pulse-mint); } /* Pulse-branded stat */
.stat-big.purple { color: #936DF8; }
.stat-big.green  { color: #27ae60; }
.stat-big.red    { color: #eb5757; }
.stat-big.orange { color: #f2994a; }

.stat-big-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  display: block;
  margin-top: 8px;
}

/* === Stat grid (smaller stats) ===================================== */
.stat-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  width: 100%;
}

@media (min-width: 640px) { .stat-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 810px) { .stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 810px) { .stat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  padding: 28px;
  background: rgba(110, 198, 248, 0.04);
  border: 1px solid rgba(110, 198, 248, 0.14);
  border-radius: 14px;
  transition: border-color 0.3s, background 0.3s;
}

.stat-card:hover {
  border-color: rgba(110, 198, 248, 0.32);
  background: rgba(110, 198, 248, 0.07);
}

.stat-card .stat-value {
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: block;
  margin-bottom: 10px;
}

.stat-card .stat-value.up    { color: #27ae60; }
.stat-card .stat-value.down  { color: #eb5757; }
.stat-card .stat-value.cyan  { color: var(--pulse-mint); } /* Pulse-branded */
.stat-card .stat-value.purple { color: #936DF8; }

.stat-card .stat-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  display: block;
}

.stat-card .stat-note {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
}

/* === Bar chart (animated fill, sequential reveal) =================
 * Bars cascade in one by one when the parent .bars enters view (.in).
 * Add .lead to the most important bar to make it visually dominant
 * (purple glow, brighter label, larger value).
 * ================================================================== */
.bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 880px;
}

.bar {
  display: grid;
  grid-template-columns: 200px 1fr 90px;
  gap: 18px;
  align-items: center;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
  /* Whole row fades in, cascaded by index. */
  opacity: 0;
  transform: translateX(-12px);
  transition:
    opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.in .bar { opacity: 1; transform: none; }

/* Per-row stagger delay (up to 10 bars). */
.in .bar:nth-child(1) { transition-delay: 0.15s; }
.in .bar:nth-child(2) { transition-delay: 0.30s; }
.in .bar:nth-child(3) { transition-delay: 0.45s; }
.in .bar:nth-child(4) { transition-delay: 0.60s; }
.in .bar:nth-child(5) { transition-delay: 0.75s; }
.in .bar:nth-child(6) { transition-delay: 0.90s; }
.in .bar:nth-child(7) { transition-delay: 1.05s; }
.in .bar:nth-child(8) { transition-delay: 1.20s; }
.in .bar:nth-child(9) { transition-delay: 1.35s; }
.in .bar:nth-child(10) { transition-delay: 1.50s; }

@media (max-width: 720px) {
  .bar { grid-template-columns: 130px 1fr 70px; gap: 10px; font-size: 13px; }
}

.bar-track {
  height: 22px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6E3CF5, #6EC6F8);
  border-radius: 6px;
  transition: width 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Stagger the fill animation in addition to the row fade. */
.in .bar:nth-child(1) .bar-fill { transition-delay: 0.30s; }
.in .bar:nth-child(2) .bar-fill { transition-delay: 0.45s; }
.in .bar:nth-child(3) .bar-fill { transition-delay: 0.60s; }
.in .bar:nth-child(4) .bar-fill { transition-delay: 0.75s; }
.in .bar:nth-child(5) .bar-fill { transition-delay: 0.90s; }
.in .bar:nth-child(6) .bar-fill { transition-delay: 1.05s; }
.in .bar:nth-child(7) .bar-fill { transition-delay: 1.20s; }
.in .bar:nth-child(8) .bar-fill { transition-delay: 1.35s; }
.in .bar:nth-child(9) .bar-fill { transition-delay: 1.50s; }
.in .bar:nth-child(10) .bar-fill { transition-delay: 1.65s; }

.in .bar-fill { width: var(--w, 0%); }

.bar.alt .bar-fill  { background: linear-gradient(90deg, #2d9cdb, #6EC6F8); }
.bar.warn .bar-fill { background: linear-gradient(90deg, #f2994a, #ffd54f); }
.bar.bad .bar-fill  { background: linear-gradient(90deg, #eb5757, #f2994a); }

.bar-label {
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-value {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  text-align: right;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* === LEAD BAR — the most important row, visually dominant ========= */
.bar.lead {
  font-size: 16px;
  position: relative;
}

.bar.lead .bar-track {
  height: 28px;
  background: rgba(110, 60, 245, 0.1);
  box-shadow: inset 0 0 0 1px var(--pulse-mint-border);
}

.bar.lead .bar-fill {
  background: linear-gradient(90deg, #6E3CF5 0%, #936DF8 45%, var(--pulse-mint) 100%);
  box-shadow:
    0 0 24px rgba(110, 60, 245, 0.5),
    0 0 48px var(--pulse-mint-glow);
}

.bar.lead .bar-label {
  color: #ffffff;
  font-weight: 600;
}

.bar.lead .bar-value {
  color: var(--pulse-mint);
  font-weight: 600;
  font-size: 15px;
}

/* === Number rendering: tabular-nums everywhere ==================== */
.stat-big,
.stat-card .stat-value,
.scene.horizontal .h-panel .panel-stat,
.scene.horizontal .h-panel .panel-num,
.bar-value {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum", "lnum";
}

/* Loosen letter-spacing on Butler stat numbers to prevent glyph overlap. */
.stat-big                            { letter-spacing: -0.015em; }
.stat-card .stat-value               { letter-spacing: 0; }
.scene.horizontal .h-panel .panel-stat { letter-spacing: -0.005em; }

/* === Topic / Card layout (for 2x2 or 4-up grids) =================== */
.topic-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  width: 100%;
}

@media (min-width: 720px)  { .topic-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .topic-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .topic-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1080px) { .topic-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.topic-card {
  padding: 28px 24px;
  background: linear-gradient(160deg, rgba(110, 198, 248, 0.06) 0%, rgba(110, 198, 248, 0.02) 100%);
  border: 1px solid rgba(110, 198, 248, 0.14);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topic-card .topic-name {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pulse-mint);
}

.topic-card .topic-stat {
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  color: #ffffff;
}

.topic-card .topic-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.45;
}

.topic-card .topic-frame {
  margin-top: 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--pulse-mint);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
  border-radius: 0 6px 6px 0;
}

/* === Pull quote ==================================================== */
.quote {
  margin: 32px 0;
  padding: 32px 36px;
  border-left: 3px solid #6E3CF5;
  background: rgba(110, 60, 245, 0.07);
  border-radius: 0 12px 12px 0;
  font-family: "Butler", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.3;
  color: #ffffff;
  max-width: 720px;
}

.quote cite {
  display: block;
  margin-top: 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* === Verbatim post (for "top posts" scenes) ======================== */
.post {
  padding: 22px 26px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  display: grid;
  gap: 12px;
}

.post-handle {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--pulse-mint);
  letter-spacing: 0.04em;
}

.post-text {
  font-size: 17px;
  line-height: 1.45;
  color: #ffffff;
}

.post-meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* === Chip / tag ==================================================== */
.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--pulse-mint-bg);
  color: var(--pulse-mint);
  border: 1px solid var(--pulse-mint-border);
  font-weight: 500;
}

.chip.warn { background: rgba(242, 153, 74, 0.1); color: #f2994a; border-color: rgba(242, 153, 74, 0.35); }
.chip.bad  { background: rgba(235, 87, 87, 0.1); color: #eb5757; border-color: rgba(235, 87, 87, 0.35); }
.chip.good { background: rgba(39, 174, 96, 0.1); color: #27ae60; border-color: rgba(39, 174, 96, 0.35); }
.chip.purple { background: rgba(110, 60, 245, 0.1); color: #936DF8; border-color: rgba(110, 60, 245, 0.35); }

/* === List (watch list / bullets) =================================== */
.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0;
  margin: 0;
}

.bullet-list li {
  padding-left: 28px;
  position: relative;
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 14px;
  height: 1px;
  background: var(--pulse-mint);
}

.bullet-list li strong { color: #ffffff; }

/* === Methodology (collapsed at the bottom) ========================= */
details.methodology {
  width: 100%;
  max-width: 720px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

details.methodology summary {
  cursor: pointer;
  padding: 18px 22px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  list-style: none;
  display: flex;
  justify-content: space-between;
}

details.methodology summary::-webkit-details-marker { display: none; }
details.methodology summary::after { content: "+"; color: var(--pulse-mint); font-size: 18px; }
details.methodology[open] summary::after { content: "−"; }

details.methodology > *:not(summary) {
  padding: 0 22px 22px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

/* === Scene-specific atmospheres (subtle radial backgrounds) ======= */
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(110, 198, 248, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(110, 60, 245, 0.05) 0%, transparent 55%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.scene.in::before { opacity: 1; }

/* === Footer scene ================================================== */
.scene.footer {
  min-height: 50vh;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 60px;
  padding-top: 8vh;
}

.scene.footer .brand-line {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 36px;
}

.scene.footer .brand-mark {
  display: flex;
  align-items: center;
  gap: 18px;
  line-height: 1;
}

.scene.footer .brand-mark img {
  height: 56px;
  width: auto;
  display: block;
}

.scene.footer .brand-mark span {
  display: inline-flex;
  align-items: center;
  height: 56px;
  letter-spacing: 0.14em;
}

/* === Utilities ===================================================== */
.center { text-align: center; }
.muted  { color: rgba(255, 255, 255, 0.6); }
.eyebrow { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.col { display: flex; flex-direction: column; gap: 18px; }

.spacer-sm { height: 24px; }
.spacer    { height: 48px; }
.spacer-lg { height: 80px; }
