/* Coverist — home, v4.
   A cream frame holds rounded panels that stack on scroll (Kiosk). Panel 1: the real deck photo
   playing in a framed window. Panel 2: Ehsan's episode covers on a curved carousel (ZØAVË).
   Panel 3: short intro on brand teal. Panel 4: platforms + footer.
   Red is an event: one focal element per view, never body text. */

:root {
  /* brand */
  --red: #EA614E;
  --red-deep: #C45139;  /* large text only (≥24px): 3.3–4.3:1 on the creams */
  --red-ink: #9E3F2C;   /* small red text: ≥4.6:1 on every cream ground */
  --navy: #2D3F50;
  --cream: #F5F1E6;
  --teal: #87C2AA;

  /* grounds, all derived from the cover-art cream */
  --frame: var(--cream);
  --sand: #ECE4D1;      /* hero panel */
  --sand-2: #E3D9C3;    /* episodes panel */
  --paper: #FBF8F1;     /* cards, last panel */
  --ink: #1F2D3A;       /* navy, deepened for body text */
  --ink-soft: #4A5866;  /* ≥4.5:1 on every cream ground here; not used on teal */
  --line: rgba(31, 45, 58, .16);

  --inset: clamp(10px, 1.4vw, 22px);
  --panel-h: calc(100svh - 2 * var(--inset));
  --radius: clamp(20px, 2.4vw, 36px);
  --pad: clamp(20px, 3.2vw, 52px);

  --f-body: "Vazirmatn", system-ui, sans-serif;
  --f-display: "Markazi Text", "Vazirmatn", serif;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --shadow-panel: 0 -18px 40px -26px rgba(31, 45, 58, .35);
  --shadow-card: 0 2px 6px rgba(31, 45, 58, .06), 0 26px 50px -30px rgba(31, 45, 58, .5);

  color-scheme: light;
  scrollbar-color: rgba(31, 45, 58, .35) var(--frame);
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--frame);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(17px, 1.1vw, 18px);
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--red-deep);
}
::selection { background: var(--teal); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 10px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 8px; right: 8px; z-index: 100; padding: 10px 18px; background: var(--ink); color: var(--cream); border-radius: 999px; transform: translateY(-160%); transition: transform .2s var(--ease-out); }
.skip:focus { transform: none; }

/* ───────── stack + panels ───────── */
.stack { padding: var(--inset); }
.marker { height: 0; }
.dwell { height: 26svh; }

.panel {
  position: sticky;
  top: var(--top, var(--inset));
  min-height: var(--panel-h);
  border-radius: var(--radius);
  transform-origin: 50% 0;
  isolation: isolate;
  box-shadow: var(--shadow-panel);
}
.panel--listen { position: relative; top: auto; min-height: 0; }
.panel__inner { position: relative; z-index: 1; min-height: inherit; }
.panel__dim { position: absolute; inset: 0; z-index: 3; border-radius: inherit; background: var(--navy); opacity: 0; pointer-events: none; }

.section-title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(36px, 3.4vw, 54px);
  line-height: 1.25; margin: 0; text-wrap: balance;
}

/* ───────── buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px; border-radius: 999px;
  font: 500 16px/1 var(--f-body); text-decoration: none; white-space: nowrap;
  cursor: pointer; touch-action: manipulation; border: 1.5px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .16s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--navy); color: var(--cream); }
.btn--line { border-color: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .btn--solid:hover { background: var(--ink); }
  .btn--line:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
}

/* ───────── panel 1 · hero ───────── */
.panel--hero { background: var(--sand); }
.hero {
  --chrome: 285px;  /* measured: topbar + two-line foot + gaps + padding, kept out of the deck's height */
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(14px, 2.2svh, 26px);
  padding: clamp(14px, 2svh, 24px) var(--pad) var(--pad);
}
.topbar { display: flex; align-items: center; gap: 24px; min-height: 48px; }
.logo { display: inline-flex; align-items: baseline; gap: 8px; direction: ltr; text-decoration: none; }
.logo span { font: 600 30px/1 var(--f-display); letter-spacing: .01em; }
.logo small { font: 500 12px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.topbar__nav { display: flex; gap: clamp(18px, 2.4vw, 36px); margin-inline-start: auto; font-size: 16px; }
.topbar__nav a { text-decoration: none; padding-block: 10px; color: var(--ink-soft); transition: color .2s ease; }
@media (hover: hover) and (pointer: fine) { .topbar__nav a:hover { color: var(--ink); } }
@media (max-width: 640px) { .topbar__nav a:not(:first-child) { display: none; } }

/* the deck video keeps its own 16:9 framing; capped at 1100px because the source is 720p */
.deck-frame {
  position: relative; margin: 0;
  align-self: center; justify-self: center;
  width: min(100%, 1100px, calc((var(--panel-h) - var(--chrome)) * 16 / 9));
  aspect-ratio: 16 / 9;
  border-radius: clamp(14px, 1.6vw, 24px);
  overflow: hidden;
  background: #0b0907;
  box-shadow: 0 30px 60px -34px rgba(31, 45, 58, .55);
}
/* phones: a 16:9 frame is short, so the hero hugs its content instead of filling the screen;
   the episodes panel peeks in below it */
@media (max-width: 640px) {
  .panel--hero { min-height: 0; }
  .dwell { height: 8svh; }
  .hero { grid-template-rows: auto auto auto; gap: 18px; padding-bottom: 28px; }
  .deck-pause { left: 8px; bottom: 8px; }
}
.deck { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }

.deck-pause {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(245, 241, 230, .86); border: 0; color: var(--ink);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45);
  transition: background-color .2s ease, transform .16s var(--ease-out);
}
.deck-pause:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .deck-pause:hover { background: var(--cream); } }
.deck-pause svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.deck-pause .i-play { fill: currentColor; stroke-width: 1.5; stroke-linejoin: round; display: none; }
.deck-pause[aria-pressed="true"] .i-play { display: block; }
.deck-pause[aria-pressed="true"] .i-pause { display: none; }

.hero__foot { display: flex; align-items: end; justify-content: space-between; gap: 18px 40px; flex-wrap: wrap; }
.hero__text { min-width: 0; max-width: 60ch; }
.hero__title { margin: 0 0 4px; font: 600 26px/1.4 var(--f-display); }
.hero__title span { white-space: nowrap; }
.hero__title .bar { color: var(--red-deep); padding-inline: .15em; }
@media (max-width: 640px) { .hero__title { font-size: 23px; } }
.hero__lede { margin: 0; color: var(--ink-soft); text-wrap: pretty; }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ───────── panel 2 · episodes ───────── */
.panel--episodes { background: var(--sand-2); }
.episodes { display: grid; align-content: center; gap: clamp(10px, 1.6svh, 20px); padding: var(--pad) 0; overflow-x: clip; border-radius: inherit; }
.episodes__head { display: flex; align-items: end; justify-content: space-between; gap: 12px 28px; padding-inline: var(--pad); }
.cs__count { display: flex; align-items: baseline; gap: 10px; font-family: var(--f-display); }
.cs__count b { font-weight: 400; font-size: clamp(48px, 4.6vw, 68px); line-height: 1; color: var(--red-ink); min-width: 1.4em; text-align: center; }
.cs__count span { font-size: 20px; color: var(--ink-soft); }

.cs {
  --cs-gap: 26px;
  --cw: min(clamp(220px, 19vw, 290px), max(190px, calc(100svh - 490px)));
  --ch: calc(var(--cw) + 178px);  /* cover + two-line title + meta + buttons */
  display: grid; gap: 10px;
}
@media (max-width: 700px) { .cs { --cw: min(66vw, 280px); --cs-gap: 16px; } }
.cs__viewport {
  position: relative;
  height: calc(var(--ch) + 36px);
  perspective: 1800px;
  perspective-origin: 50% 40%;
  cursor: grab;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.cs.is-dragging .cs__viewport { cursor: grabbing; }
.cs__viewport:focus-visible { outline-offset: -4px; }
.cs__track { position: absolute; inset: 0; transform-style: preserve-3d; }

.cs-card {
  position: absolute; left: 50%; top: 14px;
  width: var(--cw); height: var(--ch);
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px; border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.cs-card__cover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; pointer-events: none; background: var(--cream); }
.cs-card__info { display: flex; flex-direction: column; flex: 1; padding-inline: 4px; }
.cs-card__title { font: 600 23px/1.4 var(--f-display); margin: 0; min-height: 2.8em; text-wrap: balance; display: flex; align-items: end; }
.cs-card__meta { margin: 0 0 auto; font: 400 17px/1.5 var(--f-display); direction: ltr; text-align: right; unicode-bidi: isolate; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-card__btns { display: flex; gap: 8px; margin-top: 10px; }
.cs-card__btns .btn { flex: 1 1 0; min-height: 44px; padding: 0 12px; font-size: 15px; }
.cs-card:not(.is-active) .cs-card__btns { pointer-events: none; }

.cs__bar { display: flex; align-items: center; justify-content: center; gap: 18px; padding-inline: var(--pad); }
.cs__arrow {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1.5px solid var(--line); color: var(--ink);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}
.cs__arrow:disabled { opacity: .35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .cs__arrow:not(:disabled):hover { background: var(--ink); border-color: var(--ink); color: var(--cream); } }
.cs__arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cs__progress { position: relative; width: min(220px, 34vw); height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.cs__progress span { position: absolute; inset: 0; background: var(--red); transform-origin: 100% 50%; transform: scaleX(.2); transition: transform .35s var(--ease-out); }

/* Spotify player behind a click-to-load facade. Same 152px height as the compact embed, so the
   swap causes no layout shift; the iframe fades in over the facade once it has loaded. */
.player { position: relative; width: min(560px, calc(100% - 2 * var(--pad))); height: 152px; margin: 4px auto 0; }
.player__facade {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--paper); box-shadow: var(--shadow-card);
}
.player__cover { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.player__text { min-width: 0; }
.player__text p { margin: 0; }
.player__title { font: 600 20px/1.4 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__meta { font: 400 16px/1.4 var(--f-display); direction: ltr; text-align: right; unicode-bidi: isolate; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__note { margin-top: 6px !important; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.player__play {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--navy); color: var(--cream);
  transition: background-color .2s ease, transform .16s var(--ease-out), opacity .2s ease;
}
.player__play svg { width: 22px; height: 22px; fill: currentColor; margin-inline-start: 3px; }
.player__play:active { transform: scale(.95); }
.player__play[aria-busy="true"] { opacity: .55; cursor: progress; }
@media (hover: hover) and (pointer: fine) { .player__play:hover { background: var(--ink); } }
.player__frame { position: absolute; inset: 0; }
.player__iframe {
  display: block; width: 100%; height: 152px; border: 0; border-radius: 12px;
  opacity: 0; transition: opacity .22s var(--ease-out);
}
.player.is-ready .player__iframe { opacity: 1; }
@media (max-width: 640px) {
  .player__facade { gap: 12px; padding: 12px; }
  .player__cover { width: 56px; height: 56px; }
  .player__title { font-size: 18px; }
}

/* reduced motion: a flat, swipeable row */
.cs--flat .cs__viewport { height: auto; perspective: none; overflow-x: auto; scroll-snap-type: x mandatory; cursor: auto; padding-block: 14px 24px; }
.cs--flat .cs__track { position: static; display: flex; gap: var(--cs-gap); padding-inline: var(--pad); width: max-content; }
.cs--flat .cs-card { position: relative; left: auto; top: auto; flex: none; scroll-snap-align: center; transform: none; }

/* ───────── panel 3 · intro ───────── */
.panel--intro { background: var(--teal); color: var(--ink); min-height: min(var(--panel-h), 64svh); display: grid; }
.intro {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center; gap: clamp(28px, 6vw, 96px);
  padding: clamp(40px, 8svh, 96px) clamp(24px, 6vw, 96px);
}
.intro__text p { margin: 18px 0 22px; max-width: 58ch; text-wrap: pretty; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; padding-block: 8px; }
.link-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover svg { transform: translateX(-4px); } }

.start {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px;
  padding: 14px; border-radius: 22px;
  background: var(--cream); text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .start:hover { transform: translateY(-3px); } }
.start__cover { width: clamp(96px, 9vw, 132px); aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.start__text { display: grid; gap: 2px; }
.start__label { font-size: 14px; font-weight: 700; color: var(--red-ink); }
.start__title { font: 600 clamp(22px, 1.8vw, 26px)/1.35 var(--f-display); }
.start__meta { font: 400 17px/1.4 var(--f-display); direction: ltr; text-align: right; color: var(--ink-soft); }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; } }

/* ───────── panel 4 · footer (v2, Makora structure mirrored for RTL) ─────────
   Layers, bottom to top: grainy colour wash → voice wave (lower ~55%) → film grain → content. */
.site-footer {
  min-height: clamp(560px, 76svh, 860px);
  display: flex; flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 18% 108%, rgba(242, 166, 90, .30), transparent 70%),   /* amber */
    radial-gradient(60% 50% at 82% 112%, rgba(135, 194, 170, .38), transparent 70%),  /* teal */
    radial-gradient(55% 45% at 50% 120%, rgba(234, 97, 78, .14), transparent 72%),    /* peach */
    linear-gradient(to bottom, var(--paper) 0%, var(--paper) 35%, #F6EFE2 100%);
}
.site-footer::after {  /* fine film grain over wash and wave */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .17 0 0 0 0 .23 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .2; mix-blend-mode: multiply;
}
.wave__canvas {
  position: absolute; inset: auto 0 0 0; z-index: 0;
  width: 100%; height: 56%; display: block; pointer-events: none;
  /* strands rise from the bottom edge and dissolve upward into the paper */
  -webkit-mask-image: linear-gradient(to top, #000 25%, rgba(0,0,0,.55) 60%, transparent 100%);
          mask-image: linear-gradient(to top, #000 25%, rgba(0,0,0,.55) 60%, transparent 100%);
}

.footer__inner {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  padding: clamp(48px, 9svh, 96px) clamp(24px, 5vw, 80px) clamp(18px, 2.4svh, 26px);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 64px);
}
.footer__brand .logo span { font-size: 34px; }
.footer__brand p { margin: 14px 0 22px; max-width: 30ch; font-size: 16px; line-height: 1.8; color: var(--ink-soft); }
.icon-row { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink);
  background: rgba(251, 248, 241, .55);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg .dot { fill: currentColor; stroke: none; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); } }

.footer__col h2 { margin: 6px 0 14px; font: 600 14px/1.4 var(--f-body); color: var(--ink); }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer__col a {
  display: inline-block; padding-block: 5px;
  font-size: 15px; line-height: 1.6; text-decoration: none; color: var(--ink-soft);
  transition: color .2s ease;
}
.footer__col a[dir="ltr"] { unicode-bidi: isolate; }
@media (hover: hover) and (pointer: fine) { .footer__col a:hover { color: var(--ink); } }
.footer__col a:focus-visible { color: var(--ink); }

.footer__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink);
}
/* the bar sits on the densest part of the wave: a paper-coloured halo keeps it readable */
.footer__bar small, .footer__bar q {
  text-shadow: 0 0 3px var(--paper), 0 0 8px var(--paper), 0 0 14px var(--paper);
}
.footer__bar small { font-size: 13px; }
.footer__bar-end { display: flex; align-items: center; gap: 14px; }
.footer__bar q { font-size: 13px; quotes: "«" "»"; color: var(--ink); }
.wave-pause {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(251, 248, 241, .7); border: 1px solid var(--line); color: var(--ink);
  transition: background-color .2s ease, transform .16s var(--ease-out);
}
.wave-pause:active { transform: scale(.94); }
.wave-pause svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.wave-pause .i-play { fill: currentColor; stroke-width: 1.5; stroke-linejoin: round; display: none; }
.wave-pause[aria-pressed="true"] .i-play { display: block; }
.wave-pause[aria-pressed="true"] .i-pause { display: none; }

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .site-footer { min-height: 0; }
  .wave__canvas { height: 260px; }   /* tall stacked footer: keep the wave behind the bottom bar only */
  .footer__inner { gap: 40px; }
  .footer__bar { flex-direction: column; align-items: flex-start; }
}

/* ───────── episode pages (/episodes/<slug>/) ─────────
   Same cream frame and rounded panels as home, but a reading page: panels sit in normal flow
   (no sticky stacking), sized by their content. */
.ep-page .stack { display: grid; gap: var(--inset); }
.ep-page .panel { position: relative; top: auto; min-height: 0; }
.panel--ep-hero { background: var(--sand); }
.panel--ep-body { background: var(--paper); }
.panel--ep-nav { background: var(--sand-2); }

.ep-hero { padding: clamp(14px, 2svh, 24px) var(--pad) clamp(32px, 6svh, 72px); }
.ep-hero__grid {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 80px); align-items: center;
  margin-top: clamp(24px, 5svh, 56px);
}
.ep-hero__cover { width: 100%; max-width: 440px; justify-self: center; aspect-ratio: 1; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow-card); }
.ep-hero__text { min-width: 0; }
.ep-hero__num { margin: 0; font: 400 clamp(48px, 4.6vw, 68px)/1 var(--f-display); color: var(--red-ink); }
.ep-hero__title { margin: 10px 0 6px; font: 600 clamp(30px, 3.1vw, 46px)/1.35 var(--f-display); text-wrap: balance; }
.ep-hero__meta { margin: 0; font: 400 21px/1.5 var(--f-display); text-align: right; unicode-bidi: isolate; color: var(--ink-soft); }
.ep-hero__date { margin: 2px 0 0; font-size: 15px; color: var(--ink-soft); }
.ep-hero .player { width: 100%; max-width: 560px; margin: 28px 0 0; }
.ep-platforms { margin-top: 22px; }
.ep-platforms p { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); }
.ep-platforms ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
@media (max-width: 860px) {
  .ep-hero__grid { grid-template-columns: 1fr; }
  .ep-hero__cover { max-width: 340px; }
}
@media (max-width: 640px) {
  .ep-hero__grid { margin-top: 16px; gap: 18px; }
  .ep-hero__cover { max-width: min(200px, 52vw); border-radius: 16px; }
  .ep-hero__num { font-size: 44px; }
  .ep-hero__title { font-size: 28px; margin-top: 4px; }
  .ep-hero .player { margin-top: 18px; }
}

.ep-body { padding: clamp(40px, 8svh, 96px) clamp(24px, 6vw, 96px); }
.ep-body > * { max-width: 680px; margin-inline: auto; }   /* one column for every block (ch would differ per font size) */
.ep-body p { margin-top: 0; margin-bottom: 1.15em; text-wrap: pretty; }
.ep-body h2 { margin: 1.8em auto .45em; font: 600 clamp(26px, 2.2vw, 32px)/1.4 var(--f-display); }
.ep-body h3 { margin: 1.5em auto .4em; font: 600 22px/1.4 var(--f-display); }
.ep-body > :first-child { margin-top: 0; }
.ep-body ul, .ep-body ol { padding-inline-start: 1.3em; margin-bottom: 1.15em; }
.ep-body li { margin-bottom: .35em; }
.ep-body blockquote { margin-bottom: 1.15em; padding-inline-start: 1em; border-inline-start: 1px solid var(--line); font: 500 23px/1.7 var(--f-display); }
.ep-body a { text-underline-offset: 4px; }
.ep-body__note { font-size: 15px; color: var(--ink-soft); }

.ep-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: clamp(20px, 3vw, 36px); }
.ep-nav__card {
  display: flex; align-items: center; gap: 16px; padding: 12px;
  border-radius: 18px; background: var(--paper); box-shadow: var(--shadow-card); text-decoration: none;
  transition: transform .25s var(--ease-out);
}
.ep-nav__card.is-newer { flex-direction: row-reverse; text-align: left; }
.ep-nav__card img { width: 88px; height: 88px; flex: none; border-radius: 12px; object-fit: cover; }
.ep-nav__card span { display: grid; gap: 2px; min-width: 0; }
.ep-nav__card small { font-size: 13px; color: var(--ink-soft); }
.ep-nav__card b { font: 600 20px/1.4 var(--f-display); }
.ep-nav__card i { font: 400 16px/1.4 var(--f-display); font-style: normal; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) and (pointer: fine) { .ep-nav__card:hover { transform: translateY(-2px); } }
@media (max-width: 640px) {
  .ep-nav { grid-template-columns: 1fr; }
  .ep-nav__slot { display: none; }
  .ep-nav__card.is-newer { flex-direction: row; text-align: right; }
}

/* ───────── in-app browsers (html.is-inapp, set in <head>) ─────────
   Telegram/Instagram/Facebook WebViews resize the viewport with every toolbar move. No JS here:
   the hero stays sticky (it always fits the smallest viewport) and the episodes panel slides over
   it by plain CSS; panels that can be taller than an in-app viewport flow normally, so their
   lower part (player, start card) is never hidden. Sizes use svh/fixed values only. */
.is-inapp .panel { transform: none !important; }
.is-inapp .panel--hero { position: sticky; top: var(--inset); }
.is-inapp .panel:not(.panel--hero) { position: relative; top: auto; }
.is-inapp .panel:not(.panel--hero) + .dwell { height: var(--inset); }
.is-inapp .panel__dim { display: none; }
/* phones in-app: nothing above the episodes panel depends on viewport height, so a toolbar or
   viewport change can never move it */
@media (max-width: 640px) {
  .is-inapp .hero { padding-top: 16px; }
  .is-inapp .panel--hero + .dwell { height: 64px; }
}

/* ───────── reduced motion ───────── */
.rm .panel { position: relative; top: auto; }
.rm .dwell { height: var(--inset); }
@media (prefers-reduced-motion: reduce) {
  .btn, .start, .link-arrow svg, .cs__progress span, .player__play, .ep-nav__card { transition: none; }
  .player__play:active { transform: none; }
  /* the iframe keeps its short opacity fade: no movement, and it hides the embed's own paint */
}
