/* ---------------------------------------------------------------------------
   Design tokens. Swap --accent for your brand colour and the whole UI follows.
   --------------------------------------------------------------------------- */
:root {
  --bg: #09090b;
  --surface: #101014;
  --surface-2: #16161c;
  --surface-3: #1d1d25;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f2ef;
  --dim: #a3a3ab;
  --faint: #6e6e78;
  --accent: #c9a227;
  --accent-soft: rgba(201, 162, 39, 0.14);
  --accent-ink: #120f03;
  --danger: #e06c5c;

  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 900px;
  --bar-h: 72px;

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
    "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(201, 162, 39, 0.07), transparent 70%),
    var(--bg);
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom) + 24px);
  -webkit-font-smoothing: antialiased;
}

body.is-admin {
  padding-bottom: 64px;
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-weight: 640;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 50;
  background: var(--surface-3);
  padding: 10px 14px;
  border-radius: 8px;
}

.muted {
  color: var(--dim);
}

/* ---------------------------------------------------------------- top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 20px 10px;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__mark {
  border-radius: 8px;
  flex: none;
}

.topbar__name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__feed {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.topbar__feed:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 20px 40px;
}

/* ------------------------------------------------------------------- hero */
.hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
  padding: 26px 0 40px;
}

.hero__art {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  background: var(--surface-2);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.eyebrow--accent {
  color: var(--accent);
}

.hero__title {
  font-size: clamp(28px, 5vw, 42px);
  margin-bottom: 10px;
}

.hero__meta {
  margin: 0 0 14px;
  color: var(--dim);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.hero__excerpt {
  margin: 0 0 22px;
  color: var(--dim);
  max-width: 46ch;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  font-weight: 560;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
    transform 0.18s var(--ease);
}
.btn:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
}
.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}
.btn--primary:hover {
  background: #d9b02c;
}
.btn--primary svg {
  margin-left: -3px;
}

.btn--danger {
  background: transparent;
  border-color: rgba(224, 108, 92, 0.5);
  color: var(--danger);
}

/* The way back to the catalogue from an episode. A full button rather than a
   quiet link: it's the main thing to do after finishing an episode. */
.btn--back {
  margin: 2px 0 26px;
}
.btn--back svg {
  margin-left: -5px;
  transition: transform 0.18s var(--ease);
}
.btn--back:hover svg {
  transform: translateX(-3px);
}

/* Row-sized button, for the actions column of the admin queue. */
.btn--mini {
  padding: 5px 12px;
  font-size: 12.5px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}
.iconbtn:hover {
  color: var(--text);
  background: var(--surface-3);
}

.iconbtn--primary {
  width: 46px;
  height: 46px;
  background: var(--text);
  color: #0b0b0c;
}
.iconbtn--primary:hover {
  background: #fff;
  color: #000;
}

/* Icon swap: pause shows only while that control's episode is playing.
   player.js puts .is-playing on the specific control, so the hero button, the
   list row and the bar can disagree without extra state. */
.icon-pause {
  display: none;
}
.is-playing .icon-pause {
  display: inline-flex;
}
.is-playing .icon-play {
  display: none;
}

/* "Play" and "Pause" share one grid cell, so the button is always as wide as
   the longer word and the buttons beside it never shift or wrap on click. */
.btn__label {
  display: inline-grid;
  justify-items: center;
}
.btn__label > span {
  grid-area: 1 / 1;
}
.btn__label-pause,
.is-playing .btn__label-play {
  visibility: hidden;
}
.is-playing .btn__label-pause {
  visibility: visible;
}

/* --------------------------------------------------------------- sections */
.sectionhead {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.sectionhead .count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.continue {
  margin-bottom: 36px;
}

.catalogue {
  margin-top: 36px;
}

/* ----------------------------------------------------------- episode list */
.eplist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eprow {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 10px 14px 6px;
  margin: 0 -10px;
  border-radius: var(--radius);
  border-bottom: 1px solid var(--line);
  transition: background 0.16s var(--ease);
}
.eprow:hover {
  background: var(--surface);
}
.eprow:last-child {
  border-bottom: 0;
}

.eprow__play {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease),
    color 0.16s var(--ease);
}
.eprow__play svg {
  width: 18px;
  height: 18px;
}
.eprow:hover .eprow__play {
  background: var(--surface-3);
}
.eprow.is-active .eprow__play {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}

.eprow__body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.eprow__title {
  font-weight: 560;
  font-size: 16.5px;
  letter-spacing: -0.01em;
}
.eprow.is-active .eprow__title {
  color: var(--accent);
}

.eprow__meta {
  font-size: 13px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* Saved listening position, width driven by --p (0–1) from player.js. */
.eprow__track {
  display: none;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
  max-width: 320px;
}
.eprow__track[style] {
  display: block;
}
.eprow__track i {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  border-radius: 2px;
  background: var(--accent);
}

.eprow__done {
  color: var(--faint);
  display: inline-flex;
}
/* player.js shows the check by clearing `hidden`; without this the display rule
   above wins and every episode looks finished. */
.eprow__done[hidden] {
  display: none;
}

/* --------------------------------------------------------- episode detail */
.backlink {
  display: inline-block;
  margin: 4px 0 20px;
  font-size: 13px;
  color: var(--faint);
}
.backlink:hover {
  color: var(--text);
}

.detail__head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: start;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.detail__art {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.detail__title {
  font-size: clamp(25px, 4.4vw, 36px);
  margin-bottom: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--dim);
}
.chip--accent {
  color: var(--accent);
  border-color: rgba(201, 162, 39, 0.35);
  background: var(--accent-soft);
}

.resumed {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--faint);
}
.resumed button {
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ----------------------------------------------- come follow me lesson panel */
.lesson {
  margin-top: 30px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 32px;
}

.lesson__head {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  flex-basis: 100%;
}

.lesson__rows {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  margin: 0;
  flex: 1;
}
.lesson__rows dt {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}
.lesson__rows dd {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.lesson__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--accent);
  white-space: nowrap;
}
.lesson__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notes {
  padding: 30px 0 10px;
  max-width: 68ch;
  color: #dededa;
}
.notes h2 {
  font-size: 19px;
  margin: 28px 0 10px;
}
.notes h3,
.notes h4 {
  font-size: 16px;
  margin: 24px 0 8px;
}
.notes p {
  margin: 0 0 16px;
}
.notes a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.notes ul,
.notes ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.notes li {
  margin-bottom: 6px;
}
.notes blockquote {
  margin: 0 0 16px;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--accent);
  color: var(--dim);
}
.notes code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 36px;
}
.pager__item {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.pager__item:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}
.pager__item span {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.pager__item strong {
  font-weight: 560;
  font-size: 15px;
}
.pager__item--right {
  text-align: right;
}
.pager__item--empty {
  border: 0;
}

/* ----------------------------------------------------------- empty + foot */
.empty {
  text-align: center;
  padding: 70px 0;
  display: grid;
  justify-items: center;
  gap: 16px;
}
.empty__art {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.empty p {
  max-width: 42ch;
  margin: 0;
}

.sitefoot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
}
.sitefoot p {
  margin: 0 0 6px;
}
.sitefoot a:hover {
  color: var(--text);
}

/* ----------------------------------------------------------- player bar */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(13, 13, 16, 0.86);
  backdrop-filter: saturate(140%) blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(0);
  transition: transform 0.3s var(--ease);
}
.player[data-state='empty'] {
  transform: translateY(105%);
}

.player__scrub {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
}
.player__scrub::before {
  /* Invisible taller hit area so the thin bar is still easy to grab. */
  content: '';
  position: absolute;
  inset: -9px 0 -5px;
}
.player__buffered,
.player__progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 0 2px 2px 0;
}
.player__buffered {
  background: rgba(255, 255, 255, 0.12);
}
.player__progress {
  background: var(--accent);
}
.player__knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.16s var(--ease);
}
.player__scrub:hover .player__knob,
.player__scrub:focus-visible .player__knob,
.player.is-scrubbing .player__knob {
  transform: translate(-50%, -50%) scale(1);
}

.player__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 11px 20px 13px;
}

.player__now {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player__art {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-2);
  flex: none;
}

.player__text {
  display: grid;
  min-width: 0;
}
.player__title,
.player__sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__title {
  font-size: 14.5px;
  font-weight: 560;
}
.player__sub {
  font-size: 12.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.player__controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.player__time {
  color: var(--dim);
}
.player__time--dim,
.player__sep {
  color: var(--faint);
}

.ratewrap {
  position: relative;
  display: inline-flex;
}

/* Opens upward: the player bar is pinned to the bottom of the viewport. */
.ratemenu {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  z-index: 70;
  display: grid;
  gap: 2px;
  padding: 6px;
  min-width: 92px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.ratemenu[hidden] {
  display: none;
}

.ratemenu__item {
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  cursor: pointer;
}
.ratemenu__item:hover {
  background: var(--surface-3);
  color: var(--text);
}
.ratemenu__item[aria-checked='true'] {
  color: var(--accent);
  background: var(--accent-soft);
}

.ratebtn {
  margin-left: 8px;
  min-width: 52px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.ratebtn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.ratebtn[data-off='true'] {
  color: var(--accent);
  border-color: rgba(201, 162, 39, 0.4);
  background: var(--accent-soft);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bar-h) + 22px);
  transform: translate(-50%, 10px);
  z-index: 60;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------ admin */
.admin {
  max-width: 820px;
}
.admin h1 {
  font-size: 27px;
  margin-bottom: 8px;
}
.admin h2 {
  font-size: 16px;
  margin-bottom: 6px;
}

.adminnav {
  display: flex;
  gap: 16px;
  font-size: 13.5px;
  color: var(--dim);
  flex-wrap: wrap;
}
.adminnav a:hover {
  color: var(--text);
}

.flash {
  background: var(--accent-soft);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: #e9d79a;
  padding: 11px 15px;
  border-radius: var(--radius);
  font-size: 14px;
  margin: 0 0 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 22px 0;
  display: grid;
  gap: 14px;
}
.card--danger {
  border-color: rgba(224, 108, 92, 0.28);
}
.card > p {
  margin: 0;
  font-size: 14px;
}
.card .count {
  color: var(--faint);
  font-weight: 400;
}

.statrow {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.stat {
  flex: 1 1 120px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
}
.stat strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

label {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  color: var(--dim);
}
label small {
  color: var(--faint);
  font-weight: 400;
}
.hint {
  font-size: 12px;
  color: var(--faint);
}

input[type='text'],
input[type='number'],
input[type='datetime-local'],
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  padding: 10px 12px;
}
input:read-only {
  color: var(--faint);
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.formactions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.draftlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.draftlist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
}
.draftlist li:hover {
  background: var(--surface-2);
}

.checkrow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  flex: 1;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.checkrow input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
.checkrow__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkrow__key,
.checkrow__dur {
  color: var(--faint);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.minilink {
  font-size: 12.5px;
  color: var(--accent);
}

.qtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.qtable th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--line);
}
.qtable td {
  padding: 12px 10px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--dim);
}
.qtable tr:last-child td {
  border-bottom: 0;
}
.qtable a {
  color: var(--text);
}
.qtable a:hover {
  color: var(--accent);
}
.qtable__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  white-space: nowrap;
}
/* Counts read better right-aligned and tabular, so the digits line up. */
.qtable .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.qtable__key {
  font-size: 12px;
  color: var(--faint);
  margin-top: 3px;
  word-break: break-all;
}

.badge {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  margin-right: 8px;
  border: 1px solid var(--line-strong);
  color: var(--dim);
  vertical-align: 1px;
}
.badge--live {
  color: #8fd39a;
  border-color: rgba(143, 211, 154, 0.4);
}
.badge--scheduled {
  color: var(--accent);
  border-color: rgba(201, 162, 39, 0.4);
}

.plainlist {
  margin: 0;
  padding-left: 20px;
  color: var(--dim);
  font-size: 14px;
}
.plainlist code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 5px;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 760px) {
  /* Stacked art and text read better centred than left-aligned under a
     centred image. Body copy below the fold stays left-aligned. */
  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 10px;
    text-align: center;
  }
  .hero__art {
    max-width: 240px;
    margin-inline: auto;
  }
  .hero__excerpt {
    margin-inline: auto;
  }
  .detail__head {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .detail__art {
    max-width: 180px;
    margin-inline: auto;
  }
  .actions,
  .chips {
    justify-content: center;
  }
  /* Centred with the rest of the stacked page. */
  .btn--back {
    display: flex;
    width: fit-content;
    margin-inline: auto;
  }
  /* Stacked, so the link sits under the details instead of beside them. */
  .lesson {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  .lesson__rows {
    justify-content: center;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager__item--right {
    text-align: left;
  }
  .pager__item--empty {
    display: none;
  }
  .checkrow {
    grid-template-columns: auto 1fr auto;
  }
  .checkrow__key {
    display: none;
  }
}

@media (max-width: 560px) {
  :root {
    --bar-h: 64px;
  }
  .player__row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding: 9px 14px 11px;
  }
  /* Times go, speed stays — it's the control people actually reach for. */
  .player__time,
  .player__sep {
    display: none;
  }
  .ratebtn {
    margin-left: 0;
    min-width: 48px;
  }
  .player__controls .iconbtn:not(.iconbtn--primary) {
    display: none;
  }
  .eprow {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }
  .eprow__play {
    width: 40px;
    height: 40px;
  }
  .eprow__done {
    display: none;
  }
  main {
    padding-inline: 16px;
  }
  .topbar {
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
