:root {
  --bg: #f6f7fb; --surface: #ffffff; --text: #1b1d24; --muted: #5d6272;
  --line: #e3e6ef; --primary: #4f6fa3; --primary-strong: #3a5687; --accent: #9b6f95;
  --chip: #eef1f8; --shadow: 0 1px 2px rgba(20,24,40,.06), 0 8px 24px rgba(20,24,40,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318; --surface: #1a1d24; --text: #e8eaf1; --muted: #a3a9b8;
    --line: #2a2f3a; --primary: #8fb0e3; --primary-strong: #b3cbf0; --accent: #d7a9cf;
    --chip: #232733; --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-strong); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
header.site { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 14px; height: 60px; }
header.site .brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; }
header.site .brand img { width: 32px; height: 32px; border-radius: 9px; }
header.site nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--text); }
@media (max-width: 560px) {
  header.site .wrap { height: auto; flex-wrap: wrap; row-gap: 6px; padding-top: 10px; padding-bottom: 10px; }
  header.site nav { margin-left: 0; width: 100%; gap: 6px 16px; }
  header.site nav a { font-size: 14px; }
}
main { padding: 36px 0 56px; }
h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 22px; margin: 36px 0 10px; line-height: 1.3; }
h3 { font-size: 17px; margin: 24px 0 6px; }
p, li { color: var(--text); }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 24px; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 24px 0; }
.grid .card h3 { margin-top: 0; }
.grid .card p { margin: 0; color: var(--muted); }
.hero { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; padding: 20px 0 8px; }
@media (min-width: 720px) { .hero { grid-template-columns: 1.4fr 1fr; } }
.hero img { width: min(220px, 60vw); border-radius: 44px; box-shadow: var(--shadow); justify-self: center; }
.button { display: inline-block; background: var(--primary); color: #fff; padding: 12px 20px; border-radius: 999px;
  text-decoration: none; font-weight: 600; }
.button:hover { background: var(--primary-strong); color: #fff; }
@media (prefers-color-scheme: dark) { .button { color: #0f1320; } .button:hover { color: #0f1320; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips li { background: var(--chip); border-radius: 999px; padding: 4px 12px; font-size: 14px; color: var(--muted); }
code, kbd { background: var(--chip); border-radius: 6px; padding: 1px 6px; font-size: 0.92em; }
.path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; margin: 0 0 24px; }
.toc ul { margin: 6px 0 0; padding-left: 18px; }
.note { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; color: var(--muted); }
footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; }
footer.site a { color: var(--muted); }
