/* ===========================================================================
   PHOTO PEOPLE - the site's own look, on top of the engine theme.

   Loaded after the engine's style.css (site.yaml: theme.stylesheet), so it
   only has to say what is different. Taken from the prototype in
   ~/Documents/code/websiteprototypes/photopeople: light mode is the 5500K
   light table, dark mode the silver darkroom print; the contact sheet is
   always film, whichever light it lies under.
   =========================================================================== */

:root {
    --bg: #EFEAE0;
    --header-bg: rgba(250, 247, 240, 0.92);
    --text-main: #171614;
    --text-muted: #545048;
    --text-quote: #3A3732;
    --border: #D6CFC0;
    --surface: #FAF7F0;
    --surface-strong: #E6DFD1;
    --surface-hover: #DCD4C4;
    --pp-panel: #FAF7F0;
    --pp-faint: #847D70;
    --pp-rebate: #9B5A06;
    --pp-mat: #FFFFFF;
    --pp-marker: #D12F15;
    --pp-shadow: 0 20px 48px rgba(35, 30, 20, 0.12);

    /* The film itself is dark under any light. */
    --pp-film: #0A0A09;
    --pp-film-frame: #141412;
    --pp-film-line: #2B2925;
    --pp-film-ink: #EFECE4;
    --pp-film-muted: #9E988C;
    --pp-film-rebate: #E39B3B;
    --pp-film-mat: #DCD5C7;
}

:root[data-theme="dark"] {
    --bg: #0C0C0B;
    --header-bg: rgba(18, 18, 16, 0.9);
    --text-main: #EFECE4;
    --text-muted: #A6A095;
    --text-quote: #CFCAC0;
    --border: #2A2824;
    --surface: #141412;
    --surface-strong: #1E1D1A;
    --surface-hover: #2A2824;
    --pp-panel: #121210;
    --pp-faint: #6F6A60;
    --pp-rebate: #E39B3B;
    --pp-mat: #EBE5D8;
    --pp-marker: #E34227;
    --pp-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

body {
    background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 0);
    background-size: 22px 22px;
}
:root[data-theme="dark"] body {
    background-image: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 0);
    background-size: 24px 24px;
}

/* ===========================================================================
   The instrument bar
   =========================================================================== */

header {
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1340px;
    padding-top: 8px;
    padding-bottom: 8px;
}
/* Brand: aperture glyph, name, and the small line under it. */
.logo {
    display: inline-grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    font-family: "Space Mono", monospace;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
/* The show's cover art as the brand mark, on every page: the same square
   people see in their podcast app, so they know they are in the right place. */
.logo::before {
    content: "";
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface) url("/podcast-cover-192.jpg") center / cover no-repeat;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.logo::after {
    content: "By Dirk Primbs · Vol. I";
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--pp-faint);
}
.logo:hover::before {
    transform: rotate(-3deg);   /* the tilt of the film strip on the cover */
}

/* The menu as the prototype's segmented switcher; the contact sheet keeps
   its number, 01. */
@media (min-width: 900px) {
    .nav-menu {
        gap: 2px;
        padding: 3px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 6px;
    }
    .nav-menu > li > a,
    .nav-menu .submenu-parent {
        padding: 6px 12px;
        border-radius: 4px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-muted);
    }
    .nav-menu > li > a:hover {
        color: var(--text-main);
    }
    .nav-menu > li > a[aria-current],
    .nav-menu > li > a.is-active {
        background: var(--surface-strong);
        color: var(--text-main);
    }
}
.nav-menu > li:nth-child(1) > a::before {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    font-weight: 400;
    margin-right: 6px;
    color: var(--pp-marker);
}
.nav-menu > li:nth-child(1) > a::before { content: "01"; }

/* The theme toggle names its light, as the prototype's switcher does. */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
}
.theme-toggle::after {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    color: var(--text-muted);
    content: "Auto";
}
:root[data-theme-mode="light"] .theme-toggle::after { content: "5500K"; }
:root[data-theme-mode="dark"] .theme-toggle::after { content: "Silver"; }

.subscribe-link {
    font-family: "Space Mono", monospace;
    font-size: 12px;
    color: var(--text-main) !important;
    background: var(--surface) !important;
    border: 1px solid var(--border);
    border-radius: 5px !important;
}
.subscribe-link:hover {
    border-color: var(--pp-marker);
}
.subscribe-link svg {
    color: var(--pp-marker);
}
.search-input {
    font-family: "Space Mono", monospace;
    font-size: 12px;
    border-radius: 5px;
}

/* ===========================================================================
   The masthead (show header on the front page)
   =========================================================================== */

.podcast-seasons .podcast-hero {
    display: block;
    padding: 0 0 26px 0;
    margin: 0 0 28px 0;
    border-bottom: 1px solid var(--border);
}
.podcast-seasons .podcast-hero .podcast-eyebrow {
    display: none;   /* "Podcast" says less than the h1 */
}
/* The cover beside the show's name and subscribe button: what to look for in
   a podcast app. */
.podcast-seasons .podcast-hero {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    column-gap: 32px;
    align-items: start;
}
.podcast-seasons .podcast-hero > img {
    width: 180px;
    height: 180px;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.podcast-seasons .podcast-hero > div {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    column-gap: 40px;
    align-items: end;
}
.podcast-seasons .podcast-hero > div > * {
    grid-column: 1;
}
.podcast-seasons .podcast-hero .podcast-subscribe,
.podcast-seasons .podcast-hero .podcast-button {
    grid-column: 2;
    justify-self: end;
}
.podcast-seasons .podcast-hero .podcast-subscribe {
    grid-row: 3;
    align-self: end;
}
.podcast-seasons .podcast-hero .podcast-button {
    grid-row: 4;
    margin: 0;
}
.podcast-eyebrow,
.podcast-seasons .podcast-hero h1 {
    font-family: "Space Mono", monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pp-rebate);
}
.podcast-seasons .podcast-hero h1 {
    margin: 0 0 10px 0;
}
.podcast-seasons .podcast-hero h1::before {
    content: "A history & story podcast · ";
}
.podcast-seasons .podcast-hero h1::after {
    content: " · English edition of Fotomenschen";
    color: var(--pp-faint);
}
.podcast-hero .podcast-strapline {
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 600;
    font-size: clamp(30px, 3.2vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: var(--text-main);
    max-width: 24ch;
    margin: 0 0 14px 0;
}
.podcast-seasons .podcast-hero p:not([class]) {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 15px;
    color: var(--text-muted);
    max-width: 62ch;
}
/* The RSS link as the archive stamp. */
.podcast-subscribe a,
.podcast-subscribe a.is-feed {
    padding: 8px 14px;
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-main);
    background: var(--surface);
    border: 1px dashed var(--text-muted);
    border-radius: 4px;
}
.podcast-subscribe a.is-feed::before {
    content: "Open RSS · ";
    color: var(--pp-faint);
}

/* ===========================================================================
   The tray: an episode on the light table (podcast.stage)
   =========================================================================== */

.episode-stage {
    gap: 0;
    padding: 0;
    background: var(--pp-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--pp-shadow);
    /* clip, not hidden: hidden would make the tray the sticky plate's scroll
       container and push the plate down by its top offset. */
    overflow: clip;
}
.stage-plate {
    top: 80px;
    padding: 26px;
    border-right: 1px solid var(--border);
}
/* The plate, mounted: a mat, and crop marks at the corners. */
.stage-plate .frame-picture {
    position: relative;
    overflow: visible;
    padding: 12px;
    background: var(--pp-mat);
    border: 0;
    box-shadow: 0 0 0 1px var(--border), var(--pp-shadow);
}
.stage-plate .frame-picture::before {
    content: "";
    position: absolute;
    inset: -10px;
    pointer-events: none;
    background:
        linear-gradient(var(--text-muted), var(--text-muted)) top left / 14px 1px no-repeat,
        linear-gradient(var(--text-muted), var(--text-muted)) top left / 1px 14px no-repeat,
        linear-gradient(var(--text-muted), var(--text-muted)) top right / 14px 1px no-repeat,
        linear-gradient(var(--text-muted), var(--text-muted)) top right / 1px 14px no-repeat,
        linear-gradient(var(--text-muted), var(--text-muted)) bottom left / 14px 1px no-repeat,
        linear-gradient(var(--text-muted), var(--text-muted)) bottom left / 1px 14px no-repeat,
        linear-gradient(var(--text-muted), var(--text-muted)) bottom right / 14px 1px no-repeat,
        linear-gradient(var(--text-muted), var(--text-muted)) bottom right / 1px 14px no-repeat;
}
.stage-plate .frame-picture img {
    display: block;
}
.stage-plate .frame-blank {
    padding: 0;
    background: #1A1916;
    border: 12px solid var(--pp-mat);
    box-shadow: 0 0 0 1px var(--border);
}
.stage-plate .frame-blank-year {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 64px;
    color: var(--pp-film-ink);
}
.stage-plate .frame-blank-label {
    padding: 2px 8px;
    border: 1px solid var(--pp-film-rebate);
    color: var(--pp-film-rebate);
    font-size: 11px;
    letter-spacing: 0.16em;
}
.stage-plate .frame-note {
    left: 20px;
    bottom: 20px;
}
/* The exposure ledger: one box per caption. */
.stage-plate dl.episode-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 22px 0 0 0;
    padding: 0;
    border: 0;
    background: none;
}
.stage-plate dl.episode-fields > div {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
}
dl.episode-fields dt {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--pp-faint);
}
dl.episode-fields dd {
    font-family: "Space Mono", monospace;
    font-size: 12px;
    text-transform: uppercase;
}

.stage-dossier {
    padding: 26px 30px;
}
.stage-kicker {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--pp-rebate);
}
.stage-episode::before {
    content: "EP. ";
}
.stage-kicker .tag-badge {
    margin-left: auto;
    padding: 2px 9px;
    font-family: "Space Mono", monospace;
    font-size: 10px;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
}
.stage-dossier h1,
.stage-dossier h2 {
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 600;
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.stage-summary {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 16px;
    padding: 0 0 18px 0;
    border-bottom: 1px solid var(--border);
}
.stage-listen,
.article-content .stage-listen {
    text-decoration: none;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 15px;
    background: var(--pp-marker);
    color: #FFFFFF;
}
.stage-listen::before {
    content: "▶";
    font-size: 12px;
}
.stage-listen .stage-duration::before {
    content: "· ";
}
.stage-lead {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 17px;
    line-height: 1.6;
    margin: 0 0 22px 0;
}
.stage-more {
    font-family: "Space Mono", monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.stage-dossier .article-content {
    font-size: 17px;
}
.stage-dossier .article-content h2 {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pp-faint);
    margin: 30px 0 6px 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.stage-dossier .article-content h2 + p {
    font-style: italic;
    font-size: 15px;
}
.stage-dossier .episode-player {
    margin: 0 0 24px 0;
    background: var(--surface);
    border-color: var(--border);
}
.stage-dossier .episode-player-head {
    display: none;   /* the tray already shows the picture and the title */
}
.stage-dossier .episode-player {
    padding: 16px 20px 12px 20px;
}
.stage-dossier .episode-controls {
    margin-top: 0;
}
.stage-kicker .tag-badge {
    text-decoration: none;
}
.episode-play {
    font-family: "Space Mono", monospace;
    background: var(--pp-marker);
}
/* The sheet above the tray (seasons.position: top). */
.contact-sheet + .episode-stage,
.season-nav + .episode-stage {
    margin-top: 32px;
}
.container > .contact-sheet:first-child,
.podcast-seasons > .contact-sheet:first-child {
    margin-top: 0;
}
/* The show header now closes the front page rather than opening it. */
.podcast-seasons .podcast-hero {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    border-bottom: 0;
}

@media (max-width: 860px) {
    .podcast-seasons .podcast-hero { grid-template-columns: 96px minmax(0, 1fr); column-gap: 18px; }
    .podcast-seasons .podcast-hero > img { width: 96px; height: 96px; }
    .stage-plate { border-right: 0; border-bottom: 1px solid var(--border); }
    .podcast-seasons .podcast-hero > div { grid-template-columns: minmax(0, 1fr); }
    .podcast-seasons .podcast-hero .podcast-subscribe,
    .podcast-seasons .podcast-hero .podcast-button {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        margin-top: 16px;
    }
}

/* ===========================================================================
   The contact sheet
   =========================================================================== */

.contact-sheet {
    margin: 32px 0 0 0;
    padding: 30px 22px;
    background: var(--pp-film);
    color: var(--pp-film-ink);
    border: 1px solid #2D2A24;
    border-radius: 8px;
    box-shadow: var(--pp-shadow);
    /* Perforations along both edges: two repeating stripes, nothing else. */
    background-image:
        repeating-linear-gradient(to right, transparent 0 10px,
            rgba(255, 255, 255, 0.16) 10px 22px, transparent 22px 34px),
        repeating-linear-gradient(to right, transparent 0 10px,
            rgba(255, 255, 255, 0.16) 10px 22px, transparent 22px 34px);
    background-size: 100% 12px, 100% 12px;
    background-position: 0 8px, 0 calc(100% - 8px);
    background-repeat: no-repeat;
}
/* The edge code along the top of the film. */
.sheet-head {
    margin: 0 0 12px 0;
    padding: 0 2px;
    align-items: center;
}
.sheet-head h2,
.article-content .sheet-head h2 a {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pp-film-rebate);
}
.sheet-head h2::before {
    content: "◁ Photopeople 400 · Safety film · ";
    opacity: 0.8;
}
.sheet-stats {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pp-film-muted);
}
.sheet-stats dd {
    color: var(--pp-film-rebate);
    font-weight: 400;
}
.sheet-stats div + div::before {
    content: "·";
    margin-right: 8px;
    opacity: 0.6;
}

.sheet-frames {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.frame {
    padding: 8px;
    background: var(--pp-film-frame);
    border: 1px solid var(--pp-film-line);
    border-radius: 3px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.frame:not(.frame-unexposed):hover {
    transform: translateY(-2px);
    border-color: #575248;
}
/* One frame, laid out as on the prototype's sheet:
     ▷ 01A · EP. 1                  1840 · 2:09
     [ the picture, on its mat               ]
     The title
     The photographer                    [▸ Play]   */
.frame .frame-link,
.article-content .frame .frame-link {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas:
        "num ep . year dur"
        "pic pic pic pic pic"
        "title title title title title"
        "who who who who who";
    gap: 6px 6px;
    align-items: baseline;
    color: var(--pp-film-ink);
}
.frame .frame-fields {
    display: contents;
}
.frame .frame-picture { grid-area: pic; margin: 2px 0 4px 0; }
.frame .frame-number { grid-area: num; }
.frame .frame-episode { grid-area: ep; }
.frame .frame-duration { grid-area: dur; }
.frame .frame-title { grid-area: title; }
.frame [data-field="year"] { grid-area: year; }
.frame [data-field="photographer"] { grid-area: who; padding-right: 58px; }
.frame [data-field="place"],
.frame [data-field="subject"] { display: none; }

.frame-picture {
    background: #050505;
    border: 2px solid var(--pp-film-mat);
    border-radius: 0;
}
.frame-picture img {
    transition: transform 0.4s ease;
}
.frame-link:hover .frame-picture img {
    transform: scale(1.035);
}
.frame-number,
.frame-episode,
.frame-duration,
.frame [data-field="year"] {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--pp-film-rebate);
}
.frame-number::before { content: "▷ "; }
.frame-number::after { content: "A"; }
.frame-episode::before { content: "· EP. "; }
.frame [data-field="year"],
.frame-duration { color: #ABA498; }
.frame-duration::before { content: "· "; }
.frame-title {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.24;
    color: #F4F0E8;
}
.frame-link:hover .frame-title { color: #FFFFFF; }
.frame [data-field="photographer"] {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 11px;
    color: var(--pp-film-muted);
}

/* Not released yet: unexposed film. */
.frame-unexposed {
    background: transparent;
    border-style: dashed;
    border-color: #24221E;
}
.frame-unexposed .frame-picture {
    border: 1px dashed #2F2C27;
    background: #0D0D0C;
}
.frame-unexposed .frame-number {
    display: block;
    margin-top: 6px;
    color: #5A554B;
    opacity: 1;
}

/* Withheld: the paper mat with nothing printed on it. */
.frame-blank {
    background: #1A1916 repeating-linear-gradient(135deg, transparent 0 6px,
        rgba(255, 255, 255, 0.025) 6px 7px);
    border: 2px solid var(--pp-film-mat);
    color: #8C867A;
    font-family: "Space Mono", monospace;
}
.frame-blank-year {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 30px;
    font-weight: 400;
    color: var(--pp-film-ink);
}
.frame-blank-label {
    padding: 1px 6px;
    border: 1px solid var(--pp-film-rebate);
    color: var(--pp-film-rebate);
    font-size: 9px;
    letter-spacing: 0.14em;
}
.frame-note {
    font-family: "Space Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.78);
    color: var(--pp-film-ink);
    border: 1px solid #575248;
    border-radius: 0;
}

/* The grease-pencil mark: the frame of this page, and the one playing.
   photopeople.js adds the prototype's hand-drawn SVG outline to each frame and
   it draws itself in; this ellipse is the fallback when the script does not run. */
.frame:not(:has(.grease-mark)).is-current::before,
.frame:not(:has(.grease-mark)).is-playing::before {
    content: "";
    position: absolute;
    inset: -6px;
    z-index: 2;
    border: 3px solid var(--pp-marker);
    border-radius: 46% 54% 43% 57% / 53% 45% 55% 47%;
    transform: rotate(-1.2deg);
    pointer-events: none;
    animation: pp-circle 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.frame.is-current .frame-picture {
    outline: 0;
}
@keyframes pp-circle {
    from { opacity: 0; transform: rotate(-12deg) scale(1.08); }
    to { opacity: 1; transform: rotate(-1.2deg) scale(1); }
}

/* The drawn outline: a rough rectangle in grease pencil, stroked on over half
   a second (stroke-dashoffset from the full length to 0), the line roughened
   by the SVG noise filter the script adds once per page. */
.grease-mark {
    position: absolute;
    inset: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    z-index: 4;
    pointer-events: none;
    overflow: visible;
}
.grease-mark path {
    fill: none;
    stroke: var(--pp-marker);
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#pp-china-roughen);
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
}
.frame.is-current .grease-mark path,
.frame.is-playing .grease-mark path {
    animation: pp-draw 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes pp-draw {
    from { stroke-dashoffset: 900; }
    to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .frame.is-current .grease-mark path,
    .frame.is-playing .grease-mark path {
        animation: none;
        stroke-dashoffset: 0;
    }
}

/* "▸ Play" on each frame (the persistent player's own control). */
.dock-cue,
.frame .dock-cue {
    top: auto;
    bottom: 8px;
    right: 8px;
    z-index: 3;
    width: auto;
    height: auto;
    gap: 4px;
    padding: 2px 7px;
    font-family: "Space Mono", monospace;
    font-size: 10px;
    color: var(--pp-film-ink);
    background: #1F1E1B;
    border: 1px solid #3A3731;
    border-radius: 3px;
    opacity: 1;
}
.dock-cue svg {
    width: 9px;
    height: 9px;
}
.dock-cue::after {
    content: "Play";
}
.dock-cue[aria-pressed="true"]::after {
    content: "Pause";
}
.dock-cue:hover,
.dock-cue[aria-pressed="true"] {
    color: #FFFFFF;
    background: var(--pp-marker);
    border-color: var(--pp-marker);
}

.season-nav ol {
    font-family: "Space Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 1000px) {
    .sheet-frames { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .sheet-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-sheet { padding: 28px 12px; }
    /* Two frames to a row leave no room for the whole edge print: keep the
       frame code, year and length on one line, and the episode number goes
       (the frame code already says it). */
    .frame .frame-episode { display: none; }
    .frame .frame-link,
    .article-content .frame .frame-link {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        grid-template-areas:
            "num . year dur"
            "pic pic pic pic"
            "title title title title"
            "who who who who";
    }
    .frame-number,
    .frame-duration,
    .frame [data-field="year"] { font-size: 11px; }
    /* On an episode page the season's sheet comes first on wide screens. On a
       phone it is a whole screen of frames to scroll past before the episode
       itself, so there the episode comes first and the sheet follows it. */
    .container:has(> .episode-stage) { display: flex; flex-direction: column; }
    .container:has(> .episode-stage) > .episode-stage { order: 0; }
    .container:has(> .episode-stage) > .contact-sheet { order: 1; margin-top: 28px; }
    .container:has(> .episode-stage) > :not(.episode-stage):not(.contact-sheet) { order: 2; }
}

/* Phones: the header is three rows tall here (brand, menu, subscribe and
   search). Pinned, it would cover a quarter of the screen while reading, so
   it scrolls away with the page instead. */
@media (max-width: 899px) {
    header { position: static; }
}

/* Long web addresses in the link lists break where they must, rather than
   pushing the page sideways on a narrow screen. */
.article-content a { overflow-wrap: anywhere; }

/* ===========================================================================
   Pages that are not episodes (search results land on these, as do tags)
   =========================================================================== */

.container > h1 {
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.015em;
}
.container > .meta {
    font-family: "Space Mono", monospace;
    font-size: 12px;
}

/* ===========================================================================
   The transport deck (persistent player)
   =========================================================================== */

.player-dock {
    padding: 10px 22px;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
}
.dock-art img {
    border: 2px solid var(--pp-mat);
    border-radius: 0;
}
.dock-title {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 15px;
}
.dock-bar button,
.dock-time,
.dock-speed {
    font-family: "Space Mono", monospace;
    font-size: 12px;
}
.dock-bar .dock-play {
    background: var(--pp-marker);
    color: #FFFFFF;
}
.dock-progress .bar {
    background: var(--pp-marker);
}

/* ===========================================================================
   Footer: one line, as on the prototype
   =========================================================================== */

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px 24px;
    font-family: "Space Mono", monospace;
    font-size: 11px;
}
.site-footer .ai-label {
    order: 0;
    margin: 0;
}
.site-footer > nav {
    order: 1;
    margin: 0;
}
.site-footer .ai-explainer {
    order: 2;
    flex-basis: 100%;
    margin: 0;
    color: var(--pp-faint);
}

/* ===========================================================================
   The loupe (photopeople.js)
   =========================================================================== */

.pp-loupe {
    position: absolute;
    z-index: 20;
    width: 180px;
    height: 180px;
    margin: -90px 0 0 -90px;
    border: 2px solid var(--pp-mat);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 12px 30px rgba(0, 0, 0, 0.5);
    background-repeat: no-repeat;
    pointer-events: none;
}
.pp-loupe::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 1px solid rgba(227, 66, 39, 0.8);
    border-radius: 50%;
}
.pp-loupe-host {
    cursor: crosshair;
}
