/* XFINALE — THE DIAL · channel-guide rail
   Replaces the stacked .rail-link pills with a station program guide:
   a WIRES strip (the five live feeds) and a DIAL list (the seven shows).
   Pure CSS over tokens.css; no new fonts, no JS, reduced-motion safe. */

.wordmark__tag { margin: var(--s-1) 0 0; }
.wordmark__verse { margin: 2px 0 0; font-size: 0.68rem; line-height: 1.35; color: var(--ink-faint); }
.wordmark__verse b { color: var(--ink-dim); font-weight: 600; }

/* ---- section kicker ------------------------------------------------- */
.dial__kicker {
  display: flex; align-items: center; gap: 8px;
  margin: var(--s-3) 0 4px;
  font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.3em;
  color: var(--ink-faint); text-transform: uppercase;
}
.dial__kicker::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--space-line-bright), transparent); }

/* ---- WIRES: five live feeds in one strip ---------------------------- */
.wires { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 -4px; }
.wires__link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 7px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em;
  color: var(--ink-dim); text-decoration: none; white-space: nowrap;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.wires__link::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--c, var(--ink-faint)); box-shadow: 0 0 6px var(--c, transparent); }
.wires__link:hover, .wires__link:focus-visible { color: #fff; background: color-mix(in srgb, var(--c) 12%, transparent); outline: none; }

/* ---- THE DIAL: the shows as a program guide ------------------------- */
.dial { display: flex; flex-direction: column; gap: 1px; margin: 0 -4px; }
.dial__row {
  --c: var(--ink-dim);
  position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px;
  min-height: 32px; padding: 0 8px 0 10px; border-radius: 6px;
  background: none; border: 0; text-align: left; text-decoration: none; cursor: pointer;
  color: var(--ink); font-family: var(--font-display);
  transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-out-expo);
}
.dial__row::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px;
  background: var(--c); opacity: 0.75; box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent);
  transition: width var(--dur-fast), opacity var(--dur-fast), top var(--dur-fast), bottom var(--dur-fast);
}
.dial__ch { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.08em; color: var(--ink-faint); }
.dial__name { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--dur-fast); }
.dial__glyph { font-family: var(--font-mono); font-size: 0.7rem; color: var(--c); opacity: 0.8; }
.dial__row:hover, .dial__row:focus-visible {
  background: color-mix(in srgb, var(--c) 9%, transparent); outline: none; transform: translateX(2px);
}
.dial__row:hover::before, .dial__row:focus-visible::before { width: 4px; opacity: 1; top: 4px; bottom: 4px; }
.dial__row:hover .dial__name, .dial__row:focus-visible .dial__name { color: #fff; }
.dial__row:hover .dial__ch { color: var(--c); }

/* newest show, and the live one, carry a tiny status flag instead of a fill */
.dial__flag {
  font-family: var(--font-mono); font-size: 0.46rem; letter-spacing: 0.2em; padding: 2px 5px; border-radius: 3px;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
}
.dial__row--live .dial__flag { color: #ffd9c9; border-color: var(--neon-red); background: rgba(255, 80, 48, 0.14); }
.dial__row--live .dial__flag::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; background: var(--on-air); box-shadow: 0 0 6px var(--on-air); animation: tally-pulse 2s ease-in-out infinite; }

/* the status block that follows the dial sits a touch closer */
.rail__status { margin-top: var(--s-3); padding-top: var(--s-2); border-top: 1px solid var(--space-line); }

/* phone: the dial becomes a horizontal scroller, the wires stay one strip */
@media (max-width: 760px) {
  .dial { flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px 4px 4px; margin: 0 -8px; }
  .dial::-webkit-scrollbar { display: none; }
  .dial__row { flex: none; grid-template-columns: auto auto; min-height: 44px; padding: 0 12px 0 14px; border: 1px solid var(--space-line); }
  .dial__name { font-size: 0.8rem; }
  .dial__flag { font-size: 0.75rem; letter-spacing: 0.1em; }
  .dial__glyph { font-size: 0.8rem; }
  .wires__link { font-size: 0.75rem; padding: 12px 9px; min-height: 44px; }
  .dial__ch { display: none; }
  .dial__row::before { top: 9px; bottom: 9px; }
  .wires { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dial__row, .dial__row::before, .dial__name, .wires__link { transition: none; }
  .dial__row:hover { transform: none; }
  .dial__row--live .dial__flag::before { animation: none; }
}
