:root {
  --ink: #1b1914;
  --ink-soft: #3d3830;
  --muted: #6b645b;
  --paper: #f3eee6;
  --sheet: #fffdf9;
  --line: #e3d9cc;
  --line-strong: #cfc3b2;
  --teal: #0e5f56;
  --teal-deep: #0a3f3a;
  --copper: #a34b2e;
  --gold: #b8893d;
  --wash: #f7f1e6;
  --reflect: #f4efe4;
  --shadow: 0 18px 50px rgba(48, 32, 16, 0.08);
  --nav: 248px;
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
  --sans: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 0.16em; }
a:hover { color: var(--teal-deep); }
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--nav);
  padding: 28px 22px 24px;
  background: #171512;
  color: #f6f1e8;
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.monogram {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 241, 232, 0.35);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
}
.brand small {
  display: block;
  color: rgba(246, 241, 232, 0.62);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand strong {
  font-weight: 600;
  font-size: 0.95rem;
}
.nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav a.item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 8px 8px;
  color: rgba(246, 241, 232, 0.78);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.95rem;
}
.nav a.item span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #d7b56a;
  padding-top: 3px;
}
.nav a.item:hover,
.nav a.item[aria-current="true"] {
  background: rgba(246, 241, 232, 0.08);
  color: white;
}
.nav-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
}
.nav-foot a { color: #f0d7a4; }
.menu-btn { display: none; }

.main {
  margin-left: var(--nav);
}

.cover {
  min-height: 100vh;
  padding: 48px 56px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 48px;
  align-items: end;
  min-width: 0;
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(184, 137, 61, 0.16), transparent 60%),
    linear-gradient(165deg, #1c2422 0%, #121614 55%, #1a1714 100%);
  color: #f7f2ea;
}
.kicker {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d7b56a;
}
.cover h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(3.4rem, 6vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.cover h1 em {
  font-style: italic;
  font-weight: 460;
  color: #f0d7a4;
}
.lede {
  max-width: 38rem;
  margin: 22px 0 0;
  font-size: 1.2rem;
  color: rgba(247, 242, 234, 0.82);
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  border: 1px solid rgba(247, 242, 234, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.92rem;
  color: rgba(247, 242, 234, 0.88);
}
.cover-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f4efe6;
  color: #1b1914;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
}
.button:hover { background: white; color: black; }
.text-link { color: #f0d7a4; }

.plate {
  background: rgba(255, 253, 249, 0.04);
  border: 1px solid rgba(247, 242, 234, 0.14);
  border-radius: 22px;
  padding: 22px;
}
.plate svg { width: 100%; height: auto; }
.plate figcaption {
  margin-top: 8px;
  color: rgba(247, 242, 234, 0.7);
  font-size: 0.92rem;
}
.piece-index {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.piece-index a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: #f7f2ea;
  border-top: 1px solid rgba(247, 242, 234, 0.12);
  padding-top: 8px;
  font-size: 0.98rem;
}
.piece-index a:hover { color: #f0d7a4; }
.piece-index small {
  font-family: var(--mono);
  color: #d7b56a;
}

.chapter, .cover { scroll-margin-top: 16px; }
.chapter {
  padding: 72px 56px;
  max-width: 980px;
}
.subhead {
  font-family: var(--serif);
  margin: 36px 0 0;
  font-size: 1.7rem;
  font-weight: 540;
}
.chapter h2 {
  font-family: var(--serif);
  font-weight: 540;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 12px;
}
.chapter .intro {
  max-width: 42rem;
  color: var(--ink-soft);
  font-size: 1.12rem;
}
.meta {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  margin: 28px 0 0;
  padding: 0;
}
.meta dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper);
  padding-top: 4px;
}
.meta dd { margin: 0; }

.sheet {
  margin-top: 28px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 36px 40px;
}
.letterhead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 22px;
}
.letterhead strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 560;
}
.letterhead p, .signoff p { margin: 0; color: var(--muted); }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.signoff { margin-top: 28px; }
.signoff .name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  color: var(--ink);
  margin-top: 8px;
}

.reflection {
  margin-top: 18px;
  background: var(--reflect);
  border-left: 3px solid var(--gold);
  border-radius: 0 16px 16px 0;
  padding: 22px 26px;
}
.reflection h3, .block h3, .step h3 {
  font-family: var(--serif);
  font-weight: 560;
  margin: 0 0 8px;
  font-size: 1.35rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.spoken {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 8px;
}
.spoken span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tech-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}
.tech-map button {
  text-align: left;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.tech-map button strong { display: block; font-size: 1rem; }
.tech-map button span { color: var(--muted); font-size: 0.9rem; }
.tech-map button:hover,
.tech-map button.is-on {
  border-color: var(--teal);
  background: #f3faf8;
}
.is-lit {
  box-shadow: 0 0 0 3px rgba(14, 95, 86, 0.28);
}

.steps { display: grid; gap: 14px; margin-top: 8px; }
.step {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 18px;
  padding-top: 8px;
}
.num {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--copper);
  line-height: 1;
}
.step ul, .block ul { margin: 8px 0 0; padding-left: 1.1rem; }
.step li + li, .block li + li { margin-top: 4px; }
.why, .milestone {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--wash);
  border-radius: 12px;
}
.why strong, .milestone strong { color: var(--teal-deep); }
.plan {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.98rem;
}
.plan th, .plan td {
  text-align: left;
  vertical-align: top;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}
.plan th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.pull {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.25;
  font-weight: 500;
}

.mail {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: white;
}
.mail-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: #f6f1e8;
  border-bottom: 1px solid var(--line);
}
.dots { display: flex; gap: 6px; }
.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d9c7ae;
  display: block;
}
.mail-bar button, .ghost {
  border: 1px solid var(--line-strong);
  background: white;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
}
.mail-bar button:hover, .ghost:hover { border-color: var(--teal); color: var(--teal-deep); }
.mail-fields { padding: 14px 18px 0; color: var(--muted); font-size: 0.95rem; }
.mail-fields strong { color: var(--ink); font-weight: 650; }
.mail .prose { padding: 8px 18px 22px; }

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 180px;
}
.card .kind {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper);
}
.card h3 { margin: 0; font-family: var(--serif); font-size: 1.45rem; font-weight: 560; }
.card p { margin: 0; color: var(--ink-soft); }
.card .links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.sources { padding-left: 1.2rem; }
.sources li { margin: 0 0 14px; }
.sources em { font-family: var(--serif); }

footer.colophon {
  margin-left: var(--nav);
  padding: 28px 56px 48px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 1120px) {
  .cover {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    align-items: start;
  }
}

@media (max-width: 980px) {
  .nav {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
    gap: 10px;
  }
  .nav ol { display: none; width: 100%; }
  .nav.is-open ol { display: flex; }
  .nav-foot { display: none; }
  .nav.is-open .nav-foot { display: flex; width: 100%; margin-top: 0; }
  .menu-btn {
    display: inline-flex;
    margin-left: auto;
    background: transparent;
    color: #f6f1e8;
    border: 1px solid rgba(246, 241, 232, 0.3);
    border-radius: 999px;
    padding: 6px 12px;
    font: inherit;
  }
  .main, footer.colophon { margin-left: 0; }
  .chapter, .cover { scroll-margin-top: 76px; }
  .cover, .chapter, footer.colophon { padding: 28px 20px 36px; }
  .cover h1 { font-size: clamp(2.35rem, 10vw, 3.2rem); }
  .lede { font-size: 1.05rem; max-width: none; }
  .nav { max-width: 100%; }
  .cover { grid-template-columns: 1fr; min-height: auto; align-items: start; }
  .sheet { padding: 22px 18px; }
  .tech-map, .work-grid, .meta, .step { grid-template-columns: 1fr; }
  .spoken { flex-direction: column; gap: 4px; }
}

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

@media print {
  .nav, .menu-btn, .cover-actions, .tech-map, .mail-bar button { display: none !important; }
  .main, footer.colophon { margin: 0; }
  .cover { min-height: auto; background: white; color: black; }
  .cover h1 em, .kicker, .text-link, .piece-index small { color: black; }
  body { background: white; }
  .sheet, .card, .reflection { box-shadow: none; }
}
