    /* ============================================
   Talaix Earth Systems - Main Stylesheet
   ============================================ */

:root {
    --primary: #0EA5E9;
    --primary-dark: #0369A1;
    --primary-light: #7DD3FC;
    --secondary: #10B981;
    --accent: #F59E0B;
    --danger: #EF4444;
    --dark: #0F172A;
    --dark-2: #1E293B;
    --dark-3: #334155;
    --light: #F8FAFC;
    --light-2: #F1F5F9;
    --text: #1E293B;
    --text-light: #64748B;
    --white: #FFFFFF;
    --gradient: linear-gradient(135deg, #0EA5E9 0%, #10B981 100%);
    --gradient-fire: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-main: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text);
    background: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-light);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.btn-nav {
    background: var(--gradient);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--dark);
    color: var(--white);
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--primary-light);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 32px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.8);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 64px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-light {
    background: var(--white);
    color: var(--dark);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,255,255,0.2);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline-light:hover {
    border-color: var(--white);
    transform: translateY(-2px);
}

/* Outline button for LIGHT backgrounds — .btn-outline/.btn-outline-light
   are white-on-dark variants; using them on a light section makes the
   label invisible until hover. This variant keeps the label readable in
   the normal state and has a visible keyboard focus ring. */
.btn-outline-dark {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
}

.btn-outline-dark:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
}

.btn:focus-visible,
.btn-action:focus-visible,
.text-link:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.stat {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

/* ============================================
   Sections
   ============================================ */

.section {
    padding: 100px 0;
}

.section-dark {
    background: var(--dark);
    color: var(--white);
}

.section-tech {
    background: var(--dark-2);
    color: var(--white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
}

.section-dark .section-subtitle,
.section-tech .section-subtitle {
    color: rgba(255,255,255,0.7);
}

/* ============================================
   Problem Cards
   ============================================ */

.problem-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.problem-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.problem-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.problem-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.problem-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--dark);
}

.problem-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
    background: var(--gradient);
    padding: 80px 0;
    text-align: center;
    color: var(--white);
}

.cta-section h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--dark);
    color: var(--white);
    padding: 64px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-top: 16px;
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--primary-light);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-contact p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-contact a {
    color: var(--primary-light);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

/* ============================================
   Page Hero (Subpages)
   ============================================ */

.page-hero {
    background: var(--dark);
    color: var(--white);
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.page-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
}

/* ============================================
   Content Sections
   ============================================ */

.content-section {
    padding: 80px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.content-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
}

.content-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--dark);
}

.content-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.content-card ul {
    padding-left: 20px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   Timeline (Roadmap)
   ============================================ */

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 48px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--primary);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}

.timeline-content {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.timeline-phase {
    display: inline-block;
    background: var(--gradient);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ============================================
   Contact Form
   ============================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.contact-info {
    padding: 32px;
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--dark);
}

.contact-info p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 24px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text);
}

.contact-detail-icon {
    width: 40px;
    height: 40px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--dark);
    transition: border-color 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    color: var(--dark);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Password field with show/hide toggle */
.password-wrap {
    position: relative;
}
.password-wrap input {
    padding-right: 64px;
}

.pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--muted, #64748b);
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease;
}

.pw-toggle:hover,
.pw-toggle:focus-visible {
    color: var(--primary);
    background: var(--light, #f1f5f9);
    outline: none;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .problem-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--dark);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .problem-grid {
        grid-template-columns: 1fr;
    }

    .content-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 60px;
        padding-right: 0;
        text-align: left !important;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 12px;
        right: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Animations
   ============================================ */

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Site chrome (injected by js/chrome.js)
   ============================================ */

.nav-account {
    margin-left: auto;
}

.nav-account a {
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-sm);
    padding: 8px 18px;
}

.nav-account a:hover,
.nav-account a.active {
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .nav-account {
        margin-left: 0;
    }

    .nav-account a {
        border: none;
        padding: 0;
    }
}

/* ============================================
   Evidence chips (shared, light theme)
   OBSERVED=green · MODELLED=blue · FORECAST=purple · UNKNOWN=grey
   ============================================ */

.chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.chip-observed { background: rgba(34,197,94,.16); color: #15803d; }
.chip-documented { background: rgba(16,185,129,.16); color: #047857; }
.chip-reported { background: rgba(245,158,11,.18); color: #b45309; }
.chip-modelled { background: rgba(14,165,233,.16); color: #0369a1; }
.chip-inferred { background: rgba(6,182,212,.16); color: #0e7490; }
.chip-forecast { background: rgba(168,85,247,.16); color: #7e22ce; }
.chip-historical { background: rgba(99,102,241,.14); color: #4338ca; }
.chip-projected,
.chip-scenario { background: rgba(168,85,247,.12); color: #6d28d9; }
.chip-unknown,
.chip-unavailable { background: rgba(148,163,184,.2); color: #475569; }
.chip-key_required { background: rgba(245,158,11,.18); color: #b45309; }
.chip-partial { background: rgba(245,158,11,.18); color: #b45309; }
.chip-error { background: rgba(239,68,68,.14); color: #b91c1c; }
.chip-proxy { background: rgba(6,182,212,.16); color: #0e7490; }
.chip-mapped { background: rgba(34,197,94,.16); color: #15803d; }
.chip-not_mapped,
.chip-not_provided,
.chip-not_quantified,
.chip-insufficient_data { background: rgba(148,163,184,.2); color: #475569; }

/* ============================================
   Product pages (Map / Events / Intelligence /
   Solutions / Economy / Reports / Account)
   ============================================ */

.page-main {
    padding: 110px 0 70px;
    min-height: 60vh;
}

.page-main h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    margin-bottom: 8px;
    color: var(--dark);
}

.page-lead {
    color: var(--text-light);
    max-width: 760px;
    margin-bottom: 28px;
}

.panel {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    padding: 24px 26px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}

.panel h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 14px;
}

.panel h3 {
    font-size: 0.98rem;
    color: var(--dark);
    margin: 16px 0 8px;
}

.muted {
    color: var(--text-light);
    font-size: 0.9rem;
}

.small {
    font-size: 0.8rem;
}

.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 20px;
}

.toolbar .form-group {
    margin-bottom: 0;
    flex: 1 1 220px;
}

.toolbar .form-group.narrow {
    flex: 0 1 130px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    font-family: var(--font-main);
    border: none;
    cursor: pointer;
    background: var(--gradient);
    color: var(--white);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(14,165,233,0.35);
}

.btn-action:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--dark-3);
}

.btn-quiet {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(0,0,0,0.12);
}

.btn-quiet:hover {
    color: var(--dark);
    border-color: var(--text-light);
    box-shadow: none;
}

.notice {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.92rem;
}

.notice-info { background: rgba(14,165,233,.1); border: 1px solid rgba(14,165,233,.3); color: #075985; }
.notice-error { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3); color: #991b1b; }
.notice-warn { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.35); color: #92400e; }
.notice-empty { background: var(--light-2); border: 1px solid rgba(0,0,0,0.06); color: var(--text-light); }

.hidden { display: none !important; }

/* Key-value + data tables */
.kv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.kv-table th,
.kv-table td {
    text-align: left;
    padding: 7px 10px;
    border-bottom: 1px solid var(--light-2);
    vertical-align: top;
}

.kv-table th {
    color: var(--text-light);
    font-weight: 600;
    white-space: nowrap;
    width: 1%;
    padding-right: 18px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    margin: 8px 0;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid var(--light-2);
    vertical-align: top;
}

.data-table thead th {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table-scroll {
    overflow-x: auto;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.item-card {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-card h3 {
    font-family: var(--font-display);
    font-size: 1.02rem;
    color: var(--dark);
    margin: 0;
}

.item-card .card-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sub-block {
    border: 1px solid var(--light-2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin: 8px 0;
}

.sub-block .sub-block-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.sub-observed {
    border-left: 3px solid #22c55e;
    background: rgba(34,197,94,.05);
}

.sub-observed .sub-block-title { color: #15803d; }

.sub-modelled {
    border-left: 3px solid #0ea5e9;
    background: rgba(14,165,233,.05);
}

.sub-modelled .sub-block-title { color: #0369a1; }

.sub-unknown {
    border-left: 3px solid #94a3b8;
    background: rgba(148,163,184,.07);
}

.sub-unknown .sub-block-title { color: #475569; }

.badge-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.text-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}

.text-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

details.expander {
    margin: 8px 0;
}

details.expander summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--primary-dark);
}

.disclaimer-box {
    border-left: 3px solid var(--accent);
    background: rgba(245,158,11,.07);
    padding: 10px 14px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem;
    color: #78350f;
    margin-top: 10px;
}

/* Hazard tabs (Intelligence) */
.hazard-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.hazard-tab {
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);
    background: var(--white);
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hazard-tab:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.hazard-tab.active {
    background: var(--dark);
    color: var(--white);
    border-color: var(--dark);
}

.hazard-tab:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Level banner */
.level-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.level-score {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--dark);
}

.level-label {
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    color: #081018;
}

.level-Low { background: #22c55e; }
.level-Moderate { background: #eab308; }
.level-High { background: #f97316; }
.level-Extreme { background: #ef4444; color: #fff; }
.level-Unknown { background: #94a3b8; color: #fff; }

/* ============================================
   Map page (map.html — the map is the product)
   ============================================ */

.map-shell {
    display: flex;
    height: calc(100vh - 72px);
    margin-top: 72px;
}

.map-sidebar {
    width: 350px;
    flex: none;
    overflow-y: auto;
    background: var(--white);
    border-right: 1px solid rgba(0,0,0,0.08);
    padding: 18px;
    z-index: 500;
}

.map-sidebar h2 {
    font-family: var(--font-display);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-light);
    margin: 20px 0 8px;
}

.map-sidebar h2:first-child {
    margin-top: 0;
}

.map-sidebar select,
.map-sidebar input[type="text"],
.map-sidebar input[type="number"] {
    width: 100%;
    padding: 9px 12px;
    border: 2px solid var(--light-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    background: var(--light);
}

.map-sidebar select:focus,
.map-sidebar input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

.map-canvas {
    flex: 1;
    position: relative;
}

.map-canvas #map {
    position: absolute;
    inset: 0;
}

.map-sidebar-toggle {
    display: none;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 600;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.layer-group-title {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-light);
    text-transform: uppercase;
    margin: 14px 0 4px;
}

.layer-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--light-2);
}

.layer-row input[type="checkbox"] {
    margin-top: 4px;
    flex: none;
}

.layer-row .layer-label {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.35;
}

.layer-row .layer-label.disabled {
    color: var(--text-light);
}

.layer-info-btn {
    flex: none;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.12);
    color: var(--text-light);
    border-radius: 6px;
    font-size: 0.7rem;
    padding: 2px 8px;
    cursor: pointer;
}

.layer-info-btn:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.layer-detail {
    font-size: 0.78rem;
    color: var(--text-light);
    padding: 8px 10px;
    margin: 2px 0 6px 24px;
    background: var(--light);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--primary-light);
}

.layer-detail .legend-swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px 0;
}

.layer-detail .swatch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
}

.layer-detail .swatch i {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.layer-state {
    font-size: 0.78rem;
    color: var(--text-light);
    padding: 4px 0 4px 24px;
}

/* On-map legend control */
.map-legend {
    background: rgba(255,255,255,0.92);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    box-shadow: var(--shadow-sm);
    font-size: 0.78rem;
    line-height: 1.5;
}

.map-legend .legend-title {
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark);
}

.map-legend .swatch {
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-legend .swatch i {
    width: 14px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

@media (max-width: 900px) {
    .map-shell {
        position: relative;
        height: calc(100vh - 72px);
    }

    .map-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 350px);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .map-sidebar.open {
        transform: translateX(0);
    }

    .map-sidebar-toggle {
        display: block;
    }
}

/* ============================================
   Homepage story (index.html)
   ============================================ */

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.story-card {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.story-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.section-dark .story-card {
    background: var(--dark-2);
    border-color: var(--dark-3);
}

.section-dark .story-card h3 {
    color: var(--white);
}

.story-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin: 0;
}

.story-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    flex-grow: 1;
}

.section-dark .story-card p {
    color: rgba(255,255,255,0.7);
}

.hazard-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.hazard-tile {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.hazard-tile:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.hazard-tile .hazard-emoji {
    font-size: 1.7rem;
    display: block;
    margin-bottom: 6px;
}

.hazard-tile .hazard-name {
    font-weight: 700;
    font-size: 0.92rem;
    display: block;
}

.hazard-tile .hazard-tag {
    font-size: 0.74rem;
    color: var(--text-light);
    display: block;
    margin-top: 4px;
}

/* Risk-intelligence bar (live snapshot; risk-snapshot.js renders into it) */
.risk-intel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.risk-intel-freshness {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
}

.risk-intel-scope {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}

.risk-intel-list {
    margin: 18px 0 10px;
}

.risk-intel-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--dark-2);
    border: 1px solid var(--dark-3);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.risk-intel-rank {
    font-weight: 700;
    color: var(--text-light);
    width: 1.4rem;
    text-align: right;
}

.risk-intel-name {
    font-weight: 700;
    flex: 1 1 200px;
    min-width: 160px;
}

.risk-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--dark);
}

.risk-badge-Low { background: #22c55e; }
.risk-badge-Moderate { background: #eab308; }
.risk-badge-High { background: #f97316; }
.risk-badge-Extreme { background: #ef4444; color: #fff; }

.risk-intel-score {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 3rem;
    text-align: right;
}

.risk-intel-detail {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    flex: 1 1 180px;
    text-align: right;
}

.risk-intel-sources {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    margin-top: 6px;
}

.risk-intel-sources a {
    color: var(--primary-light);
    text-decoration: none;
}

.risk-intel-sources a:hover { text-decoration: underline; }

.risk-intel-unavailable {
    background: var(--dark-2);
    border: 1px solid var(--dark-3);
    border-radius: 10px;
    padding: 16px;
    color: rgba(255,255,255,0.6);
    margin: 18px 0 10px;
}

.risk-why-btn {
    background: transparent;
    border: 1px solid var(--dark-3);
    color: var(--primary-light);
    border-radius: 6px;
    font-size: 0.75rem;
    padding: 2px 10px;
    cursor: pointer;
}

.risk-why-btn:hover { border-color: var(--primary-light); }

.risk-why {
    padding: 8px 16px 10px 44px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    border-left: 2px solid var(--dark-3);
    margin: -4px 0 8px 8px;
}

.risk-factor { display: inline-block; margin: 2px 12px 2px 0; }

.risk-lvl {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.risk-lvl-0 { background: rgba(34,197,94,.2); color: #4ade80; }
.risk-lvl-1 { background: rgba(234,179,8,.2); color: #facc15; }
.risk-lvl-2 { background: rgba(249,115,22,.22); color: #fb923c; }
.risk-lvl-3 { background: rgba(239,68,68,.25); color: #f87171; }
.risk-lvl-prio { background: rgba(147,197,253,.18); color: #93c5fd; text-transform: uppercase; }

.risk-why-rec { margin-top: 4px; color: rgba(255,255,255,0.8); }

.risk-intel-disclaimer {
    margin-top: 4px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    font-style: italic;
}

/* Inline analyze bar (homepage hero + sections) */
.analyze-bar {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
}

.analyze-bar input {
    flex: 1;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: var(--white);
    font-family: var(--font-main);
    font-size: 0.95rem;
}

.analyze-bar input::placeholder {
    color: rgba(255,255,255,0.45);
}

.analyze-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

@media (max-width: 640px) {
    .analyze-bar {
        flex-direction: column;
    }
}


/* ============================================
   Map — centre target reticle, readouts, target marker
   ============================================ */

/* Target reticle fixed at the map centre: corner-bracket frame + centre dot. */
.map-reticle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 800;
}

.map-reticle-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: #ef4444;
    border-style: solid;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.65);
}

.map-reticle-corner.tl {
    top: 0;
    left: 0;
    border-width: 3px 0 0 3px;
}

.map-reticle-corner.tr {
    top: 0;
    right: 0;
    border-width: 3px 3px 0 0;
}

.map-reticle-corner.bl {
    bottom: 0;
    left: 0;
    border-width: 0 0 3px 3px;
}

.map-reticle-corner.br {
    bottom: 0;
    right: 0;
    border-width: 0 3px 3px 0;
}

.map-reticle-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    background: #ef4444;
    border: 1.5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65);
}

/* Place name + coordinates chip beneath the centre reticle. */
.map-centre-chip {
    position: absolute;
    left: 50%;
    top: calc(50% + 34px);
    transform: translateX(-50%);
    z-index: 800;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 11px;
    line-height: 1.45;
    padding: 6px 12px;
    border-radius: 8px;
    pointer-events: none;
    text-align: center;
    max-width: min(430px, 72%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.map-centre-chip .mcc-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-centre-chip .mcc-coords {
    color: #7dd3fc;
    font-variant-numeric: tabular-nums;
}

/* Live cursor coordinates (bottom-right). */
.map-cursor-coords {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 800;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 6px;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.target-marker {
    position: relative;
    width: 40px;
    height: 40px;
}

/* Target marker for the selected place: corner-bracket frame + centre dot. */
.target-marker-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: #ef4444;
    border-style: solid;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.target-marker-corner.tl {
    top: 0;
    left: 0;
    border-width: 3px 0 0 3px;
}

.target-marker-corner.tr {
    top: 0;
    right: 0;
    border-width: 3px 3px 0 0;
}

.target-marker-corner.bl {
    bottom: 0;
    left: 0;
    border-width: 0 0 3px 3px;
}

.target-marker-corner.br {
    bottom: 0;
    right: 0;
    border-width: 0 3px 3px 0;
}

.target-marker-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: #ef4444;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
}

/* Organized location popup. */
.loc-pop-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.loc-pop-table {
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 8px;
}

.loc-pop-table th {
    text-align: left;
    color: #64748b;
    font-weight: 600;
    padding: 2px 12px 2px 0;
}

.loc-pop-table td {
    font-variant-numeric: tabular-nums;
    padding: 2px 0;
}


/* ============================================
   Audience portals (for-* pages hub)
   ============================================ */

.hub-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
    align-items: stretch;
}

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

.hub-try-form {
    display: flex;
    gap: 10px;
    margin: 14px 0 18px;
}

.hub-try-form input {
    flex: 1;
    padding: 13px 16px;
    border: 2px solid var(--light-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--dark);
    background: var(--white);
    transition: border-color 0.3s ease;
}

.hub-try-form input:focus {
    outline: none;
    border-color: var(--primary);
}

@media (max-width: 640px) {
    .hub-try-form {
        flex-direction: column;
    }
}

.hub-signals {
    border-top: 1px solid var(--light-2);
    padding-top: 14px;
}

.hub-signals-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hub-signals-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hub-signal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--light-2);
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--text);
    text-decoration: none;
    background: var(--light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hub-signal:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.hub-account {
    display: flex;
    flex-direction: column;
}

.hub-benefits {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.hub-benefits li {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    font-size: 0.9rem;
    line-height: 1.45;
    border-bottom: 1px dashed var(--light-2);
}

.hub-benefits li:last-child {
    border-bottom: none;
}

.hub-benefit-ico {
    flex: none;
}

.hub-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    margin-bottom: 10px;
}
