:root {
  --warn-bg: #fff4e5; --warn-line: #f59e0b;
  --bg: #ffffff; --fg: #111111; --muted: #666666; --line: #e5e5e5; --code-bg: #f5f5f5; --accent: #0b57d0;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --warn-bg: #2b2110; --warn-line: #d97706; --bg: #0f0f10; --fg: #ececec; --muted: #9a9a9a; --line: #262628; --code-bg: #19191b; --accent: #8ab4f8;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 17px/1.6 var(--sans); }
a { color: var(--accent); }
header.site, footer.site, main { max-width: 720px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
header.site, footer.site { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px; font-size: 14px; }
header.site { border-bottom: 1px solid var(--line); }
header.site .brand { font-weight: 700; color: var(--fg); text-decoration: none; }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--fg); }
footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; margin-top: 56px; }
footer.site a { color: var(--muted); }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 30px; margin: 32px 0 8px; }
h2 { font-size: 22px; margin: 36px 0 8px; }
h3 { font-size: 18px; margin: 28px 0 6px; }
ol.posts { list-style: none; margin: 24px 0 0; padding: 0; }
ol.posts li { padding: 14px 0; border-bottom: 1px solid var(--line); }
ol.posts li a { font-weight: 600; font-size: 18px; text-decoration: none; color: var(--fg); }
ol.posts li a:hover { color: var(--accent); }
ol.posts time { color: var(--muted); font-size: 13px; margin-left: 8px; font-variant-numeric: tabular-nums; }
ol.posts p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.post header .meta { color: var(--muted); font-size: 13px; margin: 32px 0 0; font-variant-numeric: tabular-nums; }
.post header h1 { margin-top: 6px; }
.post .lede { color: var(--muted); margin-top: 0; }
.post .body img, .post .body video { max-width: 100%; height: auto; }
.post .body figure { margin: 24px 0; }
.post .body figure img { display: block; margin: 0 auto; border-radius: 6px; }
.post .body figure.pair .imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
@media (max-width: 640px) { .post .body figure.pair .imgs { grid-template-columns: 1fr; } }
.post .body figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.post .body blockquote { margin: 20px 0; padding: 0 16px; border-left: 3px solid var(--line); color: var(--muted); }
.post .body hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
code { font: .88em/1.5 var(--mono); background: var(--code-bg); padding: 1px 4px; border-radius: 3px; }
pre { background: var(--code-bg); border-radius: 6px; padding: 12px 14px; overflow-x: auto; font: 14px/1.5 var(--mono); }
pre code { background: none; padding: 0; font-size: inherit; }
.post .body table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 20px 0; display: block; overflow-x: auto; }
.post .body th, .post .body td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post .body th { color: var(--muted); font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 14px; margin: 48px 0 0; font-size: 15px; }
.pager a { text-decoration: none; }
.pager small { color: var(--muted); margin: 0 6px; }
.highlight .c, .highlight .c1, .highlight .cm { color: var(--muted); }
@media (max-width: 640px) { body { font-size: 16px; } h1 { font-size: 26px; } }

.post .body .callout { margin: 20px 0; padding: 14px 16px; border-radius: 6px; }
.post .body .callout p { margin: 0; }
.post .body .callout.warn { background: var(--warn-bg); border-left: 4px solid var(--warn-line); }
