/* ══ EDIT COLORS HERE — theme tokens ════════════════════════════════ */
:root {
  --bg:       #cfe3ef;
  --surface:  #daeaf4;
  --surface2: #ecf5fb;
  --border:   #b8d4e3;
  --accent:   #00475f;
  --accent2:  #d08d3d;
  --accent3:  #3b8771;
  --accent4:  #c0533a;
  --txt:      #2f424d;
  --txt2:     #4a7a8a;
  --txt3:     #7aacba;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;overflow:hidden}
body{font-family:'DM Sans',sans-serif;background:var(--bg);color:var(--txt);
     font-size:13px;line-height:1.5;display:flex;flex-direction:column}
#topbar{background:#00475f;border-bottom:1px solid #003d52;
  height:54px;padding:0 1.2rem;display:flex;align-items:center;gap:1rem;flex-shrink:0;z-index:200}
.logos{display:flex;align-items:center;gap:.8rem;flex-shrink:0}
.logo-img{height:34px;width:auto;object-fit:contain}
.logo-placeholder{height:34px;min-width:80px;border:1px dashed var(--border);border-radius:4px;
  display:flex;align-items:center;justify-content:center;padding:0 8px;
  font-size:9px;font-weight:600;letter-spacing:.08em;color:var(--txt3)}
.logo-divider{width:1px;height:28px;background:var(--border);flex-shrink:0}
.brand-text{flex:1;min-width:0}
.brand-title{font-family:'DM Sans',sans-serif;font-size:13px;font-weight:700;color:#ecf5fb;letter-spacing:.02em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-sub{font-size:10px;color:#99d1e3;white-space:nowrap}
.topbar-right{display:flex;align-items:center;gap:.8rem;margin-left:auto;flex-shrink:0}
.ctrl-label{font-size:10px;font-weight:600;color:#99d1e3;letter-spacing:.08em;
  text-transform:uppercase;white-space:nowrap}
.sc-pills{display:flex;gap:3px}
.sc-pill{padding:3px 9px;border-radius:20px;border:1px solid rgba(153,209,227,.4);background:transparent;
  color:#99d1e3;font-family:'DM Sans',sans-serif;font-size:11px;font-weight:500;
  cursor:pointer;transition:all .15s;white-space:nowrap}
.sc-pill:hover{border-color:#ecf5fb;color:#ecf5fb}
.sc-pill.active{background:#99d1e3;border-color:#99d1e3;color:#00475f;font-weight:700}
select#reachSel{background:#003d52;border:1px solid rgba(153,209,227,.4);color:#ecf5fb;
  font-family:'DM Sans',sans-serif;font-size:12px;padding:4px 8px;border-radius:6px;
  cursor:pointer;min-width:160px}
#body{display:flex;flex:1;overflow:hidden;min-height:0}
#leftPanel{width:360px;flex-shrink:0;background:var(--surface);
  border-right:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}
#leftScroll{flex:1;overflow-y:auto;padding:.9rem 1rem 1.4rem;min-height:0}
#leftScroll::-webkit-scrollbar{width:4px}
#leftScroll::-webkit-scrollbar-track{background:transparent}
#leftScroll::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px}
#rightCol{display:flex;flex-direction:column;flex:1;overflow:hidden;min-width:0}
#mapWrap{position:relative;flex:1;min-height:0;overflow:hidden}
#map{width:100%;height:100%;background:#1a2e3a}
#bottomStrip{height:220px;flex-shrink:0;background:var(--surface);
  border-top:1px solid var(--border);display:flex;overflow:hidden}
#stripLeft{width:380px;flex-shrink:0;border-right:1px solid var(--border);
  display:flex;flex-direction:column;padding:.7rem .85rem;overflow:hidden}
#stripRight{flex:1;min-width:0;display:flex;flex-direction:column;
  padding:.7rem .85rem;overflow:hidden}
.strip-title{font-family:'DM Sans',sans-serif;font-size:9px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:#00475f;margin-bottom:.45rem;flex-shrink:0}
.strip-scroll{flex:1;overflow-y:auto;min-height:0}
.strip-scroll::-webkit-scrollbar{width:4px}
.strip-scroll::-webkit-scrollbar-track{background:transparent}
.strip-scroll::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px}
.sec-title{font-family:'DM Sans',sans-serif;font-size:9px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:#00475f;margin-bottom:.5rem;margin-top:.1rem}
.panel-sep{border:none;border-top:1px solid var(--border);margin:.75rem 0}
.chart-wrap{position:relative;width:100%}
.card{background:var(--surface2);border:1px solid var(--border);border-radius:8px;
  padding:.6rem .7rem;margin-bottom:.5rem}
.card:last-child{margin-bottom:0}
.card-val{font-size:19px;font-weight:700;line-height:1;color:var(--accent)}
.card-val.warm{color:var(--accent2)}
.card-val.green{color:var(--accent3)}
.card-label{font-size:10px;color:var(--txt3);margin-top:3px;line-height:1.3}
.fc-list{margin-top:5px;display:flex;flex-direction:column;gap:2px}
.fc-row{display:flex;justify-content:space-between;font-size:10px;color:var(--txt2)}
.fc-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:155px}
.fc-miles{font-weight:600;color:var(--txt);white-space:nowrap;margin-left:.4rem}
.thresh-row{display:flex;gap:.5rem;margin-bottom:.5rem}
.thresh-card{flex:1;background:var(--surface2);border:1px solid var(--border);
  border-radius:8px;padding:.55rem .7rem}
.thresh-label{font-size:9px;color:var(--txt3);font-weight:600;text-transform:uppercase;
  letter-spacing:.07em;margin-bottom:2px}
.thresh-val{font-size:13px;font-weight:700;color:var(--accent);line-height:1.2}
.thresh-sub{font-size:10px;color:var(--txt2);margin-top:2px}
.vuln-bars{display:flex;flex-direction:column;gap:9px}
.vuln-bar-group{}
.vuln-bar-title{font-size:10px;font-weight:600;color:var(--txt2);margin-bottom:3px}
.vuln-bar-track{display:flex;height:22px;border-radius:3px;overflow:hidden;width:100%}
.vuln-seg{height:100%;transition:width .45s ease;display:flex;align-items:center;
  justify-content:center;font-size:9px;font-weight:700;color:rgba(255,255,255,.95);
  overflow:hidden;white-space:nowrap;min-width:0}
.vuln-legend{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}
.vuln-leg-item{display:flex;align-items:center;gap:3px;font-size:9px;color:var(--txt2)}
.vuln-leg-swatch{width:9px;height:9px;border-radius:2px;flex-shrink:0}
.lu-summary{font-size:10px;color:var(--txt2);margin-bottom:.3rem}
.lu-chart-wrap{position:relative;flex:1;min-height:0;width:100%}
.ds-cat-hdr{font-size:10px;font-weight:700;letter-spacing:.04em;padding:4px 0 3px 7px;
  border-top:1px solid var(--border);margin-top:4px;border-left:3px solid;line-height:1.3;background:transparent}
.ds-cat-hdr:first-of-type{border-top:none;margin-top:0}
.ds-bar-item{padding:3px 0 3px 9px;border-bottom:1px solid rgba(0,71,95,.15)}
.ds-bar-label{display:flex;justify-content:space-between;font-size:10px;color:var(--txt2);margin-bottom:2px}
.ds-bar-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px}
.ds-bar-nums{white-space:nowrap;color:var(--txt3);margin-left:.5rem;flex-shrink:0}
.ds-bar-track{position:relative;height:14px;background:rgba(0,71,95,.08);border-radius:2px;
  overflow:hidden;border:1px solid var(--border)}
.ds-bar-fill{position:absolute;left:0;top:0;height:100%;border-radius:2px;
  transition:width .45s ease;opacity:.75}
.ds-bar-pct{position:absolute;left:5px;top:50%;transform:translateY(-50%);font-size:9px;
  font-weight:700;color:#fff;white-space:nowrap;z-index:1;text-shadow:0 1px 2px rgba(0,0,0,.7)}
.leaflet-container{background:#071820!important}
.leaflet-control-attribution{background:rgba(11,30,43,.8)!important;color:var(--txt3)!important;font-size:9px!important}
.leaflet-control-attribution a{color:var(--txt3)!important}
.leaflet-bar{background:var(--surface2)!important;border-color:var(--border)!important}
.leaflet-bar a{background:var(--surface2)!important;color:var(--txt)!important;border-color:var(--border)!important}
.leaflet-bar a:hover{background:var(--surface)!important}
#mapControls{display:none}
.map-btn{padding:3px 10px;border-radius:16px;border:1px solid rgba(153,209,227,.35);background:transparent;
  color:#99d1e3;font-family:'DM Sans',sans-serif;font-size:10px;font-weight:500;
  cursor:pointer;transition:all .15s}
.map-btn.active{background:#99d1e3;border-color:#99d1e3;color:#00475f;font-weight:700}
.map-btn:hover:not(.active){color:#ecf5fb;border-color:#99d1e3}
#mapLegend{position:absolute;bottom:10px;right:10px;z-index:500;
  background:rgba(0,71,95,.94);border:1px solid rgba(153,209,227,.25);border-radius:8px;
  padding:.6rem .8rem;min-width:220px;max-width:260px}
.leg-title{font-size:9px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:#99d1e3;margin-bottom:5px}
.leg-row{display:flex;align-items:center;gap:6px;margin-bottom:4px;font-size:11px;color:#c8dfe9}
.leg-swatch{width:14px;height:4px;border-radius:2px;flex-shrink:0}
.leg-circle{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.leg-square{width:10px;height:10px;border-radius:2px;flex-shrink:0}
.leg-sep{border:none;border-top:1px solid rgba(153,209,227,.2);margin:5px 0}
.leg-note{font-size:9px;color:var(--txt3);font-style:italic;margin-top:6px;line-height:1.4}
#loadingMap{position:absolute;inset:0;background:rgba(13,30,43,.7);z-index:400;
  display:none;align-items:center;justify-content:center;flex-direction:column;gap:8px}
#loadingMap.active{display:flex}
.load-map-txt{font-size:11px;color:var(--txt2)}
.map-tooltip{background:var(--surface2)!important;border:1px solid var(--border)!important;
  color:var(--txt)!important;font-family:'DM Sans',sans-serif!important;font-size:12px!important;
  border-radius:6px!important;box-shadow:0 4px 16px rgba(0,0,0,.5)!important;padding:6px 10px!important}
.map-tooltip::before{display:none!important}
#loadingOverlay{position:fixed;inset:0;background:var(--bg);z-index:9999;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}
.load-title{font-family:'DM Sans',sans-serif;font-size:17px;font-weight:700;color:#00475f}
.load-bar-track{width:200px;height:3px;background:var(--surface2);border-radius:2px;overflow:hidden}
.load-bar-fill{height:100%;background:var(--accent);border-radius:2px;
  animation:lbar 1.4s ease-in-out infinite}
@keyframes lbar{0%{width:0%;margin-left:0}50%{width:60%;margin-left:20%}100%{width:0%;margin-left:100%}}
