:root {
  color-scheme: dark;
  --night: #101e30;
  --paper: #f6ead8;
  --muted: #b8c0ca;
  --gold: #f5c873;
  --line: rgba(246, 234, 216, .2);
}

* { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(90% 70% at 50% -10%, #243b57 0%, var(--night) 75%);
  color: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-underline-offset: 5px; }
a:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
h1, h2, p { margin-top: 0; }
.back-link { display: inline-block; padding-block: 12px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--paper); }
.eyebrow { margin-bottom: 18px; color: var(--gold); font-size: .75rem; font-weight: 700; letter-spacing: .15em; }
.series { width: min(100% - 56px, 1160px); margin-inline: auto; padding-block: 24px 72px; }
.series-intro { margin-block: 42px 54px; }
.series-intro h1 { margin-bottom: 22px; font: 400 clamp(2.9rem, 7vw, 6rem)/1.02 Georgia, "Times New Roman", serif; letter-spacing: -.05em; }
.series-intro > p:last-child { max-width: 36em; color: var(--muted); font-size: 1.1rem; line-height: 1.6; }
.episode { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); align-items: center; gap: clamp(32px, 6vw, 80px); }
.episode + .episode { margin-top: clamp(48px, 7vw, 88px); padding-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.episode-cover { display: block; }
.episode-cover img { display: block; width: 100%; height: auto; }
.episode-copy { max-width: 510px; }
.episode-copy h2 { margin-bottom: 22px; font: 400 clamp(2rem, 3.7vw, 3.2rem)/1.12 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.episode-copy > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.read-link { display: inline-block; padding-block: 10px; margin-top: 8px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 650; }
.read-link span { padding-left: 10px; color: var(--gold); }
.episode-copy .episode-note { margin-top: 22px; font-size: .85rem; }

.reader-shell { width: min(100% - 32px, 1100px); margin-inline: auto; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.reader-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.reader-header .eyebrow { margin: 0; font-size: .7rem; text-align: right; }
.reader-title { margin: 0 0 18px; font-size: 1rem; text-align: center; font-weight: 500; color: var(--muted); line-height: 1.5; }
.comic-page { width: min(100%, 760px); margin: 0 auto 28px; }
.comic-page img { display: block; width: 100%; height: auto; }
.comic-page figcaption { padding-top: 8px; font-size: .9rem; color: var(--muted); text-align: center; }
.enhanced .comic-page { width: min(100%, max(340px, calc((100svh - 205px) * 2 / 3))); margin-bottom: 0; }
.enhanced .comic-page[hidden] { display: none; }
.enhanced .comic-page figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.navigation { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px auto 0; }
.navigation a, .navigation select { min-height: 46px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--night); color: var(--paper); font: inherit; font-size: .9rem; text-decoration: none; }
.navigation a { display: inline-flex; align-items: center; justify-content: center; }
.navigation .next { background: var(--gold); border-color: var(--gold); color: var(--night); font-weight: 700; }
.navigation a:hover { border-color: var(--gold); }
.page-picker { display: none; }
.enhanced .page-picker { display: block; }
.reader-footer { display: flex; justify-content: center; gap: 24px; margin-top: 8px; }
.reader-footer a { padding: 10px 0; color: var(--muted); font-size: .82rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 700px) {
  .series { width: min(100% - 36px, 520px); padding-top: 16px; }
  .series-intro { margin-block: 28px 38px; }
  .episode { grid-template-columns: 1fr; gap: 28px; }
  .episode-cover { width: min(100%, 330px); }
}
@media (max-width: 460px) {
  .reader-shell { width: calc(100% - 16px); }
  .reader-header { padding-inline: 4px; gap: 10px; }
  .reader-header .back-link { font-size: .87rem; }
  .reader-title { padding-inline: 8px; font-size: .9rem; margin-bottom: 12px; }
  .navigation { gap: 6px; }
  .navigation a, .navigation select { padding: 12px 9px; font-size: .82rem; }
}
@media print {
  body { background: white; }
  .reader-header, .reader-title, .navigation, .reader-footer { display: none; }
  .reader-shell { width: 100%; padding: 0; }
  .enhanced .comic-page, .enhanced .comic-page[hidden], .comic-page { display: block; width: 100%; margin: 0; break-after: page; }
  .comic-page:last-child { break-after: auto; }
  .comic-page figcaption { display: none; }
}
