/* What's above you right now · Apogee Geospatial · build above-you-20261105b (house header pattern shared with the other showcases) */
:root {
  --bg: #0B0F14; --panel: #141A20; --panel2: #10161c; --cream: #F7F4EE; --muted: #9AA3AD;
  --sage: #BF5700; --sage2: #E8853D; /* b1 Classic accents (was sage green) */ --line: #1e262e; --line2: #2a343e; --radius: 12px;
  --gold: #E6D5A3; --warn: #E9A23B; --header-h: 56px; --panel-w: 320px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--cream); font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--sage2); text-decoration: none; }
a:hover { color: var(--cream); text-decoration: underline; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 5000; background: var(--sage); color: #fff; padding: 6px 10px; border-radius: 6px; }
.skip:focus { left: 8px; }
.linkish { background: none; border: 0; padding: 0; color: var(--sage2); cursor: pointer; font: inherit; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.noscript { padding: 16px 18px; background: #2a1f0c; color: var(--cream); }

/* Header (house pattern) */
header.app-bar { position: sticky; top: 0; z-index: 1200; height: var(--header-h); display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: rgba(11,15,20,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.app-bar img.wordmark { height: 30px; width: auto; display: block; }
header.app-bar .sub { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header.app-bar nav { margin-left: auto; display: flex; gap: 12px; align-items: center; }
header.app-bar nav a, header.app-bar nav .linkish { font-size: 12px; color: var(--muted); letter-spacing: .04em; text-decoration: none; }
header.app-bar nav a.cta { color: #fff; background: var(--sage); padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(191,87,0,.45); white-space: nowrap; }
header.app-bar nav a.cta:hover { background: #A84B00; }
header.app-bar nav .linkish.hdr-ghost { display: inline-flex; align-items: center; color: var(--cream); font-weight: 500; font-size: 12px; letter-spacing: .04em; line-height: normal;
  padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(247,244,238,.55); background: transparent; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease; }
header.app-bar nav .linkish.hdr-ghost:hover { color: var(--cream); background: rgba(247,244,238,.12); border-color: var(--cream); }
header.app-bar nav .linkish.hdr-ghost:focus { outline: none; }
header.app-bar nav .linkish.hdr-ghost:focus-visible { color: var(--cream); background: rgba(247,244,238,.12); border-color: var(--cream); outline: 2px solid var(--sage2); outline-offset: 2px; }
.lbl-short { display: none; }
@media (max-width: 559px) { header.app-bar .sub { display: none; } }
@media (max-width: 400px) {
  .lbl-long { display: none; } .lbl-short { display: inline; }
  header.app-bar { gap: 10px; padding: 0 12px; }
  header.app-bar nav { gap: 8px; }
  header.app-bar nav .linkish.hdr-ghost { padding: 6px 10px; }
}

/* Toolbar */
.toolbar { display: grid; grid-template-columns: auto minmax(280px, 620px); align-items: center; gap: 6px 18px; padding: 12px 18px 10px; border-bottom: 1px solid var(--line); }
.toolbar h1 { font-family: Syne, "IBM Plex Sans", sans-serif; font-weight: 700; font-size: 24px; margin: 0; letter-spacing: -.01em; }
.search { display: flex; gap: 8px; align-items: center; }
.search input { flex: 1; min-width: 0; height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--cream); padding: 0 12px; font-size: 15px; }
.search input:focus { outline: 2px solid var(--sage2); outline-offset: 1px; }
.search-btns { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--cream); cursor: pointer; white-space: nowrap; font-size: 14px; }
.btn:hover { border-color: var(--sage2); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--sage2); outline-offset: 2px; }
.btn.primary { background: var(--sage); border-color: rgba(191,87,0,.5); color: #fff; }
.btn.primary:hover { background: #A84B00; }
.btn.ghost { background: transparent; border-color: rgba(247,244,238,.45); }
.btn.big { min-height: 48px; padding: 0 22px; font-size: 16px; border-radius: 999px; }
.btn:disabled { opacity: .6; cursor: wait; }
.search-hint { grid-column: 2; margin: 0; font-size: 11px; color: var(--muted); }
.search-msg { grid-column: 2; font-size: 13px; color: var(--gold); min-height: 0; }
.search-msg:empty { display: none; }
.search-results { grid-column: 2; list-style: none; margin: 0; padding: 4px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; }
.search-results button { width: 100%; text-align: left; background: none; border: 0; color: var(--cream); padding: 10px; border-radius: 8px; cursor: pointer; min-height: 44px; }
.search-results button:hover, .search-results button:focus { background: rgba(232,133,61,.15); outline: none; }

/* Stage */
.stage { display: grid; grid-template-columns: var(--panel-w) 1fr; min-height: 560px; height: calc(100vh - var(--header-h) - 120px); height: calc(100dvh - var(--header-h) - 120px); border-bottom: 1px solid var(--line); }
.panel { background: var(--panel2); border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.sheet-bar { display: none; }
.panel-body { padding: 14px 16px 18px; }
.eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sage2); margin: 0 0 8px; font-weight: 600; }
.loc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.loc-label { font-weight: 600; font-size: 15px; }
.mini-btn { background: transparent; color: var(--cream); border: 1px solid rgba(247,244,238,.45); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; min-height: 32px; }
.mini-btn { position: relative; }
.mini-btn::before { content: ""; position: absolute; inset: -7px -4px; } /* 44 px hit area, same visual */
.mini-btn:hover { background: rgba(247,244,238,.1); }
.facts { list-style: none; margin: 0 0 12px; padding: 0; min-height: 190px; }
.facts li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.facts .ico { text-align: center; color: var(--sage2); }
.moon-glyph .moon-dark { fill: #2a343e; stroke: #58636e; stroke-width: .8; }
.moon-glyph .moon-lit { fill: #F2EBD3; }
.linkout { font-weight: 600; }
.sky-panel h3, .skyview h3 { font-size: 13px; margin: 14px 0 6px; font-weight: 600; }
.sky-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sky-table th { text-align: left; font-weight: 400; color: var(--muted); padding: 3px 8px 3px 0; white-space: nowrap; vertical-align: top; }
.sky-table td { padding: 3px 0; }
.sky-table .moon-glyph { vertical-align: -3px; }
.tw-pill { display: inline-block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(232,133,61,.15); color: var(--sage2); margin-bottom: 6px; }
#skyview { width: 200px; height: 200px; display: block; margin: 4px auto; overflow: visible; }
.sv-horizon { fill: #0d141b; stroke: #58636e; stroke-width: 1; }
.sv-ring { fill: none; stroke: #2a343e; stroke-width: .7; }
.sv-lbl { fill: var(--muted); font-size: 9px; font-family: "IBM Plex Mono", monospace; }
.sv-sat circle { fill: #9AA3AD; } .sv-sat.visual circle, .sv-sat.station circle { fill: #fff; }
.sv-sat .ring { fill: none !important; stroke: var(--sage2); stroke-width: 1.2; }
.sv-iss circle { fill: #E9A23B; stroke: #fff; stroke-width: 1; } .sv-iss text { fill: #E9A23B; }
.sv-air rect { fill: #4fb3c8; }
.sv-sun circle { fill: #FFD35C; } .sv-moon circle { fill: #F2EBD3; }
[data-kind] { cursor: pointer; }
.legend { text-align: center; color: var(--muted); margin: 4px 0 0; line-height: 1.8; }
.lg { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 3px 0 8px; vertical-align: 0; }
.lg.sat { background: #9AA3AD; } .lg.vis { border: 1.5px solid var(--sage2); } .lg.iss { background: #E9A23B; } .lg.air { background: #4fb3c8; border-radius: 1px; transform: rotate(45deg); } .lg.sun { background: #FFD35C; } .lg.moon { background: #F2EBD3; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 12px; }
.dot-btn { background: none; border: 0; color: var(--cream); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 4px 2px; min-height: 28px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.ok, .dot.green { background: #A7C7E7; } /* live/ok UI status → steel blue (b1 rate-up); not map data */ .dot.amber { background: var(--warn); } .dot.grey { background: #5c6670; }
.snapshot-note { margin: 8px 0 0; }

/* Map */
.map-wrap { position: relative; min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; background: #dfe3e6; }
.bm-dark#map, #map.bm-dark { background: #1b2026; }
.prompt-card { position: absolute; z-index: 800; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(16,22,28,.94); border: 1px solid var(--line2); border-radius: var(--radius); padding: 16px 20px; text-align: center; max-width: 320px; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.prompt-card p { margin: 0 0 8px; }
.prompt-card[hidden] { display: none; }
.chips { position: absolute; z-index: 700; left: 56px; top: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; max-width: calc(100% - 200px); }
.chip { pointer-events: auto; background: rgba(16,22,28,.9); color: var(--cream); border: 1px solid var(--line2); border-radius: 999px; padding: 5px 12px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.chip.warn { border-color: var(--warn); color: #ffd79a; }
.chip.info { border-color: rgba(191,87,0,.5); }
.chip .sw { width: 10px; height: 10px; border-radius: 2px; background: linear-gradient(90deg, #04e9e7, #01c501, #fdf802, #fd9500, #fd0000); }
.chip-btn { background: var(--sage); color: #fff; border: 0; border-radius: 999px; padding: 3px 10px; cursor: pointer; font-size: 12px; min-height: 28px; }
.card { position: absolute; z-index: 1050; right: 12px; bottom: 36px; width: 300px; max-height: calc(100% - 60px); overflow-y: auto; background: rgba(16,22,28,.97); border: 1px solid var(--line2); border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.card[hidden] { display: none; }
.card h3 { margin: 0 28px 8px 0; font-size: 16px; }
.card-close { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border: 0; background: none; color: var(--cream); font-size: 22px; cursor: pointer; border-radius: 8px; }
/* An expanded Layers list must still sit above an open card */
.leaflet-top:has(.leaflet-control-layers-expanded) { z-index: 1070; }
.leaflet-control-layers-expanded { position: relative; z-index: 2; } /* open list paints over the radius buttons below it */
.card-close:hover { background: rgba(247,244,238,.1); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0 0 8px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.badge { font-size: 11px; padding: 2px 6px; border-radius: 6px; vertical-align: 2px; }
.badge.red { background: #b3261e; color: #fff; }
.toast { position: absolute; z-index: 1060; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--cream); color: var(--bg); padding: 8px 14px; border-radius: 999px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.toast[hidden] { display: none; }

/* Leaflet pieces */
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 10.5px; background: rgba(255,255,255,.85) !important; color: #333; max-width: 70vw; }
.bm-dark .leaflet-control-attribution { background: rgba(16,22,28,.85) !important; color: #cfd6dc; }
.bm-dark .leaflet-control-attribution a { color: #E8853D; }
.radius-ctl { display: flex; background: #fff; border-radius: 8px; overflow: hidden; }
.radius-ctl button { border: 0; background: #fff; color: #1d2733; padding: 0 10px; min-width: 44px; height: 34px; cursor: pointer; font-size: 13px; border-right: 1px solid #d5dade; }
.radius-ctl button:last-child { border-right: 0; }
.radius-ctl button[aria-pressed="true"] { background: var(--sage); color: #fff; font-weight: 600; }
.radius-ctl button:focus-visible { outline: 2px solid var(--sage2); outline-offset: -2px; }
.radar-legend { background: rgba(255,255,255,.9); color: #1d2733; border-radius: 8px; padding: 4px 8px; font-size: 11px; min-width: 150px; }
.bm-dark .radar-legend { background: rgba(16,22,28,.9); color: var(--cream); }
.radar-legend summary { cursor: pointer; min-height: 24px; line-height: 24px; }
.radar-legend .ramp { height: 8px; border-radius: 3px; margin-top: 4px; background: linear-gradient(90deg, #04e9e7, #019ff4, #0300f4, #02fd02, #01c501, #008e00, #fdf802, #e5bc00, #fd9500, #fd0000, #d40000, #bc0000, #f800fd); }
.ramp-lbl { display: flex; justify-content: space-between; }
.you-icon .you-dot { display: block; width: 18px; height: 18px; margin: 2px; border-radius: 50%; background: #1e88e5; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(30,136,229,.35), 0 2px 6px rgba(0,0,0,.35); }
.iss-icon img { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.leaflet-tooltip.iss-label { background: #E9A23B; color: #1a1205; border: 0; font-weight: 700; font-size: 11px; padding: 1px 6px; box-shadow: none; }
.leaflet-tooltip.iss-label::before { display: none; }
.plane-icon { background: none; border: 0; }
.plane-icon .plane { display: block; transform-origin: 50% 50%; }
.plane-icon svg { width: 100%; height: 100%; display: block; stroke: #fff; stroke-width: 1.2; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.45)); }
.plane.low svg { fill: #0f9d8a; } .plane.mid svg { fill: #1e6fd9; } .plane.high svg { fill: #4b3fb5; } .plane.ground svg, .plane.unk svg { fill: #8a939c; }
.bm-dark .plane.low svg { fill: #3fe0c5; } .bm-dark .plane.mid svg { fill: #6fb0ff; } .bm-dark .plane.high svg { fill: #a99dff; } .bm-dark .plane svg { stroke: #0B0F14; }
.plane.emerg svg { fill: #d32f2f !important; }
@media (prefers-reduced-motion: no-preference) { .plane-icon .plane { transition: transform .6s ease; } }

/* About + CTA */
.about { max-width: 920px; margin: 0 auto; padding: 32px 20px 12px; outline: none; }
.about h2 { font-family: Syne, "IBM Plex Sans", sans-serif; font-size: 22px; margin: 0 0 10px; }
.about p, .about li { font-size: 14px; line-height: 1.6; color: #dfe3e6; }
.about-list { padding-left: 18px; }
.about-list li { margin-bottom: 6px; }
.licences summary { cursor: pointer; color: var(--sage2); font-size: 13px; min-height: 32px; line-height: 32px; }
.cta-block { max-width: 920px; margin: 10px auto 48px; padding: 22px 20px; border: 1px solid var(--line2); border-radius: var(--radius); background: var(--panel); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.cta-block p { margin: 0; font-size: 15px; max-width: 560px; line-height: 1.5; }
.cta-block .btn.big { color: #fff; }

/* Mobile (< 900 px): stacked search, 65dvh map, summary as a bottom sheet under the map */
@media (max-width: 899px) {
  .toolbar { grid-template-columns: 1fr; padding: 10px 12px; }
  .toolbar h1 { font-size: 20px; }
  .search { flex-direction: column; align-items: stretch; }
  .search input { flex: none; height: 44px; font-size: 16px; }
  .search-btns .btn { flex: 1; min-height: 44px; }
  .search-hint, .search-msg, .search-results { grid-column: 1; }
  .search-hint { display: none; }
  .toolbar h1 { line-height: 1.2; }
  .stage { display: flex; flex-direction: column; height: auto; min-height: 0; }
  /* 65dvh, capped so the whole map (and its attribution) fits above the collapsed sheet on short phones */
  .map-wrap { order: 1; height: 65vh; height: min(65dvh, calc(100dvh - 262px)); min-height: 320px; }
  .panel { order: 2; position: sticky; bottom: 0; z-index: 1100; border-right: 0; border-top: 1px solid var(--line2); max-height: 56px; overflow: hidden; box-shadow: 0 -8px 24px rgba(0,0,0,.35); border-radius: 14px 14px 0 0; transition: max-height .25s ease; }
  .panel.open { max-height: 75vh; max-height: 75dvh; overflow-y: auto; }
  .sheet-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-height: 56px; background: var(--panel2); color: var(--cream); border: 0; padding: 6px 12px 8px; cursor: pointer; position: sticky; top: 0; z-index: 2; }
  .grip { width: 40px; height: 4px; border-radius: 2px; background: #58636e; }
  .sheet-line { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .card { left: 8px; right: 8px; bottom: 26px; width: auto; max-height: 60%; } /* stays clear of the attribution line */
  .chips { left: 52px; max-width: calc(100% - 170px); }
  .leaflet-control-attribution { max-width: calc(100vw - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
  .leaflet-control-attribution.open { white-space: normal; }
  .leaflet-control-layers-toggle { width: 44px !important; height: 44px !important; }
  .leaflet-bar a { width: 44px !important; height: 44px !important; line-height: 44px !important; font-size: 22px !important; }
  /* 44 px tap targets (SPEC.md:134) */
  .dot-btn { min-height: 44px; min-width: 44px; padding: 0 6px; }
  .status-row { gap: 0 6px; }
  .card-close { width: 44px; height: 44px; right: 2px; top: 2px; }
  .leaflet-bottom.leaflet-left .leaflet-control { margin-bottom: 24px; } /* radar legend sits clear of the full-width attribution line */
  .radar-legend { padding: 0 8px 4px; }
  .radar-legend summary { min-height: 44px; line-height: 44px; }
  .btn { min-height: 44px; }
  .radius-ctl button { height: 44px; min-width: 44px; padding: 0 8px; }
  .radius-ctl .u { display: none; }
  .cta-block { margin: 10px 12px 90px; }
}
@media (prefers-reduced-motion: reduce) { .panel { transition: none; } }
