:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d2230;
  --muted: #5b6273;
  --border: #e3e0d8;
  --accent: #2f5bd3;
  --accent-text: #ffffff;
  --code-bg: #f1efe9;
  --ok: #1f7a4d;
  --warn: #a4471f;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161c;
    --surface: #1c1f27;
    --text: #e8e9ee;
    --muted: #a1a7b6;
    --border: #2e323d;
    --accent: #7ea2ff;
    --accent-text: #0f1220;
    --code-bg: #232733;
    --ok: #6fd3a0;
    --warn: #ff9f7a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid var(--border); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
nav.site { display: flex; gap: 16px; flex-wrap: wrap; font-size: 15px; }
nav.site a { color: var(--muted); text-decoration: none; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--text); }
main { padding: 32px 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 8px; }
h3 { font-size: 17px; margin: 24px 0 6px; }
.lede { font-size: 18px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); padding: 14px; border-radius: 8px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; overflow-wrap: normal; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.btn:disabled { opacity: 0.6; cursor: default; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.card h3 { margin-top: 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-scroll { overflow-x: auto; }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 15px; }
input, select { width: 100%; max-width: 420px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > div { flex: 1 1 180px; }
.notice { border-left: 4px solid var(--accent); background: var(--surface); padding: 12px 14px; border-radius: 0 8px 8px 0; margin: 16px 0; }
.notice.warn { border-color: var(--warn); }
.ok { color: var(--ok); }
.err { color: var(--warn); }
.hidden { display: none !important; }
footer.site { border-top: 1px solid var(--border); padding: 24px 0 40px; font-size: 14px; color: var(--muted); }
footer.site .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
footer.site nav { display: flex; gap: 14px; flex-wrap: wrap; }
footer.site a { color: var(--muted); }
