:root {
  --ink: #161816;
  --muted: #62665f;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --wash: #efeee8;
  --line: #d9d7ce;
  --green: #2e5d55;
  --clay: #9b6040;
  --blue: #455e7b;
  --gold: #b38b45;
  --shadow: 0 24px 80px rgba(20, 24, 22, 0.14);
  --reader-size: 19px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px clamp(18px, 4vw, 42px);
  border-bottom: 1px solid rgba(217, 215, 206, 0.8);
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--green);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--paper);
  background: var(--clay);
}

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

.topnav a,
.nav-button,
.filter,
.reader-actions button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  padding: 7px 10px;
  text-decoration: none;
  color: var(--muted);
  cursor: pointer;
}

.topnav a:hover,
.nav-button:hover,
.filter:hover,
.reader-actions button:hover {
  border-color: var(--line);
  background: var(--wash);
  color: var(--ink);
}

.language-panel {
  position: fixed;
  top: 68px;
  right: clamp(14px, 3vw, 34px);
  z-index: 30;
  display: none;
  width: min(420px, calc(100vw - 28px));
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.language-panel.is-open {
  display: block;
}

.panel-inner {
  padding: 24px;
}

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

.language-grid a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  text-decoration: none;
  background: #f8f7f2;
}

main {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  overflow: hidden;
  padding: clamp(72px, 12vh, 128px) 0 42px;
}

#councilCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-bottom: 1px solid var(--line);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(251,250,247,0.94) 0%, rgba(251,250,247,0.82) 44%, rgba(251,250,247,0.2) 100%);
  pointer-events: none;
}

.hero-copy,
.hero-meta {
  position: relative;
  z-index: 1;
}

.hero-copy {
  width: min(820px, 100%);
  padding: 0 0 clamp(30px, 8vh, 76px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.08;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(58px, 10vw, 132px);
}

h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
}

h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

p {
  margin: 0;
}

.lead {
  width: min(720px, 100%);
  color: #2b2d29;
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1.32;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.intro-video-card {
  display: grid;
  grid-template-columns: minmax(118px, 178px) minmax(0, 1fr);
  align-items: stretch;
  width: min(620px, 100%);
  margin-top: 32px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 24px 70px rgba(25, 30, 24, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.intro-video-card:hover,
.intro-video-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(46, 91, 69, 0.45);
  background: rgba(255,255,255,0.9);
}

.intro-video-frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--wash);
}

.intro-video-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.96);
}

.intro-video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 8, 0.03), rgba(8, 10, 8, 0.22));
}

.video-play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 999px;
  background: rgba(20, 23, 20, 0.5);
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro-video-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
  padding: 18px 20px;
}

.intro-video-copy > span:last-child {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.04;
}

.primary-action,
.secondary-action,
.book-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  border-radius: 6px;
  padding: 9px 14px;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}

.secondary-action,
.book-card button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.74);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.hero-meta span {
  border: 1px solid rgba(217, 215, 206, 0.8);
  border-radius: 999px;
  background: rgba(255,255,255,0.64);
  padding: 7px 11px;
}

.intro-band,
.method {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 7vw, 96px);
  padding: clamp(58px, 9vw, 104px) 0;
  border-bottom: 1px solid var(--line);
}

.intro-band > p,
.method-text {
  color: #2d302d;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.45;
}

.method-text p + p {
  margin-top: 22px;
}

.lab-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 18px 0 46px;
}

.lab-footer a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.lab-footer img {
  width: 28px;
  height: 28px;
  display: block;
  opacity: 0.82;
}

.lab-footer a:hover {
  color: var(--ink);
}

.series-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 34px 0 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.series-map article {
  min-height: 230px;
  padding: 24px;
  background: var(--surface);
}

.series-map span,
.book-meta {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.series-map p,
.book-card p {
  color: var(--muted);
}

.books-section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter {
  border-color: var(--line);
}

.filter.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}

.series-card {
  min-width: 0;
  height: 100%;
}

.series-entry {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  height: 100%;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.series-entry:hover {
  border-color: rgba(46, 93, 85, 0.45);
  box-shadow: 0 18px 48px rgba(20, 24, 22, 0.1);
}

.series-image {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--wash);
}

.series-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(251,250,247,0.02), rgba(22,24,22,0.25));
  pointer-events: none;
}

.series-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.96);
  opacity: 0;
  animation: image-reveal 950ms ease forwards;
  transition: transform 900ms ease;
}

.series-entry:hover .series-image img {
  transform: scale(1.018);
}

.series-copy {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
}

.series-title {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.08;
}

.series-movement {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.series-teaser {
  color: var(--muted);
  font-size: 15px;
}

.book-card {
  position: relative;
  display: flex;
  min-height: 355px;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
}

.book-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--green);
}

.book-card-layout {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.book-strip {
  position: relative;
  overflow: hidden;
  min-height: 238px;
  border-radius: 4px;
  background: var(--wash);
}

.book-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(251,250,247,0.1), rgba(22,24,22,0.22));
  pointer-events: none;
}

.book-strip img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.96);
  opacity: 0;
  animation: image-reveal 900ms ease forwards;
}

.book-copy {
  min-width: 0;
}

.book-card[data-level="youth"]::before {
  background: var(--blue);
}

.book-card[data-level="adult"]::before {
  background: var(--clay);
}

.book-card[data-level="intro"]::before {
  background: var(--gold);
}

.book-card h3 {
  margin-top: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 400;
}

.book-card button {
  width: 100%;
  background: #f8f7f2;
}

.reader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.reader.is-open {
  display: block;
}

.series-chooser {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
}

.series-chooser.is-open {
  display: block;
}

.reader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 18, 16, 0.42);
}

.series-panel {
  position: absolute;
  inset: 42px;
  display: grid;
  grid-template-rows: auto 1fr;
  max-width: 1020px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.series-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.series-panel-header h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 52px);
}

.series-panel-header p:last-child {
  max-width: 720px;
  color: var(--muted);
}

.series-panel-header button,
.choice-card button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8f7f2;
  padding: 8px 12px;
  cursor: pointer;
}

.series-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: auto;
  background: var(--line);
}

.choice-card {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
}

.choice-card[data-level="intro"],
.choice-card[data-level="session"] {
  grid-column: 1 / -1;
  min-height: 220px;
}

.choice-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
}

.choice-card p:not(.book-meta) {
  color: var(--muted);
}

.reader-panel {
  position: absolute;
  inset: 22px;
  display: grid;
  grid-template-rows: auto 1fr;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.reader-header {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(300px, 460px) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.reader-header h2 {
  font-size: clamp(26px, 4vw, 44px);
}

.reader-kicker {
  margin-bottom: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reader-audio-mount {
  min-width: 0;
}

.audio-player {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(239, 238, 232, 0.52);
  padding: 9px 10px;
}

.audio-player audio {
  display: none;
}

.audio-toggle {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 6px 10px;
  cursor: pointer;
}

.audio-toggle:hover {
  background: var(--wash);
}

.audio-seek {
  width: 100%;
  accent-color: var(--green);
}

.audio-time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reader-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.reader-actions button {
  border-color: var(--line);
  color: var(--ink);
}

.reader-body {
  overflow: auto;
  padding: clamp(28px, 6vw, 78px);
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--reader-size);
  line-height: 1.78;
}

.reader-art {
  width: min(760px, 100%);
  aspect-ratio: 16 / 7;
  overflow: hidden;
  margin: 0 0 clamp(34px, 6vw, 68px);
  border-radius: 6px;
  background: var(--wash);
}

.reader-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.84) contrast(0.97);
  opacity: 0;
  animation: image-reveal 1100ms ease forwards;
}

.reader-body h1,
.reader-body h2,
.reader-body h3 {
  max-width: 780px;
}

.reader-body h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.reader-body h2 {
  margin-top: 16px;
  font-size: clamp(24px, 4vw, 42px);
}

.reader-body h3 {
  margin-top: 46px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reader-body p,
.reader-body ol,
.reader-body ul {
  max-width: 760px;
}

.reader-body p {
  margin: 0 0 18px;
}

.reader-body strong {
  color: var(--green);
}

body.reader-open,
body.chooser-open,
body.video-open {
  overflow: hidden;
}

.video-viewer {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
}

.video-viewer.is-open {
  display: block;
}

.video-panel {
  position: absolute;
  inset: 22px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, calc(100% - 44px));
  max-height: calc(100vh - 44px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  background: #101310;
  color: #f6f2ea;
  box-shadow: 0 32px 120px rgba(0,0,0,0.42);
}

.video-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.video-panel-header h2 {
  font-size: clamp(28px, 4vw, 48px);
}

.video-panel-header button {
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: #f6f2ea;
  padding: 8px 12px;
  cursor: pointer;
}

.video-panel video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #050605;
  object-fit: contain;
}

@keyframes image-reveal {
  from {
    opacity: 0;
    transform: scale(1.012);
  }

  to {
    opacity: 0.9;
    transform: scale(1);
  }
}

@media (max-width: 900px) {
  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .reader-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .reader-actions {
    justify-content: flex-start;
  }

  .topnav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .intro-band,
  .method,
  .series-map,
  .book-grid {
    grid-template-columns: 1fr;
  }

  .series-entry {
    min-height: 0;
    grid-template-rows: auto 1fr;
  }

  .series-image {
    aspect-ratio: 16 / 10;
  }

  .series-panel {
    inset: 8px;
  }

  .intro-video-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .intro-video-copy {
    padding: 14px;
  }

  .video-play-mark {
    width: 48px;
    height: 48px;
    font-size: 10px;
  }

  .series-panel-header {
    flex-direction: column;
  }

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

  .choice-card[data-level="intro"],
  .choice-card[data-level="session"] {
    grid-column: auto;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(251,250,247,0.95) 0%, rgba(251,250,247,0.82) 58%, rgba(251,250,247,0.3) 100%);
  }

  .book-card {
    min-height: 300px;
  }

  .book-card-layout {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
  }

  .book-strip {
    min-height: 220px;
  }

  .audio-player {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .audio-time {
    grid-column: 2;
  }

  .reader-panel {
    inset: 8px;
  }

  .video-panel {
    inset: 8px;
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
  }

  .video-panel-header {
    padding: 14px;
  }
}
