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

body {
    font-family: 'Inter', 'Georgia', serif;
    background: linear-gradient(135deg, #0a1628 0%, #0f1a2f 100%);
    color: #e2e8f0;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #64b5f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

.subtitle {
    font-size: 1rem;
    color: #94a3b8;
}

.team {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 8px;
}

.hook {
    background: rgba(100, 181, 246, 0.08);
    border-left: 4px solid #64b5f6;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.hook p {
    font-size: 1rem;
    line-height: 1.5;
}

.hook .question {
    font-weight: 600;
    color: #64b5f6;
    margin-top: 10px;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.story-card {
    background: rgba(255, 255, 255, 0.04);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.story-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #64b5f6;
    font-weight: 600;
}

.story-card h3 {
    font-size: 1.1rem;
    margin: 10px 0;
}

.story-card p {
    font-size: 0.8rem;
    color: #cbd5e1;
}

.controls {
    background: rgba(255, 255, 255, 0.04);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-group label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #94a3b8;
}

.scenario-buttons {
    display: flex;
    gap: 8px;
}

.scenario-btn {
    padding: 6px 16px;
    border: 2px solid;
    background: transparent;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.scenario-btn[data-scenario="ssp126"] {
    border-color: #27ae60;
    color: #27ae60;
}

.scenario-btn[data-scenario="ssp245"] {
    border-color: #f39c12;
    color: #f39c12;
}

.scenario-btn[data-scenario="ssp585"] {
    border-color: #e74c3c;
    color: #e74c3c;
}

.scenario-btn.active {
    color: white;
}

.scenario-btn[data-scenario="ssp126"].active {
    background: #27ae60;
}

.scenario-btn[data-scenario="ssp245"].active {
    background: #f39c12;
}

.scenario-btn[data-scenario="ssp585"].active {
    background: #e74c3c;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#year-slider {
    width: 180px;
    cursor: pointer;
    height: 4px;
    accent-color: #64b5f6;
}

#year-value {
    background: #1e293b;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 55px;
    text-align: center;
}

.play-btn {
    padding: 6px 20px;
    border-radius: 30px;
    border: none;
    background: #64b5f6;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.play-btn:hover {
    background: #42a5f5;
}

.map-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
}

.map-container h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #e2e8f0;
}

/* #chart {
    width: 100%;
    height: 550px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
} */

.viz-note {
    font-size: 0.65rem;
    color: #64748b;
    text-align: center;
    margin-top: 10px;
}

.meters-row {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.meter-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 15px 25px;
    text-align: center;
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

/* Special wider card for warming stripes to accommodate horizontal legend */
.meter-card:last-child {
    max-width: 350px;
}

.meter-card h3 {
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: #e2e8f0;
}

.thermometer {
    width: 50px;
    height: 150px;
    background: #1e293b;
    border-radius: 25px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    border: 2px solid #475569;
}

.thermometer-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 0%;
    transition: height 0.5s ease;
}

.temp-label {
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 8px;
}

.ice-meter {
    width: 60px;
    height: 100px;
    background: #1e293b;
    border-radius: 8px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    border: 2px solid #475569;
}

.ice-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #89CFF0;
    transition: height 0.5s ease;
}

.ice-percent {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 8px;
}

.ice-label {
    font-size: 0.6rem;
    color: #64748b;
    margin-top: 4px;
}

.stripes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
    min-height: 50px;
}

/* Horizontal legend next to stripes */
.stripes-with-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stripes-legend-horizontal {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.stripes-legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.55rem;
    color: #94a3b8;
}

.stripes-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.stripes-label {
    font-size: 0.55rem;
    color: #64748b;
    text-align: center;
    margin-top: 8px;
}

.insights-panel {
    background: rgba(100, 181, 246, 0.06);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(100, 181, 246, 0.15);
}

.insights-panel h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #64b5f6;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.insight-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

.insight-label {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
}

.insight-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 5px;
}

.insight-text {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    font-style: italic;
}

.takeaway {
    background: rgba(100, 181, 246, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(100, 181, 246, 0.2);
}

.takeaway h2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #64b5f6;
}

.takeaway p {
    font-size: 0.85rem;
    line-height: 1.5;
}

.writeup {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
}

.writeup h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.writeup h3 {
    font-size: 0.85rem;
    margin: 12px 0 6px 0;
    color: #64b5f6;
}

.writeup p {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.5;
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.65rem;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 30px;
}

.country {
    transition: stroke 0.2s;
}

@media (max-width: 900px) {
    .container {
        padding: 20px;
    }
    
    .story-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: space-between;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .meters-row {
        flex-direction: column;
        align-items: center;
    }
    
    .meter-card {
        max-width: 100%;
        width: 100%;
    }
    
    .meter-card:last-child {
        max-width: 100%;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    #chart {
        height: 350px;
    }
    
    .stripes-legend-horizontal {
        gap: 5px;
    }
}
#chart:fullscreen {
    background: #0a1628;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chart:fullscreen svg {
    width: 100vw;
    height: 100vh;
}

#landing-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a1628 0%, #0f1a2f 100%);
    z-index: 1000;
    transition: opacity 0.8s ease, transform 0.8s ease;
    overflow: hidden;
}

#landing-screen.fade-out {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
}

.landing-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.landing-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.landing-slide.exit {
    opacity: 0;
    transform: translateY(-40px);
}

.slide-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #64b5f6;
    margin-bottom: 20px;
    border: 1px solid rgba(100, 181, 246, 0.3);
    padding: 6px 20px;
    border-radius: 20px;
    background: rgba(100, 181, 246, 0.08);
}

.slide-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    animation: pulse 3s ease-in-out infinite;
}

.slide-title {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #64b5f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    max-width: 600px;
}

.landing-main-title {
    font-size: 3.5rem;
}

.slide-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.slide-text {
    font-size: 1.15rem;
    color: #94a3b8;
    line-height: 1.8;
    max-width: 520px;
    margin-bottom: 40px;
}

.slide-next-btn {
    padding: 14px 36px;
    border-radius: 40px;
    background: rgba(100, 181, 246, 0.15);
    border: 2px solid rgba(100, 181, 246, 0.5);
    color: #64b5f6;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.slide-next-btn:hover {
    background: rgba(100, 181, 246, 0.25);
    transform: translateY(-2px);
}

.landing-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.landing-btn {
    padding: 16px 36px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.landing-btn.primary {
    background: #64b5f6;
    border: none;
    color: #0a1628;
}

.landing-btn.primary:hover {
    background: #42a5f5;
    transform: translateY(-2px);
}

.landing-btn.secondary {
    background: transparent;
    border: 2px solid #64b5f6;
    color: #64b5f6;
}

.landing-btn.secondary:hover {
    background: rgba(100, 181, 246, 0.1);
    transform: translateY(-2px);
}

.slide-dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(100, 181, 246, 0.25);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(100, 181, 246, 0.4);
}

.dot.active {
    background: #64b5f6;
    transform: scale(1.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.story-panel {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.12), rgba(100, 181, 246, 0.05));
    border: 2px solid rgba(100, 181, 246, 0.5);
    border-radius: 16px;
    padding: 28px 30px;
    margin-bottom: 20px;
    box-shadow: 0 0 40px rgba(100, 181, 246, 0.1);
}

.story-panel-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.3;
}

.story-panel-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.story-year-badge {
    display: inline-block;
    font-size: 2.2rem;
    font-weight: 700;
    color: #64b5f6;
    background: rgba(100, 181, 246, 0.12);
    border: 2px solid rgba(100, 181, 246, 0.4);
    border-radius: 14px;
    padding: 6px 24px;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.story-scenario-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 10px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.story-scenario-tag.low { background: rgba(39,174,96,0.15); color: #27ae60; border: 1px solid rgba(39,174,96,0.4); }
.story-scenario-tag.medium { background: rgba(243,156,18,0.15); color: #f39c12; border: 1px solid rgba(243,156,18,0.4); }
.story-scenario-tag.high { background: rgba(231,76,60,0.15); color: #e74c3c; border: 1px solid rgba(231,76,60,0.4); }

.story-panel-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 4px;
}

.story-nav-btn {
    padding: 8px 22px;
    border-radius: 20px;
    border: 2px solid rgba(100, 181, 246, 0.5);
    background: rgba(100, 181, 246, 0.08);
    color: #64b5f6;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.story-nav-btn:hover:not(:disabled) {
    background: rgba(100, 181, 246, 0.2);
    transform: translateY(-1px);
}

.story-nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.story-counter {
    font-size: 0.85rem;
    color: #64b5f6;
    font-weight: 600;
}

/* .story-sidebar {
    position: fixed;
    right: -220px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    background: rgba(10, 22, 40, 0.95);
    border: 1px solid rgba(100, 181, 246, 0.25);
    border-radius: 16px 0 0 16px;
    padding: 20px 16px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: right 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(12px);
}

.story-sidebar.visible {
    right: 0;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.sidebar-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64b5f6;
    text-align: center;
}

.sidebar-sublabel {
    font-size: 0.55rem;
    color: #475569;
    text-align: center;
}

.sidebar-temp-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e74c3c;
    transition: all 0.5s ease;
}

.sidebar-thermometer {
    width: 24px;
    height: 80px;
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1.5px solid #475569;
}

.sidebar-thermo-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: #e74c3c;
    border-radius: 0 0 10px 10px;
    transition: height 0.8s ease, background 0.5s ease;
}

.sidebar-ice-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #89CFF0;
    transition: all 0.5s ease;
}

.sidebar-ice-bar {
    width: 80px;
    height: 12px;
    background: #1e293b;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #475569;
}

.sidebar-ice-fill {
    height: 100%;
    width: 100%;
    background: #89CFF0;
    border-radius: 6px;
    transition: width 0.8s ease;
}

.sidebar-stripes {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 160px;
}

.sidebar-stripe {
    width: 6px;
    height: 30px;
    border-radius: 1px;
    transition: background 0.3s ease;
}

.sidebar-divider {
    height: 1px;
    background: rgba(100, 181, 246, 0.15);
    width: 100%;
} */
.map-and-sidebar {
    display: flex;
    gap: 0;
    align-items: stretch;
}

#chart {
    flex: 1;
    min-width: 0;
    height: 550px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px 0 0 12px;
}

.story-sidebar-inline {
    width: 180px;
    padding: 20px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 0 12px 12px 0;
    border-left: 1px solid rgba(100, 181, 246, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    opacity: 1;
    visibility: visible;
}

.story-sidebar-inline.visible {
    opacity: 1;
    visibility: visible;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.sb-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64b5f6;
    text-align: center;
    white-space: nowrap;
}

.sb-sublabel {
    font-size: 0.55rem;
    color: #475569;
    text-align: center;
    white-space: nowrap;
}

.sb-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e74c3c;
    transition: all 0.5s ease;
    white-space: nowrap;
}

.sidebar-thermometer {
    width: 24px;
    height: 80px;
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1.5px solid #475569;
}

.sidebar-thermo-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: #e74c3c;
    border-radius: 0 0 10px 10px;
    transition: height 0.8s ease, background 0.5s ease;
}

.sidebar-ice-bar {
    width: 100%;
    height: 10px;
    background: #1e293b;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #475569;
}

.sidebar-ice-fill {
    height: 100%;
    width: 100%;
    background: #89CFF0;
    border-radius: 5px;
    transition: width 0.8s ease;
}

.sidebar-stripes {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
}

.sidebar-stripe {
    width: 6px;
    height: 26px;
    border-radius: 1px;
}

.sb-divider {
    height: 1px;
    background: rgba(100, 181, 246, 0.12);
    width: 100%;
}

.ssp-note {
    font-size: 0.85rem;
    /* color: #64748b; */
    margin-top: 6px;
    font-style: italic;
    max-width: 1450px;
}


/* ============================================================
   SCROLLABLE STORY MODE OVERLAY
   ============================================================ */

.story-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #060e1a;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
}

.story-overlay-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 32px;
    background: rgba(6, 14, 26, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(100, 181, 246, 0.12);
    flex-shrink: 0;
}

.story-overlay-logo {
    font-size: 1rem;
    font-weight: 700;
    color: #64b5f6;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.story-overlay-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.story-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(100, 181, 246, 0.12);
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #64b5f6);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 10%;
}

.story-progress-label {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    font-weight: 600;
}

.story-exit-btn {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid rgba(100, 181, 246, 0.3);
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.story-exit-btn:hover {
    background: rgba(100, 181, 246, 0.1);
    color: #e2e8f0;
}

/* Scroll container */
.story-scroll-container {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

.story-scroll-container::-webkit-scrollbar {
    width: 4px;
}

.story-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.story-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(100, 181, 246, 0.25);
    border-radius: 2px;
}

/* Each story section */
.story-section {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    padding: 40px 48px;
    position: relative;
    border-bottom: 1px solid rgba(100, 181, 246, 0.06);
}

.story-section-alt {
    background: rgba(255, 255, 255, 0.015);
}

.story-section-final {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.04), rgba(6, 14, 26, 0) 60%);
}

.story-section-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

/* Text column */
.story-text-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.story-step-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #475569;
    font-weight: 700;
}

.story-date-chip {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    width: fit-content;
    letter-spacing: 0.5px;
}

.story-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

.story-section-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #94a3b8;
    max-width: 500px;
}

.story-section-body em {
    color: #cbd5e1;
    font-style: normal;
    font-weight: 600;
}

/* Fact box */
.story-fact-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(100, 181, 246, 0.05);
    border-left: 3px solid rgba(100, 181, 246, 0.4);
    border-radius: 0 10px 10px 0;
}

.story-fact-box.success {
    background: rgba(39, 174, 96, 0.05);
    border-left-color: rgba(39, 174, 96, 0.5);
}

.story-fact {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.4;
}

/* Scenario pills */
.story-scenario-compare {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.story-ssp-pill {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
}

.story-ssp-pill.low { background: rgba(39,174,96,0.12); color: #27ae60; border: 1px solid rgba(39,174,96,0.25); }
.story-ssp-pill.medium { background: rgba(243,156,18,0.12); color: #f39c12; border: 1px solid rgba(243,156,18,0.25); }
.story-ssp-pill.high { background: rgba(231,76,60,0.12); color: #e74c3c; border: 1px solid rgba(231,76,60,0.25); }

/* CTA button */
.story-explore-btn {
    padding: 14px 28px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s;
    width: fit-content;
    margin-top: 8px;
}

.story-explore-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.35);
}

/* Viz column */
.story-viz-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-viz-frame {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(100, 181, 246, 0.1);
    transition: border-color 0.3s;
}

.story-viz-frame:hover {
    border-color: rgba(100, 181, 246, 0.25);
}

.story-viz-highlight-ice {
    border-color: rgba(137, 207, 240, 0.25);
}

.story-viz-highlight-temp {
    border-color: rgba(231, 76, 60, 0.25);
}

.story-viz-label {
    padding: 12px 16px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64b5f6;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(100, 181, 246, 0.1);
    letter-spacing: 0.5px;
}

/* Mini map embed */
.story-map-clone {
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
}

.story-map-clone svg {
    width: 100%;
    height: 100%;
}

/* Scenario comparison chart in story */
.story-chart-embed {
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scenario-chart-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scenario-chart-label {
    font-size: 0.72rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

.scenario-chart-track {
    height: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    overflow: hidden;
}

.scenario-chart-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1.2s ease;
}

.scenario-chart-fill.low { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.scenario-chart-fill.medium { background: linear-gradient(90deg, #f39c12, #f1c40f); }
.scenario-chart-fill.high { background: linear-gradient(90deg, #e74c3c, #8e44ad); }

.scenario-chart-note {
    font-size: 0.68rem;
    color: #475569;
    margin-top: 8px;
    text-align: center;
}

/* Arctic ice display */
.story-ice-display {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.big-ice-ring {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.ice-ring-svg {
    width: 100%;
    height: 100%;
}

.ice-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.ice-ring-pct {
    font-size: 1.8rem;
    font-weight: 700;
    color: #89CFF0;
}

.ice-ring-sub {
    font-size: 0.65rem;
    color: #64748b;
    text-align: center;
}

.ice-scenario-bars {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ice-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
}

.ice-bar-label {
    width: 80px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.7rem;
}

.ice-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.ice-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.ice-bar-fill.low { background: #27ae60; }
.ice-bar-fill.medium { background: #89CFF0; }
.ice-bar-fill.high { background: #e74c3c; }

.ice-bar-val {
    width: 36px;
    text-align: right;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
}

/* Thermometer comparison */
.story-thermo-compare {
    display: flex;
    gap: 28px;
    justify-content: center;
    align-items: flex-end;
    padding: 32px 24px 24px;
}

.thermo-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.thermo-label {
    font-size: 0.68rem;
    color: #64748b;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.thermo-tube {
    width: 32px;
    height: 140px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    border: 1.5px solid rgba(255,255,255,0.1);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.thermo-fill {
    width: 100%;
    border-radius: 0 0 14px 14px;
    transition: height 1.2s ease;
}

.thermo-fill.low { background: linear-gradient(0deg, #27ae60, #2ecc71); }
.thermo-fill.medium { background: linear-gradient(0deg, #f39c12, #f1c40f); }
.thermo-fill.high { background: linear-gradient(0deg, #e74c3c, #8e44ad); }

.thermo-val {
    font-size: 1.1rem;
    font-weight: 700;
}

.thermo-val.low-text { color: #27ae60; }
.thermo-val.medium-text { color: #f39c12; }
.thermo-val.high-text { color: #e74c3c; }

/* Step nav dots */
.story-step-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1001;
    display: none;
}

.story-overlay.visible .story-step-nav {
    display: flex;
}

.story-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(100, 181, 246, 0.2);
    border: 1px solid rgba(100, 181, 246, 0.35);
    cursor: pointer;
    transition: all 0.25s;
}

.story-step-dot.active {
    background: #64b5f6;
    transform: scale(1.4);
}

.story-step-dot:hover {
    background: rgba(100, 181, 246, 0.5);
}

/* Section reveal animation */
.story-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.story-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .story-section-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .story-section {
        padding: 30px 24px;
        min-height: auto;
    }
    .story-section-title {
        font-size: 1.6rem;
    }
    .story-step-nav {
        display: none !important;
    }
}
/* ===== MAP EXPAND MODAL ===== */
.map-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.map-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 12, 24, 0.88);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.map-modal-content {
    position: relative;
    z-index: 1;
    width: min(92vw, 1100px);
    height: min(82vh, 680px);
    background: #0a1628;
    border-radius: 20px;
    border: 1px solid rgba(100, 181, 246, 0.2);
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { transform: translateY(24px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.map-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(100, 181, 246, 0.1);
    flex-shrink: 0;
}

.map-modal-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64b5f6;
    letter-spacing: 0.5px;
}

.map-modal-hint {
    font-size: 0.65rem;
    color: #475569;
    margin-left: 4px;
    flex: 1;
}

.map-modal-close {
    background: rgba(100,181,246,0.1);
    border: 1px solid rgba(100,181,246,0.2);
    color: #64b5f6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.15s;
    flex-shrink: 0;
}

.map-modal-close:hover {
    background: rgba(100,181,246,0.25);
}

.map-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.map-modal-body svg {
    width: 100%;
    height: 100%;
    cursor: grab;
}

.map-modal-body svg:active {
    cursor: grabbing;
}

/* Tooltip inside modal */
.modal-tooltip {
    position: fixed;
    background: #1e293b;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 12px;
    pointer-events: none;
    z-index: 2100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    line-height: 1.6;
    max-width: 200px;
}

/* Story mini-map: show click affordance */
.story-map-clone {
    cursor: zoom-in;
    position: relative;
}

.story-map-clone::after {
    content: '🔍 Click to expand';
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(10,22,40,0.75);
    color: #64b5f6;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(100,181,246,0.25);
    pointer-events: none;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s;
}

.story-viz-frame:hover .story-map-clone::after {
    opacity: 1;
}

/* ===== WEATHER BACKGROUND CANVAS ===== */
#weather-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

/* Ensure story content sits above the canvas */
.story-overlay-header,
.story-scroll-container,
.story-step-nav {
    position: relative;
    z-index: 2;
}

/* Per-step background gradient transitions */
.story-overlay {
    transition: background 2s ease;
}

/* Step mood gradients — JS swaps these classes on .story-overlay */
.wx-mood-baseline {
    background: radial-gradient(ellipse at 50% 80%, #0d2035 0%, #060e1a 100%);
}
.wx-mood-cool {
    background: radial-gradient(ellipse at 50% 100%, #0a1e35 0%, #040c18 100%);
}
.wx-mood-arctic {
    background: radial-gradient(ellipse at 50% 0%, #0c2233 0%, #050f1e 100%);
}
.wx-mood-warm {
    background: radial-gradient(ellipse at 50% 100%, #2a0c05 0%, #0f060a 100%);
}
.wx-mood-hot {
    background: radial-gradient(ellipse at 50% 100%, #3d0e04 0%, #120408 100%);
}
.wx-mood-inferno {
    background: radial-gradient(ellipse at 50% 100%, #5a1200 0%, #1a0308 100%);
}
.wx-mood-hope {
    background: radial-gradient(ellipse at 40% 80%, #041a0c 0%, #060e1a 100%);
}

/* ===== CINEMATIC ENHANCEMENTS ===== */

/* Milestone flash overlay */
.story-milestone-flash {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.08s ease;
}
.story-milestone-flash.firing {
    opacity: 0.18;
    transition: opacity 0.08s ease;
}
.story-milestone-flash.fading {
    opacity: 0;
    transition: opacity 0.7s ease;
}

/* Per-section ambient glow bleeds into background */
.story-section {
    transition: background 0.9s ease, opacity 0.7s ease, transform 0.7s ease;
}
.story-section[data-step="4"] { background: rgba(231,76,60,0.04); }
.story-section[data-step="8"] { background: rgba(142,68,173,0.05); }
.story-section[data-step="9"] { background: linear-gradient(135deg, rgba(39,174,96,0.07), transparent 60%); }

/* Progress bar glow pulse on step change */
@keyframes progressPulse {
    0%   { box-shadow: 0 0 0px rgba(100,181,246,0); }
    40%  { box-shadow: 0 0 14px rgba(100,181,246,0.7); }
    100% { box-shadow: 0 0 0px rgba(100,181,246,0); }
}
.story-progress-fill.pulse {
    animation: progressPulse 0.9s ease forwards;
}

/* Scroll vignette: shadow at top+bottom of scroll container */
.story-scroll-container {
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 5%,
        black 95%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 5%,
        black 95%,
        transparent 100%
    );
}

/* Viz frame parallax hint — JS nudges transform, CSS eases it */
.story-viz-frame {
    will-change: transform;
    transition: opacity 0.75s ease, transform 0.75s ease, border-color 0.3s;
}

/* Date chip pulse when a section reveals */
@keyframes chipPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.07); }
    100% { transform: scale(1); }
}
.story-section.revealed .story-date-chip {
    animation: chipPop 0.45s ease 0.2s both;
}

/* Fact box: slide up with a spring */
@keyframes factSlideUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
.story-section.revealed .story-fact-box {
    animation: factSlideUp 0.55s cubic-bezier(0.34,1.56,0.64,1) 0.45s both;
}
.story-section.revealed .story-scenario-compare {
    animation: factSlideUp 0.55s cubic-bezier(0.34,1.56,0.64,1) 0.5s both;
}

/* Viz frame: scale-up spring on reveal */
@keyframes vizReveal {
    from { opacity: 0; transform: translateY(24px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.story-section.revealed .story-viz-frame {
    animation: vizReveal 0.7s cubic-bezier(0.34,1.2,0.64,1) 0.05s both;
}

/* Section title: character fade-in feel via letter spacing collapse */
@keyframes titleReveal {
    from { opacity: 0; letter-spacing: 0.06em; transform: translateY(14px); }
    to   { opacity: 1; letter-spacing: -0.02em; transform: translateY(0); }
}
.story-section.revealed .story-section-title {
    animation: titleReveal 0.65s cubic-bezier(0.22,1,0.36,1) 0.25s both;
}

/* Override the plain opacity transitions on children — let animations handle them */
.story-section.revealed .story-step-tag,
.story-section.revealed .story-date-chip,
.story-section.revealed .story-section-title,
.story-section.revealed .story-section-body,
.story-section.revealed .story-fact-box,
.story-section.revealed .story-scenario-compare,
.story-section.revealed .story-explore-btn {
    opacity: 1;
    transform: translateY(0);
}

/* Scenario pill entrance stagger */
.story-section.revealed .story-ssp-pill:nth-child(1) { animation: factSlideUp 0.5s cubic-bezier(0.34,1.4,0.64,1) 0.45s both; }
.story-section.revealed .story-ssp-pill:nth-child(2) { animation: factSlideUp 0.5s cubic-bezier(0.34,1.4,0.64,1) 0.55s both; }
.story-section.revealed .story-ssp-pill:nth-child(3) { animation: factSlideUp 0.5s cubic-bezier(0.34,1.4,0.64,1) 0.65s both; }

/* Explore CTA: glow pulse after reveal */
@keyframes ctaGlow {
    0%,100% { box-shadow: 0 0 0 rgba(39,174,96,0); }
    50%      { box-shadow: 0 0 28px rgba(39,174,96,0.5); }
}
.story-section.revealed .story-explore-btn {
    animation: factSlideUp 0.55s cubic-bezier(0.34,1.56,0.64,1) 0.6s both,
               ctaGlow 2.5s ease 1.2s infinite;
}

/* Legend inside modal */
.modal-legend {
    position: absolute;
    bottom: 14px;
    left: 16px;
    display: flex;
    gap: 6px;
    align-items: center;
    pointer-events: none;
}

.modal-legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.modal-legend-swatch {
    width: 28px;
    height: 8px;
    border-radius: 2px;
}

.modal-legend-label {
    font-size: 8px;
    color: #64748b;
}

/* ===== CINEMATIC STORY TRANSITIONS ===== */

/* Sticky viz column — stays in place while text scrolls past */
/* .story-viz-col {
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    align-self: flex-start;
    height: fit-content;
} */

/* Each section needs enough height for the sticky effect to breathe */
.story-section {
    min-height: 100vh;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Viz frames cross-fade: start invisible/shifted */
.story-viz-frame {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

/* Triggered by JS when section is in view */
.story-section.revealed .story-viz-frame {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Outgoing viz fades down when section leaves upward */
.story-section.exiting .story-viz-frame {
    opacity: 0;
    transform: translateY(-20px) scale(0.97);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Text column entrance — slides in from left */
.story-text-col {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease 0.1s, transform 0.7s ease 0.1s;
}

.story-section.revealed .story-text-col {
    opacity: 1;
    transform: translateX(0);
}

.story-section.exiting .story-text-col {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Stagger child elements inside text col for a cascade effect */
.story-section.revealed .story-step-tag    { transition-delay: 0.05s; }
.story-section.revealed .story-date-chip   { transition-delay: 0.15s; }
.story-section.revealed .story-section-title { transition-delay: 0.25s; }
.story-section.revealed .story-section-body  { transition-delay: 0.35s; }
.story-section.revealed .story-fact-box,
.story-section.revealed .story-scenario-compare,
.story-section.revealed .story-explore-btn   { transition-delay: 0.45s; }

/* Each text child needs its own transition to respect the delay */
.story-step-tag,
.story-date-chip,
.story-section-title,
.story-section-body,
.story-fact-box,
.story-scenario-compare,
.story-explore-btn {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.story-section.revealed .story-step-tag,
.story-section.revealed .story-date-chip,
.story-section.revealed .story-section-title,
.story-section.revealed .story-section-body,
.story-section.revealed .story-fact-box,
.story-section.revealed .story-scenario-compare,
.story-section.revealed .story-explore-btn {
    opacity: 1;
    transform: translateY(0);
}