/* ---------------------------------------------------------------------------
   Parlapod — landing page
   Committed dark theme: warm ink, not neutral black. Two accent colours carry
   meaning rather than decoration — amber is always the host, sage is always the
   co-host, everywhere they appear. Sections are separated by hairline rules,
   not by boxes. The one exception to the flat treatment is the paper sheet in
   the levels section, which is meant to read as a printed page.
   No JS: the level control is a radio group driven by :checked sibling rules.
--------------------------------------------------------------------------- */

:root {
  --bg:          #17120f;
  --bg-sunken:   #110d0b;
  --bg-raised:   #1e1815;
  --line:        #3a2e25;
  --line-soft:   #271f1a;

  --text:        #f3ece3;
  --text-dim:    #b3a496;
  --text-faint:  #7e7164;

  --host:        #e8a13c;
  --cohost:      #77b5a5;

  --paper:       #f5efe4;
  --paper-ink:   #241d16;
  --paper-dim:   #6d6255;
  --paper-line:  #ddd3c2;

  --focus:       #ffd27a;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  --shell: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }

/* An author `display:` beats the UA stylesheet's [hidden] { display: none }, so any
   element given a display and then hidden stays on screen. Said once here rather
   than remembered at every such element. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; }

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Keep the radio inputs reachable by keyboard while visually hidden. */
.level-input.visually-hidden { clip-path: none; opacity: 0; }

/* --- focus -------------------------------------------------------------- */

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  background: var(--focus);
  color: #17120f;
  padding: 10px 16px;
  font-weight: 600;
  text-decoration: none;
  transition: top 120ms ease;
}
.skip-link:focus { top: 12px; }

/* --- masthead ----------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-block: 12px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.wordmark-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--host);
}

.masthead-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
  font-size: 15px;
}

.masthead-nav a {
  color: var(--text-dim);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.masthead-nav a:hover { color: var(--text); border-bottom-color: var(--host); }

.masthead-signin { color: var(--text) !important; }

/* The signed-in name, in place of the Sign in link. Not a link, so no hover; the
   padding and border match the links so it sits on the same baseline. */
.masthead-username { color: var(--text); padding-block: 4px; border-bottom: 1px solid transparent; }

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

.hero { border-bottom: 1px solid var(--line-soft); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  padding-block: clamp(56px, 9vw, 104px);
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  margin-top: 24px;
  max-width: 46ch;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
}

.button {
  display: inline-block;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 3px;
}

.button-solid {
  background: var(--host);
  color: #191008;
  border: 1px solid var(--host);
}
.button-solid:hover { background: #f2b458; border-color: #f2b458; }

.button-quiet {
  color: var(--text);
  border: 1px solid var(--line);
  background: transparent;
}
.button-quiet:hover { border-color: var(--text-faint); background: var(--bg-raised); }

/* --- the player --------------------------------------------------------- */

.player {
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(18px, 3vw, 26px);
}

.player-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.onair {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--host);
  align-self: center;
  animation: breathe 2.6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.player-title {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.player-meta {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.transcript {
  padding-block: 22px;
  display: grid;
  gap: 18px;
}

.line { display: grid; gap: 5px; }

.who {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.line-host .who { color: var(--host); }
.line-cohost .who { color: var(--cohost); }

.said {
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.9vw, 1.22rem);
  line-height: 1.55;
}

/* Words not yet spoken sit back; the word being spoken right now is marked. */
.w { color: var(--text-faint); }
.w.spoken { color: var(--text); }

.w.current {
  color: #191008;
  background: var(--host);
  border-radius: 2px;
  padding: 1px 4px;
  margin-inline: -1px;
}

.line.is-upcoming { opacity: 0.5; }

/* A line you have not reached yet is dimmed, but a translation you deliberately
   opened is there to be read — so an open panel brings its line back up. */
.line.is-upcoming:has(.translation:not([hidden])) { opacity: 1; }

/* A word is the tap target; it selects the chunk it belongs to. Inline and
   unstyled otherwise, so the transcript reads as plain text until you tap. */
.sentence { border-radius: 2px; }
.episode-main .w { cursor: pointer; }
.sentence:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* The chunk you have tapped, washed like a highlighter pen on both sides at
   once. Deliberately not the solid block .w.current uses for the spoken word --
   the two are often lit at the same time and have to stay tellable apart. */
.w.selected,
.tw.selected {
  background: color-mix(in srgb, var(--focus) 22%, transparent);
  color: var(--text);
  border-radius: 2px;
}

/* The whole turn's translation, under the turn. Tapping anywhere on it closes it.
   Hiding it works because of the global [hidden] reset at the top of this file. */
.translation {
  font-family: var(--sans);
  font-size: clamp(0.92rem, 1.7vw, 1.06rem);
  line-height: 1.5;
  color: var(--text-dim);
  border-left: 2px solid var(--line);
  padding: 6px 12px;
  cursor: pointer;
}

/* The explanation of the selected chunk, or why there isn't one, in a small raised
   card under the chunk. Tapping anywhere else puts it away. */
.explain-popup {
  position: absolute;
  z-index: 1;
  max-width: min(340px, 100%);
  padding: 4px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.35);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-dim);
}
.explain-popup p { margin: 0; padding: 6px 8px; }
.explain-popup p + p { padding-top: 0; }
.explain-popup em { color: var(--text); }
.explain-popup a { color: var(--host); }
.explain-meaning { color: var(--text); font-weight: 600; }
.explain-literal,
.explain-example { color: var(--text-faint); font-size: 13px; }

/* Top-right of the open translation, where the text wraps round it. Solid amber
   when pressing it spends an explanation, outlined when viewing one is free. */
.explain-button {
  float: right;
  margin: 0 0 6px 10px;
  border: 1px solid var(--host);
  border-radius: 999px;
  background: var(--host);
  color: #191008;
  font: 600 12px/1 var(--sans);
  padding: 6px 11px;
  cursor: pointer;
}
.explain-button[data-state="cached"] { background: transparent; color: var(--host); }
.explain-button:disabled { opacity: 0.55; cursor: default; }

.timeline { padding-top: 18px; border-top: 1px solid var(--line-soft); }

/* Who is speaking when, across the whole episode. */
.turns { display: flex; gap: 2px; height: 3px; }
.turn { display: block; border-radius: 1px; }
/* Uneven widths so the turn strip reads as a real conversation. */
.turn:nth-child(1) { flex: 3; }
.turn:nth-child(2) { flex: 5; }
.turn:nth-child(3) { flex: 2; }
.turn:nth-child(4) { flex: 4; }
.turn:nth-child(5) { flex: 6; }
.turn-host { background: color-mix(in srgb, var(--host) 55%, transparent); }
.turn-cohost { background: color-mix(in srgb, var(--cohost) 55%, transparent); }

.scrub {
  margin-top: 7px;
  height: 2px;
  background: var(--line);
  position: relative;
}
.scrub-done {
  position: absolute;
  inset: 0 62% 0 0;
  background: var(--text-dim);
}

.times {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--text-faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* --- generic band ------------------------------------------------------- */

.band {
  padding-block: clamp(56px, 8vw, 96px);
  border-bottom: 1px solid var(--line-soft);
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-lede {
  margin-top: 14px;
  max-width: 58ch;
  color: var(--text-dim);
}

/* --- problem ----------------------------------------------------------- */

/* Two sides of the same gap, split by a hairline, then the one-line answer. */
.contrast {
  margin-top: clamp(32px, 5vw, 52px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.contrast-side { padding-top: 22px; border-top: 1px solid var(--line-soft); }

.contrast-kicker,
.trait-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.contrast-side h3,
.trait h3 {
  margin-top: 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

.contrast-side p:last-child,
.trait > p:last-child { margin-top: 10px; color: var(--text-dim); max-width: 44ch; }

.contrast-answer {
  margin-top: clamp(32px, 5vw, 52px);
  padding-top: 22px;
  border-top: 2px solid var(--host);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  letter-spacing: -0.02em;
}
.contrast-answer span { color: var(--host); }

/* --- solution ---------------------------------------------------------- */

.picks {
  list-style: none;
  margin: clamp(36px, 6vw, 60px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
}

.pick { display: flex; flex-direction: column; }

.pick-index {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--host);
}

.pick h3 {
  margin-top: 10px;
  font-size: 1.06rem;
  line-height: 1.35;
}

.pick > p {
  margin-top: 8px;
  margin-bottom: 22px;
  color: var(--text-dim);
  font-size: 14.5px;
}

.pick-art { margin-top: auto; padding-top: 18px; border-top: 1px dashed var(--line-soft); }

.chip {
  display: block;
  font-size: 13px;
  padding: 7px 11px;
  margin-bottom: 7px;
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  color: var(--text-dim);
}
.chip-empty { color: var(--text-dim); border-style: dashed; background: transparent; }

.mini-level {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
}
.mini-level span {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  color: var(--text-dim);
  border-left: 1px solid var(--line-soft);
}
.mini-level span:first-child { border-left: 0; }
.mini-level .on { background: var(--host); color: #191008; }

.pick-art-note { font-size: 13px; color: var(--text-dim); }

/* --- customisation ----------------------------------------------------- */

.traits {
  list-style: none;
  margin: clamp(32px, 5vw, 52px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.trait { padding-top: 22px; border-top: 1px solid var(--line-soft); }

/* Personality tags sit in a row rather than stacked like the topic chips. */
.trait-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.trait-tags .chip { display: inline-block; margin: 0; }

.cast {
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: 20px;
  border-top: 1px dashed var(--line-soft);
}

.voice {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.swatch { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.swatch-host { background: var(--host); }
.swatch-cohost { background: var(--cohost); }

/* --- languages --------------------------------------------------------- */

.languages-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.languages-soon {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 15px;
  max-width: 34ch;
}

/* The scatter. The cluster is a size container, and every position and size
   inside it is in cqi (1% of its width), so the arrangement scales as one piece
   and flags that don't touch at one width can't touch at any other. The fixed
   aspect ratio reserves the height up front, so nothing shifts as flags load. */
.flags {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4 / 3;
  position: relative;
  container-type: inline-size;
}

.flag {
  position: absolute;
  left: calc(var(--x) * 1cqi);
  top: calc(var(--y) * 1cqi);
  width: calc(22cqi * var(--scale));
  display: grid;
  justify-items: center;
  gap: 6px;
  transform: rotate(var(--tilt));
  border-radius: 50%;
}
.flag:focus-visible { outline-offset: 6px; }

/* Rotation lives on the item and the float on the image, so the two
   transforms never overwrite each other. */
.flag img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  animation: drift 6s ease-in-out var(--delay) infinite;
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.flag-label {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--text);
  white-space: nowrap;
}

/* Labels show on hover or keyboard focus where there is a real pointer, and
   always on touch, where there is no hover to reveal them. */
@media (hover: hover) {
  .flag-label { opacity: 0; transition: opacity 140ms ease; }
  .flag:hover .flag-label,
  .flag:focus-visible .flag-label { opacity: 1; }
}

/* --- AI disclosure ----------------------------------------------------- */

.disclosure { font-size: 13px; color: var(--text-dim); }

/* --- levels ------------------------------------------------------------- */

.band-levels { background: var(--bg-sunken); }

.levels-head .section-lede { font-size: 1.04rem; }

.levels {
  border: 0;
  margin: clamp(34px, 5vw, 52px) 0 0;
  padding: 0;
  min-width: 0;
}

.level-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  max-width: 620px;
}

.level-track label {
  padding: 15px 12px;
  text-align: center;
  cursor: pointer;
  border-left: 1px solid var(--line-soft);
  color: var(--text-dim);
  transition: background 120ms ease, color 120ms ease;
}
.level-track label:first-of-type { border-left: 0; }
.level-track label:hover { background: var(--bg-raised); color: var(--text); }

.level-track b { display: block; font-size: 1.1rem; letter-spacing: 0.02em; }
.level-track span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-faint); }

/* Selected segment, and the matching sample below it. */
#cefr-b1:checked ~ .level-track label[for="cefr-b1"],
#cefr-b2:checked ~ .level-track label[for="cefr-b2"],
#cefr-c1:checked ~ .level-track label[for="cefr-c1"] {
  background: var(--host);
  color: #191008;
}
#cefr-b1:checked ~ .level-track label[for="cefr-b1"] span,
#cefr-b2:checked ~ .level-track label[for="cefr-b2"] span,
#cefr-c1:checked ~ .level-track label[for="cefr-c1"] span {
  color: #4a3212;
}

#cefr-b1:focus-visible ~ .level-track label[for="cefr-b1"],
#cefr-b2:focus-visible ~ .level-track label[for="cefr-b2"],
#cefr-c1:focus-visible ~ .level-track label[for="cefr-c1"] {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

/* The reading surface: a printed page, the one lit object on the page. */
.sheet {
  margin-top: 26px;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 2px;
  padding: clamp(26px, 4.5vw, 44px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
}

.sample { display: none; }

#cefr-b1:checked ~ .sheet .sample-b1,
#cefr-b2:checked ~ .sheet .sample-b2,
#cefr-c1:checked ~ .sheet .sample-c1 { display: block; }

.sample-es {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.7vw, 1.72rem);
  line-height: 1.44;
  max-width: 34ch;
}

.sample-en {
  margin-top: 16px;
  max-width: 52ch;
  color: var(--paper-dim);
  font-size: 15px;
  font-style: italic;
}

/* The CEFR can-do line each sample is written against. */
.sample-cando {
  margin-top: 26px;
  max-width: 56ch;
  font-size: 15px;
}
.sample-cando span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--paper-dim);
  letter-spacing: 0.03em;
}

.sample-facts {
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--paper-line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.sample-facts div { min-width: 0; }
.sample-facts dt {
  font-size: 12px;
  color: var(--paper-dim);
  letter-spacing: 0.03em;
}
.sample-facts dd {
  margin: 5px 0 0;
  font-size: 14.5px;
  font-weight: 600;
}

.levels-foot {
  margin-top: 26px;
  color: var(--text-faint);
  font-size: 13.5px;
  max-width: 60ch;
}

/* --- closing ------------------------------------------------------------ */

.close-inner { text-align: center; display: grid; justify-items: center; gap: 16px; }

.close-inner h2 {
  font-family: var(--serif);
  text-wrap: balance;
  font-weight: 400;
  font-size: clamp(1.7rem, 3.8vw, 2.5rem);
  line-height: 1.2;
  max-width: 20ch;
}
.close-inner p { color: var(--text-dim); }
.close-inner .button { margin-top: 10px; }

/* --- responsive --------------------------------------------------------- */

/* Mobile first above: every grid starts as one column and opens up here. */
@media (min-width: 720px) {
  .contrast,
  .traits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 56px); }
  .traits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .picks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 44px); }
  .pick-art { min-height: 150px; }
  .languages-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 72px); }
}

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

@media (max-width: 600px) {
  body { font-size: 16px; }
  .masthead { position: static; }
  .masthead-inner { min-height: 0; }
  .masthead-nav { gap: 16px; font-size: 14px; }
  .sample-facts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hero-actions .button { width: 100%; text-align: center; }
}

@media (max-width: 420px) {
  .level-track label { padding: 12px 6px; }
  .level-track span { display: none; }
  .player-meta { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* --- the episode page --------------------------------------------------- */
/* Scoped under .episode-main because the landing hero reuses .player,
   .transcript and .w for its static mockup and must keep its own sizing. */

.episode-main { padding-block: clamp(28px, 5vw, 56px); }

.status {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-dim);
  text-align: center;
  padding-block: 48px;
}

.episode-main .player {
  max-width: 720px;
  margin: 0 auto;
}

.episode-main .player-head { align-items: center; }

.playbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--host);
  cursor: pointer;
  flex: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.player.is-playing .playbtn {
  background: var(--host);
  color: #191008;
  border-color: var(--host);
}
.playbtn .ico-pause { display: none; }
.player.is-playing .playbtn .ico-play { display: none; }
.player.is-playing .playbtn .ico-pause { display: inline-flex; }

/* The recording dot means something here: it pulses only while audio is playing. */
.episode-main .onair { opacity: 0.3; animation: none; }
.episode-main .player.is-playing .onair {
  opacity: 1;
  animation: breathe 2.6s ease-in-out infinite;
}

.episode-main .transcript {
  position: relative;
  height: clamp(280px, 46vh, 460px);
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  /* Fade the edges to hint at more transcript, without boxing it in. */
  mask-image: linear-gradient(to bottom, transparent, black 24px, black calc(100% - 24px), transparent);
}

.episode-main .scrub {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}
.episode-main .scrub-done {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--text-dim);
  border-radius: 3px;
  pointer-events: none;
}

/* Touch devices fire :hover on tap and then leave it stuck until you tap
   elsewhere, so keep every hover affordance behind a real pointer. */
@media (hover: hover) {
  .playbtn:hover { background: var(--bg-raised); border-color: var(--text-faint); }
  .episode-main .w:hover {
    background: color-mix(in srgb, var(--focus) 10%, transparent);
  }
  .translation:hover { color: var(--text); }
}
