:root {
  --bg: #ffffff; --fg: #0a0a0a; --muted: #6b6b6b; --card: #f5f5f7; --line: #e6e6e6; --accent: #0a84ff;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b0c; --fg: #f2f2f2; --muted: #9a9a9a; --card: #161618; --line: #26262a; --accent: #009cff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c; --fg: #f2f2f2; --muted: #9a9a9a; --card: #161618; --line: #26262a; --accent: #009cff; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
header { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--muted); }
nav a { transition: color 150ms ease; }
body, .theme, footer, .doc code { transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease; }
.theme { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); position: relative;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--fg);
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 200ms ease, border-color 200ms ease; }
.theme:active { transform: scale(0.94); }
.theme svg { position: absolute; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity 200ms ease, transform 200ms cubic-bezier(0.23, 1, 0.32, 1), filter 200ms ease; }
.theme .moon { opacity: 0; transform: scale(.8) rotate(30deg); filter: blur(2px); }
:root[data-theme="dark"] .theme .sun { opacity: 0; transform: scale(.8) rotate(-30deg); filter: blur(2px); }
:root[data-theme="dark"] .theme .moon { opacity: 1; transform: none; filter: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { opacity: 0; transform: scale(.8) rotate(-30deg); filter: blur(2px); }
  :root:not([data-theme="light"]) .theme .moon { opacity: 1; transform: none; filter: none; }
}
@media (hover: hover) and (pointer: fine) { nav a:hover { color: var(--fg); } }
@media (prefers-reduced-motion: reduce) { .theme, .theme svg { transition-duration: 0ms; } }

.doc { max-width: 680px; padding: 48px 0 80px; }
.doc h1 { font-size: clamp(32px, 4.6vw, 44px); letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 10px; }
.doc .date { color: var(--muted); font-size: 14px; margin: 0 0 36px; }
.doc h2 { font-size: 20px; letter-spacing: -0.015em; margin: 36px 0 10px; }
.doc p, .doc li { font-size: 16px; line-height: 1.55; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 0 0 8px; }
.doc a { color: var(--accent); }
.doc code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; background: var(--card); padding: 1px 5px; border-radius: 5px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 0 0 14px; }
.doc th, .doc td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.doc th { color: var(--muted); font-weight: 600; font-size: 13px; }
footer { padding: 30px 0 50px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); }
@media (max-width: 820px) { nav .hide { display: none; } }
