/* =============================================================
   Christianity Unearthed — main.css
   Apple-inspired: generous whitespace, large type, black on white
   with a muted gold accent. System-font stack for body, elegant
   serif for display headings.
   ============================================================= */

:root {
  --bg: #ffffff;
  --bg-muted: #f5f5f7;
  --bg-dark: #0a0a0a;
  --text: #1d1d1f;
  --text-soft: #515154;
  --text-muted: #86868b;
  --rule: #d2d2d7;
  --accent: #a67c2e;        /* muted gold */
  --accent-soft: #c69a4a;
  --accent-dark: #7d5c1e;
  --max: 1200px;
  --max-narrow: 820px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 2px 18px rgba(0,0,0,0.06);
  --shadow-hover: 0 10px 40px rgba(0,0,0,0.10);
  --nav-h: 58px;
  --serif: "New York", "Iowan Old Style", "Palatino", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0 0 0.5em 0;
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.022em; }
h3 { font-size: clamp(1.4rem, 2.3vw, 2rem); }
h4 { font-size: 1.2rem; font-family: var(--sans); font-weight: 600; }

p { margin: 0 0 1em 0; color: var(--text-soft); }
.lead { font-size: 1.35rem; line-height: 1.45; color: var(--text); }
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* =============================================================
   Layout
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 24px; }

section { padding: clamp(72px, 10vw, 140px) 0; }
section.tight { padding: clamp(56px, 7vw, 96px) 0; }
section.dark { background: var(--bg-dark); color: #f5f5f7; }
section.dark h1, section.dark h2, section.dark h3 { color: #fff; }
section.dark p { color: #c7c7cc; }
section.muted { background: var(--bg-muted); }

/* =============================================================
   Navigation — frosted, sticky
   ============================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
}
/* push the mobile toggle to the far right, but keep nav-links close to brand */
.nav-inner .nav-toggle { margin-left: auto; }
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1;
}
.nav-brand .dot { color: var(--accent); }
.nav-brand img { height: 28px; width: auto; display: block; }
.nav-links {
  display: flex;
  list-style: none;
  padding: 0; margin: 0;
  gap: 2px;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.92rem;
  color: var(--text);
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: rgba(0,0,0,0.04); color: var(--accent-dark); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--rule);
    padding: 8px 16px 16px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links a { display: block; padding: 12px 8px; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav-links li:last-child a { border-bottom: 0; }
}

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--sans);
  color: #fff;
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: #000; border-color: #000; color: #fff; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}
.btn-outline:hover { background: var(--text); color: #fff; }

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 0;
  padding: 10px 0;
}
.btn-ghost::after { content: " →"; transition: transform 0.2s ease; display: inline-block; }
.btn-ghost:hover { color: var(--accent-dark); }
.btn-ghost:hover::after { transform: translateX(4px); }

/* Dark-section button overrides — ensure visibility on black background */
section.dark .btn,
.hero-alt .btn {
  background: #fff;
  color: var(--text);
  border-color: #fff;
}
section.dark .btn:hover,
.hero-alt .btn:hover {
  background: #f5f5f7;
  color: #000;
  border-color: #f5f5f7;
}
section.dark .btn-outline,
.hero-alt .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
section.dark .btn-outline:hover,
.hero-alt .btn-outline:hover {
  background: #fff;
  color: var(--text);
  border-color: #fff;
}
section.dark .btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
section.dark .btn-accent:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}
section.dark .btn-ghost { color: #c7c7cc; }
section.dark .btn-ghost:hover { color: #fff; }

/* When the first section after a hero should visually hug the hero */
.hero + section,
.ep-hero + section { padding-top: clamp(40px, 5vw, 64px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* =============================================================
   Hero
   ============================================================= */
.hero {
  padding: clamp(56px, 7vw, 96px) 0 clamp(24px, 3vw, 40px);
  text-align: center;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.hero-alt {
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
  color: #f5f5f7;
}
.hero-alt h1, .hero-alt .hero-tagline { color: #fff; }
.hero-alt p, .hero-alt .hero-lead { color: #c7c7cc; }

.hero h1 { margin-bottom: 0.4em; }
.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--text-soft);
  margin: 0 auto 1.6rem;
  max-width: 760px;
}
.hero-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-soft);
  max-width: 720px;
  margin: 0 auto 2rem;
  line-height: 1.55;
}
.hero .btn-row { justify-content: center; }

/* Section headers */
.section-head { text-align: center; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head p { max-width: 640px; margin-left: auto; margin-right: auto; font-size: 1.15rem; }

/* =============================================================
   Age grid — product-tile style
   ============================================================= */
.age-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .age-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .age-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px)  { .age-grid { grid-template-columns: 1fr; } }

.age-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  min-height: 360px;
  color: var(--text);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.age-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(166,124,46,0.10), transparent 45%);
  opacity: 0.9;
  pointer-events: none;
}
.age-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--text); }
.age-tile .age-num {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  position: relative;
}
.age-tile h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  position: relative;
}
.age-tile .age-dates {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  position: relative;
}
.age-tile p { font-size: 0.95rem; color: var(--text-soft); margin: 0; position: relative; }
.age-tile .age-more {
  margin-top: 20px;
  color: var(--accent-dark);
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
}
.age-tile .age-more::after { content: " →"; }

/* Feature age — larger tile variant */
.age-tile.feature {
  grid-column: span 2;
  background: linear-gradient(155deg, #0a0a0a 0%, #1c1c1e 100%);
  color: #f5f5f7;
  min-height: 420px;
}
.age-tile.feature h3 { color: #fff; }
.age-tile.feature p { color: #c7c7cc; }
.age-tile.feature .age-dates { color: #86868b; }
@media (max-width: 1100px) { .age-tile.feature { grid-column: span 3; } }
@media (max-width: 680px)  { .age-tile.feature { grid-column: span 2; } }
@media (max-width: 460px)  { .age-tile.feature { grid-column: span 1; } }

/* =============================================================
   Season / Episode cards
   ============================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 960px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  color: var(--text);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent-soft);
  color: var(--text);
}
.card .tag {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  line-height: 1.2;
}
.card p { font-size: 0.98rem; margin: 0; color: var(--text-soft); }
.card .card-more {
  margin-top: auto;
  padding-top: 18px;
  color: var(--accent-dark);
  font-weight: 500;
  font-size: 0.92rem;
}
.card .card-more::after { content: " →"; }

/* Episode list — single column, dense */
.ep-list {
  list-style: none;
  padding: 0; margin: 0;
  border-top: 1px solid var(--rule);
}
.ep-list > li { border-bottom: 1px solid var(--rule); }
.ep-list a {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 8px;
  transition: background 0.15s ease;
}
.ep-list a:hover { background: var(--bg-muted); color: var(--text); }
.ep-list .ep-num {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ep-list .ep-title { font-size: 1.1rem; font-weight: 500; color: var(--text); }
.ep-list .ep-hook { font-size: 0.95rem; color: var(--text-soft); display: block; margin-top: 4px; font-weight: 400; }
.ep-list .ep-arrow { color: var(--accent); font-weight: 500; }
@media (max-width: 600px) {
  .ep-list a { grid-template-columns: 1fr; gap: 4px; padding: 18px 4px; }
  .ep-list .ep-arrow { display: none; }
}

/* =============================================================
   Episode page
   ============================================================= */
.ep-hero {
  padding: clamp(48px, 6vw, 72px) 0 clamp(20px, 2.5vw, 32px);
  border-bottom: 1px solid var(--rule);
}

/* Tightens the first section after a hero even more aggressively */
.hero + section,
.hero + figure,
.ep-hero + section,
.ep-hero + figure { padding-top: clamp(24px, 3vw, 40px); }

/* Close the gap between hero tagline and a tight section that follows (opt-in via .hero-flush) */
.hero-flush { padding-bottom: 0 !important; }
.hero-flush + section.tight { padding-top: 0; }
.ep-crumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.ep-crumbs a { color: var(--text-muted); }
.ep-crumbs a:hover { color: var(--accent-dark); }
.ep-title-full { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 18px; }
.ep-hook-big {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  color: var(--text-soft);
  max-width: 780px;
  margin: 0 0 8px;
  line-height: 1.45;
}

.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 40px 0;
  box-shadow: var(--shadow);
}
.player-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  color: #86868b;
  background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
  text-align: center;
  padding: 20px;
}
.player-placeholder strong { color: #f5f5f7; font-weight: 600; display: block; margin-bottom: 6px; }

.ep-prose {
  max-width: var(--max-narrow);
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.7;
}
.ep-prose p { color: var(--text); margin-bottom: 1.2em; }
.ep-prose h3 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  font-size: 1.6rem;
}
.ep-prose .eyebrow { margin-top: 1.5em; margin-bottom: 0.4em; }

/* Prev / Next pager */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 60px 0 0;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.pager-link {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: background 0.15s ease;
  min-height: 96px;
  justify-content: center;
}
.pager-link:hover { background: #eaeaee; color: var(--text); }
.pager-link.next { text-align: right; }
.pager-label { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.pager-title { font-weight: 500; font-size: 1.02rem; }
.pager-empty { background: transparent; pointer-events: none; opacity: 0.4; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } }

/* =============================================================
   Listen / platform bar
   ============================================================= */
.listen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.platform-btn:hover { border-color: var(--accent); color: var(--accent-dark); transform: translateY(-1px); }
section.dark .platform-btn {
  background: transparent;
  border-color: #3a3a3c;
  color: #f5f5f7;
}
section.dark .platform-btn:hover { border-color: var(--accent-soft); color: #fff; }

/* =============================================================
   About / prose blocks
   ============================================================= */
.prose { max-width: var(--max-narrow); margin: 0 auto; }
.prose p { font-size: 1.12rem; line-height: 1.7; color: var(--text); margin-bottom: 1.2em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; margin-bottom: 0.4em; }
.prose ul, .prose ol { margin: 0 0 1.4em 1.2em; padding: 0; }
.prose li { margin-bottom: 0.5em; line-height: 1.6; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text);
}

/* =============================================================
   Episodes index — filter/search
   ============================================================= */
.index-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  align-items: center;
  justify-content: center;
}
.index-controls input, .index-controls select {
  font: inherit;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  min-width: 180px;
}
.index-controls input { min-width: 260px; }
.index-controls input:focus, .index-controls select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(166,124,46,0.15);
}
.index-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* =============================================================
   Footer
   ============================================================= */
.footer {
  background: var(--bg-dark);
  color: #a1a1a6;
  padding: 72px 0 36px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid #2a2a2c;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer h4 {
  color: #f5f5f7;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 16px 0;
  font-family: var(--sans);
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: #a1a1a6; }
.footer a:hover { color: #fff; }
.footer-brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.footer-tagline { font-size: 0.95rem; max-width: 360px; color: #a1a1a6; margin-bottom: 16px; }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #86868b;
}

/* =============================================================
   Utility
   ============================================================= */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.small { font-size: 0.88rem; color: var(--text-muted); }
.divider { height: 1px; background: var(--rule); margin: 40px 0; }
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(166,124,46,0.12);
  color: var(--accent-dark);
  border-radius: 999px;
  font-weight: 600;
}
.coming-soon {
  padding: 80px 24px;
  text-align: center;
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
}
.coming-soon h2 { margin-bottom: 12px; }
.coming-soon p { max-width: 520px; margin: 0 auto; color: var(--text-soft); }

/* =============================================================
   Book figures — images sourced from Book 7
   (Kept deliberately small so text inside diagrams stays close to
   body-text size; readers can click through to the book for detail.)
   ============================================================= */
.book-figure {
  margin: 20px auto;
  max-width: 380px;
  text-align: center;
  padding: 0 24px;
}
/* Large variant for figures that need detail visible (Ketomachy, Temple, Perpetua etc.) */
.book-figure.large { max-width: 760px; margin: 28px auto; }
/* Full-width variant — image fills the content area edge-to-edge (About page 5 Ages etc.) */
.book-figure.full { max-width: 100%; padding: 24px 24px; margin: 8px 0; }
.book-figure.full img { max-width: 100%; }
.book-figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 18px rgba(0,0,0,0.06);
  background: var(--bg-muted);
}
.book-figure figcaption {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-top: 14px;
  line-height: 1.5;
  font-family: var(--serif);
  font-style: italic;
}
.book-figure .credit {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-family: var(--sans);
  font-style: normal;
  letter-spacing: 0.02em;
}

/* Hero-band variant: sits in a muted stripe but at moderate size */
.book-figure.band {
  max-width: 100%;
  padding: 24px 24px;
  margin: 0;
  background: var(--bg-muted);
}
.book-figure.band img { max-width: min(820px, 100%); margin: 0 auto; }

/* In-section (inside prose), tighter */
.ep-prose .book-figure { margin: 28px auto 32px; max-width: 360px; }

/* Google My Maps embed on Resources → Places */
.map-embed {
  max-width: 1100px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-muted);
}
.map-embed iframe { display: block; border: 0; }

/* =============================================================
   About page additions
   ============================================================= */

/* Constrained centered figure: aligned with prose column, no gaps above/below */
.book-figure.flush {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 24px;
}
.book-figure.flush img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

/* Platform button colors */
.platform-btn.platform-btn--youtube {
  background: #ff0000;
  border-color: #ff0000;
  color: #fff;
}
.platform-btn.platform-btn--youtube:hover {
  background: #cc0000;
  border-color: #cc0000;
  color: #fff;
  transform: translateY(-1px);
}
.platform-btn.platform-btn--spotify {
  background: #1DB954;
  border-color: #1DB954;
  color: #fff;
}
.platform-btn.platform-btn--spotify:hover {
  background: #179443;
  border-color: #179443;
  color: #fff;
  transform: translateY(-1px);
}
.platform-btn.platform-btn--apple {
  background: #9933cc;
  border-color: #9933cc;
  color: #fff;
}
.platform-btn.platform-btn--apple:hover {
  background: #7a29a3;
  border-color: #7a29a3;
  color: #fff;
  transform: translateY(-1px);
}
section.dark .platform-btn.platform-btn--youtube,
section.dark .platform-btn.platform-btn--spotify,
section.dark .platform-btn.platform-btn--apple {
  color: #fff;
}

/* Age list highlight (Age II) */
.age-list .age-highlight {
  position: relative;
  padding: 10px 14px 10px 0;
  margin: 6px 0;
  border-radius: 4px;
}
.age-list .age-highlight::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -34px;
  right: 0;
  background: rgba(191, 149, 63, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  pointer-events: none;
  z-index: -1;
}
.age-list .age-highlight .age-note {
  display: block;
  font-size: 0.9rem;
  color: var(--accent-dark, #7a5a1e);
  font-style: italic;
  margin-top: 4px;
}

/* Click-to-zoom cursor on flush figures */
.book-figure.flush a { display: block; cursor: zoom-in; }
.book-figure.flush a img { display: block; }

/* =============================================================
   Age page pager tightening
   ============================================================= */

/* Pager sits directly under prose section with no gap or rule line */
section[data-age-pager="true"] {
  padding-top: 0;
  padding-bottom: clamp(24px, 3vw, 40px);
}
section[data-age-pager="true"] .pager {
  margin: 0;
  padding-top: 0;
  border-top: none;
}
/* Differentiate pager card background from the muted Seasons section below */
section[data-age-pager="true"] .pager-link {
  background: rgba(191, 149, 63, 0.08);
}
section[data-age-pager="true"] .pager-link:hover {
  background: rgba(191, 149, 63, 0.16);
}

/* Tighter section head above Seasons card grid */
section.muted .section-head {
  margin-bottom: clamp(20px, 3vw, 36px);
}
/* Tighter top padding on the Seasons section itself */
section[data-age-pager="true"] + section.muted {
  padding-top: clamp(32px, 5vw, 64px);
}
/* Prose section sitting directly above the pager: trim bottom padding */
section:has(+ section[data-age-pager="true"]) {
  padding-bottom: clamp(24px, 3vw, 40px);
}

/* Age pages: Seasons card grid in 2x2 layout */
section[data-age-pager="true"] + section.muted .card-grid {
  grid-template-columns: 1fr 1fr;
  max-width: 820px;
  margin: 0 auto;
}

/* Platform color modifiers for .btn (homepage) */
.btn.btn--youtube,
.btn-outline.btn--youtube {
  background: #ff0000;
  border-color: #ff0000;
  color: #fff;
}
.btn.btn--youtube:hover,
.btn-outline.btn--youtube:hover {
  background: #cc0000;
  border-color: #cc0000;
  color: #fff;
}
.btn.btn--spotify,
.btn-outline.btn--spotify {
  background: #1DB954;
  border-color: #1DB954;
  color: #fff;
}
.btn.btn--spotify:hover,
.btn-outline.btn--spotify:hover {
  background: #179443;
  border-color: #179443;
  color: #fff;
}
.btn.btn--apple,
.btn-outline.btn--apple {
  background: #9933cc;
  border-color: #9933cc;
  color: #fff;
}
.btn.btn--apple:hover,
.btn-outline.btn--apple:hover {
  background: #7a29a3;
  border-color: #7a29a3;
  color: #fff;
}

/* Start Here - Option 4: book tiles */
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}
@media (max-width: 720px) { .book-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .book-grid { grid-template-columns: 1fr; } }

.book-tile {
  display: block;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.book-tile:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.book-tile .book-ep {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.book-tile h3 {
  font-size: 1.35rem;
  margin: 0 0 6px 0;
}
.book-tile p {
  font-size: 0.92rem;
  color: var(--text-soft);
  margin: 0;
}

/* Current Age highlight (Age II) */
.card.card-current {
  border-color: var(--accent);
  background: rgba(191, 149, 63, 0.06);
  box-shadow: 0 0 0 1px var(--accent);
}
.card.card-current:hover {
  background: rgba(191, 149, 63, 0.12);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}

/* =============================================================
   Music section on Resources page
   ============================================================= */
.music-heading {
  margin-top: 24px;
  margin-bottom: 16px;
}
.music-featured {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
}
.music-item {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.music-item-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  grid-column: 1 / -1;
}
.music-item-head strong { font-size: 1.05rem; }
.music-note { font-size: 0.9rem; color: var(--text-muted); }
.music-item audio { width: 100%; grid-column: 1; }
.music-item .music-dl {
  font-size: 0.85rem;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--text);
  white-space: nowrap;
}
.music-item .music-dl:hover { border-color: var(--accent); color: var(--accent-dark); }

.music-group {
  border-top: 1px solid var(--rule);
  padding: 12px 0;
}
.music-group summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 8px 0;
  list-style: none;
}
.music-group summary::-webkit-details-marker { display: none; }
.music-group summary::before {
  content: "+ ";
  color: var(--accent);
  font-weight: 700;
}
.music-group[open] summary::before { content: "- "; }
.music-list {
  display: grid;
  gap: 10px;
  padding: 12px 0 8px;
}
.music-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(200px, 2fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(210, 210, 215, 0.4);
  font-size: 0.95rem;
}
.music-row:last-child { border-bottom: none; }
.music-row audio { width: 100%; max-width: 320px; height: 36px; }
.music-row a {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.music-row a:hover { color: var(--accent-dark); border-color: var(--accent); }

@media (max-width: 720px) {
  .music-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .music-row audio { max-width: 100%; }
}

/* Resources page: centered 2-card grid */
.card-grid.card-grid-center {
  max-width: 820px;
  margin: 0 auto;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 720px) {
  .card-grid.card-grid-center { grid-template-columns: 1fr; }
}

/* Music section label card (acts as section header) */
.card.card-section-label {
  max-width: 820px;
  margin: 0 auto 32px;
  display: block;
}

/* Music section: 2-column layout — description + files box */
.music-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.4fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 880px) {
  .music-layout { grid-template-columns: 1fr; }
}
.music-intro h2 { margin-top: 0; }
.music-box {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 8px 24px;
}
.music-box .music-group { border-top: 1px solid var(--rule); }
.music-box .music-group:first-child { border-top: none; }

/* Resources: tighten gap between Glossary/Places cards and Music section */
section.tight:has(+ section#music) { padding-bottom: 0; }
section#music { padding-top: clamp(20px, 2vw, 36px); }

/* Homepage Start Here - two options side by side */
.start-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
  text-align: left;
}
.start-option {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
}
.start-option .lead { margin-bottom: 12px; }
.start-option p { margin-bottom: 16px; }
.start-option .btn,
.start-option .btn-accent {
  align-self: flex-start;
  margin-top: auto;
}
@media (max-width: 720px) {
  .start-options { grid-template-columns: 1fr; }
}

/* Sources list - compact bibliographic entries */
.source-list {
  list-style: none;
  padding-left: 0;
  margin: 1em 0 2em;
}
.source-list li {
  font-size: 0.98rem;
  line-height: 1.55;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
}
.source-list li:last-child { border-bottom: none; }
.source-list li em { color: var(--text-soft); }

/* Sources page jump navigation */
.btn-row.source-jump { margin: 16px 0 40px; }
html { scroll-padding-top: 100px; }
h2#primary, h2#scholarship, h2#channels { scroll-margin-top: 100px; }
