:root {
  --bg: #1a1a18;
  --text: #e6e6e1;
  --muted: #96958c;
  --rule: #2d2d29;
  --codebg: #222220;
  --accent: #d8a955;
}

/* single theme: charcoal, everywhere, always */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.7 ui-serif, "New York", Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

header, main, footer {
  max-width: 42rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

header { padding-top: 2.5rem; }

nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

nav .name { font-weight: 600; text-decoration: none; color: var(--text); }
nav .pages a { color: var(--muted); text-decoration: none; margin-left: 1.25rem; }
nav .pages a:hover { color: var(--text); }
nav .pages a[aria-current] { color: var(--accent); }

main { padding-top: 4rem; padding-bottom: 4rem; }

.lede {
  font-size: 1.3rem;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 1.75rem;
}

p { margin: 0 0 1.1em; }

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  font-weight: 600;
}

h1 { font-size: 1.45rem; margin: 3.5rem 0 1.25rem; }
h2 { font-size: 1.15rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1rem; margin: 2rem 0 0.75rem; }

h1.doc-title { font-size: 2rem; margin-top: 0; }
h1.doc-title + h2 {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0.25rem 0 1.5rem;
}

main h1:not(.doc-title)::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 1rem;
}

ul, ol { padding-left: 1.4rem; margin: 0 0 1.1em; }
li { margin-bottom: 0.35em; }
li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.4rem; }
li > input[type="checkbox"] { margin-right: 0.5em; accent-color: var(--accent); }

blockquote {
  margin: 1.5em 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}
blockquote p { margin-bottom: 0.5em; }

hr { border: none; border-top: 1px solid var(--rule); margin: 3rem 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--codebg);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--codebg);
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.55;
  margin: 0 0 1.25em;
}
pre code { background: none; padding: 0; font-size: 0.85rem; }

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 1.25em;
  font-size: 0.92em;
}
th, td { text-align: left; padding: 0.5rem 1rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; }

footer {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  font-size: 0.9rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

main > h1:first-child { margin-top: 0; font-size: 1.6rem; }
.kicker { color: var(--muted); font-size: 0.95em; margin: -0.6em 0 1em; }

/* D: selenite stone, black serif, one amber mark — two roles, nothing else colored */
.lede { font-size: 1.7rem; line-height: 1.35; }
h1.doc-title { font-size: 2.3rem; }
blockquote { font-style: italic; }
.mark { width: 3rem; height: 4px; background: var(--accent); margin-bottom: 2.25rem; }
a { text-decoration-color: var(--accent); }
a:hover { color: var(--accent); }

/* project marks + the series path */
.pmk { height: 0.72em; width: auto; margin-right: 0.5rem; vertical-align: -0.02em; }
.pmk-tall { height: 0.85em; }
.step { display: flex; gap: 1.4rem; margin: 2.4rem 0 0; }
.step .n { color: var(--accent); font-size: 1.3rem; font-weight: 600; min-width: 2.1rem; line-height: 1.35; }
.step h2 { margin: 0; font-size: 1.2rem; }
.step .kicker { margin: 0.2em 0 0; }
.step p { margin: 0.3em 0 0; }
.step.unwritten h2 { color: var(--muted); }
.seriesnav { border-top: 1px solid var(--rule); margin-top: 3.5rem; padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }
.seriesnav a, .seriesnav span { color: var(--muted); }
.seriesnav a:hover { color: var(--accent); }

/* W1 wordmark: the name types itself on home; settled caret everywhere else */
nav .caret { display: inline-block; width: 0.5ch; height: 1em; margin-left: 0.15ch; background: var(--accent); vertical-align: -0.12em; }
nav .caret.rest { opacity: 1; animation: navBlink 1.1s steps(1) infinite; }
nav .name .l { opacity: 0; animation: navArrive 0.01s forwards; }
@keyframes navArrive { to { opacity: 1; } }
nav .name .l:nth-child(1) { animation-delay: 0.15s; } nav .name .l:nth-child(2) { animation-delay: 0.26s; }
nav .name .l:nth-child(3) { animation-delay: 0.34s; } nav .name .l:nth-child(4) { animation-delay: 0.45s; }
nav .name .l:nth-child(5) { animation-delay: 0.55s; } nav .name .l:nth-child(6) { animation-delay: 0.67s; }
nav .name .l:nth-child(7) { animation-delay: 0.76s; } nav .name .l:nth-child(8) { animation-delay: 0.88s; }
nav .name .l:nth-child(9) { animation-delay: 0.97s; } nav .name .l:nth-child(10) { animation-delay: 1.08s; }
nav .caret.blink { opacity: 0; animation: navCaretIn 0.01s forwards 1.15s, navBlink 1.1s steps(1) infinite 1.3s; }
@keyframes navCaretIn { to { opacity: 1; } }
@keyframes navBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  nav .name .l { animation: none; opacity: 1; }
  nav .caret.blink, nav .caret.rest { animation: none; opacity: 1; }
}

  
/* stage-1 statement home */
body.home { min-height: 100dvh; display: flex; flex-direction: column; }
body.home main { flex: 1; display: grid; place-items: center; padding-top: 0; padding-bottom: 0; max-width: none; }
.hero {
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  font-weight: 600; font-size: clamp(2.6rem, 9vw, 5.2rem);
  letter-spacing: -0.02em; line-height: 1.1; text-align: center;
}
.hero .l { opacity: 0; animation: navArrive 0.01s forwards; }
.hero .l:nth-child(1) { animation-delay: 0.15s; } .hero .l:nth-child(2) { animation-delay: 0.26s; }
.hero .l:nth-child(3) { animation-delay: 0.34s; } .hero .l:nth-child(4) { animation-delay: 0.45s; }
.hero .l:nth-child(5) { animation-delay: 0.55s; } .hero .l:nth-child(6) { animation-delay: 0.67s; }
.hero .l:nth-child(7) { animation-delay: 0.76s; } .hero .l:nth-child(8) { animation-delay: 0.88s; }
.hero .l:nth-child(9) { animation-delay: 0.97s; } .hero .l:nth-child(10) { animation-delay: 1.08s; }
.hero .caret { width: 0.5ch; height: 0.95em; margin-left: 0.16ch; vertical-align: -0.08em; display: inline-block; background: var(--accent); opacity: 0; animation: navCaretIn 0.01s forwards 1.15s, navBlink 1.1s steps(1) infinite 1.3s; }
@media (prefers-reduced-motion: reduce) { .hero .l { animation: none; opacity: 1; } .hero .caret { animation: none; opacity: 1; } }
/* statement hero (moved from inline for CSP) */
h1.hero { font-size: clamp(2.8rem, 9vw, 5.4rem) !important; margin: 0 !important; text-align: center; letter-spacing: -0.02em !important; line-height: 1.15; }

/* home nav has no name link; keep links on the shared axis */
nav .pages { margin-left: auto; }

/* frozen wordmark hero: the mark lands first, the name types in around it */
.hero { margin: 0; line-height: 0; }
.hero svg { width: min(88vw, 740px); height: auto; display: block; }
.hero .g { opacity: 0; animation: navArrive 0.01s forwards; }
.hero .g0 { animation-delay: 0.40s; } .hero .g1 { animation-delay: 0.51s; }
.hero .g2 { animation-delay: 0.59s; } .hero .g3 { animation-delay: 0.70s; }
.hero .g4 { animation-delay: 0.85s; } .hero .g5 { animation-delay: 0.96s; }
.hero .g6 { animation-delay: 1.04s; } .hero .g7 { animation-delay: 1.15s; }
.hero .g8 { animation-delay: 1.24s; }
.hero .acc { opacity: 0; animation: accRise 0.25s ease forwards; }
@keyframes accRise { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero .g, .hero .acc { animation: none; opacity: 1; }
}
