:root {
  --bg: #f7f3ec;
  --card: #fffdf8;
  --fg: #2b2622;
  --muted: #6f655b;
  --accent: #8a3b2e;
  --line: #e2d9cc;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1916;
    --card: #23201c;
    --fg: #e9e2d8;
    --muted: #a59a8c;
    --accent: #e0907a;
    --line: #37322c;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 Georgia, "PT Serif", "Times New Roman", serif;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header { border-bottom: 1px solid var(--line); }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}

.logo {
  color: var(--fg);
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: .02em;
  text-decoration: none;
}

.logo span { color: var(--accent); }

nav a {
  margin-right: 1rem;
  color: var(--muted);
  font: .9rem/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-decoration: none;
}

nav a:last-child { margin-right: 0; }
nav a:hover, nav a[aria-current] { color: var(--accent); }

main { padding: 2rem 0 3rem; }

h1 {
  margin: 0 0 .5rem;
  font-size: 2rem;
  line-height: 1.25;
}

h2 {
  margin: 2.25rem 0 .5rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: .35rem; }
a { color: var(--accent); }

.lead {
  color: var(--muted);
  font-size: 1.15rem;
}

.meta {
  margin-bottom: 1.75rem;
  color: var(--muted);
  font: .85rem/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.notes {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.notes li {
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.notes a {
  font-size: 1.15rem;
  text-decoration: none;
}

.notes a:hover { text-decoration: underline; }

.notes p {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .95rem;
}

.notes time {
  color: var(--muted);
  font: .8rem/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}

blockquote {
  margin: 1.5rem 0;
  padding: .25rem 0 .25rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

.template {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  font-size: .95rem;
}

.template p:last-child { margin-bottom: 0; }

.ornament {
  display: block;
  width: 9rem;
  height: auto;
  margin: 2.5rem auto 0;
  opacity: .8;
}

.back {
  margin-top: 2.5rem;
  font: .9rem/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: .85rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.site-footer .wrap {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
}
