/**
 * US Traffic Accident Analysis - Complete Presentation Styles
 * Self-contained CSS for GitHub Pages deployment
 * 
 * Sections:
 * 1. CSS Variables (Theme Tokens)
 * 2. CSS Reset & Base
 * 3. Presentation Container & Slides
 * 4. Typography
 * 5. Content Elements
 * 6. Slide-Specific Layouts
 * 7. Charts
 * 8. Timeline
 * 9. Progress Indicators
 * 10. Animations
 * 11. Responsive Design
 */

/* ============================================
   1. CSS Variables (Theme Tokens)
   ============================================ */
:root {
    /* Primary Colors */
    --bg-primary: #2C3E50;
    --bg-secondary: #34495E;
    --accent: #E07A47;
    --accent-hover: #D4693A;
    --accent-light: rgba(224, 122, 71, 0.2);

    /* Secondary Colors */
    --steel-blue: #5D87A1;
    --forest-green: #2E7D32;
    --burgundy: #8B3A3A;

    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #95A5A6;
    --text-muted: #7F8C8D;

    /* Neutrals */
    --light-gray: #ECF0F1;
    --medium-gray: #95A5A6;
    --dark-gray: #34495E;

    /* Typography */
    --font-heading: Georgia, 'Times New Roman', serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Spacing */
    --slide-padding: 60px;
    --content-gap: 40px;

    /* Effects */
    --box-bg: rgba(255, 255, 255, 0.15);
    --box-border: 2px solid var(--accent);
    --box-radius: 12px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --glass-blur: 10px;

    /* Transitions */
    --transition-fast: 200ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ============================================
   2. CSS Reset & Base
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

/* ============================================
   3. Presentation Container & Slides
   ============================================ */
.presentation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-primary);
}

/* Progress line SVG - must be fixed to prevent overflow */
.progress-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Map tooltip - fixed positioning */
.map-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 10002;
    display: none;
    opacity: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: var(--slide-padding);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
    z-index: 1;
}

/* Content wrapper for scaling */
.slide-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    transform-origin: top center;
}

/* Centered variant for title slides */
.slide-content-wrapper--centered {
    justify-content: center;
    align-items: center;
    text-align: center;
    transform-origin: center center;
}

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

/* Hide all slides except first on initial load (before JS runs) */
body:not(.js-loaded) .slide:not(:first-child) {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Ensure first slide is visible on initial load */
body:not(.js-loaded) .slide:first-child,
#slide-1 {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Slide Layouts */
.slide-title {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.slide-content {
    justify-content: flex-start;
    align-items: stretch;
}

/* ============================================
   4. Typography
   ============================================ */
.slide-title-text {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.slide-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.8;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--accent);
    font-weight: 400;
}

h1 {
    font-size: 48px;
}

h2 {
    font-size: 36px;
}

h3 {
    font-size: 24px;
}

p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
}

strong {
    color: var(--accent);
    font-weight: 600;
}

/* Title underline effect - now handled by global SVG progress line */
/* .title-underline styles removed - LineAnimator handles this */

/* ============================================
   5. Content Elements
   ============================================ */

/* Slide Header */
.slide-header {
    margin-bottom: 30px;
    flex-shrink: 0;
}

/* Content Boxes */
.content-box {
    background: var(--box-bg);
    border: var(--box-border);
    border-radius: var(--box-radius);
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    padding: 25px;
    margin-bottom: 20px;
}

.content-box.highlight {
    background: var(--accent-light);
    border-color: var(--accent);
}

.content-box h4 {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 16px;
    font-family: var(--font-body);
    font-weight: 600;
}

.content-box p {
    font-size: 14px;
    margin-bottom: 8px;
}

.content-box ul {
    margin-top: 8px;
    margin-left: 0;
    list-style: none;
}

.content-box li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 4px;
    font-size: 13px;
}

.content-box li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.insight-note {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 10px;
    margin-bottom: 0;
}

/* Caveat Notes - for methodology and limitation disclaimers */
.caveat {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 12px;
    margin-bottom: 0;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-left: 3px solid var(--accent);
    border-radius: 0 4px 4px 0;
}

/* Definition Note - for slide headers */
.definition-note {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    display: inline-block;
}

/* Tier Footnote - for investment projections */
.tier-footnote {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 15px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    text-align: center;
}

/* Footnote Section - for slide-level definitions */
.footnote-section {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 20px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    border-left: 3px solid var(--accent);
}

.footnote-section p {
    margin: 0;
    line-height: 1.5;
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Background Image & Overlay */
.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.bg-image.loaded {
    opacity: 1;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.85) 0%, rgba(44, 62, 80, 0.95) 100%);
    z-index: -1;
    pointer-events: none;
}

.bg-overlay-gradient {
    background: linear-gradient(to bottom, rgba(44, 62, 80, 0.7) 0%, rgba(44, 62, 80, 0.85) 50%, rgba(44, 62, 80, 0.95) 100%);
}

/* Slide 10: Darker overlay with bottom gradient */
#slide-10 .bg-overlay {
    background: linear-gradient(to bottom,
            rgba(44, 62, 80, 0.92) 0%,
            rgba(44, 62, 80, 0.95) 50%,
            rgba(44, 62, 80, 0.98) 100%);
}

#slide-10::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 400px;
    background: linear-gradient(to top,
            rgba(44, 62, 80, 0.8) 0%,
            rgba(44, 62, 80, 0.5) 30%,
            rgba(44, 62, 80, 0.3) 60%,
            transparent 100%);
    z-index: 0;
    pointer-events: none;
}

/* Ensure content is above overlay */
.slide>*:not(.bg-image):not(.bg-overlay):not(.slide-footer) {
    position: relative;
    z-index: 5;
}

/* Footer */
.slide-footer {
    position: absolute;
    bottom: 20px;
    left: var(--slide-padding);
    right: var(--slide-padding);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    z-index: 5;
}

/* Hide footer on all slides except slide 1, and on hidden slides */
.slide:not(#slide-1) .slide-footer,
.slide-hidden .slide-footer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}



/* ============================================
   6. Slide-Specific Layouts
   ============================================ */

/* Slide 2: Data Overview */
.data-overview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
}

.big-stat {
    margin-bottom: 30px;
}

.big-stat .stat-number {
    font-size: 96px;
    font-weight: 400;
    font-family: var(--font-heading);
    color: var(--accent);
    display: block;
    line-height: 1;
}

.big-stat .stat-label {
    font-size: 24px;
    color: var(--text-primary);
    margin-top: 15px;
    display: block;
}

/* .stat-divider styles removed - LineAnimator handles this */

.overview-text {
    max-width: 800px;
    font-size: 20px;
    line-height: 1.8;
}

/* Slide 3: Key Questions Grid */
.questions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    flex: 1;
    margin-top: 20px;
    align-items: center;
}

.image-panel {
    position: relative;
    overflow: hidden;
    border-radius: var(--box-radius);
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-panel:hover img {
    transform: scale(1.05);
}

.image-panel::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top,
            rgba(44, 62, 80, 0.98) 0%,
            rgba(44, 62, 80, 0.95) 15%,
            rgba(44, 62, 80, 0.85) 30%,
            rgba(44, 62, 80, 0.7) 45%,
            rgba(44, 62, 80, 0.5) 60%,
            rgba(44, 62, 80, 0.3) 75%,
            rgba(44, 62, 80, 0.15) 85%,
            transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.image-panel .question-content-box {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(to top,
            rgba(44, 62, 80, 0.98) 0%,
            rgba(44, 62, 80, 0.96) 15%,
            rgba(44, 62, 80, 0.92) 30%,
            rgba(44, 62, 80, 0.85) 45%,
            rgba(44, 62, 80, 0.75) 60%,
            rgba(44, 62, 80, 0.6) 72%,
            rgba(44, 62, 80, 0.45) 82%,
            rgba(44, 62, 80, 0.3) 90%,
            rgba(44, 62, 80, 0.15) 95%,
            rgba(44, 62, 80, 0.05) 98%,
            transparent 100%);
    border: none;
    border-radius: 0 0 var(--box-radius) var(--box-radius);
    padding: 25px 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    text-align: left;
    z-index: 10;
}

.image-panel .question-content-box h3 {
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}

.image-panel .question-content-box p {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Slide 4, 6, 8: Chart Layouts */
.chart-wrapper {
    display: flex;
    gap: 30px;
    flex: 1;
    min-height: 0;
}

.chart-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chart-title {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.chart-container {
    flex: 1;
    position: relative;
    min-height: 250px;
}

.insights-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 15px;
    flex-shrink: 0;
}

.insights-row .content-box {
    background: var(--box-bg);
    border: var(--box-border);
    border-radius: var(--box-radius);
    padding: 20px 25px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    text-align: left;
    margin-bottom: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.insights-row .content-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(224, 122, 71, 0.3);
}

.insights-row .content-box.highlight-active {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(224, 122, 71, 0.4);
    border-color: var(--accent);
}

.insights-row .content-box h4 {
    color: var(--accent);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
}

.insights-row .content-box p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.insights-row .content-box ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.insights-row .content-box li {
    font-size: 15px;
    margin-bottom: 6px;
    padding-left: 18px;
    position: relative;
}

.insights-row .content-box li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Slide 5, 7, 9: Recommendation Slides */
.slide-recommendation {
    justify-content: flex-start;
}

.recommendation-box {
    max-width: 700px;
    margin: auto 0;
    margin-left: 0;
    background: var(--box-bg);
    border: var(--box-border);
    border-radius: var(--box-radius);
    padding: 40px 50px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    display: flex;
    flex-direction: column;
}

.recommendation-box h4 {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
}

.recommendation-box p {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.recommendation-box ul {
    margin-top: 12px;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
}

.recommendation-box li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 17px;
    line-height: 1.6;
}

.recommendation-box li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

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

.recommendation-box .caveat {
    font-size: 11px;
    margin-top: 15px;
}

/* Slide 9: Two-Tier Implementation Strategy with Map */
.slide-9-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 20px;
}

.slide-9-layout {
    display: flex;
    gap: 50px;
    flex: 1;
    align-items: stretch;
    justify-content: center;
}

.tier-stack {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    flex: 0 0 650px;
    align-self: stretch;
}

.tier-footnote {
    margin: 0;
    padding: 15px 20px;
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    text-align: center;
}

.tier-box {
    background: var(--box-bg);
    border: var(--box-border);
    border-radius: var(--box-radius);
    padding: 25px 30px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--box-shadow);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tier-header {
    border-bottom: 1px solid var(--accent);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.tier-title {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.tier-states {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.tier-content {
    margin-bottom: 12px;
}

.tier-content h4 {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.tier-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tier-content li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 3px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
}

.tier-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.tier-metrics {
    border-top: 1px solid rgba(224, 122, 71, 0.3);
    padding-top: 10px;
}

.tier-metrics p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.tier-metrics p:last-child {
    margin-bottom: 0;
}

.tier-metrics strong {
    color: var(--accent);
    font-weight: 600;
}

/* Interactive Map Container */
.map-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    min-width: 0;
    background: var(--box-bg);
    border: var(--box-border);
    border-radius: var(--box-radius);
    padding: 8px 8px 12px 8px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--box-shadow);
}

#us-map {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#us-map svg {
    width: 100%;
    height: 100%;
    max-height: 750px;
}

/* Map State Styling */
.state {
    fill: var(--dark-gray);
    stroke: #1a252f;
    stroke-width: 1.5;
    transition: fill 0.2s ease, opacity 0.2s ease, stroke-width 0.2s ease;
    cursor: pointer;
}

.state:hover {
    filter: brightness(1.15);
    stroke-width: 2;
}

/* Tier 1: Critical Priority (CA, FL, TX) - Burnt Orange with pulse */
.state.tier-1-state {
    fill: var(--accent);
    stroke: #8B4513;
    stroke-width: 2;
    opacity: 0.9;
    cursor: pointer;
    animation: statePulseTier1 2.5s ease-in-out infinite;
    filter: drop-shadow(0 0 0 transparent);
}

.state.tier-1-state:hover {
    opacity: 1;
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(224, 122, 71, 0.6));
    stroke-width: 3;
    animation: none;
}

/* Tier 2: High Priority (SC, NY) - Lighter Orange with pulse */
.state.tier-2-state {
    fill: #F4A460;
    stroke: #CD853F;
    stroke-width: 2;
    opacity: 0.9;
    cursor: pointer;
    animation: statePulseTier2 2.5s ease-in-out infinite;
    animation-delay: 0.3s;
    filter: drop-shadow(0 0 0 transparent);
}

.state.tier-2-state:hover {
    opacity: 1;
    filter: brightness(1.15) drop-shadow(0 0 8px rgba(244, 164, 96, 0.6));
    stroke-width: 3;
    animation: none;
}

/* Tier 3: Secondary Priority (All other states with data) - Steel Blue */
.state.tier-3-state {
    fill: var(--steel-blue);
    stroke: #3d5a6e;
    stroke-width: 1.5;
    opacity: 0.85;
    cursor: pointer;
}

.state.tier-3-state:hover {
    opacity: 0.95;
    filter: brightness(1.1);
    stroke-width: 2;
}

/* No Data States - Dark Gray */
.state.no-data-state {
    fill: var(--dark-gray);
    stroke: #1a252f;
    stroke-width: 1;
    opacity: 0.6;
    cursor: pointer;
}

.state.no-data-state:hover {
    opacity: 0.75;
    stroke-width: 1.5;
}

/* Pulse animation for Tier 1 states (CA, FL, TX) - more intense orange glow */
@keyframes statePulseTier1 {

    0%,
    100% {
        opacity: 0.8;
        filter: drop-shadow(0 0 4px rgba(224, 122, 71, 0.3));
    }

    50% {
        opacity: 1;
        filter: drop-shadow(0 0 12px rgba(224, 122, 71, 0.7)) drop-shadow(0 0 20px rgba(224, 122, 71, 0.4));
    }
}

/* Pulse animation for Tier 2 states (SC, NY) - lighter orange glow */
@keyframes statePulseTier2 {

    0%,
    100% {
        opacity: 0.8;
        filter: drop-shadow(0 0 4px rgba(244, 164, 96, 0.3));
    }

    50% {
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(244, 164, 96, 0.6)) drop-shadow(0 0 16px rgba(244, 164, 96, 0.3));
    }
}

/* City Markers - Gold */
.city-marker {
    fill: #FFD700;
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
    animation: cityPulse 1.5s ease-in-out infinite;
}

.city-marker:hover {
    fill: #FFC000;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.9));
    animation: none;
}

@keyframes cityPulse {

    0%,
    100% {
        r: 8;
        opacity: 0.9;
    }

    50% {
        r: 10;
        opacity: 1;
    }
}

.city-label {
    font-family: var(--font-body);
    font-size: 10px;
    fill: var(--text-primary);
    pointer-events: none;
    text-anchor: middle;
}

/* State abbreviation labels */
.state-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    fill: rgba(255, 255, 255, 0.9);
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: middle;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.8),
        -1px -1px 2px rgba(0, 0, 0, 0.8),
        1px -1px 2px rgba(0, 0, 0, 0.8),
        -1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* External labels with leader lines */
.leader-line {
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 1;
    stroke-dasharray: 3, 2;
}

.external-label-bg {
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 1;
    cursor: pointer;
    transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}

.external-label-bg.tier-1-label {
    fill: var(--accent);
}

.external-label-bg.tier-2-label {
    fill: #F4A460;
}

.external-label-bg.tier-3-label {
    fill: var(--steel-blue);
}

.external-label-bg:hover {
    filter: brightness(1.3);
    stroke: #fff;
}

.external-label {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    fill: rgba(255, 255, 255, 0.95);
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: middle;
}

/* Map Legend */
.map-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(44, 62, 80, 0.9);
    border: 1px solid var(--accent);
    border-radius: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.legend-color.tier-1-color {
    background: var(--accent);
}

.legend-color.tier-2-color {
    background: #F4A460;
}

.legend-color.tier-3-color {
    background: var(--steel-blue);
}

.legend-color.no-data-color {
    background: #1a252f;
    border: 1px solid #555;
}

.legend-color.city-color {
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 215, 0, 0.6);
}

/* Map Tooltip */
.map-tooltip {
    position: fixed;
    pointer-events: none;
    background: rgba(44, 62, 80, 0.98);
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-primary);
    z-index: 10000;
    display: none;
    opacity: 0;
    width: max-content;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.map-tooltip.visible {
    opacity: 1;
}

.map-tooltip .tooltip-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(224, 122, 71, 0.3);
    white-space: nowrap;
}

.map-tooltip .tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.map-tooltip .tooltip-label {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.map-tooltip .tooltip-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.map-tooltip .tooltip-value.priority-critical {
    color: #FF6B6B;
    font-weight: 700;
}

.map-tooltip .tooltip-value.priority-high {
    color: #FFD700;
    font-weight: 600;
}

.map-tooltip .tooltip-value.priority-secondary {
    color: var(--steel-blue);
    font-weight: 500;
}

.map-tooltip .tooltip-note {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Slide 10: Timeline */
.timeline-container {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: visible;
}

.timeline-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

/* .timeline-line styles removed - LineAnimator renders timeline via SVG */

.timeline-row-reverse {
    flex-direction: row-reverse;
}

.timeline-row-target {
    justify-content: center;
}

/* .timeline-row-target .timeline-line styles removed - handled by SVG */

.timeline-milestone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
    max-width: 320px;
}

.timeline-milestone .circle {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border: 4px solid var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--bg-primary);
    font-size: 16px;
    z-index: 10;
    flex-shrink: 0;
    transform: scale(0);
    opacity: 0;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease-out;
}

.timeline-milestone .circle.circle-visible {
    transform: scale(1);
    opacity: 1;
}

.timeline-milestone .content-box {
    transform: scale(0.95);
    opacity: 0;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease-out;
}

.timeline-milestone .content-box.box-visible {
    transform: scale(1);
    opacity: 1;
}

.milestone-target .circle {
    width: 50px;
    height: 50px;
    font-size: 20px;
    background: linear-gradient(135deg, var(--accent) 0%, #F25926 100%);
}

.timeline-milestone .content-box {
    margin-top: 15px;
    padding: 15px;
    width: 100%;
    text-align: center;
}

.milestone-period {
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.milestone-phase {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
}

.milestone-items {
    font-size: 11px;
    line-height: 1.5;
    text-align: left;
    list-style: none;
    margin: 0;
}

.milestone-items li {
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
}

.milestone-items li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Slide 11: Key Takeaways */
.takeaways-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 75px;
    flex: 1;
    align-content: center;
    margin: 0 120px;
}

.stat-card {
    background: var(--box-bg);
    border: var(--box-border);
    border-radius: var(--box-radius);
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.stat-icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
    margin-bottom: 10px;
}

.stat-header {
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.stat-description {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.stat-tagline {
    font-size: 18px;
    color: var(--accent);
    font-style: italic;
}

/* Slide 12: Contact */
.slide-contact {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}

.contact-footer {
    background: rgba(44, 62, 80, 0.9);
    padding: 25px var(--slide-padding);
    z-index: 10;
    position: relative;
}

.contact-divider-line {
    width: 100%;
    height: 4px;
    background: transparent;
    /* Line rendered by SVG progress line */
    margin-bottom: 15px;
}

.contact-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.contact-email {
    font-size: 22px;
    color: var(--text-primary);
}

.contact-email:hover {
    color: var(--accent);
    text-decoration: none;
}

/* Slide 12: Next Steps */
.slide-next-steps {
    padding: var(--slide-padding);
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
}

.slide-next-steps .slide-header {
    position: relative;
    z-index: 5;
}

.next-steps-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    position: relative;
    z-index: 5;
}

/* Top row: Three boxes side by side */
.next-steps-top-row {
    display: flex;
    gap: 50px;
    justify-content: center;
    align-items: stretch;
}

.next-steps-box {
    flex: 1;
    max-width: 550px;
    padding: 40px 45px;
}

/* Content boxes for this slide - larger text */
.slide-next-steps .content-box {
    margin-bottom: 0;
}

.slide-next-steps .content-box h4 {
    font-size: 32px;
    margin-bottom: 18px;
}

.slide-next-steps .content-box ul {
    margin-top: 15px;
}

.slide-next-steps .content-box li {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.section-subtitle,
.slide-next-steps .section-subtitle {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Bottom row: Resources spanning full width */
.next-steps-bottom-row {
    display: flex;
    justify-content: center;
}

.resources-card-wide {
    width: 100%;
    max-width: 1260px;
    padding: 20px 30px;
}

.resources-card-wide h4 {
    text-align: center;
    margin-bottom: 15px;
}

.resources-grid {
    display: flex;
    justify-content: space-around;
    gap: 40px;
}

.resources-grid .resource-item {
    text-align: center;
    flex: 1;
}

.resources-grid .resource-label {
    color: var(--accent);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.resources-grid a {
    font-size: 14px;
    color: var(--text-secondary);
    word-break: break-all;
    display: block;
}

/* Adjust contact footer for this slide - solid background extending to edges */
.slide-next-steps .contact-footer {
    background: rgb(44, 62, 80);
    position: relative;
    z-index: 101;
    margin-top: auto;
    margin-left: calc(-1 * var(--slide-padding));
    margin-right: calc(-1 * var(--slide-padding));
    margin-bottom: calc(-1 * var(--slide-padding));
    padding: var(--slide-padding);
    padding-top: 20px;
    padding-bottom: calc(var(--slide-padding) + 40px);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.footer-resources {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-resource-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.footer-resource-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 4px 0;
}

.footer-resource-link:hover {
    color: var(--accent);
    text-decoration: none;
    transform: translateY(-1px);
}

.footer-resource-link .resource-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

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

/* ============================================
   7. Charts
   ============================================ */
.chart-legend {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   8. Progress Indicators - Global SVG Line
   ============================================ */
.progress-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    overflow: visible;
}

.progress-path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Wipe overlay styles for slide 12 transition */
.wipe-overlay {
    position: fixed;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    height: 0;
}

.wipe-overlay-top {
    top: 0;
    height: 0;
}

.wipe-overlay-bottom {
    bottom: 0;
    height: 0;
}

/* Slide 12 header - solid background extending to edges */
.slide-next-steps .slide-header {
    background: rgb(44, 62, 80);
    position: relative;
    z-index: 101;
    margin-left: calc(-1 * var(--slide-padding));
    margin-right: calc(-1 * var(--slide-padding));
    margin-top: calc(-1 * var(--slide-padding));
    padding: var(--slide-padding);
    padding-bottom: 20px;
}

/* Smokey gradient fade below header */
.slide-next-steps .slide-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -100px;
    height: 100px;
    background: linear-gradient(to bottom, rgb(44, 62, 80) 0%, rgba(44, 62, 80, 0) 100%);
    pointer-events: none;
    z-index: 100;
}

/* Smokey gradient fade above footer - starts solid to match footer, fades to transparent */
.slide-next-steps .contact-footer::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -100px;
    height: 100px;
    background: linear-gradient(to top, rgb(44, 62, 80) 0%, rgba(44, 62, 80, 0) 100%);
    pointer-events: none;
    z-index: 100;
}

/* ============================================
   9. Animations
   ============================================ */

/* Hidden state for elements before animation */
.animate-hidden {
    opacity: 0;
    transform: translateY(20px);
}

.animate-in {
    animation: fadeInUp 600ms ease-out forwards;
}

/* Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes pulse {

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

    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {

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

    25% {
        transform: translateY(-10px);
    }

    50% {
        transform: translateY(0);
    }

    75% {
        transform: translateY(-5px);
    }
}

/* Typewriter cursor */
.typewriter-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* ============================================
   10. Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    :root {
        --slide-padding: 50px;
    }

    .slide-title-text {
        font-size: 42px;
    }

    .big-stat .stat-number {
        font-size: 72px;
    }

    .recommendation-box p {
        font-size: 20px;
    }
}

@media (max-width: 1024px) {
    :root {
        --slide-padding: 40px;
    }

    .slide-title-text {
        font-size: 36px;
    }

    .questions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .questions-grid .image-panel {
        min-height: 200px;
    }

    .takeaways-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .insights-row {
        grid-template-columns: 1fr;
    }

    .chart-wrapper {
        flex-direction: column;
    }

    .slide-9-layout {
        flex-direction: column;
    }

    .tier-stack {
        max-width: 100%;
        flex: 1;
        flex-direction: row;
        gap: 20px;
    }

    .tier-stack .tier-box {
        flex: 1;
    }

    .map-container {
        width: 100%;
        max-width: 100%;
    }

    .big-stat .stat-number {
        font-size: 64px;
    }

    .timeline-milestone {
        width: auto;
    }

    .timeline-wrapper {
        transform: scale(0.85);
        transform-origin: center center;
    }
}

@media (max-width: 768px) {
    :root {
        --slide-padding: 30px;
    }

    .slide-title-text {
        font-size: 28px;
    }

    .slide-subtitle {
        font-size: 16px;
    }

    .recommendation-box {
        padding: 30px;
    }

    .recommendation-box p {
        font-size: 18px;
    }

    .big-stat .stat-number {
        font-size: 48px;
    }

    .big-stat .stat-label {
        font-size: 18px;
    }

    .overview-text {
        font-size: 16px;
    }

    .timeline-wrapper {
        transform: scale(0.7);
    }

    .contact-image-section {
        width: 50%;
    }
}

@media (max-width: 480px) {
    :root {
        --slide-padding: 20px;
    }

    .slide-title-text {
        font-size: 24px;
    }

    .big-stat .stat-number {
        font-size: 36px;
    }

    .chart-container {
        min-height: 200px;
    }
}

/* Height-based responsive adjustments */
@media (max-height: 900px) {
    .timeline-wrapper {
        transform: scale(0.9);
        transform-origin: center center;
    }

    .timeline-wrapper .content-box {
        padding: 12px;
    }

    .timeline-milestone .circle {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .milestone-target .circle {
        width: 44px;
        height: 44px;
    }
}

@media (max-height: 800px) {
    .timeline-wrapper {
        transform: scale(0.85);
    }

    .slide-header {
        margin-bottom: 10px;
    }

    .timeline-wrapper .content-box {
        padding: 10px;
        margin-top: 10px;
    }

    .milestone-items {
        font-size: 12px;
    }

    .milestone-items li {
        margin-bottom: 2px;
    }
}

@media (max-height: 700px) {
    .timeline-wrapper {
        transform: scale(0.75);
    }

    .slide-header {
        margin-bottom: 5px;
        padding-bottom: 5px;
    }

    .slide-title-text {
        font-size: 28px;
    }
}

@media (max-height: 650px) {
    .timeline-wrapper {
        transform: scale(0.55);
    }
}

/* Minimum supported viewport height - enable scrolling below 1000px */
@media (max-height: 999px) {
    body {
        overflow-y: auto !important;
        overflow-x: hidden;
    }

    .presentation {
        min-height: 1000px;
        height: auto;
        position: relative;
    }

    .slide {
        min-height: 1000px;
        height: auto;
        position: relative;
    }

    .slide-hidden {
        position: absolute;
    }

    .progress-line {
        position: absolute;
        height: 1000px;
    }
}

/* Print Styles */
@media print {
    .progress-line {
        display: none;
    }

    .slide {
        position: relative;
        page-break-after: always;
        height: auto;
        min-height: 100vh;
    }

    .slide-hidden {
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================
   11. Slide 5 and 7: Enhanced Recommendation Layouts
   ============================================ */

/* Side-by-side layout for recommendation slides */
.slide-5-layout,
.slide-7-layout {
    display: flex;
    gap: 200px;
    align-items: stretch;
    justify-content: center;
    margin: auto;
    max-width: 1400px;
    width: 100%;
}

.slide-5-layout .recommendation-box,
.slide-7-layout .recommendation-box {
    flex: 1;
    max-width: none;
    margin: 0;
}

/* Benchmark and Implementation Sections */
.benchmark-section,
.implementation-example {
    flex: 1;
    background: var(--box-bg);
    border: var(--box-border);
    border-radius: var(--box-radius);
    padding: 40px 50px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    display: flex;
    flex-direction: column;
}

.benchmark-section h4,
.implementation-example h4 {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 12px;
}

/* Benchmark Cards */
.benchmark-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px 18px;
    margin-bottom: 15px;
    text-align: center;
}

.benchmark-card:last-child {
    margin-bottom: 0;
}

.benchmark-stat {
    display: block;
    font-size: 32px;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-heading);
    line-height: 1.1;
}

.benchmark-label {
    display: block;
    font-size: 15px;
    color: var(--text-primary);
    margin-top: 10px;
    line-height: 1.4;
}

.benchmark-source {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 8px;
}

/* Implementation Steps */
.impl-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.impl-step:last-of-type {
    margin-bottom: 0;
}

.step-icon {
    flex: 0 0 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
}

.step-text {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    padding-top: 5px;
}

.impl-benchmark {
    background: rgba(224, 122, 71, 0.15);
    border-left: 3px solid var(--accent);
    padding: 15px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.impl-benchmark strong {
    font-size: 14px;
}

.impl-benchmark .benchmark-source {
    margin-top: 8px;
    font-size: 11px;
}

/* Responsive adjustments for enhanced slides */
@media (max-width: 1200px) {

    .slide-5-layout,
    .slide-7-layout {
        flex-direction: column;
        gap: 30px;
    }

    .benchmark-section,
    .implementation-example {
        flex: 1;
        max-width: 100%;
    }
}

/* Slide 11: Action Summary Layout (transformed from data summary) */
.slide-11-action .stat-card .stat-number {
    font-size: 28px;
    font-weight: 600;
    color: var(--accent);
}

.slide-11-action .stat-card .stat-description {
    font-size: 16px;
}

.slide-11-action .stat-card .stat-tagline {
    font-size: 14px;
}

/* ============================================
   12. Navigation Controls (Edge Hover)
   ============================================ */
.nav-control {
    position: fixed;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

/* Reset animation when controls are shown via edge detection */
.nav-control.visible {
    animation: none !important;
}

/* Hide controls that are disabled */
.nav-control[style*="display: none"] {
    opacity: 0 !important;
    pointer-events: none !important;
    animation: none !important;
}

.nav-control.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Left/Right Edge Controls - Dark Gradient Base */
.nav-control-left,
.nav-control-right {
    top: 0;
    bottom: 0;
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-control-left {
    left: 0;
    background: linear-gradient(to right,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.25) 50%,
            transparent 100%);
}

.nav-control-right {
    right: 0;
    background: linear-gradient(to left,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.25) 50%,
            transparent 100%);
}

/* Arrow controls that slide in on hover */
.nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    transform: translateX(0);
}

.nav-arrow-left {
    transform: translateX(-80px);
    opacity: 0;
}

.nav-arrow-right {
    transform: translateX(80px);
    opacity: 0;
}

.nav-control-left:hover .nav-arrow-left,
.nav-control-right:hover .nav-arrow-right {
    transform: translateX(0);
    opacity: 1;
}

.nav-control-top:hover .nav-restart {
    transform: translateY(0);
    opacity: 1;
}

.nav-arrow svg {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.4);
    transition: color var(--transition-normal);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.nav-control-left:hover .nav-arrow svg,
.nav-control-right:hover .nav-arrow svg {
    color: rgba(255, 255, 255, 0.7);
}

/* Top Edge Control (Restart) */
.nav-control-top {
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.25) 50%,
            transparent 100%);
    cursor: pointer;
}

.nav-control-top.visible {
    transform: none;
}

.nav-restart {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    transform: translateY(-60px);
    opacity: 0;
}

.nav-control-top:hover .nav-restart {
    transform: translateY(0);
}

.nav-restart svg {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.4);
    transition: color var(--transition-normal);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.nav-control-top:hover .nav-restart svg {
    color: rgba(255, 255, 255, 0.7);
}

/* Bottom Navigation Carousel */
.nav-carousel-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    pointer-events: none;
}

.nav-carousel-tab {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-carousel-container:hover .nav-carousel-tab,
.nav-carousel-container.hovered .nav-carousel-tab {
    background: rgba(255, 255, 255, 0.25);
    height: 12px;
}

.nav-carousel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-carousel::-webkit-scrollbar {
    display: none;
}

.nav-carousel-container:hover .nav-carousel,
.nav-carousel-container.hovered .nav-carousel {
    height: 100px;
    pointer-events: auto;
}

.nav-carousel-thumbnails {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    min-width: 100%;
}

.nav-carousel-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 68px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
}

.nav-carousel-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.nav-carousel-thumbnail-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.nav-carousel-container:hover .nav-carousel-thumbnail,
.nav-carousel-container.hovered .nav-carousel-thumbnail {
    opacity: 1;
    transform: translateY(0);
}

.nav-carousel-thumbnail:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nav-carousel-thumbnail.active {
    border-color: var(--accent);
    background: rgba(224, 122, 71, 0.2);
    box-shadow: 0 0 0 2px rgba(224, 122, 71, 0.3);
}

.nav-carousel-thumbnail-number {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.nav-carousel-thumbnail.active .nav-carousel-thumbnail-number {
    background: var(--accent);
    color: var(--text-primary);
}

.nav-carousel-thumbnail-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    font-weight: 500;
    padding: 20px 6px 6px 6px;
    text-align: center;
    line-height: 1.2;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-carousel-thumbnail.active .nav-carousel-thumbnail-title {
    color: rgba(255, 255, 255, 1);
    background: linear-gradient(to top, rgba(224, 122, 71, 0.3) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
}

/* Bounce animation keyframes for control elements */
@keyframes bounceInArrowLeft {
    0% {
        opacity: 0;
        transform: translateX(-80px);
    }

    50% {
        transform: translateX(15px);
    }

    70% {
        transform: translateX(-5px);
    }

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

@keyframes bounceInArrowRight {
    0% {
        opacity: 0;
        transform: translateX(80px);
    }

    50% {
        transform: translateX(-15px);
    }

    70% {
        transform: translateX(5px);
    }

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

@keyframes bounceInRestart {
    0% {
        opacity: 0;
        transform: translateY(-60px);
    }

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

    70% {
        transform: translateY(-3px);
    }

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

@keyframes bounceOutArrowLeft {
    0% {
        opacity: 1;
        transform: translateX(0);
    }

    30% {
        transform: translateX(-10px);
    }

    100% {
        opacity: 0;
        transform: translateX(-80px);
    }
}

@keyframes bounceOutArrowRight {
    0% {
        opacity: 1;
        transform: translateX(0);
    }

    30% {
        transform: translateX(10px);
    }

    100% {
        opacity: 0;
        transform: translateX(80px);
    }
}

@keyframes bounceOutRestart {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    30% {
        transform: translateY(-8px);
    }

    100% {
        opacity: 0;
        transform: translateY(-60px);
    }
}

/* Show edge controls when carousel is hovered - control elements bounce in */
body.carousel-hovered .nav-control-left:not([style*="display: none"]) {
    opacity: 1;
    pointer-events: auto;
}

body.carousel-hovered .nav-control-left:not([style*="display: none"]) .nav-arrow-left {
    animation: bounceInArrowLeft 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards !important;
}

body.carousel-hovered .nav-control-right:not([style*="display: none"]) {
    opacity: 1;
    pointer-events: auto;
}

body.carousel-hovered .nav-control-right:not([style*="display: none"]) .nav-arrow-right {
    animation: bounceInArrowRight 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards !important;
}

body.carousel-hovered .nav-control-top:not([style*="display: none"]) {
    opacity: 1;
    pointer-events: auto;
}

body.carousel-hovered .nav-control-top:not([style*="display: none"]) .nav-restart {
    animation: bounceInRestart 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards !important;
}

body.carousel-hovered .nav-control-left:hover,
body.carousel-hovered .nav-control-right:hover,
body.carousel-hovered .nav-control-top:hover {
    opacity: 1;
}

/* Bounce out when carousel is no longer hovered (only if not visible via edge detection) */
body:not(.carousel-hovered) .nav-control-left:not(.visible):not([style*="display: none"]) .nav-arrow-left {
    animation: bounceOutArrowLeft 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

body:not(.carousel-hovered) .nav-control-right:not(.visible):not([style*="display: none"]) .nav-arrow-right {
    animation: bounceOutArrowRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

body:not(.carousel-hovered) .nav-control-top:not(.visible):not([style*="display: none"]) .nav-restart {
    animation: bounceOutRestart 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* ============================================
   10. Fullscreen Notice
   ============================================ */
.fullscreen-notice {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translate(-50%, 20px);
    z-index: 2000;
    pointer-events: none;
    /* Layout container passes clicks */
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fullscreen-notice.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.fullscreen-notice-content {
    background: rgba(44, 62, 80, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    /* Content accepts clicks */
    max-width: 400px;
}

.fullscreen-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
}

.notice-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: 8px;
}

.notice-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.notice-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
}

.btn-fullscreen {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.btn-fullscreen:hover {
    background: #e67e22;
    /* Slightly lighter orange */
    transform: translateY(-1px);
}

.btn-fullscreen:active {
    transform: translateY(1px);
}

.btn-dismiss {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
    margin-left: -8px;
    /* Tighten up spacing slightly */
}

.btn-dismiss:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-dismiss svg {
    width: 16px;
    height: 16px;
}

/* Minimized State */
.fullscreen-notice.minimized {
    left: auto;
    right: 130px;
    bottom: 30px;
    transform: none;
    width: 44px;
    height: 44px;
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fullscreen-notice.minimized:hover {
    transform: scale(1.1);
    background: var(--accent);
}

.fullscreen-notice.minimized .fullscreen-notice-content {
    padding: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: transparent;
    backdrop-filter: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fullscreen-notice.minimized .notice-text,
.fullscreen-notice.minimized .btn-fullscreen,
.fullscreen-notice.minimized .btn-dismiss {
    display: none;
}

.fullscreen-notice.minimized .fullscreen-icon {
    width: 20px;
    height: 20px;
    color: #fff;
    margin: 0;
}

/* Slide 9 Footnote */
.tier-footnote {
    text-align: left;
    width: 100%;
}