:root {
  --bg: #fbfaf8; --text: #1d1c1a; --muted: #6b6762; --line: #e6e2dc; --accent: #b4532f; --code: #f1eee9;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151413; --text: #ecebe8; --muted: #a29d96; --line: #2e2c29; --accent: #e58a63; --code: #22201e; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI", Roboto, sans-serif;
}
header, main, footer { max-width: 720px; margin: 0 auto; padding: 0 20px; }
header { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; padding-bottom: 8px; }
.brand { font-weight: 600; letter-spacing: .01em; color: var(--text); text-decoration: none; }
.lang a { margin-left: 14px; font-size: 14px; color: var(--muted); text-decoration: none; }
html[data-lang="zh"] .lang a[data-for="zh"], html[data-lang="en"] .lang a[data-for="en"] { color: var(--text); font-weight: 600; }
article { display: none; padding-bottom: 32px; }
html[data-lang="zh"] article[data-lang="zh"], html[data-lang="en"] article[data-lang="en"] { display: block; }
html:not([data-lang]) article[data-lang="en"] { display: block; }
h1 { font-size: 28px; line-height: 1.3; margin: 28px 0 8px; }
h2 { font-size: 20px; line-height: 1.4; margin: 36px 0 8px; padding-top: 20px; border-top: 1px solid var(--line); }
h3 { font-size: 17px; margin: 24px 0 4px; }
p, li { overflow-wrap: anywhere; }
p { margin: 10px 0; }
ul, ol { padding-left: 1.4em; margin: 8px 0; }
li { margin: 4px 0; }
a { color: var(--accent); }
code { background: var(--code); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.table { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.6; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
footer { padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 14px; }
footer a { color: var(--muted); margin-right: 18px; text-decoration: none; display: inline-block; margin-bottom: 6px; }
