/* squawkchill: an after-hours radio room with an airport outside the glass.
   Brief: docs/implementation-design-brief.md. States: docs/component-states.md.
   Three planes: a quiet location bar, one framed listening scene, and a shared live-airspace field.
   Color is light in a night scene, not a decorative system. */

@font-face { font-family: 'B612'; src: url('/fonts/B612-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'B612'; src: url('/fonts/B612-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'B612 Mono'; src: url('/fonts/B612Mono-Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/fonts/InstrumentSerif-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --night: #0b1020;      /* deep night: the page plane */
  --blue-black: #141a31; /* scene depth, the sill, the lower field */
  --ink: #f4eee5;        /* night ink: warm, never pure white */
  --fog: #bac0d2;        /* secondary text */
  --fog-dim: #959bb0;    /* tertiary text: 6.8:1 on --night, 5.2:1 on --track */
  --amber: #ffb454;      /* runway amber: active station, airport marker, listen */
  --mint: #86d8b4;       /* signal mint: playing / open only */
  --sky: #7fc8e8;        /* departures accent */
  --violet: #bba8f2;     /* arrivals accent */
  --track: #202844;      /* controls and recessed native surfaces */
  --frame: #060913;      /* the window frame, a silhouette against the outside */
  --on-accent: #16120b;
  --hair: rgba(244, 238, 229, .09);
  --hair-soft: rgba(244, 238, 229, .055);
  --mono: 'B612 Mono', ui-monospace, Consolas, monospace;
  --sans: 'B612', 'Segoe UI', system-ui, sans-serif;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --split: 45%;          /* view / music split in the scene, and where the mullion stands */
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { color: var(--ink); background: var(--night); font: 15px/1.5 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
body::before { /* grain: felt, not noticed */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
a { color: inherit; text-underline-offset: 3px; }
button, select, input { font: inherit; color: inherit; }
p, h1, h2, h3 { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* ---------- Plane 1: location bar ---------- */
.top { display: flex; align-items: center; gap: 18px; padding: 18px 28px 16px; max-width: 1240px; width: 100%; margin: 0 auto; }
.marker { position: relative; display: inline-flex; align-items: center; min-height: 44px; }
.marker-face {
  font: 700 21px/1 var(--sans); letter-spacing: .14em; color: var(--amber);
  padding: 6px 24px 6px 0; position: relative; border-bottom: 1px solid rgba(255, 180, 84, .35);
}
.marker-face::after { content: ''; position: absolute; right: 4px; top: 50%; margin-top: -2px; border: 5px solid transparent; border-top-color: var(--amber); }
.marker:hover .marker-face { border-bottom-color: var(--amber); }
.marker select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 15px; }
.marker:focus-within .marker-face { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 2px; }
.place { display: flex; align-items: baseline; gap: 10px; font-size: 15px; min-width: 0; }
.place #airportCity { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place .sep { color: var(--fog-dim); }
.clock { color: var(--fog); font-variant-numeric: tabular-nums; white-space: nowrap; }
.logo { display: block; width: 224px; height: auto; flex: none; } /* a signature, not a masthead */
.top > .logo { margin-left: auto; } /* the header gap plus auto margin give at least the mark height of clear space */

/* ---------- Layout ---------- */
.wall { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 2px 28px 24px; display: flex; flex-direction: column; gap: 44px; }

/* ---------- Plane 2: the listening scene ---------- */
.scene {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 10px; min-height: 468px;
  background: var(--night); display: grid; grid-template-columns: var(--split) 1fr; grid-template-rows: 1fr auto;
  box-shadow: 0 0 0 1px rgba(244, 238, 229, .06), 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.scene-art { position: absolute; inset: 0; z-index: -2; }
.scene-art svg { width: 100%; height: 100%; display: block; }
/* The glass and frame: the right pane is the room's own window, darker, holding the music.
   One mullion stands at the split; its airport-facing edge catches the apron light. */
/* The view gives way to the music side through a soft luminance fall-off, not a divider:
   the horizon and atmosphere carry on, dimmer, behind the text. */
.scene-frame { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to right, transparent 28%, rgba(9, 13, 27, .5) 44%, rgba(9, 13, 27, .8) 60%, rgba(9, 13, 27, .86) 100%); }
.scene-frame::after { /* inner edge of the frame all round */
  content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 6px var(--frame), inset 0 0 0 7px rgba(244, 238, 229, .05);
}

/* The one line: from the airport, across the glass, to what is playing. */
.scene-link { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
#sceneLinkPath { fill: none; stroke: var(--amber); stroke-width: 1; opacity: .42; }
#sceneLinkFrom { fill: var(--amber); }
#sceneLinkTo { fill: var(--amber); }

.scene-place { grid-column: 1; grid-row: 1; align-self: start; padding: 34px 36px; position: relative; z-index: 2; }
.airport-name { font: 700 13px/1.35 var(--sans); letter-spacing: .12em; text-transform: uppercase; max-width: 30ch; text-shadow: 0 1px 12px rgba(11, 16, 32, .9); }
.channel-count { margin-top: 5px; font-size: 13px; color: var(--fog); text-shadow: 0 1px 10px rgba(11, 16, 32, .9); }

.scene-now { grid-column: 2; grid-row: 1; align-self: center; padding: 44px 56px 30px 60px; position: relative; z-index: 2; max-width: 640px; }
.program { font: 13px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.track-title { /* never truncated; app.js steps the size down (bounded) so desktop never needs a third line */
  margin-top: 14px; max-width: 15em; font: 400 42px/1.06 var(--serif); letter-spacing: -.005em; color: var(--ink);
  text-wrap: balance; overflow-wrap: break-word; hyphens: manual;
}
.track-title a { color: inherit; text-decoration: none; }
.track-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.track-title.waiting { color: var(--fog-dim); }
.track-artist { margin-top: 11px; font-size: 18px; line-height: 1.35; letter-spacing: .01em; color: color-mix(in srgb, var(--ink) 88%, var(--amber)); min-height: 24px; } /* artist credit: warm, not a data field */
.mood { margin-top: 18px; font-size: 15px; color: var(--fog); }
.curator { margin-top: 3px; font-size: 12.5px; color: var(--fog-dim); }

/* Transport: one tactile control, its two neighbours tight beside it, a quiet volume rail */
.transport { min-width: 0; display: flex; align-items: center; gap: 8px; margin-top: 26px; height: 64px; } /* prev, play, next, volume: one bar, one rhythm */
.play-btn {
  width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  display: grid; place-items: center; background: var(--amber); color: var(--on-accent);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .7), inset 0 -2px 0 rgba(0, 0, 0, .14);
}
.play-btn svg { width: 24px; height: 24px; fill: currentColor; grid-area: 1 / 1; }
.play-btn .i-play { margin-left: 3px; }
.play-btn .i-pause, .play-btn[aria-pressed="true"] .i-play { display: none; }
.play-btn[aria-pressed="true"] .i-pause { display: block; }
.play-btn[aria-pressed="true"] { background: var(--mint); }
.play-btn[aria-disabled="true"] { background: var(--ink); opacity: .4; cursor: default; }
.play-btn:active:not([aria-disabled="true"]) { transform: translateY(1px); }
.skip {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--fog); cursor: pointer;
  display: grid; place-items: center; flex: none;
}
.skip svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip:hover { color: var(--ink); background: rgba(244, 238, 229, .06); }
.skip[aria-disabled="true"] { opacity: .4; cursor: default; background: transparent; color: var(--fog); }
.vol { flex: 0 1 200px; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; margin-left: 8px; color: var(--fog); }
.vol svg { width: 18px; height: 18px; flex: none; fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.vol input { --v: 60%; flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.vol input::-webkit-slider-runnable-track { height: 2px; border-radius: 1px; background: linear-gradient(to right, var(--ink) var(--v), rgba(244, 238, 229, .2) var(--v)); }
.vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; border-radius: 50%; border: 0; background: var(--ink); box-shadow: 0 0 0 4px rgba(11, 16, 32, .6); }
.vol input::-moz-range-track { height: 2px; border-radius: 1px; background: rgba(244, 238, 229, .2); }
.vol input::-moz-range-progress { height: 2px; border-radius: 1px; background: var(--ink); }
.vol input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 0; background: var(--ink); }
.vol input:focus-visible { outline-offset: 0; }
.player-note { margin-top: 8px; font-size: 12.5px; color: var(--fog); min-height: 19px; }

/* Station schedule: the sill. Programmes on the left, that programme's stations beside them,
   so the line stays short however many stations there are. */
.rail {
  grid-column: 1 / -1; grid-row: 2; position: relative; z-index: 2;
  display: flex; align-items: stretch; min-width: 0;
  padding: 0 22px; background: linear-gradient(var(--blue-black), #10152a); border-top: 1px solid rgba(244, 238, 229, .1);
  box-shadow: 0 -12px 24px -10px rgba(0, 0, 0, .5);
}
.programmes { display: flex; align-items: center; gap: 2px; flex: none; padding-right: 18px; margin-right: 6px; border-right: 1px solid var(--hair-soft); }
.programme {
  position: relative; min-height: 44px; padding: 0 12px; background: none; border: 0; cursor: pointer; white-space: nowrap;
  font: 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fog-dim);
}
.programme:hover { color: var(--ink); }
.programme[aria-selected="true"] { color: var(--ink); }
.programme[aria-selected="true"]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 9px; height: 1px; background: var(--fog); }
.programme.has-playing::before { /* where the playing station lives, when you're browsing another programme */
  content: ''; position: absolute; right: 4px; top: 13px; width: 4px; height: 4px; border-radius: 50%; background: var(--amber);
}
.stations { display: flex; align-items: stretch; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.stations::-webkit-scrollbar { display: none; }
.station[hidden] { display: none; }
.station {
  position: relative; flex: none; text-align: left; cursor: pointer; min-height: 64px; padding: 14px 22px 13px;
  background: none; border: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; color: var(--fog);
}
.station .s-name { font-weight: 700; font-size: 14px; white-space: nowrap; }
.station .s-cur { font-size: 11.5px; color: var(--fog-dim); white-space: nowrap; }
.station:hover { color: var(--ink); }
.station[aria-pressed="true"] { color: var(--ink); }
.station[aria-pressed="true"] .s-cur { color: var(--fog); }
.station[aria-pressed="true"]::before { /* the runway-light line, a little wider than its label */
  content: ''; position: absolute; top: -1px; left: 12px; right: 12px; height: 2px; background: var(--amber); border-radius: 0 0 2px 2px;
}
.station:focus-visible { outline-offset: -4px; }

/* ---------- Plane 3: live airspace ---------- */
.airspace {
  display: grid; gap: 0 40px; align-items: start;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  grid-template-areas: "label label" "board channels";
}
/* ads on: the 300x250 sits under the tower channels, beside the board; never between rows */
body[data-ads="on"] .airspace { grid-template-columns: minmax(0, 1.7fr) minmax(340px, 1fr); grid-template-areas: "label label" "board channels" "board slot"; }
body[data-ads="on"] .slot { margin: 28px 0 0 32px; }
.plane-label {
  grid-area: label; display: flex; align-items: center; gap: 14px; margin-bottom: 10px;
  font: 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--fog);
}
.plane-label::after { content: ''; flex: 1; height: 1px; background: var(--hair); }
.board { grid-area: board; min-width: 0; }
.channels { grid-area: channels; min-width: 0; padding-left: 32px; border-left: 1px solid var(--hair-soft); align-self: stretch; }

.board-top { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 26px; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer; font: 700 16px var(--sans); color: var(--fog-dim);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); cursor: default; }
.tab[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--ink); border-radius: 1px; }
.pict { width: 16px; height: 16px; fill: currentColor; }
.tab.dep .pict { transform: rotate(60deg); color: var(--sky); }
.tab.arr .pict { transform: rotate(120deg); color: var(--violet); }
.tab[aria-selected="false"] .pict { opacity: .6; }
.board-meta { display: flex; gap: 18px; font-size: 12.5px; color: var(--fog); }
.board-meta b { font-weight: 400; font-family: var(--mono); color: var(--ink); }

.rows { font: 14px var(--mono); min-height: 120px; margin-top: 6px; }
.frow {
  display: grid; align-items: center; gap: 14px; min-height: 40px; padding: 8px 0; border-top: 1px solid var(--hair-soft);
  grid-template-columns: 8.4rem minmax(0, 1fr) 6.8rem 4.8rem 4rem;
}
.frow.head { min-height: 0; padding: 6px 0 8px; border-top: 0; font: 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fog-dim); }
.frow > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow .c-alt, .frow .c-due { text-align: right; font-variant-numeric: tabular-nums; color: var(--fog); }
.frow.head .c-alt, .frow.head .c-due { color: var(--fog-dim); }
.frow .c-flight { color: var(--ink); letter-spacing: .05em; }
.frow.head .c-flight { color: var(--fog-dim); letter-spacing: .12em; }
.frow:not(.head) .c-op { color: var(--fog); font-family: var(--sans); font-size: 13.5px; }
.frow.empty, .rows.is-empty .frow.head { display: none; } /* only real flights render; no empty table */
/* The one split-flap moment: a callsign that changes on fresh data flips once. */
.c-flight.flip { display: inline-block; animation: flip .35s ease-out both; transform-origin: 50% 50%; }
@keyframes flip { 0% { transform: scaleY(0); opacity: .2; } 100% { transform: scaleY(1); opacity: 1; } }
/* status is the single coloured item in a row, and always a word, never colour alone */
.s-DEPARTED, .s-CLIMBING { color: var(--sky); }
.s-APPROACH, .s-INBOUND { color: var(--violet); }
.s-FINAL { color: var(--mint); }
.board-note { margin-top: 8px; font-size: 14px; color: var(--fog); min-height: 21px; }
.rows.is-empty { min-height: 0; }
.rows.is-empty + .board-note { margin-top: 0; padding-top: 14px; border-top: 1px solid var(--hair-soft); min-height: 72px; }

/* Tower channels: thin radio strips */
.channels-head { display: flex; align-items: center; min-height: 44px; font: 700 16px var(--sans); }
.chan-list { list-style: none; margin: 6px 0 0; padding: 0; }
.chan {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 14px;
  min-height: 60px; padding: 9px 0 9px 16px; border-top: 1px solid var(--hair-soft);
}
.chan::before { /* the 2 px category signal */
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 1px; background: var(--sky);
}
.chan.arr::before { background: var(--violet); }
.chan.open::before { background: var(--mint); }
.chan .body { min-width: 0; display: flex; flex-direction: column; }
.chan .label { font-weight: 700; font-size: 15px; line-height: 1.3; }
.chan .source { font-size: 12px; color: var(--fog-dim); }
.chan .source code { font: 12px var(--mono); color: var(--fog); }
.chan .cue { font-size: 12.5px; color: var(--mint); }
.chan .cue:empty { display: none; }
.chan .cue a { color: inherit; font-weight: 700; }
.chan button { /* the words over a thin tuning-dial rule, not an outlined box; 44 px target */
  position: relative; min-height: 44px; padding: 0 2px; cursor: pointer; white-space: nowrap;
  background: none; border: 0; color: var(--amber); font: 700 13px var(--sans);
}
.chan button::after {
  content: ''; position: absolute; left: 2px; right: 2px; bottom: 8px; height: 4px; opacity: .45;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat,
              repeating-linear-gradient(to right, currentColor 0 1px, transparent 1px 7px) left bottom / 100% 4px no-repeat;
}
.chan button:hover::after, .chan button:focus-visible::after { opacity: 1; }
.chan button:active { transform: translateY(1px); }
.chan button .arrow { margin-left: 5px; }
.chan.open button { color: var(--mint); }
@media (min-width: 861px) and (max-width: 1180px) {
  .chan { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .chan button { justify-self: start; }
}
.more { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--fog); }
.more:hover { color: var(--ink); }

/* SoundCloud: a third-party object on a dark recessed shelf, deliberately not styled like native UI */
.source-line { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--hair-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.sc-label { font: 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fog-dim); }
.source-line a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--fog); }
.source-line a:hover { color: var(--ink); }
/* playback engine: real size so it runs normally, never seen, focused or clicked */
.channels { position: relative; }
.sc-engine { position: absolute; left: 0; bottom: 0; width: 300px; height: 120px; overflow: hidden; opacity: 0; clip-path: inset(50%); pointer-events: none; }
.sc-engine iframe { width: 300px; height: 120px; border: 0; }

/* Reserved ad slot: muted, never amber or mint, hidden until enabled */
.slot { grid-area: slot; position: relative; width: 300px; height: 250px; border: 1px solid var(--hair-soft); border-radius: 4px; background: rgba(20, 26, 49, .5); }
.slot span { position: absolute; top: 6px; left: 8px; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fog-dim); }
body[data-ads="off"] .slot { display: none; }

.foot { margin-top: 36px; background: #0e1327; border-top: 1px solid var(--hair); font-size: 13px; }
.foot-inner { max-width: 1240px; margin: 0 auto; padding: 30px 28px 34px; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 18px 48px; }
.foot-brand img { display: block; width: 132px; height: auto; opacity: .9; }
.foot-brand p { margin-top: 10px; color: var(--fog); font-size: 13px; }
.foot-links { display: flex; flex-direction: column; gap: 2px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); width: fit-content; }
.foot-links a:hover { color: var(--amber); }
.foot-credits a { color: var(--fog); }
.foot-credits a:hover { color: var(--ink); }
.foot-credits { max-width: 38ch; color: var(--fog-dim); font-size: 12.5px; line-height: 1.6; text-align: right; }


/* ---------- #1 Follow the sun ---------- */
.journey-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px; background: none; border: 0; cursor: pointer; white-space: nowrap;
  font: 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fog);
}
.journey-toggle:hover { color: var(--ink); }
.sw-track { position: relative; width: 34px; height: 18px; border-radius: 9px; border: 1px solid rgba(244, 238, 229, .3); background: rgba(11, 16, 32, .6); transition: background .2s, border-color .2s; }
.sw-thumb { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--fog); transition: transform .2s, background .2s; }
.journey-toggle[aria-checked="true"] { color: var(--amber); }
.journey-toggle[aria-checked="true"] .sw-track { background: var(--amber); border-color: var(--amber); }
.journey-toggle[aria-checked="true"] .sw-thumb { transform: translateX(16px); background: var(--on-accent); }
.journey {
  display: grid; grid-template-columns: auto minmax(40px, 1fr) auto auto; align-items: center; gap: 4px 16px;
  margin: -24px 0 -20px; padding: 2px 0;
}
.journey[hidden] { display: none; }
.j-now, .j-next { font-size: 14px; white-space: nowrap; }
.j-now { color: var(--amber); }
.j-next { color: var(--fog); }
.j-route { height: 1px; background: linear-gradient(to right, var(--amber), rgba(255, 180, 84, .15)); position: relative; }
.j-route::after { content: ''; position: absolute; right: -2px; top: -2.5px; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--amber); }
.j-actions { display: flex; gap: 14px; }
.j-actions button { min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; font-size: 13px; color: var(--fog); text-decoration: underline; text-underline-offset: 3px; }
.j-actions button:hover { color: var(--ink); }
.j-note { grid-column: 1 / -1; font-size: 13px; color: var(--fog); min-height: 0; }
.j-note:empty { display: none; }

/* ---------- #2 Live map: the second view outside ---------- */
.view-toggle { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 10px; }
.jt-scene { display: none; }
.view-toggle button {
  position: relative; min-height: 36px; padding: 0; background: none; border: 0; cursor: pointer;
  font-size: 13px; color: var(--fog); text-shadow: 0 1px 10px rgba(11, 16, 32, .9);
}
.view-toggle button:hover { color: var(--ink); }
.view-toggle button[aria-pressed="true"] { color: var(--ink); }
.view-toggle button[aria-pressed="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 5px; height: 1px; background: var(--amber); }
.map-zoom { display: none; align-items: center; gap: 2px; margin-top: 4px; font: 11px var(--mono); color: var(--fog); }
.scene[data-view="map"] .map-zoom { display: inline-flex; }
.scene[data-view="map"] .scene-link { display: none; } /* the map is the connection; the line would cross it */
.map-zoom button { width: 36px; height: 36px; border-radius: 4px; border: 1px solid rgba(244, 238, 229, .22); background: transparent; color: var(--ink); font: 18px/1 var(--sans); cursor: pointer; }
.map-zoom button:hover:not(:disabled) { border-color: var(--ink); }
.map-zoom button:disabled { opacity: .35; cursor: default; }
.map-zoom span { min-width: 52px; text-align: center; }
.map-status { margin-top: 2px; font-size: 12px; color: var(--fog); min-height: 18px; text-shadow: 0 1px 10px rgba(11, 16, 32, .9); }
.scene-map { position: absolute; left: 0; top: 0; bottom: 0; width: 52%; height: 100%; z-index: 0; display: none;
  -webkit-mask-image: linear-gradient(to right, #000 80%, transparent); mask-image: linear-gradient(to right, #000 80%, transparent); }
.scene[data-view="map"] .scene-map { display: block; }
.scene .scene-art { transition: opacity .4s ease; }
.scene[data-view="map"] .scene-art { opacity: .12; }
.map-tip {
  position: absolute; z-index: 3; pointer-events: none; display: flex; flex-direction: column; gap: 1px;
  padding: 6px 10px; border-radius: 4px; background: rgba(11, 16, 32, .92); box-shadow: 0 0 0 1px var(--hair);
  font-size: 12px; color: var(--fog); white-space: nowrap;
}
.map-tip b { font: 12px var(--mono); color: var(--ink); letter-spacing: .05em; font-weight: 400; }
.map-tip[hidden] { display: none; }

/* KBMI-style airports with no confirmed feed IDs */
.chan-empty { padding: 12px 0; border-top: 1px solid var(--hair-soft); font-size: 13px; color: var(--fog); max-width: 46ch; }

/* ---------- #6 text sponsorship (groundwork, off) ---------- */
.sponsor-line { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.sponsor-line[hidden] { display: none; }
.sponsor-line a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--fog); }
.sponsor-line a:hover { color: var(--ink); }

/* ---------- About page ---------- */
.page .top { justify-content: space-between; }
.home { display: block; text-decoration: none; }
.back { font-size: 13px; color: var(--fog); }
.prose { max-width: 680px; width: 100%; margin: 0 auto; padding: 12px 28px 60px; }
.prose h1 { font: 400 46px/1.08 var(--serif); margin: 18px 0 14px; }
.prose h2 { font: 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; margin: 34px 0 10px; color: var(--amber); }
.prose p { margin: 0 0 12px; }

/* ---------- Tablet and below: scene stacks, view on top ---------- */
@media (max-width: 1080px) {
  .airspace { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); }
  body[data-ads="on"] .airspace { grid-template-columns: minmax(0, 1.5fr) minmax(332px, 1fr); }
  .scene-now { padding-left: 48px; padding-right: 40px; }
  .track-title { font-size: 38px; }
}
@media (max-width: 860px) {
  .wall { padding: 0 16px 20px; gap: 36px; }
  .top { padding: 12px 16px 10px; gap: 14px; }
  .foot-inner { grid-template-columns: 1fr; padding: 26px 16px 30px; gap: 14px; }
  .foot-credits { text-align: left; }
  /* sill stacks: programmes on top, stations below */
  .rail { flex-direction: column; padding: 0 8px; }
  .programmes { padding: 4px 0 0; margin: 0; border-right: 0; overflow-x: auto; scrollbar-width: none; }
  .programmes::-webkit-scrollbar { display: none; }
  .prose { padding: 8px 16px 48px; }

  .scene { --art-h: clamp(196px, 34vw, 270px); grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--art-h) auto auto; min-height: 0; }
  .scene-art { inset: 0 auto auto 0; width: 175%; height: var(--art-h); } /* zoom into the detailed left of the view */
  .scene-frame { inset: 0 0 auto 0; height: var(--art-h); background: linear-gradient(to bottom, transparent 55%, rgba(11, 16, 32, .85)); }
  .scene-frame::after { border-radius: 10px 10px 0 0; }
  .scene { background: linear-gradient(#0d1224, var(--night)); }
  .scene-place { grid-row: 1; grid-column: 1; padding: 20px 22px; }
  .scene-now { grid-row: 2; grid-column: 1; padding: 6px 22px 18px; max-width: none; }
  .rail { grid-row: 3; }
  .scene-link { display: none; }
  #tzLabel { display: none; } /* room for the Follow the sun switch */
  /* phones/tablets: in map mode, status and zoom sit in the map's bottom corners, the channel count steps aside */
  .scene[data-view="map"] .channel-count { display: none; }
  .map-zoom { position: absolute; right: 10px; top: calc(var(--art-h) - 46px); margin: 0; z-index: 3; }
  .map-status { position: absolute; left: 22px; top: calc(var(--art-h) - 34px); margin: 0; }
  .scene-map { width: 100%; height: var(--art-h); bottom: auto; -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent); mask-image: linear-gradient(to bottom, #000 80%, transparent); }
  .journey { grid-template-columns: auto minmax(30px, 1fr) auto; margin: -18px 0 -14px; }
  .j-actions { grid-column: 1 / -1; }
  .scene[data-view="map"] .scene-map { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40%); mask-image: linear-gradient(to right, transparent 0, #000 40%); }
  .track-title { font-size: 34px; margin-top: 10px; }
  .track-artist { font-size: 17px; margin-top: 6px; }
  .mood { margin-top: 12px; }
  .transport { margin-top: 16px; }

  .airspace, body[data-ads="on"] .airspace { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "board" "channels" "slot"; }
  .channels { padding: 28px 0 0; border-left: 0; }
  body[data-ads="on"] .slot { margin: 28px 0 0; justify-self: center; }
}
@media (max-width: 640px) {
  .top > .journey-toggle { display: none; } /* on phones it lives in the scene, next to the view toggle */
  .view-toggle { gap: 0 12px; }
  .view-toggle .jt-scene { display: inline-flex; min-height: 36px; font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  .view-toggle .jt-scene::after { display: none; }
  .journey { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; margin: -20px 0 -16px; }
  .j-route { display: none; }
  .j-now, .j-next { white-space: normal; font-size: 13px; }
  .j-actions { width: 100%; gap: 18px; }
  .c-op { display: none; }
  .frow { grid-template-columns: minmax(0, 1fr) 6.6rem 4.4rem 3.6rem; gap: 10px; font-size: 13px; }
  .place { font-size: 14px; gap: 7px; }
  .logo { width: 168px; }
  #tzLabel { display: none; }
  .track-title { font-size: 30px; }
  .vol { margin-left: 2px; }
  .chan { grid-template-columns: minmax(0, 1fr); }
  .chan button { justify-self: start; }
  .tabs { gap: 20px; }
  .tab { font-size: 15px; }
}
@media (max-width: 400px) {
  .wall { padding: 0 10px 18px; }
  .top { padding: 10px; gap: 12px; }
  .logo { width: 136px; }
  .place #airportCity, .place .sep { display: none; } /* the full airport name is in the scene */
  .marker-face { font-size: 19px; letter-spacing: .1em; }
  .scene { --art-h: 156px; }
  .view-toggle .jt-scene { font-size: 10px; letter-spacing: 0; gap: 6px; }
  .map-status { left: 18px; }
  .scene-place { padding: 16px 18px; }
  .scene-now { padding: 4px 18px 14px; }
  .track-title { font-size: 28px; }
  .mood { margin-top: 10px; font-size: 14px; }
  .transport { margin-top: 12px; }
  .vol { margin-left: 0; }
  .transport { gap: 4px; }
  .c-alt { display: none; }
  .frow { grid-template-columns: minmax(0, 1fr) 6.2rem 3.4rem; font-size: 12.5px; }
  .board-meta { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .sw-track, .sw-thumb { transition: none; }
  .scene .scene-art { transition: none; }
  .c-flight.flip { animation: none; }
  .play-btn:active { transform: none; }
}
