:root {
  --bg: #fbfaf6;
  --fg: #23251f;
  --muted: #6a6d62;
  --accent: #2f6b4f;
  --line: #dedbd0;
  --code: #f0eee4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191a;
    --fg: #e4e3dc;
    --muted: #9a9c92;
    --accent: #7fc4a0;
    --line: #2e3231;
    --code: #212524;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.7 Georgia, "Times New Roman", serif;
}

.wrap {
  max-width: 41rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.brand {
  font-size: 1.45rem;
  font-weight: bold;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
}

nav a {
  margin-left: 1.1rem;
  color: var(--muted);
  text-decoration: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
}

nav a:hover, nav a[aria-current] { color: var(--accent); }

main { padding: 2rem 0 3rem; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 0.4rem; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 0.6rem; }

p, ul, ol { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.3rem; }

a { color: var(--accent); }

.meta {
  color: var(--muted);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.88rem;
  margin: 0 0 1.6rem;
}

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

.post-list { list-style: none; padding: 0; }
.post-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.post-list li:first-child { border-top: 1px solid var(--line); }
.post-list a.title { font-size: 1.15rem; font-weight: bold; text-decoration: none; }
.post-list a.title:hover { text-decoration: underline; }
.post-list p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.97rem; }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.4rem;
  font-size: 0.97rem;
}
th, td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 0.85rem; color: var(--muted); }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code);
}
code { padding: 0.1em 0.3em; border-radius: 3px; }
pre { padding: 0.8rem 1rem; overflow-x: auto; border-radius: 4px; }

blockquote {
  margin: 0 0 1.1rem;
  padding: 0.1rem 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 2rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
}

.back { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 0.92rem; }

@media (max-width: 30rem) {
  h1 { font-size: 1.6rem; }
  nav a { margin: 0 0.9rem 0 0; }
}
