:root {
  --page: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #526174;
  --line: #d8dee8;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --rose: #be123c;
  --amber: #b45309;
  --blue: #1d4ed8;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  letter-spacing: 0;
}

button,
audio {
  font: inherit;
  letter-spacing: 0;
}

button,
.home-link,
.platform-links a {
  min-height: 44px;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  padding: 0 16px;
}

button:hover,
button:focus-visible,
.home-link:hover,
.home-link:focus-visible,
.platform-links a:hover,
.platform-links a:focus-visible {
  border-color: var(--teal);
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary-action {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: var(--teal-dark);
  color: #ffffff;
}

.site-header {
  align-items: center;
  background: rgba(248, 250, 252, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 74px;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 800;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
  flex: 0 0 auto;
  object-fit: cover;
}

.profile-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.profile-tabs button {
  min-width: 116px;
  white-space: nowrap;
}

.profile-tabs button[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.intro-band,
.player-band,
.episodes-band {
  padding-left: 28px;
  padding-right: 28px;
}

.intro-band {
  background: #eef6f5;
  border-bottom: 1px solid var(--line);
  padding-bottom: 34px;
  padding-top: 40px;
}

.intro-copy,
.player-shell,
.section-header,
.episodes-grid {
  margin: 0 auto;
  max-width: 1120px;
}

.intro-copy {
  display: grid;
  gap: 16px;
}

.eyebrow,
.section-kicker {
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  font-size: 3rem;
  line-height: 1.02;
  margin: 0;
  max-width: 820px;
}

.intro-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
  margin: 0;
  max-width: 900px;
}

.platform-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.platform-links a,
.home-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  padding: 0 14px;
  text-decoration: none;
}

.platform-links a:nth-child(1) {
  border-color: rgba(15, 118, 110, 0.35);
}

.platform-links a:nth-child(2) {
  border-color: rgba(190, 18, 60, 0.35);
}

.platform-links a:nth-child(3) {
  border-color: rgba(180, 83, 9, 0.35);
}

.player-band {
  background: var(--surface);
  padding-bottom: 44px;
  padding-top: 44px;
}

.player-shell {
  align-items: stretch;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(260px, 430px) minmax(0, 1fr);
}

.cover-frame {
  align-items: center;
  align-self: start;
  aspect-ratio: 1 / 1;
  background: #111827;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

.cover-frame img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.player-panel {
  align-content: start;
  border-left: 5px solid var(--teal);
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 2px 0 2px 24px;
}

.player-panel h2 {
  font-size: 2rem;
  line-height: 1.12;
  margin: 0;
}

.episode-date,
.episode-summary {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.episode-summary {
  max-width: 680px;
}

audio {
  display: none;
}

.custom-player {
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: grid;
  gap: 14px;
  grid-template-columns: 56px minmax(0, 1fr);
  margin-top: 4px;
  padding: 14px;
}

.player-toggle {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: var(--teal);
  border-color: var(--teal);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 1.25rem;
  justify-content: center;
  min-height: 56px;
  padding: 0;
  width: 56px;
}

.player-toggle:hover,
.player-toggle:focus-visible {
  background: var(--teal-dark);
  color: #ffffff;
}

.player-timeline {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.player-timeline input[type="range"] {
  --player-progress: 0%;
  appearance: none;
  background: transparent;
  cursor: pointer;
  height: 24px;
  margin: 0;
  width: 100%;
}

.player-timeline input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--teal) 0%, #16a34a var(--player-progress), #dbe3ec var(--player-progress), #dbe3ec 100%);
  border-radius: 999px;
  height: 9px;
}

.player-timeline input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  background: #ffffff;
  border: 3px solid var(--teal);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.18);
  height: 22px;
  margin-top: -6.5px;
  width: 22px;
}

.player-timeline input[type="range"]::-moz-range-track {
  background: #dbe3ec;
  border-radius: 999px;
  height: 9px;
}

.player-timeline input[type="range"]::-moz-range-progress {
  background: linear-gradient(90deg, var(--teal), #16a34a);
  border-radius: 999px;
  height: 9px;
}

.player-timeline input[type="range"]::-moz-range-thumb {
  background: #ffffff;
  border: 3px solid var(--teal);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.18);
  height: 16px;
  width: 16px;
}

.player-time-row {
  color: var(--muted);
  display: flex;
  font-size: 0.88rem;
  font-weight: 700;
  justify-content: space-between;
  min-height: 20px;
}

.progress-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.92rem;
  gap: 10px 18px;
  min-height: 24px;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.text-action {
  background: transparent;
}

.episodes-band {
  padding-bottom: 80px;
  padding-top: 40px;
}

.section-header {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 20px;
}

.section-header h2 {
  font-size: 1.7rem;
  margin: 4px 0 0;
}

.episodes-grid {
  display: grid;
  gap: 14px;
}

.episode-card {
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 154px;
  padding: 10px;
}

.episode-card[aria-current="true"] {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.episode-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  height: 132px;
  object-fit: cover;
  width: 132px;
}

.episode-card-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.episode-card-topline,
.episode-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.episode-card-date,
.episode-duration {
  color: var(--muted);
  font-size: 0.9rem;
}

.listened-pill {
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 9px;
}

.episode-card h3 {
  font-size: 1.06rem;
  line-height: 1.25;
  margin: 0;
}

.episode-card p {
  color: var(--muted);
  display: -webkit-box;
  line-height: 1.45;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.episode-play-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-width: 112px;
}

.episode-play-button.is-playing {
  border-color: rgba(15, 118, 110, 0.45);
  color: var(--teal-dark);
}

.episode-play-button.is-paused {
  color: var(--muted);
}

.sound-wave {
  align-items: center;
  display: inline-flex;
  gap: 2px;
  height: 18px;
}

.sound-wave i {
  animation: soundWave 0.72s ease-in-out infinite;
  background: #16a34a;
  border-radius: 999px;
  display: block;
  height: 8px;
  width: 3px;
}

.sound-wave i:nth-child(2) {
  animation-delay: 0.12s;
}

.sound-wave i:nth-child(3) {
  animation-delay: 0.24s;
}

.episode-progress {
  background: #e5e7eb;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
  width: 100%;
}

.episode-progress-bar {
  background: linear-gradient(90deg, #16a34a, var(--teal));
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 180ms ease;
  width: 0%;
}

.status-message {
  background: #fff7ed;
  border: 1px solid rgba(180, 83, 9, 0.28);
  border-radius: 8px;
  color: #7c2d12;
  padding: 16px;
}

@keyframes soundWave {
  0%,
  100% {
    transform: scaleY(0.55);
  }

  50% {
    transform: scaleY(1.55);
  }
}

.cookie-banner {
  align-items: center;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  bottom: 18px;
  box-shadow: var(--shadow);
  color: #ffffff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  left: 50%;
  max-width: 940px;
  padding: 16px;
  position: fixed;
  transform: translateX(-50%);
  width: calc(100% - 36px);
  z-index: 50;
}

.cookie-banner p {
  line-height: 1.45;
  margin: 0;
}

.cookie-banner div {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.cookie-banner button:not(.primary-action) {
  background: transparent;
  color: #ffffff;
}

.not-found-page {
  background: #eef6f5;
}

.not-found {
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 680px;
  min-height: 100vh;
  padding: 56px 28px;
  place-content: center;
}

.not-found h1 {
  font-size: 2.3rem;
}

.not-found p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.home-link {
  justify-self: start;
}

@media (max-width: 820px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 12px 18px;
  }

  .intro-band,
  .player-band,
  .episodes-band {
    padding-left: 18px;
    padding-right: 18px;
  }

  h1 {
    font-size: 2.2rem;
  }

  .player-shell {
    grid-template-columns: 1fr;
  }

  .cover-frame {
    max-width: 420px;
  }

  .player-panel {
    border-left: 0;
    border-top: 5px solid var(--teal);
    padding: 20px 0 0;
  }

  .section-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .platform-links a,
  .player-actions button,
  .section-header button {
    width: 100%;
  }

  .episode-card {
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 118px;
  }

  .episode-thumb {
    height: 92px;
    width: 92px;
  }

  .episode-card p {
    -webkit-line-clamp: 1;
  }

  .episode-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .episode-play-button {
    width: 100%;
  }

  .custom-player {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 12px;
  }

  .player-toggle {
    min-height: 48px;
    width: 48px;
  }

  .cookie-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-banner div {
    flex-direction: column;
  }
}
