/* That Bothered Me — site styles.
   Layout system: one --gutter token, one --max content width, and --edge (the padding every
   full-bleed band uses) so every section shares the same left edge at every viewport width.
   Breakpoints: phones < 720px, tablets 720–1023px, desktop >= 1024px. */

:root {
  color-scheme: dark;
  --bg: #070707;
  --bg-elevated: #111111;
  --surface: #171717;
  --surface-hover: #202020;
  --paper: #f2efe8;
  --paper-muted: #d4d0c8;
  --ink: #101010;
  --ink-muted: #3d3b37;
  --ink-quiet: #6b6861;
  --text: #fffdf8;
  --muted: #c8c5be;
  --quiet: #908e88;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.34);
  --paper-line: rgba(16, 16, 16, 0.18);
  --red: #ec3036;
  --red-solid: #d62228;
  --red-ink: #b1151b;
  --red-hi: #ff777b;
  --spotify: #1ed760;
  --focus: #ff4b50;
  --max: 1180px;
  --gutter: max(clamp(1.1rem, 4vw, 3rem), env(safe-area-inset-left), env(safe-area-inset-right));
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2));
  --radius: 12px;
  --radius-large: 18px;
  --header-height: 72px;
  --badge-height: 52px;
  --player-height: 56px;
  --text-xs: 0.75rem;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Keep focused and anchored targets clear of the sticky header (WCAG 2.4.11). */
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Focus rings must stay visible on the paper and red bands (WCAG 1.4.11). */
.episode-section :focus-visible,
.archive-section :focus-visible {
  outline-color: var(--ink);
}

.participation-section :focus-visible {
  outline-color: #fff;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 0.65rem 0.85rem;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem var(--edge);
  background: rgba(7, 7, 7, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  min-height: 44px;
  font-size: clamp(0.98rem, 1.45vw, 1.18rem);
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.brand span {
  overflow-wrap: anywhere;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  margin-left: auto;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 700;
}

.site-nav > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.site-nav > a:hover,
.site-nav > a:focus-visible {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.menu-button {
  display: none;
}

/* Shared type ------------------------------------------------------------- */

.hero__eyebrow,
.section-kicker,
.listen-panel__eyebrow {
  margin: 0;
  color: var(--red);
  font-size: 0.77rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 7.25ch;
  margin-top: 0.85rem;
  font-size: clamp(3.4rem, 7.2vw, 6rem);
  line-height: 0.84;
}

h1 span {
  color: var(--red);
}

h2 {
  max-width: 22ch;
  font-size: clamp(2.1rem, 4.2vw, 3.75rem);
  line-height: 1;
}

.section-heading {
  margin-bottom: clamp(1.35rem, 2.5vw, 2rem);
}

.section-heading--row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.section-kicker {
  margin-bottom: 0.65rem;
}

/* Bands: every full-width section pads to the shared edge. ---------------- */

.section-band,
.about-section,
.participation-section,
.page-hero,
.not-found,
.episode-page,
.site-footer {
  padding-inline: var(--edge);
}

.section-band,
.about-section,
.participation-section {
  padding-block: clamp(2.25rem, 5vw, 4.5rem);
}

.site-footer {
  padding-block: clamp(2.5rem, 4vw, 3.5rem) max(2.5rem, env(safe-area-inset-bottom));
}

/* Hero ---------------------------------------------------------------------- */

.hero {
  display: grid;
  /* The copy column is sized so the two-line headline fills it; the photo takes the rest. */
  grid-template-columns: minmax(0, var(--hero-copy-width)) minmax(420px, 1fr);
  max-height: min(820px, 88svh);
  min-height: 0;
  --hero-copy-width: 35rem;
  /* The copy column starts on the shared edge; the photo bleeds to the right. */
  padding-inline-start: var(--edge);
  border-bottom: 4px solid var(--red);
}

.hero__copy {
  position: relative;
  z-index: 2;
  align-self: center;
  width: 100%;
  container-type: inline-size;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.75rem, 3vw, 2.75rem) clamp(2rem, 4vw, 3.5rem) 0;
}

/* The headline is sized from its column (container units) so "Bothered Me" spans the full
   copy width and the gap to the photo stays constant at every desktop size. */
.hero h1 {
  max-width: none;
}

/* Low specificity so the tablet, landscape, and phone h1 rules below still win. */
:where(.hero) h1 {
  font-size: clamp(3.4rem, 16.6cqi, 6.2rem);
}

.hero__lead {
  max-width: none;
  margin: 1.25rem 0 0;
  color: var(--text);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

.hero__description {
  max-width: none;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  text-wrap: pretty;
}

.hero__actions,
.listen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* The listen button sits centered under the hero copy. */
.hero__actions {
  justify-content: center;
  margin-top: 1.6rem;
  align-items: center;
}

.hero__actions .button-link {
  min-height: 54px;
  padding-inline: 1.6rem;
  font-size: 1rem;
}

.hero__media {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #16110d;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.hero__media picture {
  /* The portrait's intrinsic height must not size the desktop grid row. */
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 45%;
}

/* Listen module: equal Apple and Spotify badges, never upscaled. ------------ */

.platform-badge {
  display: inline-flex;
  height: var(--badge-height);
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #a6a6a6;
  border-radius: 10px;
  background: #000;
  color: #fff;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.platform-badge--apple {
  overflow: hidden;
  padding: 0;
}

.platform-badge--apple > img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.platform-badge--spotify {
  gap: 0.55rem;
  padding: 0 0.9rem 0 0.7rem;
}

.platform-badge:hover,
.platform-badge:focus-visible {
  border-color: #fff;
  background: #101010;
}

.platform-badge--spotify > img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.platform-badge__copy {
  display: grid;
  gap: 0.05rem;
  text-align: left;
}

.platform-badge__copy small {
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1;
}

.platform-badge__copy strong {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.listen-panel {
  width: 100%;
  margin-top: 1.5rem;
  border-radius: var(--radius-large);
  background: var(--ink);
  color: var(--text);
  padding: clamp(1.25rem, 3vw, 1.8rem);
  text-align: center;
}

.listen-panel__eyebrow {
  color: #c9c6be;
}

.player-fallback {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

/* On-page episode player: one big centered Play button that becomes a transport bar. --- */

.episode-player {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 1.1rem;
}

.episode-player__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: var(--player-height);
}

.episode-player.is-active .episode-player__bar {
  justify-content: flex-start;
}

.episode-player__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-width: 0;
  max-width: 100%;
  min-height: var(--player-height);
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--red-solid);
  color: #fff;
  padding: 0 1.8rem;
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.episode-player__toggle:hover,
.episode-player__toggle:focus-visible {
  background: #ef3b41;
}

.episode-player.is-active .episode-player__toggle {
  flex: 0 0 auto;
  width: var(--player-height);
  padding: 0;
}

.episode-player__icon {
  flex: none;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.episode-player__icon--pause,
.episode-player.is-playing .episode-player__icon--play {
  display: none;
}

.episode-player.is-playing .episode-player__icon--pause {
  display: block;
}

/* Once the transport bar is showing, the button is icon-only; its accessible name lives in aria-label. */
.episode-player.is-active .episode-player__label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.episode-player.is-buffering .episode-player__icon {
  animation: player-buffering 1s ease-in-out infinite;
}

@keyframes player-buffering {
  50% {
    opacity: 0.35;
  }
}

.episode-player__timeline {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.episode-player__timeline[hidden] {
  display: none;
}

.episode-player__time {
  flex: none;
  min-width: 3.4ch;
  color: #c9c6be;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.episode-player__scrubber {
  --progress: 0%;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 32px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.episode-player__scrubber::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--red) var(--progress), rgba(255, 255, 255, 0.24) var(--progress));
}

.episode-player__scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.episode-player__scrubber::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.episode-player__scrubber::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--red);
}

.episode-player__scrubber::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.episode-player__scrubber:focus-visible {
  outline-offset: 0;
}

.episode-player__status,
.episode-player__noscript {
  margin: 0;
  color: #c9c6be;
  font-size: 0.82rem;
  line-height: 1.45;
}

/* The live region only takes space when there is something to say. */
.episode-player__status:empty {
  display: none;
}

.episode-player.is-failed .episode-player__status {
  color: #ffb3b5;
}

/* Latest episode (paper band) --------------------------------------------- */

.episode-section {
  border-bottom: 1px solid var(--paper-line);
  background: var(--paper);
  color: var(--ink);
}

.episode-section .section-kicker {
  color: var(--red-ink);
}

.episode-section > .section-heading,
.episode-layout {
  width: min(100%, 900px);
}

.episode-copy > p,
.about-grid > p {
  margin: 0;
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.episode-copy > p {
  max-width: 48rem;
  color: var(--ink-muted);
}

.fact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 1.35rem 0 0;
  padding: 0;
  border-top: 1px solid var(--paper-line);
  list-style: none;
}

.fact-list li {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  border-left: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
  padding: 0.85rem 1rem;
}

.fact-list li:first-child {
  border-left: 0;
  padding-left: 0;
}

.fact-list li:last-child {
  padding-right: 0;
}

.fact-list span {
  color: var(--ink-quiet);
  font-size: var(--text-xs);
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-list strong {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  font-weight: 760;
}

.episode-detail-link {
  margin-top: 1.25rem !important;
}

/* Links and buttons ---------------------------------------------------------- */

.text-link,
.footer-links a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 720;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.text-link.text-link--dark,
.archive-card .text-link {
  color: var(--ink);
  text-decoration-color: var(--red-ink);
}

.text-link,
.footer-links a,
.episode-card__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.button-link {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: fit-content;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--red-solid);
  color: #fff;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 820;
  cursor: pointer;
}

.button-link:hover,
.button-link:focus-visible {
  background: #ef3b41;
}

/* Recent episodes ------------------------------------------------------------ */

.episode-preview {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.episode-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.episode-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  min-width: 0;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--bg-elevated);
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
}

.episode-card__number,
.episode-card > p,
.episode-card__meta {
  margin: 0;
}

.episode-card__number {
  color: var(--red);
  font-size: var(--text-xs);
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.episode-card h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.7vw, 2.15rem);
  letter-spacing: -0.045em;
  line-height: 1;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.episode-card > p,
.start-here p,
.archive-card__body > p,
.instagram-card__copy > p {
  overflow-wrap: anywhere;
}

.episode-card h3 a:hover,
.episode-card h3 a:focus-visible {
  color: var(--red-hi);
}

.episode-card > p:not(.episode-card__number) {
  color: var(--muted);
}

.episode-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 700;
}

.episode-card__link {
  width: fit-content;
  margin-top: auto;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.episode-card-grid__empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.start-here {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  margin: 1rem 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem) 0;
}

.start-here h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3.5vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.start-here > div > p:last-child {
  max-width: 54rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  text-wrap: pretty;
}

.start-here__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 1rem;
}

/* About ----------------------------------------------------------------------- */

.about-section {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
  gap: clamp(1.75rem, 4vw, 4rem);
  align-items: start;
}

.about-grid > p {
  max-width: 48rem;
  color: var(--muted);
}

.host-lines {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.host-lines li {
  min-width: 0;
}

.host-lines a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elevated);
  padding: 0.7rem 0.85rem;
  font-size: 0.93rem;
  font-weight: 750;
}

.host-lines a::after {
  content: "↗";
  color: var(--red);
}

.host-lines a:hover,
.host-lines a:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface);
}

.host-lines a span {
  display: grid;
  gap: 0.1rem;
}

.host-lines small {
  color: var(--quiet);
  font-size: var(--text-xs);
  font-weight: 700;
}

.host-bios {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.host-bios article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 1rem;
}

.host-bios h3,
.host-bios p {
  margin: 0;
}

.host-bios p {
  margin-top: 0.5rem;
  color: var(--muted);
}

/* Participation (red band) ------------------------------------------------------ */

.participation-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--red-solid);
  color: #fff;
}

.participation-section .section-kicker {
  color: #fff;
}

.participation-section h2 {
  max-width: 22ch;
}

.participation-section p:last-child {
  max-width: 42rem;
  margin: 1rem 0 0;
  font-size: 1.05rem;
  text-wrap: pretty;
}

.participation-section .button-link {
  background: var(--bg);
  color: var(--text);
}

.participation-section .button-link:hover,
.participation-section .button-link:focus-visible {
  background: var(--surface-hover);
}

/* Instagram ------------------------------------------------------------------- */

.instagram-section {
  border-bottom: 1px solid var(--line);
  background: #0b0b0b;
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.instagram-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--bg-elevated);
  transition: border-color 160ms ease;
}

.instagram-card:hover,
.instagram-card:focus-within {
  border-color: var(--line-strong);
}

/* The title link stretches over the whole card: one tab stop, one tap target. */
.instagram-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

@supports selector(:has(a)) {
  .instagram-card__link:focus-visible {
    outline: none;
  }

  .instagram-card:has(.instagram-card__link:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }
}

.instagram-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #000;
}

/* A blurred copy fills the frame so any cover ratio (trimmed reel, portrait, square)
   looks intentional instead of letterboxed. */
.instagram-card__backdrop {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(22px) brightness(0.55) saturate(1.1);
}

.instagram-card__image {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 180ms ease;
}

.instagram-card__type {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.82);
  color: #fff;
  padding: 0.4rem 0.65rem;
  font-size: var(--text-xs);
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.instagram-card__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
}

.instagram-card__meta {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  color: var(--quiet);
  font-size: var(--text-xs);
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.instagram-card__meta span {
  color: var(--red);
}

.instagram-card__copy h3 {
  margin: 0.7rem 0 0;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}

.instagram-card:hover h3,
.instagram-card:focus-within h3 {
  color: var(--red-hi);
}

.instagram-card__copy > p:not(.instagram-card__meta) {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.instagram-card__cta {
  margin-top: auto !important;
  padding-top: 1rem;
  color: var(--text) !important;
  font-size: 0.88rem !important;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.instagram-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
}

.instagram-empty p {
  margin: 0;
  color: var(--muted);
}

/* Footer ------------------------------------------------------------------------- */

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 0.75fr);
  gap: 1.5rem 2.5rem;
  align-items: center;
  background: var(--bg);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  font-size: 1rem;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.footer-brand span {
  overflow-wrap: anywhere;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.footer-meta {
  display: grid;
  gap: 0.45rem;
}

.footer-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.footer-meta .trademark {
  color: var(--quiet);
  font-size: var(--text-xs);
  line-height: 1.4;
}

/* Archive, episode pages, 404, privacy ------------------------------------------- */

.page-hero,
.not-found {
  padding-block: clamp(2rem, 4vw, 3.5rem);
}

.page-hero h1,
.not-found h1,
.episode-page h1 {
  max-width: 22ch;
  margin-top: 0.75rem;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1;
}

.page-hero > p:last-child,
.not-found > p {
  max-width: 42rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  text-wrap: pretty;
}

.not-found {
  display: grid;
  align-content: center;
  min-height: 60vh;
  min-height: 60svh;
}

.not-found .button-link {
  margin-top: 1.5rem;
}

.archive-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.archive-list {
  display: grid;
  gap: 1rem;
}

.archive-card {
  display: grid;
  grid-template-columns: clamp(56px, 8vw, 100px) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-large);
  background: #fffdf8;
  padding: clamp(1rem, 3vw, 2rem);
}

.archive-card__number {
  color: var(--red-ink);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.85;
}

.archive-card h2 {
  max-width: 22ch;
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 0.98;
}

.archive-card h2 a:hover,
.archive-card h2 a:focus-visible {
  color: var(--red-ink);
}

.archive-card__body > p:not(.section-kicker) {
  max-width: 50rem;
  margin: 1rem 0 0;
  color: #4b4842;
  text-wrap: pretty;
}

.archive-card__meta,
.archive-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
}

.archive-card__meta {
  margin-top: 1rem;
  color: #69665f;
  font-size: 0.8rem;
  font-weight: 760;
}

.archive-card__actions {
  margin-top: 1.2rem;
}

/* The two listening links wrap together as a pair under the details button. */
.archive-card__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
}

.archive-card .text-link {
  color: var(--ink);
}

.episode-page {
  width: 100%;
  padding-block: clamp(1rem, 2vw, 1.5rem) clamp(2rem, 4vw, 3rem);
}

.episode-page > * {
  max-width: 980px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  color: var(--quiet);
  font-size: 0.82rem;
  font-weight: 700;
  align-items: center;
}

.breadcrumbs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  padding-inline: 0.2rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.episode-page__header {
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  border-bottom: 1px solid var(--line);
}

.episode-page__summary {
  max-width: 48rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.65;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.episode-page__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  margin-top: 1.2rem;
  color: var(--quiet);
  font-size: 0.84rem;
  font-weight: 760;
}

.episode-page__content {
  display: grid;
  gap: 2rem;
  padding: 2rem 0;
}

.episode-page__content:empty {
  display: none;
}

.episode-page__primary-listen {
  max-width: 760px;
  margin-top: 1.5rem;
}

.episode-page__primary-listen > .listen-panel__eyebrow {
  color: var(--red);
}

.episode-page__primary-listen .listen-panel {
  margin-top: 0.6rem;
}

.episode-page__content section > h2 {
  max-width: none;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.98;
}

.episode-page__content section > p,
.transcript p {
  max-width: 50rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.listen-panel--episode {
  max-width: 760px;
}

.show-notes {
  display: grid;
  gap: 0.65rem;
  max-width: 48rem;
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.episode-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.episode-pagination a {
  display: grid;
  gap: 0.3rem;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 1rem;
}

.episode-pagination a:last-child {
  text-align: right;
}

.episode-pagination a:hover,
.episode-pagination a:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface);
}

.episode-pagination span {
  color: var(--quiet);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.episode-pagination strong {
  overflow-wrap: anywhere;
  font-size: 0.93rem;
}

.submission-section {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.submission-form {
  display: grid;
  gap: 0.85rem;
  width: min(100%, 720px);
}

.submission-form label {
  font-weight: 800;
}

.submission-form textarea {
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0.85rem;
  font: inherit;
}

/* Hover effects only where a real pointer exists (no stuck states on iOS). ------- */

@media (hover: hover) and (pointer: fine) {
  .platform-badge:hover {
    transform: translateY(-2px);
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
  }

  .instagram-card:hover .instagram-card__image {
    transform: scale(1.03);
  }
}

/* Tablet: 720–1023px ---------------------------------------------------------------- */

@media (max-width: 1023px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .hero__media {
    min-height: 420px;
  }

  .hero__copy {
    padding-right: clamp(1.25rem, 3vw, 2rem);
  }

  h1 {
    font-size: clamp(3.2rem, 7.5vw, 4.6rem);
  }

  .hero h1 {
    font-size: clamp(3.2rem, 16.2cqi, 4.6rem);
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-meta {
    grid-column: 1 / -1;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .host-lines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phone landscape: keep headline and listen button on the first screen. ------------- */

@media (max-width: 1023px) and (max-height: 520px) and (orientation: landscape) {
  .site-header {
    position: static;
  }

  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    max-height: none;
    padding-inline-start: var(--edge);
  }

  .hero__media {
    order: 0;
    min-height: 0;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
  }

  .hero__copy {
    padding: 1.25rem clamp(1rem, 3vw, 2rem) 1.25rem 0;
  }

  h1 {
    font-size: clamp(2.4rem, 9vh, 3.4rem);
  }

  .hero__lead {
    margin-top: 0.75rem;
    font-size: 1.05rem;
  }

  .hero__description {
    display: none;
  }
}

/* Phones: < 720px -------------------------------------------------------------------- */

@media (max-width: 719px) {
  :root {
    --header-height: 64px;
  }

  .site-header {
    flex-wrap: wrap;
    padding-block: 0.45rem;
  }

  .no-js .site-header {
    position: static;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand span {
    max-width: calc(100vw - 7.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-nav {
    display: grid;
    flex: 1 0 100%;
    gap: 0;
    width: 100%;
    margin-left: 0;
  }

  .site-nav > a {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    padding: 0.65rem 0.25rem;
  }

  .site-nav > a:last-child {
    border-bottom: 0;
  }

  /* Collapsed navigation. Applied from the first paint wherever the browser can run
     scripts (no flash of the expanded menu), and after main.js adds .js elsewhere. */
  .js .menu-button {
    display: inline-grid;
  }

  .js .site-nav {
    position: absolute;
    top: 100%;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    z-index: 70;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0 0 14px 14px;
    background: #0d0d0d;
    padding: 0.45rem 0.75rem 0.75rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.4rem);
    visibility: hidden;
    transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
  }

  .js .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
  }

  @media (scripting: enabled) {
    .menu-button {
      display: inline-grid;
    }

    .site-nav {
      position: absolute;
      top: 100%;
      right: 0.75rem;
      left: 0.75rem;
      width: auto;
      z-index: 70;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 0 0 14px 14px;
      background: #0d0d0d;
      padding: 0.45rem 0.75rem 0.75rem;
      opacity: 0;
      pointer-events: none;
      transform: translateY(-0.4rem);
      visibility: hidden;
      transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
    }

    .site-nav.is-open {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
      visibility: visible;
      transition-delay: 0s;
    }
  }

  .menu-button {
    place-content: center;
    align-content: center;
    gap: 4px;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--text);
    touch-action: manipulation;
  }

  .menu-button__line {
    width: 20px;
    height: 2px;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .menu-button[aria-expanded="true"] .menu-button__line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] .menu-button__line:nth-child(2) {
    opacity: 0;
  }

  .menu-button[aria-expanded="true"] .menu-button__line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .hero__media {
    order: -1;
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
    max-height: min(46svh, 400px);
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .hero__media img {
    object-position: 50% 40%;
  }

  .hero {
    padding-inline-start: 0;
  }

  .hero__copy {
    padding: 1.5rem var(--edge) 1.75rem;
  }

  h1 {
    max-width: 7ch;
    font-size: clamp(3.25rem, 15.5vw, 5rem);
    line-height: 0.84;
  }

  .hero__lead {
    max-width: 18rem;
    margin-top: 1.1rem;
  }

  .hero__description {
    max-width: 23rem;
  }

  .hero__actions {
    gap: 0.55rem;
    margin-top: 1.35rem;
  }

  .listen-actions {
    gap: 0.55rem;
  }

  .section-heading--row {
    display: grid;
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: clamp(2rem, 8.5vw, 3rem);
  }

  .episode-card-grid,
  .host-bios {
    grid-template-columns: 1fr;
  }

  .start-here {
    grid-template-columns: 1fr;
  }

  .start-here__actions {
    justify-content: flex-start;
  }

  .about-grid {
    gap: 1.7rem;
  }

  .participation-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .episode-player__toggle {
    width: 100%;
    max-width: 24rem;
  }

  /* Instagram becomes a swipeable rail with the next card peeking in. */
  .instagram-grid {
    display: flex;
    gap: 0.85rem;
    margin-inline: calc(-1 * var(--edge));
    padding-inline: var(--edge);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--edge);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .instagram-grid::-webkit-scrollbar {
    display: none;
  }

  .instagram-card {
    flex: 0 0 min(82%, 360px);
    scroll-snap-align: start;
  }

  .instagram-card:last-child {
    margin-right: var(--edge);
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    grid-column: auto;
  }

  .page-hero,
  .not-found {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .archive-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }
}

@media (max-width: 540px) {
  .archive-card {
    grid-template-columns: 1fr;
  }

  .archive-card__number {
    font-size: 2.7rem;
  }

  .episode-pagination {
    grid-template-columns: 1fr;
  }

  .episode-pagination > span {
    display: none;
  }

  .episode-pagination a:last-child {
    text-align: left;
  }
}

@media (max-width: 479px) {
  .brand {
    font-size: 0.92rem;
  }

  .listen-panel {
    border-radius: 14px;
    padding: 1rem;
  }

  .host-lines {
    grid-template-columns: 1fr;
  }

  .fact-list {
    grid-template-columns: 1fr;
  }

  .fact-list li {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 1rem;
    border-left: 0;
    padding: 0.7rem 0;
  }

  .fact-list strong {
    text-align: right;
  }
}

/* Reduced motion ------------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }

  .platform-badge:hover,
  .platform-badge:focus-visible,
  .instagram-card:hover .instagram-card__image,
  .instagram-card:focus-within .instagram-card__image {
    transform: none;
  }
}
