/* --- 1. DESIGN SYSTEM --- */
:root {
    --ink: #131110;
    --paper: #F6F3EC;
    --paper-mid: #EAE5D8;
    --paper-alt: #DDD8CB;
    --paper-deep: #CEC8B8;
    --crimson: #BF2D26;
    --azure: #174875;
    --amber: #B87333;
    --dust: #706354;
    --smoke: #C4BFB4;
    --ghost: #E8E4DC;
    --open-blue: #7A9EB8; 

    --font-head: 'Fraunces', serif;
    --font-body: 'Source Serif 4', serif;
    --font-ui: 'DM Sans', sans-serif;

    --lane-prose: 680px;
    --lane-wide: 1020px;
    --lane-full: 1240px;
    --gap-section: 96px;

    --sp-xs:   8px;
    --sp-sm:   16px;
    --sp-md:   28px;
    --sp-lg:   56px;
    --sp-xl:   96px;
    --sp-2xl:  140px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-pill: 40px;

    --glass-bg: rgba(246, 243, 236, 0.95);
    
    --shadow-sm:      0 2px 8px rgba(19,17,16,0.06);
    --shadow-md:      0 8px 24px rgba(19,17,16,0.10);
    --shadow-lg:      0 15px 40px rgba(19,17,16,0.14);
    --shadow-tooltip: 0 15px 35px -5px rgba(19,17,16,0.18);

    --ease-out:    cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-linear: linear;

    --dur-fast:   180ms;
    --dur-mid:    420ms;
    --dur-slow:   800ms;
    --dur-cinematic: 2400ms;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Accessibility enhancements */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--azure);
    color: var(--paper);
    padding: 12px 24px;
    z-index: 10000;
    transition: top var(--dur-fast) var(--ease-out);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
}
.skip-link:focus { top: 0; }

:focus-visible {
    outline: 2px solid var(--azure);
    outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    width: 100%;
    overflow-x: clip;
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    opacity: 0.4;
}

@media (max-width: 768px) {
    body::before {
        display: none; /* Saves massive CPU/GPU repaints on mobile */
    }
}

canvas { background: transparent; }

/* Mobile rain overlay */
.mobile-rain-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}
.mobile-rain-overlay::before,
.mobile-rain-overlay::after {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    width: 200%;
    height: calc(100% + 60px);
    background-image:
        repeating-linear-gradient(
            8deg,
            transparent,
            transparent 18px,
            rgba(19,17,16,0.06) 18px,
            rgba(19,17,16,0.06) 19px
        );
    animation: mobile-rain-fall 1.4s linear infinite;
}
.mobile-rain-overlay::after {
    animation-delay: 0.7s;
    opacity: 0.5;
}
@keyframes mobile-rain-fall {
    0%   { transform: translateY(-60px); }
    100% { transform: translateY(60px); }
}

.story-flow { overflow-x: clip; width: 100%; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 900; line-height: 1.1; color: var(--ink); }
p { margin-bottom: 1.5rem; color: var(--ink); }
p strong { color: var(--ink); font-weight: 600; }
p:last-child { margin-bottom: 0; }
.text-center { text-align: center; }

/* Desktop Warning Toast Banner */
#desktop-warning-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box; 
    border-radius: 0; 
    background: rgba(19, 17, 16, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(246, 243, 236, 0.1);
    color: #F6F3EC;
    padding: 12px 24px;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.02em;
    box-shadow: none;
    z-index: 10000;
    display: none; 
    transform: none !important; 
    margin: 0 !important;
}

#dismiss-banner {
    background: transparent;
    border: none;
    color: #F6F3EC;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 16px;
    opacity: 0.6;
    flex-shrink: 0;
}
#dismiss-banner:hover {
    opacity: 1;
}

/* Display Helpers */
.mobile-only { display: none !important; }
.desktop-only { display: inline-block !important; }

/* Initial hidden state for GSAP */
.fade-up { opacity: 0; transform: translateY(28px); }

/* Layout Lanes */
.reading-lane { max-width: var(--lane-prose); margin: 0 auto; width: 100%; padding: 0 40px; }
.stage-lane { max-width: var(--lane-wide); margin: 40px auto; width: 100%; padding: 0 40px; }
.container { width: 100%; max-width: var(--lane-wide); margin: 0 auto; padding: 0 40px; }

/* Backgrounds & Spacing Standardized */
.bg-alt { background-color: var(--paper-mid); padding: 80px 0; border-top: 1px solid var(--smoke); border-bottom: 1px solid var(--smoke); }
.story-section { margin-top: var(--gap-section); }
.mb-large { margin-bottom: var(--gap-section); }
.mt-base { margin-top: 40px; }
.mt-large { margin-top: 60px; }
.subhead { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; margin-top: 0; letter-spacing: -1px; }

/* --- PULL QUOTE --- */
.pull-quote {
    font-family: var(--font-head);
    font-style: italic;
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    color: var(--ink);
    line-height: 1.42;
    margin: 60px auto;
    padding: 36px 0;
    max-width: 92%;
    position: relative;
    border-top: 1px solid var(--smoke);
    border-bottom: 1px solid var(--smoke);
    border-left: none;
    text-align: center;
}
.pull-quote::before {
    content: '\201C';
    display: block;
    font-family: var(--font-head);
    font-size: 3.5rem;
    line-height: 0.7;
    color: var(--crimson);
    margin-bottom: 12px;
    font-style: normal;
}
.pull-quote p { margin: 0; font-weight: 300; }

.progress-bar-container { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 2000; background: transparent; pointer-events: none; }
.progress-bar { height: 100%; background: var(--azure); width: 0%; transition: width 0.1s ease; }

.chapter-marker {
    cursor: pointer;
    pointer-events: all;
}
.chapter-marker::after {
    content: attr(data-chapter);
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-ui);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 3px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2001;
}
.chapter-marker:hover::after {
    opacity: 1;
}

.chapter-marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--paper);
    border: 1px solid var(--smoke);
    cursor: pointer;
    z-index: 10;
    pointer-events: auto;
}
.chapter-marker::after {
    content: attr(data-chapter);
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-ui);
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 2px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.chapter-marker:hover::after { opacity: 1; }

/* --- HERO --- */
.hero { position: relative; }
.hero-flex-layout {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    min-height: 100svh; padding: 60px 20px 40px 20px; position: relative; overflow: hidden;
    background: var(--paper);
}

@keyframes hero-nudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

@keyframes subtleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes lineGrow {
    0%, 100% { transform: scaleY(0.4); opacity: 0.3; }
    50% { transform: scaleY(1); opacity: 0.8; }
}

.scroll-text-pulse {
    font-family: var(--font-ui); font-size: 10px; font-weight: 700; 
    text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    opacity: 1 !important; 
}

.scroll-line-indicator {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(19,17,16,0.5), rgba(19,17,16,0));
    margin: 6px auto 0 auto;
    animation: lineGrow 2s ease-in-out infinite;
    transform-origin: top center;
}

.hero-mobile-img-wrapper {
    position: relative; z-index: 2; width: 100%; display: flex; justify-content: center;
    margin-bottom: 20px; margin-top: 2vh;
}
.hero-mobile-img-wrapper img {
    width: 100%; max-width: 380px; height: auto; object-fit: contain;
}
.scroll-indicator-wrapper {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 2; margin: 0;
}

.hero-content { max-width: var(--lane-prose); margin: 0 auto; text-align: center; width: 100%; }
.hero-title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 5rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -2px;
    margin-bottom: 28px;
    color: var(--ink);
    text-wrap: balance;
}
.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 300;
    color: var(--dust);
    margin: 0 auto 40px auto;
    max-width: 640px;
    line-height: 1.75;
}
.hero-bylines { border-top: 1px solid var(--smoke); padding-top: 24px; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px;}
.meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap; 
    font-family: var(--font-ui);
    font-size: 11px;
    color: var(--dust);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    gap: 8px;
    margin: 0;
}
.meta-row a { color: var(--azure); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); font-weight: 700; }
.meta-row a:hover { color: var(--ink); text-decoration: underline; }
.meta-divider { color: var(--smoke); padding: 0 4px; }
.dropcap { overflow: hidden; }
.dropcap::first-letter { float: left; font-family: var(--font-head); font-size: 5rem; line-height: 0.8; padding-right: 12px; font-weight: 900; color: var(--crimson); }

/* --- DATA BREAKOUT --- */
.data-breakout-band { width: 100%; background-color: transparent; padding: 20px 0; margin: 40px 0 60px 0; border: none; }
.metrics-row { display: grid; gap: 24px; align-items: stretch; text-align: center; }
.metrics-grid-5 { grid-template-columns: repeat(5, 1fr); }
.metric-card { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; }
.m-val-wrap { display: flex; align-items: baseline; justify-content: center; }
.metric-card .m-val { font-size: clamp(32px, 5vw, 56px); font-family: var(--font-head); font-weight: 900; color: var(--azure); line-height: 1.1; letter-spacing: -2px; padding-bottom: 4px; overflow: visible;}
.metric-card .m-unit { font-size: clamp(24px, 4vw, 36px); font-family: var(--font-head); font-weight: 900; color: var(--azure); margin-left: 2px; }
.metric-card .m-label { font-family: var(--font-ui); font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--dust); letter-spacing: .18em; margin-top: 8px; white-space: nowrap; }
.visual-asset { width: 100%; max-width: 1000px; height: auto; aspect-ratio: 16/9; object-fit: contain; background-color: transparent; display: block; margin: 0 auto; }

/* Unified Interaction Hint */
.interaction-hint { 
    display: inline-block; 
    font-family: var(--font-ui); 
    font-size: 11px; 
    color: var(--ink); 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    margin-top: 8px; 
    margin-bottom: 24px; 
    padding-bottom: 0;
    border: none;
    text-decoration: none;
    text-underline-offset: 4px;
}

/* --- STORM PHASES VERTICAL LAYOUT --- */
.storm-phases-wrapper { width: 100%; }
.storm-phase-row { 
    display: flex; 
    align-items: flex-start; 
    justify-content: space-between; 
    gap: 40px; 
    padding: 60px 0; 
    position: relative;
}
.storm-phase-row:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background-color: var(--smoke);
}

.storm-phase-meta { flex: 0 0 280px; display: flex; flex-direction: column;}
.storm-phase-number { font-family: var(--font-head); font-size: 64px; font-weight: 900; color: var(--smoke); line-height: 1; letter-spacing: -2px; margin-bottom: 12px; }
.storm-phase-rule { width: 40px; height: 3px; background: transparent; margin-bottom: 20px; }
.storm-phase-title { font-family: var(--font-head); font-size: 28px; font-weight: 900; color: var(--ink); margin: 0 0 12px 0; line-height: 1.1; letter-spacing: -0.5px; }
.storm-phase-desc { font-family: var(--font-body); font-size: 15px; margin: 0; color: var(--dust); text-align: left; line-height: 1.7; }

/* Timeline Phase Callouts */
.phase-stat-callout {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(19,17,16,0.03);
    border-left: 2px solid var(--crimson);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}
.phase-stat-callout.mobile-stat {
    margin-top: 12px;
    padding: 10px 14px;
}
.stat-highlight {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 900;
    color: var(--crimson);
    letter-spacing: -0.5px;
    line-height: 1;
}
.stat-text {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.storm-phase-visual { flex: 1; max-width: 600px; }
.storm-phase-img { 
    width: 100%; 
    height: auto; 
    border-radius: var(--radius-sm); 
    display: block; 
    box-shadow: none; 
    border: none; 
}

.phase-row-reverse { flex-direction: row-reverse; }
.phase-row-reverse .storm-phase-meta { align-items: flex-end; text-align: right; }
.phase-row-reverse .storm-phase-desc { text-align: right; border-left: none; }
.phase-row-reverse .phase-stat-callout { text-align: right; border-left: none; border-right: 2px solid var(--crimson); }

/* --- EDITORIAL MAP CAROUSEL --- */
.editorial-carousel-wrapper { position: relative; width: 100%; display: flex; flex-direction: column; margin-bottom: 20px; }
.editorial-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; width: 100%; padding-bottom: 20px; }
.editorial-carousel::-webkit-scrollbar { display: none; }
.editorial-slide { flex: 0 0 100%; min-width: 100%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; }
.slide-img-container { width: 100%; max-width: 1000px; margin-bottom: 24px; }
.slide-img-container img { margin: 0; border-radius: var(--radius-sm); }
.editorial-caption { display: flex; max-width: 1000px; width: 100%; align-items: flex-start; text-align: left; margin-top: 20px; border-top: 1px solid var(--smoke); padding-top: 20px;}
.caption-left { flex: 0 0 300px; padding-right: 30px; }
.caption-right { flex: 1; display: flex; flex-direction: column; padding-top: 6px;}
.editorial-caption p { font-family: var(--font-body); font-size: 15px; margin: 0; color: var(--dust); text-align: left; line-height: 1.7; }
.carousel-dots .dot { width: 6px; height: 6px; background: var(--smoke); border-radius: 50%; transition: background var(--dur-fast); }
.carousel-dots .dot.active { background: var(--ink); }

/* --- BUTTONS --- */
.map-controls { display: flex; justify-content: center; margin-top: 20px; }
.btn-primary { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background: transparent; 
    color: var(--ink); 
    border: 2px solid var(--ink); 
    padding: 12px 24px; 
    font-family: var(--font-ui); 
    font-weight: 700; 
    font-size: 11px; 
    text-transform: uppercase; 
    letter-spacing: .12em; 
    cursor: pointer; 
    border-radius: var(--radius-pill); 
    transition: all var(--dur-fast) var(--ease-out);
    text-decoration: none;
}
.btn-primary:hover { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-md); }

.bmc-logo-link {
    display: inline-block;
    transition: opacity 180ms ease, transform 180ms ease;
}
.bmc-logo-link:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.stage-annotation { padding-top: 16px; margin-top: 24px; margin-bottom: 50px; }
.stage-annotation p { font-family: var(--font-ui); font-size: 11px; color: var(--dust); margin-bottom: 0; text-align: center; }

/* --- COMPARISON SLIDER --- */
.comparison-slider-wrapper { position: relative; width: 100%; max-width: 900px; aspect-ratio: 900 / 599 !important; margin: 0 auto; overflow: hidden; background: var(--ink); border: 1px solid var(--smoke); user-select: none; -webkit-user-select: none; touch-action: none; border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.img-layer { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
.img-layer img { width: 100% !important; height: 100% !important; object-fit: cover !important; opacity: 0.95; pointer-events: none; }
.before-img { z-index: 2; border-right: 2px solid var(--azure); overflow: hidden; width: 50%; min-width: 0; max-width: 100%; }
.after-img { z-index: 1; }

.minimal-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background-color: rgba(255,255,255,0.8); transform: translateX(-50%); z-index: 5; display: flex; align-items: center; justify-content: center; cursor: ew-resize; touch-action: none; pointer-events: auto;}
.minimal-handle::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; background: #FFFFFF; border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: -1; }
.minimal-handle svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 10; pointer-events: none; stroke: var(--ink); }

.slider-label { position: absolute; bottom: 20px; font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; padding: 6px 12px; background: rgba(19, 17, 16, 0.8); color: var(--paper); border-radius: var(--radius-sm); z-index: 4; pointer-events: none; }
.label-before { left: 20px; }
.label-after { right: 20px; }

/* --- SHARE & SUPPORT SECTION --- */
.share-section { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center;
    gap: 24px; 
    padding: 40px 0; 
    margin: 40px auto 0 auto; 
    border-top: 2px solid var(--ink); 
}
.share-row { 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    width: 100%; 
    justify-content: center; 
}
.share-title { 
    font-family: var(--font-ui); 
    font-size: 11px; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: var(--ink); 
    letter-spacing: .18em; 
    white-space: nowrap; 
    margin: 0; 
}
.share-line { 
    flex-grow: 1; 
    height: 1px; 
    background: var(--smoke); 
    margin: 0 30px; 
}
.share-icons { 
    display: flex; 
    gap: 24px; 
    align-items: center; 
}
.share-icons a { 
    color: var(--ink); 
    transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); 
    display: flex; 
    align-items: center; 
}
.share-icons a:hover { 
    color: var(--azure); 
    transform: translateY(-2px); 
}

.support-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.bmc-standalone {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 0;
    margin: 0 auto;
    border-top: 1px solid var(--smoke);
}

.bmc-support-text {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--dust);
    margin-bottom: 0;
}

/* --- TABBED CITE SECTION --- */
.cite-section {
    background: var(--paper-mid);
    border-top: 1px solid var(--smoke);
    padding: 56px 0;
}
.cite-section .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligned left */
}
.cite-heading {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 24px 0;
    color: var(--ink);
    letter-spacing: -0.5px;
    width: 100%;
    max-width: 760px;
}
.cite-tabs {
    display: flex;
    gap: 24px;
    width: 100%;
    max-width: 760px;
    border-bottom: 2px solid var(--smoke);
    margin-bottom: 32px;
}
.cite-tab {
    background: transparent;
    border: none;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--dust);
    cursor: pointer;
    padding: 0 0 12px 0;
    position: relative;
    transition: color 0.2s;
}
.cite-tab:hover {
    color: var(--ink);
}
.cite-tab.active {
    color: var(--ink);
}
.cite-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ink);
}

.cite-panels-container {
    width: 100%;
    max-width: 760px;
}
.cite-panel-content {
    display: none;
    background: var(--paper);
    border: 1px solid var(--smoke);
    border-radius: var(--radius-md);
    padding: 24px 32px;
    position: relative;
}
.cite-panel-content.active {
    display: block;
    animation: fadeInTab 0.3s ease-out forwards;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.cite-text {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    line-height: 1.7;
    margin: 0 0 20px 0;
}
.cite-code {
    font-family: monospace;
    font-size: 13px;
    background: var(--paper-mid);
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    white-space: pre;
    display: block;
    margin-bottom: 20px;
}
.cite-copy {
    background: transparent;
    border: 1px solid var(--smoke);
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ink);
    padding: 8px 20px;
    cursor: pointer;
    transition: all 180ms cubic-bezier(0.19, 1, 0.22, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cite-copy:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.cite-copy.copied {
    background: var(--azure);
    color: var(--paper);
    border-color: var(--azure);
}

/* --- FOOTER --- */
.data-sources-footer { background-color: var(--paper-mid); padding: 40px 0; border-top: 1px solid var(--smoke); }
.data-sources-footer p { font-family: var(--font-ui); font-size: 11px; color: var(--dust); margin: 0; line-height: 1.6; text-transform: uppercase; letter-spacing: .05em; }
.data-sources-footer p a { color: inherit; text-decoration: underline; font-weight: 700; transition: opacity var(--dur-fast); }
.data-sources-footer p a:hover { opacity: 0.7; }

.site-footer { background: var(--ink); color: var(--paper); padding: 60px 0 0 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer-left { display: flex; flex-direction: column; justify-content: center; }
.footer-right { display: flex; flex-direction: column; gap: 20px; }
.footer-logo { font-family: var(--font-head); font-size: 24px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 12px; color: var(--paper); text-transform: none; }
.footer-summary { font-family: var(--font-body); font-size: 14px; color: rgba(246,243,236,0.75); max-width: 400px; line-height: 1.7; }
.meta-section { display: block; }
.meta-label { font-family: var(--font-ui); display: block; font-size: 9px; font-weight: 700; text-transform: uppercase; color: rgba(246,243,236,0.5); letter-spacing: .18em; margin-bottom: 4px; }
.meta-content { font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: var(--paper); }
.credits-lane { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.credit-box { display: flex; flex-direction: column; }
.author-name { white-space: nowrap; font-weight: 500; color: var(--paper); }
.footer-link { color: rgba(246,243,236,0.75) !important; font-family: var(--font-ui); font-weight: 500; transition: color var(--dur-fast); text-decoration: none; }
.footer-link:hover { color: var(--paper) !important; text-decoration: underline; }

.footer-bottom { border-top: 1px solid rgba(246,243,236,0.1); padding: 30px 0; background: rgba(0,0,0,0.2); width: 100%; display: flex; justify-content: center; }
.footer-bottom p { font-family: var(--font-ui); font-size: 10px; color: rgba(246,243,236,0.4); text-align: center; margin: 0; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; line-height: 1.6; }
.back-to-top { position: fixed; bottom: 30px; right: 30px; background: var(--ink); color: var(--paper); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-size: 18px; font-weight: 700; cursor: pointer; border: none; opacity: 0; pointer-events: none; transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out); z-index: 9000; box-shadow: var(--shadow-md); }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--azure); transform: translateY(-3px); }

/* --- GLOBAL TOOLTIP --- */
.tooltip-glass {
    position: fixed;
    visibility: hidden;
    background: rgba(246, 243, 236, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 22px 26px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-tooltip);
    z-index: 10000;
    pointer-events: none;
    font-family: var(--font-ui);
    min-width: 240px;
    max-width: 320px;
    border: 1px solid var(--smoke);
}
.tooltip-glass .close-tooltip { display: none; }
.tooltip-glass.active-mobile-tooltip { display: none !important; }

.tt-title { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--dust); margin-bottom: 10px; border-bottom: 1px solid var(--smoke); padding-bottom: 8px; }
.tt-val-large { font-family: var(--font-head); font-size: 36px; font-weight: 900; color: var(--ink); margin-bottom: 6px; line-height: 1; letter-spacing: -0.5px; }
.tt-val-red { color: var(--crimson); }
.tt-desc { font-size: 12px; color: var(--dust); margin: 0; line-height: 1.65; }
.tt-flex { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--ink);}
.tt-total { border-top: 1px solid var(--smoke); padding-top: 8px; font-weight: 700; display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--ink);}
.tt-context { font-size: 11px; color: var(--dust); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--smoke); line-height: 1.6; }

/* --- MOBILE TAP SHEET --- */
.mobile-tap-sheet {
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  background: var(--paper);
  border-radius: 16px 16px 0 0;
  padding: 12px 24px 36px 24px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.35s;
  max-height: 55vh;
  overflow-y: auto;
  border-top: 1px solid var(--smoke);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}
.mobile-tap-sheet.is-open {
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.tap-sheet-handle-bar {
  width: 40px;
  height: 4px;
  background: var(--smoke);
  border-radius: 2px;
  margin: 0 auto 20px auto;
}
.tap-sheet-content { color: var(--ink); font-family: var(--font-ui); }
.tap-sheet-content .tt-title { color: var(--dust); border-bottom: 1px solid var(--smoke); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; margin-bottom: 10px; padding-bottom: 8px; }
.tap-sheet-content .tt-val-large { font-family: var(--font-head); font-size: 36px; font-weight: 900; margin-bottom: 6px; line-height: 1; letter-spacing: -0.5px; }
.tap-sheet-content .tt-val-red { color: var(--crimson); }
.tap-sheet-content .tt-desc { color: var(--dust); font-size: 12px; margin: 0; line-height: 1.65;}
.tap-sheet-content .tt-flex,
.tap-sheet-content .tt-total { color: var(--ink); display: flex; justify-content: space-between; font-size: 12px; font-weight: 500;}
.tap-sheet-content .tt-total { border-top: 1px solid var(--smoke); padding-top: 8px; font-weight: 700; margin-top: 8px;}
.tap-sheet-close {
  display: block; width: 100%; margin-top: 20px; padding: 12px; background: var(--paper-mid); border: 1px solid var(--smoke); border-radius: 8px; color: var(--ink); font-family: var(--font-ui); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer;
}
.mobile-tap-overlay {
  visibility: hidden; opacity: 0; position: fixed; inset: 0; background: rgba(19,17,16,0.5); z-index: 10000; transition: opacity 0.3s, visibility 0.3s;
}
.mobile-tap-overlay.is-open { visibility: visible; opacity: 1; }

@media (min-width: 769px) {
  .mobile-tap-sheet, .mobile-tap-overlay { display: none !important; }
}

/* --- DASHBOARD LAYOUT --- */
.editorial-legend {
    display: flex; align-items: center; justify-content: center; padding: 0.85rem 2rem; border-bottom: 1px solid var(--smoke); border-top: 1px solid var(--smoke); font-family: var(--font-ui); background-color: var(--paper); position: sticky; top: 0; box-shadow: var(--shadow-sm); z-index: 50;
}
.legend-title { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--dust); margin-right: 1.5rem; padding-right: 1.5rem; border-right: 1px solid var(--smoke); }
.legend-items { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--ink); white-space: nowrap;}
.legend-swatch { width: 10px; height: 16px; stroke: var(--paper); stroke-width: 2px; }
.legend-swatch.affected { fill: var(--ink); }
.legend-swatch.casualties { fill: var(--crimson); }
.legend-swatch.missing { fill: var(--dust); }

.spiral-dashboard { display: flex; flex-direction: column; width: 100%; }

.viz-panel { display: flex; flex-direction: column; justify-content: center; width: 100%; padding: 6vh 2rem 2vh 2rem; background-color: var(--paper); }
.viz-header { text-align: center; max-width: 700px; margin: 0 auto 2rem auto; }
.demo-kicker { font-family: var(--font-ui); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--crimson); display: block; margin-bottom: 10px; }
.panel-day1 .demo-kicker { color: var(--dust); }
.demo-headline { font-family: var(--font-head); font-size: clamp(32px, 5vw, 48px); font-weight: 900; line-height: 1.05; letter-spacing: -1.5px; color: var(--ink); margin: 0 0 8px 0; }
.demo-lead { font-family: var(--font-body); font-size: 15px; color: var(--dust); margin: 0 0 16px 0; }
.demo-context { font-family: var(--font-body); font-size: 14px; line-height: 1.6; color: var(--dust); margin: 0; }

.stats-row { display: flex; justify-content: center; gap: 3rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--smoke); }
.stat-block { text-align: center; }
.demo-metric-val { font-family: var(--font-head); font-size: clamp(28px, 3vw, 36px); font-weight: 900; line-height: 1.1; letter-spacing: -1px; color: var(--ink); overflow: visible; padding-bottom: 4px; }
.demo-metric-label { font-family: var(--font-ui); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--dust); margin-top: 8px; }
.highlight { color: var(--crimson); }
.text-dust { color: var(--dust); }

.canvas-wrapper { width: 100%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--dur-slow) var(--ease-out); margin-bottom: 20px; }
.canvas-wrapper.fade-in-visible { opacity: 1; }

.time-divider { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 2rem 0; }
.time-line { width: 1px; height: 60px; border-left: 1px dashed var(--smoke); }
.time-badge { font-family: var(--font-ui); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--dust); background: var(--paper-mid); padding: 8px 16px; border-radius: 20px; border: 1px solid var(--smoke); margin: 10px 0; }

/* --- SECTION DETAILS --- */
.ditwah-section { max-width: var(--lane-full); margin: 0 auto; padding-top: 40px; }
.section-header { margin-bottom: 60px; max-width: 900px; text-align: left; }
.kicker { font-family: var(--font-ui); font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--crimson); letter-spacing: .18em; display: block; margin-bottom: 10px; }
.headline { font-family: var(--font-head); font-size: 36px; font-weight: 900; line-height: 1.1; letter-spacing: -0.5px; margin: 0; color: var(--ink); }
.lead { font-family: var(--font-body); font-size: 14px; color: var(--dust); margin: 12px 0 0 0; font-weight: 400; line-height: 1.7; }
.footer { font-family: var(--font-ui); font-size: 11px; color: var(--dust); text-transform: uppercase; border-top: 1px solid var(--smoke); padding-top: 16px; display: flex; justify-content: space-between; }

/* --- INFRASTRUCTURE CHART --- */
#sect-infra .chart-wrapper { max-width: 900px; position: relative; margin: 0; text-align: left; }
#sect-infra .svg-container { overflow: visible; width: 100%; margin-top: 20px; display: block; aspect-ratio: 800 / 350; }
#sect-infra .axis-line { stroke: var(--smoke); stroke-width: 1; }
#sect-infra .axis-text { font-family: var(--font-ui); font-size: 11px; fill: var(--dust); font-weight: 500; }
#sect-infra .stem { stroke: var(--smoke); stroke-width: 2; transition: stroke var(--dur-fast) var(--ease-out), stroke-width var(--dur-fast) var(--ease-out); pointer-events: none; }
#sect-infra .head { fill: var(--ink); transition: fill var(--dur-fast) var(--ease-out); cursor: pointer; transform-origin: center; transform-box: fill-box; pointer-events: none;}
#sect-infra .data-label { font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: .05em; fill: var(--ink); pointer-events: none; transition: fill var(--dur-fast) var(--ease-out); }
#sect-infra .data-group { cursor: crosshair; }
#sect-infra .data-group:hover .stem, #sect-infra .data-group.active-touch .stem { stroke: var(--crimson); stroke-width: 3; }
#sect-infra .data-group:hover .head, #sect-infra .data-group.active-touch .head { fill: var(--crimson); transform: scale(1.2); }
#sect-infra .data-group:hover .data-label, #sect-infra .data-group.active-touch .data-label { fill: var(--crimson); }

/* --- ARC CHART --- */
#sect-arc .chart-container { max-width: 1000px; position: relative; cursor: crosshair; width: 100%; overflow-x: auto; scrollbar-width: none; }
#sect-arc .chart-container::-webkit-scrollbar { display: none; }
#sect-arc .svg-content { width: 100%; min-width: 600px; height: auto; overflow: visible; display: block; aspect-ratio: 900 / 450; }
#sect-arc .tracker-line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 4,2; visibility: hidden; pointer-events: none; }
#sect-arc .annotation-box { font-family: var(--font-ui); font-size: 11px; font-weight: 700; text-transform: uppercase; fill: var(--ink); }
#sect-arc .annotation-sub { font-family: var(--font-ui); font-size: 10px; fill: var(--dust); }
#sect-arc .legend { display: flex; gap: 24px; margin-bottom: 24px; font-family: var(--font-ui); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink); flex-wrap: nowrap; justify-content: flex-start; }
#sect-arc .legend-item { display: flex; align-items: center; gap: 8px; white-space: nowrap;}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-red { background: var(--crimson); }
.dot-charcoal { background: var(--ink); }
#sect-arc .area-host { fill: var(--dust); transition: opacity var(--dur-fast); }
#sect-arc .area-safety { fill: var(--crimson); transition: opacity var(--dur-fast); }

/* --- MATRIX CHART --- */
#sect-matrix .matrix-wrapper { width: 100%; max-width: 100%; margin: 0; }
#sect-matrix .legend-grid { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
#sect-matrix .legend-item { flex: 1; padding: 0; cursor: default; display: flex; flex-direction: column; justify-content: flex-start;}
#sect-matrix .legend-val { font-family: var(--font-head); font-size: 32px; font-weight: 900; display: block; line-height: 1; margin-bottom: 8px; letter-spacing: -1px; }
#sect-matrix .legend-label { font-family: var(--font-ui); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink); display: flex; align-items: center; gap: 8px; }

.dot-damaged { background: var(--crimson); }
.dot-shelter { background: var(--ink); }
.dot-closed  { background: var(--dust); }
.dot-open    { background: var(--open-blue); }   

.val-damaged { color: var(--crimson); }
.val-shelter { color: var(--ink); }
.val-closed  { color: var(--dust); }
.val-open    { color: var(--open-blue); }             

.matrix-scroll-wrapper { position: relative; display: flex; justify-content: flex-start; width: 100%; overflow: hidden; }
#sect-matrix .viz-container { position: relative; width: 100%; user-select: none; min-height: 300px; }
#sect-matrix #matrix-canvas { display: block; margin: 0; max-width: 100%; height: auto; cursor: crosshair; }

/* --- FUNDING VESSEL --- */
#sect-funding .funding-spread { max-width: var(--lane-full); }
#sect-funding .stage { position: relative; height: 600px; display: flex; gap: 160px; }
#sect-funding .vessel-area { position: relative; width: 350px; height: 500px; flex-shrink: 0; margin: 0 auto; }
#sect-funding .vessel-frame { position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 260px; height: 480px; border: 3px solid var(--ink); border-top: none; background: var(--paper-mid); }
#sect-funding .vessel-fill { position: absolute; bottom: 0; width: 100%; background: var(--ink); height: 0%; transition: height var(--dur-cinematic) var(--ease-out); }
#sect-funding .target-cap { position: absolute; top: 0; width: 100%; border-top: 4px solid var(--ink); }
#sect-funding .conduit-area { position: relative; width: 120px; height: 500px; flex-shrink: 0; }
#sect-funding .conduit-pipe { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; border-left: 8px dotted var(--crimson); opacity: 0.4; }
#sect-funding .conduit-label { position: absolute; top: -40px; left: 50%; transform: translateX(-50%); font-family: var(--font-ui); font-size: 10px; font-weight: 700; color: var(--crimson); text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; }
#sect-funding .conduit-desc { position: absolute; bottom: -50px; width: 160px; left: 50%; transform: translateX(-50%); font-family: var(--font-ui); font-size: 9px; font-weight: 700; color: var(--dust); text-align: center; text-transform: uppercase; letter-spacing: .05em; }
#sect-funding .label-anchor { position: absolute; font-family: var(--font-ui); font-size: 11px; font-weight: 700; color: var(--dust); text-transform: uppercase; width: 200px; }
#sect-funding .label-anchor b { font-family: var(--font-head); color: var(--ink); font-size: 22px; font-weight: 900; display: block; margin-bottom: 4px; }
#sect-funding .line-leader { position: absolute; height: 1px; background: var(--smoke); }
#sect-funding .line-right { width: 35px; right: -10px; top: 12px; }
#sect-funding .line-left { width: 35px; left: -10px; top: 35px; }
#sect-funding .line-left-red { width: 35px; left: -10px; top: 0; background: var(--crimson); }
#sect-funding .label-target { bottom: 470px; right: 100%; text-align: right; padding-right: 40px; }
#sect-funding .label-launch { bottom: 130px; right: 100%; text-align: right; padding-right: 40px; }
#sect-funding .label-plateau { bottom: 350px; left: 100%; padding-left: 40px; color: var(--crimson); }
#sect-funding .label-current { bottom: 230px; left: 100%; padding-left: 40px; color: var(--ink); }
#sect-funding .plateau-kicker { font-size: 9px; font-weight: 700; letter-spacing: .12em; display: block; margin-bottom: 4px; }
#sect-funding .growth-metric { font-size: 10px; display: block; margin-top: 4px; color: var(--dust); font-weight: 500; }
#sect-funding .insights { flex: 1; display: flex; flex-direction: column; gap: 40px; justify-content: center; min-width: 300px; }
#sect-funding .fact-card { padding: 40px 0; border: none; background: transparent; }
#sect-funding .fact-kicker { font-family: var(--font-ui); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--dust); }
#sect-funding .fact-num { font-family: var(--font-head); font-size: 56px; font-weight: 900; line-height: 1.1; margin: 12px 0 0 0; color: var(--ink); overflow: visible; padding-bottom: 4px;}
#sect-funding .progress-meter { height: 12px; background: var(--smoke); width: 100%; margin: 24px 0; border-radius: 6px; overflow: hidden; }
#sect-funding .progress-fill { height: 100%; background: var(--crimson); width: 0%; transition: width var(--dur-cinematic) var(--ease-out); }
#sect-funding .fact-desc { font-family: var(--font-body); font-size: 14px; color: var(--dust); margin: 0; line-height: 1.7; }
#sect-funding .fact-text-only { padding: 0; }
#sect-funding .fact-kicker-dark { font-family: var(--font-ui); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--ink); display: block; margin-bottom: 10px; }
#sect-funding .fact-desc-dark { font-family: var(--font-body); font-size: 14px; color: var(--dust); line-height: 1.7; margin-top: 0; }

/* Closure footer */
.closure-bleed-container { overflow: hidden; margin-bottom: 0; padding-bottom: 0; border-bottom: none;}
.closure-box { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; background: var(--ink); color: var(--paper); padding: 80px 0; border-radius: 0; margin-top: 0; }
.closure-box-inner { display: flex; align-items: flex-end; justify-content: space-between; }
.closure-kicker { font-family: var(--font-ui); font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--dust); letter-spacing: 0.15em; }
.closure-num { font-family: var(--font-head); font-size: 80px; font-weight: 900; line-height: 1.1; color: var(--paper); letter-spacing: -2px; margin-top: 10px; overflow: visible; padding-bottom: 4px;}
.closure-context { max-width: 500px; text-align: right; }
.closure-title { font-family: var(--font-head); font-size: 24px; font-weight: 900; text-transform: uppercase; color: #E24A42; margin: 0 0 12px 0; }
.closure-desc { font-family: var(--font-body); font-size: 14px; color: rgba(246, 243, 236, 0.75); margin: 0; line-height: 1.7; }

/* Final Thoughts */
#final-thoughts-section { padding-top: 60px; padding-bottom: 20px; margin-top: 0 !important; }

/* =========================================
   TABLET
   ========================================= */
@media (max-width: 1024px) {
    #desktop-warning-banner { display: flex; justify-content: center; align-items: center; }

    .editorial-legend { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 1rem; }
    .legend-title { border-right: none; border-bottom: 1px solid var(--smoke); padding-right: 0; padding-bottom: 0.5rem; margin-right: 0; width: 100%; }
    .legend-items { gap: 1rem; justify-content: flex-start; }
    .viz-panel { padding: 5vh 1rem; height: auto; }
    .stats-row { gap: 1.5rem; }
    .canvas-wrapper { min-height: 60vw; margin-top: 2rem; }
}

@media (max-width: 520px) {
    .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
}

/* =========================================
   MOBILE — System v2 Responsive
   ========================================= */
@media (max-width: 768px) {
    :root { --gap-section: 44px; }

    .mobile-only { display: inline-block !important; }
    .desktop-only { display: none !important; }

    .reading-lane, .stage-lane, .container { padding: 0 20px; }
    .story-section { margin-top: var(--gap-section); }
    .bg-alt { padding: 48px 0; }
    .mt-large { margin-top: 32px; }
    .mt-base { margin-top: 20px; }

    /* Text-Only Cinematic Hero */
    .hero-flex-layout {
        padding-top: 80px; 
        padding-bottom: 48px;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
    }
    
    .hero-content {
        flex-shrink: 0;
        margin-top: 10px;
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-title {
        margin-bottom: 12px;
        font-size: clamp(2.3rem, 9vw, 3rem);
        letter-spacing: -1.2px; line-height: 1.06;
    }
    .hero-subtitle {
        font-size: 1rem; 
        max-width: 100%;
        margin-bottom: 16px; 
        line-height: 1.45; 
    }
    
    /* Hide the illustration completely inside the hero */
    .hero-mobile-img-wrapper {
        display: none !important;
    }
    
    /* Tightened Byline Metadata */
    .hero-bylines {
        padding-top: 12px;
        max-width: 100%;
        align-items: center; 
        flex-direction: column;
    }
    .hero-bylines .meta-row:first-child {
        margin-bottom: 2px;
    }
    .hero-bylines .meta-row:last-child {
        margin-top: 2px;
    }
    
    .meta-row { justify-content: center; flex-wrap: nowrap; }
    .meta-authors { display: block; white-space: nowrap; font-size: 9px;}
    .mobile-hide { display: none !important; }
    .meta-date { display: inline-block; white-space: nowrap; font-size: 9px; margin-top: 8px;}

    /* Absolute Positioning for Scroll Indicator */
    .scroll-indicator-wrapper {
        position: absolute;
        bottom: 32px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        margin: 0 !important;
    }
    .scroll-text-pulse {
        font-size: 9px;
        letter-spacing: 0.2em;
        opacity: 0.5 !important;
    }

    /* Cinematic Image Reveal Section */
    .mobile-hero-image-reveal {
        width: 100%;
        height: auto;
        min-height: 68vh;
        overflow: hidden;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: var(--paper);
    }
    .mobile-hero-image-reveal img {
        width: 100%;
        height: 65vh;
        object-fit: contain;
        object-position: center center;
        display: block;
    }

    /* Content Teaser Cue Below Image */
    .image-continue-cue {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 20px 0 32px 0;
        font-family: var(--font-ui);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.2em;
        color: var(--dust);
        opacity: 0.7;
    }
    
    .subhead { font-size: 1.8rem; letter-spacing: -0.7px; margin-bottom: 10px; }
    body { font-size: 16px; line-height: 1.72; }
    p { margin-bottom: 1.2rem; }

    .pull-quote { font-size: 1.25rem; max-width: 100%; margin: 36px auto; padding: 26px 0; }
    .pull-quote::before { font-size: 2.8rem; margin-bottom: 8px; }
    .dropcap::first-letter { font-size: 3.8rem; padding-right: 8px; }

    .interaction-hint { margin-top: 10px; margin-bottom: 16px; display: inline-block !important; border-left: none; padding-left: 0; padding-bottom: 0;}

    .data-breakout-band { margin: 20px 0 36px 0; padding: 0; }
    .metrics-row { gap: 16px; }
    .metrics-grid-5 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; }
    .metric-card { width: 100%; height: 100%; align-items: center; justify-content: center; text-align: center; margin-bottom: 0; padding: 24px 12px; background: var(--paper-mid); border-radius: var(--radius-md); border: none; opacity: 1 !important; transform: none !important;}
    .metric-card.full-width-mobile { grid-column: span 2; }
    .metric-card .m-val { font-size: 36px; letter-spacing: -1px; padding-bottom: 0;}
    .metric-card .m-unit { font-size: 1.4rem; }
    .metric-card .m-label { font-size: 10px; letter-spacing: .12em; margin-top: 4px; white-space: normal; line-height: 1.2;}

    .section-header { margin-bottom: 30px; }
    .headline { font-size: 24px; line-height: 1.15; }
    .headline br { display: none; }
    .lead { font-size: 13px; }

    .viz-panel { padding: 8vw 0 5vw 0; }
    .viz-header { max-width: 100%; margin-bottom: 1.2rem; }
    .demo-headline { font-size: 26px; }
    .demo-lead, .demo-context { font-size: 13px; }
    .stats-row { gap: 10px; padding-top: 1rem; margin-top: 1rem; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; width: 100%; border-top: none;}
    .stat-block { flex: 1; border-top: 1px solid var(--smoke); padding-top: 8px;}
    .demo-metric-val { font-size: 24px; }
    .demo-metric-label { font-size: 8px; }

    .ditwah-section { margin: 0 -20px; padding-left: 20px; padding-right: 20px; width: 100vw; max-width: 100vw; }
    #sect-spirals .editorial-legend { margin: 0 -20px; padding: 0.7rem 1rem; flex-direction: column; align-items: flex-start; width: 100vw; }
    .legend-title { font-size: 9px; width: 100%; border-right: none; border-bottom: 1px solid var(--smoke); padding-right: 0; padding-bottom: 0.4rem; margin-right: 0; margin-bottom: 0.5rem; }
    .legend-items { gap: 0.9rem; flex-direction: row; }
    .legend-item { font-size: 10px; gap: 5px; }

    .editorial-caption { flex-direction: column; gap: 10px; margin-top: 0;}
    .caption-left { flex: none; width: 100%; border-top: none; padding-top: 0; padding-right: 0; margin-top: 0;}
    .caption-left .phase-title { font-size: 17px; }
    .caption-left .phase-title br { display: none; }
    .caption-right { border-top: none; padding-top: 0; }
    .caption-right p { font-size: 13px; }

    .comparison-slider-wrapper { height: auto; max-width: 100%; }

    .btn-primary { width: 100%; justify-content: center; }

    /* Share and Support adjustments */
    .share-section { margin: 20px auto 0 auto; padding: 24px 20px; text-align: center; }
    .share-row { flex-direction: column; align-items: center; gap: 16px; margin-bottom: 24px; }
    .share-line { display: none; }
    .support-row { justify-content: center; width: 100%; }

    /* Cite Section adjustments */
    .cite-section { padding: 32px 20px; }
    .cite-section .container { padding: 0; }
    .cite-heading { font-size: 20px; margin-bottom: 16px; }
    .cite-tabs { gap: 16px; margin-bottom: 20px; }
    .cite-panel-content { padding: 20px 16px; }
    .cite-code { font-size: 11px; padding: 12px; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; margin-bottom: 28px; }
    .credits-lane { grid-template-columns: 1fr; gap: 20px; }
    .footer-logo { font-size: 20px; text-align: left;}
    .footer-summary { font-size: 13px; }
    .data-sources-footer p { font-size: 10px; }
    .footer-bottom { padding: 20px 20px; }

    .back-to-top { width: 40px; height: 40px; font-size: 15px; bottom: 14px; right: 14px; }

    .full-edge-mobile { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; width: 100vw; max-width: 100vw; }

    #sect-infra .chart-wrapper { overflow-x: auto; padding-left: 20px; padding-right: 20px; padding-bottom: 12px; -webkit-overflow-scrolling: touch; margin-left: -20px; margin-right: -20px; width: 100vw; }
    #sect-infra .svg-container { min-width: 600px; width: 600px; }

    #sect-matrix .legend-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 30px; }
    #sect-matrix .legend-item { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; width: 100%; padding: 0; }
    #sect-matrix .legend-val { margin-bottom: 4px; font-size: 32px; line-height: 1; display: block;}
    #sect-matrix .legend-label { white-space: normal; line-height: 1.2; font-size: 10px; display: flex; align-items: flex-start; gap: 6px; text-align: left; }
    #sect-matrix .dot { width: 8px; height: 8px; margin-top: 2px; }
    
    /* MOBILE MATRIX CENTER FIX */
    .matrix-scroll-wrapper { 
        display: flex;
        justify-content: center;
        padding-bottom: 10px; 
        margin-left: 0; 
        margin-right: 0; 
        padding-left: 0; 
        padding-right: 0;
        width: 100%;
        overflow: hidden;
    }
    #sect-matrix .viz-container { 
        display: flex; 
        justify-content: center;
        width: 100%; 
        position: relative; 
        user-select: none;
    }
    #sect-matrix #matrix-canvas { margin: 0 auto; display: block; max-width: 100%; height: auto; cursor: crosshair; }

    #sect-arc .chart-container { overflow-x: auto; padding-left: 20px; padding-right: 20px; padding-bottom: 12px; -webkit-overflow-scrolling: touch; margin-left: -20px; margin-right: -20px; width: 100vw;}
    #sect-arc .legend { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; justify-content: flex-start; gap: 16px; margin-bottom: 20px;}
    #sect-arc .legend-item { flex-shrink: 0; font-size: 9px; }
    #sect-arc .svg-content { min-width: 580px; }
    #sect-arc #grid text { font-size: 12px !important; font-weight: 700; fill: var(--ink) !important;}
    #sect-arc .annotation-box { font-weight: 900; fill: var(--ink); }

    .m-funding-bar-container { width: 100%; height: 16px; background: var(--smoke); border-radius: 4px; overflow: hidden; margin: 12px 0; }
    .m-funding-fill { height: 100%; background: var(--ink); border-radius: 4px; width: 0%; transition: width var(--dur-cinematic) var(--ease-out); }
    .m-target { font-family: var(--font-head); font-weight: 900; color: var(--ink); font-size: 22px; display: block; margin-bottom: 8px;}
    .m-flex-spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;}
    .m-funding-val { font-family: var(--font-head); font-weight: 900; color: var(--ink); font-size: 18px;}
    .m-funding-gap { font-family: var(--font-head); font-weight: 900; color: var(--crimson); font-size: 18px;}

    #sect-funding .stage { flex-direction: column; gap: 32px; height: auto; align-items: stretch; padding-top: 0; }
    #sect-funding .insights { width: 100%; max-width: 100%; min-width: 0; gap: 20px; margin-top: 20px; }
    #sect-funding .fact-card { padding: 0; }
    #sect-funding .fact-num { font-size: 40px; }

    .closure-box { padding: 40px 20px; margin-top: 40px; }
    .closure-box-inner { flex-direction: column; align-items: flex-start; gap: 20px; padding: 0; }
    .closure-num { font-size: 52px; }
    .closure-context { text-align: left; max-width: 100%; }

    #final-thoughts-section { padding-top: 40px; padding-bottom: 10px; }
}

@media (max-width: 400px) {
    .hero-title { font-size: 2.3rem; }
}
