:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #59636e;
  --border: #d1d9e0;
  --accent: #3b5bdb;
  --code-bg: #f6f8fa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e6e8eb;
    --muted: #9aa4af;
    --border: #2a2f37;
    --accent: #7c9cff;
    --code-bg: #171a20;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header, .content, .site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 700; color: var(--fg); font-size: 1.1rem; }
.site-header nav { display: flex; gap: 20px; }

.content { padding-top: 32px; padding-bottom: 48px; }
.content h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 8px; }
.content h2 { margin-top: 40px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: 1.35rem; }
.content h3 { margin-top: 28px; font-size: 1.1rem; }
.meta { color: var(--muted); margin-top: 0; }

code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

table { border-collapse: collapse; width: 100%; margin: 16px 0; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--code-bg); }

.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  padding-bottom: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 4px 0; }
