/* sentinel-globe: styles for the viewer, the info card, hover tip and orbit notice. */

:root {
  color-scheme: dark;
  --ink: #eef9f5;
  --muted: #9db4b2;
  --faint: #718886;
  --panel: rgba(5, 17, 22, 0.76);
  --line: rgba(174, 220, 210, 0.2);
  --teal: #2ec4b6;
  --amber: #f5a623;
  --strip-bg: rgba(5, 17, 22, 0.86); /* behind the credits: 11 px text stays above 4.5:1 over white imagery */
  --ivory: #f1ead9;
  --warn: #ff8f6b; /* stale or failed states only; amber is Sentinel-1 radar */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body, main, .globe-canvas {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #02080c;
  color: var(--ink);
  font-family: var(--font);
}

#sentinel-globe {
  position: relative;
  isolation: isolate;
  background: radial-gradient(circle at 65% 40%, rgba(34, 92, 103, 0.2), transparent 45%), #02080c;
}

.globe-canvas, .cesium-viewer, .cesium-viewer-cesiumWidgetContainer, .cesium-widget, canvas {
  position: absolute;
  inset: 0;
}

/* ---- panels ------------------------------------------------------------------------- */

.glass {
  position: absolute;
  z-index: 5;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(11, 29, 35, 0.86), var(--panel));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(16px) saturate(125%);
}

.legend {
  top: 16px;
  left: 16px;
  width: 330px;
  max-height: calc(100% - 132px);
  padding: 12px;
  overflow: auto;
}

.controls {
  top: 16px;
  right: 16px;
  width: 244px;
  max-height: calc(100% - 132px);
  padding: 10px 12px 12px;
  overflow: auto;
}

.eyebrow, .section-title, .key-help, .source-strip {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eyebrow { margin: 0; color: #a9c7c1; }
.title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
h1 span { color: var(--teal); font-style: italic; }

.legend section:not(.satellite-info) { padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--line); }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #d5eae6;
  font-weight: 700;
}

.fine-print, .attribution, .cloud-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.legend .fine-print, .legend .attribution { margin-top: 4px; }
.legend-gloss { color: #78918e; }
.fine-print.warn { color: var(--warn); }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.status-row .chip { font-size: 11px; }
[data-style-name] { line-height: 1.4; }
[data-source-status]:empty, [data-demo-status]:empty { display: none; }

details { margin: 8px 0; color: var(--muted); font-size: 12px; }
.legend details { margin: 4px 0; }
summary { cursor: pointer; padding: 3px 0; }
[data-other-platforms] > p { font-size: 12px; }
[data-other-platforms] > .satellite-row span { font-size: 11px; }

/* ---- time controls ------------------------------------------------------------------ */

.time-heading { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; }
.time-heading > span { white-space: nowrap; }
.time-heading select { min-width: 0; font-size: 11px; }
.clock-readout {
  margin: 6px 0;
  color: #cbe3de;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.time-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.time-buttons-3 { grid-template-columns: 1fr 1fr 1fr; margin-bottom: 4px; }
.time-buttons-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- constellation rows ------------------------------------------------------------- */

.satellite-list { display: grid; gap: 4px; }
.satellite-row {
  display: grid;
  grid-template-columns: 8px 35px 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 3px 7px;
  color: #dcebe8;
  font-size: 11px;
  text-align: left;
}
.satellite-row i { width: 6px; height: 6px; border-radius: 50%; }
.satellite-row .s1, .card-head .s1 { background: var(--amber); border-radius: 0; transform: rotate(45deg); }
.satellite-row .s2, .card-head .s2 { background: var(--teal); }
.satellite-row > span { white-space: nowrap; }
.satellite-row small { min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.3; }
.satellite-row[aria-pressed="true"] { border-color: #dfd5b8; background: #243335; }
.legend [data-statistics-toggle] { margin: 0; }

.swath-counts { display: flex; flex-wrap: wrap; gap: 7px 11px; color: var(--muted); font-size: 12px; }
.swath-counts span { display: inline-flex; align-items: center; gap: 4px; }
.swath-counts b { color: var(--ink); }
.count-dot { width: 6px; height: 6px; border-radius: 50%; }
.count-dot.upcoming { border: 1px solid var(--teal); }
.count-dot.sweeping { background: #fff6be; box-shadow: 0 0 6px #fff6be; }
.count-dot.covered { background: var(--teal); }

/* ---- form controls ------------------------------------------------------------------ */

select, button, input[type="range"] { width: 100%; }
select, button {
  min-height: 28px;
  border: 1px solid rgba(184, 224, 216, 0.2);
  border-radius: 7px;
  background: rgba(2, 12, 16, 0.62);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}
select { padding: 0 8px; }
[data-style-select] { font-size: 11px; }
button { cursor: pointer; transition: border-color 160ms, background 160ms; }
@media (hover: hover) { button:hover { border-color: rgba(46, 196, 182, 0.7); background: rgba(20, 67, 68, 0.55); } }
button:disabled { opacity: 0.45; cursor: default; }
kbd { color: var(--muted); font-size: 11px; }
input[type="range"] { accent-color: var(--teal); }
:focus-visible { outline: 2px solid #eee2b8; outline-offset: 2px; }

.layers-body { display: contents; }
.layers-body > label { display: block; margin-bottom: 8px; }
.controls label > span:first-child, .app-pop label > span:first-child {
  display: block;
  margin-bottom: 3px;
  color: #b9cfcb;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.controls .cloud-note, .app-pop .cloud-note { margin: -3px 0 8px; }
.controls .preview-status, .app-pop .preview-status { margin: -3px 0 7px; }
.preview-fly { width: auto; padding: 0 10px; margin-bottom: 6px; }
.opacity-row output { float: right; color: var(--ink); }
.appearance label.opacity-row { display: block; margin: 12px 0; }
.more-styles button { margin: 4px 0; }

.toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px; margin: 4px 0 8px; }
.toggle-grid label { display: flex; align-items: center; gap: 6px; color: #bed0cd; font-size: 12px; }
.toggle-grid input { accent-color: var(--teal); }

.button-row { display: grid; grid-template-columns: 34px 34px 1fr 1fr; gap: 6px; margin-top: 8px; }
.button-row.motion-buttons { display: flex; gap: 8px; }
.motion-buttons button { flex: 1; }
.zoom-button { font-size: 18px; line-height: 1; }
.zoom-help { margin: 0; color: #9bb0ad; font-size: 11px; line-height: 1.4; }
.key-help { margin: 8px 0 0; text-transform: none; letter-spacing: 0; color: var(--faint); line-height: 1.5; }

/* ---- help popover ("?") ----------------------------------------------------------------- */

.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; color: #d5eae6; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.help-button { width: 28px; padding: 0; border-radius: 50%; font-weight: 700; }
.help-popover { top: 52px; right: 16px; width: 244px; padding: 10px 12px; z-index: 6; }
.help-popover .zoom-help, .help-popover .key-help { color: var(--muted); font-size: 11px; line-height: 1.5; }

/* ---- satellite information: inline in the constellation, or a narrow-screen sheet ----- */

.satellite-info {
  width: 100%;
  min-width: 0;
  padding: 12px 14px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(3, 14, 19, 0.94); /* tiles and text keep 4.5:1 over bright imagery */
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.legend .satellite-info { margin: 0; }
[data-other-platforms] { display: grid; gap: 5px; }
.satellite-info[data-placement="sheet"] {
  position: absolute;
  z-index: 8;
  left: 12px;
  right: 12px;
  bottom: 12px;
  width: auto;
  max-height: 72vh;
  max-height: 72dvh;
  overflow: auto;
  overscroll-behavior: contain;
  background: #091b22;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.34);
}
.card-head { display: flex; align-items: center; gap: 8px; }
.card-head i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.card-head strong { color: var(--ivory); font-size: 14px; }
.card-head span { color: var(--muted); }
.satellite-info .card-x {
  width: 26px;
  min-height: 26px;
  margin-left: auto;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.card-lead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 8px 0 6px; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.card-times { color: var(--ivory); font-size: 17px; font-weight: 650; line-height: 1.25; }
.card-lead.plain .card-times { font-size: 13px; font-weight: 500; }
.card-when { color: var(--muted); font-size: 12px; }
.card-line { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.satellite-info .chips { margin: 0 0 8px; }
.card-line + .metrics { margin-top: 8px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 6px; margin: 0 0 8px; }
.card-section { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 2px; color: var(--muted); }
.card-section b { flex: none; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; } /* a count never breaks across lines */
.card-all, .card-fold { margin: 2px 0 0; }
.card-all > summary, .card-fold > summary { cursor: pointer; color: var(--teal); }
.card-fold > summary { color: var(--muted); }
.card-all p { margin: 3px 0; color: var(--muted); }
.card-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }

/* ---- shared: metric tile, status chip, labelled bar row (values are text; bars are decoration) ---- */
.metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 7px 9px 8px; border-radius: 7px; background: #0f262d; font-variant-numeric: tabular-nums; }
.metric-label, .metric-cap { color: var(--muted); font-size: 11px; line-height: 1.3; }
.metric-value { color: var(--ivory); font-size: 19px; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric-bar, .bar-track { display: block; height: 4px; border-radius: 2px; background: rgba(174, 220, 210, 0.2); overflow: hidden; }
.metric-bar { margin: 3px 0; height: 3px; }
.metric-bar > i, .bar-track > i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.metric-bar > i.s1, .bar-track > i.s1 { background: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: #16313a; color: var(--ink); font-size: 12px; line-height: 1.45; }
.chip.quiet { background: #0a1c22; color: var(--muted); }
.chip.unknown { background: #0a1c22; border-style: dashed; color: var(--muted); }
.chip.warn { background: #0a1c22; border-color: var(--warn); color: var(--warn); }
.bar-rows { display: grid; gap: 3px; margin: 4px 0 0; padding: 0; list-style: none; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(48px, 1fr) 5ch; align-items: center; gap: 8px; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar-row .bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row b { font-weight: 500; text-align: right; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.card-actions button { width: auto; padding: 0 12px; }
.satellite-info .card-details { margin: 8px 0 0; font-size: 11px; }
.card-details p { margin: 3px 0; }

.hover-tip {
  position: absolute;
  z-index: 7;
  max-width: 520px;
  line-height: 1.45;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(3, 12, 16, 0.88);
  color: var(--ink);
  font-size: 12px;
  pointer-events: none;
}
.tip-head { margin-bottom: 3px; }
.tip-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 12px; margin: 0; }
.tip-row { display: contents; }
.tip-grid dt { color: var(--muted); }
.tip-grid dd { margin: 0; }

/* ---- headline, window switch, coverage legend ------------------------------------- */

.headline { margin: 0 0 8px; color: var(--ink); font-size: 12px; line-height: 1.4; }
.window-toggle { display: grid; grid-template-columns: 0.8fr 1.3fr 1.1fr; gap: 5px; margin-top: 5px; }
.window-toggle button[aria-pressed="true"] { border-color: #dfd5b8; background: #243335; }
.coverage-legend { margin: -4px 0 12px; }
.coverage-title { margin: 0 0 6px; color: #b9cfcb; font-size: 11px; }
.coverage-swatches { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: 11px; }
.coverage-swatches span { display: inline-flex; align-items: center; gap: 4px; }
.coverage-swatches i { width: 14px; height: 10px; border-radius: 2px; }

/* ---- pass timeline (the page's one time surface: click a tick to play, drag empty space to seek) ----------------------------------------- */

.pass-timeline {
  position: absolute;
  z-index: 4;
  left: 16px;
  right: 16px;
  bottom: 30px;
  height: 58px;
  touch-action: none;
  user-select: none;
  border-radius: 8px 8px 0 0;
  background: rgba(11, 29, 35, 0.86);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}
.pass-timeline svg { display: block; overflow: visible; }
.tl-clear { position: absolute; top: 1px; right: 4px; width: auto; min-height: 0; height: 13px; padding: 0 6px;
  border-color: rgba(241, 234, 217, 0.45); border-radius: 4px; color: var(--ivory); font-size: 10px; line-height: 11px; }
.pass-timeline:focus-visible { outline: 2px solid #eee2b8; outline-offset: 1px; }
.tl-night rect { fill: rgba(0, 0, 0, 0.42); }
.tl-days line { stroke: rgba(174, 220, 210, 0.16); stroke-width: 1; }
.tl-days text, .tl-lanes text, .tl-key { fill: var(--muted); font-size: 10px; }
.tl-key { fill: var(--faint); }
.tl-lanes line { stroke: rgba(174, 220, 210, 0.22); stroke-width: 1; }
.tl-tick { transition: opacity 160ms; }
.tl-tick.past { opacity: 0.4; }
.tl-tick.focus, .tl-tick.selected { opacity: 1; stroke: var(--ivory); stroke-width: 1.5; paint-order: stroke; }
.tl-now { stroke: var(--ivory); stroke-width: 1.5; }
.tl-acq.acquired { fill: var(--ivory); }
.tl-acq.missing { fill: none; stroke: var(--warn); stroke-width: 1.2; }
.tl-forecast { display: none; }
@media (min-width: 601px) {
  :root[data-layout="app"] .tl-forecast:not([hidden]) { display: block; position: absolute; inset: 0; pointer-events: none; }
  :root[data-layout="app"] .tl-today { fill: rgba(205, 226, 219, 0.14); }
  :root[data-layout="app"] .tl-day-label, :root[data-layout="app"] .tl-day-total {
    position: absolute; top: 0; color: var(--muted); font: 10px/14px var(--font); white-space: nowrap;
    width: auto; height: 14px; min-height: 0; padding: 0; border: 0; border-radius: 2px;
    background: none; pointer-events: auto;
  }
  :root[data-layout="app"] .tl-day-total { height: 10px; line-height: 10px; background: #0b1d23; padding: 0 1px; }
  :root[data-layout="app"] .tl-day-thinned:not(:focus-visible) { width: 1px; height: 1px; font-size: 0; overflow: hidden; pointer-events: none; }
  :root[data-layout="app"] :is(.tl-day-label, .tl-day-total)[aria-pressed="true"] { background: #20363b; color: var(--ivory); }
  :root[data-layout="app"] :is(.tl-day-label, .tl-day-total):focus-visible { outline: 2px solid var(--ivory); outline-offset: 0; z-index: 2; }
  :root[data-layout="app"] .tl-next {
    position: absolute; width: max-content; max-width: calc(100% - 44px); height: 12px; min-height: 0;
    padding: 0 5px; border: 1px solid var(--tl-family); border-radius: 4px; background: #0b1d23;
    color: var(--ink); font: 10px/10px var(--font); white-space: nowrap; pointer-events: auto;
  }
  @media (hover: hover) { :root[data-layout="app"] .tl-next:hover { background: #20363b; } }
  :root[data-layout="app"] .tl-next:focus-visible { outline: 2px solid var(--ivory); outline-offset: 0; }
  :root[data-layout="app"] .tl-next-pin { stroke-width: 3; }
}

/* ---- drawer and statistics ---------------------------------------------------------- */

.pass-drawer { left: 362px; right: 276px; bottom: 98px; max-height: 48%; padding: 14px; }
.statistics-panel {
  left: 362px;
  right: 276px;
  bottom: 98px;
  max-height: calc(100% - 132px);
  padding: 16px;
  overflow: auto;
  font-size: 13px;
}
.statistics-panel p { line-height: 1.5; }
.freq-families { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 16px; margin: 8px 0 12px; }
.freq-family h3 { margin: 0 0 6px; color: var(--ivory); font-size: 13px; font-weight: 600; }
.freq-family .metrics { margin: 0; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.statistics-panel th small { color: var(--muted); font-size: 11px; font-weight: 400; }
.statistics-panel details { margin: 8px 0 0; }
.cell-bar { display: inline-block; width: 56px; margin-left: 8px; vertical-align: middle; }
.drawer-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.drawer-heading button { width: 65px; }
.heading-actions { display: flex; gap: 6px; }
.drawer-heading .export-button { width: auto; padding: 0 12px; white-space: nowrap; }
.counties-panel td small { color: var(--muted); font-size: 11px; }
.counties-panel tbody tr { cursor: pointer; }
.counties-panel th button { width: auto; min-height: 0; padding: 0; border: 0; background: none; color: inherit; font-weight: 500; }
.counties-panel th button:hover { background: none; color: var(--ivory); }
.counties-panel th[aria-sort="ascending"] button::after { content: " ↑"; color: var(--ivory); }
.counties-panel th[aria-sort="descending"] button::after { content: " ↓"; color: var(--ivory); }
.card-counties { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.pins-panel td:first-child { width: 28px; color: var(--muted); }
.pin-x { width: 26px; min-height: 26px; padding: 0; font-size: 15px; line-height: 1; }
.drawer-heading .export-button:disabled { opacity: 0.4; }
.toast {
  position: absolute;
  z-index: 8;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 12, 16, 0.9);
  color: var(--ink);
  font-size: 12px;
  pointer-events: none;
}
.counties-panel tbody tr:hover, .counties-panel tbody tr:focus-visible { background: rgba(241, 234, 217, 0.07); }
.counties-panel tbody tr:focus-visible { outline: 2px solid var(--ivory); outline-offset: -2px; }
.pass-drawer > label { display: block; margin: 10px 0; font-size: 12px; }
.table-scroll { max-height: 270px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.statistics-panel td, .statistics-panel th { padding: 8px; }
th { position: sticky; top: 0; background: #101e23; font-weight: 500; }
tr[aria-selected="true"] { background: #304343; }
td button { min-width: 48px; }

/* ---- loading veil ------------------------------------------------------------------- */

.loading-veil {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  background: radial-gradient(circle, rgba(6, 25, 31, 0.94), rgba(1, 6, 9, 0.98));
  transition: opacity 600ms ease, visibility 600ms;
}
.loading-veil.done { opacity: 0; visibility: hidden; pointer-events: none; } /* clicks pass through while it fades */
.loading-veil p { margin-top: 20px; color: #a8c6c0; font-family: Georgia, serif; font-style: italic; }
.orbit-loader { position: relative; width: 90px; height: 90px; border: 1px solid rgba(46, 196, 182, .25); border-radius: 50%; transform: rotate(-25deg); }
.orbit-loader::before { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(245, 166, 35, .2); border-radius: 50%; }
.orbit-loader i:first-child { position: absolute; left: 42px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 14px var(--teal); animation: orbit 1.8s linear infinite; transform-origin: 4px 49px; }
.orbit-loader i:last-child { position: absolute; left: 42px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); animation: orbit 2.4s linear infinite reverse; transform-origin: 4px 33px; }
@keyframes orbit { to { transform: rotate(360deg); } }

.source-strip {
  position: absolute;
  z-index: 4;
  left: 16px;
  right: 16px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 14px;
  color: #c9dcd8;
  line-height: 14px;
  pointer-events: none;
}
.credit-line { color: var(--muted); font-size: 11px; letter-spacing: 0; text-transform: none; pointer-events: auto; }
.credit-line .cesium-credit-textContainer, .credit-line .cesium-credit-logoContainer { display: inline; }
.credit-line .cesium-credit-text, .credit-line .cesium-credit-wrapper, .credit-line a { color: var(--muted); font-size: 11px; }
.credit-line .cesium-credit-text + .cesium-credit-text::before { content: " · "; }
.credit-line .cesium-credit-expand-link { padding-left: 6px; text-decoration: underline; cursor: pointer; }

/* ---- Cesium widgets ----------------------------------------------------------------- */

/* No Cesium ion assets are used (base layer and terrain are set by the page), so the ion logo
   carries no obligation; imagery credits render in the source line (creditContainer) and the legend. */
.cesium-credit-logoContainer { display: none !important; }

.layers-button { display: none; }

/* ---- App layout: view toolbar, one popover or drawer at a time, right-edge view buttons,
   and a time dock above the pass timeline. -------------------- */

.app-buttons, .app-switch-slot, .app-nextline, .app-pop, .app-bottom { display: none; }
:root[data-layout="app"] {
  --a-edge: 12px; --a-drawer-bottom: 150px;
}
:root[data-layout="app"] .legend {
  top: var(--a-edge); left: var(--a-edge); width: auto; max-width: calc(100% - 2 * var(--a-edge) - 88px); max-height: none;
  padding: 5px 8px; overflow: visible; border-radius: 10px;
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 4px 10px;
}
:root[data-layout="app"] .legend > :not(.title-row):not(.app-buttons):not(.app-switch-slot):not(.app-nextline):not(.app-chiprow):not([data-demo-status]):not([data-headline]) { display: none; }

:root[data-layout="app"] .legend .title-row { display: block; }
:root[data-layout="app"] .app-switch-slot:empty { display: none; }
/* the day's two counters sit in the top bar after the title: one line here, up to two on a phone (each counter stays whole) */
:root[data-layout="app"] .legend [data-headline] {
  grid-column: 3; grid-row: 1; min-width: 0; margin: 0; color: var(--ink);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; font-size: 14px; line-height: 20px;
}
.hl-label { padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; line-height: 16px; }
.hl-counter { white-space: nowrap; }
:root[data-layout="app"] .legend h1 { font-size: 17px; white-space: nowrap; }
:root[data-layout="app"] .app-buttons { display: flex; gap: 4px; }
:root[data-layout="app"] .app-buttons button { width: auto; min-height: 26px; padding: 0 10px; font-size: 12px; }
:root[data-layout="app"] .app-buttons .layers-button { display: block; }
:root[data-layout="app"] .app-buttons button[aria-expanded="true"] { border-color: #dfd5b8; background: #243335; }
:root[data-layout="app"] #sentinel-globe:has([data-more-source] .fine-print.warn, [data-window-state]:not(:empty)) [data-more-toggle]::after { content: " \25CF"; color: var(--warn); }
:root[data-layout="app"] .app-switch-slot { display: flex; justify-content: flex-end; }
:root[data-layout="app"] .app-nextline { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-width: 0; }
:root[data-layout="app"] .app-next {
  width: auto; min-width: 0; min-height: 24px; padding: 0 8px; overflow: hidden; border-color: transparent; background: transparent;
  color: var(--ink); font-size: 12px; text-align: left; text-overflow: ellipsis; white-space: nowrap;
}
@media (hover: hover) { :root[data-layout="app"] .app-next:hover { border-color: rgba(46, 196, 182, 0.7); background: rgba(20, 67, 68, 0.55); } }
.app-stale {
  flex: none; padding: 1px 7px; border: 1px solid var(--warn); border-radius: 9px; color: var(--warn); font-size: 11px; white-space: nowrap;
}
:root[data-layout="app"] .legend > [data-demo-status] { grid-column: 1 / -1; margin: 0; }

/* the right edge: Romania, Globe, zoom + and - */
:root[data-layout="app"] .controls {
  top: var(--a-edge); right: var(--a-edge); bottom: auto; width: 76px; max-height: none;
  padding: 4px; overflow: visible; border-radius: 10px;
}
:root[data-layout="app"] .controls .panel-head,
:root[data-layout="app"] .controls .motion-buttons { display: none; }
:root[data-layout="app"] .controls .button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0; }
:root[data-layout="app"] .controls .button-row > button { min-height: 26px; padding: 0 2px; font-size: 12px; }
:root[data-layout="app"] .controls .button-row kbd { display: none; }
:root[data-layout="app"] .controls [data-romania] { grid-column: 1 / -1; order: 1; }
:root[data-layout="app"] .controls [data-home] { grid-column: 1 / -1; order: 2; }
:root[data-layout="app"] .controls [data-zoom-in] { order: 3; }
:root[data-layout="app"] .controls [data-zoom-out] { order: 4; }
:root[data-layout="app"] .controls .zoom-button { font-size: 16px; }

/* popovers (Layers, Places, More) and drawers (Passes, Counties, Pins, Frequency) */
:root[data-layout="app"] .app-pop:not([hidden]) { display: block; }
:root[data-layout="app"] .app-pop {
  top: 96px; left: var(--a-edge); width: 330px; max-height: calc(100dvh - 96px - var(--a-drawer-bottom)); z-index: 9; /* above an open card sheet: the popover is the newer, shorter-lived surface */
  padding: 8px 12px 6px; overflow: auto;
}
.app-pop .drawer-heading { margin-bottom: 8px; }
.app-pop .drawer-heading strong { color: #d5eae6; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; }
.app-pop .drawer-heading button { width: 56px; }
.pop-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 4px 0 8px; }
.pop-actions button { min-height: 28px; }
.pop-actions .help-button { width: 100%; border-radius: 7px; }
.app-pop .help-popover { position: static; width: auto; margin: 0 0 8px; padding: 6px 8px; border-radius: 8px; box-shadow: none; }
.app-pop [data-more-source] > section { padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--line); }
.app-pop [data-more-source] > * { margin-top: 6px; }
.app-pop [data-more-source] [data-simulation] { display: block; color: var(--muted); font-size: 11px; }
:root[data-layout="app"] .pass-drawer, :root[data-layout="app"] .statistics-panel {
  left: var(--a-edge); right: auto; bottom: var(--a-drawer-bottom); width: min(980px, calc(100% - 2 * var(--a-edge) - 88px));
  max-height: calc(100dvh - 96px - var(--a-drawer-bottom)); overflow: auto;
}
:root[data-layout="app"] .pass-drawer > .satellite-list { margin: 8px 0 4px; }
:root[data-layout="app"] .satellite-row { min-height: 26px; }
@media (min-width: 601px) {
  :root[data-layout="app"] .satellite-info[data-placement="sheet"] { left: var(--a-edge); right: auto; bottom: var(--a-drawer-bottom); width: min(380px, calc(100% - 2 * var(--a-edge))); }
}

/* bottom: chip, playback row, pass timeline, attribution line */
:root[data-layout="app"] .app-bottom {
  position: absolute; z-index: 5; left: var(--a-edge); bottom: 86px; max-width: calc(100% - 2 * var(--a-edge));
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.app-chiprow { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.app-chip {
  width: auto; min-height: 22px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(5, 17, 22, 0.76);
  color: var(--muted); font-size: 11px; letter-spacing: 0.03em; white-space: nowrap;
}
.app-chip::before {
  content: "i"; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border: 1px solid currentColor; border-radius: 50%;
  font: italic 700 9px/10px Georgia, "Times New Roman", serif; text-align: center; vertical-align: 1px;
}
.app-chip::after { content: " \25B8"; }
.app-chip[aria-expanded="true"]::after { content: " \25BE"; }
.app-honesty {
  padding: 3px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5, 17, 22, 0.88);
  color: #cfe3df; font-size: 11.5px; line-height: 1.4;
}
.app-honesty > span { display: block; }
.app-playback {
  position: static; display: flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 6px; border-radius: 8px;
}
.app-playback > * { flex: none; width: auto; min-width: 0; margin: 0; }
.app-playback button { min-height: 24px; padding: 0 8px; font-size: 12px; white-space: nowrap; }
.app-playback select { min-height: 24px; font-size: 11px; }
.app-playback [data-play] { width: 52px; padding: 0; }
.app-playback .clock-readout { margin: 0 4px; font-size: 12px; white-space: nowrap; }
.app-playback .window-toggle { display: flex; gap: 2px; margin-left: 6px; }
.app-playback .window-toggle button { padding: 0 7px; }
.date-window { display: none; }
.day-chip { display: none; }
:root[data-layout="app"] .pass-timeline { left: var(--a-edge); right: var(--a-edge); bottom: 24px; }
:root[data-layout="app"] .source-strip {
  left: auto; right: var(--a-edge); bottom: 6px; width: max-content; max-width: calc(100% - 2 * var(--a-edge));
  flex-wrap: nowrap; overflow: hidden; text-transform: none; letter-spacing: 0;
  padding: 1px 8px 2px; border-radius: 6px; background: var(--strip-bg);
}
:root[data-layout="app"] .source-strip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: auto; }
:root[data-layout="app"] .credit-line .cesium-widget-credits { position: static; display: inline; padding: 0; }
@media (max-width: 850px) {
  :root[data-layout="app"] .legend { right: var(--a-edge); max-width: none; grid-template-columns: 1fr auto; }
  :root[data-layout="app"] .legend .title-row { grid-column: 1; grid-row: 1; }
  :root[data-layout="app"] .app-switch-slot { grid-column: 2; grid-row: 1; }
  :root[data-layout="app"] .app-buttons { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; }
  :root[data-layout="app"] .app-nextline { grid-row: 3; flex-wrap: wrap; }
  :root[data-layout="app"] .legend [data-headline] { grid-column: 1 / -1; grid-row: 3; }
  :root[data-layout="app"] .legend > [data-demo-status] { grid-row: 4; }
  :root[data-layout="app"] .controls { top: 140px; right: var(--a-edge); bottom: auto; width: 76px; }
  :root[data-layout="app"] .app-nextline { align-items: flex-start; }
  :root[data-layout="app"] .app-next { flex: 1 1 0; height: auto; padding: 2px 6px; line-height: 1.3; white-space: normal; text-align: left; }
  :root[data-layout="app"] .app-playback { flex-wrap: wrap; }
  :root[data-layout="app"] .app-pop, :root[data-layout="app"] .pass-drawer, :root[data-layout="app"] .statistics-panel { left: var(--a-edge); right: var(--a-edge); width: auto; }
  :root[data-layout="app"] .source-strip { left: var(--a-edge); width: auto; }
}

@media (min-width: 601px) {
  /* A single full-width time surface. Forecast summaries remain available to screen readers. */
  :root[data-layout="app"] .app-bottom { right: var(--a-edge); max-width: none; align-items: stretch; }
  :root[data-layout="app"] .app-playback { width: 100%; flex-wrap: nowrap; }
  :root[data-layout="app"] .app-playback .clock-readout { margin: 0; font-size: 15px; }
  :root[data-layout="app"] .app-playback button { padding-inline: 6px; }
  :root[data-layout="app"] .app-playback [data-play] { padding: 0; }
  :root[data-layout="app"] .app-playback [data-timezone] { width: 128px; }
  :root[data-layout="app"] .app-playback [data-speed] { width: 112px; }
  :root[data-layout="app"] .app-playback .window-toggle { margin-left: 0; }
  :root[data-layout="app"] .app-playback .date-window { display: flex; align-items: center; gap: 3px; font-size: 11px; }
  :root[data-layout="app"] .date-window label { display: flex; align-items: center; gap: 3px; }
  :root[data-layout="app"] .date-window label[hidden] { display: none; }
  :root[data-layout="app"] .day-chip:not([hidden]) { display: block; width: 116px; white-space: nowrap; color: var(--ivory); }
  :root[data-layout="app"] .date-window input { box-sizing: border-box; width: 116px; height: 24px; border: 1px solid var(--line); border-radius: 5px; padding: 0 2px; background: #0b1d23; color: var(--ink); color-scheme: dark; font: 11px var(--font); }
  :root[data-layout="app"] .date-window select { width: 66px; padding-inline: 2px; }
  :root[data-layout="app"] .app-playback [data-window-state] { position: absolute; bottom: calc(100% + 4px); left: 0; max-width: 100%; padding: 4px 8px; border-radius: 5px; background: #0b1d23; color: var(--warn); }
  :root[data-layout="app"] .app-playback [data-window-state]:empty { display: none; }
  :root[data-layout="app"] .app-playback .app-nextline { flex: 1 1 0; gap: 4px; flex-wrap: nowrap; align-items: center; }
  :root[data-layout="app"] .app-playback .app-next {
    flex: 1 1 0; display: block; min-height: 24px; height: auto; padding: 0 4px; line-height: normal; white-space: nowrap;
  }
  :root[data-layout="app"] .app-playback .app-chiprow { position: relative; flex-shrink: 1; min-width: 0; }
  :root[data-layout="app"] .app-playback .app-chip { min-width: 32px; overflow: hidden; text-overflow: ellipsis; }
  :root[data-layout="app"] .app-playback .app-honesty {
    position: absolute; right: 0; bottom: calc(100% + 8px); width: min(500px, calc(100vw - 24px));
  }
  :root[data-layout="app"] .app-playback [data-app-nextline] {
    position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; border: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
  }
  :root[data-layout="app"] .app-playback .app-chiprow { margin-left: auto; }
}
@media (min-width: 1280px) and (max-width: 1439px) {
  :root[data-layout="app"] .app-playback { gap: 3px; padding-inline: 4px; }
  :root[data-layout="app"] .app-playback button { padding-inline: 4px; }
  :root[data-layout="app"] .app-playback [data-timezone] { width: 80px; }
  :root[data-layout="app"] .app-playback [data-speed] { width: 84px; }
}
@media (min-width: 601px) and (max-width: 1279px) {
  /* Wrap upwards, so the first row (and clock) stays next to the timeline. */
  :root[data-layout="app"] .app-playback { flex-wrap: wrap-reverse; }
  :root[data-layout="app"] .app-playback .app-nextline { flex-basis: 160px; }
}

/* Phone-only pieces: hidden everywhere else. */
.time-button { display: none; }


/* ---- Phone, 600 px and narrower: the viewer becomes a top bar, a small stack
   (playback rows, footer) above the pass timeline, and one bottom sheet at a time.
   JS (arrangeLayout) moves the nodes; --p-stack and --p-top (set by updateInsets) bound the sheets. ---------- */
@media (max-width: 600px) {
  /* touch targets and text size */
  #sentinel-globe :is(button, select):not(.tl-clear):not(.card-x) { min-height: 34px; font-size: 12px; }
  #sentinel-globe .tl-clear { min-height: 0; }
  #sentinel-globe summary { display: list-item; min-height: 34px; padding: 7px 0; }
  #sentinel-globe label:has(input[type="checkbox"]) { min-height: 34px; }
  #sentinel-globe input[type="range"] { min-height: 34px; }
  #sentinel-globe .satellite-info .card-x { width: 34px; min-height: 34px; }
  #sentinel-globe .counties-panel th button { min-height: 34px; padding: 0 4px; }
  #sentinel-globe .pin-x { width: 34px; min-height: 34px; }
  #sentinel-globe .section-title, #sentinel-globe .satellite-row small,
  #sentinel-globe .controls .button-row > button { font-size: 11px; }
  #sentinel-globe .table-scroll { max-height: none; overflow-x: auto; }
  #sentinel-globe { --p-edge: 8px; }
  /* primary controls: a 44 px box (dock, top bar, next-pass buttons, sheet Close) */
  :root[data-layout="app"] #sentinel-globe :is(.app-playback button:not([data-app-nextline]), .app-switch-slot button, .app-chip, .tl-next,
    [data-card-close], [data-drawer-close], [data-pop-close], [data-counties-close], [data-pins-close], [data-statistics-close]) { min-width: 44px; min-height: 44px; }

  /* the stack above the timeline */
  :root[data-layout] .pass-timeline { left: 8px; right: 8px; bottom: 6px; }
  :root[data-layout] .app-bottom {
    position: absolute; z-index: 5; display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    left: 8px; right: 8px; bottom: 66px; max-width: none;
  }
  :root[data-layout] .source-strip {
    position: static; left: auto; right: auto; bottom: auto; width: auto; max-width: none; flex-wrap: wrap; gap: 0 8px;
    padding: 1px 8px 2px; overflow: visible; border-radius: 8px; background: var(--strip-bg); line-height: 15px; pointer-events: auto;
  }
  :root[data-layout] .source-strip > .source-text { display: none; } /* the sources stay in the honesty chip, More and Data attribution */
  :root[data-layout] .source-strip .credit-line { flex: none; order: 2; margin-left: auto; }
  :root[data-layout] .credit-line .cesium-credit-expand-link { display: inline-flex !important; align-items: center; min-height: 32px; margin: -9px 0; padding: 0 4px; }
  :root[data-layout] .app-chip { min-height: 34px; }

  /* sheets: the shared shell, the drawers, the statistics panel, the info card */
  :root[data-layout] .app-pop:not([hidden]) { display: block; }
  :root[data-layout] .app-pop, :root[data-layout] .pass-drawer, :root[data-layout] .statistics-panel,
  :root[data-layout] .satellite-info[data-placement="sheet"] {
    top: auto; left: 8px; right: 8px; bottom: var(--p-stack, 150px); width: auto; z-index: 6;
    max-height: calc(100% - var(--p-top, 56px) - var(--p-stack, 150px)); overflow: auto; overscroll-behavior: contain;
  }
  /* The pass sheet and the Passes drawer leave 120 px of globe between the top bar and themselves: the pass stays in view. */
  :root[data-layout] .pass-drawer[data-pass-drawer] { max-height: calc(100% - var(--p-top, 56px) - var(--p-stack, 150px) - 120px); }
  :root[data-layout] .app-pop, :root[data-layout] .pass-drawer, :root[data-layout] .statistics-panel { padding: 8px 10px; }
  :root[data-layout] .satellite-info[data-placement="sheet"] { max-height: min(40dvh, calc(100% - var(--p-top, 56px) - var(--p-stack, 150px) - 120px)); }
  .satellite-info .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-bottom: 6px; }
  .satellite-info .metric { padding: 6px 7px 7px; }
  .satellite-info .metric-value { font-size: 17px; }
  .satellite-info .metric-label, .satellite-info .metric-cap { font-size: 11px; line-height: 1.25; }
  .satellite-info .card-actions { margin-top: 6px; }
  .app-pop .pop-actions { grid-template-columns: 1fr 1fr; }
  .app-pop .pop-actions kbd { display: none; }
  .app-pop .pop-actions .layers-button, .app-playback .layers-button { display: block; }
  .app-pop .pop-actions .help-button { width: 100%; }
  .time-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: center; }
  .time-grid > * { grid-column: span 2; margin: 0; min-width: 0; }
  :root[data-layout="app"] .time-grid [data-speed-explanation] { grid-column: 1 / -1; }
  .time-grid .clock-readout { grid-column: 1 / -1; font-size: 14px; }
  .time-grid [data-previous], .time-grid [data-next-pass] { grid-column: span 3; }
  .time-grid .window-toggle { grid-column: 1 / -1; margin: 0; grid-template-columns: 1fr 1fr 1.2fr; }
  .drawer-heading { gap: 8px; }
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .drawer-heading strong { min-width: 0; }
  .drawer-heading button, .app-pop .drawer-heading button { width: auto; min-width: 64px; padding: 0 10px; }

  /* the base map's credit and Data attribution take the first row; the source text keeps the second (its general rule above) */

  /* The legend aside is the top card (title, Romania, Globe, next line); the buttons are in the bottom grid */
  :root[data-layout="app"] .legend {
    top: 8px; left: 8px; right: 8px; width: auto; max-width: none; padding: 4px 6px; gap: 2px 6px;
    grid-template-columns: auto 1fr auto; align-items: center;
  }
  :root[data-layout="app"] .legend .title-row { grid-column: 1; grid-row: 1; }
  :root[data-layout="app"] .legend h1 { font-size: 16px; }
  :root[data-layout="app"] .app-buttons { display: none; }
  :root[data-layout="app"] .app-chiprow { display: contents; }
  :root[data-layout="app"] .app-chip { grid-column: 2; grid-row: 1; justify-self: start; min-width: 0; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; }
  :root[data-layout="app"] .app-chip .chip-more { display: none; } /* "Predicted" on a phone; the button's name keeps "opportunities" */
  /* Phone: the badge floats just under the bar, so the chip keeps its words and the bar keeps its height. */
  :root[data-layout="app"] .app-chiprow > [data-next-stale] { position: absolute; top: calc(100% + 4px); left: 8px; }
  :root[data-layout="app"] .app-honesty { grid-column: 1 / -1; grid-row: 3; }
  :root[data-layout="app"] .app-honesty::after { content: attr(data-sources); display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
  :root[data-layout="app"] .app-switch-slot { grid-column: 3; grid-row: 1; display: flex; gap: 4px; }
  :root[data-layout="app"] .app-switch-slot button { width: auto; padding: 0 10px; font-size: 12px; }
  :root[data-layout="app"] .app-nextline { grid-row: 2; grid-column: 1 / -1; }
  :root[data-layout="app"] .legend [data-headline] {
    grid-column: 1 / -1; grid-row: 2; padding: 0 2px; font-size: 13px; line-height: 17px; gap: 0 10px;
  }
  :root[data-layout="app"] .legend > [data-demo-status] { grid-row: 4; }
  :root[data-layout="app"] .app-next {
    flex: 1 1 0; min-height: 34px; padding: 2px 6px; font-size: 12px; line-height: 1.3; text-align: left; white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  :root[data-layout="app"] .controls { display: none; }
  :root[data-layout="app"] .app-playback { position: static; display: grid; grid-template-columns: 1.1fr 0.9fr 1fr 1.1fr 1.1fr 1fr; gap: 3px; padding: 3px; max-width: none; }
  :root[data-layout="app"] .app-playback > * { width: 100%; }
  :root[data-layout="app"] .app-playback .time-button { display: block; }
  :root[data-layout="app"] .app-playback button, :root[data-layout="app"] .app-playback select { min-height: 34px; padding: 0 4px; font-size: 12px; }
  :root[data-layout="app"] .app-playback select { text-overflow: clip; }

  /* One compact time row and a 113 px timeline. The top 44 px hold the
     next-family buttons; each sampled day is one 32×64 target below them, right of the lane names. */
  :root[data-layout="app"] .pass-timeline { height: 113px; }
  :root[data-layout="app"] .app-bottom { bottom: 121px; }
  :root[data-layout="app"] .app-playback {
    grid-template-columns: minmax(0, 1fr) repeat(5, auto);
  }
  :root[data-layout="app"] #sentinel-globe .app-playback button { font-size: 11px; }
  :root[data-layout="app"] .app-playback .clock-readout { margin: 0; min-width: 0; font-size: 11px; line-height: 14px; letter-spacing: -0.03em; white-space: normal; } /* "26 Sept, 12:00:00", the longest en-GB stamp, breaks after the comma where it does not fit */
  :root[data-layout="app"] .app-playback [data-app-nextline] {
    position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; border: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
  }
  :root[data-layout="app"] .time-grid .date-window {
    display: flex; grid-column: 1 / -1; align-items: center; gap: 8px; min-width: 0;
  }
  :root[data-layout="app"] .date-window label { display: flex; align-items: center; gap: 6px; min-width: 0; }
  :root[data-layout="app"] .date-window label[hidden] { display: none; }
  :root[data-layout="app"] .date-window input {
    box-sizing: border-box; width: 140px; min-width: 0; min-height: 34px; border: 1px solid var(--line);
    border-radius: 5px; padding: 0 4px; background: #0b1d23; color: var(--ink); color-scheme: dark; font: 12px var(--font);
  }
  :root[data-layout="app"] .date-window select { width: 76px; }
  :root[data-layout="app"] .day-chip:not([hidden]) { display: block; min-width: 140px; width: auto; }
  :root[data-layout="app"] .time-grid [data-window-state] { grid-column: 1 / -1; }
  :root[data-layout="app"] .time-grid [data-window-state]:empty { display: none; }
  :root[data-layout="app"] .tl-forecast:not([hidden]) { display: block; position: absolute; inset: 0; pointer-events: none; }
  :root[data-layout="app"] .tl-today { fill: rgba(205, 226, 219, 0.14); }
  :root[data-layout="app"] #sentinel-globe .tl-day-label {
    position: absolute; top: 48px; box-sizing: border-box; width: 32px; height: 64px; min-height: 64px;
    padding: 0 0 48px; border: 0; border-radius: 2px; background: none; color: var(--muted);
    font: 11px/16px var(--font); text-align: left; white-space: nowrap; pointer-events: auto;
  }
  :root[data-layout="app"] .tl-day-total {
    position: absolute; width: auto; min-width: 18px; height: 14px; padding: 0 2px; box-sizing: border-box; background: #0b1d23; border-radius: 2px;
    font: 12px/14px var(--font); text-align: left; pointer-events: none;
  }
  :root[data-layout="app"] .tl-day-label[aria-pressed="true"] { background: rgba(32, 54, 59, 0.7); color: var(--ivory); }
  :root[data-layout="app"] #sentinel-globe .tl-next {
    position: absolute; box-sizing: border-box; width: max-content; max-width: calc(50% - 4px); height: 44px; min-height: 44px;
    padding: 0 4px; border: 1px solid var(--tl-family); border-radius: 4px; background: #0b1d23; color: var(--ink);
    font: 11px/42px var(--font); white-space: nowrap; pointer-events: auto;
  }
  :root[data-layout="app"] :is(.tl-day-label, .tl-next):focus-visible { outline: 2px solid var(--ivory); outline-offset: -2px; }
  :root[data-layout="app"] .tl-next-pin { stroke-width: 3; }
  .tl-days text, .tl-lanes text { font-size: 11px; }
}

/* Tabular numerals where figures change or line up: the clock, countdowns, counts, chips and tables.
   The font shorthands above reset this property, so the selector outranks them. */
:root[data-layout] #sentinel-globe :is(.clock-readout, .headline, .app-next, .app-stale, .swath-counts, .tl-next, .tl-day-label, .tl-day-total, .tl-days text, .tl-lanes text,
  .date-window, .card-lead, .metric, .hover-tip, table) { font-variant-numeric: tabular-nums; }

/* ---- small screens and reduced motion (last, so they win) --------------------------- */

.copy-link { margin-top: 6px; }

@media (max-width: 1100px) { .pass-drawer, .statistics-panel { left: 16px; right: 16px; } }
@media (max-width: 850px) {
  .legend { width: 270px; max-height: 48%; }
  .controls { top: auto; right: 12px; bottom: 96px; width: 230px; }
  .help-popover { top: auto; right: 12px; bottom: 96px; width: 230px; z-index: 6; }
  .pass-timeline { left: 12px; right: 12px; }
  .source-strip { left: 12px; right: 12px; }
  .source-strip > .source-text { display: none; }
}
@media (max-width: 600px) {
  #sentinel-globe:has([data-info-card][data-placement="sheet"]:not([hidden])) .controls { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.sensor-notes ul { margin: 2px 0 6px; padding-left: 16px; }
.sensor-notes li { margin: 2px 0; }

/* ---- example places ("Inside a swath"): layer switcher card and the before/after divider ---------------------------- */

.pop-examples { grid-template-columns: 1fr; }
.explainer-card { left: var(--a-edge, 12px); bottom: var(--a-drawer-bottom, 150px); width: min(360px, calc(100% - 2 * var(--a-edge, 12px) - 88px)); max-height: calc(100dvh - 96px - var(--a-drawer-bottom, 150px)); overflow: auto; padding: 10px 12px 12px; z-index: 5; }
.explainer-card .drawer-heading strong { color: #d5eae6; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; }
.explainer-card .drawer-heading button { width: 64px; }
.explainer-card label > span:first-child { display: block; margin-bottom: 3px; color: #b9cfcb; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.explainer-card label { display: block; margin-top: 8px; }
.explainer-card .explainer-check { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.explainer-card .explainer-check > span:first-child { display: inline; margin: 0; color: var(--ink); font-size: 12px; letter-spacing: 0; text-transform: none; }
.explainer-caption { margin: 8px 0 0; color: #d6e4e1; font-size: 13px; line-height: 1.5; }
.explainer-legend { margin-top: 8px; color: var(--muted); font-size: 11px; }
.explainer-ramp { display: block; height: 10px; border-radius: 3px; border: 1px solid var(--line); }
.explainer-ramp-labels { display: flex; justify-content: space-between; margin-top: 2px; }
.explainer-legend .coverage-swatches { margin-top: 2px; }
.explainer-scenes { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.explainer-scenes-title { display: block; margin-bottom: 3px; color: #b9cfcb; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.explainer-scenes [aria-pressed="true"] { border-color: rgba(241, 234, 217, 0.8); }
.explainer-scene-controls { display: flex; align-items: center; gap: 8px; }
.explainer-scene-controls button { width: auto; min-width: 64px; }
.explainer-scene-controls input[type="range"] { flex: 1; min-width: 0; min-height: 24px; margin: 0; accent-color: var(--ivory); }
.explainer-scene-buttons { display: flex; flex-wrap: wrap; }
.explainer-scene-buttons button { flex: 1 1 30%; padding-left: 4px; padding-right: 4px; font-size: 11px; line-height: 1.25; }
.explainer-scene-stage { margin: 8px 0 0; color: #d6e4e1; font-size: 13px; }
.explainer-scene-stage small { margin-left: 2px; color: var(--muted); font-size: 11px; }
.explainer-stage-kind { margin-right: 4px; padding: 1px 5px; border-radius: 4px; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.explainer-stage-real { background: rgba(46, 196, 182, 0.25); color: #bff0e8; }
.explainer-stage-illustration { background: rgba(241, 234, 217, 0.15); color: var(--ivory); }
#sentinel-globe[data-sheet] .explainer-card { display: none; }
/* The guided story: step header, text, Back / Next, and a dot per step (direct jump). */
.explainer-guide { margin-top: 8px; }
.explainer-step { margin: 0; color: var(--ivory); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.explainer-guide .explainer-caption { margin-top: 6px; }
.explainer-guide-nav { display: flex; gap: 6px; margin-top: 8px; }
.explainer-guide-nav button, .explainer-guide-free button { width: auto; min-height: 32px; flex: 1; padding: 0 8px; }
.explainer-chapter { margin-top: 6px; }
.explainer-chapter select { width: 100%; }
.explainer-guide-free { display: flex; align-items: center; gap: 8px; }
.explainer-guide-free .explainer-scenes-title { margin: 0; }
.explainer-dots { display: flex; flex-wrap: wrap; gap: 0 1px; margin-top: 6px; }
.explainer-dots button { display: grid; width: 24px; min-height: 24px; height: 24px; padding: 0; place-items: center; border: 0; background: none; }
.explainer-dots button:hover { background: rgba(20, 67, 68, 0.55); }
.explainer-dots i { width: 9px; height: 9px; border: 1.5px solid rgba(241, 234, 217, 0.7); border-radius: 50%; }
.explainer-dots button[aria-current="step"] i { border-color: var(--ivory); background: var(--ivory); }
/* Guided: the story picks the image and the scene, so the pickers wait; the step text replaces the layer caption. */
.explainer-card[data-guide] .explainer-layer-row, .explainer-card[data-guide] .explainer-scenes-title,
.explainer-card[data-guide] .explainer-scene-buttons, .explainer-card[data-guide] [data-explainer-caption] { display: none; }
.explainer-card[data-guide] .explainer-scenes { margin-top: 0; padding-top: 0; border-top: 0; }
/* While a scene runs: caption and controls (and the story's step header and Back / Next); "Details" opens the rest. */
.explainer-card[data-collapsed] :is([data-explainer-event], .explainer-chapter, .explainer-layer-row, [data-explainer-mask-row], [data-explainer-legend],
  [data-explainer-caption], [data-explainer-source], .explainer-scenes-title, .explainer-scene-buttons, .explainer-guide-free, .explainer-dots) { display: none; }
.explainer-card[data-collapsed] [data-guide-text] { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.explainer-fold { margin-top: 8px; min-height: 32px; }
.explainer-card[data-collapsed] .explainer-guide { margin-top: 4px; }
.explainer-card[data-collapsed] .explainer-scenes { margin-top: 6px; padding-top: 0; border-top: 0; }
.explainer-card[data-collapsed] .explainer-caption, .explainer-card[data-collapsed] .explainer-scene-stage { margin-top: 6px; }
.explainer-card[data-scene] .explainer-scenes { margin-top: 6px; }
.explainer-swipe { position: absolute; z-index: 4; top: 0; bottom: 0; width: 28px; margin-left: -14px; cursor: ew-resize; touch-action: none; }
.explainer-swipe::before { content: ""; position: absolute; top: 0; bottom: 0; left: 13px; width: 2px; background: rgba(241, 234, 217, 0.9); box-shadow: 0 0 6px rgba(0, 0, 0, 0.6); }
.explainer-swipe::after { content: "\2194"; position: absolute; top: 50%; left: -2px; width: 32px; height: 32px; margin-top: -16px; border: 2px solid var(--ivory); border-radius: 50%; background: rgba(5, 17, 22, 0.86); color: var(--ivory); font-size: 16px; line-height: 28px; text-align: center; }
.explainer-tag { position: absolute; top: 96px; /* near the top: the card covers the lower half on phones */ padding: 2px 6px; border-radius: 5px; background: rgba(5, 17, 22, 0.86); color: var(--ivory); font-size: 11px; white-space: nowrap; }
.explainer-tag-left { right: 22px; }
.explainer-tag-right { left: 22px; }
@media (max-width: 850px) { .explainer-card { right: var(--a-edge, 12px); width: auto; } }
@media (max-width: 600px) {
  :root[data-layout] .explainer-card { left: 8px; right: 8px; bottom: var(--p-stack, 150px); width: auto; max-height: calc(100% - var(--p-top, 56px) - var(--p-stack, 150px)); padding: 8px 10px; overscroll-behavior: contain; }
  .explainer-caption { font-size: 12px; }
  :root[data-layout] .explainer-card[data-collapsed] { max-height: min(40dvh, calc(100% - var(--p-top, 56px) - var(--p-stack, 150px))); }
}

/* ---- clean place mode: while an example place is open, the live simulation steps aside ---------------------------------------- */
#sentinel-globe[data-clean] :is(.pass-timeline, [data-headline], [data-chiprow], [data-time-toggle], [data-demo], [data-demo-status], [data-app-nextline]) { display: none !important; }
@media (min-width: 601px) { #sentinel-globe[data-clean] [data-playback] { display: none !important; } }
/* phone: the dock row keeps Layers and More (the way to Places and the tour); the clock, Play and Passes step aside */
@media (max-width: 600px) { #sentinel-globe[data-clean] [data-playback] > :not([data-layers-toggle]):not([data-more-toggle]) { display: none !important; } }
#sentinel-globe[data-clean] .app-bottom { bottom: 28px; }
.example-label {
  position: absolute; z-index: 5; top: 58px; left: 50%; max-width: calc(100% - 200px); margin: 0; padding: 4px 10px; transform: translateX(-50%);
  border: 1px solid var(--line); border-radius: 6px; background: rgba(5, 17, 22, 0.86); color: var(--ivory); font-size: 12px; line-height: 1.35; text-align: center; pointer-events: none;
}
@media (max-width: 850px) {
  #sentinel-globe[data-clean] .app-bottom { bottom: 6px; }
  .example-label { top: calc(var(--p-top, 92px) + 2px); left: 8px; right: 8px; max-width: none; transform: none; }
  .explainer-tag { top: calc(var(--p-top, 92px) + 34px); }
}
