/* Episodes page: a contents page, not a database (inc/episodes.php). */

.room-header { padding-block: clamp(36px, 5vw, 64px) clamp(24px, 3vw, 36px); }
.room-header h1 { font-size: clamp(2.75rem, 5.4vw, 4.75rem); line-height: 1; letter-spacing: -0.035em; }
.room-header p:not(.eyebrow) { margin-top: 12px; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.125rem); }
.room-header .eyebrow { margin: 0 0 12px; }

/* Shared row pieces */
.room-byline { margin-top: 12px; color: var(--muted); font-size: 1rem; line-height: 1.45; }
.room-byline a { color: var(--ink); font-weight: 600; }
.room-meta { margin-top: 12px; color: var(--muted); font-size: 0.875rem; }
.room-left { color: var(--ink); font-weight: 600; }

/* Returning listeners only (filled in by episodes.js from this browser's listening history). */
.room-resume { margin-bottom: 24px; }
.room-resume-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 14px 14px 14px 22px;
    background: var(--ink);
    color: var(--paper);
}
.room-resume-text { display: grid; gap: 2px; margin: 0; line-height: 1.35; }
.room-resume-label { color: #f2a99c; font-size: var(--text-2xs); font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; }
.room-resume-text a { color: var(--paper); font-family: var(--serif); font-size: 1.1875rem; text-decoration: none; }
.room-resume-text a:hover { color: #f2a99c; text-decoration: underline; }
.room-resume-left { color: #b9bdb1; font-size: 0.875rem; }
.room-resume .button { border-color: var(--red); background: var(--red); color: #fff; font-size: 0.875rem; }
.room-resume .button:hover { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.room-resume :focus-visible { outline-color: var(--paper); }

/* The newest conversation, as a feature. Left column: label, title, guest, Play, length, as one block from
   the top. Right column: the show-notes intro as a standfirst, centered against it behind a thin red rule,
   so any spare height sits evenly around the intro instead of as a gap above the title. */
.room-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
        "head lede"
        "actions lede"
        "meta lede";
    align-items: start;
    column-gap: clamp(32px, 5vw, 72px);
    padding: clamp(28px, 4vw, 52px);
    background: var(--sand);
}
.room-feature-head { grid-area: head; }
.room-feature .eyebrow { margin: 0; }
.room-feature h2 { margin-top: 14px; font-size: clamp(2.25rem, 4.2vw, 3.75rem); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; }
.room-feature h2 a { text-decoration: none; }
.room-feature h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.room-feature-lede {
    grid-area: lede;
    align-self: center;
    padding-left: clamp(20px, 2.5vw, 36px);
    border-left: 2px solid var(--red);
    font-family: var(--serif);
    font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
    font-style: italic;
    line-height: 1.45;
}
.room-feature-actions { grid-area: actions; margin-top: 24px; gap: 10px 20px; }
.room-feature > .room-meta { grid-area: meta; }
.room-feature .button { border-color: var(--red); background: var(--red); color: #fff; font-size: 0.875rem; }
.room-feature .button:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* Topic sections */
.room-topic { margin-top: clamp(48px, 6vw, 80px); }
.room-topic-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 24px;
    padding: 18px 0 6px;
    border-top: 1px solid var(--ink);
}
.room-topic-heading h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.02em; }
.room-topic-heading h2 a { text-decoration: none; }
.room-topic-heading h2 a:hover { text-decoration: underline; }
.room-topic-heading p { color: var(--muted); font-size: 0.9375rem; }
.room-more { margin-top: 8px; }

/* Episode rows, led by the guest */
.room-episode {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px clamp(16px, 3vw, 32px);
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
}
.room-episode :is(h3, h4) { font-size: clamp(1.25rem, 2vw, 1.625rem); line-height: 1.2; }
.room-episode :is(h3, h4) a { text-decoration: none; }
.room-episode :is(h3, h4) a:hover { text-decoration: underline; }
.room-tag {
    display: inline-block;
    margin-right: 10px;
    padding: 2px 8px;
    border: 1px solid var(--red);
    color: var(--red);
    font-family: var(--sans);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    vertical-align: 0.25em;
}
.room-episode .room-byline { margin-top: 6px; font-size: 0.9375rem; }
.room-lede { max-width: 62ch; margin-top: 8px; color: #4b4d47; font-size: 0.9375rem; line-height: 1.55; }
.room-episode .room-meta { margin-top: 8px; }
.room-episode .episode-row-play { margin-top: 2px; }
.room-progress { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; }
.room-progress > span { display: block; width: 0; height: 100%; background: var(--red); }

/* Trailers and announcements, as a footnote */
.room-origins { margin-top: clamp(56px, 7vw, 96px); padding-block: 22px clamp(56px, 6vw, 88px); border-top: 1px solid var(--rule); }
.room-origins h2 { color: var(--muted); font-family: var(--sans); font-size: var(--text-2xs); font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; }
.room-origins ul { display: flex; flex-wrap: wrap; gap: 10px 40px; margin: 14px 0 0; padding: 0; list-style: none; }
.room-origins li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.room-origins li > a:first-child { color: var(--ink); }
.room-origins .room-meta { margin: 0; }

@media (max-width: 760px) {
    .room-feature {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas: "head" "lede" "actions" "meta";
        width: 100%;
        padding: 28px var(--space) 30px;
    }
    .room-feature-lede { margin-top: 18px; padding-left: 16px; }
    .room-resume { width: 100%; }
    .room-resume-inner { padding: 14px var(--space); }
    .room-lede { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
    .room-feature-lede { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5; } /* keeps Play on the first phone screen */
    .room-origins ul { flex-direction: column; }
}

/* Topic pages (tgp_render_topic_room): the same rows, under the topic links. */
.topic-room .topic-nav { margin-bottom: 0; }
.room-topic--page { margin-top: 0; }
.room-empty { padding: 28px 0; color: var(--muted); }
.room-back { padding-block: clamp(28px, 4vw, 44px) clamp(56px, 6vw, 88px); }
