:root {
  --paper: #eee9da;
  --paper-deep: #ddd5c2;
  --ink: #17191f;
  --muted: #696a70;
  --panel: rgba(255, 252, 242, 0.94);
  --line: #bcb5a5;
  --blue: #7394e9;
  --blue-dark: #415fae;
  --red: #e02d20;
  --red-dark: #9f1e18;
  --hiatus: #e9a49d;
  --hiatus-dark: #d77d74;
  --yellow: #f2d83f;
  --future: #d3cdbf;
  --shadow: 8px 8px 0 rgba(23, 25, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12px 12px, rgba(23, 25, 31, 0.16) 1.2px, transparent 1.3px) 0 0 / 10px 10px,
    var(--paper);
  font-family: "Inter", system-ui, sans-serif;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 24px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  min-height: 480px;
  border: 4px solid var(--ink);
  overflow: hidden;
  background:
    linear-gradient(118deg, rgba(23, 25, 31, 0.98) 0 57%, transparent 57.2%),
    var(--blue);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -170px;
  top: -340px;
  border: 70px solid rgba(242, 216, 63, 0.25);
  border-radius: 50%;
}

.hero__copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(32px, 6vw, 82px);
  color: #fffdf5;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--yellow);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Russo One", Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(3.25rem, 8.6vw, 8rem);
  line-height: 0.84;
  letter-spacing: -0.055em;
  text-shadow: 5px 5px 0 #000;
}

.hero-title-word {
  display: inline-flex;
  isolation: isolate;
  color: var(--yellow);
  letter-spacing: 0;
  -webkit-text-stroke: 2px var(--red);
}

.hero-title-letter {
  position: relative;
  display: inline-block;
}

.hero-title-letter + .hero-title-letter {
  margin-left: -0.055em;
}

.hero-title-letter:nth-child(1) {
  z-index: 1;
}

.hero-title-letter:nth-child(2) {
  z-index: 2;
}

.hero-title-letter:nth-child(3) {
  z-index: 3;
}

.hero-title-letter:nth-child(4) {
  z-index: 4;
}

.hero-title-letter:nth-child(5) {
  z-index: 5;
}

.hero-title-letter:nth-child(6) {
  z-index: 6;
}

.hero-title-letter:nth-child(7) {
  z-index: 7;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
  line-height: 1.05;
}

.hero__intro {
  max-width: 630px;
  margin: 28px 0 24px;
  color: rgba(255, 253, 245, 0.72);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__link {
  display: inline-flex;
  padding: 12px 14px;
  border: 2px solid var(--yellow);
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--red);
}

.hero__link:hover,
.hero__link:focus-visible {
  color: var(--ink);
  background: var(--yellow);
}

.hero__cover {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: min(85%, 380px);
  aspect-ratio: 1;
  border: 5px solid var(--ink);
  object-fit: cover;
  box-shadow: 12px 12px 0 var(--red);
  transform: rotate(2.5deg);
}

.panel {
  border: 3px solid var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.calendar-panel,
.rhythm {
  margin-top: 26px;
  padding: clamp(20px, 4vw, 42px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend__swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(23, 25, 31, 0.45);
}

.legend__swatch.is-release {
  background: var(--blue);
}

.legend__swatch.is-hiatus {
  background: var(--hiatus);
}

.chart-row {
  display: grid;
  grid-template-columns: 54px minmax(920px, 1fr);
  gap: 9px;
}

.month-axis {
  display: grid;
  grid-template-columns: 54px repeat(12, minmax(0, 1fr));
  gap: 0;
  min-width: 983px;
  margin: 28px 0 8px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
}

.month-axis > span:not(:first-child) {
  text-align: center;
}

.chart-scroll {
  overflow-x: auto;
  padding: 5px 5px 12px 0;
}

.chart {
  min-width: 983px;
}

.chart-row {
  align-items: center;
  min-width: 983px;
  margin-bottom: 8px;
}

.chart-year {
  font-family: "Russo One", sans-serif;
  font-size: 0.86rem;
}

.weeks {
  display: grid;
  grid-template-columns: repeat(52, minmax(8px, 1fr));
  gap: 4px;
}

.week {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  min-width: 8px;
  padding: 0;
  border: 1px solid rgba(23, 25, 31, 0.26);
  border-radius: 0;
  cursor: pointer;
}

.week.is-release {
  background: var(--blue);
}

.week.is-release:hover,
.week.is-release:focus-visible {
  background: var(--blue-dark);
}

.week.is-hiatus {
  background: var(--hiatus);
}

.week.is-hiatus:hover,
.week.is-hiatus:focus-visible {
  background: var(--hiatus-dark);
}

.week.is-future,
.week.is-empty {
  background: var(--future);
  cursor: default;
}

.week.is-empty {
  opacity: 0.25;
}

.week.is-multi::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid #fff;
}

.week.is-selected {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  z-index: 2;
}

.episode-card {
  margin-top: 22px;
  padding: 22px;
  border: 3px solid var(--ink);
  background: #eef2ff;
  box-shadow: 6px 6px 0 var(--blue);
}

.episode-card.is-pause {
  background: #fff5f2;
  box-shadow: 6px 6px 0 var(--hiatus);
}

.episode-card__date,
.episode-line__meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.episode-card h3 {
  margin-bottom: 0;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.35;
}

.episode-line {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.episode-line:first-of-type {
  margin-top: 10px;
}

.episode-line__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.episode-listen {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.episode-topics {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.episode-topics-wrap,
.episode-topics-empty {
  margin-top: 18px;
}

.episode-topics__title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.episode-topics-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

.episode-topics-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.5;
}

.episode-topics-source {
  display: inline-block;
  margin-top: 10px;
  color: var(--red-dark);
  font-size: 0.76rem;
  font-weight: 800;
}

.episode-topics li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.episode-topics li.is-untimed {
  grid-template-columns: minmax(0, 1fr);
}

.episode-topics time {
  color: var(--red-dark);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.stat {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 24px;
}

.stat__label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat strong {
  margin: auto 0 10px;
  font-family: "Russo One", sans-serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1;
}

.stat > span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.stat__range {
  display: block;
  margin-top: 4px;
}

.stat--accent {
  color: #fff;
  background: var(--blue);
}

.stat--accent .stat__label,
.stat--accent > span:last-child {
  color: rgba(255, 255, 255, 0.76);
}

.stat--accent strong {
  color: #fff;
}

.year-bars {
  display: grid;
  gap: 13px;
  margin-top: 28px;
}

.year-bar {
  display: grid;
  grid-template-columns: 52px 1fr 105px;
  align-items: center;
  gap: 13px;
  font-size: 0.82rem;
  font-weight: 800;
}

.year-bar__track {
  height: 16px;
  border: 1px solid var(--ink);
  background: var(--paper-deep);
}

.year-bar__fill {
  display: block;
  height: 100%;
  background: var(--blue);
}

.year-bar__value {
  color: var(--muted);
  font-size: 0.72rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 4px 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer p {
  margin-bottom: 0;
}

.error {
  padding: 20px;
  color: var(--red-dark);
  background: #fff0eb;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr 250px;
    min-height: 420px;
  }

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 10px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 40px;
    background: var(--ink);
  }

  .hero__copy {
    padding: 34px 24px 22px;
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 6rem);
  }

  .hero__cover {
    width: min(68vw, 310px);
  }

  .section-heading,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .stat {
    min-height: 165px;
  }

  .episode-line__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .episode-topics li {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .footer {
    gap: 8px;
  }
}

@media (max-width: 620px) {
  .month-axis {
    display: none;
  }

  .chart {
    min-width: 0;
  }

  .chart-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    min-width: 0;
  }

  .chart-year {
    line-height: 1;
  }

  .weeks {
    grid-template-columns: repeat(52, minmax(0, 1fr));
    gap: 1px;
  }

  .week {
    min-width: 3px;
    height: 12px;
    aspect-ratio: auto;
  }

  .week.is-selected {
    outline-width: 2px;
  }
}

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