:root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; color: #dfe8eb; background: #10171d; font-synthesis: none; --muted: #96a8b3; --line: #2b3943; --accent: #81d8c1; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overflow: hidden; }
button, input, select { font: inherit; }
button, select, input[type=number], input[type=search] { color: #e2ecef; background: #202d36; border: 1px solid #3c4c57; border-radius: 6px; min-height: 33px; }
button { cursor: pointer; padding: 6px 11px; transition: background .15s; }
button:hover { background: #344953; }
button:disabled, select:disabled, input:disabled { opacity: .4; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible, [role=button]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
select { padding: 5px 7px; width: 100%; text-overflow: ellipsis; min-width: 0; }
label { font-size: 11px; color: #b6c5ce; display: block; }
label select, label input[type=number] { margin-top: 5px; }
input[type=range] { width: 100%; accent-color: var(--accent); min-width: 0; }
input[type=number] { width: 100%; padding: 5px; font-size: 11px; min-width: 0; }
input[type=checkbox] { accent-color: var(--accent); cursor: pointer; margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
main { display: grid; grid-template-columns: 308px minmax(0, 1fr); height: 100dvh; }
.sidebar { overflow-y: auto; scrollbar-width: thin; background: #172129; border-right: 1px solid var(--line); padding: 0 17px 18px; }
.brand-area { display: flex; align-items: center; gap: 8px; padding: 12px 0; }
.brand-logo { width: 56px; height: 56px; object-fit: contain; flex: none; }
.brand-copy { flex: 1; min-width: 0; }
.brand-title { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.brand-title h1 { font-size: 17px; font-weight: 620; letter-spacing: -.3px; }
.viewer-version { font-size: 10px; color: var(--muted); }
.report-issues { display: inline-block; font-size: 13px; color: #a8e3d3; line-height: 1.6; margin-top: 3px; }
.local-badge { color: #b6d8cd; padding: 8px 10px; border: 1px solid #304a45; border-radius: 6px; background: #1c302d; font-size: 11px; margin-bottom: 15px; }
.local-badge i, .privacy-dot { display: inline-block; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; margin-right: 7px; }
.section { border-bottom: 1px solid var(--line); }
.section > summary { display: flex; gap: 10px; align-items: center; padding: 15px 0; font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.section > summary::-webkit-details-marker { display: none; }
.section > summary::after { content: '⌄'; margin-left: auto; color: var(--muted); }
.section:not([open]) > summary::after { content: '›'; }
.step { color: #76968e; font-size: 10px; font-weight: 500; letter-spacing: 1px; }
.count { font-size: 10px; color: var(--muted); background: #25343d; border-radius: 4px; padding: 2px 5px; }
.section-body { padding: 0 0 17px; }
.primary { background: #81d8c1; color: #122820; border-color: #81d8c1; font-weight: 650; }
.primary:hover { background: #a6e8d6; color: #122820; }
.file-button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-size: 12px; }
.file-button > span:last-child { font-size: 10px; opacity: .7; font-weight: 400; }
.muted { color: var(--muted); font-size: 11px; line-height: 1.6; }
#file-name { margin-top: 8px; overflow-wrap: anywhere; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.file-info { font-size: 10px; color: var(--muted); }
.file-info:has(#close-file[hidden]) { display: none; }
.text-button { background: none; border: 0; color: var(--accent); font-size: 11px; padding: 4px 0; min-height: 24px; }
.text-button:hover { background: none; color: #c0f4e5; text-decoration: underline; }
.quiet { background: transparent; font-size: 11px; }
.filter-label { margin-bottom: 9px; }
input[type=search] { font-size: 11px; width: 100%; padding: 7px 9px; margin-bottom: 9px; }
.roi-nav { display: grid; grid-template-columns: 29px minmax(0, 1fr) 29px; gap: 5px; }
.roi-nav select { font-size: 11px; }
.roi-nav button { padding: 3px; }
#acquisition-summary { margin-top: 8px; }
#overview { margin-top: 13px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #101b22; }
.overview-backdrop { padding: 9px 9px 0; font-size: 10px; }
.overview-backdrop select { min-height: 29px; font-size: 11px; }
#overview-note { padding: 5px 9px 9px; font-size: 10px; }
.overview-heading { display: flex; justify-content: space-between; gap: 8px; padding: 8px 9px; color: var(--muted); font-size: 9px; }
.overview-heading span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overview-heading span:last-child { flex-shrink: 0; }
#map { display: block; width: 100%; height: 170px; cursor: grab; touch-action: none; user-select: none; }
#map.panning { cursor: grabbing; }
.overview-tools { display: flex; align-items: center; gap: 3px; padding: 6px; border-top: 1px solid var(--line); }
.overview-tools > span:first-child { flex: 1; font-size: 8px; color: var(--muted); }
.overview-tools button { padding: 2px 5px; min-height: 25px; font-size: 10px; background: transparent; }
#map-zoom { font-size: 9px; color: var(--muted); min-width: 30px; text-align: center; }
#map polygon { fill: #81d8c116; stroke: #739b91; stroke-width: 1.3; vector-effect: non-scaling-stroke; cursor: pointer; }
#map polygon:hover { fill: #81d8c150; }
#map polygon.active { stroke: #a1ffe1; fill: #81d8c141; stroke-width: 2; }
#map text { fill: #d5f5ec; pointer-events: none; text-anchor: middle; dominant-baseline: central; font-family: inherit; }
.channel { border: 1px solid #35444e; border-radius: 7px; background: #1b2831; margin-top: 10px; padding: 10px; }
.channel.disabled { opacity: .6; }
.channel-top { display: grid; grid-template-columns: 14px minmax(0, 1fr) 18px; gap: 7px; align-items: center; }
.channel-stepper { display: grid; grid-template-columns: 23px minmax(0, 1fr) 23px; align-items: center; gap: 3px; }
.channel-arrow { padding: 0; min-height: 28px; font-size: 19px; line-height: 1; background: #253540; border-color: #3c4c57; }
.channel-top select { font-size: 11px; border: 0; background: #253540; min-height: 28px; padding: 3px; }
.remove-channel { border: 0; background: none; padding: 0; font-size: 17px; min-height: 24px; color: var(--muted); }
.channel-label { margin: 5px 0 8px 48px; color: var(--muted); font-size: 9px; }
.channel-palette { display: flex; align-items: center; gap: 10px; margin: 0 0 11px 2px; padding: 3px 0; }
.colour-swatch { width: 19px; height: 19px; min-height: 19px; border-radius: 4px; border: 1px solid #fff6; padding: 0; position: relative; }
.colour-swatch:hover { filter: brightness(.85); }
.colour-swatch[aria-pressed=true]::after { content: ''; position: absolute; inset: -4px; border: 2px solid #bcd9d1; border-radius: 6px; }
.limits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.limit-row { display: flex; align-items: center; gap: 5px; }
.limit-row span { font-size: 9px; }
.limit-row input { min-height: 25px; margin: 0 !important; padding: 3px 5px; }
.channel-bottom { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.channel-bottom button { min-height: 23px; padding: 1px 6px; font-size: 9px; }
.channel-bottom { gap: 14px; }
.dual-range { position: relative; flex: 1; height: 30px; margin: 0 9px; touch-action: none; cursor: pointer; }
.dual-range::before, .range-fill { position: absolute; height: 4px; top: 13px; border-radius: 2px; pointer-events: none; }
.dual-range::before { content: ''; left: 0; right: 0; background: #465660; }
.range-fill { background: var(--accent); }
.channel-bottom .range-handle { position: absolute; top: 7px; width: 16px; height: 16px; min-height: 16px; padding: 0; transform: translateX(-50%); border: 2px solid #d6fff0; border-radius: 50%; background: #619f92; cursor: ew-resize; touch-action: none; }
.channel-bottom .range-handle.high { background: var(--accent); }
.range-handle:focus-visible { z-index: 2; }
.colour-map-label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; font-size: 10px; }
.colour-map-label select { margin: 0; font-size: 10px; min-height: 26px; }
.colour-gradient { height: 5px; margin: 9px 0; border-radius: 3px; }
.legend .legend-gradient { width: 22px; height: 7px; border-radius: 2px; }
#map-blend-note { margin-top: 9px; }
.order-help { margin-top: 6px; }
.checkbox-label { display: flex; align-items: center; gap: 7px; line-height: 1.5; }
#histogram-channels { display: flex; flex-wrap: wrap; gap: 9px 14px; margin: 12px 0; }
#histogram-status { margin: 9px 0; }
#histogram-plot { display: block; width: 100%; margin: 9px 0; overflow: visible; }
#histogram-plot text { fill: var(--muted); font: 9px Inter, ui-sans-serif, sans-serif; }
#histogram-plot .axis-title { fill: #c0d4d9; }
.histogram-grid { stroke: #33434c; stroke-width: .6; }
#histogram-legend { display: grid; gap: 6px; font-size: 10px; color: #b6c5ce; }
#histogram-legend > div { display: flex; gap: 7px; align-items: center; }
#histogram-legend i { width: 15px; height: 2px; flex-shrink: 0; }
.channel-actions { margin-top: 10px; }
.display-options { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) 75px; gap: 8px; }
.display-options:has([hidden]) { grid-template-columns: 1fr; }
.display-options select { font-size: 11px; }
#metadata { margin: 0; font-size: 10px; line-height: 1.5; }
#metadata dt { color: var(--muted); margin-top: 8px; overflow-wrap: anywhere; }
#metadata dd { margin: 2px 0 0; color: #d6e4e5; overflow-wrap: anywhere; }
.sidebar-footer { font-size: 10px; color: #b1c9c4; margin-top: 18px; line-height: 1.7; }
.sidebar-footer p { color: var(--muted); font-size: 9px; }
.sidebar-footer a { display: inline-block; font-size: 9px; margin-top: 7px; color: var(--muted); }
.workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 81px; padding: 16px 27px; border-bottom: 1px solid #202e36; }
.title-group { min-width: 0; }
.eyebrow { color: #76978f; font-size: 9px; font-weight: 600; letter-spacing: 1.8px; }
.workspace-header h2 { font-size: 15px; margin-top: 6px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-mode { width: 180px; flex-shrink: 0; }
.image-mode select { font-size: 11px; }
.viewport { flex: 1; min-height: 0; overflow: hidden; position: relative; background: #0c1217; }
#image-stage { position: absolute; inset: 0; }
#figure-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.figure-mode-active #image-stage { outline: 1px solid #34434b; }
.figure-mode-active #legend { visibility: hidden; }
#canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#canvas:active { cursor: grabbing; }
.workspace:has(#welcome:not([hidden])) > .workspace-header { display: none; }
.workspace:has(#welcome:not([hidden])) #image-stage { visibility: hidden; }
.workspace:has(#welcome:not([hidden])) #view-hint { display: none; }
.welcome { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: clamp(22px, 4vw, 60px); background: radial-gradient(ellipse at top right, #193230 0, #0d171e 65%); }
.welcome:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.welcome-content { max-width: 1020px; margin: 0 auto; }
.welcome-hero { display: flex; align-items: center; gap: 26px; }
.welcome-logo { width: 128px; height: 128px; object-fit: contain; flex: none; }
.welcome .welcome-eyebrow { color: #94dbc7; font-size: 11px; letter-spacing: .6px; margin-bottom: 8px; }
.welcome h2 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 550; letter-spacing: -.6px; line-height: 1.2; margin-bottom: 12px; }
.welcome p, .welcome dd { color: #b6c8d0; font-size: 13px; line-height: 1.7; }
.welcome-hero > div { max-width: 670px; }
.welcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 28px 0; }
.welcome-actions button { font-size: 12px; padding: 11px 16px; }
.welcome-actions .primary { display: flex; align-items: center; gap: 28px; }
.welcome-actions > span { color: #91a9b3; font-size: 11px; margin-left: 4px; }
.welcome-columns { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.welcome-card { padding: 22px 24px; border: 1px solid #2b424a; border-radius: 12px; background: #132129a6; min-width: 0; }
.welcome h3 { font-size: 16px; font-weight: 550; margin-bottom: 18px; }
.welcome-features { margin: 0; }
.welcome-features > div + div { margin-top: 16px; }
.welcome dt { color: #e4eeee; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.welcome dd { margin: 0; }
.welcome-file { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.welcome-file-badge { display: grid; place-items: center; flex: none; width: 56px; height: 66px; border: 1px solid #42675c; border-radius: 6px 14px 6px 6px; background: #19322c; color: #a4e8d5; font: 12px ui-monospace, monospace; }
.welcome-file strong { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.welcome .welcome-tip { margin-top: 18px; padding-top: 16px; border-top: 1px solid #2b424a; color: #91a9b3; font-size: 12px; }
.welcome-local { display: flex; align-items: baseline; gap: 8px; border-left: 2px solid #71cbb2; padding: 12px 16px; margin-top: 20px; background: #152c2a70; }
.welcome-local .privacy-dot { flex: none; margin: 0; }
.welcome-local p { font-size: 12px; }
.welcome-local strong { color: #daf6eb; }
.welcome-resources { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 22px; }
.welcome-resources a { color: #9be4d0; font-size: 12px; text-underline-offset: 3px; }
.busy { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 240px; padding: 20px 25px; border: 1px solid #47665f; border-radius: 9px; background: #17252df5; box-shadow: 0 8px 50px #0005; display: grid; justify-items: center; gap: 13px; font-size: 12px; z-index: 5; }
.spinner { width: 22px; height: 22px; border: 2px solid #81d8c133; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
progress { width: 210px; height: 5px; accent-color: var(--accent); }
.message { position: absolute; top: 14px; left: 20px; right: 20px; padding: 12px 14px; background: #3c3024f5; border: 1px solid #806445; border-radius: 6px; color: #f5d6a7; font-size: 12px; line-height: 1.6; display: flex; justify-content: space-between; align-items: start; gap: 15px; max-height: 150px; overflow: auto; z-index: 6; }
.message button { border: 0; padding: 0; background: none; min-height: 18px; font-size: 20px; color: inherit; }
.legend { position: absolute; left: 18px; top: 18px; background: #172129df; border: 1px solid #34434b; padding: 8px 11px; border-radius: 6px; display: flex; gap: 12px; flex-wrap: wrap; max-width: calc(100% - 36px); font-size: 10px; pointer-events: none; }
.legend span { display: flex; gap: 6px; align-items: center; }
.legend i { width: 7px; height: 7px; border-radius: 50%; }
.viewer-tools { display: flex; align-items: center; gap: 3px; position: absolute; bottom: 17px; right: 18px; padding: 4px; border: 1px solid #34434b; background: #172129eb; border-radius: 7px; }
.viewer-tools button { background: none; border: 0; font-size: 11px; padding: 5px 8px; min-height: 29px; }
.viewer-tools button:hover { background: #2e414b; }
#zoom-label { min-width: 42px; text-align: center; color: var(--muted); font-size: 10px; }
.divider { height: 18px; width: 1px; background: #3b4b52; margin: 0 2px; }
.statusbar { min-height: 31px; display: flex; align-items: center; justify-content: space-between; padding: 7px 18px; border-top: 1px solid #27343d; font-size: 10px; color: var(--muted); gap: 12px; }
#status { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#view-hint { white-space: nowrap; color: #718993; }
.pixel-panel { display: flex; align-items: center; gap: 18px; padding: 13px 19px; border-top: 1px solid var(--line); background: #172129; font-size: 11px; }
#pixel-coordinate { color: var(--accent); flex-shrink: 0; }
#pixel-values { display: flex; gap: 18px; flex-wrap: wrap; flex: 1; }
#pixel-values span { color: var(--muted); }
#pixel-values b { color: #dce8ec; font-weight: 500; margin-left: 5px; }
#drop-overlay { position: fixed; inset: 10px; z-index: 20; background: #142d29f5; border: 2px dashed var(--accent); border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 23px; color: var(--accent); pointer-events: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.figure-mode { display: flex; gap: 6px; margin-bottom: 8px; }
.figure-mode button { flex: 1; font-size: 11px; }
.figure-mode button[aria-pressed=true] { background: #285346; color: #bbf0df; border-color: #729f90; }
#figure-root fieldset { margin: 14px 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
#figure-root legend { color: #dceee6; font-size: 11px; font-weight: 600; }
#figure-root label { margin-bottom: 9px; }
#figure-root select, #figure-root input, #figure-root button { font-size: 11px; }
#figure-root input[type=text] { display: block; width: 100%; margin-top: 5px; padding: 7px; min-width: 0; border: 1px solid #3c4c57; border-radius: 6px; background: #202d36; color: #e2ecef; }
#figure-root .two-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
#figure-root .muted { font-size: 10px; margin: 7px 0; }
.figure-colours input { display: block; width: 100%; height: 28px; padding: 2px; margin-top: 5px; border: 1px solid #3c4c57; background: #202d36; border-radius: 4px; }
.export-filename > summary, #export-bookmarks > summary { font-size: 11px; cursor: pointer; padding: 8px 0; }
#figure-filename-preview { display: block; color: #b8f5df; font: 10px ui-monospace, monospace; overflow-wrap: anywhere; padding: 8px; background: #0e171d; border-radius: 5px; margin: 8px 0; }
#figure-export { width: 100%; }
.export-download { display: block; margin-top: 8px; font-size: 11px; overflow-wrap: anywhere; }
#export-bookmark-list { display: grid; gap: 5px; }
#export-bookmark-list button { text-align: left; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .welcome-columns { grid-template-columns: 1fr; } .welcome-hero { gap: 18px; } .welcome-logo { width: 90px; height: 90px; } }
@media (max-width: 900px) { main { grid-template-columns: 278px minmax(0, 1fr); } .workspace-header { padding: 14px 18px; } #view-hint { display: none; } .image-mode { width: 145px; } .welcome-hero { flex-direction: column; align-items: flex-start; } .welcome-card { padding: 18px; } }
@media (max-width: 620px) { body { overflow: auto; } main { display: flex; flex-direction: column-reverse; height: auto; min-height: 100dvh; } .workspace { height: 70dvh; min-height: 450px; } .workspace:has(#welcome:not([hidden])) { height: 100dvh; } .sidebar { border-right: 0; padding: 0 18px 22px; } .workspace-header h2 { font-size: 12px; } .pixel-panel { gap: 10px; } }
