/* Project Daylight — Radio / Briefing playback page.
   Ported from the Claude Design "Radio Page" handoff (tuner player + karaoke
   transcript), adapted to the live site: it sits inside the standard masthead
   + footer and uses the site's serif/mono, with the design's amber radio
   accent and player/transcript treatment. Drives off a real <audio> element;
   JS sets --pct (0-100%) for the needle/progress, and toggles line states. */

.pd-root {
  --pd-amber: #c98a2b;
  --pd-ink: var(--ink);
  --pd-muted: var(--ink-3);
  --pd-hair: var(--paper-rule);
  --pd-card: #efe7d3;
  --pd-cardline: #e0d6bb;
  --pd-knob: #e7dfcd;
  --pd-linePast: color-mix(in oklab, var(--ink) 58%, transparent);
  --pd-lineFuture: color-mix(in oklab, var(--ink) 30%, transparent);
  --pct: 0%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 40px 70px;
}

/* ── Title block ─────────────────────────────────────────────────────────── */
.pd-label {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--pd-muted);
}
.pd-muted { color: var(--pd-muted); }
.pd-titleblock { margin-bottom: 30px; }
.pd-headline {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.015em;
  font-size: clamp(36px, 5.2vw, 60px); line-height: 1.04; margin: 14px 0 0;
  text-wrap: balance; color: var(--ink);
}
.pd-meta { margin-top: 15px; font-size: 18px; color: var(--pd-muted); font-family: var(--serif); }

/* ── Player card ─────────────────────────────────────────────────────────── */
.pd-playercard {
  background: var(--pd-card); border: 1px solid var(--pd-cardline);
  border-radius: 3px; padding: 28px 32px;
}
.pd-player { display: flex; align-items: center; gap: 26px; }

/* round play / pause button */
.pd-playbtn {
  width: 60px; height: 60px; flex: 0 0 auto; border-radius: 50%;
  border: 1.5px solid var(--ink); cursor: pointer; padding: 0;
  background: transparent; color: var(--ink);
  display: grid; place-items: center;
  transition: background .25s ease, color .25s ease, transform .12s ease;
}
.pd-playbtn:hover { background: var(--pd-amber); color: var(--pd-card); transform: scale(1.03); }
.pd-playbtn .pd-ico-pause { display: none; }
.pd-root.is-playing .pd-playbtn .pd-ico-pause { display: block; }
.pd-root.is-playing .pd-playbtn .pd-ico-play { display: none; }

/* status dot */
.pd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pd-muted); display: inline-block; flex: 0 0 auto; }
.pd-root.is-playing .pd-dot.pd-dot-live { background: var(--pd-amber); animation: pdpulse 1.7s ease-in-out infinite; }
@keyframes pdpulse {
  0%,100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--pd-amber) 55%, transparent); opacity: 1; }
  50% { box-shadow: 0 0 0 5px transparent; opacity: .72; }
}

.pd-tuner-body { flex: 1; min-width: 0; }
.pd-tuner-top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--pd-muted); margin-bottom: 12px;
}
.pd-tuner-top .pd-onair { display: inline-flex; align-items: center; gap: 8px; }
.pd-tuner-top .pd-time { color: var(--ink); font-variant-numeric: tabular-nums; }
.pd-tuner-top .pd-time .pd-dur { color: var(--pd-muted); }

/* the dial band */
.pd-band { position: relative; height: 46px; cursor: pointer; touch-action: none; }
.pd-band-base { position: absolute; left: 0; right: 0; top: 24px; height: 1px; background: var(--pd-hair); }
.pd-band-fill { position: absolute; left: 0; top: 24px; height: 1.5px; width: var(--pct); background: var(--pd-amber); }
.pd-band-num {
  position: absolute; top: 0; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; color: var(--pd-muted); letter-spacing: .05em;
}
.pd-band-ticks { position: absolute; left: 0; right: 0; bottom: 0; top: 14px; }
.pd-tick { position: absolute; bottom: 0; transform: translateX(-0.5px); width: 1px; background: var(--pd-hair); }
.pd-tick.maj { height: 20px; } .pd-tick.min { height: 11px; }
.pd-needle { position: absolute; left: var(--pct); top: 0; bottom: -2px; width: 0; transition: left .12s linear; }
.pd-needle-head {
  position: absolute; left: -5px; top: 0; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--pd-amber);
}
.pd-needle-stem { position: absolute; left: -0.75px; top: 5px; bottom: 0; width: 1.5px; background: var(--pd-amber); }
.pd-root.is-playing .pd-needle-stem { animation: pdneedle 2.4s ease-in-out infinite; }
@keyframes pdneedle {
  0%,100% { box-shadow: 0 0 5px 0 color-mix(in oklab, var(--pd-amber) 70%, transparent); }
  50% { box-shadow: 0 0 9px 1px color-mix(in oklab, var(--pd-amber) 85%, transparent); }
}

/* ── Transcript (karaoke) ────────────────────────────────────────────────── */
.pd-script { margin-top: 44px; }
.pd-script-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 16px; border-bottom: 1px solid var(--pd-hair); margin-bottom: 8px;
}
.pd-script-scroll {
  max-height: 56vh; overflow-y: auto; position: relative;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 34px, #000 calc(100% - 56px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 34px, #000 calc(100% - 56px), transparent 100%);
}
.pd-script-scroll::-webkit-scrollbar { width: 8px; }
.pd-script-scroll::-webkit-scrollbar-thumb { background: var(--pd-hair); border-radius: 8px; }
.pd-script-inner { padding: 26px 0 0; }
.pd-line {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: baseline;
  margin: 0; padding: 11px 0; cursor: pointer;
  font-family: var(--serif); font-size: 23px; line-height: 1.5; letter-spacing: -.003em;
  color: var(--pd-lineFuture);
  transition: color .45s ease, opacity .45s ease;
}
.pd-line:hover { color: color-mix(in oklab, var(--ink) 75%, transparent); }
.pd-tcode {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em;
  color: color-mix(in oklab, var(--ink) 28%, transparent);
  text-align: right; padding-top: 9px; font-variant-numeric: tabular-nums;
  transition: color .35s ease;
}
.pd-ltext { text-wrap: pretty; }
.pd-line.pd-past { color: var(--pd-linePast); }
.pd-line.pd-active { color: var(--ink); }
.pd-line.pd-active .pd-tcode { color: var(--pd-amber); font-weight: 600; }

/* ── No-JS / no-audio fallback note + foot ───────────────────────────────── */
.pd-foot {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--pd-hair);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.pd-covered { margin: 26px 0 0; padding: 18px 20px; border: 1px solid var(--pd-cardline); background: var(--pd-card); border-radius: 3px; }
.pd-covered ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pd-covered a { font-family: var(--serif); font-size: 16px; color: var(--ink-2); border-bottom: 1px solid transparent; }
.pd-covered a:hover { border-bottom-color: var(--ink-2); }
.pd-archive { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--pd-hair); }
.pd-archive ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pd-archive a { font-family: var(--serif); font-size: 16px; color: var(--ink-2); }
.pd-archive .d { font-family: var(--mono); font-size: 13px; color: var(--pd-muted); margin-right: 10px; }

@media (max-width: 720px) {
  .pd-root { padding-left: 22px; padding-right: 22px; }
  .pd-band-num { display: none; }
  .pd-line { grid-template-columns: 44px 1fr; gap: 14px; font-size: 20px; }
}
