/* Tokens: change colours here, every component reads from these */
:root {
  --bg: #f8f5ef;
  --surface: #ffffff;
  --surface-2: #f2ede4;
  --ink: #1d1b18;
  --muted: #6b645b;
  --line: #e4ddd0;
  --accent: #b5470f;
  --accent-hover: #963a0b;
  --accent-ink: #ffffff;
  --ok: #2f7d4f;
  --warn: #9a6a00;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 27, 24, 0.06), 0 6px 20px rgba(29, 27, 24, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100d;
    --surface: #1c1915;
    --surface-2: #26221c;
    --ink: #f3eee6;
    --muted: #a39a8e;
    --line: #34302a;
    --accent: #e0703a;
    --accent-hover: #ea8150;
    --accent-ink: #12100d;
    --ok: #5cc284;
    --warn: #e0b04a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.3);
  }
}

:root[data-theme="dark"] {
  --bg: #12100d;
  --surface: #1c1915;
  --surface-2: #26221c;
  --ink: #f3eee6;
  --muted: #a39a8e;
  --line: #34302a;
  --accent: #e0703a;
  --accent-hover: #ea8150;
  --accent-ink: #12100d;
  --ok: #5cc284;
  --warn: #e0b04a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: 104px;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

h1, h2 { line-height: 1.15; letter-spacing: -0.01em; }
h1 { margin: 0 0 14px; font-size: clamp(28px, 5vw, 46px); font-weight: 750; max-width: 16ch; }
h2 { margin: 0; font-size: 20px; font-weight: 700; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: inset 0 0 0 6px var(--accent), inset 0 0 0 9px var(--bg);
}
.brand-name { font-weight: 750; font-size: 17px; letter-spacing: -0.01em; }
.brand-logo { width: 28px; height: 28px; display: block; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.brand-accent { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 12px; flex: 1 1 300px; justify-content: flex-end; min-width: 0; }

.search {
  position: relative;
  flex: 1 1 220px;
  max-width: 340px;
  display: flex;
  align-items: center;
}
.search svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; border-radius: 999px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.status.is-offline .dot { background: var(--warn); box-shadow: none; }

input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hero */
.hero {
  background:
    radial-gradient(900px 300px at 85% -20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 48px 20px 40px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lede { margin: 0 0 22px; color: var(--muted); font-size: 18px; max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 28px 0 0; }
.stats div { display: grid; gap: 2px; }
.stats dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stats dd { margin: 0; font-size: 26px; font-weight: 750; font-variant-numeric: tabular-nums; }

/* Buttons */
.btn, .link-btn, .icon-btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover, .icon-btn:hover { border-color: var(--accent); }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; }
.link-btn { border: none; background: none; color: var(--accent); padding: 4px 0; font-weight: 600; }
.icon-btn { padding: 8px 14px; font-size: 14px; }

/* Sections */
.section { max-width: 1120px; margin: 0 auto; padding: 36px 20px 8px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.fine { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

/* Country row: a horizontal strip on phones, wrapping on desktop */
.country-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.tile {
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  font: 500 14px/1 system-ui, sans-serif;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tile:hover { border-color: var(--accent); }
.tile.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tile .n { font-size: 12px; opacity: 0.65; font-variant-numeric: tabular-nums; }
@media (min-width: 760px) {
  .country-row { flex-wrap: wrap; overflow: visible; }
}

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.tab {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}
.tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.count { font-size: 12px; opacity: 0.7; font-variant-numeric: tabular-nums; }

/* Toolbar */
.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  align-items: end;
  margin-bottom: 16px;
}
.toolbar .results-line { grid-column: 1 / -1; margin: 0; }
.toolbar .link-btn { justify-self: start; }
@media (min-width: 760px) {
  .toolbar { grid-template-columns: 200px 200px auto 1fr; }
  .toolbar .results-line { grid-column: auto; text-align: right; }
}
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.field input, .field select { color: var(--ink); font-weight: 400; }
.results-line { font-size: 14px; color: var(--muted); }

/* Station cards: compact, in an auto-fill grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-content: start;
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card.is-playing { border-color: var(--accent); }
.card-body { min-width: 0; grid-column: 2; }
.card-name { font-weight: 650; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { font-size: 12px; background: var(--surface-2); border-radius: 999px; padding: 2px 9px; color: var(--muted); }
.card-actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 10px; }
.card-actions .btn { flex: 1; padding: 8px 12px; font-size: 14px; }
.btn-save { flex: none !important; }
.btn-save[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.empty {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--muted);
}
.empty button { margin-top: 10px; }

/* Avatar: monogram in a colour derived from the station name */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 15px;
  color: #fff;
  grid-row: span 2;
  flex: none;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}
.avatar-sm { width: 40px; height: 40px; font-size: 13px; border-radius: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 28px 20px; display: grid; gap: 12px; }
.footer-about { margin: 0; font-size: 14px; color: var(--muted); max-width: 70ch; }
.footer-links { display: flex; gap: 16px; }

/* Player */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(29, 27, 24, 0.08);
  z-index: 20;
}
.player-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
.play-btn:hover { background: var(--accent-hover); }
.play-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.now { min-width: 0; flex: 1; }
.now-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Equaliser: animates only while audio plays */
.eq { display: none; align-items: flex-end; gap: 3px; height: 18px; }
.player.is-playing .eq { display: inline-flex; }
.eq i { width: 3px; height: 100%; background: var(--accent); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: 0.2s; }
.eq i:nth-child(3) { animation-delay: 0.4s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .eq i { animation: none; transform: scaleY(0.7); }
}

@media (max-width: 560px) {
  .player-inner { gap: 8px; padding: 10px 14px; }
  .player .icon-btn { display: none; }
  .eq { display: none !important; }
}

/* Submit modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 30;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  width: min(540px, 100%);
  max-height: 90vh;
  overflow: auto;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}
#submit-form { display: grid; gap: 12px; }
.checks { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
.checks legend { font-size: 13px; color: var(--muted); padding: 0 4px; font-weight: 600; }
.checks-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { font-size: 14px; display: flex; gap: 6px; align-items: center; }
.form-error { color: var(--accent); margin: 0; font-size: 14px; }
#submit-json { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

@media (max-width: 560px) {
  .hero-inner { padding: 36px 16px 30px; }
  .section { padding: 28px 16px 8px; }
  .site-header { padding: 12px 16px; }
  .stats { gap: 20px; }
}

/* Map */
.map-wrap { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.map { width: 100%; min-height: 200px; }
.map svg { display: block; width: 100%; height: auto; }
.map path.country { fill: var(--surface-2); stroke: var(--bg); stroke-width: 0.6; transition: fill 0.15s; }
.map path.country.has-stations { fill: color-mix(in srgb, var(--accent) 38%, var(--surface)); cursor: pointer; }
.map path.country.has-stations:hover { fill: color-mix(in srgb, var(--accent) 65%, var(--surface)); }
.map path.country.is-active { fill: var(--accent); }
.map path.country:focus { outline: none; }
.map-status { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.fallback-label { margin: 16px 0 8px; }

/* Station panel under the map */
.country-panel {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.country-panel h3 { margin: 0; font-size: 18px; }
.panel-list { display: grid; gap: 8px; margin-top: 12px; max-height: 420px; overflow-y: auto; }
.prow {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.prow.is-playing { border-color: var(--accent); }
.prow-body { min-width: 0; }
.prow-actions { display: flex; gap: 6px; }
.prow-actions .btn { padding: 7px 12px; font-size: 14px; }
@media (max-width: 480px) {
  .prow { grid-template-columns: auto 1fr; }
  .prow-actions { grid-column: 1 / -1; }
  .prow-actions .btn { flex: 1; }
}

/* Radio / TV switch */
.switch { display: inline-flex; background: var(--surface-2); padding: 4px; border-radius: 999px; gap: 2px; }
.switch a { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 6px 14px; border-radius: 999px; }
.switch a.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* TV player */
.tv-player { position: sticky; top: 56px; z-index: 15; background: #000; }
.tv-player-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 10px; padding: 0 20px 14px; }
.tv-player video { width: 100%; max-height: 62vh; background: #000; border-radius: 0 0 var(--radius) var(--radius); display: block; }
.tv-now { display: flex; flex-direction: column; color: #fff; }
.tv-now .now-name { color: #fff; }
.tv-now .now-meta { color: #bbb; }
.tv-player .link-btn { color: #fff; justify-self: end; }

/* Offline fallback: network banner, off-air card and status pill */
.net-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--warn);
  color: #1d1b18;
  font-size: 14px;
  font-weight: 600;
}
.net-banner[hidden] { display: none !important; }

.offline-card {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100px;
  width: min(480px, calc(100% - 24px));
  z-index: 25;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 32px rgba(29, 27, 24, 0.18);
  display: grid;
  gap: 12px;
}
.offline-head { display: flex; gap: 12px; align-items: flex-start; }
.offline-title { font-weight: 750; font-size: 16px; }
.offline-text { font-size: 14px; color: var(--muted); margin-top: 2px; }
.offline-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.offline-actions .btn { padding: 8px 14px; font-size: 14px; }

.tv-offline {
  position: static;
  transform: none;
  bottom: auto;
  width: auto;
  margin: 0 0 4px;
  background: #1c1915;
  color: #f3eee6;
  border: 1px solid #34302a;
  border-left: 4px solid #e0b04a;
  box-shadow: none;
}
.tv-offline .offline-text { color: #bdb5a8; }
.tv-offline .btn { background: #26221c; color: #f3eee6; border-color: #34302a; }
.tv-offline .btn-primary { background: #e0703a; color: #12100d; border-color: #e0703a; }

.off-pill {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, #c0392b 16%, transparent);
  color: #b03a2e;
  border: 1px solid color-mix(in srgb, #c0392b 40%, transparent);
}
.offline-count { font-size: 14px; font-weight: 600; color: var(--ink); min-height: 1.2em; }
.tv-offline .offline-count { color: #f3eee6; }

/* Station descriptions */
.card-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prow .card-desc { -webkit-line-clamp: 2; }

/* First-class search */
.search-section { padding-bottom: 4px; }
.search-wrap { position: relative; }
.search-big {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  box-shadow: var(--shadow);
  color: var(--muted);
}
.search-big:focus-within { border-color: var(--accent); }
.search-big input {
  border: none;
  background: transparent;
  padding: 15px 0;
  font-size: 17px;
  box-shadow: none;
}
.search-big input:focus { outline: none; }
.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(29, 27, 24, 0.18);
  max-height: 60vh;
  overflow-y: auto;
  padding: 6px;
}
.suggest[hidden] { display: none; }
.sug {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
}
button.sug:hover, .sug:hover { background: var(--surface-2); }
.sug-body, .sug-main { min-width: 0; }
.sug-main { display: block; font-weight: 650; }
.sug-meta { display: block; font-size: 13px; color: var(--muted); }
.sug-body { flex: 1; }
.sug-country .sug-main::before { content: ""; }
.sug-all { justify-content: center; color: var(--accent); font-weight: 650; }
.sug-empty { margin: 0; padding: 12px; color: var(--muted); font-size: 14px; }
.btn-sm { padding: 6px 12px; font-size: 13px; flex: none; }

/* Online now carousel */
.carousel { display: flex; align-items: center; gap: 8px; }
.car-track {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.car-track::-webkit-scrollbar { display: none; }
.car-card {
  flex: 0 0 min(280px, 82%);
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.car-top { display: flex; align-items: center; gap: 8px; }
.flag { border-radius: 3px; box-shadow: 0 0 0 1px var(--line); width: 32px; height: 24px; object-fit: cover; }
.car-country { font-size: 13px; color: var(--muted); font-weight: 600; }
.car-name { margin: 0; font-size: 18px; line-height: 1.25; }
.car-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.9em;
}
.car-card .btn { justify-self: start; }
.car-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.car-btn:hover { border-color: var(--accent); }
.car-dots { display: flex; justify-content: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.car-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
  padding: 0;
}
.car-dot.is-on { background: var(--accent); }
@media (max-width: 560px) { .car-btn { display: none; } }

/* Listener fixes */
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.quick-label { font-size: 13px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.chip {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.map-legend { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.swatch { width: 14px; height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 60%, var(--surface)); flex: none; }
.map path.country.has-stations { fill: color-mix(in srgb, var(--accent) 60%, var(--surface)); }
.map path.country.has-stations:hover { fill: color-mix(in srgb, var(--accent) 85%, var(--surface)); }
@media (max-width: 560px) {
  .status { display: none; }
  .lede { font-size: 16px; }
}

/* Donor pages */
.give .lede, .legal .lede { color: var(--muted); }
.give-form { display: grid; gap: 18px; margin: 24px 0; max-width: 560px; }
.give-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0; background: var(--surface); }
.give-block legend { font-weight: 650; padding: 0 6px; font-size: 14px; }
.seg, .amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.seg label, .amounts label { cursor: pointer; }
.seg input, .amounts input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .amounts span {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 650;
  background: var(--bg);
}
.seg input:checked + span, .amounts input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg input:focus-visible + span, .amounts input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.trust { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.trust h2 { font-size: 18px; }

/* Landing page */
.product-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
.product-card {
  display: grid;
  gap: 10px;
  align-content: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s;
}
.product-card:hover { border-color: var(--accent); }
.product-card h2 { margin: 0; font-size: 22px; }
.product-card p { margin: 0; color: var(--muted); }
.product-link { font-weight: 650; color: var(--accent); }

/* Library and gallery feeds */
.feed-intro { margin-bottom: 24px; }
.feed-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0; }
.feed-toolbar input { max-width: 360px; }
.feed-status { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.feed-status.is-error { color: var(--warn); }
.feed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 300px)); gap: 16px; align-items: start; }
.feed-card { display: grid; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.feed-card h2 { font-size: 18px; }
.feed-card p { margin: 0; color: var(--muted); }
.feed-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; background: var(--surface-2); }
.feed-card .btn { justify-self: start; }
.feed-empty { padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); max-width: 620px; }
