/* This Day, But … — flat colour, thick ink outlines, hard shadows: the language of the cartoon covers. */

:root {
  --ink: #1C1B22;
  --paper: #F3F4EF;
  --card: #FFFFFF;
  --muted: #5A5A63;
  --outline: 2.5px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 14px;

  /* Stranger */
  --s-night: #1E3557;
  --s-teal: #2A9D8F;
  --s-warm: #F2A541;
  /* Better */
  --b-gold: #F4B942;
  --b-coral: #EF7B5F;
  --b-mint: #8FD1C6;
  /* Wrong */
  --w-tomato: #D63E29;
  --w-mustard: #E9B526;

  --font-display: "Bricolage Grotesque", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Literata", Georgia, serif;

  /* type scale (1.25) */
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-md: 1.3rem;
  --t-lg: 1.65rem;
  --t-xl: 2.4rem;
  --t-xxl: clamp(2.4rem, 5vw, 3.6rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.6;
}
body.has-player { padding-bottom: 96px; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--s-teal); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--t-xxl); font-weight: 800; }
h2 { font-size: var(--t-lg); font-weight: 750; }
h3 { font-size: var(--t-md); font-weight: 700; }
p { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.measure { max-width: 66ch; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─── Header / footer ───────────────────────────────────────────────────────── */
header.site { border-bottom: var(--outline); background: var(--card); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; text-decoration: none; }
nav { display: flex; gap: 6px; flex-wrap: wrap; }
nav a {
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 2px solid transparent;
}
nav a:hover { border-color: var(--ink); }
nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

footer.site { border-top: var(--outline); margin-top: 96px; background: var(--card); }
.footer-inner { padding-top: 32px; padding-bottom: 40px; display: grid; gap: 10px; color: var(--muted); font-size: var(--t-sm); }
.footer-inner .feeds a { margin-right: 14px; color: var(--ink); }

/* ─── Home: the calendar leaf ───────────────────────────────────────────────── */
.home-hero { padding: 56px 0 40px; }
.home-hero .wrap { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; }
.leaf {
  width: 220px; background: var(--card); border: var(--outline); border-radius: var(--radius);
  box-shadow: var(--shadow); text-align: center; overflow: hidden; position: relative;
  transform: rotate(-2deg);
}
.leaf-top { background: var(--w-tomato); color: #fff; border-bottom: var(--outline); padding: 22px 12px 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; position: relative; }
.leaf-top::before, .leaf-top::after {
  content: ""; position: absolute; top: 8px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--ink);
}
.leaf-top::before { left: 44px; } .leaf-top::after { right: 44px; }
.leaf-day { font-family: var(--font-display); font-weight: 800; font-size: 7.5rem; line-height: 1; padding: 14px 0 0; letter-spacing: -0.04em; }
.leaf-weekday { font-family: var(--font-display); font-weight: 600; padding: 4px 0 16px; color: var(--muted); }
.home-hero h1 { max-width: 15ch; }
.home-hero .lede { margin-top: 18px; max-width: 52ch; font-size: 1.12rem; }

/* ─── Today's three ─────────────────────────────────────────────────────────── */
.today { padding: 8px 0 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head p { color: var(--muted); }
.today-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.take { background: var(--card); border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.take-band { padding: 12px 16px; border-bottom: var(--outline); font-family: var(--font-display); font-weight: 750; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; text-decoration: none; }
.take[data-show="tdbs"] .take-band { background: var(--s-night); color: #fff; }
.take[data-show="tdbb"] .take-band { background: var(--b-gold); color: var(--ink); }
.take[data-show="tdbw"] .take-band { background: var(--w-tomato); color: #fff; }
.take .cover { border-bottom: var(--outline); aspect-ratio: 1; width: 100%; object-fit: cover; }
.take-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.take-body h3 a { text-decoration: none; }
.take-body h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.take-body .ep-summary { font-size: 0.97rem; }
.take-body .ep-meta { margin-top: auto; }
.take-empty { padding: 22px 18px; color: var(--muted); }

/* ─── Show strips on home ───────────────────────────────────────────────────── */
.shows { padding-top: 56px; display: grid; gap: 28px; }
.strip { display: grid; grid-template-columns: 300px 1fr; border: var(--outline); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.strip-id { padding: 26px 24px; border-right: var(--outline); display: flex; flex-direction: column; gap: 12px; }
.strip[data-show="tdbs"] .strip-id { background: var(--s-night); color: #fff; }
.strip[data-show="tdbb"] .strip-id { background: var(--b-gold); }
.strip[data-show="tdbw"] .strip-id { background: var(--w-tomato); color: #fff; }
.strip-id .tagline { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.strip-list { padding: 8px 24px; }
.strip-list .ep-row { grid-template-columns: 72px 1fr; }
.strip-list .ep-row + .ep-row { border-top: 2px dashed #CFCFC8; }
.strip-more { display: inline-block; margin: 6px 0 18px; font-family: var(--font-display); font-weight: 700; }

/* ─── Buttons, chips ────────────────────────────────────────────────────────── */
.btn, button.play {
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--card); color: var(--ink); border: var(--outline); border-radius: 999px;
  padding: 6px 14px 6px 10px; box-shadow: var(--shadow-sm); text-decoration: none;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
button.play svg { width: 16px; height: 16px; fill: currentColor; }
.btn:active, button.play:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
[data-show="tdbs"] button.play { background: var(--s-teal); color: #fff; }
[data-show="tdbb"] button.play { background: var(--b-coral); }
[data-show="tdbw"] button.play { background: var(--w-mustard); }
.btn.big { font-size: 1.1rem; padding: 10px 22px 10px 16px; }
.btn.big svg { width: 20px; height: 20px; fill: currentColor; }

.chip { display: inline-block; font-family: var(--font-display); font-weight: 650; font-size: 0.85rem; padding: 3px 11px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); }
.chip-uto { background: #FFE6A8; }
.chip-dys { background: #C9D3E6; }
.chip-person { background: #FDDCD2; }
.chip-mistake { background: #FBE7A6; }

.ep-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dur { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.ep-date { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.ep-summary { color: #33323A; }

/* ─── Covers ────────────────────────────────────────────────────────────────── */
.cover { background: var(--paper); }
img.cover { height: auto; }
.cover-blank { display: grid; place-items: center; aspect-ratio: 1; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; }
.cover-blank[data-show="tdbs"] { background: radial-gradient(circle at 70% 30%, var(--s-warm) 0 12%, transparent 13%), var(--s-night); color: var(--s-teal); }
.cover-blank[data-show="tdbb"] { background: radial-gradient(circle at 30% 70%, var(--b-coral) 0 18%, transparent 19%), var(--b-gold); color: var(--ink); }
.cover-blank[data-show="tdbw"] { background: radial-gradient(circle at 65% 65%, var(--w-mustard) 0 16%, transparent 17%), var(--w-tomato); color: #fff; }
.cover.small { width: 100%; aspect-ratio: 1; object-fit: cover; border: var(--outline); border-radius: 10px; font-size: 0.75rem; }

/* ─── Episode rows (lists) ──────────────────────────────────────────────────── */
.ep-row { display: grid; grid-template-columns: 112px 1fr; gap: 20px; padding: 20px 0; align-items: start; }
.ep-row h3 a { text-decoration: none; }
.ep-row h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.ep-row-body { display: grid; gap: 8px; }
.ep-row-cover { display: block; }

/* ─── Show page ─────────────────────────────────────────────────────────────── */
/* Banner art sits on the right; the show colour fades over it from the left so the
   text always reads on solid colour. If an image is missing, the plain colour shows. */
.show-hero { border-bottom: var(--outline); padding: 64px 0 56px; min-height: 360px; display: flex; align-items: center; }
.show-hero > .wrap { width: 100%; }
.show-hero .desc, .show-hero .tagline, .show-hero h1 { max-width: 34rem; }
.show-hero[data-show="tdbs"] {
  color: #fff;
  background:
    linear-gradient(90deg, #1E3557 0%, #1E3557 42%, rgb(30 53 87 / 0.85) 54%, rgb(30 53 87 / 0.35) 70%, rgb(30 53 87 / 0) 86%),
    url(../img/banner-tdbs.jpg) right center / cover no-repeat,
    var(--s-night);
}
.show-hero[data-show="tdbb"] {
  background:
    linear-gradient(90deg, #F4B942 0%, #F4B942 42%, rgb(244 185 66 / 0.85) 54%, rgb(244 185 66 / 0.35) 70%, rgb(244 185 66 / 0) 86%),
    url(../img/banner-tdbb.jpg) right center / cover no-repeat,
    var(--b-gold);
}
.show-hero[data-show="tdbw"] {
  color: #fff;
  background:
    linear-gradient(90deg, #D63E29 0%, #D63E29 42%, rgb(214 62 41 / 0.85) 54%, rgb(214 62 41 / 0.35) 70%, rgb(214 62 41 / 0) 86%),
    url(../img/banner-tdbw.jpg) right center / cover no-repeat,
    var(--w-tomato);
}
.show-hero .tagline { font-family: var(--font-display); font-weight: 650; font-size: var(--t-md); margin-top: 12px; }
.show-hero .desc { margin-top: 16px; max-width: 60ch; font-size: 1.08rem; }
.hosts { margin-top: 14px; font-size: 0.95rem; opacity: 0.9; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 28px 0 4px; }
.filters .label { font-family: var(--font-display); font-weight: 650; margin-right: 6px; }
.filters button { font-family: var(--font-display); font-weight: 650; font-size: 0.9rem; border: 2px solid var(--ink); background: var(--card); border-radius: 999px; padding: 4px 13px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ep-list .ep-row + .ep-row, .siblings .ep-row + .ep-row, .day-group .ep-row + .ep-row { border-top: 2px dashed #CFCFC8; }
.empty { border: 2.5px dashed var(--ink); border-radius: var(--radius); padding: 28px; margin-top: 28px; background: var(--card); }
.empty h2 { font-size: var(--t-md); margin-bottom: 6px; }

/* ─── Episode page ──────────────────────────────────────────────────────────── */
.episode { padding: 48px 0 0; display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 48px; align-items: start; }
.episode .cover-wrap .cover { border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 1; object-fit: cover; }
.episode .crumb { font-family: var(--font-display); font-weight: 700; text-decoration: none; display: inline-block; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px; margin-bottom: 18px; }
.episode[data-show="tdbs"] .crumb { background: var(--s-night); color: #fff; }
.episode[data-show="tdbb"] .crumb { background: var(--b-gold); }
.episode[data-show="tdbw"] .crumb { background: var(--w-tomato); color: #fff; }
.episode h1 { font-size: clamp(2rem, 4vw, 3rem); }
.episode .when { font-family: var(--font-display); font-weight: 600; color: var(--muted); margin-top: 14px; }
.episode .summary { font-size: 1.14rem; margin-top: 20px; max-width: 58ch; }
.facts { margin: 22px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 0.98rem; }
.facts dt { font-family: var(--font-display); font-weight: 700; }
.facts dd { margin: 0; }
.listen { margin-top: 26px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.siblings { margin-top: 64px; }
.siblings h2 { margin-bottom: 8px; }
.siblings > p { color: var(--muted); margin-bottom: 8px; }

/* ─── On this day ───────────────────────────────────────────────────────────── */
.day-hero { padding: 48px 0 8px; }
.day-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 20px; font-family: var(--font-display); font-weight: 600; }
.day-pick select { font: inherit; padding: 6px 10px; border: var(--outline); border-radius: 10px; background: var(--card); }
.day-group { margin-top: 36px; }
.day-group h2 { display: flex; gap: 12px; align-items: center; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--ink); display: inline-block; }
.dot[data-show="tdbs"] { background: var(--s-night); }
.dot[data-show="tdbb"] { background: var(--b-gold); }
.dot[data-show="tdbw"] { background: var(--w-tomato); }

/* ─── About ─────────────────────────────────────────────────────────────────── */
.about { padding: 48px 0 0; }
.about h2 { margin: 44px 0 12px; }
.about p + p { margin-top: 14px; }
.hosts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
.host-card { background: var(--card); border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.host-card h3 { margin-bottom: 8px; }
.host-portrait { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: var(--outline); border-radius: 10px; margin-bottom: 16px; background: var(--paper); }

/* ─── Sticky player ─────────────────────────────────────────────────────────── */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--card); border-top: var(--outline); }
.player[hidden] { display: none; }
.player-inner { max-width: 1120px; margin: 0 auto; padding: 12px 24px; display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(220px, 420px) auto; gap: 16px; align-items: center; }
.player-cover { border: 2px solid var(--ink); border-radius: 8px; width: 56px; height: 56px; object-fit: cover; }
.player-text { display: grid; min-width: 0; }
.player-show { font-family: var(--font-display); font-weight: 600; font-size: 0.82rem; color: var(--muted); }
.player-title { font-family: var(--font-display); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.player audio { width: 100%; }
.player-close { background: none; border: 2px solid var(--ink); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.player-close svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 2.5; fill: none; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Narrow screens: the art sits behind the text, so tint it heavily all over */
  .show-hero { min-height: 0; }
  .show-hero[data-show="tdbs"] { background: linear-gradient(rgb(30 53 87 / 0.86), rgb(30 53 87 / 0.86)), url(../img/banner-tdbs.jpg) right center / cover no-repeat, var(--s-night); }
  .show-hero[data-show="tdbb"] { background: linear-gradient(rgb(244 185 66 / 0.86), rgb(244 185 66 / 0.86)), url(../img/banner-tdbb.jpg) right center / cover no-repeat, var(--b-gold); }
  .show-hero[data-show="tdbw"] { background: linear-gradient(rgb(214 62 41 / 0.88), rgb(214 62 41 / 0.88)), url(../img/banner-tdbw.jpg) right center / cover no-repeat, var(--w-tomato); }
  .today-grid { grid-template-columns: 1fr; max-width: 480px; }
  .strip { grid-template-columns: 1fr; }
  .strip-id { border-right: none; border-bottom: var(--outline); }
  .episode { grid-template-columns: 1fr; gap: 28px; }
  .episode .cover-wrap { max-width: 420px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .home-hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .leaf { width: 180px; }
  .leaf-day { font-size: 6rem; }
  .ep-row { grid-template-columns: 72px 1fr; gap: 14px; }
  .hosts-grid { grid-template-columns: 1fr; }
  .player-inner { grid-template-columns: 44px minmax(0, 1fr) auto; padding: 10px 16px; }
  .player-cover { width: 44px; height: 44px; }
  .player audio { grid-column: 1 / -1; grid-row: 2; }
  body.has-player { padding-bottom: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .leaf { transform: none; }
}
