:root {
  --bg: #100e0c;
  --ink: #f3efe6;
  --muted: #b7b1a6;
  --faint: #a39e94;
  --line: rgba(243, 239, 230, 0.14);
  --focus: #e7c56a;
  --serif: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
  --measure: 38rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

::selection { background: #3c3428; color: var(--ink); }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--focus);
  color: #1c1608;
  padding: 8px 12px;
  border-radius: 4px;
  z-index: 6;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(1120px, calc(100% - 2 * clamp(1.25rem, 4.5vw, 4rem)));
  margin-inline: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(16, 14, 12, 0.78);
  backdrop-filter: blur(16px);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  min-height: 4.25rem;
}

.mark {
  display: block;
  line-height: 0;
  flex: 0 0 auto;
}
.mark img {
  width: 7.15rem;
  height: auto;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.35rem;
}
.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--faint);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}
.top-nav a:hover,
.top-nav a[aria-current="true"] { color: var(--ink); }

.top.is-scrolled { box-shadow: inset 0 -1px 0 var(--line); }

.hero .wrap { padding: 0.4rem 0 clamp(5rem, 10vw, 7.5rem); }

.hero-spread { display: grid; gap: clamp(1.6rem, 3vw, 2.35rem); }

.hero-shot,
.companion-shot { margin: 0; }

.hero-shot img,
.companion-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  margin: 0;
  max-width: 11em;
  font-size: clamp(1.9rem, 1.05rem + 2.5vw, 3.45rem);
  line-height: 1.06;
}
h1 em {
  display: block;
  font-style: italic;
  font-weight: 400;
}

.lede, .prose p, .follow, .steps p, .local span {
  color: var(--muted);
  text-wrap: pretty;
}

.lede {
  margin: 1.05rem 0 0;
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.55;
}

.facts {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1.5rem;
  margin: clamp(1.75rem, 4vw, 2.75rem) 0 0;
  padding: 1.15rem 0 0;
  border-top: 1px solid var(--line);
}
.facts li {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.chapter { scroll-margin-top: 4.5rem; }

.chapter .wrap {
  border-top: 1px solid var(--line);
  padding: clamp(4.25rem, 8vw, 6.5rem) 0;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 1.15rem;
  max-width: 12em;
  font-size: clamp(2.15rem, 1.2rem + 2.4vw, 3.35rem);
  line-height: 1.12;
}

.prose p, .follow {
  margin: 0;
  max-width: var(--measure);
  font-size: 1.125rem;
}

.prose p + p { margin-top: 1rem; }

.split-idea { display: grid; gap: 2.25rem; }

.pages {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.75rem;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.pages li {
  margin: 0;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.more {
  margin: 0.9rem 0 0;
  color: var(--faint);
  font-size: 0.98rem;
}

.follow { margin-top: clamp(2.25rem, 5vw, 3.5rem); }

.companion-spread {
  display: grid;
  gap: 1.75rem;
}

.companion-shot figcaption,
.canvas-fig figcaption {
  margin-top: 0.7rem;
  color: var(--faint);
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 42rem;
}

.canvas-fig {
  margin: clamp(3.25rem, 6vw, 4.75rem) 0 0;
  max-width: 32rem;
}
.canvas-fig canvas {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg);
  border-radius: 2px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.steps {
  list-style: none;
  margin: clamp(2.25rem, 5vw, 3.25rem) 0 0;
  padding: 0;
  display: grid;
}
.steps li {
  margin: 0;
  padding: 1.35rem 0 1.45rem;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }

.num {
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--faint);
}

.steps h3 {
  margin: 0 0 0.45rem;
  font-size: 1.55rem;
  line-height: 1.2;
}
.steps p { margin: 0; max-width: 36rem; }
.steps strong { font-weight: 600; color: var(--ink); }
.steps a {
  color: var(--ink);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.local {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 1.25rem;
  margin: 2rem 0 0;
}
.local a {
  color: var(--ink);
  font-size: 1.125rem;
  text-underline-offset: 0.2em;
}
.local span { font-size: 0.98rem; }

.foot .wrap {
  border-top: 1px solid var(--line);
  padding: 2.75rem 0 4rem;
}
.foot img { width: 8.5rem; height: auto; }
.foot p {
  margin: 0.85rem 0 0;
  color: var(--muted);
}
.foot a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 839px) {
  .hero {
    min-height: calc(100vh - 4.5rem);
    min-height: calc(100svh - 4.5rem);
    display: flex;
    flex-direction: column;
  }
  .hero .wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 1.6rem;
  }
  .facts { margin-top: 1.75rem; }
}

@media (max-width: 380px) {
  .mark img { width: 4.85rem; }
  .top-bar { gap: 0.6rem; }
  .top-nav { flex-wrap: nowrap; gap: 0.65rem; }
  .top-nav a { font-size: 0.82rem; }
  .pages { gap: 0 1rem; }
  .pages li { font-size: 1.12rem; }
}

@media (min-width: 720px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 840px) {
  .hero-copy {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    gap: 1rem 3.25rem;
    align-items: start;
  }
  .lede {
    margin-top: 0.55rem;
    max-width: 28rem;
  }
}

@media (min-width: 900px) {
  .split-idea {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
  }
  .cast { padding-top: 0.15rem; }

  .companion-spread {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
  }

  .steps {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2.25rem;
  }
  .steps li {
    padding: 1.15rem 0.5rem 0 0;
    border-bottom: 0;
  }
  .steps li:last-child { border-bottom: 0; }
}

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

.missing {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 3rem 1.25rem 4rem;
  gap: 0.2rem;
}

.missing img {
  width: min(16rem, 72vw);
  margin-bottom: 0.8rem;
}

.missing h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.1rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.45rem;
}

.missing p {
  color: var(--muted);
  margin: 0 0 1.15rem;
}

.missing .home-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 1.05rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
