:root {
  --bg: #ffffff;
  --fg: #1d1f21;
  --muted: #5c6370;
  --line: #e2e4e8;
  --code-bg: #f4f5f7;
  --accent: #0b6e8a;
  --hero-bg: #eef3f5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191c;
    --fg: #e6e7e9;
    --muted: #9aa1ab;
    --line: #2d3136;
    --code-bg: #22262b;
    --accent: #5fc4de;
    --hero-bg: #1f2428;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Ubuntu, Cantarell, "Noto Sans", sans-serif;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

.site-header { border-bottom: 1px solid var(--line); }
.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 { font-weight: 700; color: var(--fg); text-decoration: none; }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--fg); }

main { padding-top: 24px; padding-bottom: 48px; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2rem; margin: 0.4em 0 0.5em; }
h2 { font-size: 1.45rem; margin-top: 2em; padding-bottom: 0.25em; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.15rem; margin-top: 1.6em; }

img { max-width: 100%; height: auto; border-radius: 8px; }
code, pre { font-family: ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", Menlo, Consolas, monospace; font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 12px 14px; border-radius: 8px; overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; font-size: inherit; }
.highlight { background: none; }

table { border-collapse: collapse; display: block; overflow-x: auto; margin: 1em 0; }
th, td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
th { background: var(--code-bg); }
blockquote { margin: 1em 0; padding: 0 1em; color: var(--muted); border-left: 3px solid var(--line); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.lead { font-size: 1.2rem; color: var(--muted); margin-top: 0; }
.hero { background: var(--hero-bg); border-radius: 12px; padding: 12px; margin: 1.5em 0; }
.hero img { display: block; border-radius: 6px; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2em 0; }
.buttons a {
  display: inline-block; padding: 8px 16px; border-radius: 8px; text-decoration: none;
  border: 1px solid var(--line); color: var(--fg);
}
.buttons a.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { padding-top: 18px; padding-bottom: 28px; }
.site-footer a { color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .lead { font-size: 1.05rem; }
}
