/* ==========================================================================
   kota.diemdulu.id — Tema "Nusantara Sky & Atlas"
   Light Default: Sky Mist (#EEF4FB) + Oceanic Cobalt (#0284C7) + Teal (#0F766E)
   Dark Mode    : Midnight Ocean Navy (#07111F) + Sky Cyan (#38BDF8)
   ========================================================================== */

:root {
    --bg: #EEF4FB;
    --bg-glow: radial-gradient(900px 420px at 12% -5%, rgba(14, 165, 233, 0.14), transparent 70%),
               radial-gradient(760px 380px at 90% 0%, rgba(20, 184, 166, 0.12), transparent 70%);
    --surface: #FFFFFF;
    --surface-glass: rgba(255, 255, 255, 0.84);
    --surface-2: #F1F6FC;
    --surface-hover: #E6EFF9;
    --ink: #0F172A;
    --ink-muted: #52627A;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.15);

    --brand: #0284C7;
    --brand-deep: #0369A1;
    --brand-soft: rgba(2, 132, 199, 0.11);
    --teal: #0F766E;
    --teal-soft: rgba(15, 118, 110, 0.11);
    --coral: #EA580C;
    --rose: #E11D48;

    --good: #059669;
    --good-bg: #D1FAE5;
    --moderate: #B45309;
    --moderate-bg: #FEF3C7;
    --sensitive: #C2410C;
    --sensitive-bg: #FFEDD5;
    --unhealthy: #DC2626;
    --unhealthy-bg: #FEE2E2;
    --very-unhealthy: #7C3AED;
    --very-unhealthy-bg: #EDE9FE;
    --hazardous: #7F1D1D;
    --hazardous-bg: #FECACA;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 8px 26px -4px rgba(15, 42, 82, 0.07), 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 18px 42px -10px rgba(15, 42, 82, 0.14);
    --radius: 18px;
    --radius-sm: 11px;
    --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
    --bg: #07111F;
    --bg-glow: radial-gradient(900px 440px at 10% -5%, rgba(56, 189, 248, 0.16), transparent 70%),
               radial-gradient(760px 380px at 90% 0%, rgba(52, 211, 153, 0.11), transparent 70%);
    --surface: #0F1D32;
    --surface-glass: rgba(11, 22, 39, 0.86);
    --surface-2: #162742;
    --surface-hover: #1C3152;
    --ink: #F1F5F9;
    --ink-muted: #94A3B8;
    --border: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(148, 163, 184, 0.25);

    --brand: #38BDF8;
    --brand-deep: #0EA5E9;
    --brand-soft: rgba(56, 189, 248, 0.16);
    --teal: #34D399;
    --teal-soft: rgba(52, 211, 153, 0.15);
    --coral: #FB923C;
    --rose: #FB7185;

    --good: #34D399;
    --good-bg: rgba(16, 185, 129, 0.18);
    --moderate: #FBBF24;
    --moderate-bg: rgba(245, 158, 11, 0.18);
    --sensitive: #FB923C;
    --sensitive-bg: rgba(249, 115, 22, 0.18);
    --unhealthy: #F87171;
    --unhealthy-bg: rgba(239, 68, 68, 0.2);
    --very-unhealthy: #C084FC;
    --very-unhealthy-bg: rgba(139, 92, 246, 0.2);
    --hazardous: #FCA5A5;
    --hazardous-bg: rgba(185, 28, 28, 0.3);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    background-image: var(--bg-glow);
    background-attachment: fixed;
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.num, .kpi-value, .stat-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-muted); }

.container {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 22px;
}

/* ======================== LIGHT FROSTED GLASS NAVBAR ======================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--surface-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: var(--ink);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 66px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand-logo-img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.brand-text { display: flex; align-items: baseline; gap: 1px; }
.brand-sub { font-weight: 500; color: var(--ink-muted); font-size: 0.88rem; }
.brand-pill {
    margin-left: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    background: var(--surface-2);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--border);
    margin: 0 auto;
}

.nav-link {
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--ink-muted);
    transition: all 0.16s ease;
    white-space: nowrap;
}
.nav-link:hover { color: var(--ink); background: var(--surface); }
.nav-link.active {
    background: var(--brand);
    color: #FFF;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.28);
}
html[data-theme="dark"] .nav-link.active { color: #07111F; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.search-wrap { position: relative; width: 210px; flex-shrink: 0; }
.search-input {
    width: 100%;
    padding: 8px 34px 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.83rem;
    font-family: inherit;
    outline: none;
    transition: all 0.18s ease;
}
.search-input::placeholder { color: var(--ink-muted); }
.search-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.search-kbd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 5px;
    background: var(--surface-2);
    color: var(--ink-muted);
    pointer-events: none;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 310px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    display: none;
    max-height: 360px;
    overflow-y: auto;
    z-index: 1200;
}
.search-dropdown.open { display: block; }
.search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s ease;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--surface-2); }
.search-item-title { font-weight: 700; font-size: 0.87rem; }
.search-item-sub { font-size: 0.75rem; color: var(--ink-muted); }
.search-kind {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    flex-shrink: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.btn-icon:hover { background: var(--surface-2); border-color: var(--brand); }
.search-toggle,
.nav-toggle { display: none; }

/* ======================== ATLAS HERO + LIVE MAP ======================== */
.atlas-hero {
    padding: 28px 0 18px;
}

.atlas-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--teal-soft);
    border: 1px solid rgba(15, 118, 110, 0.22);
    color: var(--teal);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.6);
    animation: pulseTeal 2s infinite;
}
@keyframes pulseTeal {
    0%   { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(15, 118, 110, 0); }
    100% { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0); }
}

.atlas-header h1 {
    margin: 10px 0 6px;
    font-size: clamp(1.65rem, 2.9vw, 2.4rem);
    line-height: 1.14;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.atlas-header h1 .sky-accent {
    background: linear-gradient(120deg, var(--brand), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.atlas-desc {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.94rem;
    max-width: 660px;
}

/* Map Stage Card */
.map-stage {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 18px;
}

#nusantara-map {
    width: 100%;
    height: 410px;
    background: #DCEAF7;
    z-index: 1;
}
html[data-theme="dark"] #nusantara-map {
    background: #0A1628;
}
html[data-theme="dark"] .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(195deg) brightness(92%) contrast(88%);
}

.map-toolbar {
    position: absolute;
    top: 14px;
    right: 14px;
    left: auto;
    z-index: 450;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 5px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
}
.map-mode-btn {
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.16s ease;
}
.map-mode-btn:hover { color: var(--ink); background: var(--surface-2); }
.map-mode-btn.active {
    background: var(--brand);
    color: #FFF;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}
html[data-theme="dark"] .map-mode-btn.active { color: #07111F; }

.map-legend {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 450;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 13px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
    font-size: 0.74rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

/* Leaflet Popup Polish */
.leaflet-popup-content-wrapper {
    background: var(--surface) !important;
    color: var(--ink) !important;
    border-radius: 14px !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--border-strong);
}
.leaflet-popup-tip { background: var(--surface) !important; }
.map-popup-title { font-weight: 800; font-size: 0.95rem; margin-bottom: 2px; }
.map-popup-prov { font-size: 0.75rem; color: var(--ink-muted); margin-bottom: 8px; }
.map-popup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.map-popup-stat { background: var(--surface-2); padding: 5px 7px; border-radius: 8px; text-align: center; }
.map-popup-stat small { display: block; font-size: 0.65rem; color: var(--ink-muted); }
.map-popup-stat strong { font-size: 0.84rem; }
.map-popup-link {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--brand);
}

/* 4 Atmospheric KPI Widget Cards */
.kpi-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); }
.kpi-icon {
    width: 30px; height: 30px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem;
    background: var(--surface-2);
}
.kpi-value { font-size: 1.75rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; }
.kpi-value.coral { color: var(--coral); }
.kpi-value.brand { color: var(--brand); }
.kpi-value.rose  { color: var(--rose); }
.kpi-value.teal  { color: var(--teal); }
.kpi-meta { font-size: 0.78rem; color: var(--ink-muted); }

/* Comfort Gauge Inline KPI */
.kpi-gauge-row { display: flex; align-items: center; gap: 12px; }
.gauge-ring { width: 58px; height: 58px; flex-shrink: 0; position: relative; }
.gauge-ring svg { transform: rotate(-90deg); width: 58px; height: 58px; }
.gauge-center {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.92rem; color: var(--teal);
}

/* AQI Spectrum Bar */
.aqi-spectrum {
    display: flex; height: 6px; border-radius: 999px; overflow: hidden;
    background: var(--surface-2); margin-top: 2px; gap: 2px;
}
.seg-baik { background: #10B981; }
.seg-sedang { background: #F59E0B; }
.seg-sensitif { background: #F97316; }
.seg-tidak-sehat { background: #EF4444; }

/* ======================== MAIN SECTIONS & CARDS ======================== */
.page-main { padding: 20px 0 64px; }
.section { margin-bottom: 36px; }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.section-title { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.section-sub { font-size: 0.85rem; color: var(--ink-muted); margin-top: 2px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.card-title { margin: 0; font-size: 1.04rem; font-weight: 800; letter-spacing: -0.015em; }
.card-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand);
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    transition: all 0.15s ease;
}
.card-link:hover { background: var(--brand); color: #FFF; }
html[data-theme="dark"] .card-link:hover { color: #07111F; }

/* ======================== AUTO-INSIGHTS ======================== */
.insight-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    border-top: 3px solid var(--border-strong);
}
.insight-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.insight-card.pillar-gempa { border-top-color: var(--rose); }
.insight-card.pillar-polusi { border-top-color: var(--very-unhealthy); }
.insight-card.pillar-cuaca { border-top-color: var(--coral); }
.insight-card.pillar-komposit { border-top-color: var(--teal); }

.insight-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.insight-headline { margin: 0; font-size: 0.97rem; font-weight: 800; line-height: 1.35; }
.insight-summary { margin: 0; font-size: 0.83rem; color: var(--ink-muted); line-height: 1.5; }

/* ======================== INTERACTIVE TABS & RANKING ======================== */
.tab-pills {
    display: inline-flex;
    background: var(--surface-2);
    padding: 3px;
    border-radius: 999px;
    gap: 2px;
}
.tab-btn {
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-family: inherit;
    font-size: 0.77rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.tab-btn.active { background: var(--brand); color: #FFF; }
html[data-theme="dark"] .tab-btn.active { color: #07111F; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.rank-list { display: flex; flex-direction: column; gap: 9px; }
.rank-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid transparent;
    transition: all 0.15s ease;
}
.rank-item:hover { background: var(--surface-hover); border-color: var(--border-strong); }

.rank-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.rank-num {
    width: 26px; height: 26px; border-radius: 8px;
    background: var(--surface); border: 1px solid var(--border);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.77rem; flex-shrink: 0;
}
.rank-num.top1 { background: var(--brand); color: #FFF; border-color: transparent; }
html[data-theme="dark"] .rank-num.top1 { color: #07111F; }

.rank-info { min-width: 0; flex: 1; }
.rank-title { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rank-sub { font-size: 0.75rem; color: var(--ink-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.bar-track {
    width: 100%; height: 5px; border-radius: 999px;
    background: rgba(148, 163, 184, 0.22); overflow: hidden; margin-top: 6px;
}
.bar-fill { height: 100%; border-radius: 999px; }
.bar-heat { background: linear-gradient(90deg, #F59E0B, #EA580C); }
.bar-comfort { background: linear-gradient(90deg, #0EA5E9, #10B981); }
.bar-warn { background: linear-gradient(90deg, #F97316, #E11D48); }
.bar-aqi-bad { background: linear-gradient(90deg, #F97316, #DC2626); }
.bar-aqi-good { background: linear-gradient(90deg, #10B981, #06B6D4); }
.bar-bps { background: linear-gradient(90deg, #0284C7, #0F766E); }

.rank-right { text-align: right; flex-shrink: 0; }
.rank-metric { font-size: 1.06rem; font-weight: 800; line-height: 1.15; }
.rank-metric-sub { font-size: 0.73rem; color: var(--ink-muted); margin-top: 2px; }

.subscore-row { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.subscore-chip {
    font-size: 0.69rem; font-weight: 600; color: var(--ink-muted);
    background: var(--surface); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border);
}

/* ======================== EARTHQUAKE TIMELINE ======================== */
.quake-list { display: flex; flex-direction: column; gap: 9px; }
.quake-item {
    display: flex; align-items: flex-start; gap: 13px;
    padding: 11px 14px; border-radius: var(--radius-sm); background: var(--surface-2);
}
.quake-mag {
    min-width: 56px; padding: 8px 6px; border-radius: 10px;
    text-align: center; font-weight: 800; font-size: 0.92rem; flex-shrink: 0;
}
.quake-mag small { display: block; font-size: 0.65rem; font-weight: 600; opacity: 0.85; }
.quake-body { flex: 1; min-width: 0; }
.quake-title { font-weight: 700; font-size: 0.87rem; line-height: 1.35; }
.quake-meta { font-size: 0.75rem; color: var(--ink-muted); margin-top: 3px; }

/* ======================== BADGES ======================== */
.badge {
    display: inline-flex; align-items: center; padding: 3px 9px;
    border-radius: 999px; font-size: 0.71rem; font-weight: 700; white-space: nowrap;
}
.badge-neutral { background: var(--surface-2); color: var(--ink-muted); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-teal { background: var(--teal-soft); color: var(--teal); }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-moderate { background: var(--moderate-bg); color: var(--moderate); }
.badge-sensitive { background: var(--sensitive-bg); color: var(--sensitive); }
.badge-unhealthy { background: var(--unhealthy-bg); color: var(--unhealthy); }
.badge-very-unhealthy { background: var(--very-unhealthy-bg); color: var(--very-unhealthy); }
.badge-hazardous { background: var(--hazardous-bg); color: var(--hazardous); }

/* ======================== 38 PROVINCES DIRECTORY ======================== */
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-muted);
    font-family: inherit; font-size: 0.77rem; font-weight: 700;
    padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: all 0.15s ease;
}
.filter-pill:hover { border-color: var(--brand); color: var(--brand); }
.filter-pill.active { background: var(--brand); color: #FFF; border-color: var(--brand); }
html[data-theme="dark"] .filter-pill.active { color: #07111F; }

.prov-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 12px;
}
.prov-card {
    display: flex; align-items: center; gap: 12px; padding: 13px 15px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 13px; box-shadow: var(--shadow-sm); transition: all 0.16s ease;
}
.prov-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand); }
.prov-card.hidden { display: none; }
.prov-logo { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.prov-logo-placeholder {
    width: 38px; height: 38px; border-radius: 9px; background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.75rem; color: var(--ink-muted); flex-shrink: 0;
}
.prov-name { font-weight: 700; font-size: 0.9rem; line-height: 1.25; }
.prov-cap { font-size: 0.75rem; color: var(--ink-muted); margin-top: 2px; }

/* ======================== FOOTER ======================== */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 28px 0;
    font-size: 0.84rem;
    color: var(--ink-muted);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; color: var(--ink); }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 1060px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 0;
        padding: 10px 16px;
        min-height: 58px;
    }
    .brand { order: 1; }
    .header-actions {
        order: 2;
        margin-left: auto;
        gap: 6px;
        flex-shrink: 0;
    }
    .search-toggle,
    .nav-toggle {
        display: inline-flex;
        width: 38px;
        height: 38px;
        padding: 0;
        border-radius: 999px;
    }
    .theme-toggle {
        width: 38px;
        height: 38px;
        padding: 0;
        border-radius: 999px;
    }
    .theme-label { display: none; }

    .search-wrap {
        order: 3;
        display: none;
        width: 100%;
        margin-top: 10px;
    }
    .search-wrap.open { display: block; }
    .search-input {
        padding: 10px 16px;
        font-size: 16px;
    }
    .search-kbd { display: none; }
    .search-dropdown {
        left: 0;
        right: 0;
        min-width: 0;
        width: 100%;
    }

    .main-nav {
        order: 4;
        display: none;
        width: 100%;
        margin: 10px 0 2px;
        padding: 10px;
        border-radius: 16px;
        background: var(--surface);
        border: 1px solid var(--border-strong);
        box-shadow: var(--shadow);
    }
    .main-nav.open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .main-nav .nav-link {
        padding: 10px 12px;
        border-radius: 10px;
        text-align: center;
        font-size: 0.86rem;
        background: var(--surface-2);
    }
    .main-nav .nav-link.active {
        background: var(--brand);
        color: #FFF;
    }
    html[data-theme="dark"] .main-nav .nav-link.active { color: #07111F; }
}
@media (max-width: 1020px) {
    .kpi-bento { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    #nusantara-map { height: 320px; }
}
@media (max-width: 560px) {
    .kpi-bento { grid-template-columns: 1fr; }
    .map-toolbar { max-width: calc(100% - 68px); border-radius: 14px; }
}
@media (max-width: 420px) {
    .brand { gap: 8px; font-size: 0.96rem; }
    .brand-logo-img { width: 30px; height: 30px; }
}

/* ======================== SUB-PAGES UTILITY (6B & 6C) ======================== */
.page-hero {
    padding: 28px 0 22px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.page-hero h1 {
    margin: 8px 0 6px;
    font-size: clamp(1.55rem, 2.7vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}
.page-hero p { margin: 0; color: var(--ink-muted); max-width: 720px; font-size: 0.94rem; }

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.select-control {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}
.select-control:focus { border-color: var(--brand); }

.chart-box { position: relative; width: 100%; height: 280px; }
.chart-box-sm { position: relative; width: 100%; height: 240px; }

.data-table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.data-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
}
.data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table th.num, .data-table td.num { text-align: right; }

.shakemap-img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}
#quake-map { width: 100%; height: 390px; border-radius: 14px; z-index: 1; }

/* ======================== PRAKIRAAN CUACA HYBRID (v1.1.0) ======================== */
.forecast-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
}
.forecast-strip {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.forecast-slot {
    flex: 0 0 116px;
    scroll-snap-align: start;
    padding: 12px 10px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.forecast-slot:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}
.fc-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-muted);
}
.fc-emoji {
    font-size: 1.65rem;
    line-height: 1.2;
    margin: 2px 0;
}
.fc-temp {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
}
.fc-desc {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-muted);
    line-height: 1.25;
    min-height: 2.5em;
    display: flex;
    align-items: center;
}
.fc-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.7rem;
    color: var(--ink-muted);
    margin-top: 2px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
    width: 100%;
}
.fc-rain-tag {
    color: var(--brand);
    font-weight: 700;
}

.forecast-daily-list {
    display: flex;
    flex-direction: column;
}
.forecast-day-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 132px;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border);
}
.forecast-day-row:last-child { border-bottom: none; }
.fc-day-name {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    line-height: 1.25;
}
.fc-day-name span { font-size: 0.72rem; }
.fc-day-cond {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}
.fc-day-emoji { font-size: 1.35rem; flex-shrink: 0; }
.fc-day-desc {
    font-size: 0.83rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-day-temps {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}
.fc-tmin { color: var(--brand); width: 26px; text-align: right; flex-shrink: 0; }
.fc-tmax { color: var(--coral); width: 26px; text-align: left; flex-shrink: 0; }
.fc-tbar-track {
    position: relative;
    flex: 1;
    min-width: 44px;
    height: 7px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    overflow: hidden;
}
.fc-tbar-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--amber), var(--coral));
}
@media (max-width: 1120px) {
    .forecast-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .forecast-day-row {
        grid-template-columns: 82px minmax(0, 1fr) 74px;
        gap: 6px;
    }
    .fc-tbar-track { display: none; }
    .fc-day-temps { justify-content: flex-end; }
}
