:root { color-scheme: light; --ink:#203e34; --muted:#586c62; --teal:#207b68; --line:#dfe8e1; }
body { background:#f5f7f2; color:var(--ink); font-family:Inter,ui-sans-serif,system-ui,sans-serif; }
header { box-shadow:0 2px 16px #264d3710; gap:20px; }
header nav { overflow-x:auto; padding:5px 0; }
.tab-btn { white-space:nowrap; border-radius:9px; min-height:38px; }
.tab-btn:hover { background:#edf5ef; color:#1c6d59; }
.tab-btn.active { color:#16664f; background:#e5f2e9; border-bottom:2px solid #27846c; font-weight:650; }
button,select,input { transition:background .15s,color .15s; }
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible { outline:3px solid #cb8d42; outline-offset:3px; }
select { border:1px solid var(--line); padding:8px 10px; border-radius:8px; background:white; color:var(--ink); font-size:12px; max-width:100%; }
.custom-scrollbar::-webkit-scrollbar-track { background:#f2f5f0; }
.custom-scrollbar::-webkit-scrollbar-thumb { background:#c0d2c5; border-radius:8px; }
.leaflet-container { background:#eaf1e8; font-family:inherit; }
.leaflet-tooltip,.map-tooltip { background:white !important; border:1px solid var(--line) !important; color:var(--ink) !important; box-shadow:0 4px 16px #213e3417; pointer-events:none !important; }
.leaflet-interactive { cursor:pointer !important; touch-action:manipulation; }
#map .leaflet-control-zoom { margin-top:54px !important; margin-left:12px !important; border-radius:8px !important; overflow:hidden; box-shadow:0 4px 12px rgba(0,0,0,0.12) !important; border:1px solid var(--line) !important; }
@media(min-width:768px) { #map .leaflet-control-zoom { margin-top:12px !important; } }
.eyebrow { color:#6b8065; font-size:10px; letter-spacing:.15em; font-weight:750; }
.analysis-hero { display:flex; align-items:center; justify-content:space-between; gap:28px; padding:32px; background:linear-gradient(110deg,#e5f1e8,#f3efe1); border:1px solid #dae7d8; border-radius:22px; }
.analysis-hero h2 { font-size:clamp(22px,3vw,36px); font-weight:750; letter-spacing:-.035em; line-height:1.15; margin:8px 0 12px; color:#244d3a; }
.analysis-hero p { max-width:680px; color:var(--muted); font-size:14px; line-height:1.6; }
.scope-control { display:grid; gap:8px; min-width:210px; font-size:12px; color:var(--muted); }
.analysis-card { background:white; border:1px solid var(--line); padding:24px; border-radius:18px; box-shadow:0 4px 14px #274d3505; min-width:0; }
.analysis-card h3 { color:var(--ink); font-size:17px; font-weight:700; letter-spacing:-.015em; }
.analysis-card p { color:var(--muted); font-size:13px; line-height:1.65; margin-top:8px; }
.chart-frame { height:400px; position:relative; margin-top:20px; }
.kpi-card { padding:20px; border:1px solid var(--line); background:white; border-radius:16px; }
.kpi-card small { color:var(--muted); font-size:12px; }
.kpi-card strong { display:block; font-size:28px; letter-spacing:-.035em; margin-top:6px; color:#26735e; }
.kpi-card p { color:var(--muted); font-size:11px; margin-top:3px; }
.finding-card { padding:20px; border-radius:16px; background:#edf4e9; border:1px solid #dbe7d3; }
.finding-card:nth-child(2) { background:#fff3e6; border-color:#f0e0c9; }
.finding-card:nth-child(3) { background:#ecf2f8; border-color:#dce7ef; }
.finding-card h3 { font-weight:700; font-size:14px; margin-bottom:7px; }
.finding-card p { font-size:13px; line-height:1.65; color:var(--muted); }
.analysis-table { width:100%; border-collapse:separate; border-spacing:0; font-size:12px; text-align:left; }
.analysis-table th { font-weight:650; padding:12px 9px; color:#536d5b; border-bottom:1px solid var(--line); background:#f7f9f5; white-space:nowrap; }
.analysis-table td { padding:11px 9px; border-bottom:1px solid #edf1ec; }
.analysis-table tr:hover td { background:#f8faf6; }
.heatmap { min-width:950px; }
.heatmap td { text-align:center; padding:10px 6px; font-variant-numeric:tabular-nums; border:3px solid white; border-radius:7px; }
.heatmap th { white-space:normal; text-align:center; max-width:85px; font-size:10px; }
.heatmap th:first-child { min-width:160px; text-align:left; position:sticky; left:0; z-index:1; background:#f7f9f5; }
.heatmap td:first-child { text-align:left; font-weight:600; position:sticky; left:0; z-index:1; background:white; white-space:nowrap; }
.heat-legend { width:130px; height:9px; border-radius:8px; background:linear-gradient(90deg,#f2f7f0,#207b58); }
.method-note { background:#fbf5e9; border:1px solid #eee1c8; padding:18px; border-radius:12px; font-size:13px; }
.region-strip { display:flex; flex-wrap:wrap; gap:8px; padding:12px 0; border-bottom:1px solid var(--line); font-size:12px; }
.region-strip strong { flex:1; min-width:130px; }

/* Selected Marker Animation */
@keyframes markerPulse {
  0% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.12); opacity: 0.35; }
  100% { transform: scale(1); opacity: 0.95; }
}
.selected-marker-ring {
  animation: markerPulse 1.8s infinite ease-in-out;
  pointer-events: none;
}
.muni-list-item.selected {
  background-color: #f0f9ff !important;
  border-left: 3px solid #0284c7 !important;
}

header nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
header nav::-webkit-scrollbar { display: none; }

@media(max-width:1100px) {
  .analysis-hero { align-items:flex-start; flex-direction:column; padding:24px; }
}
@media(max-width:767px) {
  #detail-drawer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 82vh !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.22) !important;
    z-index: 1000 !important;
    padding: 14px 16px 24px !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
  }
  .analysis-hero { padding: 18px !important; border-radius: 16px !important; }
  .analysis-card { padding: 16px !important; border-radius: 14px !important; }
  .chart-frame { height: 290px !important; }
  .kpi-card { padding: 14px !important; }
  .kpi-card strong { font-size: 22px !important; }
  .scope-control { min-width: 100% !important; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto !important; transition:none !important; } }
.brand-mark { background:linear-gradient(135deg,#43866b,#8bb27d); }
.insight-badge { display:inline-block; color:#31664a; border:1px solid #c7dcc7; background:#f8fbf4; padding:3px 7px; border-radius:6px; font-size:10px; font-weight:650; margin-bottom:10px; }
.insight-detail { margin-top:12px; padding-top:10px; border-top:1px solid #c9d7c980; font-size:11px; color:#53695b; }
.insight-detail summary { cursor:pointer; font-weight:600; }
.insight-detail p { font-size:11px; margin-top:8px; }

/* Match the public site's shared navigation while retaining the atlas workspace. */
body > header { max-width:1160px; width:100%; margin:auto; padding:24px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #dce4df; gap:24px; box-shadow:none; background:#fafbf8; }
body > header nav { display:flex; flex-wrap:wrap; gap:20px; overflow:visible; font-size:16px; }
body > header a { color:#08695f; text-decoration:underline; text-underline-offset:4px; }
body > header nav a[aria-current] { border-bottom:3px solid #148077; }
body > header .brand { font-size:26px; line-height:1.6; font-weight:800; text-decoration:none; }
body > header .brand span { display:block; font-size:12px; font-weight:400; }
body > header .lang-switch a { text-decoration:none; }
@media(max-width:650px) { body > header { align-items:start; flex-direction:column; gap:12px; padding:18px; } body > header nav { gap:24px; } }
@media(max-width:650px) {
  body > header > div:last-child { width:100%; min-width:0; }
  body > header nav { flex-wrap:nowrap; overflow-x:auto; width:100%; gap:20px; padding-bottom:8px; }
  body > header nav a { white-space:nowrap; }
}
