/* From the File — archival paper aesthetic, document-first (visual pass 2) */

:root {
  --bg: #f2ebe0;
  --bg-card: #fbf8f1;
  --bg-panel: #f7f1e6;
  --ink: #1a1a18;
  --ink-muted: #4a4a44;
  --ink-faint: #6e6e66;
  --cream: #f7f5f0;
  --rule: #cbbfaa;
  --accent: #1e3a5f;
  --accent-deep: #152a45;
  --accent-soft: #e4dccb;
  --accent-tint: rgba(30, 58, 95, 0.1);
  --stamp: #8b3a2a;
  --stamp-deep: #6e2e22;
  --stamp-soft: rgba(139, 58, 42, 0.14);
  --stamp-mid: rgba(139, 58, 42, 0.22);
  --link: #1e3a5f;
  --link-hover: #8b3a2a;
  --shadow: 0 1px 2px rgba(30, 58, 95, 0.07), 0 3px 12px rgba(30, 58, 95, 0.06);
  --shadow-lift: 0 2px 4px rgba(30, 58, 95, 0.08), 0 8px 20px rgba(30, 58, 95, 0.08);
  --max: 42rem;
  --wide: 56rem;
  --font: "Georgia", "Times New Roman", "Liberation Serif", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(30, 58, 95, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at 12% 0%, rgba(139, 58, 42, 0.07), transparent 50%),
    radial-gradient(ellipse at 88% 8%, rgba(30, 58, 95, 0.06), transparent 45%),
    radial-gradient(circle at 1px 1px, rgba(26, 26, 24, 0.035) 1px, transparent 0);
  background-size: 100% 1.65rem, 100% 100%, 100% 100%, 4px 4px;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
}

/* —— Header / nav (navy band, cream type) —— */
.site-header {
  border-bottom: 3px solid var(--stamp);
  background: var(--accent);
  box-shadow: var(--shadow);
}

.site-header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cream);
  text-decoration: none;
  margin: 0;
}

.site-title:hover {
  color: #fff;
}

.site-mark {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: var(--cream);
  opacity: 0.95;
}

.site-title:hover .site-mark {
  color: #fff;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.site-nav a {
  color: rgba(247, 245, 240, 0.82);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.1rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--stamp);
}

/* —— Main —— */
main {
  flex: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

main.wide {
  max-width: var(--wide);
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
}

.tagline {
  font-style: italic;
  color: var(--ink-muted);
  margin: 0.35rem 0 0;
  font-size: 1rem;
}

h1 {
  font-size: 1.85rem;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  margin: 2.25rem 0 0.75rem;
  font-weight: 700;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 0.35rem;
  color: var(--accent-deep);
}

h3 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.5rem;
  font-weight: 700;
}

p {
  margin: 0 0 1.1rem;
}

ul, ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.45rem;
}

li + li {
  margin-top: 0.35rem;
}

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

/* —— Home / hero dossier —— */
.hero {
  margin-bottom: 1.75rem;
  position: relative;
}

.hero-dossier {
  display: grid;
  grid-template-columns: 0.7rem 1fr;
  gap: 0;
  align-items: stretch;
  box-shadow: var(--shadow-lift);
  border-radius: 2px;
  overflow: hidden;
}

.hero-file-strip {
  background:
    repeating-linear-gradient(
      180deg,
      var(--accent) 0 0.55rem,
      var(--accent-deep) 0.55rem 0.7rem,
      var(--stamp) 0.7rem 0.85rem,
      var(--accent-deep) 0.85rem 1rem
    );
  min-height: 100%;
}

.hero-panel {
  position: relative;
  background:
    linear-gradient(135deg, rgba(30, 58, 95, 0.04) 0%, transparent 42%),
    linear-gradient(180deg, #fffdf8 0%, var(--bg-panel) 100%);
  border: 1px solid var(--rule);
  border-left: none;
  padding: 1.35rem 1.35rem 1.45rem;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--stamp) 0 28%, var(--accent) 28% 100%);
}

.hero-stamp {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  width: 4.1rem;
  height: 4.1rem;
  border: 2.5px solid var(--stamp);
  border-radius: 50%;
  color: var(--stamp);
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  transform: rotate(12deg);
  opacity: 0.88;
  background: radial-gradient(circle at 40% 35%, rgba(251, 248, 241, 0.9), rgba(139, 58, 42, 0.06));
  box-shadow: inset 0 0 0 1px rgba(139, 58, 42, 0.25);
  pointer-events: none;
  z-index: 1;
}

.hero-stamp span {
  display: block;
  max-width: 3.2rem;
}

.hero .season-label {
  margin-bottom: 0.65rem;
}

.hero h1 {
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
  margin-bottom: 0.45rem;
  padding-right: 4.5rem;
}

.hero .tagline {
  color: var(--ink-muted);
  font-size: 1.02rem;
  max-width: 28rem;
}

.season-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--stamp);
  margin: 0 0 0.55rem;
  font-weight: 700;
}

/* —— CTA (navy panel, cream type) —— */
.cta-box {
  background:
    linear-gradient(145deg, var(--accent) 0%, var(--accent-deep) 100%);
  border: 1px solid var(--accent-deep);
  border-left: 5px solid var(--stamp);
  padding: 1.4rem 1.45rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow-lift);
  position: relative;
  color: var(--cream);
  border-radius: 2px;
}

.cta-box::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 18px 18px 0;
  border-color: transparent var(--stamp) transparent transparent;
  opacity: 0.85;
}

.cta-box p {
  color: rgba(247, 245, 240, 0.92);
}

.cta-box strong {
  color: #fff;
  font-weight: 700;
}

.cta-box .btn {
  background: var(--cream);
  color: var(--accent-deep);
  border-color: var(--cream);
}

.cta-box .btn:hover {
  background: #fff;
  color: var(--stamp);
  border-color: #fff;
}

.cta-box .btn-secondary {
  background: transparent;
  color: var(--cream);
  border-color: rgba(247, 245, 240, 0.55);
}

.cta-box .btn-secondary:hover {
  background: rgba(247, 245, 240, 0.12);
  color: #fff;
  border-color: var(--cream);
}

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: var(--cream);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 2px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--stamp-soft);
  color: var(--stamp);
  border-color: var(--stamp);
}

/* —— Episode list (home) —— */
.episode-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.episode-list li {
  border: 1px solid var(--rule);
  border-left: 5px solid var(--stamp);
  background: var(--bg-card);
  padding: 1.05rem 1.15rem 1.1rem 1.2rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-shadow: var(--shadow);
  border-radius: 2px;
  position: relative;
}

.episode-list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.episode-list .ep-meta {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  display: inline-block;
  background: var(--stamp);
  padding: 0.22rem 0.55rem;
  border-radius: 2px;
  width: fit-content;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.episode-list a.ep-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--accent-deep);
  text-decoration: none;
}

.episode-list a.ep-title:hover {
  color: var(--stamp);
  text-decoration: underline;
}

.ep-desc {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin: 0.15rem 0 0;
}

/* —— Episode page —— */
.ep-header {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--stamp);
  box-shadow: var(--shadow);
  border-radius: 2px;
}

.ep-header .runtime {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0;
}

.audio-player {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  padding: 1rem 1.15rem;
  margin: 0 0 2rem;
  box-shadow: var(--shadow);
  border-radius: 2px;
}

.audio-player label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stamp);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.audio-player audio {
  width: 100%;
  height: 2.5rem;
}

.audio-note {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0.5rem 0 0;
}

.essay p:first-of-type::first-letter {
  font-size: 1.35em;
  font-weight: 700;
  color: var(--accent);
}

.citations {
  font-size: 0.92rem;
}

.citations ol {
  padding-left: 1.5rem;
}

.citations li {
  margin-bottom: 0.75rem;
  color: var(--ink-muted);
}

.further-reading ul {
  font-size: 0.95rem;
}

.unsettled {
  background: var(--accent-tint);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  border-radius: 0 2px 2px 0;
}

.unsettled p:last-child {
  margin-bottom: 0;
}

.reading-room {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

/* —— Subscribe —— */
.subscribe-box {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--accent);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
  border-radius: 2px;
}

.subscribe-box iframe {
  width: 100%;
  min-height: 320px;
  border: none;
}

.note-muted {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.75rem;
}

/* —— Footer —— */
.site-footer {
  border-top: 3px solid var(--accent);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.site-footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

.site-footer a {
  color: var(--ink-muted);
}

.site-footer a:hover {
  color: var(--stamp);
}

/* —— Breadcrumb —— */
.breadcrumb {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--link);
  text-decoration: underline;
}

/* —— Season hub stacked cards —— */
.season-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0 0;
}

.ep-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--stamp);
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: var(--shadow);
  border-radius: 2px;
}

.ep-card-header {
  margin-bottom: 0.35rem;
}

.ep-card .ep-meta {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  display: inline-block;
  background: var(--stamp);
  padding: 0.22rem 0.55rem;
  border-radius: 2px;
  margin-bottom: 0.45rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.ep-card-title {
  font-size: 1.2rem;
  margin: 0;
  border: none;
  padding: 0;
  font-weight: 700;
  color: var(--accent-deep);
}

.ep-card-title a {
  color: var(--accent-deep);
  text-decoration: none;
}

.ep-card-title a:hover {
  color: var(--stamp);
  text-decoration: underline;
}

.ep-card .ep-desc {
  margin: 0.4rem 0 0.85rem;
}

.ep-card .audio-player {
  margin: 0.75rem 0 0.65rem;
}

.ep-card-link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
}

.ep-card--coming {
  background: transparent;
  border-style: dashed;
  border-left-style: solid;
  border-left-color: var(--rule);
  opacity: 0.82;
  box-shadow: none;
}

.ep-card--coming .ep-meta {
  color: var(--ink-faint);
  background: var(--accent-soft);
  box-shadow: none;
}

.ep-card--coming .ep-card-title {
  color: var(--ink-faint);
  font-weight: 600;
}

.ep-card--coming .ep-desc {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.season-placeholder .ep-title {
  font-size: 1.1rem;
  font-weight: 700;
}

/* —— Episode pager —— */
.ep-pager {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.ep-pager-back {
  margin: 0 0 0.85rem;
}

.ep-pager-links {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  margin: 0;
}

.ep-pager .muted {
  color: var(--ink-faint);
}

/* —— Utility —— */
.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;
}

@media (max-width: 520px) {
  html {
    font-size: 17px;
  }

  h1,
  .hero h1 {
    font-size: 1.55rem;
  }

  .hero h1 {
    padding-right: 3.6rem;
  }

  .hero-stamp {
    width: 3.35rem;
    height: 3.35rem;
    font-size: 0.52rem;
    top: 0.65rem;
    right: 0.65rem;
  }

  .hero-panel {
    padding: 1.15rem 1rem 1.25rem;
  }

  main {
    padding: 1.5rem 1rem 2.5rem;
  }

  .ep-card {
    padding: 1rem;
  }

  .ep-pager-links {
    flex-direction: column;
  }

  .site-header-inner {
    padding: 0.75rem 1rem;
  }

  .cta-box {
    padding: 1.2rem 1.1rem;
  }

  body {
    background-size: 100% 1.55rem, 100% 100%, 100% 100%, 4px 4px;
  }
}

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

  .btn {
    transition: none;
  }
}
