@font-face {
  font-family: "League Spartan";
  src: url("/assets/fonts/LeagueSpartan.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --throb-yellow: #f9b800;
  --throb-yellow-light: #ffcb2f;
  --throb-ink: #141310;
  --throb-cream: #fff6d6;
  --throb-muted: #cfc5a6;
}

.library-page *,
.library-page *::before,
.library-page *::after {
  box-sizing: border-box;
}

.library-page {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background: var(--throb-ink);
  color: var(--throb-cream);
  font-family: "League Spartan", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.library-page img,
.library-page video {
  display: block;
  max-width: 100%;
}

.library-page a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.library-page ::selection {
  background: var(--throb-yellow);
  color: var(--throb-ink);
}

.library-page :focus-visible {
  outline: 3px solid var(--throb-yellow);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  translate: 0 -180%;
  padding: 10px 16px 8px;
  border-radius: 999px;
  background: var(--throb-ink);
  color: var(--throb-yellow) !important;
  font-weight: 800;
}

.skip-link:focus {
  translate: 0;
}

.site-bar {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px clamp(18px, 5vw, 72px);
  border-bottom: 3px solid var(--throb-ink);
  background: var(--throb-yellow);
  color: var(--throb-ink);
}

.site-bar__mark {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}

.site-bar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-bar nav a {
  text-decoration: none;
}

.library-hero {
  position: relative;
  isolation: isolate;
  min-height: min(710px, calc(100svh - 64px));
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(70px, 11vw, 150px) clamp(20px, 8vw, 120px);
  background: radial-gradient(ellipse at 50% 35%, var(--throb-yellow-light), var(--throb-yellow) 60%, #eaa000);
  color: var(--throb-ink);
}

.library-hero__copy {
  position: relative;
  z-index: 2;
  width: min(880px, 100%);
  margin-inline: auto;
  text-align: center;
}

.library-hero__face {
  position: absolute;
  z-index: -1;
  bottom: -10%;
  width: clamp(210px, 31vw, 500px);
  max-width: none;
  opacity: 0.92;
  pointer-events: none;
}

.library-hero__face--bertie {
  left: 0;
  translate: -52% 0;
}

.library-hero__face--paul {
  right: 0;
  translate: 52% 0;
}

.breadcrumb {
  margin: 0 0 24px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li + li::before {
  content: "→";
  margin-right: 7px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.library-hero h1 {
  max-width: 13ch;
  margin: 0 auto;
  overflow-wrap: anywhere;
  font-size: clamp(48px, 9.5vw, 132px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.86;
  text-transform: uppercase;
  text-wrap: balance;
}

.library-hero__lede {
  max-width: 58ch;
  margin: 28px auto 0;
  font-size: clamp(19px, 2.2vw, 27px);
  line-height: 1.35;
  text-wrap: balance;
}

.episode-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 28px 0 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.library-section {
  padding: clamp(70px, 10vw, 135px) clamp(20px, 8vw, 120px);
}

.library-section--paper {
  background: var(--throb-cream);
  color: var(--throb-ink);
}

.library-section--yellow {
  background: var(--throb-yellow);
  color: var(--throb-ink);
}

.library-section__inner {
  width: min(1160px, 100%);
  margin-inline: auto;
}

.section-heading {
  max-width: 13ch;
  margin: 0 0 clamp(30px, 5vw, 64px);
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.92;
  text-transform: uppercase;
  text-wrap: balance;
}

.summary-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(25px, 5vw, 72px);
  font-size: clamp(20px, 2.2vw, 29px);
  line-height: 1.4;
}

.summary-copy p {
  margin: 0;
}

.moment-list {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.moment-card {
  min-width: 0;
  overflow: hidden;
  padding: clamp(24px, 4vw, 52px);
  border: 3px solid currentColor;
  background: var(--throb-yellow);
  color: var(--throb-ink);
  box-shadow: 10px 10px 0 currentColor;
}

.moment-card__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 22px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.moment-card__label a {
  overflow-wrap: anywhere;
}

.moment-card blockquote {
  max-width: 28ch;
  margin: 0;
  font-size: clamp(28px, 4.3vw, 58px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}

.redacted-word {
  position: relative;
  display: inline-block;
}

.redacted-word::after {
  content: "";
  position: absolute;
  inset: 0.08em -0.04em 0.12em;
  background: #070605;
  transform-origin: right center;
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

.moment-card.is-revealed .redacted-word::after {
  transform: scaleX(0);
}

.moment-card__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 28px;
}

.moment-play,
.pill-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--throb-ink);
  border-radius: 999px;
  padding: 10px 20px 8px;
  background: var(--throb-ink);
  color: var(--throb-yellow);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.moment-play::before {
  content: "";
  width: 0;
  height: 0;
  margin-right: 10px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

.moment-play.is-playing::before {
  width: 10px;
  height: 14px;
  border: 0;
  border-right: 4px solid currentColor;
  border-left: 4px solid currentColor;
}

.moment-time {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.listen-links,
.topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.library-section--paper .pill-link,
.library-section--yellow .pill-link {
  background: var(--throb-ink);
  color: var(--throb-yellow);
}

.topic-links a {
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 8px 15px 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}

.transcript {
  border-top: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
}

.transcript summary {
  padding: 22px 0 18px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.transcript__body {
  padding-bottom: 38px;
}

.transcript__row {
  display: grid;
  grid-template-columns: 6rem 7rem minmax(0, 1fr);
  gap: 15px;
  padding: 17px 0;
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}

.transcript__time,
.transcript__speaker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.transcript__text {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

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

.episode-nav a {
  display: block;
  padding: 24px;
  border: 3px solid currentColor;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}

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

.episode-nav span {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cartoon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cartoon-card {
  min-width: 0;
}

.cartoon-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 3px solid currentColor;
  background: #000;
  object-fit: cover;
  box-shadow: 9px 9px 0 currentColor;
}

.cartoon-card h2,
.cartoon-card h3 {
  margin: 24px 0 8px;
  font-size: clamp(27px, 3.5vw, 43px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.cartoon-card p {
  max-width: 48ch;
  margin: 0 0 12px;
}

.library-footer {
  padding: 55px clamp(20px, 8vw, 120px);
  background: var(--throb-yellow);
  color: var(--throb-ink);
  text-align: center;
}

.library-footer__mark {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
}

.library-footer p {
  margin: 14px auto 0;
}

/* Homepage library additions deliberately leave its quote/player rules alone. */
.home-library {
  min-height: 0 !important;
}

.home-library h2 {
  max-width: 12ch;
  margin: 0 0 28px;
  font-size: clamp(42px, 7vw, 104px);
}

.home-library__intro {
  max-width: 55ch;
  margin: 0 0 34px;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.45;
}

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

.home-topic-grid a {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 3px solid currentColor;
  font-size: clamp(24px, 3vw, 39px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.home-topic-grid small {
  font-size: 11px;
  letter-spacing: 0.12em;
}

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

.home-cartoon-list video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 4px solid currentColor;
  background: #000;
  object-fit: cover;
  box-shadow: 10px 10px 0 currentColor;
}

.home-cartoon-list h3 {
  margin: 24px 0 6px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
}

.home-cartoon-list p {
  max-width: 50ch;
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.45;
}

.home-library__more {
  display: inline-block;
  margin-top: 34px;
  border: 3px solid currentColor;
  border-radius: 999px;
  padding: 13px 20px 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .library-page {
    font-size: 16px;
  }

  .site-bar {
    min-height: 56px;
    gap: 12px;
    padding-inline: 14px;
  }

  .site-bar__mark {
    font-size: 25px;
  }

  .site-bar nav {
    gap: 5px 10px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .library-hero {
    min-height: 560px;
  }

  .library-hero__face {
    bottom: -3%;
    width: 245px;
    opacity: 0.48;
  }

  .summary-copy,
  .cartoon-grid,
  .home-cartoon-list,
  .episode-nav {
    grid-template-columns: 1fr;
  }

  .transcript__row {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 8px 12px;
  }

  .transcript__text {
    grid-column: 1 / -1;
  }

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

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

  .home-topic-grid a {
    min-height: 112px;
    padding: 17px;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 390px) {
  .site-bar nav a:nth-child(2) {
    display: none;
  }

  .home-topic-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .redacted-word::after {
    display: none;
  }
}
