@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #06060e;
  --bg-secondary: #0c0c1a;
  --bg-card: rgba(14, 14, 30, 0.7);
  --bg-glass: rgba(20, 20, 50, 0.4);
  --text-primary: #e8e8f0;
  --text-secondary: #9898b8;
  --text-muted: #5a5a80;
  --accent-cyan: #00e5ff;
  --accent-magenta: #e040fb;
  --accent-amber: #ffab40;
  --accent-red: #ff1744;
  --accent-green: #00e676;
  --gradient-main: linear-gradient(135deg, #00e5ff 0%, #e040fb 100%);
  --gradient-warm: linear-gradient(135deg, #ffab40 0%, #ff1744 100%);
  --glow-cyan: 0 0 30px rgba(0, 229, 255, 0.3);
  --glow-magenta: 0 0 30px rgba(224, 64, 251, 0.3);
  --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-heading: 'Space Grotesk', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) var(--bg-secondary);
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  overflow-x: hidden;
}

/* Progress Bar */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-main);
  z-index: 1000;
  transition: width 0.1s linear;
  box-shadow: var(--glow-cyan);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  background: rgba(6, 6, 14, 0.8);
  border-bottom: var(--border-subtle);
  transition: transform 0.3s;
}

nav.hidden {
  transform: translateY(-100%);
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 2rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 229, 255, 0.08) 0%, transparent 70%), radial-gradient(ellipse at 80% 20%, rgba(224, 64, 251, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 6s infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }

  50% {
    opacity: 0.8;
  }

  100% {
    opacity: 0;
    transform: translateY(-20vh) scale(1);
  }
}

.hero-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
}

/* Hero text dark bloom backdrop */
.hero>*:not(.section-bg):not(.hero-grid):not(.hero-particles):not(.scroll-indicator) {
  position: relative;
  z-index: 2;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 10%;
  right: 10%;
  bottom: 15%;
  background: radial-gradient(ellipse 100% 90% at center 55%,
      rgba(6, 6, 14, 0.85) 0%,
      rgba(6, 6, 14, 0.6) 45%,
      rgba(6, 6, 14, 0.25) 75%,
      transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  max-width: 900px;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s 0.6s forwards;
}

.hero h1 .gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s 0.9s forwards;
  font-weight: 300;
}

.hero-meta {
  display: flex;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 1s 1.2s forwards;
}

.scroll-indicator {
  position: absolute;
  bottom: 0.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

.scroll-indicator .arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
  transform: rotate(45deg);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }

  from {
    transform: translateY(30px);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(10px);
  }
}

/* Chapter Sections */
.chapter {
  min-height: 100vh;
  padding: 8rem 2rem;
  position: relative;
}

/* ═══ Section Background Images ═══ */
.section-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.section-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
    transform 8s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.35) saturate(1.3);
}

/* Subtle zoom on snap */
.snap-section.snapped-in .section-bg img {
  opacity: 1;
  transform: scale(1.0);
}

/* Vignette overlay for readability */
.section-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, var(--bg-primary) 85%),
    linear-gradient(to bottom, var(--bg-primary) 0%, transparent 15%, transparent 80%, var(--bg-primary) 100%);
  z-index: 1;
}

.chapter-inner,
.hero-date,
.hero h1,
.hero-subtitle,
.hero-meta,
.scroll-indicator {
  position: relative;
  z-index: 2;
}

/* ═══ Narration Indicator ═══ */
.narration-badge {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(14, 14, 30, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 30px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 100;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  backdrop-filter: blur(12px);
}

.narration-badge.active {
  opacity: 1;
  transform: translateY(0);
}

.narration-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

/* ═══ Audio Mute Button (Navbar) ═══ */
.audio-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 1.1rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
}

.audio-toggle:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.audio-toggle.muted {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.05);
}

.audio-toggle .label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.chapter-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ═══ Dark Bloom for Readability ═══ */
.chapter-inner::before {
  content: '';
  position: absolute;
  top: -3rem;
  left: -4rem;
  right: -4rem;
  bottom: -3rem;
  background: radial-gradient(ellipse 110% 100% at center,
      rgba(6, 6, 14, 0.92) 0%,
      rgba(6, 6, 14, 0.82) 40%,
      rgba(6, 6, 14, 0.55) 65%,
      rgba(6, 6, 14, 0.2) 85%,
      transparent 100%);
  z-index: -1;
  border-radius: 40px;
  pointer-events: none;
}

.chapter-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chapter-number::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--accent-cyan);
}

.chapter h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.chapter h2 .highlight {
  color: var(--accent-cyan);
}

.chapter h2 .highlight-warm {
  color: var(--accent-amber);
}

.chapter h2 .highlight-danger {
  color: var(--accent-red);
}

.chapter p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.chapter p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.lead-text {
  font-size: 1.2rem !important;
  color: var(--text-primary) !important;
  font-weight: 300;
  border-left: 3px solid var(--accent-cyan);
  padding-left: 1.25rem;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.15s;
}

.reveal-delay-2 {
  transition-delay: 0.3s;
}

.reveal-delay-3 {
  transition-delay: 0.45s;
}

/* Glass Cards */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.3), transparent);
}

.glass-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.glass-card h3 .icon {
  font-size: 1.2rem;
}

/* Data Tables */
.data-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table thead {
  border-bottom: 2px solid rgba(0, 229, 255, 0.3);
}

.data-table th {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-cyan);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(0, 229, 255, 0.03);
  color: var(--text-primary);
}

.data-table .highlight-cell {
  color: var(--accent-cyan);
  font-weight: 600;
  font-family: var(--font-mono);
}

.data-table .danger-cell {
  color: var(--accent-red);
  font-weight: 600;
}

.data-table .warn-cell {
  color: var(--accent-amber);
  font-weight: 600;
}

.data-table .success-cell {
  color: var(--accent-green);
  font-weight: 600;
}

/* Charts */
.chart-container {
  position: relative;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  height: 300px;
}

/* Formula Cards */
.formula-card {
  background: linear-gradient(135deg, rgba(224, 64, 251, 0.08), rgba(0, 229, 255, 0.05));
  border: 1px solid rgba(224, 64, 251, 0.15);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.formula-card .formula-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-magenta);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.formula-card .katex {
  font-size: 1.4rem;
}

.formula-card .formula-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Footnotes */
.footnote-ref {
  color: var(--accent-cyan);
  cursor: pointer;
  font-size: 0.75em;
  vertical-align: super;
  font-family: var(--font-mono);
  transition: color 0.2s;
}

.footnote-ref:hover {
  color: var(--accent-magenta);
}

.footnotes-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footnote-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footnote-num {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  min-width: 30px;
}

.footnote-tooltip {
  position: fixed;
  max-width: 400px;
  padding: 1rem 1.25rem;
  background: rgba(10, 10, 25, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  z-index: 1001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: var(--glow-cyan);
}

.footnote-tooltip.show {
  opacity: 1;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 3rem;
  margin: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-magenta));
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -3rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
  border: 2px solid var(--bg-primary);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

.timeline-content {
  margin-top: 0.3rem;
}

.timeline-content h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Stat Counters */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* Blockquote */
blockquote {
  border-left: 3px solid var(--accent-magenta);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(224, 64, 251, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* Scenario Cards */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.scenario-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: var(--border-subtle);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.scenario-card:hover {
  transform: translateY(-4px);
}

.scenario-card.optimistic {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.08), rgba(0, 229, 255, 0.05));
  border-color: rgba(0, 230, 118, 0.2);
}

.scenario-card.neutral {
  background: linear-gradient(135deg, rgba(255, 171, 64, 0.08), rgba(0, 229, 255, 0.05));
  border-color: rgba(255, 171, 64, 0.2);
}

.scenario-card.pessimistic {
  background: linear-gradient(135deg, rgba(255, 23, 68, 0.08), rgba(224, 64, 251, 0.05));
  border-color: rgba(255, 23, 68, 0.2);
}

.scenario-card .prob {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.scenario-card h4 {
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
}

.scenario-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Separator */
.chapter-separator {
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chapter-separator::before {
  content: '';
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--accent-cyan), transparent);
}

/* Footer */
footer {
  padding: 4rem 2rem;
  border-top: var(--border-subtle);
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .chapter {
    padding: 4rem 1.25rem;
  }

  nav {
    padding: 0.75rem 1rem;
  }

  .nav-links {
    display: none;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .glass-card {
    padding: 1.25rem;
  }

  .formula-card .katex {
    font-size: 1rem;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.5);
}

/* Loading screen */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  transition: opacity 0.6s;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-ring {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(0, 229, 255, 0.1);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}

/* ═══ Full-Page Snap Scroll ═══ */
html.snap-active,
html.snap-active body {
  overflow: hidden;
  height: 100vh;
}

.snap-container {
  overflow-y: auto;
  height: 100vh;
  scroll-snap-type: y mandatory;
  scroll-behavior: auto;
  /* JS controls the easing */
}

.snap-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  /* Hide scrollbar inside sections for clean look */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.snap-section::-webkit-scrollbar {
  display: none;
}

/* Sections with lots of content can scroll internally */
.snap-section .chapter-inner {
  padding-bottom: 4rem;
}

/* Remove chapter separators visually in snap mode */
html.snap-active .chapter-separator {
  display: none;
}

/* Section entrance glow on snap */
.snap-section.snapped-in {
  animation: sectionGlow 0.8s ease-out;
}

@keyframes sectionGlow {
  0% {
    box-shadow: inset 0 0 0 rgba(0, 229, 255, 0);
  }

  30% {
    box-shadow: inset 0 2px 100px rgba(0, 229, 255, 0.05);
  }

  100% {
    box-shadow: inset 0 0 0 rgba(0, 229, 255, 0);
  }
}

/* ═══ Simulation Engine ═══ */
.sim-engine {
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.03) 0%, var(--bg-primary) 100%);
  border-top: 1px solid rgba(0, 229, 255, 0.15);
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
}

.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sim-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sim-label .sim-val {
  color: var(--accent-green);
}

.sim-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
  cursor: pointer;
}

.sim-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
  cursor: pointer;
  border: none;
}

.sim-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-style: italic;
}

.sim-results {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.sim-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.sim-chart-wrap {
  height: 300px;
}

.sim-scenario {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-green);
  background: rgba(0, 0, 0, 0.3);
}

.sim-scenario h5 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.sim-scenario p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.sim-terminal {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.sim-terminal .active {
  color: var(--accent-green);
}

.sim-reset {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  background: none;
  border: 1px solid rgba(0, 229, 255, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.sim-reset:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--accent-cyan);
}

/* ═══ Drama Narrative Text ═══ */
.drama-text {
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 300;
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.drama-text em {
  color: var(--accent-cyan);
  font-style: normal;
}

.narrative-voice {
  font-style: italic;
  color: var(--text-secondary);
  border-left: 2px solid var(--accent-magenta);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-size: 1rem;
  line-height: 1.8;
}

/* Economics switchable charts */
.econ-btns {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.econ-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.econ-btn:hover,
.econ-btn.active {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.05);
}

@media (max-width: 768px) {
  .sim-grid {
    grid-template-columns: 1fr;
  }

  .sim-results-grid {
    grid-template-columns: 1fr;
  }

  .snap-container {
    scroll-snap-type: none;
  }
}

/* ══════════════════════════════════════════
   HERO NARRATION BUTTON
   ══════════════════════════════════════════ */
.hero-narration-btn {
  position: absolute;
  bottom: 18%;
  /* Positioned clearly above scroll indicator */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(6, 6, 14, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 255, 242, 0.3);
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 20px rgba(0, 255, 242, 0.1);
  text-align: left;
  opacity: 0;
  animation: fadeUp 1s 1.5s forwards;
}

.hero-narration-btn:hover {
  background: rgba(0, 255, 242, 0.15);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 255, 242, 0.4);
  transform: translateX(-50%) scale(1.05);
}

.hero-narration-btn:active {
  transform: translateX(-50%) scale(0.98);
}

.hero-narration-btn__icon {
  font-size: 1.4rem;
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 5px var(--accent-cyan));
  animation: pulse 2s infinite;
}

.hero-narration-btn__text {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  line-height: 1.2;
}

.hero-narration-btn__sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  color: var(--text-muted);
  display: block;
  font-weight: 400;
  margin-top: 2px;
}

/* Hide when playing */
.hero-narration-btn.playing {
  opacity: 0 !important;
  animation: none;
  pointer-events: none;
  transform: translateX(-50%) scale(0.9);
  transition: all 0.5s ease;
}

@keyframes pulse {
  0% {
    text-shadow: 0 0 5px rgba(0, 255, 242, 0.5);
  }

  50% {
    text-shadow: 0 0 15px rgba(0, 255, 242, 0.8);
  }

  100% {
    text-shadow: 0 0 5px rgba(0, 255, 242, 0.5);
  }
}