/* EmberEye - palette from the logo */
:root {
  --ink: #1c2b3a; --ink-2: #4a5866; --lake: #4f7d7a; --lake-2: #8fb0a8; --ember: #f0691f; --flame: #dd4229;
  --sand: #efddbf; --mist: #f5f7f5; --ember-soft: #ffa53d; --paper: #ffffff; --line: #d9e0dd; --offline: #b9c4c0;
  --bg: var(--mist); --surface: var(--paper); --text: var(--ink); --muted: var(--ink-2); --border: var(--line);
  --focus: var(--ember);
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ember-soft: #f39a3a;
    --bg: #121c26; --surface: #1a2733; --text: #e8eeec; --muted: #9fb0ad; --border: #2c3b48; --offline: #4b5a66;
    --lake: #6fa29d; --sand: #5a4a33; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ember-soft: #f39a3a;
  --bg: #121c26; --surface: #1a2733; --text: #e8eeec; --muted: #9fb0ad; --border: #2c3b48; --offline: #4b5a66;
  --lake: #6fa29d; --sand: #5a4a33; color-scheme: dark;
}
:root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 92px); }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.5; font-variation-settings: "wdth" 100; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.top .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 80px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { width: 56px; height: 56px; }
.wordmark { font-weight: 800; font-size: 1.85rem; letter-spacing: -.01em; font-variation-settings: "wdth" 112; }
.wordmark .eye { color: var(--flame); }
.wordmark .tld { color: inherit; }
.nav { display: flex; gap: 1.25rem; margin-left: auto; font-size: .95rem; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.tag { font-size: .8rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: .1rem .6rem; white-space: nowrap; }

/* camera state colours: one set on the colour wheel - hue 42 / 24 / 6 degrees, saturation 90%, lightness 58 / 50 / 42%
   (close to the crayon colours yellow orange, orange and a deep red orange); dark mode one step lighter.
   Map: water and land from the same wheel (the lake hue 176 and the yellow-orange hue 42). */
:root { --st-watch: var(--lake); --st-faint: #f4ba34; --st-det: #f2690d; --st-alert: #cb1e0b; --water: #87b5b2; --land: #f3f0e7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --st-faint: #f5c147; --st-det: #f47b2a; --st-alert: #ed311d; --water: #2b4644; --land: #4d483d; } }
:root[data-theme="dark"] { --st-faint: #f5c147; --st-det: #f47b2a; --st-alert: #ed311d; --water: #2b4644; --land: #4d483d; }

/* hero: the lookout ring */
.hero { display: grid; grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: 3rem; align-items: center; padding: 3rem 0 2.5rem; }
.ring { width: 100%; max-width: 26rem; aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; overflow: visible; }
.ring .cross { stroke: var(--text); stroke-width: 1.5; }
.ring .rim { fill: none; stroke: var(--text); stroke-width: 1.5; }
.ring .seg { fill: none; stroke-width: 26; cursor: pointer; transition: stroke-width .15s; }
.ring .seg:hover, .ring a:focus-visible .seg, .ring .seg.on { stroke-width: 34; }
.ring a:focus-visible { outline: none; }
.ring .s-watch { stroke: var(--st-watch); } .ring .s-faint { stroke: var(--st-faint); } .ring .s-det { stroke: var(--st-det); } .ring .s-alert { stroke: var(--st-alert); } .ring .s-off { stroke: var(--offline); }
.ring .window-bg { fill: var(--sand); }
.ring .glyph { fill: var(--muted); font: 600 15px var(--font); }
.status h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .75rem; font-variation-settings: "wdth" 118; max-width: 16ch; }
.status.is-alert h1 { color: var(--st-alert); }
.status .lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.5rem; max-width: 38rem; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem 2.25rem; margin: 0; padding: 0; }
.facts div { min-width: 7rem; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }
.ringcap { margin-top: .5rem; font-size: .9rem; color: var(--muted); text-align: center; min-height: 1.4em; }

/* live panel: last 60 minutes */
:root { --c-lat: var(--lake); --c-sbx: var(--ember); --c-fast: var(--lake); --c-slow: #cf9a52; --c-grid: #e4e9e7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-slow: #d9a961; --c-grid: #26343f; } }
:root[data-theme="dark"] { --c-slow: #d9a961; --c-grid: #26343f; }
.live { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.25rem 1.1rem; margin: 0 0 2rem; }
.live-head { margin: 0 0 .75rem; font-size: .95rem; color: var(--muted); }
.mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .5rem 1rem; margin: 0 0 1rem; }
.mini dt { font-size: .8rem; color: var(--muted); }
.mini dd { margin: 0; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini dd.hot { color: var(--flame); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem 1.5rem; }
.chart { margin: 0; min-width: 0; }
.chart figcaption { font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.chart-lg { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .78rem; color: var(--muted); margin-bottom: .25rem; }
.chart-lg i { display: inline-block; width: .9rem; height: .55rem; border-radius: 2px; margin-right: .35rem; vertical-align: 0; }
.k-lat { background: var(--c-lat); } .k-sbx { background: var(--c-sbx); } .k-fast { background: var(--c-fast); } .k-slow { background: var(--c-slow); }
.k-dash { background: repeating-linear-gradient(90deg, var(--c-sbx) 0 4px, transparent 4px 7px) !important; height: .2rem !important; vertical-align: .15rem !important; }
.chart-box { height: 150px; position: relative; }
.chart-box svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart-box .ax { fill: var(--muted); font: 11px var(--font); }
.chart-box .gl { stroke: var(--c-grid); stroke-width: 1; }
.chart-box .none { fill: var(--muted); font: 12px var(--font); }

/* live panel: charts (2/3) + world mini-map (1/3) */
.live-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem 1.5rem; align-items: stretch; }
.live-body .charts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.minimap { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; }
.minimap-cap { font-size: .85rem; font-weight: 600; margin-bottom: .3rem; display: flex; justify-content: space-between; gap: .5rem; }
.minimap-go { font-weight: 400; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
#minimap { flex: 1; min-height: 190px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--water); cursor: pointer;
  position: relative; z-index: 0; isolation: isolate; }
#minimap svg { display: block; width: 100%; height: 100%; }
#minimap .land { fill: var(--land); stroke: color-mix(in srgb, var(--water) 70%, #000); stroke-width: .25; }
#minimap .leaflet-control-attribution { font-size: 9px; }
.minimap:hover #minimap, .minimap:focus-visible #minimap { border-color: var(--lake); }
@media (max-width: 900px) { .live-body { grid-template-columns: 1fr; } #minimap { flex: none; min-height: 0; aspect-ratio: 340 / 128; } }

/* notices */
.notice { border: 1px solid var(--border); border-left: 4px solid var(--ember); background: var(--surface); padding: .75rem 1rem; border-radius: 6px; margin: 0 0 1.5rem; }
.notice[hidden] { display: none; }
.notice-bottom { margin: 2rem 0 0; }
.notice-quiet { border-left-color: var(--lake-2); color: var(--muted); font-size: .92rem; }

/* sections */
section.block { padding: 2rem 0; border-top: 1px solid var(--border); }
section.block > h2 { font-size: 1.5rem; font-weight: 750; margin: 0 0 .35rem; font-variation-settings: "wdth" 108; }
.sub { color: var(--muted); margin: 0 0 1.25rem; max-width: 46rem; }
.empty { color: var(--muted); padding: 1rem 0; }

/* country toggle (warnings + cameras) */
.sec-head { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; margin-bottom: .6rem; }
section.block .sec-head h2 { font-size: 1.5rem; font-weight: 750; margin: 0; font-variation-settings: "wdth" 108; }
.region { display: flex; flex-wrap: wrap; gap: .4rem; max-width: 100%; }
.region button { font: inherit; font-size: .88rem; border: 1px solid var(--border); background: var(--surface); color: var(--muted); padding: .28rem .8rem; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.region button:hover { color: var(--text); border-color: var(--lake-2); }
.region button[aria-pressed="true"] { background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .region button[aria-pressed="true"] { background: var(--lake); color: #0f1820; } }
:root[data-theme="dark"] .region button[aria-pressed="true"] { background: var(--lake); color: #0f1820; }
.region .n { opacity: .7; margin-left: .3rem; font-variant-numeric: tabular-nums; }

/* warnings */
.warnings { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.warning { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--st-alert); border-radius: 8px; padding: .75rem; }
/* activity tiers: confirmed warnings, possible smoke, faint signal, clear - in the ring's colours, calmer down the list */
.tiers { display: grid; gap: 1.5rem; }
.tier-head { display: flex; align-items: baseline; gap: .55rem; margin: 0 0 .5rem; font-size: 1.02rem; font-weight: 700; }
.tier-head i { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; flex: none; transform: translateY(1px); }
.tier-head .n { color: var(--muted); font-weight: 500; font-size: .9rem; }
.tier-note { color: var(--muted); font-size: .88rem; margin: -.25rem 0 .6rem; max-width: 46rem; }
.tier-det .shots, .tier-faint .shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .75rem; }
.tier-faint .shots { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); }
.shotcard { text-decoration: none; display: grid; gap: .25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .4rem; border-top: 3px solid var(--st-det); }
.tier-faint .shotcard { border-top-color: var(--st-faint); padding: .3rem; }
.shotcard img, .shotcard .noimg { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 4px; background: var(--sand); }
.shotcard strong { font-size: .86rem; line-height: 1.25; }
.shotcard span { font-size: .78rem; color: var(--muted); }
.tier-faint .shotcard strong { font-size: .8rem; } .tier-faint .shotcard span { font-size: .74rem; }
.tier-clear p { margin: 0; color: var(--muted); }
.tier-more { margin: .5rem 0 0; font-size: .85rem; color: var(--muted); }
.warning img { width: 9rem; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 4px; background: var(--sand); }
.warning h3 { margin: 0; font-size: 1.05rem; }
.warning p { margin: .15rem 0 0; color: var(--muted); font-size: .92rem; }

/* cameras */
.cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem; }
.cam { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.cam .shot { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--sand); }
.cam .shot img { width: 100%; height: 100%; object-fit: contain; }
.cam .dot { position: absolute; top: .6rem; left: .6rem; width: .8rem; height: .8rem; border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--surface) 85%, transparent); }
.cam .body { padding: .75rem .9rem .9rem; display: grid; gap: .2rem; }
.cam h3 { margin: 0; font-size: 1rem; }
.cam .meta { color: var(--muted); font-size: .85rem; }
.cam details { margin-top: .35rem; font-size: .85rem; }
.cam summary { cursor: pointer; color: var(--muted); }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin-top: .5rem; }
.strip img { aspect-ratio: 16 / 9; object-fit: contain; border-radius: 3px; background: var(--sand); }
.d-watch { background: var(--st-watch); } .d-faint { background: var(--st-faint); } .d-det { background: var(--st-det); } .d-alert { background: var(--st-alert); } .d-off { background: var(--offline); }

/* satellite hotspots */
.sat-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.sat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .85rem 1rem; display: grid; gap: .2rem; }
.sat-card h3 { margin: 0; font-size: 1rem; }
.sat-count { font-size: 1.6rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.sat-card .meta { color: var(--muted); font-size: .85rem; }
.sat-h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.sat-near { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.sat-near li { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--ember); border-radius: 6px; padding: .5rem .75rem; font-size: .92rem; }
.sat-badge { display: inline-block; margin-top: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .82rem; background: color-mix(in srgb, var(--flame) 14%, transparent); color: var(--flame); border: 1px solid color-mix(in srgb, var(--flame) 35%, transparent); }
.sat-line { color: var(--ember); font-size: .85rem; }

/* camera search + paging */
.cam-tools { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: 0 0 1rem; }
.cam-tools input { font: inherit; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); width: min(100%, 22rem); }
.cam-count { color: var(--muted); font-size: .9rem; }
.more-row { margin: 1.25rem 0 0; }
.more { font: inherit; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .6rem 1.1rem; border-radius: 8px; cursor: pointer; }
.more[hidden] { display: none; }
.ringnote { margin: .15rem 0 0; font-size: .8rem; color: var(--muted); text-align: center; }

/* missing image placeholder */
.noimg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; width: 100%; height: 100%;
  min-height: 4rem; aspect-ratio: 16 / 9; color: var(--muted); background: var(--sand); font-size: .8rem; border-radius: 4px; }
.noimg svg { width: 2.6rem; height: auto; opacity: .7; }
.cam .shot, a:has(> .noimg) { text-decoration: none; }
.warning .noimg { width: 9rem; }
@media (max-width: 760px) { .warning .noimg { width: 6rem; } }

/* detections */
.dets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 1rem; }
.det { text-decoration: none; display: grid; gap: .3rem; }
.det img { aspect-ratio: 16 / 9; object-fit: contain; border-radius: 6px; background: var(--sand); border: 1px solid var(--border); }
.det span { font-size: .85rem; color: var(--muted); }
.det strong { font-size: .92rem; }

/* add camera */
.invite { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.invite h2 { margin: 0 0 .3rem; font-size: 1.35rem; }
.invite p { margin: 0; color: var(--muted); max-width: 40rem; }
.btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; padding: .7rem 1.1rem; border-radius: 8px; font-weight: 650; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { background: var(--ember); color: #1c2b3a; } }
:root[data-theme="dark"] .btn { background: var(--ember); color: #1c2b3a; }

/* footer */
footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: 1.75rem 0 2.5rem; color: var(--muted); font-size: .88rem; }
footer .wrap { display: grid; gap: .5rem; }
footer .powered { margin-top: .75rem; font-size: .8rem; opacity: .85; }

/* image viewer */
dialog.viewer { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); }
dialog.viewer::backdrop { background: rgba(12, 18, 24, .82); }
dialog.viewer figure { margin: 0; }
dialog.viewer img { max-height: 82vh; width: auto; border-radius: 6px; }
dialog.viewer figcaption { color: #e8eeec; padding: .6rem 0; font-size: .9rem; display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; }
dialog.viewer button { font: inherit; background: #e8eeec; color: #1c2b3a; border: 0; border-radius: 6px; padding: .35rem .8rem; cursor: pointer; }

/* coming soon page */
.soon { display: grid; grid-template-columns: minmax(0, 18rem) 1fr; gap: 3rem; align-items: center; padding: 4rem 0; }
.soon h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.05; margin: 0 0 1rem; font-variation-settings: "wdth" 118; }
.soon p { color: var(--muted); max-width: 36rem; }
.soon ol { color: var(--muted); padding-left: 1.2rem; max-width: 36rem; }

@media (max-width: 760px) {
  .hero, .soon { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; }
  .ring { max-width: 20rem; margin: 0 auto; }
  .hero > .status { order: -1; }
  .nav { gap: 1rem; font-size: .9rem; }
  .warning { grid-template-columns: 6rem 1fr; }
  .warning img { width: 6rem; }
  .invite { grid-template-columns: 1fr; }
  .nav { margin-left: 0; width: 100%; padding-bottom: .5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* World page */
.world-head { padding: 2rem 0 1rem; }
.world-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; margin: 0 0 .5rem; font-variation-settings: "wdth" 118; }
.world-head .lede { color: var(--muted); max-width: 46rem; margin: 0 0 1rem; }
.map-wrap { margin: 0 0 1rem; }
#map { height: min(68vh, 640px); min-height: 360px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.map-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .6rem; font-size: .82rem; color: var(--muted); }
.map-legend i { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.hs { background: var(--ember-soft); } .hs.hs-h { background: var(--flame); }
.leaflet-container { font: inherit; background: var(--surface); }
.leaflet-popup-content { margin: .7rem .85rem; font-size: .88rem; line-height: 1.4; }
.leaflet-popup-content h4 { margin: 0 0 .2rem; font-size: .98rem; }
.leaflet-popup-content img { width: 220px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 4px; margin: .4rem 0; background: var(--sand); }
.leaflet-popup-content .sat-pop { aspect-ratio: 1; width: 180px; }
.leaflet-popup-content .muted { color: #5b6773; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .leaflet-popup-content-wrapper, :root:not([data-theme="light"]) .leaflet-popup-tip { background: #1a2733; color: #e8eeec; }
  :root:not([data-theme="light"]) .leaflet-popup-content .muted { color: #9fb0ad; }
  :root:not([data-theme="light"]) .leaflet-bar a, :root:not([data-theme="light"]) .leaflet-control-layers { background: #1a2733; color: #e8eeec; border-color: #2c3b48; }
  :root:not([data-theme="light"]) .leaflet-control-attribution { background: rgba(18, 28, 38, .8); color: #9fb0ad; }
  :root:not([data-theme="light"]) .leaflet-control-attribution a { color: #8fb0a8; }
  :root:not([data-theme="light"]) .leaflet-tile-pane .osm-tiles { filter: brightness(.82) contrast(.95) saturate(.8); }
}
.sat-views { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 1rem; }
.sat-view { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.sat-view .pic { position: relative; aspect-ratio: 1; background: var(--sand); display: block; }
.sat-view .pic img { width: 100%; height: 100%; object-fit: cover; }
.sat-view .pic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.5); pointer-events: none; }
.sat-view .body { padding: .6rem .75rem .75rem; display: grid; gap: .15rem; font-size: .85rem; }
.sat-view h3 { margin: 0; font-size: .95rem; }
.sat-view .meta { color: var(--muted); }
.dcp-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.dcp-plan > div { background: var(--surface); border: 1px dashed var(--border); border-radius: 10px; padding: .85rem 1rem; }
.dcp-plan h3 { margin: 0 0 .3rem; font-size: 1rem; }
.dcp-plan p { margin: 0; color: var(--muted); font-size: .9rem; }

/* opt-in browser worker widget (compact pill) */
.helper { display: flex; align-items: center; gap: .7rem; max-width: 24rem; margin: 0 0 1.25rem auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: .55rem .55rem .55rem 1rem; box-shadow: 0 6px 18px rgba(28, 43, 58, .08); }
.helper[hidden] { display: none; }
.hp-dot { position: relative; width: 12px; height: 12px; flex: none; }
.hp-dot::before, .hp-dot i { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--lake); }
.helper[data-state="working"] .hp-dot::before, .helper[data-state="working"] .hp-dot i,
.helper[data-state="starting"] .hp-dot::before, .helper[data-state="starting"] .hp-dot i { background: var(--ember); }
.helper[data-state="working"] .hp-dot i { animation: hpPulse 1.8s ease-out infinite; }
.helper[data-state="paused"] .hp-dot::before, .helper[data-state="unavailable"] .hp-dot::before { background: var(--offline); }
.hp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.hp-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.hp-title { font-size: .85rem; font-weight: 700; }
.hp-frame { font-size: .78rem; color: var(--muted); }
.hp-sub { font-size: .78rem; color: var(--muted); line-height: 1.35; }
.hp-sub[hidden], .hp-stats[hidden], .hp-bar[hidden] { display: none; }
.hp-bar { height: 4px; border-radius: 4px; background: var(--sand); overflow: hidden; position: relative; }
.hp-bar i { position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 4px; background: var(--ember); animation: hpSweep 2.4s ease-in-out infinite; }
.hp-stats { display: flex; flex-wrap: wrap; gap: .1rem .75rem; font-size: .78rem; color: var(--muted); }
.hp-stats b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.hp-main, .hp-info { flex: none; font: inherit; cursor: pointer; }
.hp-main.hp-start { height: 36px; padding: 0 1rem; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-weight: 650; font-size: .88rem; }
.hp-main.hp-icon { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--text); display: flex; align-items: center; justify-content: center; padding: 0; }
.hp-main[hidden] { display: none; }
.hp-info { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: 16px; padding: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hp-main.hp-start, :root:not([data-theme="light"]) .hp-info { background: var(--ember); color: #1c2b3a; } }
:root[data-theme="dark"] .hp-main.hp-start, :root[data-theme="dark"] .hp-info { background: var(--ember); color: #1c2b3a; }
@keyframes hpPulse { 0% { transform: scale(1); opacity: .9; } 70% { transform: scale(2.4); opacity: 0; } 100% { opacity: 0; } }
@keyframes hpSweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .hp-dot i, .hp-bar i { animation: none; } }
/* the widget has its own row on every page: 30 px below the header, at the right (pages leave this space) */
.helper-row { display: flex; justify-content: flex-end; padding-top: 30px; min-height: calc(30px + 62px); }
.helper-row .helper { margin: 0; width: 24rem; max-width: 100%; }
.helper-row + main .hero { padding-top: 1.25rem; }
.helper-row + main .world-head, .helper-row + main .soon, .helper-row + main .page-head { padding-top: 1rem; }
@media (max-width: 760px) { .helper-row { padding-top: 16px; min-height: 0; } .helper-row .helper { width: 100%; } }
dialog.helper-info { border: 0; border-radius: 14px; padding: 1.25rem 1.4rem; max-width: min(36rem, 92vw); background: var(--surface); color: var(--text); box-shadow: 0 18px 40px rgba(0,0,0,.25); }
dialog.helper-info::backdrop { background: rgba(18, 28, 38, .55); }
.hi-head { display: flex; align-items: center; gap: .75rem; }
.hi-head h2 { margin: 0; font-size: 1.3rem; flex: 1; }
.hi-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.helper-info p { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.hi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem 1.25rem; background: var(--bg); border-radius: 10px; padding: .8rem 1rem; margin: 0; font-size: .85rem; }
.hi-grid div { display: flex; justify-content: space-between; gap: .5rem; }
.hi-grid dt { color: var(--muted); } .hi-grid dd { margin: 0; font-weight: 650; text-align: right; }
.hi-small { font-size: .8rem !important; }
.hi-more { border-top: 1px solid var(--border); margin-top: .9rem; padding-top: .6rem; }
.hi-more h3 { margin: 0 0 .2rem; font-size: .95rem; }
.hi-more p { margin: 0 0 .9rem; font-size: .85rem !important; }
.hi-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.hi-actions button { font: inherit; height: 40px; padding: 0 1rem; border-radius: 10px; cursor: pointer; font-weight: 600; }
.hi-cores { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.hi-cores[hidden] { display: none; }
.hi-act { border: 0; background: var(--ink); color: #fff; }
@media (max-width: 560px) { .hi-grid { grid-template-columns: 1fr; } }

/* very narrow phones: keep all header links in view */
@media (max-width: 430px) { .nav { gap: .8rem; font-size: .84rem; } }

/* the world map's Leaflet panes use z-index 400+; keep the whole map in its own stacking context, below the header */
.map-wrap { position: relative; z-index: 0; isolation: isolate; }

/* camera images are always shown whole: ALERTWest/ALERTCalifornia require that the black information bar at the bottom
   and partner logos are never cropped (alertwest.org/crediting-and-branding) */

/* what makes EmberEye different */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin: 0 0 1.25rem; }
.pillar { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--lake); border-radius: 10px; padding: .9rem 1rem; }
.pillar h3 { margin: 0 0 .3rem; font-size: 1rem; }
.pillar p { margin: 0; color: var(--muted); font-size: .92rem; }
.thanks { position: relative; overflow: hidden; border-radius: 14px; padding: 1.4rem 1.5rem 1.25rem; border: 1px solid color-mix(in srgb, var(--st-faint) 45%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--st-faint) 26%, var(--surface)) 0%, color-mix(in srgb, var(--st-det) 10%, var(--surface)) 55%, var(--surface) 100%); }
.thanks::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: linear-gradient(180deg, var(--st-faint), var(--st-det), var(--st-alert)); }
.thanks h3 { margin: 0 0 .45rem; font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 800; line-height: 1.15; font-variation-settings: "wdth" 110; }
.thanks-lede { margin: 0 0 1.1rem; font-size: 1.02rem; max-width: 54rem; }
.givers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .9rem; margin: 0 0 1rem; }
.giver { display: grid; grid-template-columns: auto 1fr; column-gap: .45rem; align-content: start; text-decoration: none; color: inherit;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem 1rem;
  box-shadow: 0 6px 18px rgba(28, 43, 58, .07); transition: transform .15s, box-shadow .15s; }
.giver:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(28, 43, 58, .12); }
.giver-n { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--st-det); font-variant-numeric: tabular-nums; }
.giver-u { align-self: end; color: var(--muted); font-size: .85rem; padding-bottom: .15rem; }
.giver strong { grid-column: 1 / -1; margin-top: .55rem; font-size: 1.08rem; }
.giver-org { grid-column: 1 / -1; color: var(--muted); font-size: .82rem; }
.giver-p { grid-column: 1 / -1; margin-top: .45rem; font-size: .9rem; }
.thanks-foot { margin: 0; color: var(--muted); font-size: .88rem; max-width: 60rem; }
.compute-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 1rem 0 0; padding-top: .85rem; border-top: 1px dashed var(--border); font-size: .92rem; color: var(--muted); }
.compute-cta a.btn { font-size: .9rem; padding: .5rem .9rem; }

/* content pages (add compute, add camera) */
.page-head { padding: 2rem 0 .5rem; }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; line-height: 1.05; margin: 0 0 .6rem; font-variation-settings: "wdth" 118; }
.page-head .lede { color: var(--muted); font-size: 1.08rem; max-width: 46rem; margin: 0; }
.prose { max-width: 48rem; }
.prose p, .prose li { color: var(--text); }
.prose h2 { font-size: 1.35rem; margin: 2rem 0 .4rem; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; margin: 1rem 0; }
.cards3 > div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1rem; }
.cards3 h3 { margin: 0 0 .3rem; font-size: 1rem; }
.cards3 p { margin: 0; color: var(--muted); font-size: .92rem; }
.callout { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--lake); border-radius: 8px; padding: .85rem 1rem; margin: 1rem 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.btn.alt { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

/* add-camera form (pop-up) */
dialog.camform { border: 0; border-radius: 16px; padding: 0; width: min(44rem, 94vw); max-height: 92vh; background: var(--surface); color: var(--text); box-shadow: 0 18px 40px rgba(0,0,0,.25); }
dialog.camform::backdrop { background: rgba(18, 28, 38, .55); }
.cf-head { position: sticky; top: 0; background: var(--surface); padding: 1.1rem 1.3rem .6rem; border-bottom: 1px solid var(--border); display: flex; gap: .75rem; align-items: flex-start; z-index: 1; }
.cf-head h2 { margin: 0; font-size: 1.3rem; flex: 1; }
.cf-head p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.cf-body { padding: 1rem 1.3rem 1.3rem; display: grid; gap: 1rem; }
.cf-body fieldset { border: 1px solid var(--border); border-radius: 10px; padding: .75rem .9rem .9rem; margin: 0; display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.cf-body legend { font-weight: 700; padding: 0 .35rem; }
.cf-body label { display: grid; gap: .25rem; font-size: .88rem; font-weight: 600; }
.cf-body label.wide { grid-column: 1 / -1; }
.cf-body .hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.cf-body input, .cf-body select, .cf-body textarea { font: inherit; font-size: .92rem; padding: .5rem .65rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; }
.cf-body textarea { min-height: 4.5rem; resize: vertical; }
.cf-body input:focus, .cf-body select:focus, .cf-body textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.cf-checks { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-weight: 400 !important; }
.cf-checks label { display: inline-flex; gap: .35rem; align-items: center; font-weight: 400; }
.cf-checks input { width: auto; }
.cf-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; align-items: center; }
.cf-actions button { font: inherit; height: 42px; padding: 0 1.1rem; border-radius: 10px; cursor: pointer; font-weight: 650; }
.cf-send { border: 0; background: var(--ink); color: #fff; }
.cf-copy { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.cf-done { color: var(--muted); font-size: .9rem; margin-right: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cf-send { background: var(--ember); color: #1c2b3a; } }
:root[data-theme="dark"] .cf-send { background: var(--ember); color: #1c2b3a; }

/* confirmed warning card: up to three 30 px tiles choose the frame shown beside them */
.wcar { display: flex; gap: .4rem; align-items: flex-start; }
.wtiles { display: flex; flex-direction: column; gap: 4px; }
.wtiles[hidden] { display: none; }
.wtiles button { width: 30px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; background: var(--sand); cursor: pointer; }
.wtiles button img { width: 100%; height: 100%; object-fit: contain; }   /* whole image: no cropping of operators' frames */
.wtiles button[aria-pressed="true"] { outline: 2px solid var(--st-alert); outline-offset: 1px; }
.wmain img, .wmain .noimg { width: 9rem; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 4px; background: var(--sand); }
@media (max-width: 760px) { .wmain img, .wmain .noimg { width: 7rem; } }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0 .1rem; }
.chip { font-size: .75rem; padding: .05rem .5rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--bg); }
.wlinks { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.tier-older { margin-top: .6rem; font-size: .88rem; color: var(--muted); }
.tier-older summary { cursor: pointer; }
.tier-older ul { margin: .4rem 0 0; padding-left: 1.1rem; }
/* forms: fieldsets must be allowed to shrink (their default minimum width pushed the dialog wider than the screen) */
dialog.camform { overflow-x: hidden; }
.cf-body fieldset { min-width: 0; }
.cf-head > div { flex: 1; min-width: 0; }
.cf-head > .hi-close { flex: none; margin-top: .1rem; }
.cf-group { display: grid; gap: .3rem; font-size: .88rem; }
.cf-label { font-weight: 600; }
.cf-note { margin: 0; font-size: .82rem; color: var(--muted); }
.soon-tag { display: inline-block; vertical-align: middle; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: .1rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--st-faint) 30%, transparent); color: var(--text); margin-left: .3rem; }

/* human verdicts (?user=human) */
.verdict { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .35rem; }
.verdict button { font: inherit; font-size: .78rem; font-weight: 650; padding: .2rem .6rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.verdict .v-fire[aria-pressed="true"] { background: var(--st-alert); border-color: var(--st-alert); color: #fff; }
.verdict .v-not[aria-pressed="true"] { background: var(--st-watch); border-color: var(--st-watch); color: #fff; }
.verdict .v-msg { font-size: .75rem; color: var(--muted); }
.chip-fire { border-color: var(--st-alert); color: var(--st-alert); }
.chip-not { border-color: var(--st-watch); color: var(--st-watch); }

/* image credit under every camera image (operators' requirement, e.g. "ALERTCalifornia | UC San Diego") */
.img-credit { display: block; font-size: .72rem; color: var(--muted); margin: .05rem 0 .15rem; }
.warning .img-credit { font-size: .8rem; margin: -.1rem 0 .25rem; }

/* next steps after a person confirms a fire (?user=human) */
.nextsteps { margin-top: .5rem; }
.nextsteps .ns-urgent { color: var(--text); font-weight: 650; font-size: .88rem; }
.nextsteps summary { cursor: pointer; font-size: .88rem; font-weight: 650; color: var(--text); margin-top: .3rem; }
.nextsteps .ns-note { font-size: .82rem; }
.nextsteps .ns-packet, .nextsteps .ns-outcome { box-sizing: border-box; width: 100%; margin-top: .35rem; font: .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: .5rem; resize: vertical; }
.nextsteps .ns-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.nextsteps .ns-actions button, .nextsteps .ns-claude { font: inherit; font-size: .8rem; font-weight: 650; padding: .2rem .7rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.nextsteps .ns-claude { background: var(--ink); border-color: var(--ink); color: #fff; }
