:root { color-scheme: dark; --muted: #9aafbf; --line: #233747; --accent: #35c6e8; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.workspace-header { height: 64px; display: flex; align-items: center; gap: 28px; padding: 0 24px; border-bottom: 1px solid var(--line); background: #0b1d2d; }
.workspace-header .ss-brand { font: 26px var(--serif); color: white; text-decoration: none; }
.workspace-header .ss-brand b { color: var(--teal); font-weight: 400; }
.workspace-title { border-left: 1px solid #344555; padding-left: 28px; color: #bdd0de; font-size: 15px; }
.tools-link { margin-left: auto; color: #c4d9e8; text-decoration: none; font-size: 14px; }
.workspace { display: flex; height: calc(100dvh - 64px); min-height: 400px; }
#layer-panel { width: 336px; flex: 0 0 336px; background: #0d1d2b; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 5; }
.panel-heading { padding: 25px 22px 23px; display: flex; align-items: center; justify-content: space-between; }
.eyebrow { font-size: 12px; letter-spacing: .15em; color: var(--muted); margin: 0 0 7px; }
h1 { font-size: 26px; font-weight: 600; margin: 0; }
h1 span { display: inline-block; vertical-align: middle; font: 13px var(--sans); color: #9bb6c7; padding: 2px 8px; border: 1px solid #2b4253; border-radius: 5px; margin-left: 8px; }
.icon-button { color: #a8c1d1; background: none; border: 1px solid var(--line); border-radius: 6px; width: 32px; height: 32px; font-size: 24px; }
.panel-scroll { padding: 0 16px; overflow-y: auto; flex: 1; }
h2 { font-size: 14px; font-weight: 600; margin: 0; }
.layer-card { border: 1px solid #306277; border-radius: 10px; background: #112939; overflow: hidden; }
.layer-heading { display: flex; gap: 12px; align-items: center; padding: 16px; }
.layer-icon { color: #78d6dc; font-size: 24px; }
.layer-name { flex: 1; }
.layer-name strong { display: block; font-size: 16px; font-weight: 600; }
.layer-name small { color: #a2becd; font-size: 13px; }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; cursor: pointer; }
.layer-heading input { width: 32px; height: 20px; }
.layer-controls { border-top: 1px solid #284352; padding: 0 16px 16px; }
.layer-controls summary { font-size: 14px; color: #c3d9e4; padding: 13px 0; }
.control-row { margin-bottom: 15px; }
.control-row > label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; color: #c4d8e4; }
.control-row output { color: #79d8e4; font-variant-numeric: tabular-nums; }
select { width: 100%; padding: 8px 10px; border: 1px solid #365365; border-radius: 6px; color: #e2edf3; background: #0d2130; font-size: 14px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.check-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 12px; color: #c4d8e4; margin: 10px 0; }
.source-details { margin-top: 16px; border-top: 1px solid #284352; }
.source-details summary { color: #9ebdce; }
.source-details p, .future-note { color: #9eb5c6; font-size: 13px; line-height: 1.55; margin: 0 0 12px; }
.source-details a { color: #78d6dc; }
.future-note { padding: 20px 8px; }
.basemap-settings { border-top: 1px solid var(--line); padding: 18px 22px; }
.basemap-settings h2 { color: #a1baca; margin-bottom: 14px; }
.map-surface { flex: 1; position: relative; min-width: 0; background: #142936; }
#workspace-map { position: absolute; inset: 0; }
.map-toolbar { position: absolute; top: 18px; left: 20px; display: flex; align-items: center; gap: 15px; }
.view-label { font-size: 12px; letter-spacing: .12em; text-shadow: 0 1px 5px #000; background: #0b1d2ddd; padding: 9px 12px; border-radius: 5px; }
.map-toolbar button, .floating-button { background: #0b1d2dee; border: 1px solid #355162; border-radius: 6px; color: #d6e7ef; padding: 8px 12px; font-size: 14px; }
#map-status { position: absolute; top: 68px; left: 20px; right: 60px; width: fit-content; max-width: calc(100% - 80px); padding: 7px 11px; border-radius: 5px; background: #0b1d2de8; font-size: 13px; color: #c3d7e3; }
.legend { position: absolute; right: 18px; bottom: 40px; width: 250px; padding: 14px 16px 10px; border: 1px solid #385361; border-radius: 8px; background: #0b1d2df0; pointer-events: none; }
.legend-title { font-size: 14px; display: flex; justify-content: space-between; margin-bottom: 12px; }
.legend-title span { font-size: 12px; color: #abc1cd; }
.color-ramp { height: 8px; border-radius: 3px; background: linear-gradient(90deg,#1a6b4a 0%,#3f8f4f 2.5%,#8ab55b 7.5%,#d6c96a 15%,#b08a52 25%,#8a6a44 45%,#9c9c9c 70%,#fff 100%); }
.legend-ticks { display: flex; justify-content: space-between; color: #b9cdd8; font-size: 12px; margin-top: 5px; }
.legend p { font-size: 12px; color: #91aab9; margin: 10px 0 0; }
.coordinates { position: absolute; left: 20px; bottom: 10px; color: #c2d6e1; background: #0b1d2ddd; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.floating-button { position: absolute; top: 18px; left: 16px; z-index: 4; }
.workspace.panel-collapsed #layer-panel { display: none; }
.workspace.panel-collapsed .map-toolbar { left: 135px; }
[hidden] { display: none !important; }
@media(max-width: 700px) { .workspace-header { padding: 0 16px; gap: 12px; } .workspace-title { display: none; } #layer-panel { width: min(310px, 85vw); flex-basis: min(310px, 85vw); position: absolute; top: 64px; bottom: 0; box-shadow: 10px 0 30px #0005; } .map-toolbar { left: auto; right: 55px; } .view-label { display: none; } .legend { width: 220px; right: 12px; } .coordinates { left: 12px; } #map-status { top: 65px; } }

.layer-state { display: flex; justify-content: space-between; padding: 0 16px 13px; font-size: 12px; color: #8caaba; }
#dem-visibility { color: #78d6dc; }
.layer-hidden { border-color: #344652; background: #11222e; }
.layer-hidden #dem-visibility { color: #9aafbf; }
.legend-ticks { position: relative; height: 17px; display: block; }
.legend-ticks span { position: absolute; transform: translateX(-50%); }
.legend-ticks span:nth-child(1) { left: 0; transform: none; }
.legend-ticks span:nth-child(2) { left: 25%; }
.legend-ticks span:nth-child(3) { left: 70%; }
.legend-ticks span:nth-child(4) { right: 0; transform: none; }
@media(prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
/* Workspace finish: one quiet frame around the terrain, with cyan reserved
   for the selected layer and active controls. */
.workspace-header { background: #0b1824; box-shadow: 0 1px 0 #ffffff03; gap: 24px; }
.workspace-header .ss-brand { letter-spacing: -.6px; }
.header-context { display: flex; align-items: center; gap: 7px; color: #8ea9b9; font-size: 12px; }
.header-context i { width: 5px; height: 5px; border-radius: 50%; background: #65c8b3; }
.tools-link { padding: 7px 12px; border: 1px solid #2b3d4a; border-radius: 6px; }
.tools-link:hover { background: #172d3b; color: white; }
#layer-panel { width: 340px; flex-basis: 340px; background: #0c1b27; }
.panel-heading { padding: 27px 22px 28px; }
h1 { font-size: 28px; letter-spacing: -.6px; }
.panel-scroll { padding: 0 18px; }
.layer-card { background: #102736; border-color: #345767; box-shadow: 0 4px 18px #00000012; }
.layer-heading { padding: 17px 15px 12px; gap: 11px; }
.layer-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #316071; border-radius: 8px; background: #173947; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.layer-icon .icon { width: 23px; height: 23px; }
.icon-button { display: grid; place-items: center; }
.icon-button:hover { color: white; border-color: #527185; background: #1b3343; }
.layer-heading input[role=switch] { appearance: none; position: relative; width: 30px; height: 18px; flex: 0 0 30px; border-radius: 12px; background: #304956; border: 1px solid #4b626f; transition: background .15s; }
.layer-heading input[role=switch]::after { content: ''; width: 12px; height: 12px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: #c0d0d8; transition: transform .15s; }
.layer-heading input[role=switch]:checked { background: #32bbd0; border-color: #55d5e3; }
.layer-heading input[role=switch]:checked::after { transform: translateX(12px); background: #062635; }
.layer-state { margin-left: 49px; padding-bottom: 17px; }
#dem-visibility::before { content: ''; display: inline-block; width: 5px; height: 5px; background: currentColor; border-radius: 50%; margin: 0 5px 2px 0; }
.layer-controls { padding: 0 15px 15px; }
.layer-controls > summary { margin-bottom: 5px; padding: 15px 0; }
.control-row { margin-bottom: 18px; }
.control-row select { padding: 9px 10px; background: #0c1e2b; }
input[type=range] { height: 4px; cursor: pointer; display: block; margin: 13px 0 9px; }
.source-details { padding-top: 2px; }
.source-details summary { font-size: 13px; }
.source-details a { font-size: 13px; text-decoration: none; }
.future-note { color: #7f9aaa; padding: 20px 4px; max-width: 28ch; }
.basemap-settings { background: #0a1823; padding: 18px 22px 21px; }
.map-toolbar { gap: 8px; top: 20px; }
.map-toolbar > button, .floating-button { display: flex; align-items: center; gap: 7px; box-shadow: 0 3px 14px #0002; }
.map-toolbar button:hover, .floating-button:hover { background: #193646; }
.view-switch { display: flex; padding: 3px; border: 1px solid #355162; border-radius: 7px; background: #0b1d2df0; box-shadow: 0 3px 14px #0002; }
.view-switch button { border: 0; box-shadow: none; padding: 5px 12px; background: transparent; color: #99b1c0; font-size: 13px; border-radius: 4px; }
.view-switch button[aria-pressed=true] { color: #c0f6f4; background: #254a58; }
.maplibregl-ctrl-group { border: 1px solid #355162 !important; background: #e0e9eb !important; border-radius: 7px !important; overflow: hidden; }
.maplibregl-ctrl-top-right { top: 10px; right: 8px; }
.maplibregl-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.legend { bottom: 58px; border-color: #3c5262; box-shadow: 0 5px 24px #0003; border-radius: 7px; }
.probe { position: absolute; left: 20px; bottom: 58px; padding: 14px 16px; width: 250px; border: 1px solid #3c5262; border-radius: 7px; background: #0b1d2df0; box-shadow: 0 5px 24px #0003; }
.probe-heading { display: flex; justify-content: space-between; align-items: center; min-height: 20px; }
.probe-heading .eyebrow { margin: 0; font-size: 11px; letter-spacing: .11em; color: #a4b9c6; }
.probe-heading button { height: 22px; width: 22px; font-size: 18px; border: 0; }
.probe-value { font-size: 24px; font-weight: 600; color: #d7f1f2; margin: 8px 0 2px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.probe p { margin: 0; color: #9eb9c9; line-height: 1.5; font-size: 12px; }
.map-footer { position: absolute; left: 0; right: 0; bottom: 0; height: 27px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; background: #091924f5; border-top: 1px solid #2b414e; pointer-events: none; }
.coordinates { position: static; padding: 0; background: none; font-size: 11px; }
.projection-label { color: #728d9e; font-size: 10px; letter-spacing: .08em; }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: 27px !important; }
@media(min-width: 701px) and (max-width: 1150px) { .probe { bottom: 186px; } .legend { left: 20px; right: auto; } }
@media(max-width: 850px) { .header-context { display: none; } }
@media(max-width: 700px) { #layer-panel { width: min(320px, 88vw); flex-basis: min(320px, 88vw); } .map-toolbar, .workspace.panel-collapsed .map-toolbar { left: auto; right: 58px; top: 18px; } .map-toolbar > button { font-size: 0; padding: 8px; } .map-toolbar > button .icon { width: 18px; height: 18px; } .view-switch button { padding: 5px 9px; } .probe { bottom: 175px; left: 12px; width: 220px; } .legend { left: 12px; right: auto; bottom: 54px; width: 220px; } .projection-label { display: none; } .workspace-header { padding: 0 16px; } }
@media(max-height: 600px) { .probe { top: 110px; bottom: auto; } .legend { display: none; } }
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.mesh-range { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0; }
.mesh-range label { font-size:12px; color:#a4bdcb; }
.mesh-range input { display:block; width:100%; min-width:0; margin-top:6px; padding:8px; color:#e8f4fa; background:#102b38; border:1px solid #36505e; border-radius:6px; }
.mesh-inspector { border-top:1px solid #ffffff18; margin-top:16px; padding-top:14px; }
.mesh-inspector strong { display:block; font-size:20px; color:#6ddcdf; margin:8px 0; }
.mesh-inspector p,.mesh-note { font-size:12px; color:#aac2cd; line-height:1.5; }
.mesh-legend { margin:14px 0; }
.mesh-legend>div { height:9px; border-radius:3px; background:linear-gradient(to right,#7a6a52,#a6a07e,#e2f5e8,#2eb2be,#105682,#091e3a); }
.mesh-legend p { display:flex; justify-content:space-between; gap:8px; font-size:10px; color:#aac2cd; }
.mesh-retry { position:static; margin-bottom:10px; }
.view-switch button:disabled { opacity:.4; cursor:not-allowed; }

#layer-list { display: flex; flex-direction: column; gap: 16px; }
