/* ==========================================================================
   AI-2035 (Cybersecurity Standpoint)
   Author: Aditya Singh
   Continuous Flat Editorial Stylesheet (AI 2027 / AI 2040 Design System)
   Exact Page Background #FFFFF8 · True Black Typography · Solid Black Structural Borders
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Exact ivory/parchment background matching AI 2027 & AI 2040 */
  --bg-primary: #FFFFF8;
  --page-bg: #FFFFF8;
  --bg-surface: transparent;
  --bg-dark: #000000;
  
  /* Literal neutral black for all primary content */
  --text-main: #000000;
  --text-primary: #000000;
  --text-dark: #000000;
  --text-muted: #555550;
  --text-subtle: #777770;
  
  /* Semantic country colors for graph lines & vertical rules */
  --us-color: #1e3a5f;
  --china-color: #9e1b1b;
  --europe-color: #2d5a3f;
  
  --accent-red: #9e1b1b;
  --accent-blue: #1e3a5f;
  --accent-green: #2d5a3f;
  --footnote-green: #1e4d2b;

  --border-black: #000000;
  --border-light: #e2dccf;
  --border-dark: #000000;
  
  --font-serif: "Newsreader", "Charter", "Merriweather", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --radius-sm: 0px;
  --radius-md: 0px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

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

.font-mono { font-family: var(--font-mono); }
.font-sans { font-family: var(--font-sans); }
.font-serif { font-family: var(--font-serif); }

h1, h2, h3, h4, .chapter-title, .hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.25;
}

p {
  margin-bottom: 1.15rem;
  font-size: 1.075rem;
  color: var(--text-main);
}

/* Hero Section */
.hero-wrapper {
  max-width: 1400px;
  margin: 3rem auto 1.5rem;
  padding: 0 3rem;
  background: transparent;
}

/* Header Row: Title on Left (1 line on desktop), Navigation on Right */
.hero-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  width: 100%;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 500;
  letter-spacing: -1px;
  color: var(--text-main);
  white-space: nowrap;
}

.hero-top-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hero-nav-link {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: #000000;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.12s ease;
}

.hero-nav-link:hover {
  text-decoration: underline;
}

.hero-nav-about-btn {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: #000000;
  background: #FFFFF8;
  border: 1px solid #000000;
  border-radius: 6px;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: opacity 0.12s ease;
}

.hero-nav-about-btn:hover {
  opacity: 0.75;
}

.hero-prose {
  max-width: 860px;
}

.hero-author {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 1.65rem;
}

.hero-lead-text {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.hero-sublead-text {
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--text-main);
  margin-bottom: 1.65rem;
}

/* 4 Introductory Tabs Bar (Inactive: #FFFFF8 + black text; Active: black + #FFFFF8 text) */
.hero-intro-cards-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.intro-card-btn {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  background: #FFFFF8;
  border: 1px solid #000000;
  border-radius: 6px;
  color: #000000;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.intro-card-btn:hover {
  background: #FFFFF8;
  color: #000000;
  border-color: #000000;
}

.intro-card-btn.active {
  background: #000000;
  color: #FFFFF8;
  border: 1px solid #000000;
}

/* Inline Expandable Content Area */
.intro-expandable-box {
  background: #FFFFF8;
  border: 1px solid var(--border-black);
  border-radius: 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-box-content p {
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 0.9rem;
  color: var(--text-main);
}

.intro-box-content p:last-child {
  margin-bottom: 0;
}

/* Metadata Row */
.hero-metadata-row {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--text-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
  padding-top: 0.25rem;
}

.meta-separator {
  color: #c0baa8;
}

.meta-link {
  color: var(--text-subtle);
  text-decoration: none;
  transition: color 0.15s ease;
}

.meta-link:hover {
  color: var(--text-main);
}

.meta-yt-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.meta-yt-icon {
  color: var(--text-subtle);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.meta-link:hover .meta-yt-icon {
  color: var(--text-main);
}

/* ==========================================================================
   Main 3-Column Scrollytelling Viewport
   ========================================================================== */
.scrolly-viewport {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 3rem 4rem;
  display: grid;
  grid-template-columns: 110px 1fr 480px;
  gap: 2.75rem;
  align-items: start;
}

/* Column 1: Left Timeline Rail */
.left-rail-container {
  position: sticky;
  top: 2rem;
  height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-left: 0.5rem;
  border-left: 1px solid var(--border-black);
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.15rem 0;
  cursor: pointer;
  margin-left: -5px;
  transition: all 0.12s ease;
}

.rail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-black);
  flex-shrink: 0;
  transition: all 0.12s ease;
}

.rail-dot.filled {
  background: var(--border-black);
}

.rail-dot.hollow {
  background: var(--bg-primary);
  border-color: var(--border-black);
}

.rail-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
  white-space: nowrap;
  transition: color 0.12s ease;
}

.rail-item:hover .rail-label,
.rail-item.active .rail-label {
  color: var(--text-main);
  font-weight: 600;
}

.rail-item.active .rail-dot {
  background: var(--accent-red);
  border-color: var(--accent-red);
  transform: scale(1.3);
}

/* Column 2: Center Narrative Story Flow */
.narrative-container {
  padding-right: 1.5rem;
  max-width: 680px;
}

.story-chapter {
  padding: 2rem 0 2.75rem;
  min-height: 420px;
}

.chapter-title {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.4px;
  margin-bottom: 1.15rem;
  color: var(--text-main);
}

.story-lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 1.15rem;
}

.cross-narrative-text {
  color: var(--text-main);
  font-weight: 500;
}

.branch-bullets-list {
  margin: 1rem 0 1.25rem 1.75rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.branch-bullets-list li {
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

/* Country Summary Box (Solid black border, country-specific vertical accent rules) */
.national-comparison-box {
  background: transparent;
  border: 1px solid var(--border-black);
  border-radius: 0;
  padding: 1rem 1.25rem;
  margin: 1.35rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nat-box-item {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-main);
  padding-left: 0.65rem;
}

.nat-box-item.us {
  border-left: 2.5px solid var(--us-color);
}

.nat-box-item.cn {
  border-left: 2.5px solid var(--china-color);
}

.nat-box-item.eu {
  border-left: 2.5px solid var(--europe-color);
}

/* Quotes */
.story-quote {
  padding-left: 1.25rem;
  border-left: 2.5px solid var(--border-black);
  margin: 1.5rem 0;
}

.quote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-main);
}

.quote-attribution {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.epilogue-box {
  background: transparent;
  border: 1px solid var(--border-black);
  border-radius: 0;
  padding: 1.25rem 1.35rem;
  margin: 1.75rem 0 1rem;
}

/* ==========================================================================
   Decision Crossroads Widget & Flowchart Structure
   ========================================================================== */
/* ==========================================================================
   Decision Crossroads Widget & Flowchart Structure (Exact AI-2040 Design)
   ========================================================================== */
.ai2040-flowchart-container {
  background: transparent;
  border: none;
  padding: 1.5rem 0 0.5rem;
  margin: 1.5rem 0 0.5rem;
  width: 100%;
}

.ai2040-root-box {
  border: 1.2px solid #000000;
  border-radius: 8px;
  padding: 1.15rem 1.35rem;
  font-size: 1.05rem;
  line-height: 1.45;
  text-align: left;
  background: #FFFFF8;
  color: #000000;
  margin-bottom: 0;
}

/* Fork Connector from Root Card */
.ai2040-fork-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.ai2040-stem-vertical {
  width: 2px;
  height: 16px;
  background: #000000;
  margin: 0 auto;
}

.ai2040-stem-crossbar {
  width: 50%;
  height: 2px;
  background: #000000;
  margin: 0 auto;
}

.ai2040-stems-down-row {
  display: flex;
  justify-content: space-between;
  width: 50%;
  margin: 0 auto;
}

.ai2040-stem-down {
  width: 2px;
  height: 16px;
  background: #000000;
}

/* ── Top connection arm: horizontal bar + optional upward center stem ──────
   Each .ai2040-col owns a horizontal arm that runs from its own centre (left:50%)
   outward to the grid midpoint. The left column's arm extends RIGHT (to right:-0.75rem);
   the right column's arm extends LEFT (to left:-0.75rem). A shared vertical stem rises
   from the midpoint up to connect to the root box – rendered only on the left col arm
   (.ai2040-center-stem-up) so it appears once, perfectly centred.
   ─────────────────────────────────────────────────────────────────────────── */
.ai2040-col-top-arm {
  position: relative;
  width: 100%;
  height: 20px;       /* vertical spacing between root box and branches */
  flex-shrink: 0;
}

/* Horizontal bar anchored at the column's own centre */
.ai2040-arm-line {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: #000000;
}

/* Left column: arm runs from col-centre rightward to the grid gap midpoint */
.left-arm .ai2040-arm-line {
  left: 50%;
  right: calc(-0.75rem - 1px); /* 0.75rem = half of 1.5rem gap */
}

/* Right column: arm runs from grid gap midpoint leftward to col-centre */
.right-arm .ai2040-arm-line {
  right: 50%;
  left: calc(-0.75rem - 1px);
}

/* Upward stem rendered once from the midpoint to the root box (left col only) */
.ai2040-center-stem-up {
  position: absolute;
  right: calc(-0.75rem - 1px);  /* sits exactly at the grid midpoint */
  top: 0;
  bottom: 50%;                  /* rises from the horizontal bar upward */
  width: 2px;
  background: #000000;
  transform: translateX(50%);   /* nudge to perfectly centre the 2px line */
}

/* 2-Column Branching Grid */
.ai2040-branches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

.ai2040-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.ai2040-stem-badge-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.35rem 0.5rem;
}

.ai2040-vert-stem-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #000000;
  transform: translateX(-50%);
  z-index: 1;
}

.ai2040-branch-quote {
  position: relative;
  z-index: 2;
  background: #FFFFF8;
  padding: 2px 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #111111;
  text-align: center;
}

.ai2040-mid-box {
  border: 1.2px solid #000000;
  border-radius: 8px;
  padding: 1rem 1.15rem;
  font-size: 0.925rem;
  line-height: 1.45;
  background: #FFFFF8;
  text-align: left;
  width: 100%;
  min-height: 5.5rem;
  display: flex;
  align-items: center;
  color: #000000;
  box-sizing: border-box;
}

.ai2040-plan-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  width: 100%;
}

.ai2040-plan-btn {
  border: 1.2px solid #000000;
  border-radius: 6px;
  padding: 0.85rem 1.15rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #FFFFF8;
  width: 100%;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  outline: none;
  box-sizing: border-box;
}

.ai2040-plan-btn:hover {
  background: #f6f5ec;
}

.ai2040-plan-btn.active {
  border: 2.5px solid #000000;
  background: #FFFFF8;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.ai2040-btn-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #000000;
  margin-bottom: 0.15rem;
}

.ai2040-btn-letter {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  color: #000000;
  margin-bottom: 0.2rem;
}

.ai2040-btn-name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #000000;
}

.ai2040-rec-label {
  font-family: var(--font-serif);
  font-size: 0.8125rem;
  font-style: italic;
  color: #555550;
  text-align: center;
}

/* Branch Transition Quote Slot (Below Plan Cards, Above 2032) */
.branch-transition-quote-slot {
  text-align: center;
  margin: 2.75rem 0 1.5rem;
  padding: 0 1rem;
}

.transition-quote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  color: #000000;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.transition-quote-attribution {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Column 3: Right-Hand Visualization Area (Square Black Frame)
   ========================================================================== */
.fixed-hud-dock {
  position: sticky;
  top: 2rem;
  width: 480px;
  background: transparent;
  border: 1px solid var(--border-black);
  border-radius: 0;
  padding: 1.15rem;
  box-shadow: none;
}

.dock-top-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-black);
}

.dock-header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.hud-date-pill {
  background: var(--bg-dark);
  color: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 0;
}

.hud-level-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: #000000;
  line-height: 1.3;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-monochrome {
  background: #000000;
  color: var(--bg-primary);
  border: 1px solid #000000;
}

/* SVG Chart Box */
.dock-chart-box {
  width: 100%;
  background: transparent;
  border: none;
  margin-bottom: 0.75rem;
}

.dock-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
}

.legend-text {
  font-family: var(--font-sans);
  font-size: 9px;
  fill: #000000;
}

.chart-axis-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: #555550;
}

.chart-zone-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  fill: #000000;
}

/* Chart Switcher Buttons (Monochrome State) */
.chart-switch-buttons-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.chart-toggle-btn {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-black);
  border-radius: 0;
  color: var(--bg-primary);
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.chart-toggle-btn:hover {
  opacity: 0.88;
}

.chart-toggle-btn.active {
  background: var(--bg-primary);
  color: var(--text-main);
  border: 1px solid var(--border-black);
}

/* Live Threat Summary Area */
.threat-summary-card {
  background: transparent;
  border: none;
  padding: 0;
}

.threat-card-row {
  margin-bottom: 0.65rem;
}

.threat-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.threat-val-loss {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: #000000;
}

.threat-val-milestone {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.4;
  color: #000000;
  font-weight: 500;
}

.threat-status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-black);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
}

.status-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--text-main);
  padding-left: 0.5rem;
}

.status-row.us {
  border-left: 2.5px solid var(--us-color);
}

.status-row.cn {
  border-left: 2.5px solid var(--china-color);
}

.status-row.eu {
  border-left: 2.5px solid var(--europe-color);
}

.status-country-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #000000;
}

.status-desc {
  color: #000000;
  font-weight: 500;
  font-size: 0.8125rem;
}

.status-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Superscript Footnote Marker & Dark Green Floating Popover (AI 2027 / AI 2040)
   ========================================================================== */
.footnote-ref {
  font-size: 0.65em;
  vertical-align: super;
  line-height: 0;
  color: var(--footnote-green);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  padding: 0 1px;
  display: inline-block;
  outline: none;
}

.footnote-ref:hover,
.footnote-ref:focus {
  text-decoration: underline;
}

.footnote-popover {
  position: absolute;
  z-index: 9999;
  background: #1d3827;
  color: #f5f5ee;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  max-width: 380px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  line-height: 1.45;
  pointer-events: auto;
  animation: popoverFadeIn 0.15s ease;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.footnote-popover-badge {
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}

.footnote-popover-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footnote-popover-type {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a5d6a7;
  font-weight: 600;
}

.footnote-popover-text {
  color: #f5f5ee;
}

.footnote-popover-sources {
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.popover-source-item {
  font-size: 0.78125rem;
}

.popover-source-link {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.12s ease;
}

.popover-source-link:hover {
  opacity: 0.85;
}

/* ==========================================================================
   Footnotes Section (Numbered 1-17)
   ========================================================================== */
.footnotes-section {
  max-width: 1400px;
  margin: 4rem auto 2rem;
  padding: 3rem 3rem 2rem;
  border-top: 1px solid var(--border-black);
}

.footnotes-header {
  margin-bottom: 1.5rem;
}

.footnotes-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #000000;
}

.sources-numbered-list {
  list-style: decimal;
  margin-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.source-list-item {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.5;
  color: #000000;
}

.source-list-link {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.12s ease;
}

.source-list-link:hover {
  opacity: 0.75;
}

.source-list-item.plain-assumption {
  color: #000000;
}

/* ==========================================================================
   Clean 2-Column Footer
   ========================================================================== */
.site-footer {
  max-width: 1400px;
  margin: 4rem auto 0;
  padding: 2.25rem 3rem 2.5rem;
  border-top: 1px solid #000000;
  background: var(--bg-primary);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-acknowledgement {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.25;
  color: #000000;
  text-align: left;
}

.desktop-br {
  display: inline;
}

.footer-icons-group {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-shrink: 0;
}

.footer-icon-link {
  color: #000000;
  font-size: 2.5rem;
  text-decoration: none;
  transition: opacity 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Mobile Floating Bottom Graph Bar (Sticky) — Exact Picture 3 Design
   ========================================================================== */
.mobile-bottom-dock {
  display: none; /* enabled in media query below on mobile/tablets */
  position: fixed;
  bottom: 8px;
  left: 12px;
  right: 12px;
  max-width: 480px;
  margin: 0 auto;
  height: 54px;
  background-color: #FFFFF8;
  border: 1.2px solid #000000;
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  z-index: 950;
  cursor: pointer;
  user-select: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 0 8px;
  gap: 0.4rem;
  transition: transform 0.18s ease, background-color 0.15s ease;
}

.mobile-bottom-dock:active {
  background-color: #f6f6ee;
}

.mobile-dock-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.mobile-dock-expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  font-size: 0.55rem;
  color: #FFFFF8;
  background: #000000;
  flex-shrink: 0;
}

.mobile-dock-date-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
  background: #000000;
  color: #FFFFF8;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mobile-dock-graph-viewport {
  flex: 1;
  width: 100%;
  height: 48px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* ==========================================================================
   Fullscreen Interactive Graph Modal Overlay
   ========================================================================== */
.fullscreen-graph-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--bg-primary);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px));
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-dialog-content {
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Header with Exit Button [✕] and Date Pill */
.modal-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1.5px solid var(--border-black);
  gap: 0.75rem;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border-black);
  background: var(--bg-primary);
  color: #000000;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: #000000;
  color: #FFFFF8;
  transform: scale(1.05);
}

.modal-close-btn:active {
  transform: scale(0.95);
}

.modal-date-pill {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  background: #000000;
  color: #FFFFF8;
  border-radius: 4px;
}

.modal-header-center {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.modal-level-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: #000000;
  text-align: right;
}

.modal-status-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
}

/* 2-Graph Switcher Tabs with Prominent Headings */
.modal-chart-switcher-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.modal-tab-btn {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.65rem 0.85rem;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-black);
  border-radius: 6px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  line-height: 1.25;
}

.modal-tab-btn i {
  font-size: 0.95rem;
}

.modal-tab-btn.active {
  background: #000000;
  color: #FFFFF8;
  border-color: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.modal-tab-btn:hover:not(.active) {
  background: #f4f3ea;
}

/* Modal SVG Chart Container */
.modal-chart-box {
  width: 100%;
  background: #FFFFF8;
  border: 1.5px solid var(--border-black);
  border-radius: 6px;
  padding: 0.85rem 0.5rem 0.6rem;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  touch-action: pan-y;
}

.modal-chart-box svg {
  width: 100%;
  height: auto;
  display: block;
}

.modal-scrubber-hint {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* Live Threat Summary & National Capabilities inside Modal */
.modal-threat-content {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.modal-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.modal-metric-card {
  border: 1px solid var(--border-black);
  border-radius: 4px;
  padding: 0.75rem 0.85rem;
  background: var(--bg-primary);
}

.modal-branch-tag {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-red);
  margin-top: 0.15rem;
}

.modal-threat-status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-black);
}

/* ==========================================================================
   Responsive Viewport Rules
   ========================================================================== */
@media (max-width: 1024px) {
  .scrolly-viewport {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem 6.5rem;
  }
  
  .left-rail-container {
    display: none;
  }
  
  .fixed-hud-dock {
    display: none; /* replaced on mobile/tablet by floating bottom dock & fullscreen modal */
  }
  
  .mobile-bottom-dock {
    display: flex;
  }
  
  .narrative-container {
    max-width: 100%;
    padding-right: 0;
  }
  
  .story-chapter {
    min-height: auto;
    padding: 1.5rem 0 2rem;
  }
}

@media (max-width: 768px) {
  .hero-wrapper {
    margin: 1.5rem auto 1rem;
    padding: 0 1.25rem;
  }

  .hero-title {
    font-size: clamp(2rem, 7.5vw, 2.75rem);
    white-space: normal;
    line-height: 1.18;
  }

  .hero-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .hero-author {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
  }

  .hero-lead-text {
    font-size: 1.075rem;
    line-height: 1.55;
  }

  .hero-sublead-text {
    font-size: 0.975rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
  }

  .hero-intro-cards-bar {
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .intro-card-btn {
    font-size: 0.78125rem;
    padding: 0.5rem 0.85rem;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .intro-expandable-box {
    padding: 1rem 1.15rem;
    border-radius: 4px;
  }

  .hero-metadata-row {
    font-size: 0.75rem;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .scrolly-viewport {
    padding: 0.75rem 1.25rem 6.5rem;
  }

  .chapter-title {
    font-size: clamp(1.6rem, 5vw, 1.95rem);
    line-height: 1.22;
    margin-bottom: 0.95rem;
  }

  .story-lead {
    font-size: 1.05rem;
    line-height: 1.55;
  }

  p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  /* AI-2040 Flowchart Mobile Layout */
  .ai2040-branches-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .ai2040-root-box {
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .ai2040-stem-badge-wrap {
    min-height: 42px;
    padding: 0.25rem 0.25rem;
  }

  .ai2040-branch-quote {
    font-size: 0.78125rem;
    line-height: 1.25;
    padding: 2px 4px;
  }

  .ai2040-mid-box {
    padding: 0.65rem 0.65rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    min-height: 6.5rem;
    border-radius: 6px;
  }

  .ai2040-plan-btn {
    padding: 0.65rem 0.5rem;
    max-width: 140px;
  }

  .ai2040-btn-letter {
    font-size: 1.75rem;
  }

  .ai2040-btn-name {
    font-size: 0.65rem;
  }

  .ai2040-rec-label {
    font-size: 0.75rem;
  }

  .footnotes-section {
    margin: 2.5rem auto 1.5rem;
    padding: 2rem 1.25rem 1.5rem;
  }

  .site-footer {
    margin-top: 2rem;
    padding: 2rem 1.25rem 6.5rem;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .desktop-br {
    display: none;
  }

  .modal-chart-switcher-tabs {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .modal-metrics-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-wrapper {
    padding: 0 1rem;
  }
  .scrolly-viewport {
    padding: 0.5rem 1rem 6.5rem;
  }
  .footnotes-section {
    padding: 1.75rem 1rem 1.5rem;
  }
  .site-footer {
    padding: 1.75rem 1rem 6.5rem;
  }
  .fullscreen-graph-modal {
    padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   About Page — Dedicated styles (isolated from main page hero-title etc.)
   ========================================================================== */

.about-page-body {
  background-color: #FFFFF8;
  color: #000000;
  font-family: var(--font-serif);
  margin: 0;
  padding: 0;
}

.about-page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 3rem 4rem;
}

/* Top-left site identity — SMALL, independent of .hero-title */
.about-header {
  margin-bottom: 0; /* gap controlled by about-article-column margin-top */
}

.about-site-title {
  /* Dedicated class — does NOT inherit .hero-title */
  font-family: var(--font-serif);
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 650;
  line-height: 1.1;
  color: #000000;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  cursor: pointer;
}

.about-site-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Reading column — left-aligned, narrow, ample right space */
.about-article-column {
  max-width: 720px;
  margin-top: 62px; /* generous gap between site identity and About Me */
}

/* Primary page title — MUCH LARGER than site identity */
.about-page-title {
  /* Dedicated class — does NOT inherit .hero-title */
  font-family: var(--font-serif);
  font-size: clamp(42px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.07;
  color: #000000;
  letter-spacing: -0.5px;
  margin-bottom: 26px;
}

/* Introductory section */
.about-intro-section {
  margin-bottom: 0;
}

.about-intro-section p,
.about-article-column p {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.52;
  color: #000000;
  margin-bottom: 20px;
}

/* Section spacing: generous gap before each secondary heading */
.about-section {
  margin-top: 46px;
}

/* Secondary headings: Get in touch / Changelog */
.about-section-heading {
  font-family: var(--font-serif);
  font-size: clamp(27px, 3vw, 33px);
  font-weight: 400;
  line-height: 1.1;
  color: #000000;
  letter-spacing: -0.3px;
  margin-bottom: 20px;
}

/* All editorial text links on the About page */
.about-text-link {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.about-text-link:hover {
  opacity: 0.72;
}

.about-text-link:visited {
  color: #000000;
}

/* Credit line at the bottom */
.about-credit-line {
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.2vw, 17px);
  color: #000000;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid #000000;
}

/* About-page responsive adjustments */
@media (max-width: 900px) {
  .about-page-wrapper {
    padding: 36px 2rem 3rem;
  }
  .about-article-column {
    margin-top: 48px;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .about-page-wrapper {
    padding: 28px 1.35rem 2.5rem;
  }
  .about-site-title {
    white-space: normal;
  }
  .about-article-column {
    margin-top: 36px;
  }
}

