html {
    scroll-behavior: smooth;
}

:root {
    --page-blue-1: #eaf2ff;
    --page-blue-2: #dfeaff;
    --page-blue-3: #fff6f4;
    --page-blue-4: #d7e6ff;

    --text-main: #111827;
    --text-soft: #4b5563;

    --accent: #073454;
    --accent-rgb: 7, 52, 84;
    --hero-accent: #405ffc;
    --hero-accent-2: #ff9a62;

    --card-bg: rgba(255, 255, 255, 0.78);
    --nav-bg: rgba(255, 255, 255, 0.2);
    --hero-bg-top: rgba(255, 255, 255, 0.42);
    --hero-bg-bottom: rgba(255, 255, 255, 0.28);

    --card-border: rgba(180, 197, 228, 0.45);
    --surface: #fafafa;
    --border: #e9e9e9;

    --shadow: rgba(17, 17, 17, 0.06);
    --shadow-soft: 0 12px 32px rgba(31, 41, 55, 0.08);
    --shadow-hero: 0 16px 40px rgba(59, 130, 246, 0.10);

    --nav-offset: 75px;
}

:root.light {
    --page-blue-1: #eaf2ff;
    --page-blue-2: #dfeaff;
    --page-blue-3: #fff6f4;
    --page-blue-4: #d7e6ff;

    --card-bg: rgba(255, 255, 255, 0.78);
    --nav-bg: rgba(255, 255, 255, 0.2);
    --hero-bg-top: rgba(255, 255, 255, 0.42);
    --hero-bg-bottom: rgba(255, 255, 255, 0.28);

    --card-border: rgba(180, 197, 228, 0.45);
    --shadow-soft: 0 12px 32px rgba(31, 41, 55, 0.08);
    --shadow-hero: 0 16px 40px rgba(59, 130, 246, 0.10);
}

:root.dark {
    --page-blue-1: #8fb8ee;
    --page-blue-2: #7aaae8;
    --page-blue-3: #bfd7f8;
    --page-blue-4: #9ec6f5;
    --card-bg: rgba(255, 255, 255, 0.76);
    --nav-bg: rgba(255, 255, 255, 0.2);
    --hero-bg-top: rgba(255, 255, 255, 0.40);
    --hero-bg-bottom: rgba(255, 255, 255, 0.26);
    --card-border: rgba(200, 214, 237, 0.48);
    --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.12);
    --shadow-hero: 0 18px 50px rgba(37, 99, 235, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root:not(.light):not(.dark) {
        --page-blue-1: #8fb8ee;
        --page-blue-2: #7aaae8;
        --page-blue-3: #bfd7f8;
        --page-blue-4: #9ec6f5;

        --card-bg: rgba(255, 255, 255, 0.76);
        --nav-bg: rgba(255, 255, 255, 0.2);
        --hero-bg-top: rgba(255, 255, 255, 0.40);
        --hero-bg-bottom: rgba(255, 255, 255, 0.26);

        --card-border: rgba(200, 214, 237, 0.48);
        --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.12);
        --shadow-hero: 0 18px 50px rgba(37, 99, 235, 0.12);
    }
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--page-blue-1);
    position: relative;
    overflow-x: hidden;
}

/* background layers */
body::before,
body::after {
    content: "";
    position: fixed;
    top: -60vh;
    left: -60vw;
    width: 220vw;
    height: 220vh;
    pointer-events: none;
    will-change: transform, background-position;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: linear-gradient(
        135deg,
        var(--page-blue-1),
        var(--page-blue-2),
        var(--page-blue-3),
        var(--page-blue-4),
        var(--page-blue-2),
        var(--page-blue-1)
    );
    background-size: 100% 300%;
    background-position: 0 var(--scroll-bg, 0px);
}

body::after {
    z-index: -1;
    opacity: 0.32;
    transform: translateY(calc(var(--scroll-y, 0px) * -0.015));
    background:
        linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 255, 255, 0.16) 18%,
        transparent 36%,
        rgba(255, 255, 255, 0.10) 56%,
        transparent 78%
        );
    background-size: 220% 220%;
    background-position: calc(var(--scroll-y, 0px) * 0.03) calc(var(--scroll-y, 0px) * -0.01);
    background-repeat: no-repeat;
}

.nav-theme {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #111;
    cursor: pointer;
    padding: 0;
    transition: background 120ms ease, transform 120ms ease;
}

.theme-toggle:hover {
    background: rgba(var(--accent-rgb), 0.12);
    transform: translateY(-1px);
}

.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

main {
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 18px 60px;
}

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

header p {
    margin-top: 8px;
    color: var(--text-soft);
}

/* shared glass panels */
.card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.32),
        rgba(255, 255, 255, 0.28)
    );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft);
    border-radius: 14px;
    padding: 22px;
    margin: 18px 0;
    scroll-margin-top: calc(var(--nav-offset) + 12px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 1000;

    background: var(--nav-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft);
    border-radius: 14px;

    padding: 10px 14px;
    margin: 18px 0 26px;
}

/* hero */
.hero {
    position: relative;
    text-align: center;
    padding: 72px 28px 42px;
    margin: 18px 0 34px;
    border-radius: 28px;
    background: linear-gradient(
        135deg,
        var(--hero-bg-top),
        var(--hero-bg-bottom)
    );
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: var(--shadow-hero);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    top: -220px;
    left: -140px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 68%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    right: -180px;
    bottom: -260px;
    background: radial-gradient(circle, rgba(255, 122, 69, 0.14), transparent 68%);
    pointer-events: none;
}

.hero-title {
    max-width: 980px;
    margin: 0 auto 16px;
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #041443;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,0.35),
        1px -1px 0 rgba(255,255,255,0.35),
        -1px  1px 0 rgba(255,255,255,0.35),
        1px  1px 0 rgba(255,255,255,0.35),
        0 3px 6px rgba(0,0,0,0.15),
        0 0 10px rgba(59, 72, 135, 0.25),
        0 0 24px rgba(59, 72, 135, 0.15);
}

.hero-title::after {
    content: "";
    display: block;
    width: 600px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 2px;
    background: linear-gradient(
        90deg,
        var(--hero-accent),
        var(--hero-accent-2)
    );
}
.hero-subtitle {
    max-width: 820px;
    margin: 0 auto 30px;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    line-height: 1.7;
    color: #28416f;
}

/* map section */
#mapdemo {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.32),
        rgba(255, 255, 255, 0.28)
    );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft);
    border-radius: 28px;
    padding: 32px 28px;
    margin: 0 0 34px;
}

#mapdemo .section-description {
    color: #041443;
}

/* shared section anchor offset */
section[id] {
    scroll-margin-top: 110px;
}

@media (max-width: 900px) {
    .hero {
        padding: 56px 20px 30px;
        border-radius: 24px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
}

.logo{
    height: 34px;
    width: auto;
    display: block;
}

.logo:hover{ 
    opacity: 0.7; 
}

.nav-tabs{
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.nav-tabs a{
    text-decoration: none;
    color: #111;
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 600;
    opacity: 0.8;
}

.nav-tabs a:hover{
    background: rgba(7, 52, 84, 0.28);
    color: #073454;
}

.nav-toggle{
    display: none;
    border: none;
    background: transparent;
    border-radius: 12px;
    padding: 8px;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    color: #111;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}


.nav-toggle:hover,
.nav-toggle:active{
    background: rgba(var(--accent-rgb), 0.28);
    color: var(--accent);
}

.nav-toggle:focus{
    outline: none;
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

@media (max-width: 600px){
    .navbar{
        display: grid;
        grid-template-columns: 1fr auto auto 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
    } 

    .logo{ 
        height: 26px; 
    }

    .nav-left{ 
        grid-column: 1; 
        grid-row: 1; 
        justify-self: start;
    }

    .nav-toggle{
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        align-items: center;
        justify-content: center;
    }

    .nav-theme {
        grid-column: 3;
        grid-row: 1;
        justify-self: center;
    }

    .nav-right{ 
        grid-column: 4; 
        grid-row: 1; 
        justify-self: end; 
    }

    .nav-menu{
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        display: none;
        margin-top: 4px;
    }

    .navbar.nav-open .nav-menu{ 
        display: block; 
    }

    .nav-tabs{
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        justify-items: center;
    }

    .nav-tabs a{
        width: 100%;
        text-align: center;
        padding: 10px 12px;
        border-radius: 12px;
    }

    .hero-title::after{
        width: 260px;
    }
}

/* -- Headings */
h1 { 
    margin: 0;
}

h2{
    text-align: center;
    margin: 0 0 12px;
}

h3 {
    text-align: left;
    margin: 20px 0 10px;
}

h4 {
    margin: 16px 0 6px;
    font-size: 1.02rem;
    font-weight: 700;
    opacity: 0.9;
    padding-left: 10px;
    border-left: 3px solid #9ca3af;
}

/* -- Overview section */
.overview-grid{
    display: grid;
    grid-template-columns: 180px 1fr 340px; /* label | text | image */
    gap: 12px 12px;
    align-items: start;
    margin-top: 12px;
}

.overview-label h3{
    margin: 0;
    font-size: 1.0rem;
}

.overview-visual{
    grid-column: 3;   
    grid-row: 1 / span 2;
}

.overview-img{
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid #e9e9e9;
}

.overview-caption{
    max-width: 320px;
    margin: 8px auto 0;
    font-size: 0.85rem;
    opacity: 0.85;
    line-height: 1.3;
    text-align: center;
    color: #555;
    font-style: italic;
}

.pull-quote{
    padding-left: 10px;
    border-left: 3px solid #111;
}

.overview-span{
    grid-column: 2 / span 2;   
}

.overview-label.row2 { grid-row: 2; }
.overview-span.row2  { grid-row: 2; }

.overview-text p{
    margin: 0 0 6px 0;
}

.overview-text ul{
    margin: 6px;    
    padding-left: 25px;    
}

.overview-divider{
    display: none;
}

@media (max-width: 900px){
    .overview-grid{
        grid-template-columns: 1fr; 
    }
    .overview-visual{
        grid-row: auto;
    }
    .overview-label h3{
        text-align: left;
    }
}

@media (max-width: 600px){
    .overview-grid{
        grid-template-columns: 1fr;
    }

    .overview-label{ grid-column: 1; grid-row: 1; }
    .overview-visual{ grid-column: 1; grid-row: 2; }
    .overview-text{ grid-column: 1; grid-row: 3; }
    .overview-label.row2{ grid-column: 1; grid-row: 4; }
    .overview-text.overview-span.row2{ grid-column: 1; grid-row: 5; }

    .overview-label h3{
        text-align: center;
    }

    .overview-caption{
        max-width: 100%;
    }

    .overview-divider{
        display: block;
        border: none;
        border-top: 1px solid #eee;
        margin: 18px 0 8px;
    }
}

/* -- Approach section */
.approach-intro{
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 16px;
} 
/* -- Approach Flowchart */
.pipeline-img {
    width: 100%;
    max-width: 1100px;
    height: auto;
    display: block;
    margin: 0 auto 8px;
}

.pipeline-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    margin-top: 6px;
    margin-bottom: 20px;
    font-style: italic;
}

.image-container {
    position: relative;
    display: block; 
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.image-container img {
    display: block;
    width: 100%;
    height: auto;
}

/* -- bottom right expand button */
.expand-btn {
    position: absolute;
    bottom: clamp(8px, 5%, 14px);
    right: clamp(8px, 2%, 14px);

    width: 22px;
    height: 22px;

    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: #000000;
    color: #fafafa;

    border: none;
    border-radius: 6px;

    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease;
}

.expand-btn:hover {
    background: #073454;
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    inset: 0;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
}

.modal-img {
    display: block;
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;

    border-radius: 12px;
    background: #fafafa;
    padding: 12px;
    box-sizing: border-box;
}  

body.modal-open{
    overflow: hidden;
}

/* -- top right X close button */
.modal-close{
    position: absolute;
    top: 2%;
    right: 3%;

    width: 32px;
    height: 32px;

    background: #000000;
    color: #fafafa;

    border: none;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    line-height: 1;
    cursor: pointer;

    transition: transform 120ms ease, background 120ms ease;
}

.modal-close:hover{
    background: #073454;
    transform: scale(1.05);
}

/* -- horizontal divider used in multiple sections */
.section-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 18px 0 8px;
}

/* -- Data subsection under approach section */
.data-list,
.data-list-2 {
    margin: 6px 0 12px;
    padding-left: 20px;
}

.data-list li {
    margin: 4px;
}

.tech-list{
    margin: 6px 0 12px;
    padding-left: 2px;
    font-size: 0.95rem;
}

.tech-list li {
    margin: 4px;
    margin-left: 12px;
}


.subsection-content {
    margin-left: 18px;
    margin-top: 8px;
    margin-bottom: 16px;
}

/* -- demo (Fire x Model) */
.demo-intro{
    max-width: 850px;
    margin: 0 6px 12px;
    opacity: 0.9;
}

.demo-card{
    background: rgba(var(--accent-rgb), 0.28);
    border: 2px solid rgba(var(--accent-rgb), 0.28);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 30px var(--shadow);
}

.demo-controls{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
    background: var(--surface);
    border-radius: 14px;
    padding: 12px;
}

.demo-field{
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.demo-field span{
    font-size: 0.95rem;
    opacity: 0.9;
}

.demo-select{
    width: 100%;
    padding: 11px 42px 11px 12px; 
    border-radius: 12px;
    background: #fff;
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    border: 2px solid rgba(var(--accent-rgb), 0.28);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--accent) 50%),
        linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    box-shadow: 0 6px 16px rgba(17, 17, 17, 0.06);
    transition: border 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.demo-select:hover{
    border-color: rgba(var(--accent-rgb), 0.35);
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08);
    transform: translateY(-1px);
}

.demo-select:focus{
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12), 0 10px 24px rgba(17, 17, 17, 0.08);
}

.demo-visual{ 
    margin-top: 6px; 
}

.demo-empty{
    border: 1px dashed #d9d9d9;
    border-radius: 12px;
    padding: 18px;
    background: var(--surface);
    text-align: center;
    opacity: 0.75;
}

.demo-metrics-title-wide {
    font-weight: 800;
    margin-bottom: 8px;
    margin-top: 8px;
    text-align: center;
    display: flex;
    justify-content: center;

}

.demo-compare input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.demo-compare:has(input:disabled) {
    opacity: 0.7;
}

.demo-image{
    border: 1px solid var(--border);
    background: #fff;
}

.demo-text{
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px 14px;
    background: var(--surface);
}

.demo-meta{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0px;
    text-align: center;
    flex-wrap: nowrap;     
}

.demo-meta-row{
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 12px 14px;
    margin-bottom: 14px;
}

.demo-meta strong{
    margin-right: 4px;    
}

.demo-metrics-row{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
    margin-bottom: 8px;
}

.demo-metrics{
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 12px;
    padding: 12px;
    border-left: 3px solid #ddd;
}

.demo-metrics-title{
    font-weight: 800;
    opacity: 0.9;
    margin-bottom: 6px;
    text-align: center;
}

.demo-metrics div{ 
    text-align: left; 
}

.demo-compare{
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    background: #fff;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 12px;
    padding: 10px 12px;
}

.demo-compare input[type="checkbox"]{
    accent-color: var(--accent);
    cursor: pointer;
}

.compare-image-block{
    margin-top: 14px;
}

.compare-image-label{
    font-weight: 800;
    text-align: center;
    margin: 4px 0 8px;
    font-size: 1rem;
}

.demo-metrics-wide{
    margin-top: 12px;
}

.overall-compare-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    margin-top: 8px;
}

.overall-model-title{
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}

@media (max-width: 600px){
    .overall-compare-grid{
        grid-template-columns: 1fr;
    }
}

#shapDemo .demo-image img{
    max-width: 400px;
    margin: 0 auto;
}

.shap-explanation{
    margin-left: 12px;
}

#shapDemo .demo-text ul {
    margin-top: 6px;
    margin-bottom: 6px;
    padding-left: 18px;
}

#shapDemo .demo-text ul ul {
    margin-top: 8px;
    margin-bottom: 8px;
}

#shapDemo .demo-text li {
    margin-bottom: 2px;
}

#shap-help {
    margin-bottom: 10px;
}

@media (max-width: 600px){
    .demo-controls{ 
        grid-template-columns: 1fr;
    }

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

    .demo-meta{
        display: flex !important;
        flex-wrap: wrap; 
        flex-direction: column !important;
        align-items: center !important;
        gap: 4px !important;
        text-align: center;
    }

    .demo-meta strong{
        margin-right: 0 !important;
    }

    .demo-meta-row{
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 12px;
    }
}

/* -- Expandable sections (used throughout website) */
.expandable {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--card-border);
    transition: background 120ms ease, border 120ms ease;
}

.expandable:hover {
    background: rgba(255,255,255,0.45);
}

.expandable[open] {
    background: rgba(255,255,255,0.5);
}

.expandable summary {
    cursor: pointer;
    font-weight: 600;
}

.expandable summary:hover {
    opacity: 0.8;
    color: var(--accent);
}

.expand-content {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    border-left: 2px solid rgba(0,0,0,0.12);
}

.expand-content p {
    margin: 6px 0 0 18px;
}

.expand-content ul {
    margin: 0 0 0 24px;
}

/* -- buttons in Links section (and Q1 buttons) */
.links-row {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 16px;
    width: 160px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.2px;
    background: #073454;
    color: #fafafa;
    border: 1px solid #073454;
    box-shadow: 0 4px 14px rgba(7, 52, 84, 0.25);
    transition: 
        transform 120ms ease,
        box-shadow 120ms ease,
        background 120ms ease;
}

.btn:hover {
    background: #0A4A74;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(7, 52, 84, 0.35);
}

.btn:active {
    transform: translateY(0px);
    box-shadow: 0 3px 10px rgba(7, 52, 84, 0.25);
}

.btn-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.btn:hover .btn-icon {
    stroke: #0285D2;
}

/* -- back to top floating button */
.back-to-top{
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2000;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid #111;
    background: var(--nav-bg);
    color: #111;
    display: none;           
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;
}

.back-to-top:hover{
    background: #073454;
    border-color: #073454;
    color: #fff;
}

/* -- Map and controls */
#map {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    margin-top: 1rem;
}

.demo-field-map{
    display: grid;
    gap: 10px;             
    font-weight: 600;
    border: 2px solid rgba(7, 52, 84, 0.28);
    border-radius: 12px;
    padding: 12px;
    background: rgba(var(--accent-rgb), 0.18);
}

#fireSelectMap {
    width: auto;          
    min-width: 160px; 
}

.map-row {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
}

.map-check input[type="checkbox"] {
    accent-color: #073454;
    cursor: pointer;
}

.map-check {
    cursor: pointer;
}

.recenter-btn{
    width: auto;
    display: flex;             
    align-items: center;       
    justify-content: center;   
    text-align: center;    
    border-radius: 10px;
    border: 2px solid rgba(7, 52, 84, 0.28);
    background: white;
    font-weight: 600;
    cursor: pointer;
    padding-left: 10px;
    padding-right: 10px;
}

.recenter-btn:hover{
    border-color: rgba(7, 52, 84, 0.6);
}

.map-controls{
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}

.section-description {
    text-align: center;
    max-width: 800px;  
    margin: 0 auto 1rem auto;  
    line-height: 1.6;
}

.map-check{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;      
}

.map-note{
    font-size: 0.9rem;
    opacity: 0.75;
    margin-top: 6px;
    margin-bottom: 6px;
    text-align: center;
    margin-left: 60px;
    margin-right: 60px;
    white-space: pre-line;
}

.map-check input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 600px){
    .map-row{
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        justify-items: stretch;
        text-align: center;
    }

    #fireSelectMap,
    .recenter-btn{
        width: 100%;
    }

    .map-note{
        margin-left: 4px;
        margin-right: 4px;
    }
}

/* -- Results tables */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.95rem;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
}

.results-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.results-table th {
    text-align: left;
    border-bottom: 2px solid #ddd;
    padding: 10px;
}

.results-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.model-row td {
    padding-top: 14px;
}

.divider-row td {
    border-top: 2px solid #999;
    border-bottom: none;
    height: 2px;
    padding: 0;
}

.accuracy-row td {
    border-bottom: none;
    font-weight: 600;
}

.accuracy-row td:first-child {
    font-style: italic;
}

.accuracy-value {
    text-align: center;
}

.results-table td[rowspan] {
    border-bottom: none;
}

.results-list {
    margin: 6px 0 12px;
    padding-left: 20px;
}

.limitations-list
{
    margin: 6px 0 12px;
    padding-left: 20px;
}

.limitations-list p{
    margin-top: 8px;
}

.nested-list{
    margin: 6px 0 12px;
    padding-left: 18px;
}

.dataset-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted #aaa;
    cursor: pointer;
}

.dataset-link:hover {
    border-bottom: 1px solid #333;
}

/* scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 500ms ease,
        transform 500ms ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal:not(.is-visible) {
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* scroll */
.scroll-cue {
    text-decoration: none;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(4, 20, 67, 0.7);
    animation: scrollCueFloat 1.8s ease-in-out infinite;
}

.scroll-cue-text {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.scroll-cue-icon {
    width: 18px;
    height: 18px;
}

@keyframes scrollCueFloat {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.65;
    }
    50% {
        transform: translateY(6px);
        opacity: 1;
    }
}

/* title stats */
.hero-stats{
    display:flex;
    justify-content:center;
    align-items:center;
    max-width:520px;
    margin:26px auto 0;
    padding:14px 12px;
    border-radius:18px;
    background:rgba(255,255,255,0.34);
    border:1px solid rgba(180,197,228,0.35);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
}

.hero-stat{
    flex:1;
    text-align:center;
    position:relative;
}

.hero-stat-number{
    display:block;
    font-size:clamp(1.35rem,2vw,2rem);
    font-weight:800;
    color:var(--hero-accent);
    line-height:1.1;
}

.hero-stat-label{
    display:block;
    font-size:0.8rem;
    color:var(--text-soft);
    letter-spacing:0.06em;
    text-transform:uppercase;
    margin-top:2px;
}

.hero-stat:not(:last-child)::after{
    content:"";
    position:absolute;
    right:0;
    top:20%;
    height:60%;
    width:1px;
    background:rgba(0,0,0,0.12);
}

@media (max-width:600px){
    .hero-stat{
        padding:0 10px;
    }
}