/* NowSeeHere — one stylesheet, no build step.
   Every colour lives in :root; the canvas reads its colours from here too. */

@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/AtkinsonHyperlegibleNext-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/AtkinsonHyperlegibleNext-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/AtkinsonHyperlegibleNext-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/AtkinsonHyperlegibleNext-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; src: url("../fonts/AtkinsonHyperlegibleMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; src: url("../fonts/AtkinsonHyperlegibleMono-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* Built from the Ismano 2026 palette, deepened for a screen that is on all
   day in a lived-in room: a near-black navy ground, the land one step up,
   aircraft in Mist rising to Cream with altitude. Orange is kept for the one
   thing you chose to look at -- the selected flight and its route. */
:root {
  --ground: #0b1726;          /* navy, deepened */
  --land: #10223a;
  --state-line: #1c3554;
  --coast-line: #2a4a6e;
  --plane-low: #6f7f93;       /* Mist, dimmed: low and slow */
  --plane-high: #f4f0e7;      /* Cream: cruising */
  --plane-ground: #4b5d74;
  --path-line: rgba(244, 240, 231, .16);   /* Cream, faint: every flight's path */
  /* The globe: the sea a step up from space so the sphere reads, and the
     night side a shadow over both. */
  --sea: #0e1d31;
  --night: rgba(3, 8, 15, .32);   /* drawn twice: twilight, then night */
  --live: #f7941d;            /* Orange: the selected flight only */
  /* Radar, light to heavy: Mist, Cream, and Orange for storms -- the radar
     view has no selection, so Orange means only "the strongest" there. */
  --rain-light: #6f7f93;
  --rain-mid: #f4f0e7;
  --rain-heavy: #f7941d;
  --text: #f4f0e7;            /* Cream */
  --muted: #9aa4b1;           /* Mist */
  --faint: #5e6a7a;           /* Slate */
  --panel: rgba(11, 23, 38, .86);
  --panel-line: rgba(244, 240, 231, .12);
  --font: "Atkinson Hyperlegible Next", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ground); color: var(--text);
  font-family: var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: default; }   /* the hand appears over a plane (air.js) */

/* Chrome fades away when nobody is touching it: this is a picture first. */
.chrome { position: fixed; z-index: 2; transition: opacity 1.2s ease; }
body.idle .chrome { opacity: 0; pointer-events: none; }
body.idle .status { opacity: .55; }

.title { top: max(20px, env(safe-area-inset-top)); left: max(24px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.title-name { font-size: 16px; font-weight: 600; letter-spacing: .02em; }   /* as written: NowSeeHere, not NOWSEEHERE */
.title-view { font-size: 13px; color: var(--muted); }

.controls { top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right));
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.controls-buttons { display: flex; gap: 8px; }
.round-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--panel-line);
  background: var(--panel); color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; }
.round-btn:hover, .round-btn[aria-expanded="true"] { color: var(--text); }
.round-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.round-btn svg .dot { fill: currentColor; stroke: none; }
.panel { margin: 0; padding: 6px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 12px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.views-list { list-style: none; min-width: 180px; text-align: left; }

/* Settings: two rows of segmented choices. Radios underneath, so it is a
   real form a keyboard and a screen reader can use. */
.settings { padding: 12px 14px 14px; width: min(320px, calc(100vw - 32px)); }
.settings fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.settings fieldset + fieldset { margin-top: 14px; }
.settings legend { padding: 0; margin-bottom: 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.seg { display: flex; border: 1px solid var(--panel-line); border-radius: 9px; padding: 2px; gap: 2px; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 6px; border-radius: 7px; text-align: center; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg input:checked + span { background: var(--panel-line); color: var(--text); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--muted); outline-offset: 1px; }
.seg label:not(.is-soon):hover span { color: var(--text); }
.seg .is-soon span { color: var(--faint); }
.seg .is-soon input { cursor: default; }
.settings-note { margin: 8px 0 0; font-size: 12px; color: var(--faint); }
/* Find a flight: one field, then the matches if there are several. */
.search { padding: 8px; width: min(300px, calc(100vw - 32px)); }
.search input { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--panel-line);
  background: transparent; color: var(--text); font: 15px var(--mono); letter-spacing: .03em; }
.search input::placeholder { color: var(--faint); font-family: var(--font); letter-spacing: 0; }
.search input:focus { outline: none; border-color: var(--muted); }
.search-msg { margin: 8px 4px 2px; font-size: 12px; color: var(--muted); }
.search-hits { list-style: none; margin: 0; padding: 0; }
.search-hits:not(:empty) { margin-top: 6px; }
.search-hits button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: 600 14px var(--mono); text-align: left; cursor: pointer; }
.search-hits button span { font: 12px var(--font); color: var(--muted); }
.search-hits button:hover { background: var(--panel-line); }
.views-item { display: block; padding: 10px 12px; border-radius: 8px; font-size: 15px; color: var(--text); text-decoration: none; }
a.views-item:hover { background: var(--panel-line); }
.views-item.is-current { color: var(--text); font-weight: 600; }
.views-item.is-current::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 3px;
  background: var(--text); margin: 0 8px 2px 0; }
.views-item.is-soon { color: var(--faint); }
.views-item em { font-style: normal; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-left: 6px; }

.status { right: max(24px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom));
  font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; pointer-events: none; }

/* The card for a tapped flight. */
.card { position: fixed; z-index: 3; left: max(20px, env(safe-area-inset-left)); bottom: max(20px, env(safe-area-inset-bottom));
  width: min(340px, calc(100vw - 40px)); padding: 18px 20px 16px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--panel-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 18px;
  background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.card-close:hover { color: var(--text); }
.card-flight { display: flex; flex-direction: column; gap: 2px; padding-right: 32px; }
.card-flight [data-f="flight"] { font-family: var(--mono); font-weight: 600; font-size: 22px; letter-spacing: .02em; color: var(--live); }
.card-airline { font-size: 14px; color: var(--muted); }
.card-route { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px; margin-top: 16px; }
.card-route .end { display: flex; flex-direction: column; min-width: 0; }
.card-route .end.to { text-align: right; }
.card-route b { font-family: var(--mono); font-weight: 600; font-size: 26px; line-height: 1; }
.card-route span { font-size: 12px; color: var(--muted); margin-top: 4px; max-width: 120px; }
.leg { padding-top: 12px; }
.leg-bar { display: block; height: 2px; background: var(--panel-line); border-radius: 1px; position: relative; }
.leg-done { display: block; position: absolute; inset: 0 auto 0 0; background: var(--live); border-radius: 1px; width: 0; transition: width .6s ease; }
.leg-done::after { content: ""; position: absolute; right: -4px; top: -3px; width: 8px; height: 8px; border-radius: 4px; background: var(--live); }
.card-eta { margin: 10px 0 0; font-size: 13px; color: var(--text); }
.card-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; }
.card-stats div { min-width: 0; }
.card-stats dt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.card-stats dd { margin: 2px 0 0; font-family: var(--mono); font-size: 15px; white-space: nowrap; }
.card-craft { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.card-photo { margin: 14px 0 0; }
.card-photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; background: var(--land); }
.card-photo figcaption { margin-top: 6px; font-size: 11px; color: var(--faint); }

@media (max-width: 600px) {
  .card { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .card-photo img { aspect-ratio: 5 / 2; }
  .title { left: 16px; }
}
@media (prefers-reduced-motion: reduce) { .card { animation: none; } .chrome { transition: none; } }

/* Radar: where the loop is, past (solid) and forecast (after the tick). */
.status { display: flex; align-items: center; gap: 12px; }
.timeline { position: relative; display: inline-block; width: 140px; height: 2px; background: var(--panel-line); border-radius: 1px; }
.timeline-past { position: absolute; inset: 0 auto 0 0; background: var(--faint); border-radius: 1px; }
.timeline-now { position: absolute; top: -4px; width: 1px; height: 10px; background: var(--muted); }
.timeline-dot { position: absolute; top: -3px; width: 8px; height: 8px; margin-left: -4px; border-radius: 4px; background: var(--text); }
.timeline.is-forecast .timeline-dot { background: transparent; border: 1.5px solid var(--text); }
@media (max-width: 600px) {
  /* A phone: the timeline takes whatever the label leaves, the label stays on one line. */
  .status { left: 16px; right: 16px; justify-content: flex-end; }
  .timeline { flex: 1 1 auto; width: auto; min-width: 40px; max-width: 140px; }
  .status > span:last-child { white-space: nowrap; }
}

/* The replay's controls: the status line is otherwise untouchable. */
.play-btn { pointer-events: auto; width: 28px; height: 28px; margin: -8px -4px -8px 0; padding: 0; border: 0;
  background: none; color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; }
.play-btn:hover { color: var(--text); }
.play-btn svg { width: 13px; height: 13px; fill: currentColor; }
.play-btn[data-state="playing"] .i-play, .play-btn[data-state="paused"] .i-pause { display: none; }
.play-btn:focus-visible, .timeline.is-scrub:focus-visible { outline: 2px solid var(--muted); outline-offset: 4px; border-radius: 4px; }
.timeline.is-scrub { pointer-events: auto; cursor: pointer; width: 240px; touch-action: none; }
.timeline.is-scrub::before { content: ""; position: absolute; inset: -14px -6px; }    /* a finger-sized target */
.timeline.is-scrub .timeline-dot { transition: transform .15s; }
.timeline.is-scrub:hover .timeline-dot, .timeline.is-scrubbing .timeline-dot { transform: scale(1.4); }
@media (max-width: 600px) { .timeline.is-scrub { width: auto; max-width: none; } }

/* Satellites: sunlit ones Cream, those in the Earth's shadow a dim Slate. */
:root { --sat-lit: #f4f0e7; --sat-dark: #4b5d74; }
.card-name { font-weight: 600; font-size: 20px; line-height: 1.2; color: var(--live); }
.card-about { line-height: 1.45; }
.card-about a { color: var(--muted); }
.passes { padding: 12px 14px 14px; width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow-y: auto; }
.passes-where { margin: 0; font-size: 14px; color: var(--text); }
.passes-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.text-btn { padding: 7px 10px; border: 1px solid var(--panel-line); border-radius: 8px; background: none;
  color: var(--muted); font: 13px var(--font); cursor: pointer; }
.text-btn:hover { color: var(--text); border-color: var(--muted); }
.passes-now { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.passes-list { list-style: none; margin: 8px 0 0; padding: 0; }
.passes-list button { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.passes-list button:hover { background: var(--panel-line); }
.passes-list button > span:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.passes-list button > span:first-child span { font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; }
.passes-sub { font-size: 12px; color: var(--muted); }
.view-sky .card { max-height: calc(100vh - 40px); overflow-y: auto; }
/* Air traffic's Map choice: two pages, so links dressed as the segmented control. */
.seg-links > * { flex: 1; display: block; padding: 8px 6px; border-radius: 7px; text-align: center; font-size: 13px;
  color: var(--muted); text-decoration: none; white-space: nowrap; }
.seg-links > a:hover { color: var(--text); }
.seg-links > .is-on { background: var(--panel-line); color: var(--text); font-weight: 600; }
.view-sky .search input { font-family: var(--font); letter-spacing: 0; }
/* A word-button in the status line (the line itself is not touchable). */
.status-btn { pointer-events: auto; padding: 6px 10px; margin: -6px 0; border: 1px solid var(--panel-line); border-radius: 8px;
  background: var(--panel); color: var(--muted); font: 12px var(--font); cursor: pointer; }
.status-btn:hover { color: var(--text); }

/* Wildfires: there is nothing to select in that view, so Orange is the hottest
   fire, cooling to an ember and leaving a faint scar where it burned. */
:root {
  --fire-hot: #f7941d;
  --fire-core: #ffe2a8;
  --fire-ember: #9a3b12;
  --fire-scar: #4a2414;
  /* Earthquakes: Mist for the small ones up to Cream; Orange is the chosen one. */
  --quake-small: #6f7f93;
  --quake-big: #f4f0e7;
  /* The aurora: its own greens, the one colour here not from the palette. */
  --aurora-low: #1f9e66;
  --aurora-high: #b8ffd9;
  /* Wind, as rain is: Mist light, Cream fresh, Orange for the strongest (no selection in Weather). */
  --wind-light: #6f7f93;
  --wind-mid: #f4f0e7;
  --wind-strong: #f7941d;
}
/* Aurora outlook rows: not buttons, the same look as a pass. */
.passes-row { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; }
.passes-row > span:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.aurora-overhead { color: var(--aurora-high); font-weight: 600; }
.aurora-horizon { color: var(--aurora-low); font-weight: 600; }
.aurora-none { color: var(--faint); }
