:root {
  color-scheme: light dark;
  --paper: #f7f4ee;
  --ink: #23282a;
  --muted: #5e6864;
  --line: #dcd7cc;
  --accent: #2f6b5e;
  --accent-soft: #d8e6df;
  --card: #fffdf8;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141716;
    --ink: #e9e7e0;
    --muted: #a9b1ab;
    --line: #2f3733;
    --accent: #8fd0b4;
    --accent-soft: #243a32;
    --card: #1a1e1c;
  }
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: 2rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.7 system-ui, -apple-system, "Segoe UI", sans-serif;
}

::selection { background: var(--accent-soft); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 4px;
}

.skip:focus { top: 1rem; }

.masthead,
main,
footer {
  max-width: 72rem;
  margin-inline: auto;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: inherit;
  text-decoration: none;
  display: grid;
  gap: 0.15rem;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.brand-line,
.kicker {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  font-size: 0.9375rem;
}

nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--accent); }

.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4.75rem);
}

.hero-text { max-width: 44rem; }

h1 {
  margin: 0.6rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.35rem, 1.2rem + 4.4vw, 4.9rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 1.5rem;
  max-width: 48ch;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  color: var(--muted);
}

.hero-art {
  margin: 0;
  color: var(--accent);
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
}

.button-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9375rem;
}

.button-link:hover { background: var(--accent-soft); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.section-head h2,
.workbench h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  line-height: 1.25;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.grid {
  display: grid;
  gap: 1.5rem 2rem;
  padding-block: 1.75rem 2.5rem;
}

.note-card {
  display: grid;
  gap: 0.9rem;
  padding-block: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.note-card a { text-decoration: none; color: inherit; }
.note-card a:hover .note-title { color: var(--accent); }

.note-thumb {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
}

.note-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.note-title {
  margin: 0.35rem 0 0.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.7rem);
  line-height: 1.3;
  text-wrap: balance;
}

.note-summary { margin: 0; color: var(--muted); max-width: 50ch; }

.workbench {
  padding-block: 2.25rem 2.75rem;
  border-top: 1px solid var(--line);
}

.workbench > p { color: var(--muted); max-width: 62ch; }

details {
  border-top: 1px solid var(--line);
  padding-block: 0.9rem;
}

details:last-of-type { border-bottom: 1px solid var(--line); }

summary {
  cursor: pointer;
  font-weight: 600;
  padding-block: 0.15rem;
}

summary:hover { color: var(--accent); }

details p,
details ul {
  margin: 0.75rem 0 0;
  max-width: var(--measure);
}

details ul { padding-left: 1.1rem; }

.checklist-download {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.9375rem;
}

.about {
  padding-block: 2.25rem 2.75rem;
  border-top: 1px solid var(--line);
  max-width: var(--measure);
}

.about h2 {
  margin: 0 0 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.375rem;
}

.about p { margin: 0; color: var(--muted); }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}

footer a { color: var(--muted); }

/* Note pages */
.note-page {
  max-width: var(--measure);
  margin-inline: auto;
  padding-block: 2rem 1rem;
}

.note-page .kicker { margin-bottom: 0.5rem; }

.note-page h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
  margin-top: 0;
}

.note-page h2 {
  margin: 2rem 0 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.6rem);
  line-height: 1.3;
}

.note-page p,
.note-page li { margin: 0 0 1rem; }

.note-page ul,
.note-page ol { padding-left: 1.2rem; margin: 0 0 1.25rem; }

.figure {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
}

.figure svg { display: block; width: 100%; height: auto; color: var(--accent); }

.figure figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.checklist {
  margin: 1.5rem 0;
  padding: 1rem 1rem 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.checklist h2 { margin-top: 0; }

.checklist ul { margin-bottom: 0; }

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
}

@media (min-width: 54rem) {
  .hero { grid-template-columns: minmax(0, 1fr) 24rem; }
  .grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .grid .note-card:first-child { grid-row: span 2; }
  .grid .note-card:first-child .note-title { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); }
}

@media (max-width: 40rem) {
  .masthead { padding-block: 1.5rem 1.25rem; }
  .hero { padding-block: 2rem 2.5rem; }
  .note-card { padding-top: 1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  a, .button-link, summary, .note-title { transition: color 120ms ease, background-color 120ms ease, text-decoration-thickness 120ms ease; }
}

/* Inline artwork tokens (hero SVG inherits page palette) */
.art-ink { fill: var(--ink); }
.art-paper { fill: var(--card); }
.art-soft { fill: var(--accent-soft); }
.art-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art-thin { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; opacity: 0.6; }
.art-accent { fill: currentColor; opacity: 0.9; }
