/* Livestream Radio — one stylesheet, no framework, no web fonts.
   Page weight is a ranking input and this site's whole value is "click and it
   plays", so everything here is in service of first paint. System fonts only. */

:root {
  --bg: #0b0d12;
  --bg-soft: #12151d;
  --bg-lift: #181c26;
  --line: #242a37;
  --ink: #e8ecf4;
  --ink-dim: #99a2b5;
  --ink-faint: #6b7487;
  --accent: #4ade80;
  --accent-ink: #0b0d12;
  --warn: #fbbf24;
  --down: #64748b;
  --radius: 10px;
  --wrap: 68rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-soft: #f6f7f9;
    --bg-lift: #eef0f4;
    --line: #dfe3ea;
    --ink: #11151c;
    --ink-dim: #4d566a;
    --ink-faint: #767f92;
    --accent: #047857;
    --accent-ink: #ffffff;
    --warn: #92400e;
    --down: #8a93a5;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  padding-bottom: 5.5rem;            /* room for the fixed player bar */
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1rem; }

a { color: var(--ink); text-decoration-color: var(--ink-faint); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--accent); }

h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; margin: 2.25rem 0 .75rem; letter-spacing: -.01em; }
h3 { font-size: .95rem; margin: 0 0 .5rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .06em; }

.vis-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 50;
  background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem;
}
.skip:focus { left: 0; }

/* ── The required notice: first line of the page, impossible to miss ─────── */
.notice {
  margin: 0;
  padding: .7rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

/* ── Masthead ────────────────────────────────────────────────────────────── */
.masthead { border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.masthead-in { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; padding-block: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; letter-spacing: -.01em; }
.brand-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--accent) 22%, transparent); }
.nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-left: auto; font-size: .88rem; }
.nav a { color: var(--ink-dim); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.count { color: var(--ink-faint); font-size: .8em; font-variant-numeric: tabular-nums; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding-block: 1.75rem .5rem; }
.lede { color: var(--ink-dim); max-width: 46rem; margin: 0 0 1rem; }
.aka { color: var(--ink-faint); font-size: .9rem; margin: 0 0 1rem; }
.crumbs { font-size: .82rem; color: var(--ink-faint); margin-bottom: .6rem; }
.crumbs a { color: var(--ink-faint); }

.counts { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.1rem; padding: 0; }
.pill {
  font-size: .78rem; padding: .22rem .6rem; border-radius: 999px;
  background: var(--bg-lift); color: var(--ink-dim); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.pill--up { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); font-weight: 600; }

/* ── Search ──────────────────────────────────────────────────────────────── */
.search { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.search input {
  flex: 1 1 18rem; min-width: 0; padding: .6rem .8rem; font-size: 1rem;
  background: var(--bg-soft); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.search button {
  padding: .6rem 1.1rem; font-size: .95rem; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: var(--radius);
}
.search .clear { align-self: center; font-size: .85rem; color: var(--ink-faint); }

/* ── The station list ────────────────────────────────────────────────────── */
.stations { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 1px solid var(--line); }

.station {
  display: grid;
  grid-template-columns: 2.1rem 2.6rem 1fr auto;
  align-items: center;
  gap: .25rem .7rem;
  padding: .6rem .35rem;
  border-bottom: 1px solid var(--line);
}
.station:hover { background: var(--bg-soft); }
.station--down { opacity: .62; }

.rank { color: var(--ink-faint); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }

.play {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: var(--bg-lift); border: 1px solid var(--line); color: var(--ink);
  transition: background .12s ease, transform .12s ease;
}
.play:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); transform: scale(1.06); }
.play:disabled { opacity: .35; cursor: not-allowed; }
.play:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* A CSS triangle, so the play control costs no request and no icon font. */
.play-icon {
  width: 0; height: 0; margin-left: .18rem;
  border-left: .62rem solid currentColor;
  border-top: .38rem solid transparent;
  border-bottom: .38rem solid transparent;
}
.play[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.play[aria-pressed="true"] .play-icon {
  margin-left: 0; width: .58rem; height: .58rem; border: 0; background: currentColor;
}
.play--loading { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

.station-main { min-width: 0; }
.station-name { font-weight: 600; text-decoration: none; }
.station-name:hover { text-decoration: underline; }
.station-sub {
  margin: .1rem 0 0; font-size: .8rem; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: .3rem .55rem;
}
.station-sub .freq { color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.tag { color: var(--ink-faint); text-decoration: none; }
.tag:hover { color: var(--accent); }

.station-side { display: flex; align-items: center; gap: .55rem; font-size: .76rem; white-space: nowrap; }
.spec { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.uptime { color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.status { padding: .12rem .5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-faint); }
.status--up { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 600; }
.status--down { color: var(--down); }
.status--unchecked { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

@media (max-width: 40rem) {
  .station { grid-template-columns: 1.6rem 2.4rem 1fr; }
  .station-side { grid-column: 3; justify-content: flex-start; font-size: .72rem; }
  .rank { font-size: .72rem; }
}

/* ── Station page ────────────────────────────────────────────────────────── */
.station-page { padding-block: 1.75rem; }
.station-head { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; justify-content: space-between; }

.play--big {
  width: auto; height: auto; border-radius: var(--radius);
  padding: .7rem 1.2rem; gap: .6rem; grid-auto-flow: column;
  background: var(--accent); color: var(--accent-ink); border: 0;
  font-size: 1rem; font-weight: 700;
}
.play--big:hover:not(:disabled) { transform: translateY(-1px); }
.play-label { line-height: 1; }

.meta { width: 100%; border-collapse: collapse; font-size: .9rem; }
.meta th, .meta td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.meta th { width: 12rem; color: var(--ink-faint); font-weight: 500; }
.meta code { font-size: .85em; color: var(--ink-dim); }
@media (max-width: 34rem) { .meta th { width: 8.5rem; } }

.warn {
  padding: .7rem .9rem; border-radius: var(--radius); font-size: .88rem;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  color: var(--ink-dim);
}

.history { display: flex; flex-wrap: wrap; gap: 3px; margin: .25rem 0; }
.tick { width: .55rem; height: 1.3rem; border-radius: 2px; background: var(--down); display: inline-block; }
.tick--up { background: var(--accent); }
.tick--down { background: color-mix(in srgb, var(--down) 55%, transparent); }
.history-key { font-size: .78rem; color: var(--ink-faint); display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.history-key .tick { height: .8rem; }

/* ── Hubs, FAQ, prose ────────────────────────────────────────────────────── */
.hubs { padding-bottom: 1.5rem; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; }
.hub-list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.hub-list li { padding: .22rem 0; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }

.faq dl { margin: 0; }
.faq dt { font-weight: 650; margin-top: 1rem; }
.faq dd { margin: .25rem 0 0; color: var(--ink-dim); }

.prose { padding-block: 1.75rem; max-width: 46rem; }
.prose p { color: var(--ink-dim); }
.prose h2 { color: var(--ink); }
.empty { color: var(--ink-dim); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-block: 1.5rem; margin-top: 1.5rem; font-size: .84rem; }
.footer-notice { color: var(--accent); letter-spacing: .04em; margin: 0 0 .75rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-bottom: .75rem; }
.footer-label { color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.footer-nav a { color: var(--ink-dim); text-decoration: none; }
.footer-meta { color: var(--ink-faint); margin: .25rem 0; }

/* ── Player bar ──────────────────────────────────────────────────────────── */
.player {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  background: var(--bg-lift);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .28);
}
.player-in { display: flex; align-items: center; gap: .8rem; padding-block: .6rem; }
.player-toggle, .player-close {
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  border-radius: 50%; width: 2.3rem; height: 2.3rem; cursor: pointer; flex: none;
  display: grid; place-items: center; font-size: .9rem; line-height: 1;
}
.player-toggle:hover, .player-close:hover { border-color: var(--accent); color: var(--accent); }
.player-meta { min-width: 0; flex: 1 1 auto; }
.player-name { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.player-state { font-size: .76rem; color: var(--ink-faint); }
.player-state--error { color: var(--warn); }
.player-vol { flex: 0 1 8rem; display: flex; }
.player-vol input { width: 100%; accent-color: var(--accent); }
@media (max-width: 30rem) { .player-vol { display: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Country landing pages */
.facet-line { color: var(--ink-dim); font-size: .88rem; margin: 0 0 1rem; }
.hubs h3 { margin-top: 1.25rem; }
.hubs h3:first-child { margin-top: 0; }

/* Audiomack strip — replaced the test-only banner 2026-09-20 */
.promo {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .6rem 1rem; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; font-size: .86rem; letter-spacing: .01em;
}
.promo:hover { filter: brightness(1.06); }
.promo-mark { font-size: 1.05em; }
.promo-go { transition: transform .15s ease; }
.promo:hover .promo-go { transform: translateX(3px); }
@media (max-width: 30rem) { .promo-text { font-size: .8rem; } }

.footer-promo { margin-bottom: 1.25rem; }
.footer-promo h2 { margin: 0 0 .3rem; font-size: 1rem; }
.footer-promo p { margin: 0 0 .75rem; color: var(--ink-dim); }
.audiomack-embed {
  width: 100%; max-width: 46rem; height: 252px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-lift);
}

/* Social profiles. Only configured networks render, so this list is never
   padded out with dead links. */
.socials { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin: 0 0 1rem; }
.socials a {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .7rem; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); background: var(--bg-lift);
  color: var(--ink-dim); font-size: .82rem; font-weight: 600;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); }
.social-glyph { font-size: .95em; }
