:root {
  --bg: #07090e;
  --bg-elev: #10141c;
  --ink: #e7e2d4;
  --ink-dim: #9a9486;
  --rule: rgba(231, 226, 212, 0.12);
  --copper: #c58a3a;
  --copper-soft: #e0b06a;
  --cyan: #5ec8de;
  --measure: 38rem;
  --display: "Fraunces", "Literata", "Iowan Old Style", Georgia, serif;
  --body: "Literata", "Iowan Old Style", Georgia, serif;
  --ui: "Source Sans 3", "Helvetica Neue", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(197, 138, 58, 0.35); color: #fff; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--copper-soft); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #fff; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: #000; padding: .5rem 1rem; z-index: 30; }

.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--copper), var(--cyan));
  z-index: 40;
  pointer-events: none;
}

.cover {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: end stretch;
  overflow: hidden;
  color: #f4efe4;
  background:
    radial-gradient(1200px 600px at 70% 20%, rgba(94,200,222,0.12), transparent 55%),
    radial-gradient(900px 500px at 20% 80%, rgba(197,138,58,0.16), transparent 50%),
    linear-gradient(180deg, #0a1018 0%, #07090e 100%);
}
.cover img.hero {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 38%;
  filter: brightness(0.7) saturate(1.08);
}
.cover::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,9,14,0.12) 0%, rgba(7,9,14,0.28) 46%, rgba(7,9,14,0.94) 100%);
}
.cover-copy {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.5rem 3rem;
  max-width: 46rem;
}
.kicker {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper-soft);
  margin: 0 0 1rem;
}
.cover h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3.2rem, 12vw, 6.4rem);
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
  text-transform: uppercase;
}
.cover .subtitle {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  color: #d9d2c2;
  margin: 0 0 1.4rem;
}
.cover .byline {
  font-family: var(--ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--copper);
  margin: 0 0 1.6rem;
}
.cover p.lede {
  max-width: 34rem;
  color: #c9c3b4;
  font-size: 1.02rem;
  margin: 0 0 1.8rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.btn {
  font-family: var(--ui);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(231,226,212,0.28);
  color: var(--ink);
  background: transparent;
  padding: 0.7rem 1rem;
  text-decoration: none;
  border-radius: 999px;
}
.btn.primary { background: var(--copper); border-color: var(--copper); color: #1a1208; font-weight: 600; }
.btn:hover { background: #fff; color: #111; border-color: #fff; }

.bar {
  position: sticky; top: 0; z-index: 8;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1rem;
  background: rgba(7,9,14,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bar a { color: var(--ink-dim); text-decoration: none; }
.bar a:hover { color: var(--ink); }
.bar .mark { color: var(--copper-soft); }
.bar .bar-end { display: flex; align-items: center; gap: 0.9rem; margin-left: auto; }
.bar button.listen {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--copper-soft);
  background: transparent;
  border: 1px solid rgba(224, 176, 106, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}
.bar button.listen[aria-pressed="true"] {
  background: var(--copper);
  border-color: var(--copper);
  color: #1a1208;
}
.bar button.listen:hover { color: #fff; border-color: #fff; }
.bar button.listen[aria-pressed="true"]:hover { color: #1a1208; background: #e0b06a; }
p.is-reading, h2.is-reading, .ch-num.is-reading {
  background: linear-gradient(90deg, rgba(197,138,58,0.16), transparent 88%);
  box-decoration-break: clone;
}

.toc-wrap, .colophon, .plate-block, article.chapter, .part-break {
  width: min(var(--measure), calc(100% - 2.4rem));
  margin-inline: auto;
}
.toc-wrap { padding: 4rem 0 3rem; }
.toc-wrap h2, .colophon h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.8rem;
  margin: 0 0 1.4rem;
}
.toc { list-style: none; margin: 0; padding: 0; }
.toc li { border-top: 1px solid var(--rule); }
.toc a {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 0;
  color: var(--ink);
  text-decoration: none;
}
.toc a:hover { color: var(--copper-soft); }
.toc .num { color: var(--ink-dim); font-family: var(--ui); font-size: 0.78rem; letter-spacing: 0.08em; }
.toc .part {
  margin-top: 1.4rem;
  padding-top: 0.4rem;
  color: var(--cyan);
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 0;
}

.plate-block {
  width: min(56rem, calc(100% - 1.5rem));
  margin: 2.6rem auto 3.4rem;
}
.plate-block img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.plate-block figcaption {
  font-family: var(--ui);
  font-size: 0.78rem;
  color: var(--ink-dim);
  letter-spacing: 0.03em;
  margin-top: 0.75rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--copper);
}
.quote-plate { width: min(42rem, calc(100% - 1.5rem)); margin: 3rem auto; }

.part-break { padding: 4.5rem 0 1rem; text-align: center; }
.part-break .label {
  font-family: var(--ui);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--cyan);
}
.part-break h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0.5rem 0 0;
}

article.chapter,
.part-break,
.toc-wrap,
.colophon { scroll-margin-top: 3.2rem; }

article.chapter { padding: 3.2rem 0 1rem; }
article.chapter header .ch-num {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 0.5rem;
}
article.chapter h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  line-height: 1.15;
  margin: 0 0 1.8rem;
}
article.chapter p {
  margin: 0 0 0.95em;
  text-wrap: pretty;
  hyphens: auto;
}
article.chapter p.first { font-size: 1.16rem; }
article.chapter p.first::first-letter {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.15em;
  color: var(--copper-soft);
}
.scene {
  display: block;
  text-align: center;
  color: var(--ink-dim);
  letter-spacing: 0.4em;
  margin: 1.9rem 0;
  border: 0;
}
.scene::before { content: "*  *  *"; }

.colophon {
  padding: 3rem 0 5rem;
  color: var(--ink-dim);
  font-size: 0.98rem;
}
.meta-grid {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.35rem 1rem;
  font-family: var(--ui);
  font-size: 0.86rem;
  margin: 1.4rem 0 2rem;
}
.meta-grid dt {
  color: var(--copper);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
  padding-top: 0.25rem;
}

footer.site {
  border-top: 1px solid var(--rule);
  padding: 1.2rem 1.5rem 2rem;
  font-family: var(--ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

@media (min-width: 900px) {
  body { font-size: 1.18rem; }
  .cover-copy { padding: 3rem 4rem 4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  :root { --bg: #fff; --ink: #111; --ink-dim: #444; }
  body { background: #fff; color: #111; }
  .cover, .bar, .actions, footer.site, .progress { display: none; }
  article.chapter { break-before: page; }
  a { color: inherit; text-decoration: none; }
}
