/* GeaSpirit VSE (C2074): ONE dashboard. A fixed frame — top bar, left data & layers, centre 3D view, right
   inspector, bottom tools — so no panel ever covers another or the controls. The 3D view gets the space left. */
:root { --vp-bg: #0b1015; --bar: #0f151b; --panel: #121a21; --panel2: #0f161c; --line: #24303a; --ink: #e8eef3; --mut: #94a3b0; --acc: #2fd27a;
  --ok: #2fd27a; --syn: #ffd166; --exp: #f59e0b; --na: #6b7680; --ins: #c084fc;
  --vp-mono: ui-monospace, SFMono-Regular, Menlo, monospace; --vp-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --top: 52px; --bottom: 44px; --left: 256px; --right: 330px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--vp-bg); color: var(--ink); font: 14px/1.4 var(--vp-sans); overflow: hidden; }
button, select, input { font-family: var(--vp-sans); }
#vp-wrap { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) var(--bottom); height: 100vh; height: 100dvh; }

/* top bar */
#vp-top { display: flex; align-items: center; gap: 10px; min-height: var(--top); padding: 6px 12px; background: var(--bar); border-bottom: 1px solid var(--line); min-width: 0; }
.vp-brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; white-space: nowrap; }
.vp-brand b { color: var(--acc); }
.vp-badge { font: 700 10.5px/1 var(--vp-mono); letter-spacing: 1px; color: var(--syn); border: 1px solid #8a6d22; border-radius: 999px; padding: 4px 8px; white-space: nowrap; }
.vp-asset { display: flex; flex-direction: column; min-width: 0; max-width: 250px; flex: 0 1 auto; }
.vp-asset select { background: transparent; color: var(--ink); border: 0; font: 700 14px var(--vp-sans); padding: 0; cursor: pointer; max-width: 100%; }
.vp-asset select option { background: var(--panel); }
#vp-asset-sub { font: 11px var(--vp-mono); color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vp-views { display: flex; align-items: stretch; gap: 2px; margin: 0 auto; padding: 3px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
#vp-views .vtab { position: relative; display: flex; align-items: center; gap: 6px; background: transparent; border: 0; border-radius: 7px; color: var(--ink); padding: 6px 10px; font: 600 12.5px/1 var(--vp-sans); white-space: nowrap; cursor: pointer; }
#vp-views .vtab i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--ok); }
#vp-views .vtab[data-state="synthetic"] i { background: var(--syn); }
#vp-views .vtab[data-state="experimental"] i { background: var(--exp); }
#vp-views .vtab[data-state="na"] i { background: transparent; border: 1.5px solid var(--na); }
#vp-views .vtab[data-state="insufficient"] i { background: transparent; border: 1.5px solid var(--ins); }
#vp-views .vtab[data-state="na"], #vp-views .vtab[data-state="insufficient"] { color: #7d8893; }
#vp-views .vtab:hover { background: #1a242e; }
#vp-views .vtab[aria-selected="true"] { background: #173a27; color: #eafff2; box-shadow: inset 0 0 0 1px #2c7a4f; }
#vp-views .vtab.right2 { box-shadow: inset 0 0 0 1px #3b82f6; }
#vp-views .vsep { width: 1px; margin: 4px 4px; background: var(--line); flex: none; }
#vp-views .more { display: none; }
#vp-more-menu { position: fixed; z-index: 20; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px #000a; }
#vp-more-menu[hidden] { display: none; }
#vp-more-menu .vtab { display: flex; align-items: center; gap: 8px; background: transparent; border: 0; border-radius: 7px; color: var(--ink); padding: 8px 10px; font: 600 13px var(--vp-sans); text-align: left; cursor: pointer; }
#vp-more-menu .vtab:hover { background: #1a242e; } #vp-more-menu .vtab small { margin-left: auto; padding-left: 12px; color: var(--mut); font-weight: 500; }
#vp-more-menu .vtab i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
@media (max-width: 1599px) { #vp-views .ctx, #vp-views .vsep { display: none; } #vp-views .more { display: flex; } .vp-badge { display: none; } .vp-asset { max-width: 180px; } #vp-views .vtab { padding: 6px 7px; gap: 5px; font-size: 12px; } #vp-top { gap: 8px; } }
.vp-viewsel { display: none; align-items: center; gap: 6px; color: var(--mut); font-size: 12px; }
.vp-viewsel select, .vp-actions select, #vp-bottom select, #vp-splitbar select { background: #121a22; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font: 600 12.5px var(--vp-sans); cursor: pointer; }
.vp-actions { display: flex; align-items: center; gap: 6px; flex: none; }
#vp-export { width: 92px; } #vp-view { width: 104px; }
.lnote { margin: 0 0 6px; padding: 6px 8px; font-size: 11.5px; color: var(--syn); background: #1d1a10; border: 1px solid #3b331b; border-radius: 6px; }
button.tool { background: #121a22; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; font: 600 12.5px/1 var(--vp-sans); cursor: pointer; white-space: nowrap; }
button.tool:hover { background: #1a242e; }
button.tool[aria-pressed="true"] { background: #173a27; border-color: #2c7a4f; }
button.tool:disabled, button.tool[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 30px; padding: 0; background: #121a22; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
:is(button, select, input, a, .vtab):focus-visible, #vp-canvas canvas:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* body: left | centre | right */
#vp-body { display: grid; grid-template-columns: var(--left) minmax(0, 1fr) var(--right); min-height: 0; }
#vp-wrap.no-left #vp-body { grid-template-columns: 0 minmax(0, 1fr) var(--right); }
#vp-wrap.no-right #vp-body { grid-template-columns: var(--left) minmax(0, 1fr) 0; }
#vp-wrap.no-left.no-right #vp-body { grid-template-columns: 0 minmax(0, 1fr) 0; }
#vp-wrap.no-left #vp-left, #vp-wrap.no-right #vp-right { visibility: hidden; }
#vp-left { grid-column: 1; grid-row: 1; } #vp-main { grid-column: 2; grid-row: 1; } #vp-right { grid-column: 3; grid-row: 1; }
#vp-left, #vp-right { min-height: 0; overflow: hidden; background: var(--panel2); display: flex; flex-direction: column; }
#vp-left { border-right: 1px solid var(--line); }
#vp-right { border-left: 1px solid var(--line); }
.vp-panel { background: var(--panel2); }
#vp-left .vp-panel, #vp-right .vp-panel { min-height: 0; }
#vp-layers { flex: 1; overflow: auto; }
.vp-h, .vp-fold, .vp-grip { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; background: transparent; border: 0; color: var(--ink); text-align: left; padding: 11px 12px 8px; font: 700 11.5px/1.2 var(--vp-sans); letter-spacing: .7px; text-transform: uppercase; }
.vp-fold, .vp-grip { cursor: pointer; }
.vp-fold::after { content: "▾"; margin-left: auto; color: var(--mut); }
.vp-panel.folded .vp-fold::after { content: "▸"; }
.vp-panel.folded > .vp-body { display: none; }
.vp-body { padding: 0 12px 12px; }
#vp-layers h4, #vp-ana h4 { margin: 12px 0 4px; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--mut); }
.lrow { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; cursor: pointer; }
.lrow.off { cursor: help; color: #7d8893; }
.lrow input { margin: 0; }
.pill { font: 700 9.5px/1 var(--vp-mono); letter-spacing: .3px; padding: 3px 5px; border-radius: 4px; white-space: nowrap; }
.pill.available { background: #0f3a22; color: #6ff0a8; } .pill.synthetic { background: #3b2f0e; color: var(--syn); } .pill.experimental { background: #3b2a0e; color: var(--exp); }
.pill.na { background: #1e252c; color: #9aa6b1; } .pill.insufficient { background: #2a1d38; color: #d8b4fe; } .pill.link { background: #132433; color: #9cc7f0; cursor: pointer; border: 0; }
#vp-layers label { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; font-size: 13px; }
#vp-layers label.rng, label.rng { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
label.rng input { grid-column: 1 / -1; width: 100%; accent-color: var(--acc); }
label.rng output { font: 11px var(--vp-mono); color: var(--mut); grid-row: 1; grid-column: 2; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--acc); width: 15px; height: 15px; }

/* right column: inspector (grows) + legend */
#vp-props-wrap { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; min-height: 120px; }
#vp-props-wrap > .vp-body { overflow: auto; flex: 1; }
.vp-grip .bar { display: none; }
.vp-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.vp-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--mut); font: 600 12.5px var(--vp-sans); padding: 6px 8px; cursor: pointer; }
.vp-tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--acc); }
#vp-legend-wrap { flex: 0 1 auto; max-height: 48%; overflow: auto; border-top: 1px solid var(--line); }
#vp-wrap.no-legend #vp-legend-wrap { display: none; }
#vp-legend { padding-top: 2px; }

/* centre */
#vp-main { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--vp-bg); }
#vp-canvas { position: absolute; inset: 0; }
#vp-canvas canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#vp-ov { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.vp-lbl { position: absolute; left: 0; top: 0; white-space: nowrap; font: 600 11px/1 var(--vp-mono); color: #d9e2ea; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.vp-lbl.ax { color: #9fb0bf; font-weight: 500; }
.vp-lbl.hole { background: #f2f2f2; color: #0c1116; padding: 3px 6px; border-radius: 4px; text-shadow: none; font-weight: 700; box-shadow: 0 1px 4px #0008; }
.vp-lbl.fault { background: rgba(120, 18, 12, 0.88); color: #fff; padding: 4px 7px; border-radius: 4px; text-shadow: none; }
#vp-banner { position: absolute; left: 10px; top: 10px; max-width: min(560px, calc(100% - 20px)); margin: 0; padding: 5px 10px; font-size: 12px; line-height: 1.35; color: #ffe2a8; background: rgba(29, 26, 16, .9); border: 1px solid #3b331b; border-radius: 8px; pointer-events: none; }
#vp-banner .obs { color: #cfe9ff; }
#vp-banner[data-kind="obs"] { background: rgba(15, 26, 36, .9); border-color: #1f3445; }
#vp-banner[data-kind="obs"] .syn, #vp-banner[data-kind="syn"] .obs { display: none; }
#vp-wrap.split #vp-banner { display: none; }
#vp-notice { position: absolute; left: 50%; top: 48px; transform: translateX(-50%); max-width: min(520px, calc(100% - 24px)); margin: 0; background: #1b1424; border: 1px solid #6b4c8a; color: #eadcff; border-radius: 8px; padding: 9px 14px; font-size: 13px; z-index: 5; }
#vp-notice b { color: #fff; }
#vp-status { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); margin: 0; background: var(--panel); border: 1px solid var(--acc); border-radius: 8px; padding: 8px 14px; font-size: 13px; z-index: 5; }
#vp-hud { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; }
#vp-north { width: 42px; height: 42px; background: var(--panel); border: 1px solid var(--line); border-radius: 50%; padding: 2px; }
#vp-north svg { width: 100%; height: 100%; }
#vp-scale { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: 600 11.5px var(--vp-mono); text-align: center; }
#vp-scale-bar { height: 6px; margin: 0 auto 4px; border: 2px solid var(--ink); border-top: 0; }
#vp-q { font-size: 11px; color: var(--syn); }
/* zoom: above the north arrow and the scale bar (bottom right), never over them; the camera moves, not the image */
#vp-zoom { position: absolute; right: 12px; bottom: 74px; display: flex; flex-direction: column; gap: 6px; z-index: 4; }
#vp-zoom .icon { width: 40px; height: 40px; background: var(--panel); border-radius: 8px; }
#vp-zoom .icon:hover:not(:disabled) { border-color: var(--acc); }
#vp-zoom .icon:disabled { opacity: .4; cursor: default; }
#vp-splitbar { position: absolute; inset: 0; pointer-events: none; }
#vp-splitbar[hidden] { display: none; }
#vp-splitbar::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #e8eef3aa; }
#vp-splitbar > span { position: absolute; top: 10px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; font: 700 12px var(--vp-sans); letter-spacing: .3px; pointer-events: auto; }
#vp-split-a { left: 25%; } #vp-split-b { left: 75%; padding: 2px 4px !important; }
#vp-split-b select { border: 0; background: transparent; font-weight: 700; }
#vp-section { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 46%; display: flex; flex-direction: column; z-index: 4; border: 1px solid var(--line); border-radius: 10px; background: rgba(15, 22, 28, .97); box-shadow: 0 6px 24px #0008; }
#vp-section[hidden] { display: none; }
#vp-measure { position: absolute; left: 50%; transform: translateX(-50%); top: 12px; padding: 10px 14px; font-size: 12.5px; min-width: 300px; border: 1px solid var(--line); border-radius: 10px; z-index: 4; }
#vp-measure[hidden] { display: none; }

/* bottom bar */
#vp-bottom { display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--bar); border-top: 1px solid var(--line); min-width: 0; }
#vp-bottom .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; flex: none; }
#vp-job-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); white-space: nowrap; flex: none; }
#vp-job-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
#vp-job-status[data-state="busy"] i { background: var(--exp); animation: vp-pulse 1s infinite alternate; }
@keyframes vp-pulse { to { opacity: .3; } }
.vp-attrib { flex: 1 1 auto; min-width: 0; text-align: left; background: transparent; border: 0; color: var(--mut); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; padding: 4px 6px; }
.vp-attrib:hover { color: var(--ink); }

/* provenance tab */
#vp-prov-body h4 { margin: 10px 0 4px; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--mut); }
#vp-prov-body dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0 0 6px; font-size: 12.5px; }
#vp-prov-body dt { color: var(--mut); } #vp-prov-body dd { margin: 0; }
.prov-src { padding: 8px 10px; margin: 0 0 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.prov-src b { display: block; margin-bottom: 4px; }

/* tablets: the left column becomes a drawer over the view */
@media (max-width: 1279px) {
  :root { --right: 300px; }
  #vp-body { grid-template-columns: 0 minmax(0, 1fr) var(--right) !important; }
  #vp-wrap.no-right #vp-body { grid-template-columns: 0 minmax(0, 1fr) 0 !important; }
  #vp-left { position: absolute; z-index: 8; top: var(--top); bottom: var(--bottom); left: 0; width: 280px; box-shadow: 8px 0 24px #0009; }
  #vp-wrap:not(.left-open) #vp-left { visibility: hidden; }
  #vp-views .vtab { padding: 6px 8px; }
}
@media (max-width: 1279px) { #vp-views { display: none; } .vp-viewsel { display: inline-flex; margin-left: auto; } }
/* phones: inspector as a bottom sheet above the tool bar; legend as a drawer; tool bar scrolls */
@media (max-width: 760px) {
  :root { --top: auto; }
  .vp-viewsel select { max-width: 52vw; }
  #vp-bottom { gap: 4px; padding: 0 6px; }
  #vp-bottom button.tool { padding: 6px 7px; font-size: 12px; }
  #vp-view { display: none; }
  #vp-job-status { display: none; }
  #vp-top { flex-wrap: wrap; gap: 6px 8px; padding: 6px 8px; }
  .vp-badge { display: none; }
  .vp-asset { max-width: none; flex: 1 1 140px; }
  .vp-viewsel { margin-left: 0; } .vp-viewsel > span { display: none; }
  .vp-actions #vp-export { display: none; }
  .vp-actions #vp-reset span { display: none; } .vp-actions #vp-reset { padding-inline: 8px; }   /* C2135: Reset view stays on phones, icon only */
  #vp-body { grid-template-columns: 0 minmax(0, 1fr) 0 !important; }
  #vp-right { position: absolute; z-index: 7; left: 0; right: 0; bottom: var(--bottom); top: auto; border: 0; background: transparent; overflow: visible; display: block; height: 0; visibility: visible !important; }
  #vp-props-wrap { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 14px 14px 0 0; border: 1px solid var(--line); background: var(--panel); transition: height .18s ease; min-height: 0; }
  #vp-props-wrap.drag { transition: none; }
  #vp-props-wrap[data-state="peek"] { height: 46px; }
  #vp-props-wrap[data-state="half"] { height: 44vh; }
  #vp-props-wrap[data-state="full"] { height: 78vh; }
  #vp-props-wrap[data-state="peek"] > .vp-body, #vp-props-wrap[data-state="peek"] .vp-tabs { display: none; }
  .vp-grip { flex-direction: column; gap: 6px; padding: 6px 12px 8px; touch-action: none; text-align: center; justify-content: center; }
  .vp-grip .bar { display: block; width: 44px; height: 5px; border-radius: 3px; background: #5c6670; }
  #vp-legend-wrap { position: absolute; left: 8px; right: 8px; bottom: calc(var(--bottom) + 54px); max-height: 46vh; z-index: 6; border: 1px solid var(--line); border-radius: 10px; }
  #vp-wrap:not(.legend-open) #vp-legend-wrap { display: none; }
  #vp-left { top: 0; width: min(86vw, 320px); }
  #vp-bottom { overflow-x: auto; scrollbar-width: none; }
  #vp-bottom .sep, .vp-attrib, #vp-tog-right { display: none; }
  #vp-hud { bottom: 56px; }
  #vp-zoom { bottom: 118px; right: 10px; }
  #vp-zoom .icon { width: 44px; height: 44px; }
  #vp-banner { font-size: 11.5px; }
  #vp-section { left: 6px; right: 6px; }
  #vp-split-a { left: 25%; } 
}

/* components */
#vp-props h3 { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; font-size: 15px; }
#vp-props h3 i, #vp-props td i, .lg i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid #0006; flex: none; }
#vp-props dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 12.5px; }
#vp-props dt { color: var(--mut); }
#vp-props dd { margin: 0; }
#vp-props table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
#vp-props th { text-align: left; color: var(--mut); font-weight: 600; border-bottom: 1px solid var(--line); padding: 3px 4px; }
#vp-props td { padding: 3px 4px; border-bottom: 1px solid #1a232c; }
#vp-props td:nth-child(-n+2) { font-family: var(--vp-mono); text-align: right; }
#vp-props td i { vertical-align: -2px; margin-right: 5px; }
#vp-props .hint { color: var(--mut); margin: 0; font-size: 12.5px; }
.ev { font: 700 10.5px/1 var(--vp-mono); padding: 3px 6px; border-radius: 4px; }
.ev.syn { background: #3b2f0e; color: #ffd166; }
.ev.obs { background: #0f3a22; color: #6ff0a8; }
#vp-legend { padding-top: 10px; }
#vp-legend h3 { margin: 0 0 6px; font-size: 11.5px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--mut); }
.lg { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 8px; font-size: 12.5px; padding: 1.5px 0; }
.lg small { color: var(--mut); font-size: 10.5px; }
.lg i.ln { height: 4px; border: 0; border-radius: 2px; }
.lg i.bh { background: linear-gradient(#d9954a 0 33%, #9db9c9 33% 66%, #a86e52 66%); width: 8px; margin-left: 3px; }
#vp-props h3 i.bh { background: linear-gradient(#d9954a 0 33%, #9db9c9 33% 66%, #a86e52 66%); width: 8px; }
.lg i.img { background: linear-gradient(135deg, #3c5a3a, #8b8f6c 50%, #4a6a84); }
.lg i.dem { background: linear-gradient(#e8e2d0, #7b6a52); }
.lg i.hatch { background: repeating-linear-gradient(135deg, #6c757d 0 4px, #4b535a 4px 7px); }
#vp-legend .note2 { margin: 8px 0 0; color: var(--mut); font-size: 11.5px; }
.lg + .note, #vp-legend .note { margin: 8px 0 0; color: #ffd166; font-size: 11.5px; }

#vp-props .tabs { display: flex; gap: 4px; margin: 10px 0 6px; border-bottom: 1px solid var(--line); }
#vp-props .tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--mut); font: 600 12.5px var(--vp-sans); padding: 6px 8px; cursor: pointer; }
#vp-props .tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--acc); }
#vp-props tr[data-iv] { cursor: pointer; }
#vp-props tr[data-iv].on td { background: #1d3a2a; }
#vp-props .selrow { margin: 8px 0 0; padding: 6px 8px; background: #16241b; border-left: 3px solid var(--acc); font-size: 12.5px; }
.striplog { display: block; font: 10px var(--vp-mono); fill: #94a3b0; margin-top: 4px; }
.striplog rect[data-iv] { cursor: pointer; }
#vp-props table.assay td, #vp-props table.assay th { text-align: right; font-family: var(--vp-mono); }
.lg i.grad { background: linear-gradient(90deg, hsl(223 85% 50%), hsl(120 85% 50%), hsl(0 85% 50%)); }
.sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.sec-head select { background: #121a22; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.sec-head input[type=range] { width: 180px; accent-color: var(--acc); }
.sec-head output { font: 11.5px var(--vp-mono); color: var(--mut); min-width: 80px; }
.sec-note { color: #ffd166; font-size: 11.5px; margin-left: auto; }
.sec-body { position: relative; flex: 1; min-height: 160px; }
#vp-sec-canvas, #vp-sec-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#vp-sec-canvas { image-rendering: pixelated; }
#vp-sec-svg text { font: 10.5px var(--vp-mono); fill: #c9d4dd; }
#vp-measure { left: 50%; transform: translateX(-50%); top: 12px; padding: 10px 14px; font-size: 12.5px; min-width: 300px; }
#vp-measure dl { display: grid; grid-template-columns: auto auto; gap: 3px 14px; margin: 6px 0 0; }
#vp-measure dt { color: var(--mut); } #vp-measure dd { margin: 0; font-family: var(--vp-mono); }
.lg i.ramp { background: linear-gradient(90deg, #440154, #21918c, #fde725); }
.view-why { color: #ffd166; font-size: 11.5px; }
#vp-props i.evdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.rampbar { height: 12px; border-radius: 3px; background: linear-gradient(90deg, #440154, #21918c, #fde725); margin: 4px 0; }
.rampticks { display: flex; justify-content: space-between; font: 10.5px var(--vp-mono); color: var(--mut); }


/* investigations */
#vp-job h3 { margin: 4px 0 2px; font-size: 15px; } #vp-job h3 small { color: var(--mut); font: 11px var(--vp-mono); }
#vp-job h4 { margin: 10px 0 4px; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--mut); }
#vp-job ol, #vp-job ul { margin: 0; padding-left: 18px; font-size: 12px; } #vp-job li { margin: 2px 0; }
#vp-job .steps li span { font: 700 10.5px var(--vp-mono); color: #6ff0a8; } #vp-job .steps li.st-decision span { color: #ffd166; } #vp-job .steps li small { color: var(--mut); }
#vp-job .chk li.ok { color: #9be7b8; } #vp-job .chk li.bad { color: #ffb4a8; }
#vp-job .contra { margin: 8px 0; padding: 8px 10px; border-left: 3px solid #e0302a; background: #2a1414; font-size: 12.5px; }
#vp-job .sub { margin: 8px 0; padding: 8px 10px; border-left: 3px solid #3b82f6; background: #121e2e; font-size: 12.5px; } #vp-job .sub.abst { border-color: #8b949e; background: #1a1d21; }
.build { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.build h4 { grid-column: 1 / -1; margin: 6px 0 0; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--mut); }
.build input { background: #0f161d; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; font: 12px var(--vp-mono); min-width: 0; }
.build pre { grid-column: 1 / -1; margin: 0; max-height: 110px; overflow: auto; font: 10.5px/1.35 var(--vp-mono); color: var(--mut); white-space: pre-wrap; }
.build pre:empty { display: none; }
/* Split View legend: one section per viewport */
.lgside + .lgside { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.lgside h2 { margin: 0 0 4px; font-size: 12px; color: var(--ink); letter-spacing: .3px; }

/* C2074.1 — split legends fold independently; viewport labels carry their own Legend button */
.lgside h2 { margin: 0; } .lgside-h { display: flex; width: 100%; align-items: center; gap: 6px; background: transparent; border: 0; padding: 4px 0; color: var(--ink); font: 700 12px var(--vp-sans); text-align: left; cursor: pointer; }
.lgside-h::after { content: "▾"; margin-left: auto; color: var(--mut); } .lgside.folded .lgside-h::after { content: "▸"; }
.lgside.folded .lgside-b { display: none; }
.lgside.flash { animation: vp-flash .9s ease-out; } @keyframes vp-flash { from { background: #1c3a2a; } to { background: transparent; } }
#vp-splitbar > span { display: inline-flex; align-items: center; gap: 8px; }
.lgbtn { background: #1a242e; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font: 600 11.5px var(--vp-sans); cursor: pointer; }
/* readability floor: nothing below 10.5 px; phones get finger-sized buttons */
.pill { font-size: 10.5px; padding: 3px 6px; }
.lg small, .rampticks, #vp-sec-svg text { font-size: 11px; }
.striplog { font-size: 10.5px; }
#vp-asset-sub { font-size: 11px; }
@media (max-width: 760px) {
  #vp-bottom button.tool, #vp-top button.tool, #vp-top select, #vp-top .icon { min-height: 36px; }
  :root { --bottom: 48px; }
  .lrow { padding: 6px 0; }
  .lgbtn { padding: 6px 8px; }
}
/* C2074.2 — each split label stays inside its own half (the right view's selector no longer pushes its Legend button out) */
#vp-splitbar > span { max-width: calc(50% - 20px); }
#vp-split-b select { max-width: 210px; min-width: 0; text-overflow: ellipsis; }
#vp-split-a-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* C2074.3 — public demo page: the dashboard sits under the site's own header (navigation, language, visits);
   the page scrolls to the footer. --vp-head is the measured height of the site header (set by the page). */
html:has(body.vse-public), body.vse-public { height: auto; overflow: auto; }
body.vse-public #vp-wrap { margin-top: var(--vp-head, 56px); height: calc(100vh - var(--vp-head, 56px)); height: calc(100dvh - var(--vp-head, 56px)); min-height: 420px; }   /* the site header is position: fixed */
body.vse-public .skip-link { position: absolute; left: -9999px; top: 0; }
body.vse-public .skip-link:focus { left: 12px; top: calc(var(--vp-head, 56px) + 8px); z-index: 1001; padding: 8px 12px; background: #121a21; color: #e8eef3; border-radius: 8px; }
body.vse-public .vp-brand { font-size: 15px; }

/* site stylesheet shares the class name .lg (a 9 px dot there): neutralise it inside the dashboard */
#vp-wrap .lg { width: auto; height: auto; border-radius: 0; }
/* public page: the site's music button (fixed, bottom right) keeps its own space; on phones it moves to the free
   bottom-left corner of the view, above the inspector tab, so it never covers a tool.
   C2077: the room is a MARGIN, outside the bar: a padding was inside it, and where the tools are wider than the bar
   (768 px) they ran on under the button (the sources button was covered) and past the edge; they now scroll inside it */
body.vse-public #vp-bottom { margin-right: 66px; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 600px) { body.vse-public #vp-bottom { margin-right: 0; } }
/* C2163-R: on phones the inspector is a bottom sheet that rises over that corner: while it is open the button steps aside
   (the music keeps playing; it is back as soon as the sheet closes) instead of covering the sheet's text */

.pill.planned { background: #14233a; color: #93b4e8; }
.pill.derived { background: #2b2414; color: #e9c98a; }
.ev.nodata { background: #2a2140; color: #c9b6ff; }
.ev.inf { background: #2b2414; color: #e9c98a; }
svg.profile { background: #0e151c; border: 1px solid var(--line); border-radius: 6px; margin: 4px 0 8px; } svg.profile .t { fill: #9aa6b1; font: 10px var(--vp-mono); }
/* C2075: long status badges wrap inside the layer list instead of running out of the panel */
.lrow .pill { white-space: normal; text-align: center; max-width: 92px; line-height: 1.2; justify-self: end; }
/* C2075: the views bar adapts to the space it really has (not only to the window width) */
#vp-wrap.fit1 #vp-views .ctx, #vp-wrap.fit1 #vp-views .vsep { display: none; } #vp-wrap.fit1 #vp-views .more { display: flex; }
#vp-wrap.fit1 #vp-views .vtab { padding: 6px 7px; gap: 5px; font-size: 12px; }
#vp-wrap.fit2 #vp-views { display: none; } #vp-wrap.fit2 .vp-viewsel { display: inline-flex; margin-left: auto; }
.sc-h { margin: 12px 0 6px; font: 700 11px var(--vp-sans); letter-spacing: .6px; text-transform: uppercase; color: var(--mut); } .sc-src { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 12.5px; } .sc-src small { color: var(--mut); font-size: 11px; }
/* C2075 boreholes: correlation panel, plan map, strip log */
#vp-corr { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 52%; display: flex; flex-direction: column; z-index: 4; border: 1px solid var(--line); border-radius: 10px; background: rgba(15, 22, 28, .97); box-shadow: 0 10px 30px #0008; }
#vp-corr[hidden] { display: none; }
#vp-corr .corr-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(180px, 24%) 1fr; gap: 10px; padding: 8px 10px 10px; overflow: auto; }
#vp-corr .corr-plan, #vp-corr .corr-panel { min-width: 0; }
svg.bh-plan .bg { fill: #0e151c; stroke: var(--line); } svg.bh-plan circle.off { fill: #6b7785; cursor: pointer; } svg.bh-plan circle.on { fill: #2fd27a; stroke: #fff; stroke-width: 1; cursor: pointer; }
svg.bh-plan .tr { fill: none; stroke: #2fd27a; stroke-width: 1.5; stroke-dasharray: 4 3; } svg.bh-plan .sb { stroke: #cfd8e0; stroke-width: 2; }
svg.bh-corr, svg.bh-plan, svg.bh-strip { display: block; } svg.bh-corr .grid { stroke: #22303b; stroke-width: 1; } svg.bh-corr .ground { fill: none; stroke: #8fa3b3; stroke-width: 1; stroke-dasharray: 2 4; }
svg.bh-corr .col { fill: none; stroke: #cfd8e0; stroke-width: .8; } svg.bh-corr rect.iv { cursor: pointer; } svg.bh-corr rect.iv:hover { stroke: #fff; stroke-width: 1.2; }
svg .t { fill: #9aa6b1; font: 11px var(--vp-mono); } svg .t.id { fill: #e6edf3; font-weight: 700; } svg .t.n { fill: #e6edf3; font-weight: 700; }
svg.bh-strip { background: #0e151c; border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; }
@media (max-width: 760px) { #vp-corr { height: 70%; } #vp-corr .corr-body { grid-template-columns: 1fr; } }
svg .t.gap { fill: #7fb8d8; }
.lg-ctl { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0 4px; font-size: 12px; color: var(--mut); } .lg-ctl select { background: #121a22; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font-size: 12px; }
#vp-canvas #vp-inset { position: absolute; left: 12px; bottom: 12px; top: auto; right: auto; width: 184px !important; height: 184px !important; border-radius: 8px; box-shadow: 0 6px 18px #0009; cursor: crosshair; z-index: 3; background: #0e151c; image-rendering: auto; }
#vp-canvas #vp-inset[hidden] { display: none; }
#vp-wrap:not(.is-cloud) .cloud-only, #vp-wrap.is-cloud .img-only { display: none !important; }

/* C2075 gravity: interpolated pill, reduced-value badge */
.pill.interpolated { background: #10283a; color: #8fd3ff; }
.ev.der { background: #2b2414; color: #e9c98a; }

/* C2077 hypothesis exploration tab */
.hyp-banner { margin: 0 0 10px; padding: 8px 10px; border-radius: 6px; font-weight: 700; font-size: 12.5px; }
.hyp-banner.abs { background: #2b2414; color: #ffd98a; border: 1px solid #6b5520; }
.hyp-banner.ok { background: #0f3a22; color: #8ff0b8; border: 1px solid #1f6b40; }
.hyp-blk { border-left: 3px solid #39424d; padding: 2px 0 6px 10px; margin: 0 0 12px; }
.hyp-blk[data-ev="observed"] { border-left-color: #2fbf71; }
.hyp-blk[data-ev="inferred"] { border-left-color: #d9a441; }
.hyp-blk h4 { margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hyp-cls { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.hyp-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 4px; vertical-align: -1px; }
.hyp-tw { overflow-x: auto; }
.hyp-t { border-collapse: collapse; font-size: 11.5px; width: 100%; }
.hyp-t th, .hyp-t td { padding: 4px 5px; border-bottom: 1px solid #26303a; text-align: start; vertical-align: top; }
.hyp-t td:nth-child(2), .hyp-t td:nth-child(3), .hyp-t td:nth-child(4) { font-family: var(--vp-mono); white-space: nowrap; }
.hyp-t tr.hyp-ref td { color: #a9b6c2; }
.hyp-ok { color: #6ff0a8; } .hyp-abs { color: #ffd166; }
.hyp-cmp { max-width: 340px; display: block; margin: 6px 0; }
.hyp-cmp .t { fill: #b8c4cf; font-size: 9px; }
.hyp-alt select { margin-inline-start: 6px; max-width: 100%; }

/* C2077 HIDE NAV on the public page: the collapsed header takes no room (it kept a 57 px row before, so the viewer
   never grew), the viewer fills the window (--vp-head is 0, set by the page), and SHOW NAV floats in the corner,
   compact, inside the safe area, in a slot the dashboard's top bar leaves free for it (--vp-show-w is the button's measured
   width, set by vse-public-nav.js: languages differ), so it covers no control. The burger menu is capped so it never hides the whole viewer, and scrolls inside. */
body.vse-public.nav-collapsed .site-header { height: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; overflow: visible !important; }
body.vse-public.nav-collapsed #vp-wrap { margin-top: 0; height: 100vh; height: 100dvh; }
body.vse-public.nav-collapsed .site-header #gnav-hide { position: fixed; z-index: 1150; top: calc(6px + env(safe-area-inset-top, 0px)); inset-inline-start: calc(6px + env(safe-area-inset-left, 0px));
  height: 28px; margin: 0; padding: 0 9px; font-size: 10px; background: rgba(9, 14, 19, .86); box-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
body.vse-public.nav-collapsed #vp-top { padding-inline-start: calc(var(--vp-show-w, 96px) + 14px + env(safe-area-inset-left, 0px)); }
/* narrow screens: the button takes the brand's place (the brand link comes back with the navigation), so the top bar
   keeps a single row and the viewer keeps the whole gain */
@media (max-width: 760px) { body.vse-public.nav-collapsed #vp-top { padding-inline-start: 8px; }
  body.vse-public.nav-collapsed #vp-top .vp-brand { display: none; }
  body.vse-public.nav-collapsed #vp-top .vp-asset { margin-inline-start: calc(var(--vp-show-w, 96px) + 4px + env(safe-area-inset-left, 0px)); } }
body.vse-public .gnav-panel { max-height: calc(100dvh - var(--gea-header-h, 56px) - 120px); overflow-y: auto; overscroll-behavior: contain; }
body.vse-public .gnav-panel .gnav-vse-hide { display: block; width: 100%; text-align: start; padding: 12px 22px; background: rgba(53, 214, 160, .06); border: 0;
  border-bottom: 1px solid rgba(31, 39, 49, .5); color: #35d6a0; font: 600 12px/1.2 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
/* C2077: the skip link waits off-screen at left:-9999px (site stylesheet). In right-to-left pages content beyond the left
   edge is scrollable, so on this page (ar, he) phones widened the layout to ~1560 px and the header fell into its
   desktop row. Here it waits clipped in place instead; on focus it shows as before. */
body.vse-public .skip-link:not(:focus) { left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* C2093: external maps block (gea-extmaps.js) in the scene card */
.vp-ext .ext-maps { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.vp-ext .ext-title { font: 700 11px/1 var(--vp-mono, monospace); letter-spacing: 1px; text-transform: uppercase; color: var(--mut); margin-bottom: 8px; }
.vp-ext .ext-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.vp-ext .ext-btn { font: 600 12px/1 var(--vp-sans); color: var(--ink); background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; cursor: pointer; text-decoration: none; }
.vp-ext .ext-btn:hover, .vp-ext .ext-btn:focus-visible { color: var(--acc); border-color: var(--acc); }
.vp-ext .ext-note { font-size: 11px; color: var(--mut); margin-top: 7px; }

/* C2115: floating legend + DeepVision panel + hole Quality and tabs */
#vp-legend-wrap.vp-float { position: absolute; left: 10px; bottom: 10px; width: min(300px, 44%); max-height: 46%; z-index: 6; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--vp-bg) 92%, transparent); }
#vp-legend-wrap.vp-float.min { width: auto; max-height: none; overflow: hidden; }
#vp-legend-wrap.vp-float.min .vp-body { display: none; }
#vp-dv-panel { position: absolute; right: 10px; top: 10px; width: min(340px, 60%); max-height: calc(100% - 20px); overflow: auto; z-index: 7; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--vp-bg) 95%, transparent); padding-bottom: 8px; }
#vp-dv-panel[hidden] { display: none; }
#vp-dv-panel.vp-dv-min .vp-body { display: none; }   /* C2215: minimised to its title bar */
#vs-panel .vs-ana-list .vl-row { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
#vs-panel .vs-ana-list .vl-row > label { flex: 1 1 auto; min-width: 0; }   /* C2215: one line per layer in the Analyse panel */
#vp-dv-panel .sec-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
#vp-dv-panel .vp-body { padding: 8px 12px; font-size: 12.5px; }
#vp-dv-panel h4 { margin: 10px 0 3px; font-size: 11.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--mut); }
#vp-dv-panel p { margin: 3px 0; }
.q-badge { display: inline-block; padding: 1px 6px; border-radius: 9px; border: 2px solid var(--q); font: 700 11px var(--vp-mono); vertical-align: middle; }
.q-ring { display: inline-block; width: 12px !important; height: 12px !important; border-radius: 50%; border: 3px solid var(--q); background: transparent !important; box-sizing: border-box; }
.hole-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin: 6px 0 8px; }
.hole-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--mut); font: 600 11.5px var(--vp-sans); padding: 5px 6px; cursor: pointer; }
.hole-tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--acc); }
@media (max-width: 760px) { #vp-dv-panel { left: 8px; right: 8px; width: auto; top: 8px; max-height: 60%; } }

/* C2115.1 quality components */
.q-st{font-size:.82em;padding:0 .4em;border-radius:3px;border:1px solid currentColor}.q-st-ok{color:#5fd38d}.q-st-part{color:#f0c040}.q-st-unk{color:#a8adb5}
/* C2118.2: native white scrollbars on Windows looked like a page margin beside panels and legends */
.vp, .vp *, body { scrollbar-width: thin; scrollbar-color: #4a5664 transparent; }
.vp ::-webkit-scrollbar, body ::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
.vp ::-webkit-scrollbar-thumb, body ::-webkit-scrollbar-thumb { background: #4a5664; border-radius: 4px; }
.vp ::-webkit-scrollbar-track, body ::-webkit-scrollbar-track { background: transparent; }

/* C2135 Reset view: circular-arrow icon before the label */
#vp-reset { display: inline-flex; align-items: center; gap: 5px; }
#vp-reset svg { flex: none; }
/* C2135 commodity line under the asset name: one line, ellipsis (full text + source in the title), never wider than the header */
#vp-asset-com { font: 600 11px var(--vp-sans); color: var(--acc, #2bd98c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* C2146: surface modes (3D buildings and trees) beside the view tabs */
#vp-surfbar { display: flex; align-items: stretch; gap: 2px; padding: 3px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; flex: none; }
#vp-surfbar[hidden] { display: none; }
#vp-surfbar button { background: transparent; border: 0; border-radius: 7px; color: var(--ink); padding: 6px 9px; font: 600 12.5px/1 var(--vp-sans); white-space: nowrap; cursor: pointer; }
#vp-surfbar button[aria-pressed="true"] { background: var(--acc, #2e7d4f); color: #fff; }
#vp-surfbar #vp-surfgo { color: var(--ok, #4ade80); font-weight: 600; text-decoration: underline dotted; }
@media (max-width: 760px) { #vp-surfbar button { padding: 5px 6px; font-size: 11.5px; } #vp-surfbar #vp-surfgo { display: none; } }
@media (min-width: 761px) { #vp-views { flex-shrink: 0; margin: 0 6px 0 auto; } #vp-surfbar { margin-right: auto; } }
@media (max-width: 1919px) and (min-width: 761px) { #vp-surfbar #vp-surfgo { display: none; } }

/* C2149: older investigation notice */
#vp-oldjob{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:1001;max-width:min(92%,720px);background:#3a2a05;color:#ffe9b0;border:1px solid #e0a106;border-radius:8px;padding:8px 36px 8px 12px;font-size:13px;line-height:1.35;box-shadow:0 4px 18px rgba(0,0,0,.5)}
#vp-oldjob a{color:#fff;font-weight:700;text-decoration:underline;white-space:nowrap}
#vp-oldjob button{position:absolute;top:4px;right:6px;background:none;border:0;color:#ffe9b0;font-size:18px;cursor:pointer;line-height:1}

/* C2149: scale class of a layer */
.vl-scale{flex:0 0 auto;font-size:9.5px;font-weight:700;letter-spacing:.03em;padding:1px 5px;border-radius:4px;margin-left:4px;border:1px solid currentColor;white-space:nowrap}
.vl-scale.s-local{color:#5fe08a}.vl-scale.s-env{color:#7cc4ff}.vl-scale.s-regional{color:#c9a7ff}.vl-scale.s-na{color:#8b96a5}.vl-scale.s-blocked{color:#ffb35c}

/* C2149: failure notice (never a silent black screen) */
#vp-fail{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);z-index:40;max-width:min(90%,420px);background:#141a22;color:#e8eef5;border:1px solid #e0a106;border-radius:10px;padding:14px 16px;text-align:center;box-shadow:0 8px 30px rgba(0,0,0,.6)}
#vp-fail b{display:block;font-size:14px;margin-bottom:6px}#vp-fail small{display:block;opacity:.75;font-size:11px;margin-bottom:8px;word-break:break-word}
#vp-fail div{display:flex;gap:8px;justify-content:center}#vp-fail button{background:#1f2a36;color:#fff;border:1px solid #3a4a5c;border-radius:6px;padding:6px 12px;cursor:pointer;font-weight:600}

/* C2149: per-family go-to buttons: full text on wide screens, icon + count when the bar is tight */
#vp-surfgo-b .sg-ic,#vp-surfgo-t .sg-ic,#vp-surfgo-b .sg-n,#vp-surfgo-t .sg-n{display:none}
#vp-surfgo-t .sg-ic{color:#5fbf6a}
@media (max-width:1919px){#vp-surfgo-b .sg-full,#vp-surfgo-t .sg-full{display:none}#vp-surfgo-b .sg-ic,#vp-surfgo-t .sg-ic,#vp-surfgo-b .sg-n,#vp-surfgo-t .sg-n{display:inline}#vp-surfgo-b .sg-n,#vp-surfgo-t .sg-n{margin-left:3px}}
/* C2149: between phone and wide desktop the top bar wraps instead of squeezing the scene picker to zero */
@media (max-width: 1180px) and (min-width: 761px) { #vp-top { flex-wrap: wrap; row-gap: 6px; } .vp-asset { min-width: 160px; flex: 0 0 auto; } }

/* C2150.1 */ .hc-vert{border-left:3px solid #e0a526;padding:4px 8px;margin:6px 0;font-size:12px;line-height:1.4} .hc-ug{border-left:3px solid #b0bec5;padding:4px 8px;font-size:12px}

/* C2154 Evidence Compass v2: clickable traffic-light rows */
ul.c22 details.c22-row > summary { cursor: pointer; list-style: none; }
ul.c22 details.c22-row > summary::-webkit-details-marker { display: none; }
ul.c22 details.c22-row > summary::after { content: " ▸"; opacity: .6; }
ul.c22 details.c22-row[open] > summary::after { content: " ▾"; }
ul.c22 details.c22-row > summary:focus-visible { outline: 2px solid #2bd98c; outline-offset: 2px; border-radius: 4px; }
ul.c22 .c22-why { margin: 6px 0 2px 16px; padding: 6px 8px; border-left: 2px solid rgba(43,217,140,.35); background: rgba(255,255,255,.03); border-radius: 0 6px 6px 0; }
.c22-tap { margin: 2px 0 4px; }
/* C2156 universal Quality (vse-quality-u.js) */
.qu-strip-box{margin:6px 0 10px}.qu-strip-h{font-size:12px;font-weight:600;margin:0 0 4px;color:#cfd8dc}
.qu-strip-h.nogeo{color:#ffcc80;border-left:3px solid #ef6c00;padding-left:6px}
.qu-strip{background:#0d1114;border:1px solid #2a3138;border-radius:8px;max-height:560px}
.qu-orig{font-size:11px;margin:4px 0 0;display:flex;flex-wrap:wrap;gap:8px}.qu-o i,.qu-ctl i.sw{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px;vertical-align:middle}
.qu-ctl{display:flex;flex-direction:column;gap:6px;margin:6px 0}.qu-ctl label{display:flex;gap:6px;align-items:center;font-size:12px}.qu-ctl select,.qu-ctl input[type=range]{flex:1;min-width:0}
.qu-prod{display:flex;flex-wrap:wrap;gap:4px}.qu-prod button{flex:1 1 auto;font-size:11.5px;padding:4px 6px;border:1px solid #3a4450;background:#161b20;color:#dfe6ea;border-radius:6px;cursor:pointer}
.qu-prod button.on{background:#1f6f43;border-color:#2e9e5b;color:#fff}
.qu-ramp{height:10px;border-radius:5px;margin:6px 0 2px}
.ev.est{background:#4a2459;color:#f3e5f5}
/* C2156 view menu next to Reset view */
.vp-viewmenu{position:relative;display:inline-flex}#vp-viewmore{padding-inline:7px;min-width:32px}
#vp-viewmenu{position:absolute;top:calc(100% + 4px);right:0;z-index:60;display:flex;flex-direction:column;min-width:200px;background:#11161a;border:1px solid #2e3a44;border-radius:10px;padding:4px;box-shadow:0 8px 24px #0009}
#vp-viewmenu[hidden]{display:none}#vp-viewmenu button{all:unset;cursor:pointer;padding:9px 12px;border-radius:7px;font-size:13px;color:#e6edf2;min-height:24px}
#vp-viewmenu button:hover,#vp-viewmenu button:focus-visible{background:#1f2b33;outline:2px solid #2e9e5b}#vp-viewmenu button:disabled{opacity:.4;cursor:default}

/* C2157: six sections over the layer panel (3 x 2 on every width; the panel never scrolls sideways) */
#vp-sec6{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:6px 8px 4px;border-bottom:1px solid var(--line);background:var(--panel2)}
#vp-sec6 button{display:flex;align-items:center;justify-content:space-between;gap:3px;min-height:34px;padding:4px 5px;border-radius:7px;border:1px solid #ffffff1f;background:#ffffff08;color:#c9d6e2;font:600 11px/1.15 system-ui,sans-serif;text-align:start;cursor:pointer;min-width:0}
#vp-sec6 button span{overflow:hidden;overflow-wrap:anywhere;hyphens:auto;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#vp-sec6 button small{flex:0 0 auto;font:600 9.5px/1 ui-monospace,monospace;color:#9fb0bf;background:#ffffff12;border-radius:6px;padding:2px 3px}
#vp-sec6 button[aria-selected="true"]{color:#e8fff1;border-color:#22c55e;background:#22c55e22}
#vp-sec6 button:focus-visible{outline:2px solid #4ade80;outline-offset:1px}
#vp-sec6 .sec6-all{grid-column:1/-1;justify-content:center;min-height:26px;font-weight:500;opacity:.8}
#vp-sec6 .sec6-all[aria-pressed="true"]{opacity:1;color:#e8fff1;border-color:#22c55e;background:#22c55e22}
.vp-explore #vp-sec6 .sec6-all{display:none}
#vp-sec6-x{padding:6px 8px 2px}
#vp-sec6-x .sec6-note{margin:4px 0;font-size:12px;color:#9fb0bf}
#vp-sec6-x .sec6-act{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
#vp-sec6-x h3{margin:4px 0;font-size:14px}#vp-sec6-x h4{margin:10px 0 4px;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:#86efac}
#vp-sec6-x .sec6-src{margin:0;padding-inline-start:16px;font-size:12px;line-height:1.45}
#vp-sec6-x .sec6-src a{color:#86efac}
#vp-left:not([data-sec6="models"]):not([data-sec6="all"]) #vp-block-tools{display:none}

/* C2157: hole search (Holes & Quality) */
#vp-sec6-x details.hs{border:1px solid var(--line);border-radius:8px;padding:6px 8px;margin:2px 0 6px}
#vp-sec6-x details.hs>summary{cursor:pointer;font-weight:600;font-size:12.5px}
#vp-sec6-x .hs-q{width:100%;box-sizing:border-box;margin:6px 0 4px;padding:6px 8px;border-radius:6px;border:1px solid var(--line);background:#0006;color:inherit}
#vp-sec6-x .hs-f{display:grid;grid-template-columns:1fr;gap:4px}
#vp-sec6-x .hs-f label{display:grid;grid-template-columns:minmax(0,9.5em) minmax(0,1fr);align-items:center;gap:6px;font-size:11.5px}
#vp-sec6-x .hs-f select,#vp-sec6-x .hs-f input{min-width:0;width:100%;box-sizing:border-box;padding:3px 5px;border-radius:5px;border:1px solid var(--line);background:#0006;color:inherit;font-size:11.5px}
#vp-sec6-x .hs-rng{display:flex;gap:4px}
#vp-sec6-x .hs-n{margin:6px 0 2px;font-size:11.5px;color:#9fb0bf}
#vp-sec6-x .hs-r{list-style:none;margin:0;padding:0;max-height:220px;overflow:auto;border-top:1px solid var(--line)}
#vp-sec6-x .hs-r li{display:flex;flex-direction:column;gap:1px;padding:5px 4px;border-bottom:1px solid #ffffff10;cursor:pointer;font-size:12px}
#vp-sec6-x .hs-r li span{font-size:11px;color:#9fb0bf}
#vp-sec6-x .hs-r li:hover,#vp-sec6-x .hs-r li:focus-visible{background:#22c55e1f;outline:none}
/* C2157: on a phone the floating music button sat over the open Layers drawer (it covered filter labels); it steps aside while the
   drawer is open (the music keeps playing) and comes back when the drawer closes */

/* C2157: "Rendering..." capsule (real tile/terrain loading only) */
#vp-rendering{position:absolute;top:12px;left:50%;transform:translateX(-50%);z-index:6;display:flex;align-items:center;gap:8px;padding:5px 13px 5px 10px;border-radius:999px;
  background:rgba(6,12,10,.8);border:1px solid rgba(34,197,94,.55);color:#dcfce7;font:600 12px/1.2 system-ui,sans-serif;letter-spacing:.02em;pointer-events:none;box-shadow:0 4px 18px #0008}
#vp-rendering[hidden]{display:none}
#vp-rendering i{width:11px;height:11px;border-radius:50%;border:2px solid #22c55e55;border-top-color:#4ade80;animation:vpRndSpin .9s linear infinite}
@keyframes vpRndSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){#vp-rendering i{animation:none;border-color:#4ade80}}
/* C2157: once the scene is ready the loading card only lingers to show the time; it no longer swallows taps on Reset / the view menu
   underneath it on a phone (measured: 5 phone runs had Reset covered for ~1 s after the scene was ready) */
#vse-load.ready, #vse-load.ready * { pointer-events: none !important; }
/* C2158: parcel evidence by family (Report section) */
#vp-sec6-x table.pev { width: 100%; border-collapse: collapse; font-size: 11px; color: #c9d6e2; margin: 4px 0 6px; }
#vp-sec6-x table.pev th, #vp-sec6-x table.pev td { padding: 3px 4px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: right; }
#vp-sec6-x table.pev tbody th { text-align: start; font-weight: 600; }
#vp-sec6-x table.pev thead th { font-weight: 500; color: #9fb0bf; font-size: 10px; }
#vp-sec6-x table.pev td.z { color: #6f7d8a; }
/* C2158: the top bar never pushes a control off-screen (parcel scenes add the surface bar): when the row does not fit it wraps; the header
   row of #vp-wrap is "auto", so the 3D view simply starts lower. Reset, Export and full screen stay reachable at every width. */
#vp-top { flex-wrap: wrap; row-gap: 6px; }
/* C2158: asset names are Latin text; in Arabic/Hebrew the closed selector clipped their START ("ela 30024A…"). plaintext lets the name keep
   its own direction, so a long name is cut at its end as in every other language. */
#vp-asset { unicode-bidi: plaintext; text-overflow: ellipsis; }

/* C2160: Scientific Dossier (PDF) button + menu; icon only on phones, like Reset view */
#vp-pdf{display:inline-flex;align-items:center;gap:5px}#vp-pdf svg{flex:none}.vp-pdfwrap{position:relative;display:inline-flex}
#vp-pdfmenu{position:absolute;top:calc(100% + 4px);right:0;z-index:61;display:flex;flex-direction:column;width:min(340px,calc(100vw - 24px));max-height:70vh;overflow:auto;background:#11161a;border:1px solid #2e3a44;border-radius:10px;padding:6px;box-shadow:0 8px 24px #0009;color:#e6edf2;font-size:13px}
#vp-pdfmenu[hidden]{display:none}#vp-pdfmenu h4{margin:4px 8px 6px;font-size:13px;color:#7fe0a8}#vp-pdfmenu p{margin:4px 8px 8px;color:#a9b6c0;font-size:12px;line-height:1.4}
#vp-pdfmenu a,#vp-pdfmenu button{all:unset;box-sizing:border-box;cursor:pointer;display:flex;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:7px;min-height:24px;color:#e6edf2}
#vp-pdfmenu a small,#vp-pdfmenu button small{color:#8a99a6;white-space:nowrap}#vp-pdfmenu a:hover,#vp-pdfmenu a:focus-visible,#vp-pdfmenu button:hover,#vp-pdfmenu button:focus-visible{background:#1f2b33;outline:2px solid #2e9e5b}
#vp-pdfmenu .vp-pdfsel{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:2px 8px 8px;color:#a9b6c0;font-size:12px}
#vp-pdfmenu .vp-pdfsel select{flex:1;max-width:60%;min-height:32px;background:#1a2228;color:#e6edf2;border:1px solid #2e3a44;border-radius:7px;padding:4px 8px;font-size:13px}#vp-pdfmenu .vp-pdfsel select:focus-visible{outline:2px solid #2e9e5b}
@media (max-width:760px){.vp-actions #vp-pdf span{display:none}.vp-actions #vp-pdf{padding-inline:8px}#vp-pdfmenu{position:fixed;top:56px;right:12px;left:12px;width:auto}}
/* C2160: exaggeration state + quick presets */
label.rng output#vp-vex-v[data-state="ex"]{color:#f0b35a}label.rng output#vp-vex-v[data-state="fl"]{color:#8fb8ff}label.rng output#vp-vex-v[data-state="real"]{color:#7fe0a8}
.vp-vexq{display:flex;gap:6px;margin:4px 0 8px}.vp-vexq button{flex:1;min-height:28px;font-size:12px}.vp-vexq button[aria-pressed="true"]{outline:1px solid #2e9e5b;background:#16301f}
/* C2161 GAIA Visual Intelligence Dashboard: black panel, GeaSpirit accents, one column on phones */
#vp-dash-panel { position: absolute; left: 10px; top: 10px; width: min(520px, calc(100% - 20px)); max-height: calc(100% - 20px); overflow: auto; z-index: 8; border: 1px solid #2a2f3a; border-radius: 10px; background: #050608; color: #e8ecf2; box-shadow: 0 10px 34px rgba(0,0,0,.55); }
#vp-dash-panel[hidden] { display: none; }
#vp-dash-panel .sec-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid #222833; position: sticky; top: 0; background: #050608; z-index: 1; }
#vp-dash-panel .sec-head h2 { font-size: 15px; margin: 0; }
#vp-dash-panel .vp-body { padding: 8px 12px 12px; font-size: 12.5px; line-height: 1.45; }
#vp-dash-panel h4 { margin: 12px 0 6px; font-size: 13.5px; }
#vp-dash-panel h5 { margin: 0 0 4px; font-size: 13px; }
.vd-tabs { display: flex; gap: 4px; }
.vd-tabs .tool { flex: 1 1 0; }
.vd-tabs .tool[aria-selected="true"] { border-color: var(--acc, #d9a441); color: #fff; background: rgba(217,164,65,.14); }
.vd-cards { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 900px) { #vp-dash-panel { width: min(640px, calc(100% - 20px)); } .vd-cards { grid-template-columns: 1fr 1fr; } }
.vd-card { border: 1px solid #222833; border-radius: 9px; background: #0b0d11; padding: 8px 10px; min-width: 0; }
.vd-card ul, .vd-rec, .vd-next, .vd-ll { margin: 2px 0 6px; padding-inline-start: 16px; }
.vd-card li, .vd-ll li { margin: 2px 0; overflow-wrap: anywhere; }
.vd-q { margin: 6px 0 0; font-weight: 600; color: #cfd6e1; }
.vd-0 { margin: 2px 0; color: #8a93a3; }
.vd-met header { display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; }
.vd-val { font-size: 20px; font-weight: 700; margin: 4px 0; } .vd-val small { font-size: 11px; font-weight: 400; color: #9aa3b2; }
.vd-chip { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 9px; background: #1d2330; color: #e8ecf2; white-space: nowrap; }
.vd-chip.ext { background: #39404f; } .vd-chip.loc { background: #1f6b4a; } .vd-chip.q { background: #24425f; } .vd-chip.l { background: #3a3340; }
.vd-svg { width: 100%; max-width: 420px; height: auto; display: block; margin: 4px 0; direction: ltr; }
.vd-ax { font: 12px system-ui, sans-serif; fill: #d6dbe4; } .vd-ill { font: italic 11px system-ui, sans-serif; fill: #9aa3b2; }
.vd-lk { background: none; border: 0; padding: 0; color: #7fc4ff; text-decoration: underline; cursor: pointer; font: inherit; text-align: start; }
.vd-lk:focus-visible, .vd-seg:focus-visible { outline: 2px solid #ffd23f; outline-offset: 2px; }
.vd-qrow { margin: 8px 0 10px; } .vd-qh { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; } .vd-qh small { color: #9aa3b2; }
.vd-stack { display: flex; gap: 2px; height: 16px; margin: 4px 0 2px; }
.vd-seg { border: 0; border-radius: 4px; min-width: 6px; cursor: pointer; padding: 0; }
.vd-seg[aria-pressed="true"] { outline: 2px solid #fff; outline-offset: 1px; }
.vd-leg { margin: 0; color: #aab3c2; font-size: 11.5px; }
.vd-list { border-inline-start: 2px solid #2a3140; padding-inline-start: 8px; margin-top: 4px; }
.vd-dl { display: grid; grid-template-columns: max-content 1fr; gap: 1px 8px; margin: 3px 0; font-size: 11.5px; } .vd-dl dt { color: #9aa3b2; } .vd-dl dd { margin: 0; overflow-wrap: anywhere; }
.vd-bars { display: grid; gap: 6px; } .vd-bar { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; } .vd-bar b { font-weight: 400; color: #aab3c2; }
.vd-bar i { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: #1d2330; display: block; overflow: hidden; } .vd-bar em { display: block; height: 100%; border-radius: 4px; }
.vd-syn { background: #3a2f12; border: 1px solid #6b5520; border-radius: 6px; padding: 6px 8px; }
.vd-rule { color: #8a93a3; font-size: 11px; margin-top: 10px; }
.vd-inv summary { cursor: pointer; margin: 4px 0; } .vd-inv ul { padding-inline-start: 14px; }
.vl-row.vd-flash { outline: 2px solid #ffd23f; border-radius: 4px; transition: outline-color .4s; }
@media (max-width: 760px) { #vp-dash-panel { position: fixed; z-index: 60; inset: auto 6px 6px 6px; top: 56px; width: auto; max-height: none; } #vp-dash span[data-t] { display: none; } }
.vp-invd { display: block; color: #9aa3b2; overflow-wrap: anywhere; } .vp-inv li { margin: 3px 0 5px; }

[dir="rtl"] #vp-pdfmenu{right:auto;left:0}   /* C2160: RTL toolbar puts the button near the left edge: open towards the page */
/* C2162 view selector + Google 3D host (picture only; the card replaces it when unavailable) */
#vp-viewer { display: flex; gap: 2px; border: 1px solid #2c3646; border-radius: 8px; padding: 2px; }
#vp-viewer[hidden] { display: none; }
#vp-viewer button { all: unset; cursor: pointer; padding: 4px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; color: #cfd6e1; }
#vp-viewer button[aria-pressed="true"] { background: rgba(47,210,122,.16); color: #fff; box-shadow: inset 0 0 0 1px #2fd27a; }
#vp-viewer button:focus-visible { outline: 2px solid #2fd27a; }
#vp-viewer button:disabled { opacity: .45; cursor: not-allowed; }
#vp-g3d { position: absolute; inset: 0; z-index: 25; background: #050608; display: flex; flex-direction: column; }
#vp-g3d[hidden] { display: none; }
#vp-g3d[data-mode="card"], #vp-g3d[data-mode="wait"] { background: rgba(5, 6, 8, .22); pointer-events: none; }   /* C2163: the HD scene stays visible behind the notice, never a black screen */
#vp-g3d[data-mode="card"] .g3d-card { pointer-events: auto; box-shadow: 0 10px 34px rgba(0, 0, 0, .6); }
#vp-g3d .g3d-map { flex: 1 1 auto; width: 100%; min-height: 0; display: block; }
#vp-g3d .g3d-bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 10px; font-size: 12px; color: #cfd6e1; background: #0b0d11; border-bottom: 1px solid #222833; }
#vp-g3d .g3d-wait { margin: auto; color: #8a93a3; }
#vp-g3d .g3d-card { margin: auto; max-width: min(460px, calc(100% - 32px)); background: #0b0d11; border: 1px solid #2c3646; border-radius: 12px; padding: 18px 20px; color: #e6edf2; text-align: center; }
#vp-g3d .g3d-card h3 { margin: 0 0 8px; font-size: 16px; color: #ffd34d; }
#vp-g3d .g3d-card p { margin: 6px 0; font-size: 13px; line-height: 1.45; }
#vp-g3d .g3d-card .g3d-note { color: #8a93a3; font-size: 12px; }
#vp-g3d .g3d-card button { margin-top: 8px; }
@media (max-width: 700px) { #vp-viewer { order: 9; width: 100%; } #vp-viewer button { flex: 1 1 0; text-align: center; padding: 6px 4px; font-size: 11.5px; } }
/* C2162 science catalogue (dashboard mode 4) */
.sc-st { display: inline-block; font-size: 10.5px; line-height: 1.3; padding: 1px 6px; border-radius: 9px; color: #fff; font-weight: 600; white-space: normal; }
.sc-sum { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin: 4px 0 8px; font-size: 12px; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sc-fam ul { list-style: none; padding: 0; }
.sc-fam li { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.sc-card { margin-top: 10px; border-color: #3a4a63; }
.sc-dl { margin: 4px 0 8px; font-size: 12px; } .sc-dl dt { font-weight: 600; margin-top: 4px; } .sc-dl dd { margin: 0; }
.sc-nomag { border-inline-start: 3px solid #8a5a52; padding: 4px 8px; background: #1a1214; font-size: 12.5px; margin: 0 0 8px; }
[data-scp][aria-pressed="true"] { text-decoration: underline; font-weight: 700; }
.sc-fam li .sc-st { flex: 0 0 auto; white-space: nowrap; } .sc-fam li .vd-lk { min-width: 0; }
/* C2162: universal visual legend (exact colour, class, value, ha, % of the parcel); compact so it never covers the investigated surface */
#vp-legend-wrap.vp-float { width: min(280px, 40%); max-height: 38%; }
.lgu { display: flex; flex-direction: column; gap: 1px; }
.lgu-row { display: grid; grid-template-columns: 14px 1fr auto; grid-template-rows: auto auto; column-gap: 7px; align-items: center; width: 100%; text-align: start;
  background: none; border: 1px solid transparent; border-radius: 5px; padding: 3px 4px; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.lgu-row:disabled { cursor: default; opacity: 1; }
.lgu-row:not(:disabled):hover, .lgu-row:focus-visible { border-color: var(--line, #2c3646); }
.lgu-row.on { border-color: var(--acc, #2fd27a); background: rgba(47, 210, 122, 0.08); }
.lgu-sw { width: 14px; height: 14px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); background-image: none; }
.lgu-sw.ln { height: 0; border-top: 3px solid; border-radius: 0; box-shadow: none; }
.lgu-sw.ln.dash { border-top-style: dashed; }
.lgu-l { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.lgu-l small { color: var(--mut); }
.lgu-n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lgu-n small { display: block; color: var(--mut); font-size: 10.5px; }
.lgu-bar { grid-column: 2 / 4; height: 3px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; overflow: hidden; margin-top: 2px; }
.lgu-bar i { display: block; height: 100%; background: var(--mut, #8a96a8); }
.lgu-hint, .lgu-meta { margin: 6px 0 0; color: var(--mut); font-size: 11px; line-height: 1.3; }
.lgu-more { margin-top: 4px; font-size: 11px; } .lgu-more summary { cursor: pointer; color: var(--mut); }
.lgu-act { margin: 6px 0 0; } .lgu-act .tool { font-size: 11px; padding: 3px 8px; height: auto; }
@media (max-width: 760px) { #vp-legend-wrap { max-height: 34vh; } .lgu-row { font-size: 11.5px; } }
/* C2162: the legend sits beside the orthophoto inset and above its caption, never on top of either */
#vp-main:has(#vp-inset:not([hidden])) #vp-legend-wrap.vp-float { left: 206px; bottom: 34px; }
@media (max-width: 1100px) { #vp-main:has(#vp-inset:not([hidden])) #vp-legend-wrap.vp-float { width: min(260px, calc(100% - 226px)); } }

/* ---------- C2163: compact top block, readable section tabs (no word split), more room for the 3D view ---------- */
@media (min-width:901px){
  #vp-top .vp-asset{display:grid;grid-template-columns:minmax(150px,max-content) auto auto;grid-template-areas:"sel cat guide" "com sub sub";column-gap:6px;row-gap:0;align-items:center;min-width:0;max-width:min(640px,48vw)}
  #vp-top #vp-asset{grid-area:sel;max-width:min(380px,30vw);min-width:0;text-overflow:ellipsis}
  #vp-top #vp-asset-com{grid-area:com;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  #vp-top #vp-asset-sub{grid-area:sub;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  #vp-top #vp-cat-btn{grid-area:cat;width:auto;min-height:0;height:28px;padding:2px 10px;margin:0}
  #vp-top #vp-guide-btn{grid-area:guide;width:auto;min-height:0;height:28px;padding:2px 10px;margin:0}
}
#vp-sec6{grid-template-columns:repeat(2,minmax(0,1fr))}
#vp-sec6 button span{overflow-wrap:normal;word-break:normal;hyphens:manual;-webkit-hyphens:manual}
#vp-layer-list .vl-row{grid-template-columns:minmax(0,1fr) auto auto auto}   /* C2163: name · scope · state · i on one line (the i used to wrap to its own row) */
/* C2163 phone: the header used ~265 px of an 844 px screen; compact asset block, one scrollable row per control group */
@media (max-width:900px){
  #vp-top .vp-brand{display:none}
  #vp-top .vp-asset{display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"sel sel sel" "com cat guide";column-gap:6px;row-gap:2px;align-items:center;flex:1 1 100%;width:100%;max-width:none;min-width:0}
  #vp-top #vp-asset{grid-area:sel;max-width:100%;min-width:0}
  #vp-top #vp-asset-com{grid-area:com;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  #vp-top #vp-asset-sub{display:none}
  #vp-top #vp-cat-btn{grid-area:cat;width:auto;min-height:0;height:30px;padding:2px 8px;margin:0}
  #vp-top #vp-guide-btn{grid-area:guide;width:auto;min-height:0;height:30px;padding:2px 8px;margin:0;white-space:nowrap}
  #vp-top #vp-surfbar,#vp-top .vp-actions,#vp-top #vp-viewer,#vs-modes{flex-wrap:nowrap!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;max-width:100%;-webkit-overflow-scrolling:touch}
  #vp-top #vp-surfbar::-webkit-scrollbar,#vp-top .vp-actions::-webkit-scrollbar,#vp-top #vp-viewer::-webkit-scrollbar,#vs-modes::-webkit-scrollbar{display:none}
  #vp-top #vp-surfbar>*,#vp-top .vp-actions>*,#vs-modes>*{flex:0 0 auto}
}
#vp-viewer button.vw-na{color:#8b98a5;font-weight:500;text-decoration:none;opacity:.85}   /* C2163: Google 3D not available, shown before any click */
#vp-gaia-back{display:inline-flex;align-items:center;height:28px;padding:2px 10px;margin-inline-end:8px;border:1px solid #22c55e;border-radius:8px;color:#bbf7d0;background:#22c55e1a;font:600 12.5px/1 system-ui,sans-serif;text-decoration:none;white-space:nowrap;flex:0 0 auto}   /* C2163 */
#vp-gaia-back:hover,#vp-gaia-back:focus-visible{background:#22c55e33;color:#fff}
#vp-top .vp-asset #vp-views-asset{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin-top:3px;min-width:0}   /* C2163: the views of one asset on their own row */

/* C2177q: one sound button inside the 3D view (never hidden by a panel, also in full screen); phones get a clear 4-action bar
   (Explore · Dates · Layers · Analyse): every other tool opens from "Analyse", the 3D model keeps the screen */
#vp-main > #gea-bgm-toggle { position: absolute; top: 52px; right: 10px; left: auto; bottom: auto; z-index: 6; width: 40px; height: 40px; display: grid; place-items: center; }
#vp-wrap.vp-imm #vp-main > #gea-bgm-toggle { display: grid !important; top: calc(10px + env(safe-area-inset-top)); right: calc(148px + env(safe-area-inset-right)); width: 38px; height: 38px; z-index: 4; }
.mob-act { display: none; }
#vp-mob-note { display: none; }
@media (max-width: 600px) {
  #vp-main > #gea-bgm-toggle { top: 8px; right: 8px; width: 44px; height: 44px; }
  #vs-modes { display: none !important; }
  #vp-viewer.g3d-off { display: none !important; }
  #vp-viewmore, #vp-fs { display: none !important; }   /* camera presets and full screen are in the navigation dock */
  #vp-hud { bottom: 100px !important; }
  #vp-wrap.left-open .vse-navbar, #vp-wrap.left-open #vmc, #vp-wrap.left-open #vp-hud { visibility: hidden; }
  #vp-bottom { overflow: visible; justify-content: stretch; padding: 0 4px calc(env(safe-area-inset-bottom)); gap: 4px; }
  #vp-bottom > :not(.mob-act) { display: none !important; }
  #vp-bottom > .mob-act { display: flex; flex: 1 1 0; min-width: 0; min-height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px 2px; font-size: 11.5px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #vp-bottom > .mob-act svg { width: 18px; height: 18px; flex: none; }
  #vp-bottom > .mob-act[aria-pressed="true"] { border-color: var(--acc, #2fd27a); color: var(--acc, #2fd27a); }
  #vp-mob-tools { position: fixed; left: 6px; right: 6px; bottom: calc(var(--bottom) + 6px + env(safe-area-inset-bottom)); z-index: 45; max-height: 60vh; overflow: auto; background: var(--panel, #0d141b); border: 1px solid var(--line, #2c3646); border-radius: 12px; padding: 10px; box-shadow: 0 -8px 30px rgba(0,0,0,.5); }
  #vp-mob-tools[hidden] { display: none; }
  #vp-mob-tools h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
  #vp-mob-tools .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
  #vp-mob-tools .grid > * { display: flex !important; min-height: 44px; white-space: normal !important; text-align: center; justify-content: center; align-items: center; width: 100%; }
  #vp-mob-tools #vs-modes { display: flex !important; flex-wrap: wrap; gap: 6px; position: static !important; margin: 0 0 8px; }
  #vp-mob-tools #vs-modes > * { min-height: 40px; }
  #vp-mob-note { display: block; position: fixed; left: 10px; right: 10px; bottom: calc(var(--bottom) + 10px + env(safe-area-inset-bottom)); z-index: 46; background: rgba(5,10,14,.94); border: 1px solid #e0a526; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #fff; }
  #vp-mob-note[hidden] { display: none; }
}
