/* Homepage hero: a dark band in the charcoal, white and red of the official show artwork.
   Desktop: the host portrait fills the right half to the window edge and fades into the band.
   Phones (see the 760px query): the portrait sits on top, edge to edge, fading into the band behind its caption. */
.home-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: var(--paper); }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); min-height: clamp(540px, 46vw, 680px); }

.hero-main {
    position: relative;
    z-index: 1;
    align-self: center;
    max-width: min(640px, calc(50vw - var(--space)));
    padding-block: clamp(48px, 6vw, 88px);
}

.home-hero--no-portrait .hero-main { max-width: 760px; }
.home-hero .eyebrow { margin: 0; color: #f2a99c; }

.home-hero h1 {
    max-width: 760px;
    margin: 18px 0 20px;
    font-size: clamp(2.75rem, 5.6vw, 5.25rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.hero-description {
    max-width: 33rem;
    margin: 0;
    color: #cfd2c8;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.55;
}

/* The latest episode is named beside its play button, so the homepage needs no separate "Latest episode" section. */
.hero-latest {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    margin-top: 32px;
}

/* Shared with the About page: light-page colors here, dark-band overrides under .home-hero below. */
.hero-latest .button { flex-shrink: 0; border-color: var(--red); background: var(--red); color: #fff; font-size: 0.875rem; }
.hero-latest .button:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.home-hero a:hover { color: #f2a99c; }
.home-hero .hero-latest .button:hover { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.home-hero :focus-visible { outline-color: var(--paper); }

.hero-latest-copy {
    display: grid;
    gap: 3px;
    flex: 1 1 240px;
    min-width: 0;
    margin: 0;
    line-height: 1.35;
}

.hero-latest-label {
    color: var(--red);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero-latest-title {
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.3125rem;
    line-height: 1.2;
    text-decoration: none;
}

.hero-latest-title:hover { text-decoration: underline; }
.hero-latest-meta { color: var(--muted); }
.hero-latest-meta { font-size: 0.875rem; }
.hero-follow { margin-top: 26px; }

.home-hero .hero-latest-label { color: #f2a99c; }
.home-hero .hero-latest-title { color: var(--paper); }
.home-hero .hero-latest-meta { color: #b9bdb1; }

.home-hero-portrait {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 54%;
    margin: 0;
    overflow: hidden;
    background: #2c2e2a;
}

.home-hero-portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 5%; /* headroom above her hair at every desktop width */
    filter: brightness(0.94) saturate(0.96); /* takes the glare off the white backdrop against the dark band */
}

/* Left edge melts into the band (clear of her face by ~45%; the headline only ever overlaps the solid first 8%),
   a deeper floor carries the caption, and a light top shade separates the photo from the header rule. */
.home-hero-portrait::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, var(--ink) 0%, rgba(32, 34, 31, 0.92) 8%, rgba(32, 34, 31, 0.5) 22%, rgba(32, 34, 31, 0.12) 36%, rgba(32, 34, 31, 0) 46%),
        linear-gradient(0deg, rgba(20, 21, 19, 0.82) 0%, rgba(20, 21, 19, 0) 30%),
        linear-gradient(180deg, rgba(20, 21, 19, 0.3) 0%, rgba(20, 21, 19, 0) 14%);
    pointer-events: none;
}

.home-hero-portrait figcaption {
    position: absolute;
    z-index: 1;
    right: max(var(--space), calc((100vw - 1280px) / 2));
    bottom: 26px;
    color: #e6e7df;
    font-size: 0.875rem;
    text-align: right;
}

.home-hero-portrait figcaption a { color: var(--paper); font-weight: 600; }

.episode-heading .actions .button { font-size: 0.875rem; }
.discovery-search input, .discovery-search button { font-size: 1rem; }
.discovery-search button { min-height: 44px; }

.about-portrait {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--sand);
}

.host-portrait {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center 28%;
}

.host-portrait--default { object-position: center 10%; }


.latest-feature {
    grid-template-columns: minmax(0, 1fr) minmax(168px, 29%);
    gap: clamp(20px, 4vw, 56px);
    min-height: 0;
    padding: clamp(20px, 4vw, 44px);
    align-items: center;
}

.latest-feature .feature-copy { padding: 0; }
.latest-feature .feature-copy h3 { margin-top: 10px; }
.latest-feature .feature-description { max-width: 56ch; margin-top: 12px; font-size: 0.9375rem; line-height: 1.6; }
.latest-feature .feature-copy .actions { margin-top: 16px; }
.latest-feature .feature-copy .actions .text-link { font-size: 0.875rem; }
.latest-feature .feature-art { align-self: center; max-width: 310px; }
.latest-feature .feature-art img { width: 100%; height: auto; max-height: none; aspect-ratio: 1; object-fit: cover; }

.topic-tile .topic-cta { min-height: 0; margin-top: auto; color: var(--red); font-size: 1.125rem; }

.episode-list > :first-child { border-top: 1px solid var(--rule); }

.episode-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(10px, 3vw, 28px);
    align-items: center;
    padding: 19px 0;
    border-bottom: 1px solid var(--rule);
}

.episode-row.has-episode-image { grid-template-columns: 72px minmax(0, 1fr) auto; }
.episode-row-image img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.episode-row h3 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.625rem); overflow-wrap: anywhere; }
.episode-row .card-kicker { margin: 0 0 5px; font-size: 0.75rem; }

.episode-row .episode-metadata, .episode-heading .episode-metadata, .latest-feature .episode-metadata {
    margin-top: 6px;
    font-size: 0.875rem;
    line-height: 1.45;
}

.episode-heading .episode-metadata, .latest-feature .episode-metadata { margin-top: 10px; }

.episode-row-play {
    display: inline-flex;
    min-height: 44px;
    gap: 8px;
    align-items: center;
    padding-inline: 12px;
    border: 1px solid var(--rule);
    background: var(--paper);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.episode-row-play span { color: var(--red); font-size: 0.75rem; }
.episode-row-play:hover { border-color: var(--red); }
.episode-heading .episode-platforms { margin-top: 18px; }
.episode-heading .inline-audio { max-width: 400px; margin-top: 14px; }
.episode-body { border-top: 1px solid var(--rule); padding-top: 28px; }
.episode-body #show-notes { scroll-margin-top: 20px; }

/* Above the show notes: the editor's summary under the title, what you'll learn, and key moments to jump to. */
.episode-heading .episode-summary { max-width: 40rem; margin-top: 14px; font-family: var(--serif); font-size: clamp(1.1875rem, 1.7vw, 1.375rem); font-style: italic; line-height: 1.45; }
.episode-guide { display: grid; gap: 32px; margin-bottom: 40px; }
.episode-guide h2 { margin-bottom: 12px; font-size: 1.5rem; line-height: 1.2; }
.episode-learn ul { margin: 0; padding: 0; border-top: 1px solid var(--ink); list-style: none; }
.episode-learn li { position: relative; padding: 12px 0 12px 22px; border-bottom: 1px solid var(--rule); font-size: 1rem; line-height: 1.5; }
.episode-learn li::before { position: absolute; top: 20px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--red); content: ""; }
.episode-moments .chapters { margin-bottom: 0; border-top: 1px solid var(--ink); }
.episode-moments .chapters a { align-items: baseline; font-size: 1rem; }
.episode-moments .chapters span { min-width: 3.5rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.episode-list .guest-card { margin-block: 14px; }

.host-section .host-layout { grid-template-columns: minmax(0, 1fr); }
.host-section .host-layout.has-portrait { grid-template-columns: minmax(0, 1fr) minmax(180px, 0.9fr); }
.host-copy .host-role { margin-top: 8px; color: var(--ink); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; }
/* The label is a direct child paragraph too; keep it a small red label rather than body copy. */
.host-copy .eyebrow { max-width: none; color: var(--red); font-size: var(--text-2xs); }
.host-copy .host-role + p { margin-top: 14px; }
.about-portrait { max-width: 480px; }

/* Phones: photo on top, edge to edge, fading into the band behind its caption; copy and Play follow. */
@media (max-width: 760px) {
    .home-hero-grid { min-height: 0; }
    .hero-main { max-width: none; padding-block: 32px 44px; }
    .hero-latest { margin-top: 26px; }

    .home-hero-portrait {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        width: auto;
        order: -1;
        height: clamp(260px, 64vw, 420px);
        margin-inline: calc(var(--space) * -1);
    }

    .home-hero-portrait img { object-position: center 22%; filter: none; }
    .home-hero-portrait::after { display: none; }

    .home-hero-portrait figcaption {
        right: 0;
        bottom: 0;
        left: 0;
        padding: 56px var(--space) 18px;
        background: linear-gradient(to top, rgba(20, 21, 19, 0.9), rgba(20, 21, 19, 0));
        text-align: left;
    }
}

@media (max-width: 680px) {
    .latest-feature { grid-template-columns: minmax(0, 1fr); }
    .latest-feature .feature-art { max-width: 132px; }
    .latest-feature .feature-copy h3 { font-size: clamp(1.75rem, 8vw, 2.2rem); }
    .episode-row.has-episode-image { grid-template-columns: 42px minmax(0, 1fr) auto; }
    .episode-row-play { gap: 5px; padding-inline: 8px; }
    .host-section .host-layout.has-portrait { grid-template-columns: minmax(0, 1fr); }
}

/* About page: the host's portrait and introduction open the page, then the show at a glance,
   her story (when written), the guests, and the invitation to collaborate. */
.about-hero {
    display: grid;
    grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 6vw, 96px);
    padding-block: clamp(36px, 5vw, 72px) clamp(48px, 6vw, 88px);
}

.about-hero--no-portrait { grid-template-columns: minmax(0, 1fr); }
.about-hero-portrait { aspect-ratio: 4 / 5; max-height: min(660px, 74vh); overflow: hidden; background: var(--sand); }
.about-hero-copy .eyebrow { margin: 0; }

.about-hero h1 {
    max-width: 720px;
    margin: 16px 0 10px;
    font-size: clamp(2.75rem, 5.4vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.about-role { color: var(--muted); font-size: 1.0625rem; }
@media (min-width: 380px) { .about-name { white-space: nowrap; } } /* below 380px the name may need to wrap */
.about-intro { max-width: 36rem; margin-top: 24px; font-size: 1.125rem; line-height: 1.65; }
.about-intro p { margin: 0 0 16px; }
.about-intro > :last-child, .about-intro p:last-child { margin-bottom: 0; }
.about-hero .hero-latest { margin-top: 30px; }

/* "What we talk about": topics instead of counts, which undersell a young show. */
.about-topics {
    display: grid;
    grid-template-columns: minmax(160px, 0.7fr) minmax(0, 3fr);
    align-items: start;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}

.about-topics h2 { padding: 26px 24px 26px 0; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; }
.about-topic-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.about-topic-list li { display: grid; align-content: start; gap: 8px; padding: 26px 24px; border-left: 1px solid var(--rule); }
.about-topic-name { font-family: var(--serif); font-size: 1.375rem; line-height: 1.15; text-decoration: none; }
.about-topic-name:hover { text-decoration: underline; }
.about-topic-list p { color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }

.about-story { padding-top: clamp(40px, 5vw, 64px); font-size: 1.0625rem; }
.about-story > * { max-width: 720px; }

.about-guests { padding-top: clamp(56px, 6vw, 88px); }

.about-guest-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-guest-list li { display: grid; align-content: start; gap: 4px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.about-guest-name { font-family: var(--serif); font-size: 1.5rem; line-height: 1.15; text-decoration: none; }
.about-guest-name:hover { text-decoration: underline; }
.about-guest-role { color: var(--muted); font-size: 0.9375rem; }
.about-guest-episode { margin-top: 6px; color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
.about-guest-episode a { color: var(--ink); }

@media (max-width: 900px) {
    .about-topics { grid-template-columns: minmax(0, 1fr); }
    .about-topics h2 { padding: 24px 0 2px; }
    .about-topic-list li:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
    .about-guest-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones: portrait first, edge to edge (as on the homepage), then the introduction. */
@media (max-width: 760px) {
    .about-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 0; }
    .about-hero-portrait { height: clamp(300px, 86vw, 460px); max-height: none; aspect-ratio: auto; margin-inline: calc(var(--space) * -1); }
    .about-hero-portrait .host-portrait--default { object-position: center 16%; }
    .about-intro { margin-top: 20px; font-size: 1.0625rem; }
}

@media (max-width: 600px) {
    .about-guest-list { grid-template-columns: minmax(0, 1fr); }
    .about-topic-list { grid-template-columns: minmax(0, 1fr); }
    .about-topic-list li, .about-topic-list li:nth-child(3n + 1) { padding: 18px 0; border-left: 0; border-top: 1px solid var(--rule); }
    .about-topic-list li:first-child { border-top: 0; }
}

/* Topic links on topic pages, search results and filtered episode lists (replaces the dropdown filter form). */
.topic-nav { margin: 0 0 28px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.topic-nav ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.topic-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #c9c7bd;
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 0.875rem;
    text-decoration: none;
}

.topic-nav a:hover { border-color: var(--ink); color: var(--ink); }
.topic-nav a[aria-current] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.topic-nav + .episode-list > :first-child { border-top: 0; } /* the topic links already draw the rule above the list */

/* Official listening marks (assets/brand/, inc/render.php tgp_listen_badges). The artwork is only sized, never
   recolored, cropped or given effects. The gaps keep both clear spaces: Spotify asks for half its icon height
   (13px at this size), Apple for a tenth of the badge height (4px). Apple's badge sits first, as Apple asks. */
.listen-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 0; padding: 0; list-style: none; }
.listen-badges li { display: flex; }
.listen-badge { display: inline-flex; align-items: center; border-radius: 6px; }
.listen-badge img { display: block; width: auto; max-width: none; }
.listen-badge--apple img { height: 40px; }
.listen-badge--spotify { padding-block: 7px; } /* a 40px-tall target to match the Apple badge */
.listen-badge--spotify img { height: 26px; }
.listen-badge:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.listen-badges--light .listen-badge { color: var(--ink); }
.listen-badges--dark .listen-badge { color: var(--paper); }
.footer-badges { margin: 4px 0 12px; }
