:root {
  --ink: #1b2433;
  --text: #2f3a4a;
  --muted: #6b7280;
  --bg: #fbfbf8;
  --panel: #f1eee7;
  --rule: #e2ddd2;
  --accent: #a8432c;
  --accent-soft: #e8a87c;
  --header: #1b2433;
  --header-text: #f2efe8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2efe8;
    --text: #d6dbe3;
    --muted: #9aa3b0;
    --bg: #141a24;
    --panel: #1e2635;
    --rule: #2c3647;
    --accent: #e8a87c;
    --header: #0e131b;
  }
}

* { box-sizing: border-box; }

html { scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* header and navigation */
.site-header { background: var(--header); color: var(--header-text); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding-top: 14px; padding-bottom: 14px;
}
.site-title {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--header-text); font-weight: 700; font-size: 1.15rem; text-decoration: none;
}
.site-logo { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(242,239,232,0.25); }
.site-title span { color: var(--accent-soft); font-weight: 500; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.site-nav a {
  color: #c9d1dd; text-decoration: none; font-size: 0.95rem;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--header-text); }
.site-nav a.active { color: var(--header-text); border-bottom-color: var(--accent-soft); }

main { padding-top: 28px; padding-bottom: 48px; }

/* typography */
h1, h2, h3 { color: var(--ink); line-height: 1.25; }
h1 { font-size: 2rem; margin: 0.2em 0 0.4em; }
h2 { font-size: 1.45rem; margin-top: 2.2em; padding-bottom: 0.25em; border-bottom: 1px solid var(--rule); }
h3 { font-size: 1.12rem; margin-top: 1.6em; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
code {
  font: 0.88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--panel); padding: 0.1em 0.35em; border-radius: 4px;
}
pre { background: var(--panel); padding: 12px 16px; border-radius: 8px; overflow-x: auto; }
pre code { background: none; padding: 0; }
img { max-width: 100%; height: auto; border-radius: 8px; }

/* callouts */
blockquote {
  margin: 1.5em 0; padding: 14px 20px;
  background: var(--panel); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0;
}
blockquote p { margin: 0.4em 0; }

/* tables */
table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--ink); background: var(--panel); font-weight: 600; }
tbody tr:hover { background: var(--panel); }

.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.85rem; }
.site-footer .wrap { padding-top: 16px; padding-bottom: 24px; }
.site-footer a { color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  th, td { padding: 6px; }
}
