:root {
  --bg: #f7f3ec;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #18201b;
  --muted: #66706a;
  --line: #ded6c8;
  --accent: #176b5b;
  --accent-strong: #0f4f43;
  --gold: #c89b3c;
  --rose: #a6484f;
  --shadow: 0 18px 45px rgba(24, 32, 27, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(200, 155, 60, 0.16), transparent 34rem),
    linear-gradient(180deg, #fbf8f0 0%, var(--bg) 38%, #f4efe5 100%);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(222, 214, 200, 0.8);
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Inria Serif", Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-menu a {
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 12px;
}

.site-menu a:hover,
.site-menu a:focus-visible {
  background: rgba(23, 107, 91, 0.08);
  color: var(--accent-strong);
  outline: none;
}

.icon-button {
  display: none;
  border: 0;
  background: transparent;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: end;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(42px, 8vw, 92px) 0 26px;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Inria Serif", Georgia, serif;
  line-height: 1.02;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.65rem, 7vw, 5.9rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.hero-copy {
  max-width: 660px;
  margin: 18px 0 24px;
  color: #3e4842;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.search-form {
  display: flex;
  width: min(100%, 680px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.search-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 13px 12px;
  outline: none;
}

.search-form button,
.retry-button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  padding: 12px 18px;
}

.search-form button:hover,
.retry-button:hover {
  background: var(--accent-strong);
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow);
}

.hero-panel div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.hero-panel div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stat-value {
  color: var(--accent-strong);
  font-family: "Inria Serif", Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.content-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.section-heading {
  margin-bottom: 16px;
}

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

.result-count {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.speaker-strip,
.category-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: thin;
}

.speaker-card {
  display: grid;
  flex: 0 0 112px;
  justify-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
  padding: 14px 10px;
}

.speaker-card img {
  width: 64px;
  height: 64px;
  border: 2px solid var(--surface-strong);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(24, 32, 27, 0.12);
}

.speaker-card span {
  min-height: 32px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.category-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  padding: 10px 16px;
}

.category-button:hover,
.category-button:focus-visible,
.category-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  outline: none;
}

.series-section {
  padding-bottom: 56px;
}

.status-message {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
  padding: 18px;
}

.status-message.is-visible {
  display: block;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.series-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 10px 28px rgba(24, 32, 27, 0.08);
}

.series-link {
  display: block;
  aspect-ratio: 16 / 9;
  background: #e5ded0;
  overflow: hidden;
}

.series-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
}

.series-card:hover .series-link img {
  transform: scale(1.025);
}

.series-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.series-topic {
  color: var(--rose);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.series-title {
  margin: 7px 0 10px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.series-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.series-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.series-meta span:not(:last-child)::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.details-toggle {
  align-self: flex-start;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbf8f0;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 10px;
}

.series-description {
  display: none;
  margin: 12px 0 0;
  border-top: 1px solid var(--line);
  color: #47514b;
  font-size: 0.9rem;
  line-height: 1.55;
  padding-top: 12px;
}

.series-card.is-expanded .series-description {
  display: block;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  background: #ebe2d4;
  color: #48524b;
  padding: 24px 16px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 800;
}

.about-hero,
.about-section {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.about-hero {
  padding: clamp(42px, 8vw, 92px) 0 34px;
}

.about-hero h1 {
  max-width: 880px;
  font-size: clamp(2.45rem, 6vw, 5.35rem);
}

.about-hero p,
.about-closing p {
  max-width: 760px;
  color: #3e4842;
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.7;
}

.about-section {
  padding: 26px 0;
}

.principle-list {
  display: grid;
  gap: 14px;
}

.principle-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.principle-item > span {
  color: var(--accent);
  font-family: "Inria Serif", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
}

.principle-item h3 {
  margin: 0 0 9px;
  font-family: "Inria Serif", Georgia, serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.principle-item p {
  margin: 0;
  color: #4a554f;
  line-height: 1.7;
}

.about-closing {
  padding-bottom: 64px;
}

.about-closing .primary-link {
  margin-top: 8px;
}

.page-menu {
  display: flex;
}

.primary-link,
.quiet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 800;
}

.primary-link {
  background: var(--accent);
  color: white;
  padding: 13px 18px;
}

.primary-link:hover,
.primary-link:focus-visible {
  background: var(--accent-strong);
  outline: none;
}

.quiet-link {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent-strong);
  padding: 11px 15px;
}

.quiet-link:hover,
.quiet-link:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.series-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 34px;
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(34px, 7vw, 76px) 0 24px;
}

.series-hero h1,
.watch-info h1 {
  font-size: clamp(2.45rem, 6vw, 5.2rem);
}

.series-hero img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.episode-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.episode-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 10px 28px rgba(24, 32, 27, 0.08);
}

.episode-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.episode-card span,
.episode-card strong {
  margin-inline: 14px;
}

.episode-number {
  margin-top: 13px;
  color: var(--rose);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.episode-card strong {
  margin-top: 6px;
  font-size: 1rem;
  line-height: 1.35;
}

.episode-date {
  margin-top: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.watch-main,
.episode-sidebar {
  min-width: 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f0e;
  box-shadow: var(--shadow);
}

.video-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #0d0f0e;
}

.video-unavailable {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: rgba(13, 15, 14, 0.84);
  color: white;
  padding: 24px;
  text-align: center;
}

.video-unavailable strong {
  font-size: 1.1rem;
}

.is-hidden {
  display: none !important;
}

.watch-info {
  padding: 22px 0 0;
}

.watch-info h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.watch-info p:not(.eyebrow) {
  color: var(--muted);
  font-weight: 700;
}

.watch-note {
  max-width: 620px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.episode-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  padding: 16px;
}

.compact-episode-list {
  display: grid;
  gap: 10px;
}

.compact-episode {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px;
}

.compact-episode:hover,
.compact-episode:focus-visible,
.compact-episode.is-current {
  border-color: var(--accent);
  background: rgba(23, 107, 91, 0.08);
  outline: none;
}

.compact-episode img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
}

.compact-episode span {
  min-width: 0;
}

.compact-episode small {
  display: block;
  color: var(--rose);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-episode strong {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
  line-height: 1.3;
}

.compact-episode em {
  display: block;
  margin-top: 5px;
  color: var(--accent);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .series-hero,
  .watch-layout {
    grid-template-columns: 1fr;
  }

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

  .episode-sidebar {
    position: static;
    max-height: none;
  }

  .hero-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-panel div {
    display: grid;
    justify-items: center;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding: 0 12px 0 0;
    text-align: center;
  }

  .hero-panel div:last-child {
    border-right: 0;
    padding-right: 0;
  }

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

@media (max-width: 680px) {
  .nav-shell {
    min-height: 64px;
  }

  .icon-button {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
  }

  .menu-line {
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
  }

  .site-menu {
    position: fixed;
    inset: 64px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    padding: 8px;
  }

  .site-menu.is-open {
    display: flex;
  }

  .site-menu a {
    padding: 14px;
  }

  .hero {
    padding-top: 36px;
  }

  .search-form {
    display: grid;
  }

  .search-form button {
    width: 100%;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel div {
    display: flex;
    justify-items: stretch;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 12px;
    text-align: left;
  }

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

  .episode-list {
    grid-template-columns: 1fr;
  }

  .compact-episode {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .row-heading {
    display: block;
  }

  .principle-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .result-count {
    margin-top: 8px;
  }
}
