:root {
  --ink: #12161c;
  --ink-2: #3d4653;
  --muted: #6b7482;
  --line: #e6e9ef;
  --line-2: #eef1f5;
  --bg: #ffffff;
  --panel: #f7f8fa;
  --panel-2: #f1f3f7;
  --accent: #0f6e56;
  --accent-soft: #e8f3ef;
  --amber: #8a5a00;
  --amber-soft: #fbf1de;
  --blue: #17568f;
  --blue-soft: #e8f0f9;
  --red: #a32d2d;
  --red-soft: #fbebeb;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.product-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: 0.5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 14px; font-weight: 600; letter-spacing: 0.2px; }
.brand-text small { font-size: 11px; color: var(--muted); }

.product-nav { display: flex; align-items: center; gap: 18px; }
.product-nav a { font-size: 12.5px; color: var(--ink-2); }
.product-nav a:hover { color: var(--accent); }

.toolbar { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}
.search-box input {
  border: 0; outline: none; background: transparent;
  width: 210px; font-size: 12.5px; color: var(--ink); font-family: var(--sans);
}
.method-box { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.method-box select {
  height: 32px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink); font-size: 12.5px;
  padding: 0 6px; font-family: var(--sans); outline: none;
}

.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 216px;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

.left-rail {
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 28px 8px 40px 0;
  border-right: 1px solid var(--line-2);
}
.doc-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin-bottom: 18px; }
.nav-group-title {
  font-size: 11px; letter-spacing: 0.9px; text-transform: uppercase;
  color: var(--muted); margin: 0 0 6px 10px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 7px;
  font-size: 13px; color: var(--ink-2);
  border-left: 2px solid transparent;
}
.nav-item:hover { background: var(--panel); text-decoration: none; color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.nav-item .m {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  padding: 1px 4px; border-radius: 3px; letter-spacing: 0.4px;
}

.main-content { padding: 36px 0 80px; min-width: 0; }
.eyebrow {
  font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--muted); margin: 0 0 8px; font-weight: 600;
}
h1 { font-size: 30px; line-height: 1.25; margin: 0 0 10px; font-weight: 600; letter-spacing: -0.4px; }
h2 { font-size: 21px; margin: 46px 0 12px; font-weight: 600; letter-spacing: -0.2px; }
h3 { font-size: 15px; margin: 28px 0 8px; font-weight: 600; }
p { margin: 0 0 12px; color: var(--ink-2); }
.lead { font-size: 15px; color: var(--ink-2); max-width: 720px; }

.hero {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfd 0%, #ffffff 100%);
  margin-bottom: 8px;
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 18px; }
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat b { font-size: 15px; font-weight: 600; font-family: var(--mono); }
.hero-stat span { font-size: 11.5px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 6px; }
.step {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; background: #fff;
}
.step .n {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 11px;
  display: grid; place-items: center; margin-bottom: 8px; font-weight: 600;
}
.step b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.step p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.55; }

table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0 16px; }
thead th {
  text-align: left; font-weight: 600; font-size: 11.5px;
  letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted);
  padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel);
  white-space: nowrap;
}
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--ink-2); }
tbody tr:last-child td { border-bottom: 1px solid var(--line); }
td.name { font-family: var(--mono); font-size: 12.5px; color: var(--ink); white-space: nowrap; }
td.type { font-family: var(--mono); font-size: 12px; color: var(--blue); white-space: nowrap; }
td.req { white-space: nowrap; width: 54px; }
.req-yes { color: var(--red); font-size: 12px; }
.req-no { color: var(--muted); font-size: 12px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tbl-wrap table { margin: 0; }
.tbl-wrap thead th:first-child { border-top-left-radius: 10px; }
.trunc { color: var(--muted); font-size: 12px; }

.badge {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
}
.badge-post { background: var(--accent-soft); color: var(--accent); }
.badge-get { background: var(--blue-soft); color: var(--blue); }
.badge-put { background: var(--amber-soft); color: var(--amber); }
.badge-delete { background: var(--red-soft); color: var(--red); }

.endpoint {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px 8px;
  margin: 20px 0 24px;
  scroll-margin-top: 80px;
  background: #fff;
}
.endpoint-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.endpoint-head h2 { margin: 0; font-size: 19px; }
.endpoint-path {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; margin: 10px 0 14px;
  overflow-x: auto; white-space: nowrap;
}
.endpoint-path .path { color: var(--ink); }

pre {
  position: relative;
  margin: 10px 0 18px;
  padding: 14px 16px;
  background: #0f1319;
  color: #dfe4ea;
  border-radius: 10px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.3px;
  line-height: 1.6;
}
pre .c { color: #7c8797; }
pre .s { color: #9ad3a7; }
pre .k { color: #8fb8e6; }
code.inline {
  font-family: var(--mono); font-size: 12.3px;
  background: var(--panel-2); padding: 1.5px 5px; border-radius: 4px; color: var(--ink);
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #cbd3dd; font-size: 11px; font-family: var(--sans);
  padding: 2px 8px; border-radius: 6px; cursor: pointer;
}
.copy-btn:hover { background: rgba(255,255,255,0.14); }

.note {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 14px; border-radius: 0 8px 8px 0;
  font-size: 12.8px; color: var(--ink-2); margin: 12px 0 18px;
}
.note b { color: var(--ink); }
.warn { border-left-color: var(--amber); background: var(--amber-soft); }

.anchor-link { color: var(--line); margin-left: 6px; font-size: 14px; }
.endpoint-head:hover .anchor-link { color: var(--muted); }

.right-rail {
  position: sticky; top: 60px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 36px 0 40px;
  font-size: 12.5px;
}
.toc { display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line); }
.toc a {
  padding: 3px 0 3px 12px; color: var(--muted);
  border-left: 2px solid transparent; margin-left: -1px;
  font-size: 12.5px;
}
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.toc a.sub { padding-left: 24px; font-size: 12px; }

.download-panel { margin-top: 26px; border-top: 1px solid var(--line-2); padding-top: 16px; }
.server-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.server-list li { font-size: 12px; color: var(--ink-2); line-height: 1.45; word-break: break-all; }
.server-list code { font-family: var(--mono); font-size: 11.5px; color: var(--ink); }
.server-list span { display: block; color: var(--muted); font-size: 11px; }

.footer {
  max-width: 1400px; margin: 0 auto; padding: 26px 24px 50px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

.loading-panel { padding: 80px 0; color: var(--muted); }

@media (max-width: 1180px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
  .right-rail { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; gap: 0; }
  .left-rail { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .search-box input { width: 130px; }
}

.note-list { margin: 6px 0 0; padding-left: 18px; }
.note-list li { margin-bottom: 4px; }
