:root {
  color-scheme: light dark;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #526176;
  --line: #d9e2ee;
  --strong-line: #b8c6d9;
  --brand: #1769aa;
  --brand-2: #0f9f8f;
  --good: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --code-bg: #0d1624;
  --code-text: #e5edf8;
  --shadow: 0 18px 46px rgba(15, 23, 42, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09111d;
    --surface: #101827;
    --surface-soft: #121f31;
    --text: #f8fafc;
    --muted: #a7b4c5;
    --line: #243247;
    --strong-line: #42516a;
    --brand: #67b7f7;
    --brand-2: #45d6c5;
    --good: #7ddc91;
    --warn: #f1b45b;
    --bad: #f87171;
    --code-bg: #050914;
    --code-text: #e2e8f0;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.top { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); }
.top-inner { width: min(1220px, calc(100% - 32px)); min-height: 66px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 850; }
.mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, var(--brand-2), var(--brand)); font-weight: 900; }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; color: var(--muted); font-size: 14px; }
.nav a { border: 1px solid transparent; border-radius: 999px; padding: 8px 11px; }
.nav a:hover { color: var(--text); border-color: var(--line); background: var(--surface); }
.layout { width: min(1220px, calc(100% - 32px)); margin: 0 auto; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; padding: 28px 0 56px; }
aside { position: sticky; top: 90px; align-self: start; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); padding: 12px; max-height: calc(100vh - 112px); overflow: auto; }
aside h2 { margin: 8px 10px 10px; color: var(--muted); font-size: 12px; letter-spacing: 0; font-weight: 800; }
aside a { display: block; border-radius: 10px; padding: 9px 10px; color: var(--muted); font-size: 14px; line-height: 1.35; }
aside a[aria-current="page"] { background: color-mix(in srgb, var(--brand) 11%, var(--surface)); color: var(--text); font-weight: 800; }
aside a:hover { background: var(--surface-soft); color: var(--text); }
main { min-width: 0; }
.hero, section, .side-helper { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.hero { padding: 34px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-2) 10%, var(--surface)), var(--surface)); }
section { margin-top: 18px; padding: 24px; scroll-margin-top: 92px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-size: 13px; font-weight: 850; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
h1 { margin: 14px 0 12px; font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: 0; }
h2 { margin: 0 0 14px; font-size: 25px; letter-spacing: 0; }
h3 { margin: 24px 0 10px; font-size: 18px; }
h4 { margin: 18px 0 8px; font-size: 15px; }
p { color: var(--muted); line-height: 1.74; }
p.tight { margin: 8px 0; }
ul, ol { color: var(--muted); line-height: 1.75; padding-left: 22px; }
li { margin: 5px 0; }
strong { color: var(--text); }
main > *, .grid > *, .cards > *, .cards3 > *, .setup-panel > *, .quick-values > *, .fields > *, .steps li > div, .tabs > * { min-width: 0; }
p, li, td, th, code, .mini, .notice, .warning, .success { overflow-wrap: anywhere; }
.quick-values, .cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.value, .mini { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); padding: 15px; }
.value span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.copy-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.copy-line code { overflow-wrap: anywhere; color: var(--text); font-weight: 700; }
button { font: inherit; }
.copy-btn { flex: 0 0 auto; border: 1px solid var(--strong-line); background: var(--surface); color: var(--text); border-radius: 9px; padding: 6px 9px; cursor: pointer; font-size: 12px; font-weight: 800; }
.copy-btn:hover { border-color: var(--brand); color: var(--brand); }
.notice, .warning, .success { border-radius: 14px; padding: 14px 16px; margin: 14px 0; line-height: 1.72; }
.notice { border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); color: var(--muted); }
.warning { border: 1px solid color-mix(in srgb, var(--warn) 36%, var(--line)); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); color: var(--muted); }
.success { border: 1px solid color-mix(in srgb, var(--good) 30%, var(--line)); background: color-mix(in srgb, var(--good) 9%, var(--surface)); color: var(--muted); }
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; margin: 14px 0; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 13px; text-align: left; vertical-align: top; line-height: 1.62; }
th { color: var(--text); background: var(--surface-soft); font-size: 13px; }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.codebox { max-width: 100%; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 14px 0; background: var(--code-bg); }
.codebar { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid color-mix(in srgb, white 12%, transparent); padding: 8px 10px 8px 14px; color: #a7b4c5; font-size: 12px; }
.codebar b { min-width: 0; color: #dbeafe; font-weight: 800; overflow-wrap: anywhere; }
pre { max-width: 100%; margin: 0; padding: 16px; overflow-x: auto; color: var(--code-text); font-size: 13px; line-height: 1.62; }
.inline-code { border: 1px solid var(--line); background: var(--surface-soft); border-radius: 7px; padding: 2px 5px; color: var(--text); }
.setup-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: 14px; align-items: stretch; }
.form { border: 1px solid var(--line); background: var(--surface-soft); border-radius: 16px; padding: 16px; }
label { display: block; color: var(--text); font-size: 13px; font-weight: 850; margin: 0 0 7px; }
input { width: 100%; border: 1px solid var(--strong-line); border-radius: 10px; background: var(--surface); color: var(--text); min-height: 42px; padding: 9px 11px; font: inherit; }
.fields { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(180px, .7fr); gap: 12px; }
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; margin: 12px 0; color: var(--muted); }
.steps li::before { content: counter(step); width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 13%, var(--surface)); color: var(--brand); font-weight: 900; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: var(--text); background: var(--surface); font-weight: 800; }
.btn.primary { border: 0; color: white; background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.btn:hover { transform: translateY(-1px); }
.tool-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr); gap: 14px; }
.tabs { display: grid; gap: 12px; }
.tab-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.tab-buttons button { border: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); border-radius: 999px; padding: 8px 12px; cursor: pointer; font-weight: 800; }
.tab-buttons button[aria-selected="true"] { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--text); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.tab-panel { display: none; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); padding: 16px; }
.tab-panel.active { display: block; }
.side-helper { margin-top: 14px; padding: 12px; box-shadow: none; }
.side-helper h2 { font-size: 14px; margin: 0 0 8px; }
.side-helper p { margin: 0 0 10px; font-size: 12px; line-height: 1.55; }
.side-helper label { font-size: 12px; }
.side-helper input { min-height: 38px; margin-bottom: 8px; font-size: 13px; }
.side-helper .copy-btn { width: 100%; margin-top: 2px; }
.helper-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.badge { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 800; }
footer { width: min(1220px, calc(100% - 32px)); margin: 0 auto 34px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; }
  aside { position: static; max-height: none; }
  .quick-values, .cards3, .cards, .grid, .setup-panel, .tool-intro { grid-template-columns: 1fr; }
  .top-inner { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .nav { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .layout, .top-inner, footer { width: min(100% - 24px, 1220px); }
  .hero, section { padding: 18px; border-radius: 16px; }
  .fields { grid-template-columns: 1fr; }
  .mini, .value { width: 100%; }
  table { min-width: 560px; }
}
