/* Which Side Podcast archive */
:root {
  --bg: #0f0f10;
  --surface: #17171a;
  --line: #2a2a2e;
  --text: #ece8e1;
  --muted: #9b968e;
  --brand: #be1e2d;   /* the logo's red: logo, fills, borders */
  --red: #e8424f;     /* same hue, bright enough for small text on black */
  --red-dim: #7d1520;
  --display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --serif: 'Source Serif 4', Georgia, serif;
  --wrap: 960px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 18px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.wordmark { text-decoration: none; display: flex; align-items: center; gap: 12px; line-height: 1; }
.wordmark img { height: 28px; width: auto; display: block; }
.w-pod { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.site-nav { display: flex; gap: 24px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.site-nav a { text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); border-color: var(--red); }

/* shared type */
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 1.05; letter-spacing: .01em; margin: 0; }
.muted { color: var(--muted); }

/* hero */
.hero { padding: 88px 0 64px; border-bottom: 1px solid var(--line);
  background: radial-gradient(1200px 300px at 85% -40%, rgba(224,50,42,.16), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1fr minmax(220px, 340px); gap: 48px; align-items: center; }
.hero-logo { width: 100%; height: auto; }
.hero-title { font-size: clamp(44px, 6vw, 72px); max-width: 14ch; }
.hero-sub { color: var(--muted); max-width: 46ch; margin: 22px 0 0; font-size: 19px; }
.stats { display: flex; gap: 48px; margin: 44px 0 0; }
.stats div { border-left: 2px solid var(--brand); padding-left: 14px; }
.stats dt { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-family: var(--display); font-size: 40px; font-weight: 500; line-height: 1; }

/* archive */
.archive { padding-top: 56px; padding-bottom: 96px; }
.archive-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: end; justify-content: space-between; }
.archive-head h2 { font-size: 32px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search input {
  width: 240px; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font: 15px var(--mono); padding: 10px 12px; border-radius: 2px;
}
.search input::placeholder { color: #6f6a63; }
.filters { display: flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.filters button, .sort {
  background: transparent; color: var(--muted); border: 0; font: 12px var(--mono); text-transform: uppercase;
  letter-spacing: .08em; padding: 11px 12px; cursor: pointer;
}
.filters button + button { border-left: 1px solid var(--line); }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.sort { border: 1px solid var(--line); border-radius: 2px; }
.filters button:hover:not([aria-pressed="true"]), .sort:hover { color: var(--text); }
.count { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 26px 0 8px; letter-spacing: .06em; }
.empty { color: var(--muted); padding: 40px 0; }

.ep-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ep { border-bottom: 1px solid var(--line); }
.ep a { display: grid; grid-template-columns: 64px 176px 1fr 28px; gap: 22px; align-items: start; padding: 22px 4px; text-decoration: none; transition: background .15s; }
.ep a:hover { background: var(--surface); }
.ep-num { font-family: var(--mono); font-size: 22px; color: var(--muted); padding-top: 2px; letter-spacing: .02em; }
.ep a:hover .ep-num { color: var(--red); }
.ep-thumb { display: block; aspect-ratio: 16 / 9; background: var(--surface); overflow: hidden; margin-top: 3px; }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35) contrast(1.05); opacity: .85; transition: filter .2s, opacity .2s; }
.ep a:hover .ep-thumb img { filter: none; opacity: 1; }
.ep-body { display: block; min-width: 0; }
.ep-label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ep-title { display: block; font-family: var(--display); font-weight: 500; text-transform: uppercase; font-size: 23px; line-height: 1.15; margin: 4px 0 6px; letter-spacing: .01em; }
.ep-excerpt { display: block; color: var(--muted); font-size: 16px; line-height: 1.5; }
.ep-arrow { color: var(--line); font-size: 20px; padding-top: 18px; transition: color .15s, transform .15s; }
.ep a:hover .ep-arrow { color: var(--red); transform: translateX(3px); }

/* episode page */
.episode, .about { padding-top: 40px; padding-bottom: 96px; max-width: 820px; }
.crumb { font-family: var(--mono); font-size: 13px; margin: 0 0 40px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--text); }
.ep-head h1 { font-size: clamp(36px, 6vw, 60px); }
.aired { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 16px 0 0; }
.player { margin: 36px 0 0; aspect-ratio: 16 / 9; background: #000; position: relative; overflow: hidden; }
.player-btn { all: unset; cursor: pointer; position: absolute; inset: 0; display: block; }
.player-btn img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.player-btn:hover img, .player-btn:focus-visible img { opacity: 1; }
.player-btn:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: transform .2s; }
.play svg { margin-left: 4px; }
.player-btn:hover .play { transform: scale(1.06); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-link { font-family: var(--mono); font-size: 12px; margin: 10px 0 0; text-align: right; }
.yt-link a { color: var(--muted); text-decoration: none; }
.yt-link a:hover { color: var(--text); }

.desc { margin-top: 40px; }
.desc p { margin: 0 0 1.1em; }
.desc a { color: var(--text); text-decoration-color: var(--red-dim); text-underline-offset: 3px; word-break: break-word; }
.desc a:hover { text-decoration-color: var(--red); }
.desc-label { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .14em; color: var(--red); margin: 1.8em 0 .5em; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-family: var(--display); text-transform: uppercase; font-size: 18px; line-height: 1.2; padding: 16px; border: 1px solid var(--line); }
.pager a:hover { border-color: var(--red); }
.pager a span { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .14em; margin-bottom: 6px; }
.pager-next { text-align: right; }

/* about */
.prose { margin-top: 36px; }
.prose p { margin: 0 0 1.2em; }
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 48px 0; }
.person { border-top: 2px solid var(--brand); padding-top: 12px; }
.person p { margin: 0; }
.role { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.name { font-family: var(--display); text-transform: uppercase; font-size: 22px; }
.memorial { margin-top: 72px; padding: 36px 32px; border: 1px solid var(--line); background: var(--surface); position: relative; }
.memorial h2 { font-size: 22px; margin: 10px 0 12px; }
.memorial p { margin: 0; color: var(--muted); }
.memorial .candle { position: static; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; }
.memorial-line { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--text); display: flex; align-items: center; gap: 10px; }
.fine { margin: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.fine a { color: var(--muted); }
.candle { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 3px rgba(224,50,42,.18), 0 0 14px rgba(224,50,42,.6); animation: flicker 4s ease-in-out infinite; }
@keyframes flicker { 0%,100% { opacity: 1; } 45% { opacity: .75; } 50% { opacity: .9; } 55% { opacity: .7; } }

.notfound { padding: 120px 24px; }
.notfound h1 { font-size: clamp(36px, 6vw, 60px); max-width: 16ch; }
.notfound a { font-family: var(--mono); font-size: 14px; }

@media (max-width: 720px) {
  body { font-size: 17px; }
  .header-inner { height: 60px; }
  .wordmark img { height: 22px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-logo { max-width: 220px; order: -1; }
  .w-pod { display: none; }
  .hero { padding: 56px 0 44px; }
  .stats { gap: 28px; }
  .stats dd { font-size: 32px; }
  .controls { width: 100%; }
  .search { flex: 1 1 100%; }
  .search input { width: 100%; }
  .ep a { grid-template-columns: 112px 1fr; gap: 14px; padding: 18px 0; }
  .ep-num { display: none; }
  .ep-num { font-size: 15px; }
  .ep-arrow { display: none; }
  .ep-title { font-size: 20px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
  .people { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* episodes whose audio/video hasn't been recovered */
.ep-thumb-missing { display: grid; place-items: center; border: 1px dashed var(--line); background: transparent; }
.ep-thumb-missing span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.player-missing { aspect-ratio: auto; min-height: 240px; display: grid; place-items: center; text-align: center; background: var(--surface); border: 1px dashed var(--line); padding: 32px; }
.player-missing p { margin: 0 0 8px; color: var(--muted); font-size: 16px; }
.player-missing .pm-title { font-family: var(--display); text-transform: uppercase; font-size: 22px; color: var(--text); max-width: 22ch; margin: 0 auto 12px; line-height: 1.15; }
.player-missing a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; }

/* lost-media call-out */
.recover { margin-top: 56px; padding: 28px 32px; border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--surface); }
.recover p { margin: 0 0 8px; color: var(--muted); font-size: 17px; max-width: 60ch; }
.recover p:last-child { margin: 12px 0 0; }
.recover-title { font-family: var(--display); text-transform: uppercase; font-size: 22px; color: var(--text) !important; letter-spacing: .01em; }
.recover-link { font-family: var(--mono); font-size: 14px; color: var(--text); text-decoration-color: var(--red); text-underline-offset: 4px; }
.about .recover { margin-top: 0; margin-bottom: 0; }

.memorial .mem-dates { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; color: var(--text); margin: -4px 0 18px; }
.memorial .mem-sig { margin-top: 18px; font-family: var(--mono); font-size: 13px; color: var(--text); }

.credit { flex-basis: 100%; }

/* audio-only player (Internet Archive copy) */
.audio { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); }
.audio-label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.audio audio { width: 100%; display: block; color-scheme: dark; }
.audio-links { font-family: var(--mono); font-size: 12px; margin: 10px 0 0; color: var(--muted); }
.audio-links a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; }

.listen { margin: 0 0 24px; padding: 28px 32px; border: 1px solid var(--line); background: var(--surface); }
.listen p { margin: 0 0 8px; color: var(--muted); font-size: 17px; max-width: 60ch; }
.listen .recover-title { color: var(--text); }

.audio-main { margin-top: 36px; padding: 28px; }
.ep-thumb-audio { display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); }
.ep-thumb-audio span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
