:root {
  --bg: #f3f5fa;
  --bg-tint: #e8edf7;
  --card: #ffffff;
  --text: #152033;
  --muted: #5b6b82;
  --line: #dce3ee;
  --accent: #1a4fd6;
  --accent-hover: #143fb0;
  --accent-soft: #e8efff;
  --code-bg: #101826;
  --code-text: #e7edf7;
  --ok: #0f7a45;
  --ok-bg: #e8f7ee;
  --warn: #8a5a00;
  --warn-bg: #fff6e5;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --shadow: 0 8px 30px rgba(21, 32, 51, 0.06);
  --radius: 14px;
  --sidebar: 272px;
  --header: 64px;
  --mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9e4ff 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e8eef8 0%, transparent 50%),
    var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-hover); }
code, kbd {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  color: #163681;
  padding: 0.08em 0.4em;
  border-radius: 6px;
}
pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
  line-height: 1.6;
}
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; color: var(--text); }
.mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(145deg, #2a64ea, #1238a8);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; letter-spacing: -0.04em;
  box-shadow: 0 6px 16px rgba(26,79,214,0.28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; }
.brand-text span { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.header-links { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.header-links a { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; padding: 9px 14px; font-weight: 600; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }
.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: calc(100vh - var(--header)); }
.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
  padding: 22px 14px 48px;
  position: sticky; top: var(--header); height: calc(100vh - var(--header)); overflow: auto;
}
.nav-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 14px 12px 6px;
}
.sidebar a {
  display: block; color: var(--text); padding: 8px 12px; border-radius: 8px;
  text-decoration: none; font-size: 14px;
}
.sidebar a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.sidebar a.active { background: var(--accent); color: #fff; }
.content { padding: 36px 48px 80px; max-width: 980px; }
h1 { font-size: 34px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.03em; }
h2 { font-size: 22px; margin: 40px 0 12px; letter-spacing: -0.02em; }
h3 { font-size: 17px; margin: 28px 0 8px; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { background: #f7f9fd; font-size: 13px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.note, .warn, .ok {
  border-radius: 12px; padding: 12px 16px; margin: 16px 0;
  border: 1px solid transparent;
}
.note { background: var(--accent-soft); border-color: #c9d8ff; }
.warn { background: var(--warn-bg); border-color: #f0d59a; }
.ok { background: var(--ok-bg); border-color: #b7e3c8; }
.prewrap { position: relative; margin: 14px 0 22px; }
pre {
  margin: 0; background: var(--code-bg); color: var(--code-text);
  border-radius: 12px; padding: 16px 18px; overflow: auto;
  font-family: var(--mono);
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px; padding: 4px 8px; font-size: 12px; cursor: pointer;
}
.copy-btn:hover { background: rgba(255,255,255,0.2); }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li {
  position: relative; padding: 0 0 22px 46px;
}
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.hero {
  background: linear-gradient(160deg, #0f1d3a, #1a4fd6 70%);
  color: #fff; border-radius: 20px; padding: 36px 36px 32px; margin-bottom: 28px;
  box-shadow: 0 18px 40px rgba(16, 40, 110, 0.22);
}
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255,255,255,0.82); }
.hero a.btn-primary { background: #fff; color: #163681; }
.hero a.btn-primary:hover { background: #e8efff; color: #163681; }
.hero a.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.hero a.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.footer {
  margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.model-list { columns: 2; gap: 24px; margin: 0; padding-left: 18px; }
.model-list li { break-inside: avoid; font-family: var(--mono); font-size: 13px; margin: 4px 0; }
@media (max-width: 960px) {
  .layout { display: block; }
  .sidebar {
    display: none; position: fixed; top: var(--header); left: 0; right: 0; height: auto;
    max-height: calc(100vh - var(--header)); z-index: 30;
  }
  .sidebar.open { display: block; }
  .content { padding: 24px 18px 64px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .model-list { columns: 1; }
  .menu-btn { display: inline-flex; }
  .header-links .hide-sm { display: none; }
  h1 { font-size: 28px; }
  .hero { padding: 24px; }
}
