/* ============================================================
   THE 2029 CONVERGENCE — styles.css
   Convergence Research · convergence2029.com
   ============================================================ */

/* ---- Google Fonts ----------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Lora:ital,wght@0,400;0,500;1,400;1,500&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- CSS Custom Properties -------------------------------- */
:root {
  /* Color Palette */
  --bg:           #0A0A0F;
  --surface:      #111118;
  --elevated:     #1A1A26;
  --text:         #E8E6F0;
  --text-muted:   #9A98B0;
  --border:       #2A2A3E;

  /* Accent Colors */
  --apophis:      #FF6B35;
  --agi:          #00D4FF;
  --revelation:   #C084FC;
  --gold:         #FFD700;

  /* Dynamic accent (updated via JS) */
  --accent:       #FFD700;
  --accent-rgb:   255, 215, 0;

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Lora', serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --section-pad:  clamp(4rem, 8vw, 8rem);
  --content-max:  680px;
  --wide-max:     1100px;
  --page-max:     1440px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(16px, 2.5vw, 19px);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Progress Bar ----------------------------------------- */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  z-index: 1000;
  transition: width 0.1s linear, background 0.6s ease;
  box-shadow: 0 0 8px var(--accent);
}

/* ---- TOC Sidebar ------------------------------------------ */
#toc-sidebar {
  position: fixed;
  left: clamp(1rem, 2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#toc-sidebar.visible {
  opacity: 1;
  pointer-events: auto;
}

.toc-dot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 0;
}

.toc-dot-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: 1px solid var(--text-muted);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  flex-shrink: 0;
}

.toc-dot:hover .toc-dot-circle,
.toc-dot.active .toc-dot-circle {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.4);
  box-shadow: 0 0 6px var(--accent);
}

.toc-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.3s, color 0.3s;
  pointer-events: none;
}

.toc-dot:hover .toc-label,
.toc-dot.active .toc-label {
  opacity: 1;
  transform: translateX(0);
  color: var(--text);
}

/* ---- Mobile TOC Button ------------------------------------ */
#toc-mobile-btn {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  z-index: 200;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: background 0.3s, box-shadow 0.3s;
}

#toc-mobile-btn:hover {
  background: var(--border);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
}

/* ---- Mobile TOC Drawer ------------------------------------ */
#toc-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.97);
  z-index: 300;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#toc-drawer.open {
  opacity: 1;
}

#toc-drawer-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
}

.toc-drawer-link {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.3s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.toc-drawer-link:hover { color: var(--accent); }

/* ---- Hero ------------------------------------------------- */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--bg);
}

#global-starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 900px;
}

.hero-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-title span {
  display: block;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(16px, 2.5vw, 24px);
  font-style: italic;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 0.75rem;
  line-height: 1.5;
}

.hero-probably {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-muted);
  opacity: 0.6;
  margin-bottom: 2.5rem;
  font-style: italic;
}

/* ---- Countdown -------------------------------------------- */
#countdown,
#countdown-2036 {
  font-family: var(--font-mono);
  font-size: clamp(13px, 2vw, 18px);
  color: var(--text-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0;
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  display: inline-block;
}

/* ---- Scroll Arrow ----------------------------------------- */
.scroll-arrow {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s ease-in-out infinite;
  cursor: pointer;
}

.scroll-arrow svg {
  width: 32px;
  height: 32px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---- Section Layout --------------------------------------- */
.section-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 3rem);
}

.content-column {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ---- Section Labels --------------------------------------- */
.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  transition: color 0.6s;
}

/* ---- Headings --------------------------------------------- */
h2.section-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.page-section h3 {
  margin-top: 3rem;
  color: var(--gold);
}

h3.sub-heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* ---- Section Wrapper -------------------------------------- */
.page-section {
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 1;
}

.page-section.bg-surface {
  background: rgba(17, 14, 27, 0.85);
}

/* ---- Abstract --------------------------------------------- */
#abstract {
  padding: var(--section-pad) 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.abstract-body {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  color: var(--text);
}

.abstract-body p + p {
  margin-top: 1.25em;
}

/* ---- Author Note ------------------------------------------ */
.author-note {
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ---- Pull Quote ------------------------------------------- */
.pull-quote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.5;
  color: var(--text);
  border-left: 4px solid var(--accent);
  padding: 1rem 0 1rem 1.5rem;
  margin: 2.5rem 0;
  background: var(--elevated);
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  border-radius: 0 6px 6px 0;
  transition: border-color 0.6s;
}

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

.stat-card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 500;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
  transition: color 0.6s;
}

.stat-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Section Share Button --------------------------------- */
.section-share {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  min-height: 44px;
  position: relative;
}

.section-share:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.share-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.section-share.copied .share-tooltip {
  opacity: 1;
}

/* ---- Scripture Block -------------------------------------- */
.scripture-block {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--revelation);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-muted);
  line-height: 1.7;
}

.scripture-ref {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--revelation);
}

/* ---- Timeline Strip --------------------------------------- */
#timeline-section {
  padding: var(--section-pad) 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: visible;
}

.timeline-scroll-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  padding: 5rem clamp(1rem, 5vw, 3rem) 3rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.timeline-scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}
.timeline-scroll-wrapper::-webkit-scrollbar-track { background: transparent; }
.timeline-scroll-wrapper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.timeline-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 1100px;
  position: relative;
}

.timeline-axis {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 0;
  position: relative;
}

.timeline-years {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  margin-top: 1rem;
}

.timeline-year-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  flex: 1;
}

.timeline-year-label.highlight {
  color: var(--gold);
  font-weight: 500;
}

/* Track container */
.timeline-tracks {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 8rem;
  position: relative;
}

.timeline-track {
  display: flex;
  align-items: center;
  gap: 0;
  height: 48px;
  position: relative;
  overflow: visible;
}

.track-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: 90px;
  flex-shrink: 0;
  padding-right: 1rem;
  text-align: right;
}

.track-label.apophis  { color: var(--apophis); }
.track-label.agi      { color: var(--agi); }
.track-label.rev      { color: var(--revelation); }

.track-line {
  flex: 1;
  height: 2px;
  position: relative;
  overflow: visible;
}

.track-line.apophis  { background: linear-gradient(90deg, transparent, var(--apophis) 20%, var(--apophis) 80%, transparent); }
.track-line.agi      { background: linear-gradient(90deg, transparent, var(--agi) 20%, var(--agi) 80%, transparent); }
.track-line.rev      { background: linear-gradient(90deg, transparent, var(--revelation) 20%, var(--revelation) 80%, transparent); }

.track-node {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.track-node-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: var(--bg);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 2;
}

.track-node:hover .track-node-dot {
  transform: scale(1.6);
  box-shadow: 0 0 8px currentColor;
}

.apophis .track-node-dot { color: var(--apophis); }
.agi .track-node-dot     { color: var(--agi); }
.rev .track-node-dot     { color: var(--revelation); }

.track-node-card {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  width: 220px;
  font-size: 12px;
  line-height: 1.4;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.track-node:hover .track-node-card { opacity: 1; pointer-events: auto; }

.track-node-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* ---- Revelation Overlay ----------------------------------- */
.revelation-overlay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.rev-col-header {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.75rem 1.25rem;
  background: var(--elevated);
  border-bottom: 1px solid var(--border);
}

.rev-col-header.left  { color: var(--revelation); border-right: 1px solid var(--border); }
.rev-col-header.right { color: var(--agi); }

.rev-col {
  display: flex;
  flex-direction: column;
}

.rev-col.left  { border-right: 1px solid var(--border); }

.rev-row {
  display: contents;
}

.rev-cell {
  padding: 1rem 1.25rem;
  font-size: 14px;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.rev-cell:last-child { border-bottom: none; }

.rev-cell.left  {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-muted);
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.rev-cell.right {
  background: var(--bg);
  color: var(--text);
}

.rev-cell.highlighted {
  background: rgba(192, 132, 252, 0.08) !important;
}

.rev-verse-ref {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--revelation);
  margin-bottom: 0.4rem;
}

/* ---- Revelation Table Wrapper ----------------------------- */
.revelation-table-wrapper {
  overflow-x: auto;
}

.revelation-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 500px;
}

.revelation-table-wrapper th,
.revelation-table-wrapper td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.revelation-table-wrapper th {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--elevated);
}

.revelation-table-wrapper td:first-child {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
  width: 80px;
}

/* ---- Interstitials ---------------------------------------- */
.interstitial {
  padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 5vw, 3rem);
  text-align: center;
  position: relative;
  z-index: 1;
  position: relative;
  overflow: hidden;
}

.interstitial.starfield {
  background: var(--bg);
}

.interstitial-text {
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.interstitial.scripture-interstitial {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.scripture-interstitial .scripture-text {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(16px, 2.5vw, 22px);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 1rem;
  opacity: 0.85;
}

.scripture-interstitial .scripture-source {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--revelation);
}

.interstitial.elon-interstitial {
  background: var(--bg);
  padding: clamp(5rem, 12vw, 10rem) 2rem;
}

.elon-text {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--gold);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.1;
}

/* Starfield canvas */
.starfield-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ---- Parallax (desktop only) ------------------------------ */
@media (min-width: 1024px) {
  .interstitial.starfield {
    background-attachment: fixed;
  }
}

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

.scenario-card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
}

.scenario-card h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  transition: color 0.6s;
}

.scenario-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ---- Feedback CTA ---------------------------------------- */
#respond {
  padding: var(--section-pad) 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.respond-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.respond-card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.respond-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(var(--accent-rgb), 0.1);
}

.respond-icon {
  font-size: 2rem;
  line-height: 1;
}

.respond-audience {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

.respond-question {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.respond-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  min-height: 44px;
  margin-top: 0.5rem;
}

.respond-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ---- FAQ -------------------------------------------------- */
#faq {
  padding: var(--section-pad) 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: none; }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
  min-height: 44px;
}

.faq-question:hover { background: var(--surface); color: var(--accent); }

.faq-question.open { background: var(--surface); color: var(--accent); }

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.faq-question.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}

.faq-answer.open {
  max-height: 400px;
  padding: 0.25rem 1.5rem 1.25rem;
}

/* ---- Conclusion ------------------------------------------- */
#conclusion {
  padding: var(--section-pad) 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* ---- Footer ----------------------------------------------- */
footer {
  padding: 3rem clamp(1rem, 5vw, 3rem);
  text-align: center;
  background: rgba(10, 8, 20, 0.9);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-text {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
  padding-bottom: 1px;
}

.footer-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- Utility ---------------------------------------------- */
p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

strong { color: var(--text); font-weight: 500; }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2em;
}

li { margin-bottom: 0.4em; }

a { color: var(--accent); }

/* Countdown pair */
.countdown-pair {
  display: flex;
  gap: clamp(2rem, 5vw, 4rem);
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.countdown-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.countdown-date {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
/* Hero epigraph — disclaimer bar pinned to very top of page */
.hero-epigraph {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.6;
  font-style: italic;
  padding: 0.75rem 1rem;
  z-index: 10;
  line-height: 1.5;
}
.hero-epigraph a {
  color: var(--text-muted);
  opacity: 0.8;
}

.countdown-tz {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.6;
}

/* Source / citation links */
.source-link {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.source-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 1024px) {
  #toc-sidebar { display: none !important; }
  #toc-mobile-btn { display: flex; }
  #toc-drawer { display: flex; }
}

@media (max-width: 640px) {
  .revelation-overlay {
    grid-template-columns: 1fr;
  }
  .rev-cell.left { border-right: none; border-bottom: 1px solid var(--border); }
  .rev-col-header.left { border-right: none; }

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

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

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

  #hero-canvas {
    display: none;
  }

  .hero-static-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 60%, rgba(255,107,53,0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 40%, rgba(0,212,255,0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(192,132,252,0.08) 0%, transparent 50%),
                var(--bg);
    z-index: 0;
  }

  .timeline-inner { min-width: 800px; }
}

/* ---- Highlight / focus states ----------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Smooth accent transitions on sections ---------------- */
[data-accent] {
  transition: --accent 0.6s;
}

/* ---- Timeline year ruler ---------------------------------- */
.timeline-ruler {
  display: flex;
  align-items: flex-end;
  padding-left: 90px;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.ruler-year {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  position: relative;
}

.ruler-year::before {
  content: '';
  display: block;
  width: 1px;
  height: 6px;
  background: var(--border);
  margin: 0 auto 4px;
}

.ruler-year.highlight-year {
  color: var(--gold);
}

.ruler-year.highlight-year::before {
  background: var(--gold);
  height: 10px;
}

/* ---- Convergence dot on timeline -------------------------- */
.convergence-marker {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.convergence-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold), 0 0 24px rgba(255,215,0,0.4);
  animation: pulse-gold 2s ease-in-out infinite;
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 8px var(--gold), 0 0 16px rgba(255,215,0,0.3); transform: scale(1); }
  50%       { box-shadow: 0 0 16px var(--gold), 0 0 32px rgba(255,215,0,0.5); transform: scale(1.15); }
}

.convergence-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--gold);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

/* ---- Pulsing accent dot in hero --------------------------- */
@keyframes pulse-accent {
  0%, 100% { opacity: 1; r: 6px; }
  50%       { opacity: 0.7; r: 9px; }
}

/* ---- Scroll-triggered fade-in ----------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
