/* ============================================================
   Aughty — shared styles for index + all episodes
   ============================================================ */

/* ---- Page wrapper (used by every episode) ---- */
body {
  background: #f4f4f0;
  margin: 0;
  font-family: Georgia, serif;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- Episode page: nav link ("← All Episodes") ---- */
nav.episode-nav {
  max-width: 680px;
  width: 100%;
  margin-bottom: 1rem;
  text-align: left;
  box-sizing: border-box;
}
nav.episode-nav a {
  display: inline-block;
  color: #6C63FF;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.05em;
  padding: 0.55rem 1.2rem;
  border: 1.5px solid #6C63FF;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
nav.episode-nav a:hover {
  background: #6C63FF;
  color: #fff;
}

/* ---- Episode page: bottom nav (Prev | All | Next) ---- */
nav.episode-nav-bottom {
  max-width: 680px;
  width: 100%;
  margin: 1.5rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.75rem;
  box-sizing: border-box;
  font-family: Georgia, serif;
}
nav.episode-nav-bottom a,
nav.episode-nav-bottom span {
  flex: 1;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.6rem 0.4rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1.5px solid #6C63FF;
  color: #6C63FF;
  background: #fff;
  transition: background 0.15s, color 0.15s;
  box-sizing: border-box;
}
nav.episode-nav-bottom a:hover {
  background: #6C63FF;
  color: #fff;
}
nav.episode-nav-bottom .nav-all {
  background: #6C63FF;
  color: #fff;
  font-weight: bold;
}
nav.episode-nav-bottom .nav-all:hover { background: #4d44d6; }
nav.episode-nav-bottom .nav-disabled {
  border-color: #e5e5ee;
  color: #c8c8d4;
  pointer-events: none;
  background: #fafafa;
}

@media (max-width: 520px) {
  nav.episode-nav-bottom { gap: 0.4rem; }
  nav.episode-nav-bottom a,
  nav.episode-nav-bottom span {
    font-size: 0.78rem;
    padding: 0.5rem 0.25rem;
    letter-spacing: 0.02em;
  }
}

/* ---- Episode page: the SVG itself ---- */
svg.episode {
  max-width: 680px;
  width: 100%;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.15);
}

/* ---- Shared SVG text styles (override inline attributes) ---- */
svg.episode text.caption {
  font-family: Georgia, serif;
  font-size: 9px;
  fill: #444444;
  text-anchor: middle;
}

/* ---- Title-bar text (brand mark, episode number, episode title) ---- */
svg.episode text.brand,
svg.episode text.episode-num {
  font-family: Georgia, serif;
  font-size: 9px;
  fill: #b3acff;
  text-anchor: middle;
}
svg.episode text.brand {
  font-size: 18px;
  letter-spacing: 0.18em;
}
svg.episode text.episode-num { letter-spacing: 0.1em; }

svg.episode text.episode-title {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: bold;
  fill: #ffffff;
  text-anchor: middle;
}

/* ---- Episode-number badge (filled disc, top-right of header) ---- */
svg.episode circle.episode-badge { fill: #6C63FF; }
svg.episode text.episode-badge-num {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: bold;
  fill: #ffffff;
  text-anchor: middle;
}

svg.episode text.dialog-name {
  font-family: Georgia, serif;
  font-size: 12px;
  fill: #1a1a2e;
  font-weight: bold;
}

svg.episode text.dialog-text {
  font-family: Georgia, serif;
  font-size: 12px;
  fill: #1a1a2e;
}

svg.episode text.narrator {
  font-family: Georgia, serif;
  font-size: 13px;
  fill: #ffffff;
}

svg.episode text.narrator-soft {
  font-family: Georgia, serif;
  font-size: 13px;
  fill: #ccccff;
}

svg.episode .panel-divider {
  stroke: #cccccc;
  stroke-width: 1;
}

svg.episode .narrator-divider {
  stroke: #333360;
  stroke-width: 0.8;
}

/* ---- Whisper note (italic line at the bottom of an episode) ---- */
.whisper-note {
  font-family: Georgia, serif;
  font-size: 14px;
  color: #555555;
  font-style: italic;
  text-align: center;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 0 8px;
}

/* ============================================================
   Index page
   ============================================================ */

body.index {
  display: block;          /* override the column-flex used on episode pages */
  align-items: initial;
}

.index h1 {
  text-align: center;
  color: #12122a;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.index .sub {
  text-align: center;
  color: #6C63FF;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  margin-bottom: 3rem;
}

.index .tagline {
  text-align: center;
  color: #555;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.index .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.index .card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.15s;
}
.index .card:hover { transform: translateY(-3px); }
.index .card a { text-decoration: none; color: inherit; display: block; }

.index .card-num {
  background: #12122a;
  color: #ffffff;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  padding: 0.5rem 1rem;
}

.index .card-title {
  font-size: 1.1rem;
  padding: 1rem;
  color: #1a1a2e;
  border-bottom: 1px solid #f0f0f0;
}

.index .card-footer {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #aaa;
  font-style: italic;
}

.index .spectrum {
  height: 4px;
  background: linear-gradient(90deg, #6C63FF, #1D9E75, #FF6B6B, #F59E0B, #6C63FF);
  margin-bottom: 2rem;
}

.index .name { color: #6C63FF; }

.index .index-footer {
  text-align: center;
  margin-top: 3rem;
  color: #444;
  font-size: 1rem;
}

/* ============================================================
   References (source-material credits) — episode pages
   ============================================================ */
section.episode-references {
  max-width: 680px;
  width: 100%;
  margin: 1.5rem auto 0;
  box-sizing: border-box;
  font-family: Georgia, serif;
  background: #fff;
  border: 1.5px solid #e5e5ee;
  border-radius: 6px;
  padding: 0.9rem 1.2rem;
}
section.episode-references h2 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #444;
}
section.episode-references ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
section.episode-references li {
  font-size: 0.85rem;
  color: #333;
  line-height: 1.6;
}
section.episode-references li + li {
  margin-top: 0.35rem;
}
section.episode-references a {
  color: #6C63FF;
  text-decoration: none;
  word-break: break-word;
}
section.episode-references a:hover {
  text-decoration: underline;
}

/* ============================================================
   Footer (copyright / license) — used on every page
   ============================================================ */
footer.site-footer {
  max-width: 680px;
  width: 100%;
  margin: 1.5rem auto 0;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 0.85rem;
  color: #888;
  font-style: italic;
  line-height: 1.5;
}
footer.site-footer a {
  color: #6C63FF;
  text-decoration: none;
}
footer.site-footer a:hover {
  text-decoration: underline;
}
