/* news.css — /news. EpisodeList, AudioPlayer, inline transcripts, and the
   three states the list can be in. Tokens only; nothing here invents a colour. */

/* ── programme head ── */
.news-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: clamp(24px, 4vw, 52px); align-items: start; }
.news-art { width: 100%; aspect-ratio: 1; border-radius: var(--r-lg); border: 1px solid var(--hairline); background: var(--surface-1); object-fit: cover; display: block; box-shadow: var(--shadow-2); }
.news-cadence { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 13.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--tertiary); }
.news-cadence::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ── subscribe ── */
.subscribe { margin-top: clamp(24px, 3.5vh, 34px); padding-top: 22px; border-top: 1px solid var(--hairline); }
.sub-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sub-feed { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--hairline-strong); background: var(--surface-1); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; color: var(--heading); }
.sub-feed-host { color: var(--gold-text); }
.sub-copy { min-height: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--hairline-strong); background: transparent; color: var(--body); font-family: var(--font); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.sub-copy:hover { color: var(--heading); border-color: var(--field-border-hover); }
.sub-copy:focus-visible { outline: none; box-shadow: var(--ring); }
.sub-dirs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sub-dir--live { border-style: solid; border-color: var(--hairline-strong); color: var(--body); text-decoration: none; }
.sub-dir--live:hover { color: var(--heading); border-color: var(--field-border-hover); }
.sub-dir { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: var(--r-pill); border: 1px dashed var(--hairline-strong); font-size: 13px; color: var(--tertiary); }
.sub-note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--tertiary); max-width: 62ch; }

/* ── episode list ── */
.eplist { display: flex; flex-direction: column; }
.ep { border-top: 1px solid var(--hairline); padding: clamp(20px, 3vh, 28px) 0; }
.ep:last-child { border-bottom: 1px solid var(--hairline); }
.ep-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 2.4vw, 26px); align-items: start; }
.ep-play { position: relative; width: 56px; height: 56px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--gold); background: rgba(221,172,58,.10); color: var(--gold-text); display: grid; place-items: center; cursor: pointer; transition: background var(--dur) ease, transform var(--dur) var(--ease); }
.ep-play:hover { background: rgba(221,172,58,.2); transform: translateY(-1px); }
.ep-play:focus-visible { outline: none; box-shadow: var(--ring); }
.ep-play.is-current { background: var(--gold); color: var(--ink); }
.ep-play[disabled] { cursor: not-allowed; border-style: dashed; border-color: var(--warning-border); background: var(--warning-bg); color: var(--heading); }
.ep-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; color: var(--tertiary); }
.ep-num { color: var(--gold-text); }
.ep-title { margin: 10px 0 0; font-weight: 700; font-size: clamp(19px, 2vw, 25px); line-height: 1.2; letter-spacing: -.012em; color: var(--heading); text-wrap: balance; }
.ep-stand { margin: 9px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--body); max-width: 62ch; text-wrap: pretty; }
.ep-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ep-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--hairline-strong); background: transparent; color: var(--body); font-family: var(--font); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.ep-toggle:hover { color: var(--heading); border-color: var(--field-border-hover); }
.ep-toggle:focus-visible { outline: none; box-shadow: var(--ring); }
.ep-toggle[aria-expanded="true"] { color: var(--heading); border-color: var(--gold); }
.ep-toggle-chev { transition: transform var(--dur) ease; }
.ep-toggle[aria-expanded="true"] .ep-toggle-chev { transform: rotate(180deg); }

/* ── inline transcript ──
   One URL for the whole page: the job here is "press play within a second of
   arriving", and a sub-page per episode puts a navigation between the listener
   and the audio. A side drawer would compete with the player for the same
   attention. So: expand in place, indented under the episode it belongs to. */
.tr { margin-top: 20px; padding: clamp(20px, 3vw, 28px); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--hairline); }
.tr-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.tr-title { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--tertiary); }
.tr-count { font-size: 13px; color: var(--tertiary); font-variant-numeric: tabular-nums; }
.tr-story { padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.tr-story:last-child { border-bottom: 0; padding-bottom: 0; }
.tr-story-head { display: flex; align-items: baseline; gap: 12px; }
.tr-seek { flex: 0 0 auto; min-width: 52px; min-height: 30px; padding: 0 9px; border-radius: var(--r-sm); border: 1px solid var(--hairline-strong); background: transparent; color: var(--gold-text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; }
.tr-seek:hover { border-color: var(--gold); }
.tr-seek:focus-visible { outline: none; box-shadow: var(--ring); }
.tr-seek[disabled] { cursor: default; color: var(--tertiary); }
.tr-h { margin: 0; font-weight: 700; font-size: 16.5px; line-height: 1.35; color: var(--heading); }
.tr-p { margin: 12px 0 0 64px; font-size: 15.5px; line-height: 1.68; color: var(--body); max-width: 64ch; text-wrap: pretty; }
.tr-foot { margin: 0; font-size: 13px; line-height: 1.5; color: var(--tertiary); max-width: 52ch; }
/* A 3,000-word transcript puts its own open/close control several screens
   above where the reader ends up. The close lives at both ends. */
.tr-close-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--hairline); }

/* ── states ── */
.ep-skel { border-top: 1px solid var(--hairline); padding: clamp(20px, 3vh, 28px) 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 2.4vw, 26px); }
.skel { border-radius: 6px; background: var(--surface-1); position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(245,243,238,.05), transparent); animation: skelsweep 1.5s linear infinite; }
:root[data-theme="light"] .skel::after { background: linear-gradient(90deg, transparent, rgba(26,26,24,.05), transparent); }
@keyframes skelsweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }
.skel-circle { width: 56px; height: 56px; border-radius: 50%; }
.skel-line { height: 12px; }

.news-state { padding: clamp(34px, 6vh, 62px) clamp(22px, 4vw, 40px); border: 1px dashed var(--hairline-strong); border-radius: var(--r-xl); max-width: 68ch; }
.news-state--failed { border-color: var(--danger-border); background: var(--danger-bg); }
.news-state-title { margin: 0; font-weight: 700; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; color: var(--heading); }
.news-state-body { margin: 14px 0 0; font-size: 16px; line-height: 1.65; color: var(--body); max-width: 56ch; text-wrap: pretty; }
.news-state-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ── the player ──
   Docked, not floating: it is the page's primary object once something is
   playing, and a floating card over a long transcript is a scroll hazard. */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--bg-elev); border-top: 1px solid var(--hairline-strong); box-shadow: 0 -20px 60px -34px rgba(0,0,0,.85); padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom, 0px)); }
/* Four named areas, so each breakpoint rearranges rather than compresses.
   Every track that holds shrinkable content is minmax(0,…); the transport track
   is auto because its contents genuinely cannot shrink. */
.player-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 220px) minmax(0, 1fr) auto; grid-template-areas: "transport id scrub right"; gap: clamp(12px, 2vw, 22px); align-items: center; }
.player-transport { grid-area: transport; }
.player-id { grid-area: id; display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-scrub { grid-area: scrub; }
.player-right { grid-area: right; }
/* Under ~300px the wordmark is a grey smear, which is exactly why the
   mark-only cut exists. Never the cover art at this size. */
.player-thumb { width: 46px; height: 46px; border-radius: var(--r-sm); border: 1px solid var(--hairline); background: var(--surface-1); object-fit: contain; flex: 0 0 auto; }
.player-titles { min-width: 0; }
.player-ep { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tertiary); }
/* No max-width: it must be free to take the track and ellipsize. A cap here is
   what let it collapse to 0 instead of truncating. */
.player-title { display: block; font-size: 14.5px; font-weight: 700; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-transport { display: flex; align-items: center; gap: 8px; }
.pbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--hairline-strong); background: transparent; color: var(--body); cursor: pointer; flex: 0 0 auto; }
.pbtn:hover { color: var(--heading); border-color: var(--field-border-hover); }
.pbtn:focus-visible { outline: none; box-shadow: var(--ring); }
.pbtn--main { background: var(--gold); border-color: var(--gold); color: var(--ink); width: 48px; height: 48px; }
.pbtn--main:hover { background: var(--gold-100); color: var(--ink); }
.player-scrub { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--tertiary); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.player-range { flex: 1; min-width: 60px; height: 30px; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.player-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--gold) var(--pct, 0%), var(--control-off) var(--pct, 0%)); }
.player-range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--control-off); }
.player-range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--gold); }
.player-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); margin-top: -5px; }
.player-range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--gold); }
.player-range:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-pill); }
.player-right { display: flex; align-items: center; gap: 8px; }
.player-rate { min-height: 36px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--hairline-strong); background: transparent; color: var(--body); font-family: var(--font); font-weight: 700; font-size: 12.5px; cursor: pointer; font-variant-numeric: tabular-nums; }
.player-rate:hover { color: var(--heading); }
.player-rate:focus-visible { outline: none; box-shadow: var(--ring); }
.player-sim { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--heading); border: 1px dashed var(--warning-border); background: var(--warning-bg); border-radius: var(--r-pill); padding: 3px 8px; }
/* No .player-pad rule: the spacer element is gone. Room for the docked player
   is measured off the live element and applied as padding-bottom on .page, so
   it lands after the footer rather than inside <main>. */

@media (max-width: 900px) {
  .news-head { grid-template-columns: 1fr; }
  .news-art { max-width: 260px; }
  .player-inner { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "transport id right" "scrub scrub scrub"; row-gap: 8px; }
}
@media (max-width: 640px) {
  .ep-top { grid-template-columns: 1fr; }
  .tr-p { margin-left: 0; }
}
/* Below this the transport (three buttons that cannot shrink) stops competing
   with the identity block for one row and takes its own. */
@media (max-width: 620px) {
  .player-inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id right" "scrub scrub" "transport transport"; row-gap: 10px; }
  .player-transport { justify-content: center; }
}
/* No room for cover art beside a title at this width, and the title is the
   thing that tells you what is playing. */
@media (max-width: 430px) {
  .player-thumb { display: none; }
}
