/* Episode pages only (loaded from episode.njk). Leader-owned; the shared look lives in site.css. */

/* Header (her 10:34 note): number, title and date across the full width, the player under them, the art last. */
.ep-title { grid-template-columns: auto minmax(0, 1fr); }
.ep-title h1 { font-size: 48px; }
.ep-top > .player { margin-top: 32px; }
.ep-top > .player iframe.spotify, .ep-top > .player audio { width: 100%; }

/* Transcript: the last section, full width, before previous/next (her 10:34 note). */
.ep > .transcript { margin-top: 64px; }

/* Lightbox for Photos from the Episode */
.photos a { cursor: zoom-in; }
.lb { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0;
      background: rgba(20, 17, 16, .96); color: var(--ink); }
.lb::backdrop { background: rgba(0, 0, 0, .6); }
.lb[open] { display: grid; place-items: center; }
.lb-frame { margin: 0; padding: 64px 80px 72px; max-width: 100%; max-height: 100%; display: grid; justify-items: center; gap: 16px; }
.lb-img { max-width: min(1120px, 100%); max-height: calc(100vh - 200px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lb-cap { color: var(--ink); font-size: 16px; max-width: 760px; text-align: center; }
.lb-count { position: absolute; top: 24px; left: 24px; margin: 0; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0;
          border-radius: 999px; background: rgba(245, 241, 234, .08); color: var(--ink); cursor: pointer; }
.lb-btn:hover { background: rgba(245, 241, 234, .16); }
.lb-btn:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; }

@media (max-width: 720px) {
  .ep-title { grid-template-columns: minmax(0, 1fr); }
  .ep-title h1 { font-size: 30px; }
  .lb-frame { padding: 64px 16px 88px; }
  .lb-img { max-height: calc(100vh - 220px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
}

/* Spotify and Apple Podcasts badges under the player (her 10:42 ask: "as ICONS or logos"). Her white badges are
   397 x 161; shown at 148 px wide, so a 2x screen still has more pixels than it needs. */
.listen-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 20px; }
.listen-badges img { width: 148px; height: auto; display: block; }
.listen-badges a { display: block; border-radius: 8px; padding: 4px; }
.listen-badges a:hover img { opacity: .85; }
.listen-badges a.text { padding: 4px 0; text-decoration: underline; text-decoration-color: var(--acc); }
@media (max-width: 720px) { .listen-badges img { width: 124px; } }

/* Click to play (her WIAB-Q45): the placeholder for an old YouTube video or Google Doc, then the real player. */
.ctp-frame { margin: 16px 0; border-radius: 8px; overflow: hidden; background: #000; }
.ctp-frame.ctp-youtube { aspect-ratio: 16 / 9; }
.ctp-frame.ctp-gdoc { min-height: 240px; }
.ctp-frame.ctp-gdoc.ctp-loaded { height: 70vh; }
.ctp-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.ctp { all: unset; box-sizing: border-box; width: 100%; height: 100%; min-height: 240px; display: grid; place-content: center;
       justify-items: center; gap: 8px; padding: 16px; text-align: center; cursor: pointer; background: #1d1917; }
.ctp-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 999px;
            background: rgba(245, 241, 234, .12); color: var(--ink); }
.ctp:hover .ctp-icon, .ctp:focus-visible .ctp-icon { background: var(--acc); color: var(--bg); }
.ctp:focus-visible { outline: 2px solid var(--acc); outline-offset: -4px; }
.ctp-title { font-weight: 600; font-size: 18px; color: var(--ink); }
.ctp-note { color: var(--muted); font-size: 14px; }

/* Video stills in the click-to-play boxes (her ask 2026-11-29 02:17: "thumbnails ... before clicking"). The still
   fills the box, a dark wash keeps the title readable, the play button sits on top. */
.ctp { position: relative; }
.ctp-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.ctp-has-thumb::after { content: ""; position: absolute; inset: 0; z-index: 1;
                        background: linear-gradient(rgba(0, 0, 0, .15), rgba(0, 0, 0, .55)); }
.ctp-has-thumb .ctp-icon, .ctp-has-thumb .ctp-title, .ctp-has-thumb .ctp-note { position: relative; z-index: 2; }
.ctp-has-thumb .ctp-icon { background: rgba(20, 17, 16, .72); }
.ctp-has-thumb .ctp-title, .ctp-has-thumb .ctp-note { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .85); }
.ctp-has-thumb:hover::after { background: linear-gradient(rgba(0, 0, 0, .05), rgba(0, 0, 0, .45)); }

/* The old [video] clips (ep 33's balloon clip is a tall phone video): keep their shape, never taller than the
   window, still showing before play. */
.ep-more video { width: auto; height: auto; max-width: 100%; max-height: 80vh; background: #000; }

/* Space above a heading that follows other content (her ask 2026-11-29 03:33: "Terrible, Absolutely Horrible Maps
   needs space above it on ep 33 with the video embed above it"). A heading that opens its block (About the
   Episode, Subjects Covered, Sources) stays flush; a heading right under another heading stays close to it. */
.ep-body :is(h2, h3, h4):not(:first-child) { margin-top: 48px; }
.ep-body :is(h3, h4):not(:first-child) { margin-top: 36px; }
.ep-body :is(h2, h3, h4) + :is(h2, h3, h4):not(:first-child) { margin-top: 12px; }
.ep-body :is(h3, h4) { margin-bottom: 12px; }

/* Ep 33's map gallery (WIAB-Q71): a map cropped square loses its joke, so each shows whole in a 4:3 tile. */
.photos.maps img { aspect-ratio: 4 / 3; object-fit: contain; }
