:root {
  --charcoal: #0B0B0D;
  --ink: #111114;
  --ink-2: #15171C;            /* one raised surface, used sparingly */
  --verdigris: #43B3AE;
  --verdigris-soft: rgba(67, 179, 174, 0.14);
  --sienna: #B15C3D;
  --amber: #D5A456;
  --vellum: #F4EDE0;
  --vellum-dim: rgba(244, 237, 224, 0.58);
  --vellum-faint: rgba(244, 237, 224, 0.36);
  --hairline: rgba(244, 237, 224, 0.12);
  --hairline-strong: rgba(244, 237, 224, 0.22);
  --bg-center: #141A22;
  --bg-edge: #05070A;
  --grain-url: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.420 0 0 0 0 0.455 0 0 0 0 0.502 0 0 0 0.17 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  --grain-opacity: 0.34;

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --measure: 62ch;
  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* chapter pages — the :root block above is generated from redesign/src.html */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  background:
    radial-gradient(ellipse 42% 30% at 72% 72%, rgba(150, 110, 60, 0.055), transparent 58%) fixed,
    radial-gradient(ellipse 55% 38% at 30% 22%, rgba(110, 140, 170, 0.11), transparent 66%) fixed,
    radial-gradient(ellipse 130% 95% at 50% 42%, var(--bg-center) 0%, var(--bg-edge) 100%) center center fixed;
  background-color: var(--bg-edge);
  color: var(--vellum);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1000;
  background-image: var(--grain-url); opacity: var(--grain-opacity); mix-blend-mode: overlay;
}
a { color: inherit; }
:focus-visible { outline: 1px solid var(--verdigris); outline-offset: 4px; }
em { font-style: italic; }

.mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--vellum-dim); line-height: 1.7; }
.mono b { font-weight: 400; color: var(--verdigris); }

.btn { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; padding: 14px 24px; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease); border: 1px solid transparent; white-space: nowrap; }
.btn-accent { color: var(--verdigris); border-color: rgba(67,179,174,0.45); }
.btn-accent:hover { background: var(--verdigris); color: var(--charcoal); border-color: var(--verdigris); }

/* nav — minimal; nothing to track on a reading page */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; border-bottom: 1px solid var(--hairline); background: linear-gradient(to bottom, rgba(11, 11, 13, 0.86), rgba(11, 11, 13, 0.55)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-inner { max-width: var(--wrap); margin: 0 auto; padding: 16px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--serif); font-size: 26px; letter-spacing: -0.01em; color: var(--vellum); text-decoration: none; display: inline-flex; align-items: baseline; gap: 2px; line-height: 1; }
.brand .dot { color: var(--verdigris); }
.brand .ext { color: var(--vellum-dim); }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { color: var(--vellum); text-decoration: none; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.72; transition: opacity 0.2s, color 0.2s; }
.nav-links a:hover { opacity: 1; color: var(--verdigris); }

/* page shell — one reading column */
.chapter-page { max-width: 780px; margin: 0 auto; padding: 136px var(--gutter) 96px; }
.chapter-head { padding-bottom: 32px; border-bottom: 1px solid var(--hairline-strong); margin-bottom: 48px; }
.kicker { margin-bottom: 28px; }
.chapter-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(52px, 8vw, 96px); line-height: 0.95; letter-spacing: -0.03em; margin-bottom: 26px; text-wrap: balance; }
.chapter-head h1 em { color: var(--verdigris); }
.chapter-head .lede { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 25px); line-height: 1.45; color: var(--vellum); opacity: 0.88; max-width: 30ch; margin-bottom: 22px; text-wrap: balance; }
.chapter-head .lede em { color: var(--verdigris); }
.chapter-head .note { max-width: 60ch; text-transform: none; letter-spacing: 0.04em; font-size: 11.5px; }

/* the map itself — bullets are the content, so they get real type */
.map-section { padding: 8px 0 40px; }
.map-section + .map-section { border-top: 1px solid var(--hairline); padding-top: 44px; }
.map h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 22px; text-wrap: balance; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; align-items: baseline; }
.map h2 .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; color: var(--sienna); }
.map h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.15; letter-spacing: -0.015em; margin: 34px 0 12px; color: var(--vellum); text-wrap: balance; }
.map h3 em { color: var(--verdigris); }
.map h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--verdigris); margin: 26px 0 10px; }
.map p { font-size: 17px; line-height: 1.6; color: var(--vellum); opacity: 0.92; margin: 0 0 16px; max-width: 64ch; }
.map ul, .map ol { margin: 0 0 18px 0; padding-left: 22px; max-width: 66ch; }
.map ul ul, .map ol ol, .map ul ol, .map ol ul { margin: 6px 0 4px; }
.map li { font-size: 16px; line-height: 1.6; color: var(--vellum-dim); padding-left: 4px; margin-bottom: 8px; }
.map li::marker { color: var(--verdigris); font-family: var(--mono); font-size: 12px; }
.map ol > li::marker { color: var(--sienna); }
.map li strong { color: var(--vellum); font-weight: 500; }
.map p strong { font-weight: 500; }

/* foot */
.chapter-foot { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--hairline-strong); display: grid; gap: 22px; }
.chapter-foot .mono { text-transform: none; letter-spacing: 0.04em; font-size: 11.5px; max-width: 64ch; }
.chapter-foot .mono em { color: var(--vellum); }
.chapter-foot .mono a { color: var(--verdigris); text-decoration: none; }
.chapter-foot .mono a:hover { text-decoration: underline; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); margin-top: 8px; }
.pager a { background: var(--charcoal); padding: 20px 22px; text-decoration: none; font-family: var(--serif); font-size: 20px; line-height: 1.2; display: grid; gap: 6px; transition: background 0.3s; }
.pager a:hover { background: linear-gradient(to right, rgba(67, 179, 174, 0.06), transparent 80%), var(--charcoal); color: var(--verdigris); }
.pager a.next { text-align: right; }

@media (max-width: 900px) {
  .nav-inner { padding: 12px 20px; }
  .nav-links { gap: 18px; }
  .chapter-page { padding-top: 104px; }
  .map h2 { grid-template-columns: 1fr; gap: 6px; }
  .map ul, .map ol { padding-left: 18px; }
  .pager { grid-template-columns: 1fr; }
  .pager a.next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
