/* The public side of the station: the listening page and the engagement page.
 *
 * Kept apart from raas.css on purpose. That stylesheet dresses a dense
 * back-office built for someone who uses it all day; these two pages are seen
 * once, by a listener on a phone, and want the opposite — few things, large,
 * and legible at arm's length.
 *
 * One file, no framework, nothing fetched at run time. Same reason as the rest
 * of the system: it has to work on a slow Zimbabwean connection.
 */

/* The `hidden` attribute must win.
 *
 * A browser's own rule for it is `[hidden] { display: none }`, which any class
 * that sets `display` outranks by coming later in this file — so `.sheet
 * { display: grid }` left every dialog permanently open, covering the page.
 * Cancel appeared to do nothing, and the schedule looked like it would not
 * navigate away, because an invisible-to-reason overlay was sitting on top of
 * it. This is the one place !important is the right tool: hidden means hidden,
 * whatever else a rule has to say about layout.
 */
[hidden] { display: none !important; }

:root {
  --ink:   #1a1d23;
  --dim:   #5a6273;
  --faint: #858d9c;
  --bg:    #f4f5f7;
  --panel: #ffffff;
  --raise: #eceef2;
  --line:  #d7dbe2;
  --accent:#12508c;
  --accent-deep: #0d3d6c;
  --accent-wash: #eaf1f8;
  --live:  #c62828;
  --live-wash: #fdeceb;
  --good:  #1c7a4a;
  --star:  #b8860b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: 28px 20px 56px;
}

.wrap { width: 100%; max-width: 960px; margin: 0 auto; }
.wrap.narrow { max-width: 560px; }

/* ------------------------------------------------------------------ header */

.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 30px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.mark {
  width: 40px; height: 40px; border-radius: 4px; flex: none;
  background: var(--accent);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #fff; letter-spacing: -.02em;
}
.brand-text { font-weight: 650; letter-spacing: -.01em; line-height: 1.15; }
.brand-text small { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }

.site-nav { display: flex; gap: 6px; }
.site-nav a {
  color: var(--dim); text-decoration: none; font-size: 14px; font-weight: 550;
  padding: 7px 13px; border-radius: 4px; transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--raise); color: var(--ink); }
.site-nav a.here { background: var(--accent-wash); color: var(--accent); }

/* -------------------------------------------------------------------- hero */

.hero { margin-bottom: 26px; }
.hero h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.025em; font-weight: 660; }
.hero .lede { color: var(--dim); margin-top: 7px; font-size: 15px; }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 650; padding: 5px 11px; border-radius: 999px; margin-bottom: 14px;
}
.badge.on  { background: var(--live); color: #fff; }
.badge.off { background: var(--raise); color: var(--dim); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.on .dot { animation: pulse 1.7s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ------------------------------------------------------------------- cards */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
}
.card h2 { font-size: 17px; font-weight: 620; letter-spacing: -.01em; }
.card .sub { color: var(--faint); font-size: 13px; margin-top: 4px; }

.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }

/* ----------------------------------------------------------------- ratings */

.rating-summary { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.stars { letter-spacing: 2px; font-size: 17px; color: var(--line); }
.star.lit { color: var(--star); }
.rating-text { color: var(--faint); font-size: 13px; }

.star-pick { display: flex; align-items: center; gap: 3px; margin-top: 7px; }
.star-btn {
  background: none; border: 0; cursor: pointer; font-size: 27px; line-height: 1;
  color: var(--line); padding: 2px; transition: color .12s, transform .12s;
}
.star-btn:hover { transform: scale(1.14); }
.star-btn.lit { color: var(--star); }
.clear-stars {
  background: none; border: 0; color: var(--faint); cursor: pointer;
  font-size: 12px; margin-left: 9px; text-decoration: underline;
}

/* ---------------------------------------------------------------- the form */

.kinds { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.kind { position: relative; cursor: pointer; }
.kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind span {
  display: block; padding: 8px 15px; border-radius: 999px; font-size: 13.5px;
  font-weight: 550; border: 1px solid var(--line); color: var(--dim);
  transition: all .15s;
}
.kind:hover span { border-color: #b9c0cb; color: var(--ink); }
.kind.chosen span {
  background: var(--accent-wash); border-color: var(--accent);
  color: var(--accent);
}

.field { display: block; margin-bottom: 17px; position: relative; }
.field .label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--dim);
  margin-bottom: 6px; letter-spacing: .01em;
}
.field .label em { font-style: normal; color: var(--faint); font-weight: 400; }

.field input[type="text"], .field textarea {
  width: 100%; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 11px 13px; font: inherit; font-size: 15px; resize: vertical;
  transition: border-color .15s, background .15s;
}
.field input[type="text"]::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input[type="text"]:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 80, 140, .12);
}
.counter {
  position: absolute; right: 11px; bottom: 9px;
  font-size: 11px; color: var(--faint); pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* The honeypot. Off-screen rather than display:none — some bots skip anything
   explicitly hidden, and the point is that they fill it in. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.send {
  width: 100%; padding: 13px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--accent);
  color: #fff; font: inherit; font-size: 15px; font-weight: 650;
  transition: background .15s;
}
.send:hover { background: var(--accent-deep); }
.send:disabled { opacity: .55; cursor: default; transform: none; }

.note {
  margin-top: 13px; padding: 11px 14px; border-radius: 4px; font-size: 13.5px;
  border-left: 3px solid var(--line); background: var(--raise);
}
.note.good { border-left-color: var(--good); color: #14603a; background: #e9f5ee; }
.note.bad  { border-left-color: var(--live); color: #8f1e17; background: var(--live-wash); }

.fineprint { margin-top: 16px; font-size: 12px; color: var(--faint); line-height: 1.6; }

/* -------------------------------------------------------------- the wall */

.wall-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tally {
  font-size: 11.5px; color: var(--faint); background: var(--raise);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}

.msg { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid #eef0f3; }
.msg:last-child { border-bottom: 0; }
.msg:first-of-type { padding-top: 18px; }
.avatar {
  width: 33px; height: 33px; border-radius: 50%; flex: none;
  background: var(--accent-wash); display: grid; place-items: center;
  font-size: 13px; font-weight: 650; color: var(--accent);
}
.msg-main { min-width: 0; flex: 1; }
.msg-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg-top strong { font-size: 14px; font-weight: 620; }
.tag {
  font-size: 10.5px; padding: 2px 7px; border-radius: 3px;
  background: #eeecf7; color: #574a91; font-weight: 600;
}
.when { font-size: 11.5px; color: var(--faint); margin-left: auto; font-variant-numeric: tabular-nums; }
.msg-body { margin-top: 5px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.msg-show { margin-top: 5px; font-size: 11.5px; color: var(--faint); }

.empty { padding: 40px 16px; text-align: center; color: var(--faint); font-size: 14px; }
.empty .big { font-size: 30px; opacity: .45; display: block; margin-bottom: 9px; }
.empty .small { font-size: 12.5px; margin-top: 6px; }

/* ------------------------------------------------- the listening page only */

.player .bar {
  height: 4px; background: var(--raise); border-radius: 99px;
  margin: 20px 0 8px; overflow: hidden;
}
.player .bar span {
  display: block; height: 100%; background: var(--accent);
  border-radius: 99px; transition: width .9s linear;
}
.times {
  display: flex; justify-content: space-between;
  color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums;
}

.now {
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 15px;
}
.play {
  width: 58px; height: 58px; flex: none; border-radius: 50%; border: 0;
  background: var(--accent); color: #fff; font-size: 21px; cursor: pointer;
  display: grid; place-items: center; transition: transform .15s, opacity .15s;
}
.play:hover { transform: scale(1.05); }
.track { min-width: 0; flex: 1; }
.track .what {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint); font-weight: 650;
}
.track .name {
  margin-top: 3px; font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.track .credit { margin-top: 3px; font-size: 11.5px; color: var(--faint); }

.advert-note {
  margin-top: 16px; padding: 11px 14px; border-radius: 4px; font-size: 13px;
  background: #fdf3e2; border: 1px solid #ecd9b0;
  border-left: 3px solid #8a5a00; color: #6f4900; display: none;
}
.advert-note.show { display: block; }
.advert-note b { font-variant-numeric: tabular-nums; }

.up { margin-top: 24px; }
.up h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--faint); font-weight: 650; margin-bottom: 10px;
}
.up-row {
  display: flex; gap: 12px; align-items: baseline; padding: 9px 0;
  border-bottom: 1px solid #eef0f3; font-size: 14px;
}
.up-row:last-child { border-bottom: 0; }
.up-row .t {
  color: var(--dim); font-variant-numeric: tabular-nums;
  font-size: 13px; width: 66px; flex: none;
}
.up-row .n { flex: 1; }
.live-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 3px; font-weight: 650;
  letter-spacing: .05em; background: var(--live); color: #fff;
}

.cta {
  display: block; margin-top: 22px; padding: 15px 18px; border-radius: 6px;
  text-decoration: none; color: inherit; text-align: center;
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color .15s, background .15s;
}
.cta:hover { border-color: var(--accent); background: var(--accent-wash); }
.cta strong { display: block; font-size: 15px; font-weight: 620; }
.cta span { display: block; font-size: 12.5px; color: var(--faint); margin-top: 3px; }

/* ------------------------------------------------------------------ footer */

footer {
  margin-top: 32px; text-align: center;
  color: var(--faint); font-size: 12px; line-height: 1.75;
}
footer a { color: var(--dim); }

/* ------------------------------------------------------------- narrow view */

@media (max-width: 780px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  body { padding: 20px 14px 40px; }
  .card { padding: 19px; border-radius: 6px; }
  .hero h1 { font-size: 25px; }
  .site-head { margin-bottom: 22px; }
  .kinds { gap: 6px; }
  .kind span { padding: 7px 12px; font-size: 13px; }
}

/* ==========================================================================
   The schedule

   A listener arrives wanting one of two things: what is on now, or when their
   programme is on. The first version answered neither — seven days of thirteen
   rows, all equally weighted. So the day being viewed is open, the rest are
   collapsed behind a summary, and there is a strip of days across the top to
   jump between them.
   ========================================================================== */

.sched-head { margin: 22px 0 18px; }
.sched-head h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.02em; }

.week-jump {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.jump {
  flex: 1 0 auto;
  min-width: 54px;
  text-align: center;
  padding: 8px 4px;
  border: 1px solid var(--line, #d7dbe2);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  line-height: 1.2;
}
.jump:hover { background: rgba(0, 0, 0, .04); }
.jump.is-today {
  border-color: currentColor;
  background: rgba(0, 0, 0, .05);
  font-weight: 650;
}
.jump-day  { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.jump-date { display: block; font-size: 16px; font-weight: 650; }

.day {
  border: 1px solid var(--line, #d7dbe2);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  scroll-margin-top: 12px;
}

.day > summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.day > summary::-webkit-details-marker { display: none; }
.day > summary::after {
  content: '▾';
  margin-left: auto;
  opacity: .5;
  font-size: 12px;
  transition: transform .15s ease;
}
.day[open] > summary::after { transform: rotate(180deg); }
.day[open] > summary { border-bottom: 1px solid var(--line-soft, #e6e9ee); }

.day-name  { font-weight: 650; font-size: 15px; }
.day-date  { font-size: 12px; opacity: .65; }
.day-count { font-size: 11px; opacity: .55; margin-left: auto; }
.day > summary::after { margin-left: 10px; }

.today-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 6px;
  border-radius: 3px;
  background: currentColor;
  color: #fff;
  opacity: .85;
}

.runsheet { list-style: none; margin: 0; padding: 0; }

.slot {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft, #eef0f3);
  border-left: 3px solid transparent;
}
.slot:last-child { border-bottom: 0; }
.slot.empty { display: block; opacity: .55; font-size: 13px; }

.slot-time strong {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.slot-time span {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  opacity: .5;
}

.slot-title { display: block; font-weight: 600; font-size: 14px; }
.slot-meta  { display: block; font-size: 12px; opacity: .6; }

.slot-kind {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: .5;
  white-space: nowrap;
}

/* Colour marks the kinds a listener scans for. Everything else stays quiet. */
.slot.cat-news      { border-left-color: #c9922a; background: rgba(201, 146, 42, .05); }
.slot.cat-sport     { border-left-color: #1c7a4a; }
.slot.cat-talk      { border-left-color: #5b3fa8; }
.slot.cat-religious { border-left-color: #0f6f7a; }
.slot.cat-community { border-left-color: #a03a6f; }

.slot.on-now {
  background: rgba(198, 40, 40, .07);
  border-left-color: #c62828;
}
.on-now-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #c62828;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

@media (max-width: 560px) {
  .slot { grid-template-columns: 54px minmax(0, 1fr); }
  .slot-kind { display: none; }
}

/* ---------------------------------------------------- recording a shout-out */

.voice-row { display: flex; align-items: center; gap: 10px; }

.voice-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid var(--line, #d7dbe2);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.voice-btn:hover { background: rgba(0, 0, 0, .04); }

.voice-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #c62828; flex: none;
}
.voice-btn.recording { border-color: #c62828; background: rgba(198, 40, 40, .08); }
.voice-btn.recording .voice-dot { animation: rec 1s ease-in-out infinite; }

@keyframes rec { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
  .voice-btn.recording .voice-dot { animation: none; }
}

.voice-time { font-size: 12px; opacity: .6; font-variant-numeric: tabular-nums; }

.voice-done { margin-top: 8px; }
.voice-done audio { width: 100%; height: 34px; }

.btn-link {
  border: 0; background: none; padding: 0; margin-top: 4px;
  font: inherit; font-size: 12px; text-decoration: underline;
  opacity: .7; cursor: pointer; color: inherit;
}
