@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;450;500;600;700&display=swap');

:root {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #e7edf0;
  background: #050c10;
  font-synthesis: none;
  color-scheme: dark;
  --muted: #9aaeb6;
  --line: #ffffff13;
  --cyan: #b6e9eb;
  --glass-surface: linear-gradient(130deg, #29292970, #17171766 55%, #20202070);
  --glass-detail: linear-gradient(130deg, #252525a3, #14141499);
}
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; border: 0; background: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #b6e9eb; outline-offset: 4px; }
a { color: inherit; }

#scene { position: fixed; inset: 0; background: radial-gradient(ellipse at 55% 40%, #16313b 0%, #071219 45%, #04080c 80%); }
#scene canvas { display: block; touch-action: none; }
.vignette { position: fixed; inset: 0; pointer-events: none; background: linear-gradient(180deg, #040b10aa, transparent 19%, transparent 77%, #040b10bf), linear-gradient(90deg, #040b1033, transparent 35%); }


.intro { position: absolute; left: 32px; top: 108px; pointer-events: none; }
.eyebrow { font-size: 10px; letter-spacing: 2.4px; color: #b1c4c9; font-weight: 500; }
h1 { font-size: 38px; font-weight: 300; letter-spacing: -1.5px; line-height: 1.08; margin: 10px 0; }
p { line-height: 1.6; }
.intro p { font-size: 14px; color: #99b0bb; margin-top: 12px; }

.glass {
  background: var(--glass-surface);
  backdrop-filter: blur(22px) saturate(.45);
  -webkit-backdrop-filter: blur(22px) saturate(.45);
  border: 1px solid #ffffff1c;
  box-shadow: 0 15px 60px #0005, inset 0 1px #ffffff06;
  border-radius: 19px;
}

.explorer {
  position: absolute; left: 32px; top: 292px; width: 316px; bottom: 96px;
  display: flex; flex-direction: column; padding: 20px 18px 0;
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; }
h2 { font-size: 19px; font-weight: 450; letter-spacing: -.45px; margin: 0; }


select {
  appearance: none;
  background: #ffffff06 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='m3 4 3 3 3-3' stroke='%23aabfc9' fill='none'/%3E%3C/svg%3E") no-repeat right 8px center;
  border: 1px solid #ffffff12; border-radius: 8px; padding: 8px 23px 8px 9px;
  color: #d4dfe3; width: 100%; max-width: 100%; font-size: 12px;
  text-overflow: ellipsis;
}
select option { background: #15232a; }


.result-heading { display: flex; align-items: center; justify-content: space-between; margin: 13px 0 8px; font-size: 11px; color: #9cacb3; gap: 8px; }
.text-button { font-size: 12px; color: #b1cbd3; padding: 4px 0; text-align: left; }
.text-button:hover { text-decoration: underline; }

.project-list { overflow: auto; flex: 1; min-height: 0; margin: 0 -7px; padding: 0 7px; scrollbar-width: thin; scrollbar-color: #79929a40 transparent; }
.project-row { width: 100%; text-align: left; padding: 12px 0; border-top: 1px solid var(--line); display: block; }
.project-row:hover, .project-row.selected { background: #c1e6eb09; }
.project-row .row-top { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #a2bbc4; margin-bottom: 6px; flex-wrap: wrap; }
.sector-dot { width: 5px; height: 5px; background: var(--dot, #b9e5e8); border-radius: 50%; flex-shrink: 0; }
.project-row strong { font-size: 14px; font-weight: 450; line-height: 1.38; display: block; }
.project-row small { display: block; margin-top: 5px; font-size: 11px; color: #90a5b0; }
.badge-unlocated {
  display: inline-block; font-size: 9px; letter-spacing: .4px; padding: 2px 6px;
  border-radius: 5px; background: #e0c0881c; color: #e5cb9a; border: 1px solid #e0c0883d;
  margin-left: auto;
}
.explorer-foot { padding: 11px 0; font-size: 10px; color: #8ca1aa; border-top: 1px solid var(--line); }

.overview { position: absolute; right: 32px; top: 112px; width: 302px; padding: 22px; max-height: calc(100vh - 180px); overflow: auto; scrollbar-width: thin; scrollbar-color: #79929a40 transparent; }
.overview h2 { font-size: 22px; font-weight: 300; margin: 8px 0 16px; }
.statrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.statrow strong { font-size: 32px; display: block; font-weight: 300; letter-spacing: -1px; }
.statrow span { display: block; font-size: 11px; color: #9fb1ba; margin-top: 4px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.mini-title { font-size: 10px; letter-spacing: 1.4px; color: #91a7af; margin-bottom: 10px; }
.sector-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; margin: 9px 0; width: 100%; padding: 2px 0; text-align: left; line-height: 1.25; }
.sector-row.excluded { opacity: .45; }
.sector-row .bar { margin-left: auto; height: 3px; width: 36px; background: #ffffff12; flex-shrink: 0; }
.sector-row .bar i { height: 100%; display: block; background: #9bc8d0; }
.sector-row b { font-weight: 400; font-size: 11px; color: #b2c4cc; min-width: 28px; text-align: right; flex-shrink: 0; }
.coverage-note { font-size: 11px; color: #a1b0b7; line-height: 1.55; margin: 14px 0 8px; }

.detail {
  position: absolute; z-index: 20; right: 25px; top: 104px; bottom: 96px; width: 410px;
  padding: 26px; overflow: auto; scrollbar-width: thin; scrollbar-color: #79929a40 transparent;
  background: var(--glass-detail); animation: arrive .25s ease;
}
.close { float: right; width: 30px; height: 30px; border-radius: 50%; background: #ffffff08; font-size: 24px; line-height: 1; }
.detail h2 { font-size: 25px; font-weight: 350; line-height: 1.22; margin: 12px 0; }
.detail .place { font-size: 13px; color: #b5c7ce; margin-bottom: 14px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.pill { display: inline-block; padding: 6px 9px; border-radius: 7px; font-size: 11px; background: #bce4cd12; color: #bedacb; border: 1px solid #bce4cd1a; }
.pill.unlocated { background: #e0c0881a; color: #e7ce9f; border-color: #e0c0883b; }
.pill.facility { background: #9fd3e814; color: #bce2f1; border-color: #9fd3e82e; }
.detail p { font-size: 13.5px; color: #b9c9d0; }
.detail-meta { font-size: 12px!important; color: #9db3bd!important; margin: 8px 0 14px; }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.fact { background: #ffffff04; border: 1px solid #ffffff0c; padding: 12px; border-radius: 11px; }
.fact small { font-size: 10px; color: #a1b5bd; display: block; margin-bottom: 6px; letter-spacing: .4px; }
.fact strong { font-size: 16px; font-weight: 450; display: block; line-height: 1.3; word-break: break-word; }
.fact span { display: block; font-size: 11px; color: #8fa6b0; margin-top: 4px; }
.detail h3 { font-size: 15px; font-weight: 500; margin: 22px 0 12px; }
.timeline { padding: 0 0 0 16px; border-left: 1px solid #a1bac12b; list-style: none; }
.timeline li { position: relative; padding: 0 0 20px 5px; }
.timeline li::before { position: absolute; content: ''; width: 7px; height: 7px; border-radius: 50%; background: #9bbdc4; left: -20px; top: 4px; box-shadow: 0 0 0 4px #9bbdc40a; }
.timeline time { font-size: 10px; letter-spacing: .5px; color: #9eb4bf; }
.timeline strong { display: block; font-size: 14px; font-weight: 450; margin: 6px 0; }
.timeline p { font-size: 12px; margin: 6px 0; }
.source-link { font-size: 11.5px; color: #b1dce2; text-underline-offset: 3px; word-break: break-word; }
.notice { font-size: 11px!important; color: #9bb1bc!important; border: 1px solid #ffffff12; border-radius: 10px; padding: 12px; line-height: 1.6!important; }
.detail .footer-actions { display: flex; gap: 12px; margin-top: 20px; }
.detail .footer-actions button { border: 1px solid #ffffff1c; border-radius: 9px; padding: 9px 12px; font-size: 12px; }

.layer-bar {
  position: absolute; bottom: 53px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px; padding: 11px 15px; border-radius: 16px; white-space: nowrap;
}
.segmented { display: flex; gap: 3px; background: #10101030; border-radius: 10px; padding: 3px; }
.segmented button { font-size: 12px; padding: 10px 13px; border-radius: 8px; color: #9db4bf; }
.segmented button.active { background: #d5e8eb16; color: #ebf4f6; box-shadow: 0 1px 8px #0002; }
#legend { font-size: 11px; color: #a1b8c1; max-width: 190px; white-space: normal; line-height: 1.4; }

.map-controls { position: absolute; left: 374px; bottom: 126px; display: flex; padding: 4px; border-radius: 12px; }
.map-controls button { width: 35px; height: 35px; font-size: 21px; color: #bfd5dd; }

footer { position: absolute; bottom: 15px; left: 32px; right: 32px; display: flex; justify-content: space-between; color: #829ca8; font-size: 10px; gap: 15px; }
footer button { font-size: 10px; color: #829ca8; padding: 0; }

#mapLabels { position: fixed; inset: 0; pointer-events: none; }
.map-label { position: absolute; pointer-events: auto; transform: translate(-50%, -50%); border: 0; background: none; padding: 10px; }
.map-label i { display: block; width: 8px; height: 8px; border: 1px solid #e7f7f5; border-radius: 50%; background: #b0d8dc; box-shadow: 0 0 0 5px #b6e9eb13, 0 0 14px #b1f3ff90; }
.map-label.selected i { background: #f0ca87; box-shadow: 0 0 0 8px #f0ca871c, 0 0 30px #f0ca87; }
.map-label span { display: none; position: absolute; top: 32px; left: 50%; transform: translateX(-50%); padding: 8px 12px; background: #202020a6; border: 1px solid #ffffff18; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.map-label:hover span, .map-label:focus-visible span, .map-label.selected span { display: block; }

.empty { padding: 22px 0; font-size: 14px; color: #bacbd2; line-height: 1.6; }
.show-more { width: 100%; margin: 10px 0 14px; padding: 10px 12px; border: 1px solid #ffffff1c; border-radius: 10px; background: #ffffff08; font-size: 12px; color: #b8d7df; text-align: center; }
.show-more:hover { background: #ffffff14; }
.hover-tip { position: fixed; pointer-events: none; padding: 9px 12px; font-size: 12px; line-height: 1.45; max-width: 290px; z-index: 25; border-radius: 11px; }
.hover-tip small { display: block; margin-top: 3px; font-size: 11px; color: #9bb3bd; }

dialog { color: #e6f0f3; width: min(750px, 90vw); max-height: 83vh; overflow: auto; padding: 34px; background: var(--glass-detail); }
dialog::backdrop { background: #08080880; backdrop-filter: blur(7px); }
dialog h2 { font-size: 30px; margin: 15px 0 25px; }
dialog p, dialog li { font-size: 14px; color: #b1c4cf; line-height: 1.7; }
dialog h3 { font-size: 17px; font-weight: 450; margin-top: 25px; }
.audit-row { border-top: 1px solid #ffffff12; padding: 16px 0; }
.audit-row strong { font-size: 15px; font-weight: 450; }
.audit-row p { margin: 6px 0; font-size: 12px; }
.audit-row a { font-size: 12px; color: #9ed1dc; }
.error-banner { position: absolute; top: 90px; left: 50%; transform: translateX(-50%); max-width: 400px; padding: 16px; background: #263138; border-radius: 12px; font-size: 13px; z-index: 30; }
[hidden] { display: none!important; }

@keyframes arrive { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

@media(min-width:1600px) {
  .explorer { width: 345px; }
  .overview { width: 325px; }
  .intro h1 { font-size: 46px; }
}

@media(max-height:780px) and (min-width:901px) {
  .intro { top: 100px; }
  .intro h1 { font-size: 30px; }
  .intro p { margin-top: 8px; }
  .explorer { top: 244px; bottom: 88px; }
  .overview { top: 102px; padding: 18px; }
  .overview h2 { margin: 6px 0 12px; }
  .sector-row { margin: 7px 0; }
  .detail { bottom: 90px; }
  .project-row { padding: 10px 0; }
}

@media(max-width:1100px) {
  .overview { width: 255px; right: 20px; padding: 18px; }
  .explorer { left: 22px; width: 290px; }
  .intro { left: 22px; }
  .detail { width: 360px; }
}

@media(max-width:760px) {
  body { overflow: auto; }
  .intro { top: 95px; left: 20px; }
  .intro h1 { font-size: 29px; }
  .intro p { font-size: 12px; max-width: 180px; }
  .eyebrow { font-size: 9px; }
  .overview { display: none; }
  .explorer { position: absolute; top: 63vh; left: 12px; right: 12px; width: auto; bottom: auto; height: 58vh; padding: 18px; }
  .project-list { min-height: 150px; }
  .explorer-foot { font-size: 10px; }
  .intro { pointer-events: none; }
  .map-controls { bottom: auto; top: 50vh; left: auto; right: 15px; }
  .segmented button { font-size: 11px; padding: 8px; }
  #legend { font-size: 9px; max-width: 90px; }
  #metric { font-size: 10px; width: 110px; }
  footer { position: absolute; top: 123vh; bottom: auto; left: 16px; right: 16px; padding-bottom: 20px; flex-wrap: wrap; }
  footer span:nth-child(2) { display: none; }
  .detail { position: fixed; inset: 82px 10px 12px; width: auto; padding: 24px; background: var(--glass-detail); z-index: 30; }
  .map-label span { max-width: 160px; white-space: normal; }
  .result-heading { margin-top: 12px; }
}

@media(prefers-reduced-motion:reduce) {
  * { animation: none!important; scroll-behavior: auto!important; }
}

/* Navigation project browser: keep the globe clear until requested. */
.explorer { position: fixed; z-index: 25; top: 94px; left: 50%; right: auto; bottom: auto; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); height: min(690px, calc(100dvh - 115px)); padding: 22px 22px 0; }
.explorer .panel-heading { gap: 12px; }
.explorer .close { flex-shrink: 0; }
@media(min-width:761px) { .map-controls, .region-controls { left: 32px; } }
@media(max-width:760px) {
  body { overflow: hidden; }
  .intro { top: 114px; }
  .explorer { top: 106px; height: calc(100dvh - 120px); width: calc(100vw - 24px); padding: 18px 18px 0; }
  .detail { top: 106px; }
  footer { top: auto; bottom: 12px; padding-bottom: 0; }
}

/* All display settings belong to the top navigation. */
.display-panel { position: fixed; z-index: 25; right: 32px; top: 94px; width: 340px; max-height: calc(100dvh - 115px); overflow: auto; padding: 22px; }
.display-panel h3 { font-size: 14px; margin: 22px 0 10px; }
.display-panel label { display: block; font-size: 14px; margin-top: 16px; }
.display-panel input { display: block; width: 100%; margin-top: 10px; accent-color: #b6d6e5; }
.display-panel select { width: 100%; margin-top: 9px; font-size: 14px; }
.display-panel output { float: right; color: #c5d8df; }
.display-panel p { font-size: 12px; color: #a7bac2; line-height: 1.6; }
.display-panel #legend { display: block; max-width: none; font-size: 12px; }
@media(max-width:1100px) { header { gap: 12px; } nav button { font-size: 12px; padding: 10px; } }
@media(max-width:760px) {
  .display-panel { top: 110px; right: 12px; left: 12px; width: auto; max-height: calc(100dvh - 124px); }
  .explorer { top: 110px; height: calc(100dvh - 124px); }
  .detail { top: 110px; }
  .map-controls { top: auto; bottom: 62px; }
}


.music-controls { display: flex; align-items: center; flex-shrink: 0; border: 1px solid #ffffff16; border-radius: 24px; background: #151b2040; }
#musicToggle { width: 40px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
#musicToggle svg { width: 21px; fill: none; stroke: #a9bbc4; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#musicToggle .sound-waves { opacity: .25; }
#musicToggle.playing svg { stroke: #d3eaf4; }
#musicToggle.playing .sound-waves { opacity: 1; }
#musicToggle.playing { background: #a8d5e318; }
#musicSettings { width: 22px; height: 38px; padding-right: 6px; }
#musicSettings svg { width: 13px; fill: none; stroke: #c5d2d8; stroke-width: 1.5; }
.music-panel { position: absolute; top: 75px; right: 24px; width: 275px; padding: 22px; z-index: 40; }
.music-panel h2 { font-size: 18px; }
.music-panel p { font-size: 12px; color: #aabac3; }
.music-panel label { display: block; font-size: 14px; margin-top: 18px; }
.music-panel output { float: right; }
.music-panel input { width: 100%; margin: 12px 0; accent-color: #badbe9; }
.display-panel .motion-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.display-panel .motion-toggle input { display: inline; width: auto; margin: 0; }
@media(max-width:1100px) { header { gap: 10px; } nav button { padding: 10px 7px; } }
@media(max-width:760px) { .music-controls { position: absolute; top: 12px; right: 12px; } .music-panel { top: 105px; right: 12px; } }

/* ---------- Visualization: labels canvas, settings section, legend ---------- */
#vizLabels { position: fixed; inset: 0; pointer-events: none; }
.viz-body { overflow: auto; min-height: 0; padding: 2px 7px 16px; margin: 0 -7px; scrollbar-width: thin; scrollbar-color: #79929a40 transparent; }
.viz-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.viz-modes button { font-size: 12px; padding: 10px 8px; border-radius: 10px; color: #a9bec7; background: #10101030; border: 1px solid #ffffff10; transition: background .15s, color .15s, border-color .15s; }
.viz-modes button:last-child { grid-column: 1 / -1; }
.viz-modes button:hover { color: #e6f1f4; }
.viz-modes button.active { color: #f0f7f8; background: #b6e9eb1c; border-color: #b6e9eb55; box-shadow: inset 0 0 18px #b6e9eb10; }
.viz-group { display: grid; gap: 12px; margin-top: 14px; }
.viz-row { display: block; font-size: 12px; color: #c4d4da; }
.viz-row > span { display: flex; justify-content: space-between; margin-bottom: 6px; color: #a4b8c0; font-size: 11px; }
.viz-row output { color: #d7e6ea; }
.viz-row input[type=range] { display: block; width: 100%; margin: 0; accent-color: #b6d6e5; }
.viz-seg { display: flex; }
.viz-seg button { flex: 1; font-size: 11.5px; padding: 8px 6px; }
.viz-advanced { margin-top: 14px; border: 1px solid #ffffff10; border-radius: 11px; padding: 0 11px; background: #ffffff04; }
.viz-advanced summary { cursor: pointer; font-size: 12px; color: #b9cdd4; padding: 10px 0; list-style-position: inside; }
.viz-advanced[open] { padding-bottom: 13px; }
.viz-advanced .viz-group { margin-top: 4px; }
.viz-subtitle { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: #91a7af; margin: 18px 0 8px; }
.viz-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.viz-check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #c4d4da; line-height: 1.3; }
.viz-group .viz-check { margin: -2px 0; }
.viz-check input { accent-color: #b6d6e5; margin: 0; flex-shrink: 0; }
.viz-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.viz-actions button { font-size: 11.5px; padding: 8px 11px; border-radius: 9px; border: 1px solid #ffffff1c; color: #c9dce2; }
.viz-actions button:hover { background: #ffffff0d; }
.viz-reset { margin-top: 16px; }
.viz-hint { font-size: 10.5px; color: #8fa5ae; line-height: 1.55; margin: 12px 0 0; }

/* Open visualization settings dock the panel beside the map instead of over it. */
.intro { transition: opacity .25s; }

.viz-legend { position: absolute; left: 32px; bottom: 178px; width: 268px; max-height: min(46vh, 420px); overflow: auto; padding: 12px 14px; border-radius: 14px; font-size: 11px; color: #b9cbd2; scrollbar-width: thin; scrollbar-color: #79929a40 transparent; z-index: 5; }
.viz-legend summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 12px; color: #e3eef1; font-weight: 500; line-height: 1.35; }
.viz-legend summary::-webkit-details-marker { display: none; }
.viz-legend summary .text-button { font-size: 11px; flex-shrink: 0; }
.viz-legend summary span { margin-right: auto; }
.viz-legend p { margin: 8px 0 0; line-height: 1.5; font-size: 10.5px; color: #9bb0b9; }
.viz-legend .lg-basis { color: #b7cad1; border-top: 1px solid var(--line); padding-top: 8px; }
.lg-row { margin-top: 10px; }
.lg-label { margin-bottom: 5px; color: #a9bdc5; }
.lg-ramp { height: 8px; border-radius: 4px; box-shadow: inset 0 0 0 1px #ffffff1a; }
.lg-ends { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; font-size: 10.5px; color: #c7d8de; }
.lg-ends em { font-style: normal; color: #8fa5ae; }
.lg-sizes { display: flex; align-items: flex-end; gap: 12px; }
.lg-sizes span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: #c7d8de; }
.lg-sizes i { display: block; border-radius: 50%; border: 1.3px solid #cfe6ea; background: #cfe6ea24; min-width: 5px; min-height: 5px; }
.lg-swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.lg-swatches span, .lg-marks span { display: flex; align-items: center; gap: 7px; line-height: 1.35; }
.lg-swatches i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lg-marks { display: grid; gap: 6px; }
.lg-marks i { width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; }
.mark-hollow { border: 1.4px dashed #c9d6db; }
.mark-ring { border: 1.4px solid #cfe6ea; background: #cfe6ea24; }
.mark-cluster { border: 1.4px solid #cfe6ea; box-shadow: inset 0 0 0 2.5px #0b171c, inset 0 0 0 3.6px #cfe6ea99; }
.lg-marks i.mark-hatch, .lg-marks i.mark-stub { border-radius: 3px; background: repeating-linear-gradient(135deg, #9aabb4 0 2px, #9aabb433 2px 5px); }
.lg-marks i.mark-stub { width: 8px; margin: 0 3px; }
.lg-marks i.mark-empty { border-radius: 3px; background: #2a4450; box-shadow: inset 0 0 0 1px #ffffff1c; }
.lg-marks i.mark-dim { border-radius: 3px; background: #3d5a66; }
.lg-marks i.mark-none { border-radius: 3px; border: 1px solid #ffffff2e; }
.lg-text { display: flex; justify-content: space-between; gap: 12px; }
.lg-text b { font-weight: 500; color: #dbe8ec; text-align: right; }
.group-bars .sector-row { margin: 6px 0; }
.group-list .project-row:first-child { border-top: 0; }
@media(max-width:1100px) and (min-width:761px) { body.viz-docked .map-controls, body.viz-docked .viz-legend { left: 386px; } .explorer.viz-open { left: 22px; } }
@media(max-width:760px) {
  .viz-legend { left: 12px; right: auto; bottom: 62px; width: min(250px, calc(100vw - 212px)); max-height: 38vh; padding: 9px 11px; }
  /* Settings become a bottom sheet so the map stays visible while adjusting. */
  .viz-checks { grid-template-columns: 1fr; }
}

/* ================= Filter toolbar + docked panels (final layout) ================= */
body { --top: 0px; --bar-h: 104px; --bar-top: calc(var(--top) + 12px); --panel-top: calc(var(--bar-top) + var(--bar-h) + 10px); --edge: 16px; }
@media(min-width:1920px) { body { --bar-h: 56px; } }
@media(max-width:760px) { body { --bar-h: 142px; --edge: 8px; --bar-top: calc(var(--top) + 8px); } }

.toolbar {
  position: fixed; z-index: 30; top: var(--bar-top); left: var(--edge); right: var(--edge);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 9px 10px 9px 16px;
  border-radius: 18px; border: 1px solid #ffffff1f;
  background: linear-gradient(100deg, rgba(126,196,207,.16), rgba(17,26,31,.62) 26%, rgba(15,22,27,.60) 72%, rgba(224,192,136,.12));
  backdrop-filter: blur(26px) saturate(1.25); -webkit-backdrop-filter: blur(26px) saturate(1.25);
  box-shadow: 0 14px 50px #0006, inset 0 1px #ffffff12;
}
.tb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 15px; letter-spacing: -.3px; color: #eef4f6; white-space: nowrap; margin-right: 4px; }
.tb-brand svg { width: 22px; fill: none; stroke: #c2e8e7; stroke-width: 2.6; flex-shrink: 0; }
.tb-search { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; max-width: 340px; min-width: 150px; height: 36px; padding: 0 11px; border-radius: 10px; border: 1px solid #ffffff14; background: #0a121680; }
.tb-search:focus-within { border-color: #b6e9eb66; }
.tb-search svg { width: 16px; fill: none; stroke: #9cafb6; stroke-width: 1.6; flex-shrink: 0; }
.tb-search input { background: none; border: 0; color: #e9f0f3; width: 100%; min-width: 0; font-size: 13px; outline: none; }
.tb-search input::placeholder { color: #8ea2aa; }
.tb-filters { display: flex; align-items: center; gap: 6px; order: 3; flex: 1 1 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; padding-top: 8px; border-top: 1px solid #ffffff10; }
.tb-filters::-webkit-scrollbar { display: none; }
.tb-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
@media(min-width:1920px) { .tb-filters { order: 0; flex: 1 1 0; padding-top: 0; border-top: 0; } }

.chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid #ffffff14; background: #ffffff09; font-size: 12.5px; color: #cfdde2; white-space: nowrap; flex-shrink: 0; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.chip:hover { background: #ffffff12; }
.chip > span { color: #8fa5ae; }
.chip em { font-style: normal; color: #e6f0f3; }
/* Filter chips: the native select is stretched invisibly over the whole chip, so a click
   anywhere on it (label, value or arrow) opens the list on the first try. */
.chip-select { position: relative; }
.chip-select em { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.chip-select i { width: 12px; height: 12px; flex-shrink: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='m3 4.5 3 3 3-3' stroke='%23aabfc9' fill='none'/%3E%3C/svg%3E") no-repeat center; }
.chip-select select { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: inherit; opacity: 0; cursor: pointer; appearance: none; -webkit-appearance: none; font-size: 16px; }
.chip-select select:focus, .chip-select select:focus-visible { outline: none; }
.chip-select.kbd-focus { border-color: #b6e9eb99; box-shadow: 0 0 0 3px #b6e9eb24; }
.chip.active, .chip[aria-expanded="true"] { border-color: #b6e9eb66; background: #b6e9eb1c; color: #f0f7f8; }
.chip.active > span { color: #b6dfe3; }
.chip-toggle .pill-dot { width: 7px; height: 7px; border-radius: 50%; background: #6b848e; }
.chip-toggle.active { border-color: #7ec4cf55; background: #7ec4cf1c; }
.chip-toggle.active .pill-dot { background: #7ec4cf; box-shadow: 0 0 8px #7ec4cf99; }
.chip-ghost { border-style: dashed; background: none; color: #b1cbd3; }
.chip-strong { background: #ffffff14; border-color: #ffffff24; }
.chip-strong b { font-weight: 600; color: #f2f7f8; }
.chip-strong svg { width: 14px; fill: none; stroke: #b7ccd3; stroke-width: 1.6; }
.toolbar .music-controls { position: static; height: 36px; border-radius: 10px; flex-shrink: 0; }
.toolbar #musicToggle { width: 36px; height: 34px; border-radius: 9px; }
.toolbar #musicSettings { height: 34px; }
.toolbar .music-panel { position: absolute; top: calc(100% + 8px); right: 0; }

.intro { position: fixed; left: calc(var(--edge) + 14px); top: calc(var(--panel-top) + 14px); pointer-events: none; transition: opacity .25s; }
body.left-docked .intro { opacity: 0; }
.explorer, .viz-panel {
  position: fixed; z-index: 25; left: var(--edge); right: auto; top: var(--panel-top); bottom: 52px; transform: none;
  width: 372px; height: auto; padding: 18px 18px 0; display: flex; flex-direction: column;
}
.viz-panel .panel-heading { margin-bottom: 14px; }
.viz-panel .viz-body { flex: 1; }
.explorer .result-heading { margin: 10px 0 4px; }
.display-panel { right: var(--edge); left: auto; top: var(--panel-top); width: 340px; max-height: calc(100dvh - var(--panel-top) - 52px); }
.overview { position: fixed; right: var(--edge); top: var(--panel-top); max-height: calc(100dvh - var(--panel-top) - 64px); }
.detail { position: fixed; right: var(--edge); top: var(--panel-top); bottom: 52px; }
.map-controls { position: fixed; left: var(--edge); bottom: 52px; top: auto; right: auto; }
.viz-legend { position: fixed; left: var(--edge); bottom: 106px; }
body.left-docked .map-controls, body.left-docked .viz-legend { left: calc(var(--edge) + 384px); }
footer { position: fixed; left: calc(var(--edge) + 6px); right: calc(var(--edge) + 6px); bottom: 14px; top: auto; }
@media(max-height:780px) and (min-width:901px) { .intro h1 { font-size: 28px; } .viz-legend { max-height: 40vh; } }
@media(min-width:761px) and (max-width:1100px) { .explorer, .viz-panel { width: 330px; } body.left-docked .map-controls, body.left-docked .viz-legend { left: calc(var(--edge) + 342px); } .overview { display: none; } .tb-brand span { display: none; } }

@media(max-width:760px) {
  .toolbar { padding: 8px; gap: 6px; border-radius: 15px; }
  .tb-brand span { display: none; }
  .tb-search { max-width: none; flex: 1 1 0; }
  .tb-filters { padding-top: 6px; }
  .tb-actions { order: 4; flex: 1 1 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .chip { height: 32px; padding: 0 10px; font-size: 12px; }
  .chip-select em { max-width: 130px; }
  .intro { display: none; }
  .explorer { left: var(--edge); right: var(--edge); width: auto; top: var(--panel-top); bottom: 8px; padding: 16px 16px 0; }
  .viz-panel { left: 0; right: 0; width: auto; top: auto; bottom: 0; height: 46dvh; border-radius: 19px 19px 0 0; padding: 16px 16px 0; }
  .display-panel { left: var(--edge); right: var(--edge); width: auto; }
  .detail { inset: var(--panel-top) var(--edge) 8px; width: auto; }
  .map-controls { left: auto; right: var(--edge); bottom: 44px; }
  .viz-legend { left: var(--edge); bottom: 44px; width: min(250px, calc(100vw - 196px)); }
  body.left-docked .viz-legend, body.left-docked .map-controls { display: none; }
  footer { bottom: 10px; }
  .toolbar .music-panel { left: 0; right: 0; width: auto; }
}

/* ---------- Compact legend ---------- */
.viz-legend { width: 216px; max-height: min(38vh, 300px); padding: 9px 11px; border-radius: 12px; font-size: 10.5px; }
.viz-legend > details > summary { font-size: 11.5px; gap: 6px; }
.viz-legend > details > summary::after { content: ''; width: 6px; height: 6px; margin-left: auto; flex-shrink: 0; border-right: 1.3px solid #9fb4bd; border-bottom: 1.3px solid #9fb4bd; transform: rotate(-135deg) translate(-2px, -2px); transition: transform .15s; }
.viz-legend > details:not([open]) > summary::after { transform: rotate(45deg) translate(-1px, -1px); }
.viz-legend summary span { margin-right: 0; }
.viz-legend .lg-row { margin-top: 7px; }
.viz-legend .lg-ramp { height: 6px; }
.viz-legend .lg-ends, .viz-legend .lg-sizes span { font-size: 10px; }
.viz-legend .lg-sizes { gap: 10px; }
.viz-legend .lg-swatches { grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.viz-legend .lg-swatches i { width: 6px; height: 6px; }
.viz-legend .lg-swatches span, .viz-legend .lg-marks span { gap: 6px; line-height: 1.3; }
.viz-legend .lg-marks { gap: 4px; }
.viz-legend .lg-marks i { width: 11px; height: 11px; }
.viz-legend .lg-notes { margin-top: 7px; border-top: 1px solid var(--line); padding-top: 6px; }
.viz-legend .lg-notes > summary { display: inline-block; font-size: 10.5px; font-weight: 400; color: #9fb7c0; cursor: pointer; list-style: none; }
.viz-legend .lg-notes > summary:hover { color: #dbe8ec; text-decoration: underline; }
.viz-legend .lg-notes p { margin-top: 6px; font-size: 10px; }
.viz-legend .lg-notes .lg-basis { border-top: 0; padding-top: 0; }
@media(max-width:760px) { .viz-legend { width: min(200px, calc(100vw - 212px)); max-height: 34vh; } }

/* ---------- Workforce intelligence ---------- */
#workforceNav em { color: #8fa5ae; }
#workforceNav.active { border-color: #ffc45c66; background: #ffc45c1c; }
#workforceNav.active em { color: #ffd38a; }
.wf-master { font-size: 13px; }
.wf-layers { display: grid; gap: 5px; }
.wf-layers button { text-align: left; font-size: 12px; padding: 9px 11px; border-radius: 9px; color: #a9bec7; background: #10101030; border: 1px solid #ffffff10; }
.wf-layers button:hover { color: #e6f1f4; }
.wf-layers button.active { color: #f0f7f8; background: #ffc45c1a; border-color: #ffc45c55; }
.wf-one { grid-template-columns: 1fr; }
.viz-check em { font-style: normal; color: #8fa5ae; font-size: 11px; margin-left: 4px; }
.viz-check.wf-empty { opacity: .55; }
/* Evidence labels: a small dot and a quiet word. They sit inside sentences, so they must never push the text around. */
.ev { font-style: normal; font-size: 9px; letter-spacing: .2px; text-transform: lowercase; color: #8fa5ae; white-space: nowrap; vertical-align: baseline; line-height: 1; margin-left: 2px; }
.ev::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-right: 4px; vertical-align: 1px; }
.ev-reported { color: #7fd4a0; }
.ev-derived { color: #8fbfe6; }
.ev-modeled, .ev-assumption { color: #d9b877; }
.wf-landscape { margin: 18px 0; border: 1px solid #ffc45c33; border-radius: 13px; padding: 0 14px 6px; background: #ffc45c08; }
.wf-landscape > summary { cursor: pointer; padding: 13px 0; font-size: 15px; font-weight: 500; color: #ffe2ae; }
.detail h4 { font-size: 13px; font-weight: 500; margin: 18px 0 8px; color: #dbe8ec; }
.wf-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin: 6px 0 10px; }
.wf-table th { text-align: right; font-weight: 400; color: #91a5ae; font-size: 10px; padding: 5px 4px; border-bottom: 1px solid var(--line); }
.wf-table th:first-child, .wf-table td:first-child { text-align: left; }
.wf-table td { text-align: right; padding: 6px 4px; border-bottom: 1px solid #ffffff0a; color: #c9d9de; vertical-align: top; }
.wf-table td em { font-style: normal; color: #7f949d; font-size: 10px; }
.wf-surplus { color: #9be7a0; }
.wf-index { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 10px; }
.wf-index strong { font-size: 34px; font-weight: 300; letter-spacing: -1px; }
.wf-index span { font-size: 14px; color: #ffd38a; }
.wf-index em { font-style: normal; font-size: 11px; color: #91a5ae; }
.wf-w { font-style: normal; color: #7f949d; font-size: 10px; }
.group-bars .sector-row .bar { width: 70px; }
.lg-marks i.mark-diamond { border-radius: 1px; width: 8px; height: 8px; margin: 0 2px; border: 1.4px solid #eef3f7; transform: rotate(45deg); background: #eef3f733; }
.wf-talent { flex-wrap: wrap; }
.wf-talent strong { font-size: 26px; letter-spacing: -.5px; }
.wf-talent em { flex-basis: 100%; line-height: 1.5; }
.wf-table tr.wf-thin td { color: #ffc9a3; }
.wf-table tr.wf-thin td:first-child { box-shadow: inset 2px 0 0 #ff8a3d; padding-left: 8px; }
.notice.wf-warn { border-left: 2px solid #ff8a3d; padding-left: 10px; color: #f1d6c4; }

/* Workforce verdict: one glanceable reading per project. */
.wf-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border: 1px solid currentColor; white-space: nowrap; }
.wf-badge svg { width: 17px; height: 17px; flex-shrink: 0; }
.wf-badge-sm { padding: 2px 8px 2px 6px; font-size: 10px; gap: 4px; vertical-align: 1px; margin-left: 4px; }
.wf-badge-sm svg { width: 11px; height: 11px; }
.wf-badge.wf-critical { color: #ff5b5b; background: #ff3b3b24; box-shadow: 0 0 18px #ff3b3b55, inset 0 0 10px #ff3b3b22; text-shadow: 0 0 10px #ff5b5b88; }
.wf-badge.wf-strained { color: #ffb347; background: #ffb3471c; }
.wf-badge.wf-manageable { color: #5fe0c2; background: #5fe0c214; }
.wf-badge.wf-nodata { color: #91a5ae; background: #ffffff0a; }
.wf-index .wf-badge { align-self: center; }
.wf-verdict { margin: 2px 0 14px; padding: 14px; border-radius: 12px; border: 1px solid #ffffff1a; background: #ffffff08; }
.wf-verdict.wf-critical { border-color: #ff5b5b77; background: linear-gradient(135deg, #ff3b3b26, #ff3b3b0a 60%); box-shadow: 0 0 28px #ff3b3b22; }
.wf-verdict.wf-critical .wf-badge svg { animation: wf-pulse 1.8s ease-in-out infinite; }
.wf-verdict.wf-strained { border-color: #ffb34755; background: linear-gradient(135deg, #ffb3471c, #ffb34706 60%); }
.wf-verdict.wf-manageable { border-color: #5fe0c244; }
.wf-verdict-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.wf-verdict-main p { margin: 0; flex: 1 1 200px; font-size: 13px; line-height: 1.5; color: #e9f1f3; }
.wf-verdict-main p strong { font-size: 20px; font-weight: 500; margin-right: 2px; }
.wf-verdict.wf-critical .wf-verdict-main p strong { color: #ff8585; }
.wf-verdict-sub { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #ffffff14; font-size: 12px; align-items: center; }
.wf-verdict-sub span { font-size: 10px; letter-spacing: .1em; color: #8fa5ae; }
.wf-verdict-sub b { font-weight: 500; color: #e6f0f3; }
@keyframes wf-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .wf-verdict.wf-critical .wf-badge svg { animation: none; } }

/* ---- Expanded reading view for the detail panel ---- */
.detail .close.expand { margin-right: 8px; display: grid; place-items: center; font-size: 0; transition: background .15s; }
.detail .close:hover { background: #ffffff1a; }
.detail .close.expand svg { width: 14px; height: 14px; fill: none; stroke: #cfe0e6; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.detail { transition: width .4s cubic-bezier(.22,.9,.24,1), top .4s cubic-bezier(.22,.9,.24,1), bottom .4s cubic-bezier(.22,.9,.24,1), right .4s cubic-bezier(.22,.9,.24,1), box-shadow .4s; }
.detail > * { transition: opacity .2s ease; }
.detail.morph-out > * { opacity: 0; transition-duration: .11s; }
.detail.morph-size > * { display: none !important; }
.detail.morph-size { overflow: hidden; }
.detail.expanded { z-index: 60; top: calc(var(--top) + 10px); right: 1vw; bottom: 1vh; width: 98vw; padding: 30px clamp(26px, 3.2vw, 56px) 40px; background: #0b161cf2; box-shadow: 0 30px 90px #000a, 0 0 0 1px #ffffff14; }
.detail.expanded .close { position: sticky; top: 0; z-index: 4; background: #1a2a32; }
/* single column views read at a comfortable measure */
.detail.expanded:not(:has(> .wf-landscape)) > :not(.close) { max-width: 1040px; margin-left: auto; margin-right: auto; }
/* project with workforce on: record on the left, Workforce Landscape on the right */
.detail.expanded:has(> .wf-landscape) > :not(.close):not(.wf-landscape) { max-width: calc(42% - 24px); }
.detail.expanded > .wf-landscape { position: absolute; top: 74px; left: calc(42% + 16px); right: clamp(26px, 3.2vw, 56px); margin: 0; padding-bottom: 14px; }
.detail.expanded > .wf-landscape::after { content: ""; display: block; height: 26px; }
.detail.expanded h2 { font-size: 32px; }
.detail.expanded .wf-landscape .fact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail.expanded .wf-table { font-size: 13px; }
.detail.expanded .wf-table th, .detail.expanded .wf-table td { padding-top: 8px; padding-bottom: 8px; }
@media(max-width:1100px) {
  .detail.expanded:has(> .wf-landscape) > :not(.close):not(.wf-landscape) { max-width: none; }
  .detail.expanded > .wf-landscape { position: static; margin: 18px 0; }
}
/* narrow windows and phones: the panel is already full width, so expanding gains the height the filter bar takes */
@media(max-width:760px) {
  .detail.expanded { inset: calc(var(--top) + 6px) 1vw 1vh; width: auto; padding: 22px 18px 32px; }
  .detail.expanded h2 { font-size: 26px; }
  .detail.expanded .wf-landscape .fact-grid { grid-template-columns: 1fr 1fr; }
  .detail.expanded .group-bars .sector-row > span:first-child { flex-basis: 46%; }
  .detail.expanded .group-bars .sector-row .bar { width: 30%; }
}
@media(prefers-reduced-motion: reduce) { .detail, .detail > * { transition: none; } }
.detail.expanded .group-bars .sector-row { font-size: 13px; }
.detail.expanded .group-bars .sector-row .bar { width: 38%; height: 5px; border-radius: 3px; overflow: hidden; }
.detail.expanded .group-bars .sector-row > span:first-child { flex: 0 0 34%; }

.wf-landscape.wf-loading { display: flex; align-items: center; gap: 10px; padding: 14px; font-size: 13px; color: #d9c9a8; }
.wf-landscape:not(details) { padding: 14px; font-size: 13px; color: #d9c9a8; }
.wf-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #ffc45c33; border-top-color: #ffc45c; animation: wf-spin .8s linear infinite; flex-shrink: 0; }
@keyframes wf-spin { to { transform: rotate(360deg); } }
.detail.expanded > .wf-landscape:not(details) { position: static; margin: 18px 0; }

.wf-score { display: flex; align-items: baseline; gap: 5px; }
.wf-score strong { font-size: 44px; font-weight: 300; letter-spacing: -1.5px; line-height: 1; }
.wf-score em { font-style: normal; font-size: 11px; color: #91a5ae; }
.wf-verdict.wf-critical .wf-score strong { color: #ff7a7a; text-shadow: 0 0 22px #ff3b3b66; }
.wf-verdict.wf-strained .wf-score strong { color: #ffc670; }
.wf-verdict.wf-manageable .wf-score strong { color: #7fe8cf; }
.wf-verdict-main p { flex-basis: 100%; }

.wf-grade { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.wf-grade strong { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; font-weight: 600; background: #ffffff10; border: 1px solid #ffffff22; }
.wf-grade span { font-size: 12.5px; color: #c7d6dc; }
.wf-check { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 2px; }
.wf-check li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid #ffffff0f; }
.wf-check li > i { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: #6b848e; }
.wf-check b { font-weight: 500; font-size: 12.5px; color: #e6f0f3; }
.wf-check em { font-style: normal; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-left: 6px; color: #8fa5ae; }
.wf-check p { margin: 3px 0 0; font-size: 12px !important; line-height: 1.45; color: #a9bcc4 !important; }
.wf-check p span { color: #ffcf8a; }
.wf-check .wf-st-reported > i { background: #5fe0c2; } .wf-st-reported em { color: #5fe0c2; }
.wf-check .wf-st-derived > i { background: #7ec4cf; } .wf-st-derived em { color: #7ec4cf; }
.wf-check .wf-st-modeled > i, .wf-check .wf-st-assumed > i, .wf-check .wf-st-partial > i { background: #ffb347; } .wf-st-modeled em, .wf-st-assumed em, .wf-st-partial em { color: #ffb347; }
.wf-check .wf-st-missing > i { background: #ff5b5b; box-shadow: 0 0 8px #ff5b5b88; } .wf-st-missing em { color: #ff7a7a; }
.detail.expanded .wf-check { grid-template-columns: 1fr 1fr; column-gap: 26px; }
@media(max-width:1100px) { .detail.expanded .wf-check { grid-template-columns: 1fr; } }

/* ---- Filter bar v2: labelled filter row, multi-select panels, view controls grouped apart ---- */
.tb-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #7f959e; margin-right: 4px; flex-shrink: 0; }
.fchips { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.fwrap { display: inline-flex; align-items: center; flex-shrink: 0; }
.fchip { padding-right: 9px; }
.fchip em { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.fchip i { width: 12px; height: 12px; flex-shrink: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='m3 4.5 3 3 3-3' stroke='%23aabfc9' fill='none'/%3E%3C/svg%3E") no-repeat center; transition: transform .15s; }
.fchip[aria-expanded="true"] i { transform: rotate(180deg); }
.fwrap.on .fchip { border-radius: 10px 0 0 10px; border-right: 0; }
.fchip-x { height: 36px; width: 26px; border-radius: 0 10px 10px 0; border: 1px solid #b6e9eb66; border-left-color: #b6e9eb30; background: #b6e9eb1c; color: #d5eef0; font-size: 16px; line-height: 1; transition: background .15s; }
.fchip-x:hover { background: #b6e9eb3a; }
.ftag { border-color: #f0ca8766; background: #f0ca871c; color: #f6dfb3; }
.ftag b { font-weight: 400; font-size: 15px; margin-left: 2px; }
.tb-sep { width: 1px; height: 22px; background: #ffffff1c; margin: 0 6px 0 auto; flex-shrink: 0; }
.chip-view, .tb-group .chip { background: none; border-color: #ffffff10; }
.tb-group { display: inline-flex; align-items: center; gap: 2px; padding: 1px; height: 36px; box-sizing: border-box; border-radius: 12px; background: #05090c66; border: 1px solid #ffffff12; }
.tb-group .chip { height: 30px; border-color: transparent; }
.tb-group .chip:hover { background: #ffffff10; }
.tb-group .chip.active, .tb-group .chip[aria-expanded="true"] { background: #b6e9eb1c; border-color: #b6e9eb55; }
.fpop { position: fixed; z-index: 70; display: flex; flex-direction: column; padding: 12px 6px 8px; border-radius: 14px; background: #0d181ef5; box-shadow: 0 22px 60px #000b, 0 0 0 1px #ffffff1a; animation: fpop-in .14s ease; }
.fpop[hidden] { display: none; }
@keyframes fpop-in { from { opacity: 0; transform: translateY(-4px); } }
.fpop-head { display: flex; align-items: baseline; gap: 8px; padding: 0 8px 8px; }
.fpop-head strong { font-size: 13px; font-weight: 500; }
.fpop-head span { font-size: 11px; color: #8fa5ae; margin-right: auto; }
.fpop-head .text-button:disabled { opacity: .35; cursor: default; }
.fpop-search { display: flex; align-items: center; gap: 8px; height: 34px; margin: 0 6px 6px; padding: 0 10px; border-radius: 9px; border: 1px solid #ffffff1a; background: #060c1099; }
.fpop-search:focus-within { border-color: #b6e9eb77; }
.fpop-search svg { width: 14px; fill: none; stroke: #9cafb6; stroke-width: 1.8; flex-shrink: 0; }
.fpop-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #e9f0f3; font-size: 13px; }
.fpop-list { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #79929a40 transparent; }
.fopt { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; font-size: 13px; color: #dbe8ec; cursor: pointer; }
.fopt:hover, .fopt:focus-within { background: #ffffff10; }
.fopt input { position: absolute; opacity: 0; pointer-events: none; }
.fopt-box { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid #6d8791; flex-shrink: 0; display: grid; place-items: center; transition: background .12s, border-color .12s; }
.fopt input:checked + .fopt-box { background: #b6e9eb; border-color: #b6e9eb; }
.fopt input:checked + .fopt-box::after { content: ""; width: 8px; height: 4px; border-left: 2px solid #0c1a20; border-bottom: 2px solid #0c1a20; transform: rotate(-45deg) translateY(-1px); }
.fopt input:focus-visible + .fopt-box { box-shadow: 0 0 0 3px #b6e9eb44; }
.fopt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.fopt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fopt b { font-weight: 400; font-size: 12px; color: #8fa5ae; font-variant-numeric: tabular-nums; }
.fopt.zero { opacity: .42; }
.fpop-empty { padding: 14px 10px; font-size: 12.5px; color: #9db3bd; margin: 0; }
.fpop-foot { padding: 8px 8px 0; margin-top: 6px; border-top: 1px solid #ffffff12; font-size: 11px; color: #8499a2; }
.suggest { position: fixed; z-index: 70; padding: 8px 6px; border-radius: 14px; background: #0d181ef5; box-shadow: 0 22px 60px #000b, 0 0 0 1px #ffffff1a; max-height: 70vh; overflow: auto; }
.suggest[hidden] { display: none; }
.suggest-group > span { display: block; padding: 6px 9px 3px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #7f959e; }
.suggest button { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; padding: 7px 9px; border-radius: 8px; }
.suggest button:hover, .suggest button:focus-visible { background: #ffffff12; outline: none; }
.suggest strong { font-weight: 400; font-size: 13px; color: #e6f0f3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest em { font-style: normal; font-size: 11px; color: #8fa5ae; margin-left: auto; white-space: nowrap; }
.sort-by { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #9cacb3; }
.sort-by select { width: auto; height: 26px; padding: 0 22px 0 8px; font-size: 11.5px; border-radius: 7px; margin: 0; }
.row-score { margin-left: auto; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; border: 1px solid currentColor; flex-shrink: 0; }
.row-score.wf-critical { color: #ff6b6b; background: #ff3b3b1f; }
.row-score.wf-strained { color: #ffb347; background: #ffb34718; }
.row-score.wf-manageable { color: #5fe0c2; background: #5fe0c212; }
@media(min-width:1920px) { .tb-label { display: none; } .tb-sep { margin-left: 6px; } }
@media(max-width:760px) {
  .fchip-x { height: 32px; } .fchip em { max-width: 120px; }
  .tb-group { padding: 1px; } .tb-group .chip { height: 30px; }
  .tb-sep { margin-left: 6px; }
}

/* Training provider marks: nine types told apart by shape and fill, in three pale shades */
.prov-mark { --pm: #d5d9e0; display: inline-block; width: 9px; height: 9px; margin-right: 8px; flex-shrink: 0; vertical-align: 0; background: var(--pm); box-sizing: border-box; }
.prov-mark.pm-hollow { background: none; border: 1.6px solid var(--pm); }
.pm-diamond { transform: rotate(45deg) scale(.86); border-radius: 1px; }
.pm-square { border-radius: 1px; }
.pm-triangle { clip-path: polygon(50% 4%, 100% 96%, 0 96%); }
.pm-triangle.pm-hollow { border: 0; background: linear-gradient(var(--pm), var(--pm)); clip-path: polygon(50% 4%, 100% 96%, 0 96%, 50% 4%, 50% 38%, 26% 82%, 74% 82%, 50% 38%); }
.pm-hexagon { clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.pm-hexagon.pm-hollow { border: 0; background: var(--pm); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%, 25% 3%, 34% 20%, 18% 50%, 34% 80%, 66% 80%, 82% 50%, 66% 20%, 34% 20%); }
.pm-plus { clip-path: polygon(34% 0, 66% 0, 66% 34%, 100% 34%, 100% 66%, 66% 66%, 66% 100%, 34% 100%, 34% 66%, 0 66%, 0 34%, 34% 34%); }
.pm-cross { clip-path: polygon(36% 0, 64% 0, 64% 36%, 100% 36%, 100% 64%, 64% 64%, 64% 100%, 36% 100%, 36% 64%, 0 64%, 0 36%, 36% 36%); transform: rotate(45deg); }
.lg-prov span { gap: 0; }
.viz-legend .lg-prov .prov-mark { width: 8px; height: 8px; margin-right: 7px; }
.project-row .row-top .prov-mark { margin-right: 2px; }
.viz-legend .lg-prov i.prov-mark, .lg-prov i.prov-mark { width: 8px; height: 8px; border-radius: 1px; margin-right: 7px; }
.viz-legend .lg-prov i.pm-triangle, .viz-legend .lg-prov i.pm-hexagon, .viz-legend .lg-prov i.pm-plus, .viz-legend .lg-prov i.pm-cross { border-radius: 0; }

.wf-pay { margin: 4px 0 10px; padding-left: 18px; font-size: 12.5px; color: #c7d6dc; line-height: 1.55; }
.wf-pay li { margin: 3px 0; }

.wf-badge.wf-no { color: #ff8f8f; background: #ff3b3b1a; }

.detail .footer-actions { align-items: center; flex-wrap: wrap; }
.detail .footer-actions .footer-link { font-size: 12px; color: #9db3bd; text-decoration: underline; text-underline-offset: 3px; }
.detail .footer-actions .footer-link:hover { color: #d9e7ec; }

/* ---- Briefing and correction forms ---- */
.lead-dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #ffffff22; border-radius: 18px; background: #0d181ef7; color: #e7edf0; box-shadow: 0 30px 90px #000c; overflow: auto; }
.lead-dialog::backdrop { background: #02070acc; backdrop-filter: blur(6px); }
.lead-dialog form { padding: 26px; display: grid; gap: 12px; }
.lead-dialog .close { position: absolute; top: 16px; right: 16px; }
.lead-dialog h2 { font-size: 23px; font-weight: 400; line-height: 1.2; margin: 2px 40px 0 0; }
.lead-intro { font-size: 13.5px; line-height: 1.55; color: #b9c9d0; margin: 0 0 4px; }
.lead-dialog label { display: grid; gap: 6px; font-size: 12px; color: #a9bcc4; }
.lead-dialog label em { font-style: normal; color: #6f8690; }
.lead-dialog input, .lead-dialog textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #ffffff1f; background: #060c1099; color: #eef4f6; font: inherit; font-size: 14px; resize: vertical; }
.lead-dialog input:focus, .lead-dialog textarea:focus { outline: none; border-color: #b6e9ebaa; box-shadow: 0 0 0 3px #b6e9eb22; }
.lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-status { min-height: 18px; margin: 0; font-size: 12.5px; color: #ffcf8a; }
.lead-actions { display: flex; gap: 10px; align-items: center; }
.lead-actions button { border: 1px solid #ffffff1c; border-radius: 10px; padding: 10px 16px; font-size: 13px; }
.lead-actions button.primary, .detail .footer-actions button.primary { background: #b6e9eb; color: #07141a; border-color: #b6e9eb; font-weight: 600; }
.lead-actions button.primary:disabled { opacity: .6; cursor: default; }
.lead-consent { margin: 0; font-size: 11px; line-height: 1.5; color: #7f959e; }
.lead-consent a { color: #a9c7cf; }
.detail .footer-actions button.footer-link { border: 0; padding: 0; background: none; }
@media(max-width:520px) { .lead-row { grid-template-columns: 1fr; } .lead-dialog form { padding: 20px; } }

/* Legend sections */
.lg-head { margin: 12px 0 -4px; padding-top: 9px; border-top: 1px solid #ffffff12; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #7f959e; }
.viz-legend details > .lg-head:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }
.lg-bands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.lg-bands span { display: flex; flex-direction: column; gap: 3px; line-height: 1.25; }
.lg-bands i { height: 6px; border-radius: 3px; }
.lg-bands em { font-style: normal; color: #7f959e; font-size: 9.5px; }
.lg-prov-sizes { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lg-prov-sizes span { display: flex; align-items: center; gap: 7px; }
.lg-prov-sizes i { display: inline-block; border: 1.4px solid #e8edf2; background: #e8edf233; transform: rotate(45deg); border-radius: 1px; flex-shrink: 0; }
.lg-prov-sizes i.ring { box-shadow: inset 0 0 0 2px #0b171c, inset 0 0 0 3px #e8edf299; }
.lg-line { display: inline-block; width: 18px; height: 0; border-top: 1.5px dashed #ffd38a; flex-shrink: 0; }
.lg-pill { display: inline-block; padding: 0 5px; border-radius: 999px; border: 1px solid #ff6b6b; color: #ff6b6b; font-size: 9.5px; font-weight: 600; line-height: 14px; flex-shrink: 0; }
.lg-evs { display: flex; flex-wrap: wrap; gap: 3px 10px; }
.viz-legend { max-height: min(calc(100dvh - var(--panel-top) - 300px), 560px); min-height: 120px; }
.viz-legend summary.lg-head { display: flex; font-size: 9px; font-weight: 400; color: #7f959e; cursor: pointer; }
.viz-legend summary.lg-head::after { content: ""; width: 8px; height: 8px; margin-left: auto; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='m1.5 3 2.5 2.5L6.5 3' stroke='%237f959e' fill='none'/%3E%3C/svg%3E") no-repeat center; transition: transform .15s; }
.viz-legend .lg-sec[open] > summary.lg-head::after { transform: rotate(180deg); }
.viz-legend .lg-sec > summary.lg-head { margin-bottom: 0; }

/* ---- Intro text: a slow dust fade when the map is zoomed in ---- */
.intro > * { transition: opacity 1.35s cubic-bezier(.4, 0, .2, 1), filter 1.5s ease, transform 1.7s cubic-bezier(.2, .6, .2, 1), letter-spacing 1.7s ease; }
.intro.away > * { opacity: 0; filter: blur(6px); transform: translate3d(14px, -12px, 0) scale(1.025); }
.intro.away .eyebrow { transition-delay: 0s; }
.intro.away h1 { transition-delay: .09s; letter-spacing: .01em; }
.intro.away p { transition-delay: .2s; }
.intro:not(.away) > * { transition-duration: 1s, 1s, 1.1s, 1.1s; }
@media(prefers-reduced-motion: reduce) { .intro > * { transition: opacity .3s; } .intro.away > * { filter: none; transform: none; } }
