/* Watch and listen (19 Oct 2026): the players, video cards, the home band, the watch pages and the transcript.
   Loaded only by index.php, book.php and watch.php. Every colour is a token. No dark styling around the videos
   (owner, 19 Oct 2026): the frame, the badges and the home band are paper, like the page's light sections. The frame
   keeps the video's own proportions before anything loads, so the page never jumps. */

/* ---------- the player */
.media-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--paper-deep); border: 1px solid var(--border); box-shadow: var(--shadow-soft); overflow: hidden; }
.media-video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--paper-deep); }
.media-video::cue { font-family: var(--font-body); line-height: 1.4; }
.media-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 12px 0 0; font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.media-credit { margin: 6px 0 0; font-size: .85rem; color: var(--muted); font-style: italic; }

/* ---------- a card that opens the video's own page (the whole card is the link) */
.media-card { position: relative; display: grid; gap: 10px; align-content: start; min-width: 0; }
.media-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--paper-deep); border: 1px solid var(--border); overflow: hidden; }
.media-thumb img, .media-thumb-blank { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-play { position: absolute; left: 10px; bottom: 10px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold); background: var(--surface); color: var(--gold-text); box-shadow: var(--shadow-soft); transition: transform .2s var(--ease-out), background-color .2s var(--ease-out); }
.media-play .icon { width: 20px; height: 20px; margin-left: 3px; }
.media-dur { position: absolute; right: 8px; bottom: 8px; padding: 1px 7px; background: var(--surface); color: var(--text); border: 1px solid var(--border); font-size: .8rem; font-variant-numeric: tabular-nums; border-radius: var(--radius); }
.media-card-title { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); margin: 0; }
.media-card-title a { text-decoration: none; color: inherit; }
.media-card-title a::after { content: ""; position: absolute; inset: 0; }
.media-card-title a:focus-visible { outline: none; }
.media-card:focus-within { outline: 3px solid var(--gold); outline-offset: 4px; }
.media-card:hover .media-card-title a { color: var(--gold-text); }
.media-card:hover .media-play { transform: scale(1.06); background: var(--gold); color: var(--on-gold); }
.media-card-book { margin: -4px 0 0; font-size: .9rem; color: var(--muted); }

/* ---------- home: the Watch and listen band, paper like the sections around it */
.watch-band { background: var(--paper); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.watch-feature h3 a:hover { color: var(--gold-text); }
.watch-band .watch-intro { color: var(--text-soft); }
.watch-lede { text-align: center; color: var(--muted); max-width: 60ch; margin: -6px auto clamp(24px, 4vw, 40px); }
.watch-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.watch-grid.is-single { grid-template-columns: minmax(0, 1fr); max-width: 900px; margin-inline: auto; }
.watch-feature h3 { margin: 18px 0 6px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); }
.watch-feature h3 a { color: inherit; text-decoration: none; }
.watch-intro { margin: 0 0 12px; max-width: 62ch; }
.watch-side { display: grid; gap: clamp(22px, 3vw, 32px); align-content: start; }
.watch-side .caps { color: var(--gold-text); margin: 0; }
.watch-all { margin: clamp(22px, 3vw, 34px) 0 0; text-align: center; }
@media (max-width: 860px) {
  .watch-grid { grid-template-columns: minmax(0, 1fr); }
  .watch-side .media-card { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: 14px; }
  .watch-side .media-thumb { grid-row: span 2; }
  .watch-side .media-card-title { font-size: 1.15rem; }
  .watch-side .media-play { left: 4px; bottom: 4px; width: 30px; height: 30px; }
  .watch-side .media-play .icon { width: 14px; height: 14px; margin-left: 2px; }
  .watch-side .media-dur { right: 4px; bottom: 4px; font-size: .72rem; }
  .watch-side .media-card-book { margin: 0; }
}

/* ---------- book page: the Watch section */
.book-watch-section { border-top: 1px solid var(--border); }
.book-watch { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(22px, 4vw, 48px); align-items: start; }
.book-watch-main h3 { margin: 16px 0 6px; }
.book-watch-main .watch-intro { color: var(--text-soft); }
.book-watch-more { display: grid; gap: 22px; align-content: start; }
.book-watch-more .caps { margin: 0; }
.book-watch.is-single { grid-template-columns: minmax(0, 1fr); max-width: 880px; margin-inline: auto; }
@media (max-width: 860px) { .book-watch { grid-template-columns: minmax(0, 1fr); } }
.watch-link { display: inline-flex; align-items: center; gap: 6px; }
.watch-link .icon { width: 15px; height: 15px; color: var(--gold-text); }

/* ---------- the watch pages */
.watch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(26px, 4vw, 44px) clamp(20px, 3vw, 36px); margin-bottom: clamp(40px, 6vw, 72px); }
.watch-page { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-bottom: clamp(40px, 6vw, 72px); }
.watch-head { padding: clamp(20px, 4vw, 40px) 0 22px; }
.watch-head h1 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.2rem); margin-bottom: 10px; max-width: 26ch; }
.watch-head .lede { margin: 0; }
.watch-book { display: grid; gap: 14px; align-content: start; }
.watch-book .caps { margin: 0; }
.watch-book .link-more { justify-self: start; }
.watch-more { padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--border); }
@media (max-width: 960px) { .watch-page { grid-template-columns: minmax(0, 1fr); } .watch-book .pcard { max-width: 360px; } }

/* ---------- chapters by the player: each one plays the video from its start */
.chapters { margin-top: 22px; }
.chapters .caps { margin: 0 0 10px; color: var(--gold-text); font-size: 1.1rem; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 78ch; }
.ch-seek { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: 12px; align-items: baseline; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-left: 2px solid transparent; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ch-seek:hover { background: var(--sunken); }
.ch-list li.is-current .ch-seek { background: var(--sunken); border-left-color: var(--gold); }
.ch-time { color: var(--gold-text); font-size: .85rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.ch-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.25; }

/* ---------- the transcript: collapsed by default; each time is a button that plays from there */
.transcript { margin-top: 28px; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--border); }
.transcript > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 2px; cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; }
.transcript > summary::-webkit-details-marker { display: none; }
.transcript > summary .icon { width: 20px; height: 20px; color: var(--gold-text); transition: transform .2s var(--ease-out); }
.transcript[open] > summary .icon { transform: rotate(180deg); }
.transcript > summary small { font-family: var(--font-body); font-weight: 400; font-size: .85rem; color: var(--muted); margin-left: auto; }
.ts-hint { margin: 0 0 14px; font-size: .9rem; color: var(--muted); }
.ts-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 2px; max-width: 78ch; }
.ts-seg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 8px 10px; border-left: 2px solid transparent; }
.ts-seg.is-current { background: var(--sunken); border-left-color: var(--gold); }
.ts-time { min-width: 4.2em; min-height: 36px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--gold-text); font: 500 .85rem/1.2 var(--font-body); font-variant-numeric: tabular-nums; cursor: pointer; }
.ts-time:hover { border-color: var(--gold); }
.ts-body { margin: 0; line-height: 1.65; color: var(--text-soft); padding-top: 4px; }
.ts-speaker { font-weight: 600; color: var(--text); }
.ts-chapter { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 18px 10px 6px; margin-top: 6px; border-top: 1px solid var(--border); }
.ts-chapter:first-child { margin-top: 0; border-top: 0; padding-top: 6px; }
.ts-chapter-title { margin: 0; font-size: 1.3rem; }
.ts-chapter .ts-body { grid-column: 2; }

@media (prefers-reduced-motion: reduce) {
  .media-play, .transcript > summary .icon { transition: none; }
  .media-card:hover .media-play { transform: none; }
}
@media print { .media-frame, .media-thumb { display: none; } .transcript > *:not(summary) { display: block; } }
