:root {
  --bg: #fcfcfa;
  --fg: #1a1a18;
  --muted: #5e5e58;
  --rule: #ddddd6;
  --accent: #8a3a12;
  --code-bg: #f1f1ec;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --fg: #e6e6e1;
    --muted: #9a9a93;
    --rule: #32323a;
    --accent: #e39a6a;
    --code-bg: #20202a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  max-width: 44rem;
  background: var(--bg);
  color: var(--fg);
  font: 1.05rem/1.65 ui-serif, Georgia, "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}

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

header.site {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.wordmark {
  font: 600 1rem/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
}

header.site nav { font: 0.9rem/1 ui-sans-serif, system-ui, sans-serif; }

h1, h2, h3 {
  font-family: ui-sans-serif, system-ui, sans-serif;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: 1.95rem; margin: 0 0 1.25rem; }
h2 { font-size: 1.35rem; margin: 2.75rem 0 0.85rem; }
h3 { font-size: 1.1rem; margin: 2rem 0 0.6rem; }

p, ul, ol, table, pre, blockquote { margin: 0 0 1.2rem; }

ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }

em { color: var(--muted); }

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

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

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}

code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 3px; }

pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
}

pre code { background: none; padding: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font: 0.92rem/1.5 ui-sans-serif, system-ui, sans-serif;
  display: block;
  overflow-x: auto;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--rule);
}

th { font-weight: 600; border-bottom-width: 2px; }

ul.articles { list-style: none; padding: 0; }

ul.articles li {
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}

ul.articles li:last-child { border-bottom: 0; }
ul.articles h3 { margin: 0 0 0.4rem; }
ul.articles p { margin: 0; color: var(--muted); font-size: 0.97rem; }

p.back { margin-top: 3rem; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.92rem; }

footer.site {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font: 0.85rem/1.55 ui-sans-serif, system-ui, sans-serif;
  color: var(--muted);
}

footer.site p { margin: 0 0 0.5rem; }
