/* Orbit 99 web radio. One visual world: the station's night sky (pitch deck palette), no light variant.
   Layout: the on-air stage, the orbit tuner under it, the panels, a fixed player bar. */
:root {
  --space: #0B0B12;      /* page */
  --deck: #12121C;       /* raised surfaces */
  --line: #2A2A3C;       /* rules, tracks */
  --fg: #ECE9E1;         /* text */
  --muted: #9AA3B5;      /* secondary text */
  --signal: #FF6A1A;     /* the station's orange */
  --alert: #FF5D5D;      /* offline, errors */
  --phosphor: #7CFFB2;   /* live data: times, now playing, progress (web-identity.md) */
  --silver: #D6DAE3;     /* on demand: off the dial, so no frequency colour (app.js offDial) */
  --acc: var(--signal);  /* the tuned frequency's or program's accent, set from script */
  /* what a piece IS (kind): square tags; their colours --k-<kind> come from catalog.kinds (app.js paintStation) */
  --display: "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --bar-h: 84px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--space); }
body { margin: 0; background: var(--space); color: var(--fg); font: 16px/1.55 var(--body); padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
  overflow-wrap: anywhere; }   /* nothing outgrows a phone (JJ 2026-10-02): any long word may break, so no box is ever wider than the screen */
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: .01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
.eyebrow { font: 600 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 14px 16px; background: color-mix(in srgb, var(--space) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.15rem/1 var(--display); letter-spacing: .12em; text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--signal); position: relative; }
.brand-words { display: grid; gap: 4px; }
.disc .d-short { display: none; }
.tagline { font: 400 .62rem/1 var(--mono); letter-spacing: .1em; text-transform: lowercase; color: var(--muted); }
/* the AI disclosure rides with the player, where the voices are heard (EU AI Act Art. 50; legal/licensing.md §2.7) */
.disc { margin-left: auto; font: 400 .66rem/1 var(--mono); letter-spacing: .06em; text-transform: none; color: var(--muted); border: 1px solid var(--line); padding: 3px 6px; border-radius: 3px; white-space: nowrap; }
.brand-mark::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); top: -4px; left: 6px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { font: 600 .82rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 8px 10px; border-radius: 4px; }
nav a[aria-current="page"] { color: var(--fg); background: var(--deck); }

main { display: block; padding-block: 24px 40px; }
main:focus { outline: none; }


/* on-air deck */
.deck { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.stage { background: var(--deck); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stage { grid-column: 1 / -1; }            /* the visuals are featured: full width, always on (the audio never depends on them) */
.stage canvas { display: block; width: 100%; aspect-ratio: 21 / 9; min-height: 260px; max-width: 100%; }
.stage-over { padding: 18px 20px 20px; display: grid; gap: 10px; }
.stage canvas + .stage-over { border-top: 1px solid var(--line); }
.stage-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.np-program { font: 600 .78rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); }
.np-title { font: 600 clamp(1.25rem, 2.6vw, 1.7rem)/1.15 var(--display); }
/* live captions read as subtitles, never as a heading: a ruled quote in the body face, the speaker in a neutral tag */
.caption { min-height: 4.4em; font: 400 1.05rem/1.55 var(--body); color: #C9C6BE; border-left: 2px solid var(--line); padding-left: 14px; }
.caption b { display: inline-block; font: 600 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); border-radius: 3px; padding: 3px 5px; margin-right: 8px; vertical-align: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 8px; border-radius: 3px;
  border: 1px solid var(--line); text-decoration: none; color: var(--fg); background: var(--space); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--kc, var(--muted)); }
a.chip:hover { border-color: var(--acc); }
.side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 22px; align-items: start; min-width: 0; }
.panel h2 { font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.queue { list-style: none; margin: 0; padding: 0; display: grid; }
.queue li { border-top: 1px solid var(--line); }

.queue li > .q-go, .queue li:not(:has(.q-go)) { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 12px; padding: 10px 0; align-items: baseline; }
.q-go { appearance: none; width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 4px; }
.q-go:hover, .q-go:focus-visible { background: var(--deck); }
.q-go:hover .q-title::after { content: ""; display: inline-block; width: .8em; height: .8em; margin-left: .5em; vertical-align: -.05em; background: var(--acc);
  -webkit-mask: var(--ic-play) center / contain no-repeat; mask: var(--ic-play) center / contain no-repeat; }
.queue .t { white-space: nowrap; font: 400 .78rem/1 var(--mono); color: var(--phosphor); font-variant-numeric: tabular-nums; }
.queue .q-title { display: block; font-weight: 700; }
.queue .q-sub { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); }
.kdot { width: 8px; height: 8px; border-radius: 50%; background: var(--kc, var(--muted)); flex: none; }
[data-kind="music"] { --kc: var(--k-music); } [data-kind="talk"] { --kc: var(--k-talk); } [data-kind="news"] { --kc: var(--k-news); }
[data-kind="ad"] { --kc: var(--k-ad); } [data-kind="imaging"] { --kc: var(--k-imaging); } [data-kind="liner"] { --kc: var(--k-liner); }

/* tune panel */
.tune { border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: grid; gap: 14px; }
.tune .row { display: grid; gap: 6px; }
.tune label, .tune legend { font: 600 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tune input[type="range"] { width: 100%; accent-color: var(--acc); }
.ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.seg button { appearance: none; border: 0; background: none; color: var(--muted); padding: 8px 14px; font: 600 .8rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--acc); color: var(--space); }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.shares { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); }
.shares span { display: block; height: 100%; }
.note { font-size: .84rem; color: var(--muted); }
.note strong { color: var(--fg); }

/* programs + voices */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.card { display: grid; gap: 8px; align-content: start; padding: 18px; background: var(--deck); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; border-top: 3px solid var(--pacc, var(--line)); min-width: 0; }
.card:hover { border-color: var(--pacc, var(--acc)); }
.card .slot { font: 600 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--pacc, var(--muted)); }
.card q { font-style: italic; color: var(--muted); }
.badge { justify-self: start; font: 600 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 6px; border-radius: 3px; border: 1px solid currentColor; color: var(--k-music); }
.badge.dim { color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; margin-top: 18px; }
.detail p { max-width: 65ch; margin: 0 0 12px; }
.lede { font-size: 1.15rem; }
dl.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; margin: 0; align-content: start; align-items: start; }
dl.facts dt { font: 600 .74rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
dl.facts dd { margin: 0; }
.pieces { list-style: none; margin: 0; padding: 0; display: grid; }
.pieces li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.mini { appearance: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--space); color: var(--fg); cursor: pointer; display: grid; place-items: center; }
.mini:hover { border-color: var(--acc); }
.mini svg { width: 14px; height: 14px; fill: currentColor; }
.dur { font: 400 .78rem/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.back { display: inline-block; margin-bottom: 14px; font: 600 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.prose { max-width: 68ch; }
.prose p, .prose li { margin-block: 0 12px; }
.prose h2 { margin-block: 28px 10px; }
code { font-family: var(--mono); font-size: .9em; }

/* player bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--deck); border-top: 1px solid var(--line); min-height: var(--bar-h); }
.play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--acc); color: var(--space); cursor: pointer; display: grid; place-items: center; }
.play svg { width: 22px; height: 22px; fill: currentColor; }
.play .i-stop, .playing .play .i-play { display: none; }
.playing .play .i-stop { display: inline; }
.bar-meta { min-width: 0; display: grid; gap: 4px; }
.bar-line1 { display: flex; gap: 10px; align-items: center; font: 600 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.dial { color: var(--acc); font-variant-numeric: tabular-nums; }
.kind { color: var(--muted); }
.onair { color: var(--space); background: var(--acc); padding: 3px 5px; border-radius: 2px; }
.bar-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--phosphor); }
.vol { position: relative; }
.vol-btn { appearance: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; display: grid; place-items: center; }
.vol-btn svg { width: 20px; height: 20px; fill: currentColor; }
.vol-btn[aria-expanded="true"] { border-color: var(--acc); }
.vol .i-mute { display: none; }
.vol[data-muted="true"] .i-mute { display: inline; } .vol[data-muted="true"] .i-wave { display: none; }
.vol[data-muted="true"] .vol-btn { color: var(--muted); }
.vol-pop { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px;
  padding: 14px 10px 10px; background: var(--deck); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.vol-pop input { writing-mode: vertical-lr; direction: rtl; width: 28px; height: 130px; accent-color: var(--acc); }
.vol-pop .chip { cursor: pointer; }

@media (max-width: 860px) {
  .deck, .detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .bar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .stage canvas { aspect-ratio: 4 / 3; }
}

.sources { grid-column: 2 / -1; font-size: .85rem; color: var(--muted); }
.sources summary { cursor: pointer; font: 600 .72rem/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg); }
.src-body { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 40vh; overflow: auto; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; }
.src-body a { color: inherit; }
#np-sources .sources { margin-top: 10px; }

/* station clock */
.clock h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.clock-badge { font: 600 .7rem/1 var(--mono); letter-spacing: .08em; padding: 4px 6px; border-radius: 2px; background: var(--acc); color: var(--space); }
.clock-badge[data-state="live"] { background: none; color: var(--phosphor); border: 1px solid color-mix(in srgb, var(--phosphor) 45%, transparent); }
.clock-badge[data-state="offline"] { background: var(--alert); color: var(--space); }
.note.skew { color: var(--k-ad); }
.clock-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.clock-time { font-variant-numeric: tabular-nums; }
.clock-row input[type="time"] { background: none; color: inherit; border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; font: inherit; }
.clock-steps { flex-wrap: wrap; margin: 0 8px 8px 0; }
.clock-days { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.clock-day { flex: 1; text-align: center; font-family: var(--mono, monospace); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.clock-days .chip:disabled { opacity: .35; cursor: default; }

/* Listen page order: the station (now playing + visuals), then the tuner, then the panels */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.deck-top { margin-top: 20px; }

/* Listen layout: the station first (visuals beside now playing), the tuner right under it, then Up next leading the panels */
.deck-top { margin-top: 8px; }
.stage { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.stage canvas { aspect-ratio: 16 / 9; min-height: 280px; height: 100%; }
.stage canvas + .stage-over { border-top: 0; border-left: 1px solid var(--line); }
.stage-over { align-content: center; padding: 28px 28px 30px; gap: 14px; }
.np-title { font-size: clamp(1.4rem, 3vw, 2.1rem); text-wrap: balance; }
.tuner { margin-block: 22px 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.side { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 22px 34px; }
@media (max-width: 860px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .stage canvas { aspect-ratio: 16 / 9; min-height: 220px; height: auto; }
  .stage canvas + .stage-over { border-left: 0; border-top: 1px solid var(--line); }
  .stage-over { padding: 18px 20px 20px; }
  .side { grid-template-columns: minmax(0, 1fr); }
}

/* the orbit tuner (pitch, "The tuner is an orbit"): frequencies are satellites on the station's ring; tap or drag to tune */
.tuner { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 18px 64px; align-items: center; padding: 14px 16px; }
.ring { position: relative; width: 100%; max-width: 330px; aspect-ratio: 1; justify-self: center; touch-action: pan-y pinch-zoom; user-select: none; }   /* the page scrolls over the dial; app.js decides when a touch tunes */
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 2; }
.ring-arc { fill: none; stroke: var(--acc); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100 754.5;
  transform-origin: 200px 200px; transition: transform .6s cubic-bezier(.6,0,.2,1); filter: drop-shadow(0 0 6px var(--acc)); }
.ring-arc.dragging { transition: none; }
/* touch screens: the band is dimmed until a first tap arms it (app.js arm()); armed, it lights up in the frequency colour */
@media (hover: none) and (pointer: coarse) {
  .ring .ring-track { transition: opacity .25s, stroke .25s; }
  .ring:not(.armed) .ring-track { opacity: .8; }   /* dimmed, still clearly there (JJ 2026-10-02: it was too faint) */
  .ring:not(.armed) .ring-arc { opacity: .75; }
  .ring.armed .ring-track { stroke: var(--acc); opacity: .55; }
}
.ring { cursor: grab; }
.sat { position: absolute; transform: translate(-50%, -50%); appearance: none; background: none; border: 0; padding: 10px; color: var(--muted);
  cursor: pointer; display: grid; place-items: center; font: 600 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
/* the station dot and the ring that marks the tuned one; the label's distance is computed from these (below) */
.sat { --dot: 14px; --sel-ring: 7px; --sel-scale: 1.45; --sat-clear: 8px; }
.sat i { display: block; width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--sacc); box-shadow: 0 0 0 5px var(--space), 0 0 0 6px var(--line); transition: transform .3s; }
.sat span { position: absolute; white-space: nowrap; }
.sat span { margin-block: 8px; display: grid; gap: 3px; justify-items: center; text-align: center; line-height: 1.1; }
.sat b { font-size: 1.05em; } .sat small { font-size: .82em; opacity: .85; }
.sat[aria-pressed="true"] { color: var(--sacc); }
.sat[aria-pressed="true"] i { transform: scale(var(--sel-scale)); box-shadow: 0 0 0 5px var(--space), 0 0 0 var(--sel-ring) var(--sacc), 0 0 18px var(--sacc); }
.sat:hover i, .sat:focus-visible i { transform: scale(1.3); }
.sat:focus-visible { outline: 2px solid var(--sacc); outline-offset: 2px; border-radius: 50%; }
.ring-center { position: absolute; inset: 29%; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; cursor: default; }
.ring-on { font: 600 .72rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.ring-on[data-on="true"] { color: var(--phosphor); }
.ring-freq { font: 700 1.05rem/1.1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.ring-title { font-size: .86rem; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ring-go { appearance: none; border: 0; border-radius: 999px; background: var(--acc); color: var(--space); padding: 9px 20px; cursor: pointer;
  font: 700 .74rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px; animation: go-glow 1.6s ease-in-out 4; }   /* newcomers: this is the button */
.ring .ring-go .ic { position: static; inset: auto; width: 1.3em; height: 1.3em; overflow: hidden; }   /* not the .ring svg overlay rule */
@keyframes go-glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 0%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--acc) 35%, transparent), 0 0 22px var(--acc); } }
@media (prefers-reduced-motion: reduce) { .ring-go { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 40%, transparent); } }
.tuner-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.ring-info { display: grid; gap: 4px; min-width: 0; }
.ring-info p { margin: 0; }
.ri-head { display: flex; align-items: baseline; gap: 10px; }
.ring-info .num { font: 700 1.5rem/1 var(--display); font-variant-numeric: tabular-nums; }
.ring-info .name { font: 600 .95rem/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.ring-info .blurb { color: var(--muted); font-size: .88rem; line-height: 1.45; max-width: 70ch; }
.ring-info .hint { color: var(--muted); opacity: .75; }
.tuner .queue li > .q-go { padding: 7px 0; }
.tuner .queue .q-title { font-size: .92rem; }
@media (max-width: 860px) {
  .tuner { grid-template-columns: minmax(0, 1fr); }
  .ring { max-width: 340px; }
}
@media (max-width: 420px) { .sat { font-size: .68rem; } .ring-center { inset: 26%; } .ring-freq { font-size: .95rem; } }
@media (prefers-reduced-motion: reduce) { .ring-arc { transition: none; } }

/* a program's page wears its colour: the rule under its name, its section heads, its quote, its play buttons and hosts */
.prog-page h1 { padding-bottom: 10px; background: linear-gradient(var(--pacc), var(--pacc)) left bottom / 72px 4px no-repeat; }
.prog-page h2 { color: var(--pacc); }
.prog-page q { display: block; border-left: 3px solid var(--pacc); padding-left: 12px; font-style: italic; }
.prog-page .mini { border-color: var(--pacc); color: var(--pacc); }
.prog-page .facts .chip { border-color: var(--pacc); }
.prog-page .pieces a { text-decoration-color: var(--pacc); }

/* the station clock lives in the top bar: the time and its state, opening to move it */
.tclock { position: relative; }
.tclock summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; }
.tclock summary::-webkit-details-marker { display: none; }
.tclock summary::after { content: ""; width: 12px; height: 12px; background: var(--muted); -webkit-mask: var(--ic-down) center / contain no-repeat; mask: var(--ic-down) center / contain no-repeat; }
.tclock[open] summary { background: var(--deck); }
.tclock .clock-time { font: 600 .95rem/1 var(--mono); }
.tclock-pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(340px, calc(100vw - 32px)); padding: 14px; display: grid; gap: 4px;
  background: var(--deck); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); z-index: 6; }
.tclock-pop .note { margin: 4px 0 0; font-size: .8rem; }
.top nav { flex: 1; margin-left: 24px; }
.top nav a[data-nav="about"] { margin-left: auto; }   /* About stands apart, at the right end of the menu (JJ) */
@media (max-width: 600px) {          /* phones: the clock rides on the brand row, as a time and a state dot */
  .top { gap: 10px 8px; }
  .nightbtn { order: 1; margin-left: auto; width: 30px; height: 30px; }
  .tclock { order: 1; margin-left: 0; }
  .top nav { order: 2; margin-left: 0; width: 100%; flex: 0 0 100%; }
  .tclock summary { padding: 5px 8px; gap: 6px; }
  .tclock .clock-badge { font-size: 0; width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: var(--acc); }
  .tclock .clock-badge[data-state="live"] { background: var(--phosphor); border: 0; }
  .tclock .clock-badge[data-state="offline"] { background: var(--alert); }
  .vol-btn { width: 30px; height: 30px; } .vol-btn svg { width: 16px; height: 16px; }
}
@media (max-width: 600px) {
  .brand { font-size: .95rem; letter-spacing: .08em; gap: 7px; }
  .tagline { display: none; }
  .bar .disc { font-size: .6rem; padding: 2px 4px; }
  .disc .d-long { display: none; }
  .disc .d-short { display: inline; }
  .bar-line1 { overflow: hidden; }
  .tclock summary::after { display: none; }
  .tclock .clock-time { font-size: .85rem; }
  .bar .play { width: 44px; height: 44px; }
  .bar { gap: 10px; }
  .fb-b { width: 32px !important; height: 32px !important; }
  #bar-onair[data-state="live"] { display: none; }   /* phones: the bar names the time only when it is not live */
  #bar-onair { white-space: nowrap; padding: 2px 4px; } #bar-onair .o-lbl, #bar-onair .o-ap { display: none; }
  .bar-line1 { gap: 6px; letter-spacing: .04em; }
  .fb-b { width: 30px !important; height: 30px !important; }
  .bar-line1:has(#bar-onair[data-state="shifted"]) #bar-kind { display: none; }
  /* what doesn't fit is left out, never cut in half: the line wraps and only its first row shows. The AI-made notice
     (EU AI Act Art. 50) comes right after the dial so it always fits; the rest follow in priority order. */
  .bar-line1 { flex-wrap: wrap; height: 18px; align-content: flex-start; row-gap: 20px; }
  .bar-line1 > * { flex: none; }
  .bar .disc { order: 1; margin-left: 0; } #bar-onair { order: 3; } #bar-kind { order: 4; }
  /* too narrow for a tuning badge on that line: while tuning, the title line says it instead */
  body[data-tuning] .bar .bar-tuning { display: none; }
  body[data-tuning] #bar-title { display: none; }
  body[data-tuning] .bar .bar-tuning-t { display: block; color: var(--acc); font-family: var(--mono); letter-spacing: .08em; }
}

/* side-by-side columns get air and a faint rule between them (wide screens only; stacked on phones) */
@media (min-width: 861px) {
  .tuner { column-gap: 44px; }
  .tuner-side { border-left: 1px solid var(--line); padding-left: 40px; }
  .detail { column-gap: 0; }
  .detail > :first-child { padding-right: 40px; }
  .detail > .facts { border-left: 1px solid var(--line); padding-left: 32px; align-self: start; }
}
@media (min-width: 1000px) {
  .side { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0; }
  .side > section { padding-inline: 28px; }
  .side > section:first-child { padding-left: 0; }
  .side > section:last-child { padding-right: 0; }
  .side > section + section { border-left: 1px solid var(--line); }
}
#bar-onair[data-state="offline"] { background: var(--alert); color: var(--space); }

/* the station block: the visual is the dial (frequencies orbit it), what is on air and Up next beside it */
.stage { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); align-items: stretch; }
.stage .ring { max-width: none; width: 100%; align-self: center; background: #12121C; }
.stage .ring canvas { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; min-height: 0; }
.stage .ring svg { z-index: 1; } .stage .sat { z-index: 2; }
.stage .stage-over { border-left: 1px solid var(--line); border-top: 0; align-content: start; padding: 26px 30px 24px; gap: 12px; }
.stage .np-title { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.ring-go { position: absolute; z-index: 2; left: 50%; top: calc(50% + 90px);   /* app.js draw() puts it just under the centre disc */ transform: translateX(-50%); padding: 6px 14px; font-size: .7rem; }
.stage .next { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.next-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; margin: 0 0 4px; }
.next-head h2 { margin: 0 !important; flex: none; }
.q-back { min-width: 0; max-width: 70%; display: inline-flex; gap: .35em; white-space: nowrap; overflow: hidden; }
.q-back-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stage .next h2 { font: 600 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.stage .queue li > .q-go { padding: 6px 0; }
.stage .queue .q-title { font-size: .9rem; }
.stage .queue .q-sub { font-size: .76rem; }
@media (max-width: 860px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .stage .ring { max-width: 420px; justify-self: center; }
  .stage .stage-over { border-left: 0; border-top: 1px solid var(--line); padding: 18px 18px 20px; }
}
.stage .ring-arc { stroke-dasharray: 25 980.3; }       /* r 160: a short lit arc behind the tuned dot, 9 degrees */
/* the label sits above its station in the top half of the dial and below it elsewhere (--v = -1 or 1), nudged outward
   (--c = cos of its angle), at two distances (JJ 2026-10-02): close to an untuned dot (its outline ring, dot/2 + 6 px,
   plus --sat-near), and further out for the tuned one, whose selection ring is (dot/2 + ring) × scale (a shadow, so it
   scales with the dot) plus --sat-clear. It never touches a ring at any angle or for any number of frequencies
   (web/README.md: measured in the browser), and glides between the two. It masks the orbit line it may cross. */
.stage .sat { --sat-near: 6px; --sat-gap: calc(var(--dot) / 2 + 6px + var(--sat-near)); }
.stage .sat[aria-pressed="true"] { --sat-gap: calc((var(--dot) / 2 + var(--sel-ring)) * var(--sel-scale) + var(--sat-clear)); }
.stage .sat span { left: 50%; top: 50%; margin: 0; padding: 1px 4px; border-radius: 3px; background: #12121C;
  transform: translate(calc(-50% + var(--c) * 10px), calc(-50% + var(--v) * (50% + var(--sat-gap)))); transition: transform .3s; }
@media (prefers-reduced-motion: reduce) { .stage .sat span { transition: none; } }
.deck-top + .deck, .deck-top ~ .deck { margin-top: 28px; }
.about h1 { margin-bottom: 18px; }
.about .channels { list-style: none; padding: 0; }
.bar-line1 .kind:empty { display: none; }
.pieces .mini { border-color: var(--pacc, var(--line)); color: var(--pacc, var(--fg)); }
.pieces .prog-link { color: var(--pacc); text-decoration-color: var(--pacc); }
.pieces .kdot { display: inline-block; margin-right: 6px; vertical-align: 1px; }
.to-mix { justify-self: start; cursor: pointer; border-color: var(--facc); color: var(--facc); }
.to-mix:hover { background: var(--facc); color: var(--space); }
.clock-badge[data-state="shifted"], #bar-onair[data-state="shifted"] { cursor: pointer; }
.clock-badge[data-state="shifted"]:hover, #bar-onair[data-state="shifted"]:hover { filter: brightness(1.2); text-decoration: underline; }
/* while the station checks for new pieces, the logo's satellite orbits once around */
.brand-mark::after { transform-origin: 3px 13px; }
.syncing .brand-mark::after { animation: orbit 1.1s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .syncing .brand-mark::after { animation-duration: 3s; } }
.queue .q-empty { display: block; padding: 8px 0; }
/* On demand under the stage, full width; Tune it has its own page */
.ondemand .sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ondemand .sec-link { font: 600 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.ondemand .sec-link:hover { text-decoration: underline; }
.tune-page .to-mix { margin-bottom: 6px; }
.tune-page #tune { margin-top: 18px; }
.stage .queue { }   /* no inner scroll (JJ: it fought the page on phones): a fixed count, Show more / Show less */
.queue li.q-empty, .stage .queue li.q-empty { display: block; padding: 8px 0; }
.queue li.q-more, .stage .queue li.q-more { display: flex; gap: 8px; padding: 10px 0 2px; border: 0; }
.ondemand { grid-column: 1 / -1; min-width: 0; }
.ondemand h2 { font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; margin: 0; }
.ondemand .sec-head { padding-bottom: 10px; }
@media (min-width: 861px) {
  .ondemand .pieces { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
}
/* About: a little sky and all the frequencies' colours (no single channel's colour) */
.about { position: relative; padding-block: 8px 40px; }
.about::before { content: ""; position: absolute; inset: -24px 0 auto; height: 300px; z-index: -1; pointer-events: none;
  background: radial-gradient(1px 1px at 12% 30%, #fff8 50%, transparent), radial-gradient(1px 1px at 68% 18%, #fff6 50%, transparent),
    radial-gradient(1.5px 1.5px at 85% 60%, #fff7 50%, transparent), radial-gradient(1px 1px at 35% 75%, #fff5 50%, transparent),
    radial-gradient(1px 1px at 52% 42%, #fff4 50%, transparent); }
.about h1::after { content: ""; display: block; width: 120px; height: 4px; border-radius: 2px; margin-top: 14px; background: var(--spectrum); }
.about h2 { margin-top: 34px; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.about-freqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-block: 22px 26px; }
.af { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-top: 3px solid var(--sacc);
  border-radius: 6px; text-decoration: none; color: var(--fg); background: color-mix(in srgb, var(--sacc) 7%, transparent); }
.af i { grid-row: span 2; width: 12px; height: 12px; border-radius: 50%; background: var(--sacc); box-shadow: 0 0 10px var(--sacc); }
.af b { font: 600 1.1rem/1.1 var(--mono); color: var(--sacc); }
.af span { font-size: .85rem; color: var(--muted); }
.af:hover { border-color: var(--sacc); }
/* bar controls: a little bigger (JJ) — desktop 46 px, phones 38 px, icons scaled with them */
.bar .vol-btn, .bar .fb-b { width: 46px !important; height: 46px !important; }
.bar .vol-btn svg { width: 24px; height: 24px; } .bar .fb-b svg { width: 22px; height: 22px; }
@media (max-width: 600px) {
  .bar .vol-btn, .bar .fb-b { width: 38px !important; height: 38px !important; }
  .bar .vol-btn svg { width: 20px; height: 20px; } .bar .fb-b svg { width: 19px; height: 19px; }
  .bar .fb { gap: 6px; } .bar { gap: 8px; }
}
.notice { margin: 0; padding: 8px 16px; text-align: center; font-size: .85rem; color: var(--fg); background: var(--deck); border-bottom: 1px solid var(--line); }
.notice::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .45em; vertical-align: -.15em; background: var(--muted);
  -webkit-mask: var(--ic-warn) center / contain no-repeat; mask: var(--ic-warn) center / contain no-repeat; }   /* neutral: no frequency colour */
.brand-words { text-transform: uppercase; } .brand-words .tagline { text-transform: lowercase; }
/* header logo: the ring sized to the name (no tagline under it) */
.brand { font-size: 1.3rem; gap: 11px; }
.brand-mark { width: 26px; height: 26px; border-width: 2.5px; flex: none; }
.brand-mark::after { width: 7px; height: 7px; top: -5px; left: 7.5px; transform-origin: 3.5px 15.5px; }
.brand-words { display: block; white-space: nowrap; }
@media (max-width: 600px) { .brand { font-size: 1.05rem; gap: 8px; } .brand-mark { width: 22px; height: 22px; border-width: 2px; }
  .brand-mark::after { width: 6px; height: 6px; top: -4px; left: 6px; transform-origin: 3px 13px; } }
/* kind tags: square, tinted, uppercase; a frequency is always a round dot plus its dial number */
.ktag { display: inline-block; font: 600 .62rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 3px 5px; border-radius: 2px;
  color: var(--kc, var(--muted)); background: color-mix(in srgb, var(--kc, var(--muted)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--kc, var(--muted)) 45%, transparent);
  vertical-align: 1px; margin-right: 4px; white-space: nowrap; }
.chips .ktag { font-size: .7rem; padding: 6px 8px; margin: 0; }
#bar-kind { font: 600 .6rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 4px; border-radius: 2px;
  color: var(--kc, var(--muted)); background: color-mix(in srgb, var(--kc, var(--muted)) 14%, transparent); }
.q-sub .ktag { margin-right: 0; }
/* the first Up next item stands out: what plays next, with a countdown, in the frequency's colour */
/* the first Up next item is a row like the others, with its time (JJ 2026-10-02); only a small "Next · in n min"
   line above it marks it as the next one */
.stage .queue li.q-first > .q-go, .queue li.q-first > .q-go { row-gap: 6px; }
.queue li.q-first .q-nextlbl { grid-column: 1 / -1; }
.q-nextlbl { font: 400 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--phosphor); }   /* reads as this row's time, like the hour labels below */
.q-in { color: var(--fg); letter-spacing: .06em; font-weight: 600; }

/* "airs on": round frequency dots under a piece (kinds stay square) */
.airs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.airs-f { display: inline-flex; align-items: center; gap: 4px; }
.airs-f i { width: 7px; height: 7px; border-radius: 50%; background: var(--fc); }

/* NOW: a filled, pulsing badge on what is playing, so the first Up next item is never mistaken for it */
.stage-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.np-now { display: inline-flex; align-items: center; gap: 6px; font: 700 .7rem/1 var(--mono); letter-spacing: .14em; padding: 5px 8px 5px 7px;
  border-radius: 3px; background: var(--acc); color: var(--space); }
.np-now i { width: 7px; height: 7px; border-radius: 50%; background: var(--space); animation: np-pulse 1.4s ease-in-out infinite; }
@keyframes np-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .np-now i { animation: none; } }
/* tuning (app.js tuning()): the dial, the NOW badge and the player bar all say so, blinking; the bar's line sweeps */
.tune-lbl { display: none; }
.bar .bar-tuning-t.tune-lbl { display: none; }   /* phones only (max-width: 600px) */
body[data-tuning] .tune-lbl { display: inline; animation: tune-blink 1.2s steps(1) infinite; }
.tune-lbl::after { content: "TUNING…"; }
body[data-tuning="slow"] .tune-lbl::after { content: "SLOW CONNECTION…"; }
body[data-tuning] .np-now .now-t { display: none; }
body[data-tuning] .np-now { background: transparent; color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
body[data-tuning] .np-now i { background: var(--acc); }
.bar-tuning { font: 700 .66rem/1 var(--mono); letter-spacing: .12em; color: var(--acc); white-space: nowrap; }
body[data-tuning] .bar #bar-kind, body[data-tuning] .bar #bar-onair { display: none; }
body[data-tuning] .progress span { width: 30% !important; background: var(--acc); animation: tune-sweep 1.1s ease-in-out infinite; }
@keyframes tune-blink { 0%, 100% { opacity: 1; } 60% { opacity: .25; } }
@keyframes tune-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { body[data-tuning] .tune-lbl, body[data-tuning] .progress span { animation: none; } }

/* what is playing, boxed in the frequency's colour so it stands out from Up next (JJ) */
.np-box { display: grid; gap: 12px; min-width: 0; padding: 16px 18px; border-radius: 6px;
  background: color-mix(in srgb, var(--acc) 9%, transparent); border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--acc) 14%, transparent); }
@media (max-width: 600px) { .np-box { padding: 12px 14px; } }

/* Lock: floats under the menu at the top right and stays as you scroll; glows when something is tried while locked */
.lock { position: fixed; z-index: 4; right: 16px; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 64px) + 10px);
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--deck); color: var(--muted); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0, 0, 0, .4); }
.lock svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lock .shackle { transform: translateX(4px) translateY(-1px); transition: transform .2s; }   /* open */
.lock[aria-pressed="true"] { color: var(--space); background: var(--acc); border-color: var(--acc); }
.lock[aria-pressed="true"] .shackle { transform: none; }                                         /* closed */
.lock.nudge { animation: lock-glow .6s ease-in-out 4; }
@keyframes lock-glow { 0%, 100% { box-shadow: 0 0 0 0 var(--acc); transform: scale(1); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--acc) 35%, transparent), 0 0 24px var(--acc); transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .lock.nudge { animation: none; outline: 3px solid var(--acc); outline-offset: 3px; } }
body.locked #ring { cursor: not-allowed; }
/* the player bar wears the same tint as the Now playing box (JJ): the frequency's colour over the deck, opaque */
.bar { background: linear-gradient(color-mix(in srgb, var(--acc) 10%, transparent), color-mix(in srgb, var(--acc) 10%, transparent)), var(--deck);
  border-top-color: color-mix(in srgb, var(--acc) 45%, transparent); box-shadow: 0 -6px 28px color-mix(in srgb, var(--acc) 14%, transparent); }

/* Night mode: one place to tune it. The filter sits on the root element, so fixed bars keep their place */
:root { --night-sat: .2; --night-bright: .7; --night-contrast: .95; }
html.night { filter: saturate(var(--night-sat)) brightness(var(--night-bright)) contrast(var(--night-contrast)); }
html.night .np-now i, html.night .lock.nudge { animation-duration: 2.4s; }
.nightbtn { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;   /* in the top bar, by the clock */
  background: transparent; color: var(--muted); border: 1px solid var(--line); }
.nightbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.nightbtn[aria-pressed="true"] { color: var(--fg); background: #2A2A3C; }
.nightbtn[aria-pressed="true"] svg { fill: currentColor; }
.night-ask { position: fixed; z-index: 7; right: 16px; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 64px) + 58px); max-width: min(320px, calc(100vw - 32px));
  background: var(--deck); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.night-ask p { margin: 0 0 10px; font-size: .9rem; }
.night-btns { display: flex; gap: 8px; }

/* Audience badge (catalog.audiences; redesigned with JJ 2026-10-02): a compact outlined tag in the audience's colour,
   sized to its text; an age band rides in a filled segment on the right, like a rating label: [KIDS|7–12]. */
.aud { display: inline-flex; align-items: stretch; width: fit-content; max-width: 100%; flex: none; font: 700 .62rem/1 var(--mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--audc); border: 1px solid var(--audc); border-radius: 3px; overflow: hidden; white-space: nowrap; vertical-align: middle; }
.aud > span, .aud > b { padding: 3px 6px; display: flex; align-items: center; }
.aud > b { background: var(--audc); color: #0B0B12; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.chips .aud { font-size: .7rem; } .chips .aud > span, .chips .aud > b { padding: 5px 8px; }
.stage-top #np-faud { margin-left: 10px; }
.card .aud, .prog-page h1 + .aud { margin-top: 10px; align-self: flex-start; }
.af .aud { grid-column: 2; justify-self: start; margin-top: 6px; }
.pieces .q-sub .aud { margin: 0 2px 0 6px; }
/* phones: the dial fills the width, so the top station's label needs room above it (measured: web/README.md) */
@media (max-width: 600px) { .stage .ring { margin-top: 16px; } .stage { background: #12121C; } }
/* on demand is off the dial (app.js offDial): no frequency lit, the arc hidden unless you drag it to tune */
.ring.off-dial .ring-arc:not(.dragging) { opacity: 0; }
.ring.off-dial .sat i { opacity: .55; }
.ring.off-dial .sat:hover i, .ring.off-dial .sat:focus-visible i { opacity: 1; }
/* room above and below the dial for the top and bottom labels (with an audience badge) at any number of frequencies */
@media (min-width: 601px) { .stage .ring { margin-block: 14px; } }
/* back on air after an on-demand piece ends (app.js backToLive): a short notice above the player bar */
.toast { position: fixed; z-index: 7; left: 50%; bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; max-width: calc(100vw - 32px); padding: 10px 14px;
  background: var(--deck); border: 1px solid var(--line); border-left: 3px solid var(--tacc, var(--acc)); border-radius: 6px; box-shadow: 0 6px 24px #0008;
  font: 400 .86rem/1.3 var(--body); color: var(--fg); }
.toast i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tacc, var(--acc)); margin-right: 8px; vertical-align: 1px; }
.toast b { font-family: var(--mono); font-weight: 600; color: var(--tacc, var(--fg)); }
/* nothing outgrows a phone (JJ 2026-10-02): the stage's text column and the now-playing box are one flexible column, so
   a long title or a long "Back to …" never widens them; the Up next header stacks its Back link under the heading when
   both don't fit, and the link itself ends in an ellipsis. Checked at 320, 360 and 390 px (web/check_overflow.cjs). */
.stage-over, .np-box, .next, #queue { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.stage-top > * { min-width: 0; }
.next-head { flex-wrap: wrap; row-gap: 6px; }
.q-back { flex: 0 1 auto; max-width: 100%; }
.q-sub { flex-wrap: wrap; row-gap: 2px; }   /* tags, program and length: a long program name goes to the next line, not a narrow column */
/* long cases, judged by eye at 320, 360 and 390 px (JJ 2026-10-02): a title shows in full where it is the point
   (a program's heading, About), and in lists and the now-playing box it stops at a few lines with "…"; the full
   title stays in the button's spoken label and in the captions. Real words hyphenate before they break. */
body { hyphens: auto; }
.np-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.queue .q-title, .pieces li > span > b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.pieces li > span > br { display: none; }
.pieces .prog-link { display: inline-block; max-width: 100%; vertical-align: bottom; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.about-freqs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 400px) {
  nav a { padding: 8px 6px; letter-spacing: .03em; font-size: .78rem; }   /* the whole menu on one row at 320 px */
  .top nav { gap: 2px; }
  .np-title { font-size: 1.3rem; }
  .prog-page h1, .tune-page h1 { font-size: 1.75rem; }
}
/* the bar's progress wears the station colour (JJ 2026-10-02), over a fainter band for what is already loaded ahead;
   on demand it is silver, like the rest of the bar */
.bar .progress { position: relative; }
.bar .progress span { position: relative; background: var(--acc); }
.bar .progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in srgb, var(--acc) 32%, transparent); transition: width .4s; }
/* the dial in landscape (JJ 2026-10-02): at the top of its box, never taller than the screen between the header and
   the player bar, and it stays in view while the page scrolls, within its own box (sticky in the stage's left column).
   Landscape phones get the same two columns, with a smaller dial. */
@media (min-width: 861px), (orientation: landscape) and (min-width: 600px) and (max-height: 620px) {
  .stage { overflow: clip; }   /* clip, not hidden: hidden would make the stage a scroller and stop the dial sticking */
  .stage .ring { align-self: start; position: sticky; top: calc(64px + 14px + env(safe-area-inset-top, 0px));
    width: min(100%, calc(100svh - 64px - var(--bar-h) - 44px)); min-width: 220px; justify-self: center; }
}
@media (max-width: 860px) and (orientation: landscape) and (min-width: 600px) and (max-height: 620px) {
  .stage { grid-template-columns: minmax(220px, calc(100svh - 64px - var(--bar-h) - 16px)) minmax(0, 1fr); }
  .stage .ring { max-width: none; width: min(100%, calc(100svh - 64px - var(--bar-h) - 64px)); min-width: 200px; }
  .stage .stage-over { border-left: 1px solid var(--line); border-top: 0; padding: 18px 20px 20px; }
}
/* short landscape screens (phones, small tablets): the tuned station's label stands above a small dial, so the dial keeps
   an inner margin at the top of its box, as it has at the bottom, at rest and when it sticks under the header (JJ 2026-10-02) */
@media (orientation: landscape) and (min-width: 600px) and (max-height: 620px) {
  .stage .ring { margin-block: 44px 12px; top: calc(64px + 44px + env(safe-area-inset-top, 0px)); }
}
/* kind tags, quieter (JJ 2026-10-02): one grey for every kind, and an icon says which (catalog.kinds[k].icon); the
   kind colours stay for charts such as the Tune it talk/music share */
[data-kind="music"] { --ki: var(--ki-music); } [data-kind="talk"] { --ki: var(--ki-talk); } [data-kind="news"] { --ki: var(--ki-news); }
[data-kind="ad"] { --ki: var(--ki-ad); } [data-kind="imaging"] { --ki: var(--ki-imaging); } [data-kind="liner"] { --ki: var(--ki-liner); }
.ktag, #bar-kind { --kq: #A3A9B6; display: inline-flex; align-items: center; gap: .45em; color: var(--kq);
  background: color-mix(in srgb, var(--kq) 9%, transparent); border-color: color-mix(in srgb, var(--kq) 30%, transparent); }
.ktag::before, #bar-kind::before { content: ""; flex: none; width: 1.25em; height: 1.25em; margin-block: -.2em; background: currentColor;
  -webkit-mask: var(--ki, linear-gradient(transparent, transparent)) center / contain no-repeat;
  mask: var(--ki, linear-gradient(transparent, transparent)) center / contain no-repeat; }   /* no icon: an empty slot, never a grey square */
#bar-kind:empty::before { display: none; }
/* Earlier (JJ 2026-10-02): Up next in reverse, above Now. One quiet row: back to the start of the program on air (or the
   one before); it moves the station clock like an Up next item, and Back returns */
.np-prev { appearance: none; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; width: 100%; min-width: 0; margin: 0 0 10px;
  padding: 7px 10px; background: none; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); font: inherit; text-align: left; cursor: pointer; }
.np-prev:hover, .np-prev:focus-visible { border-color: var(--acc); background: var(--deck); color: var(--fg); }
.np-prev .pv-l { font: 600 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.np-prev .pv-t { font: 600 .74rem/1 var(--mono); color: var(--phosphor); }
.np-prev .pv-n { font-size: .86rem; font-weight: 600; color: var(--fg); min-width: 0; }
.np-prev .pv-s { font-weight: 400; color: var(--muted); }
/* Up next times, NEXT included: a dimmer green (JJ 2026-10-02), still the live-data colour, just quieter than titles */
.queue .t, .q-nextlbl, .np-prev .pv-t { color: color-mix(in srgb, var(--phosphor) 62%, var(--muted)); }
/* program links in On demand (JJ 2026-10-02): the program's colour, no underline; a thin underline on hover, and the
   usual focus ring, so they still read as links */
.pieces .prog-link { text-decoration: none; }
.pieces .prog-link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pieces .prog-link:focus-visible { outline: 2px solid var(--pacc); outline-offset: 2px; border-radius: 2px; }
/* the station clock panel (aesthetic pass, JJ 2026-10-02): a big readout with the date and state on top, tinted by the
   tuned station; then three labelled rows (day, move, jump to) whose buttons share one grid, and the notes last */
.tclock-pop { width: min(360px, calc(100vw - 32px)); padding: 0; gap: 0; overflow: hidden;
  border-top: 3px solid var(--acc); background: linear-gradient(color-mix(in srgb, var(--acc) 7%, transparent), transparent 120px), var(--deck); }
.ck-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.ck-read { display: grid; gap: 4px; min-width: 0; }
.ck-state { font: 600 .66rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--phosphor) 70%, var(--muted)); }
.tclock[data-state="shifted"] .ck-state { color: var(--acc); }
.tclock[data-state="offline"] .ck-state { color: var(--alert); }
.ck-big { font: 700 2rem/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .01em; color: var(--fg); }
.ck-date { font-size: .82rem; color: var(--muted); }
.ck-live { appearance: none; flex: none; padding: 9px 12px; border: 0; border-radius: 4px; background: var(--acc); color: var(--space);
  font: 700 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.ck-live:hover { filter: brightness(1.12); }
.ck-sec { display: grid; gap: 7px; padding: 12px 18px 0; }
.ck-lbl { font: 600 .64rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tclock-pop .clock-days { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 0; margin: 0;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.ck-arrow { appearance: none; height: 34px; border: 0; background: none; color: var(--fg); font: 600 1.1rem/1 var(--mono); cursor: pointer; }
.ck-arrow:first-child { border-right: 1px solid var(--line); } .ck-arrow:last-child { border-left: 1px solid var(--line); }
.ck-arrow:hover:not(:disabled) { background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--acc); }
.ck-arrow:disabled { opacity: .3; cursor: default; }
.tclock-pop .clock-day { font: 600 .78rem/1 var(--mono); letter-spacing: .1em; color: var(--fg); }
.tclock-pop .clock-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; width: 100%; }
.tclock-pop .clock-steps button { padding: 9px 4px; text-align: center; color: var(--fg); font-size: .74rem; }
.tclock-pop .clock-steps button + button { border-left: 1px solid var(--line); }
.tclock-pop .clock-steps button:hover { background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--acc); }
.ck-at { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: .78rem; color: var(--muted); }
.ck-at input { background: var(--space); color: var(--fg); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; font: 600 .8rem/1 var(--mono); color-scheme: dark; }
.ck-notes { display: grid; gap: 6px; margin-top: 14px; padding: 12px 18px 14px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--space) 45%, transparent); }
.tclock-pop .ck-notes .note { margin: 0; font-size: .76rem; line-height: 1.45; }
/* a soft glow in each station's colour around its dot (JJ 2026-10-02), stronger on the tuned one, quieter at night;
   a shadow takes no room, so the label distances above are unchanged */
.sat { --glow: 1; }
html.night .sat { --glow: .55; }
.sat i { box-shadow: 0 0 0 5px var(--space), 0 0 0 6px var(--line), 0 0 calc(16px * var(--glow)) calc(3px * var(--glow)) color-mix(in srgb, var(--sacc) 45%, transparent); }
.sat[aria-pressed="true"] i { box-shadow: 0 0 0 5px var(--space), 0 0 0 var(--sel-ring) var(--sacc),
  0 0 calc(22px * var(--glow)) calc(6px * var(--glow)) color-mix(in srgb, var(--sacc) 70%, transparent),
  0 0 calc(44px * var(--glow)) calc(10px * var(--glow)) color-mix(in srgb, var(--sacc) 28%, transparent); }
/* the dial's centre answers a tap (a pulse) and a hold (a scan through the stations) (JJ 2026-10-02) */
.ring { -webkit-touch-callout: none; -webkit-user-select: none; }
.ring-center { cursor: pointer; }
.ring.scanning .ring-arc { transition: transform .5s ease-in-out; }
/* On demand rows play when tapped anywhere, like Up next rows (JJ 2026-10-02, option A): the round play icon stays as
   the cue; the play button's hit area covers the row, and the program link and sources sit above it */
.pieces li { position: relative; border-radius: 6px; transition: background .15s; }
.pieces .mini::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.pieces .prog-link, .pieces details, .pieces summary, .pieces a { position: relative; z-index: 1; }
.pieces li:hover { background: var(--deck); }
.pieces li:hover .mini { border-color: var(--pacc, var(--acc)); background: var(--pacc, var(--acc)); color: var(--space); }
/* the orbit line itself a little brighter, so the dial reads even dimmed or at night (JJ 2026-10-02: "too faint") */
.stage .ring-track { stroke: color-mix(in srgb, var(--muted) 45%, var(--line)); }
/* interface icons (JJ 2026-10-02): inline SVG in currentColor (app.js ico()), or a mask for CSS-drawn ones; never text glyphs */
:root { --ic-play: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath fill=%27black%27%20d=%27M7%204.5v15L19.5%2012z%27/%3E%3C/svg%3E"); --ic-down: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.2%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27%20d=%27M6%209l6%206%206-6%27/%3E%3C/svg%3E"); --ic-warn: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.2%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27%20d=%27M12%203.5%202.5%2020h19zM12%2010v4.5M12%2017.2v.3%27/%3E%3C/svg%3E"); }
.ic { display: inline-block; flex: none; width: 1.15em; height: 1.15em; vertical-align: -.2em; }
.np-prev .pv-l, .q-back, .back, .sec-link { display: inline-flex; align-items: center; gap: .4em; }
.np-prev .pv-l .ic { width: 1.25em; height: 1.25em; }
.sec-link .ic, .back .ic { width: 1.2em; height: 1.2em; }
.ck-arrow { display: grid; place-items: center; } .ck-arrow .ic { width: 18px; height: 18px; }
/* disclosure rows (Sources, piece notes) draw a chevron, not the browser's text triangle */
.sources summary, .pieces summary { list-style: none; display: inline-flex; align-items: center; gap: .45em; }
.sources summary::-webkit-details-marker, .pieces summary::-webkit-details-marker { display: none; }
.sources summary::before, .pieces summary::before { content: ""; flex: none; width: 1em; height: 1em; background: currentColor; transform: rotate(-90deg); transition: transform .15s;
  -webkit-mask: var(--ic-down) center / contain no-repeat; mask: var(--ic-down) center / contain no-repeat; }
.sources[open] > summary::before, .pieces details[open] > summary::before { transform: none; }
.np-prev { align-items: center; }
/* tags beside text (JJ 2026-10-02): kind, audience and status tags share one height and sit centred on the text line
   next to them; in a list's sub-line every part (tags, program, sponsor, notes) is a flex item, so nothing rides high */
.pieces .q-sub { display: block; margin-top: 2px; font-size: .86rem; line-height: 1.9; color: var(--muted); }
.pieces .q-sub > .ktag + .aud { margin-left: 4px; }
.pieces .q-sub .aud, .q-sub .aud { margin: 0; }
.ktag, .aud { vertical-align: middle; }   /* tags sit centred on the text line beside them */
.card .tags { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin-top: 2px; }
.card .tags .aud { margin: 0; font-size: .68rem; }
.card .tags .badge, .card .tags .aud > span, .card .tags .aud > b { padding: 4px 6px; }
.chips .aud > span, .chips .aud > b { padding: 6px 8px; }
/* Up next has no grey heading (JJ 2026-10-02): the first row's green "Up next · in n min" says it; the heading stays for
   screen readers, and the head row only holds Back, on the right, when there is one */
.next-head { justify-content: flex-end; }
.next-head:has(> .q-back[hidden]) { display: none; }
.next-head:has(> .q-back[hidden]) + .queue > li:first-child { border-top: 0; }   /* one rule above Up next, not two */

/* legal pages and the links to them at the foot of every view */
.legal { padding-block: 8px 24px; }
.legal h2 { font-size: 1rem; letter-spacing: .04em; }
.legal ul { padding-left: 1.2em; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-block: 28px 20px; border-top: 1px solid var(--line); margin-top: 32px; font-size: .8rem; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover, .legal-links a:focus-visible { color: var(--fg); text-decoration: underline; }
.disc a { color: inherit; text-decoration: none; }
.disc a:hover, .disc a:focus-visible { text-decoration: underline; }
