
:root {
  --bg: #f5f7f2;
  --surface: #ffffff;
  --surface-2: #f9faf7;
  --ink: #151b17;
  --muted: #5c6a61;
  --faint: #89958d;
  --line: #dce4dc;
  --line-strong: #b8c5bc;
  --accent: #225b4a;
  --accent-2: #c7e45a;
  --accent-3: #245c73;
  --danger: #8d2f2f;
  --success-bg: #eef8ec;
  --success-line: #95c48e;
  --code-bg: #111714;
  --code-ink: #e8efe9;
  --shadow: 0 18px 48px rgba(24, 34, 28, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(34, 91, 74, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(34, 91, 74, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px;
  font-family: "Aptos", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.shell { padding: 28px 0 64px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(220, 228, 220, 0.88);
  background: rgba(245, 247, 242, 0.92);
  backdrop-filter: blur(16px);
}
.topbar-inner {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 750; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--accent-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}
.brand-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; }
.topnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.topnav a, .topnav button, .btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.topnav a:hover, .topnav a.active, .btn.secondary:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}
.topnav form { margin: 0; }
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255,255,255,0.72);
  padding: 2px;
}
.language-switch a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.language-switch a.active {
  background: var(--ink);
  color: #fff;
}
.btn, button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.btn.secondary, button.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
button.danger, .btn.danger { border-color: var(--danger); background: var(--danger); }
.hero {
  display: grid;
  min-height: calc(100vh - 92px);
  align-items: center;
  gap: 40px;
  padding: 50px 0 56px;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}
.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  font-weight: 780;
  letter-spacing: 0;
}
h2 { margin: 0 0 14px; font-size: 25px; line-height: 1.2; letter-spacing: 0; }
h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.25; letter-spacing: 0; }
.lead { max-width: 760px; margin: 22px 0 0; color: var(--muted); font-size: 19px; line-height: 1.75; }
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.status-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent-2); box-shadow: 0 0 0 4px rgba(199, 228, 90, 0.24); }
.terminal {
  border: 1px solid #223129;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 12px 14px;
  color: #aebdb3;
  font-size: 12px;
}
.terminal pre, pre.code {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: var(--code-ink);
  background: var(--code-bg);
  border: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
code, pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}
code.inline {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  padding: 2px 6px;
  color: var(--ink);
}
.copyable { position: relative; }
.copy-btn {
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  color: #e8efe9;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 12px;
}
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 0 rgba(21, 27, 23, 0.03);
  padding: 20px;
  margin: 16px 0;
  overflow: auto;
}
.panel.success { border-color: var(--success-line); background: var(--success-bg); }
.panel.tight { padding: 16px; }
.metric {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.metric-value { font-size: 30px; font-weight: 780; line-height: 1.1; }
.muted { color: var(--muted); }
.small { color: var(--faint); font-size: 12px; line-height: 1.5; }
.section { padding: 28px 0; }
.page-head { padding: 24px 0 10px; }
.page-head h1 { font-size: clamp(34px, 4vw, 56px); }
.subnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 18px 0 16px;
}
.subnav a, .subnav button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}
.subnav a.active { border-color: var(--ink); color: var(--ink); }
.subnav form { margin-left: auto; }
.nav-tools {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-tools form { margin-left: 0; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th, td {
  border-bottom: 1px solid #edf1ec;
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.5;
}
th {
  color: #415047;
  background: #f2f5ef;
  font-size: 12px;
  font-weight: 760;
}
tr:last-child td { border-bottom: 0; }
label { display: block; margin: 10px 0; color: var(--muted); font-size: 13px; font-weight: 700; }
input, textarea, select {
  width: min(100%, 520px);
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
}
textarea { min-height: 94px; resize: vertical; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.form-row label { margin: 0; }
.check { display: block; line-height: 1.6; color: var(--ink); }
.check input { width: auto; min-height: auto; margin-right: 8px; }
.tag {
  display: inline-flex;
  margin: 2px 4px 2px 0;
  border: 1px solid #d8e2d6;
  border-radius: 999px;
  background: #f6faf3;
  padding: 3px 8px;
  color: #466038;
  font-size: 12px;
  font-weight: 700;
}
.model-row td:first-child, .wrap { overflow-wrap: anywhere; word-break: break-word; }
.docs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.docs-toc {
  position: sticky;
  top: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.86);
  padding: 14px;
}
.docs-toc a { display: block; padding: 8px 9px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.docs-toc a:hover { color: var(--ink); background: var(--surface-2); }
.doc-section { scroll-margin-top: 96px; }
.alert {
  border: 1px solid #e2d6a6;
  border-radius: 8px;
  background: #fff9df;
  padding: 14px 16px;
  color: #564a20;
}
footer { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 42px; color: var(--faint); font-size: 12px; }
@media (max-width: 860px) {
  main, .topbar-inner, footer { width: min(100% - 28px, 1240px); }
  .topbar-inner { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .topnav { justify-content: flex-start; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 38px; }
  .grid.three, .grid.two, .docs-layout { grid-template-columns: 1fr; }
  .docs-toc { position: static; }
  table { min-width: 640px; }
  .subnav form { margin-left: 0; width: 100%; }
  .nav-tools { margin-left: 0; width: 100%; }
}
