:root {
  --doc-bg: #f4f6f8;
  --doc-surface: #ffffff;
  --doc-ink: #18211d;
  --doc-muted: #62706a;
  --doc-line: #dfe5e1;
  --doc-green: #16845b;
  --doc-green-soft: #e8f5ef;
  --doc-blue: #2866c7;
  --doc-blue-soft: #edf4ff;
  --doc-amber: #a96500;
  --doc-amber-soft: #fff6df;
  --doc-red: #b63838;
  --doc-code: #202824;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--doc-bg);
  color: var(--doc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: 0;
}
button, input { font: inherit; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }

.doc-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  border-bottom: 1px solid var(--doc-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}
.doc-topbar-inner {
  max-width: 1500px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.doc-menu-button {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--doc-line);
  background: var(--doc-surface);
  color: var(--doc-ink);
  border-radius: 6px;
  cursor: pointer;
}
.doc-brand { font-size: 18px; font-weight: 700; white-space: nowrap; }
.doc-version {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--doc-green-soft);
  color: var(--doc-green);
  font-size: 12px;
  font-weight: 700;
}
.doc-topbar-meta { margin-left: auto; color: var(--doc-muted); font-size: 13px; }

.doc-layout {
  max-width: 1500px;
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}
.doc-sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 28px 18px;
  border-right: 1px solid var(--doc-line);
  background: var(--doc-surface);
}
.doc-nav-group + .doc-nav-group { margin-top: 26px; }
.doc-nav-label {
  padding: 0 10px 8px;
  color: #87918c;
  font-size: 12px;
  font-weight: 700;
}
.doc-nav-link {
  display: block;
  margin: 2px 0;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  border-radius: 0 5px 5px 0;
  color: #46534d;
  transition: background .15s ease, color .15s ease;
}
.doc-nav-link:hover { background: #f3f6f4; color: var(--doc-ink); }
.doc-nav-link.is-active {
  border-left-color: var(--doc-green);
  background: var(--doc-green-soft);
  color: var(--doc-green);
  font-weight: 700;
}

.doc-main { min-width: 0; padding: 42px 54px 80px; }
.doc-content { width: 100%; max-width: 1040px; margin: 0 auto; }
.doc-intro { padding-bottom: 34px; border-bottom: 1px solid var(--doc-line); }
.doc-kicker { color: var(--doc-green); font-size: 13px; font-weight: 700; }
.doc-intro h1 { margin: 8px 0 12px; font-size: 34px; line-height: 1.25; letter-spacing: 0; }
.doc-intro p { max-width: 760px; margin: 0; color: var(--doc-muted); font-size: 15px; }
.doc-summary {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--doc-line);
  border-radius: 7px;
  background: var(--doc-surface);
  overflow: hidden;
}
.doc-summary-item { padding: 15px 18px; }
.doc-summary-item + .doc-summary-item { border-left: 1px solid var(--doc-line); }
.doc-summary-label { color: var(--doc-muted); font-size: 12px; }
.doc-summary-value { margin-top: 3px; font-weight: 700; }

.doc-section { padding: 38px 0 8px; border-bottom: 1px solid var(--doc-line); }
.doc-section:last-child { border-bottom: 0; }
.doc-section h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: 0; }
.doc-section h3 { margin: 28px 0 10px; font-size: 17px; letter-spacing: 0; }
.doc-section p { color: #46534d; }
.doc-section code, .doc-inline-code {
  padding: 2px 5px;
  border: 1px solid #d8e0db;
  border-radius: 4px;
  background: #eef2ef;
  color: #214438;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}
.doc-endpoint {
  margin: 16px 0 20px;
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--doc-line);
  border-radius: 6px;
  background: var(--doc-surface);
  overflow: hidden;
}
.doc-method {
  align-self: stretch;
  min-width: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--doc-green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.doc-method.get { background: var(--doc-blue); }
.doc-endpoint-path {
  min-width: 0;
  padding: 11px 14px;
  overflow-x: auto;
  white-space: nowrap;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}
.doc-copy {
  flex: 0 0 auto;
  margin-right: 8px;
  padding: 6px 10px;
  border: 1px solid var(--doc-line);
  border-radius: 5px;
  background: #fff;
  color: #445049;
  cursor: pointer;
}
.doc-copy:hover { border-color: var(--doc-green); color: var(--doc-green); }

.doc-callout {
  margin: 18px 0;
  padding: 13px 16px;
  border-left: 4px solid var(--doc-blue);
  background: var(--doc-blue-soft);
  color: #304861;
}
.doc-callout.warning { border-left-color: var(--doc-amber); background: var(--doc-amber-soft); color: #684a16; }
.doc-callout.success { border-left-color: var(--doc-green); background: var(--doc-green-soft); color: #245745; }
.doc-callout strong { color: inherit; }

.doc-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--doc-line);
  border-radius: 6px;
  background: var(--doc-surface);
}
.doc-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.doc-table th, .doc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--doc-line);
  text-align: left;
  vertical-align: top;
}
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table th { background: #f7f9f8; color: #53605a; font-size: 12px; font-weight: 700; }
.doc-required { color: var(--doc-red); font-weight: 700; }
.doc-optional { color: var(--doc-muted); }

.doc-code-block { position: relative; margin: 12px 0 20px; }
.doc-code-block pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: 6px;
  background: var(--doc-code);
  color: #eef6f1;
  line-height: 1.7;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}
.doc-code-block pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}
.doc-code-block .doc-copy { position: absolute; top: 9px; right: 1px; border-color: #4b5650; background: #303a35; color: #dce5e0; }
.doc-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--doc-line);
  border-radius: 6px;
  background: var(--doc-surface);
  overflow: hidden;
}
.doc-status { padding: 13px 14px; }
.doc-status + .doc-status { border-left: 1px solid var(--doc-line); }
.doc-status b { display: block; font-size: 18px; }
.doc-status span { color: var(--doc-muted); font-size: 12px; }
.doc-tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0 12px;
  padding: 4px;
  border: 1px solid var(--doc-line);
  border-radius: 6px;
  background: #eef2ef;
  overflow-x: auto;
}
.doc-tab-button {
  flex: 1 0 110px;
  padding: 8px 14px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #53605a;
  font-weight: 700;
  cursor: pointer;
}
.doc-tab-button:hover { color: var(--doc-ink); }
.doc-tab-button.is-active { background: var(--doc-surface); color: var(--doc-green); box-shadow: 0 1px 3px rgba(25, 45, 35, .12); }
.doc-demo-panel[hidden] { display: none; }
.doc-demo-panel .doc-code-block { margin-top: 0; }
.doc-footer { padding: 28px 0 10px; color: var(--doc-muted); font-size: 12px; }
.doc-overlay { display: none; }

@media (max-width: 980px) {
  .doc-menu-button { display: inline-flex; align-items: center; justify-content: center; }
  .doc-topbar-inner { padding: 0 18px; }
  .doc-topbar-meta { display: none; }
  .doc-layout { display: block; }
  .doc-sidebar {
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: 280px;
    height: auto;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 12px 0 30px rgba(28, 40, 34, .13);
  }
  body.doc-nav-open .doc-sidebar { transform: translateX(0); }
  .doc-overlay {
    position: fixed;
    inset: 64px 0 0;
    z-index: 35;
    background: rgba(19, 27, 23, .34);
  }
  body.doc-nav-open .doc-overlay { display: block; }
  .doc-main { padding: 34px 28px 64px; }
}

@media (max-width: 640px) {
  .doc-main { padding: 28px 16px 50px; }
  .doc-intro h1 { font-size: 28px; }
  .doc-summary { grid-template-columns: 1fr; }
  .doc-summary-item + .doc-summary-item { border-left: 0; border-top: 1px solid var(--doc-line); }
  .doc-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-status:nth-child(3) { border-left: 0; border-top: 1px solid var(--doc-line); }
  .doc-status:nth-child(4) { border-top: 1px solid var(--doc-line); }
  .doc-endpoint { align-items: stretch; }
  .doc-endpoint-path { padding: 11px 10px; }
}
