:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6a6a6a;
  --accent: #8a4a1a;
  --accent-soft: #f4ede4;
  --border: #e4e4e4;
  --table-stripe: #fafafa;
  --max-width: 72ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131313;
    --fg: #e8e8e8;
    --muted: #9a9a9a;
    --accent: #d99a5a;
    --accent-soft: #2a200f;
    --border: #2a2a2a;
    --table-stripe: #181818;
  }
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

header.site .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
}

header.site a.brand {
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

header.site nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.95rem;
}

header.site nav a:hover {
  color: var(--fg);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1, h2, h3 {
  line-height: 1.25;
  color: var(--fg);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

h1 {
  font-size: 2rem;
  margin-top: 0;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.1rem;
  color: var(--muted);
}

p {
  margin: 0.85rem 0;
}

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

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

ul, ol {
  padding-left: 1.4rem;
}

li {
  margin: 0.3rem 0;
}

strong {
  font-weight: 600;
  color: var(--fg);
}

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

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco,
    Consolas, monospace;
  font-size: 0.92em;
  background: var(--accent-soft);
  color: var(--fg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

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

th {
  background: var(--accent-soft);
  font-weight: 600;
}

tbody tr:nth-child(even) {
  background: var(--table-stripe);
}

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

footer.site {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

footer.site a {
  color: var(--muted);
  margin: 0 0.5rem;
}

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

.home-hero {
  text-align: center;
  padding: 4rem 0 2rem;
}

.home-hero h1 {
  font-size: 2.5rem;
}

.home-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  margin-top: 2rem;
}

@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }
  header.site .inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  header.site nav a { margin-left: 0; margin-right: 1.25rem; }
  table { font-size: 0.85rem; }
  th, td { padding: 0.4rem 0.5rem; }
}
