:root {
  --paper: #f6f3ec;
  --ink: #1f2420;
  --muted: #6b716a;
  --line: #d9d4c7;
  --moss: #4d6b4f;
  --rust: #a3542f;
  --max: 42rem;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--moss); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rust); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

header.site {
  border-bottom: 1px solid var(--line);
  padding: 2.2rem 0 1.4rem;
  margin-bottom: 2.4rem;
}

header.site .brand {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  flex-wrap: wrap;
}

header.site .brand a {
  font-size: 1.6rem;
  letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

header.site .brand span {
  color: var(--muted);
  font-style: italic;
  font-size: .95rem;
}

nav.site { margin-top: .6rem; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
nav.site a { color: var(--muted); text-decoration: none; margin-right: 1.2rem; }
nav.site a:hover, nav.site a.on { color: var(--ink); }

.intro { font-size: 1.08rem; color: #39403a; margin-bottom: 2.6rem; }

ol.notes { list-style: none; padding: 0; margin: 0; }
ol.notes li { padding: 1.3rem 0; border-top: 1px solid var(--line); }
ol.notes li:last-child { border-bottom: 1px solid var(--line); }
ol.notes .meta { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .76rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
ol.notes h2 { font-size: 1.22rem; margin: .25rem 0 .35rem; font-weight: 600; }
ol.notes h2 a { color: var(--ink); text-decoration: none; }
ol.notes h2 a:hover { color: var(--moss); }
ol.notes p { margin: 0; color: #3d443e; }

article h1 { font-size: 1.85rem; line-height: 1.25; margin: 0 0 .4rem; font-weight: 600; }
article .meta { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .78rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 2rem; }
article p { margin: 0 0 1.15rem; }
article h2 { font-size: 1.2rem; margin: 2rem 0 .6rem; }
article blockquote { margin: 1.6rem 0; padding: .2rem 0 .2rem 1.1rem; border-left: 3px solid var(--moss); color: #3d443e; font-style: italic; }
article ul { padding-left: 1.2rem; }
article li { margin-bottom: .4rem; }

.kit { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .82rem; background: #ece7db; border: 1px solid var(--line); padding: .9rem 1rem; border-radius: 3px; white-space: pre-wrap; line-height: 1.5; }

figure.wave { margin: 1.8rem 0; }
figure.wave svg { width: 100%; height: 64px; display: block; }
figure.wave figcaption { font-size: .8rem; color: var(--muted); font-style: italic; margin-top: .4rem; }

.next { margin-top: 2.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .95rem; }

footer.site {
  margin: 4rem 0 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
}
footer.site a { color: var(--muted); }

@media (max-width: 520px) {
  html { font-size: 16px; }
  header.site { padding-top: 1.4rem; }
  article h1 { font-size: 1.5rem; }
}

@media (prefers-color-scheme: dark) {
  :root { --paper: #171a17; --ink: #e6e3da; --muted: #8f958d; --line: #2c312c; --moss: #8fb38f; --rust: #d58a63; }
  .intro, ol.notes p, article blockquote { color: #c9c6bd; }
  .kit { background: #1f231f; }
}
