/* Inflight Utility: light, compact, geospatial-tool styling. */
:root {
  --bg: #F3F4F6; --panel: #FFFFFF; --sub: #F7F8F9; --hover: #F1F3F5; --line: #E3E6EA; --line2: #EEF0F2;
  --text: #1A1D21; --muted: #5F6873; --faint: #8A939C; --ink: #1A1D21;
  --sel: #1D63D8; --selbg: #E8F0FD; --selbg2: #F4F8FE;
  --good: #1F6B41; --goodbg: #E7F4EC; --fair: #8A5600; --fairbg: #FBF0DC; --poor: #A3241B; --poorbg: #FDE8E7;
  --r: 6px; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 12.5px/1.4 Inter, "Segoe UI", system-ui, sans-serif; }
a { color: var(--sel); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); height: 30px; padding: 0 12px; }
button:hover:not(:disabled) { background: var(--hover); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
button.primary:hover:not(:disabled) { background: #33383E; }
button.ghost { border-color: transparent; background: transparent; }
button.ghost:hover { background: var(--hover); }
button.icon { width: 28px; height: 28px; padding: 0; display: inline-grid; place-items: center; border-color: transparent; background: transparent; color: var(--muted); }
button.icon:hover { background: var(--hover); color: var(--text); }
button.danger { color: var(--poor); }
input[type=text], select, textarea { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 5px 8px; outline: none; }
input[type=text]:focus, select:focus, textarea:focus { border-color: var(--sel); box-shadow: 0 0 0 2px var(--selbg); }
:focus-visible { outline: 2px solid var(--sel); outline-offset: 1px; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 11.5px; }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 14px; height: 14px; flex: none; }

/* app shell */
#app { height: 100%; display: flex; flex-direction: column; }
.top { height: 44px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 22px; height: 22px; display: block; }
.vsep { width: 1px; height: 20px; background: var(--line); }
.nav { display: flex; gap: 2px; }
.nav a { height: 28px; padding: 0 10px; border-radius: 5px; display: flex; align-items: center; color: var(--muted); }
.nav a:hover { background: var(--hover); text-decoration: none; color: var(--text); }
.nav a.on { background: #EEF0F2; color: var(--text); font-weight: 500; }
.ctx { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.busy { color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #D5DAE0; border-top-color: var(--sel); animation: spin .9s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
main.page { flex: 1; min-height: 0; display: flex; }
.scroll { flex: 1; min-height: 0; overflow: auto; }

/* chips */
.pill { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; white-space: nowrap; background: #EEF0F2; color: #4E5761; }
.pill.ok, .pill.done, .pill.Good { background: var(--goodbg); color: var(--good); }
.pill.mid, .pill.waiting, .pill.Fair { background: var(--fairbg); color: var(--fair); }
.pill.bad, .pill.failed, .pill.Poor { background: var(--poorbg); color: var(--poor); }
.pill.running, .pill.queued { background: var(--selbg); color: var(--sel); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: #C5CBD1; }
.dot.done { background: #2E7D4F; } .dot.waiting { background: #B7791F; } .dot.failed { background: var(--poor); } .dot.running, .dot.queued { background: var(--sel); }

/* landing */
.landing { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 24px 20px 64px; }
.landing .inner { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 24px; }
.landing h1 { margin: 0; font-size: 24px; font-weight: 600; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.choice { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); color: var(--text); }
.choice:hover { text-decoration: none; border-color: #C9CED4; box-shadow: 0 2px 8px rgba(16,24,32,.06); }
.choice .art { height: 230px; position: relative; overflow: hidden; background: #E4EBE2; border-bottom: 1px solid var(--line); }
.choice .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.choice .txt { padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.choice .txt b { font-size: 15px; font-weight: 600; }
.recent { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.recent a { color: #3A434C; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 4px 10px; }

/* forms / import */
.narrow { max-width: 960px; margin: 0 auto; padding: 28px 20px; display: flex; flex-direction: column; gap: 18px; }
.narrow h1 { margin: 0; font-size: 18px; font-weight: 600; }
.drops { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 240px; padding: 20px;
  border: 2px dashed #C5CBD1; border-radius: 10px; background: var(--panel); text-align: center; }
.drop.over { border-color: var(--sel); background: var(--selbg2); }
.drop.has { border-style: solid; border-color: #2E7D4F; background: #F3FAF6; }
.drop .big { font-size: 14px; font-weight: 600; }
.drop .got { color: var(--good); overflow-wrap: anywhere; }
.drop .ico { width: 52px; height: 52px; border-radius: 50%; background: #EEF0F2; display: grid; place-items: center; color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label, .k { color: var(--muted); font-size: 11px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.seg button { border: 0; border-radius: 0; height: 28px; border-right: 1px solid var(--line); background: transparent; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: #fff; }
.bar { height: 4px; background: #E6E9ED; border-radius: 2px; overflow: hidden; }
.bar > div { height: 100%; background: var(--sel); width: 0; transition: width .3s; }
.bar.indet > div { width: 30%; animation: indet 1.4s infinite ease-in-out; }
@keyframes indet { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }
.err { background: var(--poorbg); border: 1px solid #F3C4C0; color: var(--poor); padding: 8px 10px; border-radius: var(--r); white-space: pre-wrap; }
.info { background: var(--sub); border: 1px solid var(--line); padding: 8px 10px; border-radius: var(--r); }

/* panels */
.side { flex: none; display: flex; flex-direction: column; background: var(--panel); min-height: 0; }
.side.left { border-right: 1px solid var(--line); width: 256px; }
.side.right { border-left: 1px solid var(--line); width: 312px; }
.side.closed { width: 36px; }
.phd { height: 36px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.pbody { flex: 1; min-height: 0; overflow: auto; }
.sect { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line2); }
.sect > .h { font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kv > div { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-bottom: 1px solid var(--line2); min-width: 0; }
.kv > div > span:last-child { overflow-wrap: anywhere; }

/* tree */
.tree { padding: 4px 0; }
.tn { display: flex; align-items: center; gap: 6px; width: 100%; height: 26px; border: 0; border-radius: 0; background: transparent; text-align: left; padding: 0 10px 0 8px; color: var(--text); }
.tn:hover { background: var(--hover); }
.tn.on { background: var(--selbg); box-shadow: inset 2px 0 0 var(--sel); }
.tn .chev { width: 10px; color: var(--faint); font-size: 10px; flex: none; transition: transform .1s; }
.tn .chev.open { transform: rotate(90deg); }
.tn .chev.none { visibility: hidden; }
.tn .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn .meta { color: var(--muted); font-size: 11.5px; }
.tn .gl { width: 10px; height: 10px; flex: none; }
.gl.site { border: 1.5px solid var(--muted); border-radius: 2px; }
.gl.group { border: 1.5px solid var(--faint); border-radius: 2px; background: var(--bg); }
.gl.pole { border-radius: 50%; background: var(--ink); }
.gl.photo { border-radius: 2px; background: #9AA3AB; }
.gl.layer { border: 1.5px solid var(--faint); border-radius: 50%; }
.tn input[type=checkbox] { margin: 0; }

/* viewer */
.center { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.stage { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #DDE3DA; }
.globe { position: absolute; inset: 0; }
/* map credits: one compact line bottom right; the Cesium ion logo stays visible (ion's terms), just small */
.globe .cesium-viewer-bottom { left: auto !important; right: 4px; bottom: 2px !important; padding: 0 !important; white-space: nowrap; }
.globe .cesium-widget-credits { font-size: 9px !important; line-height: 1.3; max-width: 460px; text-align: right; color: #fff; text-shadow: 0 0 2px #000; }
.globe .cesium-credit-logoContainer img { height: 13px; vertical-align: -3px !important; }
.globe .cesium-viewer-toolbar, .globe .cesium-viewer-animationContainer, .globe .cesium-viewer-timelineContainer { display: none; }
.float { position: absolute; display: flex; gap: 8px; align-items: center; z-index: 2; }
.tb { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.tb button { height: 26px; border: 0; border-radius: 5px; background: transparent; padding: 0 10px; }
.tb button.on { background: var(--ink); color: #fff; }
.tb button.tog.on { background: var(--selbg); color: var(--sel); }
.tb.v { flex-direction: column; padding: 0; }
.tb.v button { width: 32px; height: 32px; padding: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.tb.v button:last-child { border-bottom: 0; }
.tb.list { flex-direction: column; width: 250px; padding: 4px; gap: 2px; }
.tb.list button { height: auto; padding: 6px 8px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.tb.list button:hover { background: var(--hover); }
.photoview { position: absolute; inset: 0; background: #EEF0F2; display: flex; align-items: center; justify-content: center; padding: 52px 56px 44px; z-index: 1; }
.photoview img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 1px 6px rgba(0,0,0,.15); background: #fff; }
.photoview .cap { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--r); padding: 3px 10px; color: var(--muted); white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.photoview .nav { position: absolute; top: 50%; margin-top: -18px; width: 36px; height: 36px; padding: 0; }
.stage .msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); z-index: 1; pointer-events: none; }

/* records table */
.records { flex: none; display: flex; flex-direction: column; background: var(--panel); border-top: 1px solid var(--line); height: 230px; }
.records.closed { height: 34px; }
.rhd { height: 34px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.rhd .tab { height: 24px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); }
.rhd .tab.on { background: #EEF0F2; color: var(--text); font-weight: 500; }
table.grid { width: 100%; border-collapse: collapse; white-space: nowrap; }
table.grid th { position: sticky; top: 0; background: var(--sub); color: var(--muted); font-weight: 500; text-align: left; padding: 5px 12px; border-bottom: 1px solid var(--line); z-index: 1; }
table.grid td { padding: 5px 12px; border-bottom: 1px solid var(--line2); }
table.grid tr.click { cursor: pointer; }
table.grid tr.click:hover td { background: var(--hover); }
table.grid tr.on td { background: var(--selbg); }
table.grid tr.on td:first-child { box-shadow: inset 2px 0 0 var(--sel); }
table.grid tr.rel td { background: var(--selbg2); }

/* thumbs */
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.thumbs button { aspect-ratio: 4 / 3; height: auto; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: #EEF0F2; position: relative; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs button.on { border-color: var(--sel); }
.thumbs button .ap { position: absolute; right: 3px; top: 3px; width: 8px; height: 8px; border-radius: 50%; background: #B7791F; border: 1.5px solid #fff; }
.cond { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cond button { flex: 1; border: 0; border-radius: 0; border-right: 1px solid var(--line); height: 28px; }
.cond button:last-child { border-right: 0; }
.cond button.on { background: var(--ink); color: #fff; }
.chk { display: flex; align-items: center; gap: 8px; min-height: 24px; }

/* flights */
.flist { width: 340px; flex: none; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); }
.fitem { display: flex; flex-direction: column; gap: 2px; width: 100%; height: auto; padding: 9px 12px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line2); text-align: left; background: var(--panel); }
.fitem.on { background: var(--selbg); box-shadow: inset 2px 0 0 var(--sel); }
.frec { flex: 1; min-width: 0; overflow: auto; background: var(--panel); }
.frec .inner { max-width: 1060px; padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 18px; }
.frec h2 { margin: 0; font-size: 16px; font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.preview { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #EEF0F2; aspect-ratio: 16 / 10; }
.preview .globe { position: absolute; inset: 0; }
.steps5 { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.steps5 > a, .steps5 > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-right: 1px solid var(--line); color: var(--text); }
.steps5 > a:hover { background: var(--hover); text-decoration: none; }
.empty { padding: 12px; border: 1px dashed #D5DAE0; border-radius: var(--r); color: var(--muted); }

/* processing page (step runner) */
.proc { flex: 1; min-height: 0; display: grid; grid-template-columns: 280px 1fr; }
.proc .steps { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: auto; }
.step { display: flex; gap: 10px; align-items: center; padding: 8px 12px; height: auto; border: 0; border-radius: 0; text-align: left; background: transparent; width: 100%; }
.step.sel { background: var(--selbg); box-shadow: inset 2px 0 0 var(--sel); }
.step .lbl { flex: 1; }
.step .lbl small { display: block; color: var(--muted); font-size: 11.5px; }
.ico { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #D5DAE0; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.ico.done { background: #2E7D4F; border-color: #2E7D4F; color: #fff; } .ico.done::after { content: "✓"; }
.ico.failed { background: var(--poor); border-color: var(--poor); color: #fff; } .ico.failed::after { content: "!"; }
.ico.waiting { border-color: #B7791F; } .ico.waiting::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #B7791F; }
.ico.queued { border-style: dotted; border-color: var(--sel); }
.ico.skipped { border-style: dashed; }
.ico.running { border-color: #D5DAE0; border-top-color: var(--sel); animation: spin .9s linear infinite; }
.proc .panel { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; background: var(--panel); }
.proc .panel h2 { margin: 0; font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.log { background: var(--sub); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; margin: 0; font: 11.5px/1.45 Consolas, "Cascadia Mono", monospace;
  color: #3A434C; white-space: pre-wrap; overflow: auto; flex: 1; min-height: 160px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-top: 1px solid var(--line2); }
.stats > div { padding: 6px 0; border-bottom: 1px solid var(--line2); display: flex; flex-direction: column; }
.stats b { font-size: 15px; font-weight: 600; }
.cloud { position: relative; flex: 1; min-height: 360px; border-radius: var(--r); overflow: hidden; background: #F7F8F9; border: 1px solid var(--line); }
.cloud canvas { display: block; width: 100%; height: 100%; }
.cloud .tools { position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.cloud .tools label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.cloud .msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.cloud .help { position: absolute; bottom: 6px; right: 10px; color: var(--muted); font-size: 11px; }
.vframe { flex: 1; border: 0; width: 100%; min-height: 0; }

@media (max-width: 1000px) {
  .side.right { width: 260px; } .side.left { width: 210px; } .flist { width: 260px; }
  .split { grid-template-columns: 1fr; } .proc { grid-template-columns: 1fr; }
}

/* ---- review workspace v2: image-first ---- */
.slot { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.review { flex: 1; min-height: 0; display: flex; gap: 0; }
.review > .mainp { flex: 62 1 0; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); background: #EEF0F2; }
.review > .sidep { flex: 38 1 0; display: flex; flex-direction: column; min-width: 0; background: #DDE3DA; }
.review.swapped > .mainp { flex: 38 1 0; } .review.swapped > .sidep { flex: 62 1 0; }
.pane-h { height: 30px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 8px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 12px; }
.pane-h .t { font-weight: 600; } .pane-h .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-h button { height: 24px; padding: 0 8px; }
.pane-h button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.photo-c { flex: 1; min-height: 0; position: relative; cursor: crosshair; background: #E6E9EC; }
.photo-c canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.photo-c .hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(26,29,33,.88); color: #fff; padding: 4px 10px; border-radius: 5px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.strip { flex: none; height: 104px; display: flex; flex-direction: column; background: var(--panel); border-top: 1px solid var(--line); }
.strip .sh { height: 24px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 11.5px; color: var(--muted); }
.strip .sh b { color: var(--text); font-weight: 600; }
.strip .row2 { flex: 1; min-height: 0; display: flex; gap: 4px; padding: 0 8px 6px; overflow-x: auto; }
.strip .th { flex: none; width: 104px; height: 70px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; position: relative; background: #EEF0F2; }
.strip .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip .th.on { border-color: var(--sel); }
.strip .th .tag { position: absolute; left: 3px; top: 3px; font-size: 10px; line-height: 1; padding: 2px 4px; border-radius: 3px; background: rgba(26,29,33,.8); color: #fff; }
.strip .th .tag.z { background: var(--sel); }
.strip .th .warn { position: absolute; right: 3px; top: 3px; font-size: 10px; line-height: 1; padding: 2px 4px; border-radius: 3px; background: #B7791F; color: #fff; }
.strip .th .ann { position: absolute; right: 3px; bottom: 3px; width: 10px; height: 10px; border-radius: 50%; background: #E8590C; border: 1.5px solid #fff; }
.qcbig { display: flex; align-items: baseline; gap: 8px; }
.qcbig b { font-size: 22px; font-weight: 600; }
.qbar { display: grid; grid-template-columns: 96px 1fr 44px; gap: 6px; align-items: center; font-size: 12px; }
.qbar .tr { height: 6px; border-radius: 3px; background: #E6E9ED; overflow: hidden; }
.qbar .tr > i { display: block; height: 100%; background: #2E7D4F; }
.qbar .tr > i.mid { background: #B7791F; } .qbar .tr > i.bad { background: var(--poor); }
.qbar .v { text-align: right; color: var(--muted); }
.qnote { color: var(--muted); font-size: 11.5px; margin: -2px 0 4px 102px; }
/* Structure facts (selected-structure panel): plain label / value rows, ≈ marks an estimate and ? a low-confidence
   value, explained once in the footnote */
.facts { display: grid; grid-template-columns: 104px 1fr; row-gap: 7px; column-gap: 10px; font-size: 13px; }
.pill.pass { background: var(--goodbg); color: var(--good); } .pill.review { background: var(--fairbg); color: var(--fair); } .pill.fail { background: var(--poorbg); color: var(--poor); }
.pill.sev-High { background: var(--poorbg); color: var(--poor); } .pill.sev-Medium { background: var(--fairbg); color: var(--fair); }
.arow { display: flex; gap: 8px; align-items: center; width: 100%; height: auto; padding: 6px 8px; border: 1px solid var(--line2); border-radius: 5px; text-align: left; background: var(--panel); }
.arow.on { border-color: var(--sel); background: var(--selbg2); }
.arow .n { width: 22px; height: 22px; border-radius: 50%; background: #E8590C; color: #fff; display: grid; place-items: center; font-size: 10.5px; font-weight: 600; flex: none; }
.arow .n.res { background: #9AA3AB; }
.ast { display: flex; flex-direction: column; gap: 1px; width: 100%; height: auto; padding: 6px 10px 6px 12px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line2); text-align: left; background: var(--panel); }
.ast:hover { background: var(--hover); }
.ast.on { background: var(--selbg); box-shadow: inset 2px 0 0 var(--sel); }
.ast .l1 { display: flex; align-items: center; gap: 6px; } .ast .l1 b { font-weight: 600; }
.ast .l2 { color: var(--muted); font-size: 11.5px; display: flex; gap: 6px; }
.modal-bg { position: absolute; inset: 0; background: rgba(16,24,32,.25); z-index: 20; display: grid; place-items: center; padding: 16px; }
.modal { width: 560px; max-width: 100%; max-height: 100%; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 40px rgba(16,24,32,.25); display: flex; flex-direction: column; }
.modal .mh { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.modal .mb { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.modal .mf { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips button { height: 26px; padding: 0 9px; border-radius: 13px; }
.chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.lphotos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.lphotos label { position: relative; display: block; aspect-ratio: 4 / 3; border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer; background: #EEF0F2; }
.lphotos label.on { border-color: #E8590C; }
.lphotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lphotos input { position: absolute; left: 4px; top: 4px; margin: 0; }
.lphotos .tag { position: absolute; right: 3px; bottom: 3px; font-size: 10px; padding: 1px 4px; border-radius: 3px; background: rgba(26,29,33,.8); color: #fff; }
.banner { position: absolute; left: 50%; top: 44px; transform: translateX(-50%); z-index: 6; background: #E8590C; color: #fff; padding: 5px 12px; border-radius: 6px; display: flex; gap: 10px; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.banner button { height: 22px; padding: 0 8px; background: #fff; border: 0; color: var(--text); }

.banner[hidden], .photo-c .hint[hidden] { display: none; }
.review { min-width: 0; width: 100%; } .strip, .strip .row2 { min-width: 0; } .stage > .slot { min-width: 0; }
.pane-h button { white-space: nowrap; flex: none; } .pane-h .t { white-space: nowrap; flex: none; } .pane-h .muted { min-width: 0; flex: 1 1 auto; }
.split.big { grid-template-columns: 1fr; } .split.big .preview { aspect-ratio: auto; height: 480px; }

/* ---- round 3 redesign: dark header, big tabs, map-only home, one inspector ---- */
.top { height: 56px; gap: 16px; padding: 0 16px; background: #1A1D21; border-bottom: 0; }
.top .brand { color: #fff; font-size: 15px; font-weight: 600; }
.top .brand img { width: 24px; height: 24px; }
.top .vsep { background: rgba(255,255,255,.18); }
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,.10); padding: 4px; border-radius: 9px; }
.tabs a { height: 36px; padding: 0 16px; border-radius: 6px; display: flex; align-items: center; gap: 7px; color: #E6E9EC; font-weight: 600; font-size: 13.5px; }
.tabs a:hover { background: rgba(255,255,255,.16); text-decoration: none; }
.tabs a.on { background: #fff; color: #1A1D21; }
.tabs svg.i { width: 16px; height: 16px; }
.top .ctx { color: #C3C9D0; }
.top .busy, .top .busy a { color: #C3C9D0; }
.top .busy a.pill.bad { color: var(--poor); }
.top .spin { border-color: rgba(255,255,255,.25); border-top-color: #fff; }
.top button.primary { background: #fff; border-color: #fff; color: #1A1D21; font-weight: 600; height: 34px; }
.top button.primary:hover:not(:disabled) { background: #E6E9EC; }

/* map tab */
.mapbar { position: absolute; left: 12px; top: 12px; z-index: 2; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }   /* filters stacked, one per row */
.mapbar .chip { background: #fff; border: 1px solid var(--line); border-radius: 16px; height: 30px; padding: 0 6px 0 12px; display: flex; align-items: center; gap: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* review: photo big, 3D inset (swappable), one inspector */
.review { flex-direction: column; }
.rv-body { flex: 1; min-height: 0; position: relative; background: #E6E9EC; }
.rv-body > .photo-c, .rv-body > .sidep { position: absolute; }
.rv-body > .big { inset: 0; }
.rv-body > .inset { right: 12px; bottom: 12px; width: 320px; height: 220px; z-index: 3; border: 1px solid #C9CFD6; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 14px rgba(20,30,40,.18); }
.rv-body > .sidep { background: #DDE3DA; display: flex; flex-direction: column; }
.ins-h { display: none; position: absolute; right: 6px; top: 6px; z-index: 4; gap: 4px; }
.inset .ins-h { display: flex; }
.ins-h button { height: 24px; padding: 0 8px; font-size: 11.5px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.inset .ins-t { display: block; }
.ins-t { display: none; position: absolute; left: 8px; top: 8px; z-index: 4; background: rgba(255,255,255,.92); border-radius: 4px; padding: 1px 6px; font-size: 11.5px; font-weight: 600; }
.pinfo { position: absolute; left: 12px; top: 10px; z-index: 5; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 14px rgba(20,30,40,.14); padding: 8px 12px; }
.pinfo[hidden] { display: none; }
.review .pane-h { height: 40px; padding: 0 10px; font-size: 12.5px; gap: 8px; }
.review .pane-h button { height: 28px; }
.side.right.insp { width: 340px; }
.insp .ihd { padding: 12px 14px; border-bottom: 1px solid var(--line2); display: flex; flex-direction: column; gap: 4px; }
.insp .ihd .t { display: flex; align-items: center; gap: 8px; }
.insp .ihd .t b { font-size: 15px; }
.insp .ifoot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.insp .sect { padding: 12px 14px; gap: 8px; }
.qtoggle { display: flex; align-items: center; justify-content: space-between; width: 100%; height: auto; padding: 0; border: 0; background: transparent; font-weight: 600; }
.qtoggle:hover { background: transparent !important; }
.cond button.on { background: var(--selbg); color: var(--sel); font-weight: 600; }
.cond button { height: 32px; white-space: nowrap; padding: 0 6px; }
.aform .field > .k, .aform label.k { font-size: 11.5px; color: #3A4048; font-weight: 600; }
.aform select { height: 30px; }
.aform .seg { display: flex; } .aform .seg button { flex: 1; }
.aform .seg button.on, .aform .chips button.on { background: var(--selbg); color: var(--sel); border-color: var(--sel); font-weight: 500; }
.aform summary { cursor: pointer; color: var(--muted); }
.navq { display: flex; align-items: center; gap: 2px; margin-left: auto; color: var(--muted); }
.navq button { width: 26px; height: 26px; padding: 0; }

/* flights: section tabs */
.ftabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.ftabs button, .ftabs a { border: 0; border-radius: 0; background: transparent; height: 36px; padding: 0 12px; color: var(--muted); border-bottom: 2px solid transparent; display: flex; align-items: center; }
.ftabs button.on { color: var(--text); font-weight: 600; border-bottom-color: var(--sel); }
.ftabs a:hover { text-decoration: none; color: var(--text); }
.kstats { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; }
.kstats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-right: 1px solid var(--line2); }
.kstats b { font-size: 18px; font-weight: 600; }
.kstats .more { margin-left: auto; align-self: center; margin-right: 10px; }

/* structures + settings pages */
.pagebody { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px 20px; }
.tablebox { flex: 1; min-height: 0; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.tablebox table.grid td, .tablebox table.grid th { padding: 7px 12px; }
.seg.light button.on { background: var(--selbg); color: var(--sel); font-weight: 600; }
.settings { flex: 1; overflow: auto; display: flex; gap: 24px; padding: 20px 24px; align-items: flex-start; flex-wrap: wrap; }
.settings nav { width: 190px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.settings nav a { padding: 8px 12px; border-radius: 6px; color: #2B3036; font-weight: 500; }
.settings nav a.on { background: var(--selbg); color: var(--sel); font-weight: 600; }
.settings .col { flex: 999 1 640px; min-width: 0; max-width: 980px; display: flex; flex-direction: column; gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.card h2 { margin: 0; font-size: 15px; font-weight: 600; }
.stepn { width: 22px; height: 22px; border-radius: 50%; background: #1A1D21; color: #fff; font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; flex: none; }
.cmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.csvdrop { border: 1.5px dashed #9AA3AD; border-radius: 8px; padding: 14px; display: flex; gap: 12px; align-items: center; background: var(--sub); }
.csvdrop.has { border-style: solid; border-color: #BFD3F5; background: var(--selbg2); }
.csvdrop.over { border-color: var(--sel); }
[hidden] { display: none !important; }

/* review layout (2026-11-09): selected photo 2/3 | 3D 1/3 side by side (⇄ swaps), thumbnails stacked in the bottom third */
.rv-body { flex: 2 1 0; display: flex; flex-direction: row; }
.rv-body > .photo-c, .rv-body > .sidep { position: relative; inset: auto; width: auto; height: auto; min-width: 0; min-height: 0; border: 0; border-radius: 0; box-shadow: none; z-index: auto; }
.rv-body > .big { flex: 2 1 0; }
.rv-body > .inset { flex: 1 1 0; border-left: 1px solid var(--line); }
.rv-body > .sidep.big { order: 0; } .rv-body > .photo-c.inset { order: 1; }
.review > .strip { flex: 1 1 0; height: auto; min-height: 150px; }
.strip .row2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); grid-auto-rows: 118px; gap: 6px; padding: 2px 8px 8px; overflow-x: hidden; overflow-y: auto; align-content: start; }
.strip .th { width: auto; height: 118px; }
.strip .th .tag, .strip .th .warn { font-size: 11px; padding: 3px 5px; }

/* drag-to-resize borders (2026-11-10): photo | 3D, top row | thumbnails, page | inspector */
.rv-body > .big { order: 0; } .rv-body > .gut { order: 1; } .rv-body > .inset { order: 2; border-left: 0; }
.gut { flex: none; position: relative; z-index: 4; background: var(--line); touch-action: none; }
.gut.v { width: 1px; cursor: col-resize; }
.gut.h { height: 1px; cursor: row-resize; }
.gut::before { content: ""; position: absolute; inset: -4px 0; }
.gut.v::before { inset: 0 -4px; }
.gut:hover, .gut.on { background: var(--sel, #2563EB); }
.gut.v:hover, .gut.v.on { box-shadow: 0 0 0 1px var(--sel, #2563EB); }
.gut.h:hover, .gut.h.on { box-shadow: 0 0 0 1px var(--sel, #2563EB); }
main.page > .gut.v { align-self: stretch; }
main.page > .side.right.insp { border-left: 0; }
body.dragging-v, body.dragging-v * { cursor: col-resize !important; user-select: none; }
body.dragging-h, body.dragging-h * { cursor: row-resize !important; user-select: none; }

/* Puck updates (ui/puck.js): corner notice and panel, shared with Field Edition */
.puck-note { position: fixed; right: 16px; bottom: 16px; z-index: 40; height: 32px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--sel); color: var(--sel); border-radius: 16px; padding: 0 14px; box-shadow: 0 4px 16px rgba(16,24,32,.14); }
.puck-note[hidden] { display: none; }
.puck-note b { font-weight: 600; }
.puck-bg { position: fixed; inset: 0; background: rgba(16,24,32,.25); z-index: 50; display: grid; place-items: center; padding: 16px; }
.puck-modal { width: 600px; }
.puck-avail { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--sub); }
.puck-ver { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.puck-notes { white-space: pre-wrap; max-width: 300px; color: var(--muted); }
.puck-card { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.puck-card b.ok { color: var(--good); } .puck-card b.bad { color: var(--poor); }
.puck-detail { white-space: pre-wrap; margin-top: 2px; }
.puck-empty { border: 1px dashed var(--line); border-radius: var(--r); padding: 14px; color: var(--muted); text-align: center; }
.puck-prog { height: 6px; background: var(--line2); border-radius: 3px; overflow: hidden; }
.puck-prog > div { height: 100%; background: var(--sel); }
.puck-ok { background: var(--goodbg); color: var(--good); border-radius: var(--r); padding: 8px 10px; }
.puck-err { background: var(--poorbg); color: var(--poor); border-radius: var(--r); padding: 8px 10px; }
.puck-foot { font-size: 11.5px; }

/* Coverage QC layer (map tickbox): ramp in the map bar, legend over the 3D view, one line in the inspector */
.mapbar .covq { gap: 8px; padding-right: 12px; cursor: pointer; user-select: none; }
.mapbar .covq input { margin: 0; accent-color: var(--sel); }
.covq .ramp, .covleg i { display: inline-block; width: 56px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, #C8372D, #E9A23B 50%, #2E8B57); }
.covleg { position: absolute; left: 8px; bottom: 8px; z-index: 3; display: flex; gap: 6px; align-items: center; background: rgba(255,255,255,.92);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 11.5px; color: var(--muted); pointer-events: none; }
.covleg b { color: var(--text); font-weight: 600; margin-right: 2px; }
/* Distance from conductors (map tickbox, with the bubble radius slider): the same chip and legend, a height-map ramp */
.mapbar .distq input[type=range] { width: 96px; margin: 0 2px; }
.mapbar .distq .v { min-width: 40px; font-variant-numeric: tabular-nums; color: var(--text); }
.distq .ramp, .distleg i { background: linear-gradient(90deg, #D7301F, #F08C2B 25%, #F5D440 50%, #4FB8D9 75%, #2B5EC7); }
.distleg .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: #2E8B57; margin-left: 6px; }
/* Filters: the map's colour filters in one collapsible panel (open or closed is remembered) */
.mapbar .filters { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); min-width: 160px; }
.mapbar .filters .fh { display: flex; align-items: center; gap: 6px; width: 100%; height: 30px; padding: 0 12px 0 10px; border: 0; background: none;
  font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.mapbar .filters .car { flex: none; color: var(--muted); transition: transform .12s; }
.mapbar .filters.open .car { transform: rotate(90deg); }
.mapbar .filters .n { margin-left: auto; font-weight: 500; font-size: 11.5px; color: var(--sel); }
.mapbar .filters .fb { display: none; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 6px 6px; border-top: 1px solid var(--line); padding-top: 4px; }
.mapbar .filters.open .fb { display: flex; }
.mapbar .filters .chip { border: 0; box-shadow: none; height: 28px; border-radius: 6px; padding: 0 8px; }
.mapbar .filters .chip:hover { background: var(--bg, #F5F6F7); }
.covline { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; margin-top: 2px; }
.covline svg { flex: none; margin-top: 1px; }

/* The inspector (selected structure), calmer and with more contrast (2026-12-01): a dark header band like the top bar, small-caps
   section titles in ink, labels in grey and values in ink, blue for estimates, amber for "check on the photos",
   and the chosen verdict filled dark. Light mode otherwise, per docs/ui-design.md. */
.insp .ihd { background: #1A1D21; color: #fff; border-bottom: 0; padding: 14px 16px 13px; gap: 3px; }
.insp .ihd .t b { font-size: 17px; letter-spacing: -.01em; color: #fff; }
.insp .ihd .isub { font-size: 12.5px; color: #C3C9D0; }
.insp .ihd a { color: #8FB2FF; }
.insp .ihd .navq { color: #C3C9D0; }
.insp .ihd button.icon { color: #CBD5E1; }
.insp .ihd button.icon:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.insp .sect { padding: 14px 16px; gap: 10px; border-bottom-color: var(--line); }
.insp .sect > .h > span:first-child { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #0F1C2B; }
.insp .sect > .h > span:first-child > span { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.facts .k { color: var(--muted); font-size: inherit; }
.facts > span:nth-child(even) { color: #0F1C2B; font-weight: 500; }
.facts > span:nth-child(2) { font-weight: 700; }   /* the height */
.cdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #B4BCC6; margin: 0 0 1px 6px; vertical-align: middle; cursor: help; }
.cdot.lo { background: #E0A030; }
.ffoot { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ffoot .cdot { margin: 0 4px 1px 0; } .ffoot .cdot.lo { margin-left: 10px; }
.insp .cond { border-color: #CBD2DA; }
.insp .cond button { border-right-color: #CBD2DA; color: #0F1C2B; }
.insp .cond button.on { background: #0F1C2B; color: #fff; font-weight: 600; }
