/* Episode page styles. Self-contained: defines fonts, colors, and
   layout for /ep### pages. Visual identity mirrors index.html's
   cream-card theme without re-importing its 700-line inline block. */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/playfair-display.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-italic.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; max-width: 100vw; }

:root {
  --cream:   #f5eedc;
  --cream-d: #ede3c8;
  --navy:    #1e3a5f;
  --navy-l:  #2c5282;
  --orange:  #f7931a;
  --orange-d:#d97b0e;
  --text:    #2d2010;
  --muted:   #6b5a3e;
  --border:  #d4c4a0;
  --white:   #fffdf7;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--orange); }

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

/* ── Nav (mirrors index.html) ──────────────────────────────────── */
#top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-logo {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--orange);
  text-decoration: none;
}
.nav-logo img { width: 100%; height: 100%; object-fit: cover; }
.nav-site-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.02em;
  text-decoration: none;
  flex: 1;
}
.nav-site-name:hover { color: var(--orange); }
nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}
nav ul li a {
  color: var(--cream-d);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
nav ul li a:hover {
  background: rgba(247,147,26,0.18);
  color: var(--orange);
}
@media (max-width: 720px) {
  nav ul { display: none; }
}

/* ── Main + card ───────────────────────────────────────────────── */
.ep-main {
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}
.ep-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 2rem 2.25rem;
  box-shadow: 0 4px 16px rgba(30,58,95,0.07);
}
.ep-card + .ep-card { margin-top: 1.5rem; }
.ep-num {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
}
.ep-title {
  margin-top: 0.9rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.ep-date {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
}
.ep-player {
  margin-top: 1.5rem;
  width: 100%;
}
.ep-player::-webkit-media-controls-panel {
  background: var(--cream-d);
}

/* ── Actions row ───────────────────────────────────────────────── */
.ep-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary {
  background: var(--navy);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--navy-l);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--cream);
}
.btn-boost {
  background: var(--orange);
  color: var(--white);
}
.btn-boost:hover {
  background: var(--orange-d);
  color: var(--white);
}
.btn-boost:disabled { opacity: 0.7; cursor: wait; }
.btn-boost svg { flex-shrink: 0; }
.btn-primary:disabled { opacity: 0.7; cursor: wait; }

/* ── Subscribe-in-app dropdown (mirrors index.html .ep-subscribe) ─ */
.ep-subscribe { position: relative; display: inline-block; }
.btn-subscribe {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.btn-subscribe::-webkit-details-marker { display: none; }
.btn-subscribe::marker { content: ''; }
.btn-subscribe:hover { background: var(--navy); color: var(--cream); }
.btn-subscribe .caret {
  font-size: 0.75em;
  transition: transform 0.15s;
}
.ep-subscribe[open] .btn-subscribe { background: var(--navy); color: var(--cream); }
.ep-subscribe[open] .btn-subscribe .caret { transform: rotate(180deg); }
.ep-subscribe-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 50;
  min-width: 180px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 0.35rem 0;
  display: flex;
  flex-direction: column;
}
.ep-subscribe-menu a {
  padding: 0.55rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.12s, color 0.12s;
}
.ep-subscribe-menu a:hover {
  background: rgba(247, 147, 26, 0.10);
  color: var(--orange);
}

/* ── Shownotes card ────────────────────────────────────────────
   Paragraph 1 always rendered. Paragraphs 2+ live inside a <details>
   that toggles with a "Show more / Show less" pill. `overflow-wrap`
   on the body breaks the long Silent Payment / Paynym strings so they
   don't overflow the card. */
.shownotes-body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  overflow-wrap: anywhere;
}
.shownotes-body p { margin-bottom: 1rem; }
.shownotes-body p:last-child { margin-bottom: 0; }
.shownotes-body a {
  color: var(--navy-l);
  font-weight: 600;
}

.shownotes-more {
  margin-top: 0.5rem;
}
.shownotes-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-l);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--cream);
  user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.shownotes-more > summary::-webkit-details-marker { display: none; }
.shownotes-more > summary::marker { content: ''; }
.shownotes-more > summary::after {
  content: '▾';
  font-size: 0.75rem;
  margin-left: 0.1rem;
  transition: transform 0.15s;
}
.shownotes-more[open] > summary::after { transform: rotate(180deg); }
.shownotes-more > summary:hover {
  background: var(--white);
  border-color: var(--orange);
  color: var(--orange);
}
.shownotes-more[open] > summary .shownotes-label-more { display: none; }
.shownotes-more:not([open]) > summary .shownotes-label-less { display: none; }
.shownotes-rest {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

/* ── People (Hosts / Guests) ──────────────────────────────────── */
.ep-people {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}
/* First .ep-people in a card has no separator — the card itself is
   the separator. Subsequent sections (e.g. Guests after Hosts) get
   the divider. */
.ep-card-people .ep-people:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.ep-people h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.85rem;
}
.people-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.person { margin: 0; }
.person-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  text-decoration: none;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.person-link:hover {
  background: var(--white);
  border-color: var(--orange);
  color: var(--orange);
}
.person-avatar {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream-d);
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.person-npub {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}
.person-name { color: inherit; }

/* ── Back link + footer ───────────────────────────────────────── */
.ep-back {
  margin-top: 2rem;
  font-size: 0.95rem;
}
.ep-back a {
  color: var(--navy-l);
  font-weight: 600;
}
.ep-footer {
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.ep-footer a {
  color: var(--navy-l);
  font-weight: 600;
}

/* ── 404 state ─────────────────────────────────────────────────── */
.ep-404 h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--navy);
  margin-bottom: 0.8rem;
}
.ep-404 p { margin-bottom: 0.9rem; }

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .ep-main { padding: 1.5rem 0.75rem 2.5rem; }
  .ep-card { padding: 1.4rem 1.1rem 1.6rem; border-radius: 10px; }
  .ep-actions .btn { font-size: 0.82rem; padding: 0.45rem 0.8rem; }
}
