:root {
  --ink: #17201b;
  --muted: #647168;
  --line: #d8dfda;
  --paper: #f7f9f7;
  --white: #fff;
  --green: #176a43;
  --green-soft: #e4f1e8;
  --blue: #276a9b;
  --blue-soft: #e8f1f8;
  --amber: #8c5b16;
  --amber-soft: #fff3d8;
  --code: #111923;
  --code-text: #e7edf4;
  --font: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); color: var(--ink); font: 14px var(--font); }
body { margin: 0; letter-spacing: 0; }
a { color: var(--green); }
button, code, pre { letter-spacing: 0; }
button { font: 700 12px var(--font); cursor: pointer; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 max(24px, calc((100vw - 1260px) / 2));
  border-bottom: 1px solid var(--line);
  background: #ffffffed;
  backdrop-filter: blur(10px);
}
.docs-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.docs-brand span { display: grid; place-items: center; width: 36px; height: 30px; background: var(--ink); color: #d8f35a; font-size: 10px; font-weight: 800; }
.docs-brand strong { font-size: 13px; }
.docs-topbar nav { display: flex; align-items: center; gap: 22px; }
.docs-topbar nav a { color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.docs-topbar nav a:hover { color: var(--green); }

.docs-layout { display: grid; grid-template-columns: 190px minmax(0, 840px); gap: 48px; width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.docs-nav { position: sticky; top: 86px; align-self: start; display: grid; gap: 3px; padding: 38px 0; }
.docs-nav span { margin: 0 0 8px 10px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.docs-nav a { padding: 8px 10px; border-left: 2px solid transparent; color: var(--muted); font-size: 12px; text-decoration: none; }
.docs-nav a:hover { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.docs-content { min-width: 0; padding: 52px 0 90px; }

.doc-intro { padding-bottom: 38px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0; color: var(--green); font-size: 11px; font-weight: 800; }
.doc-intro h1 { margin: 10px 0 0; font-size: 40px; line-height: 1.15; }
.doc-intro > p:last-of-type { max-width: 680px; margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.mode-strip { display: grid; grid-template-columns: 1fr 1fr; margin-top: 28px; border-block: 1px solid var(--line); }
.mode-strip div { min-width: 0; padding: 18px 20px; border-right: 1px solid var(--line); }
.mode-strip div:last-child { border: 0; }
.mode-strip span, .mode-strip strong, .mode-strip a, .mode-strip code { display: block; }
.mode-strip span { color: var(--muted); font-size: 11px; }
.mode-strip strong { margin-top: 5px; font-size: 16px; }
.mode-strip a, .mode-strip code { margin-top: 8px; overflow-wrap: anywhere; font-size: 12px; }

.doc-section { padding: 38px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 78px; }
.doc-section h2 { margin: 0 0 20px; font-size: 24px; line-height: 1.3; }
.doc-section h3 { margin: 28px 0 12px; font-size: 15px; }
.doc-section p, .doc-section li { color: #455249; line-height: 1.75; }
.doc-section p { margin: 14px 0; }
.doc-section code { font-size: .9em; }
.doc-section p code, .doc-section li code, table code { padding: 2px 5px; border: 1px solid #d3ddd6; background: #eef3ef; color: #24563d; }

.steps { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; min-height: 112px; padding: 18px 20px 18px 52px; border-top: 1px solid var(--line); counter-increment: step; }
.steps li:nth-child(odd) { border-right: 1px solid var(--line); }
.steps li::before { position: absolute; top: 18px; left: 18px; color: var(--green); font: 800 13px ui-monospace, monospace; content: "0" counter(step); }
.steps b, .steps span { display: block; }
.steps b { color: var(--ink); }
.steps span { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.notice { display: grid; grid-template-columns: 150px 1fr; gap: 18px; margin-top: 20px; padding: 15px 17px; border-left: 3px solid var(--green); background: var(--green-soft); }
.notice strong { color: var(--green); font-size: 12px; }
.notice span { color: #3f5848; font-size: 12px; line-height: 1.65; }
.notice a { color: var(--green); font-weight: 800; }
.notice.warning { border-color: var(--amber); background: var(--amber-soft); }
.notice.warning strong { color: var(--amber); }

.facts { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line); }
.facts div { min-width: 0; padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div:nth-child(even) { border-right: 0; }
.facts div:nth-last-child(-n+2) { border-bottom: 0; }
.facts span, .facts code { display: block; }
.facts span { color: var(--muted); font-size: 11px; }
.facts code { margin-top: 7px; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; }

.code-block { margin: 14px 0 22px; overflow: hidden; border: 1px solid #273344; background: var(--code); }
.code-block > div { display: flex; align-items: center; justify-content: space-between; min-height: 37px; padding: 0 12px; border-bottom: 1px solid #293747; color: #91a2b6; font-size: 11px; }
.code-block button { min-width: 50px; height: 25px; padding: 0 9px; border: 1px solid #455569; background: #1d2937; color: #d7e0ea; }
.code-block button:hover { border-color: #7b8da3; }
.code-block pre { margin: 0; padding: 17px; overflow: auto; color: var(--code-text); font-size: 12px; line-height: 1.7; tab-size: 2; }
.code-block code { font-size: inherit; }

.endpoint-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.endpoint-head.compact { margin-top: 34px; }
.endpoint-head > div { display: flex; align-items: center; min-width: 0; gap: 10px; }
.endpoint-head code { overflow-wrap: anywhere; font-size: 15px; font-weight: 700; }
.endpoint-head strong { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.method { display: inline-grid; flex: 0 0 auto; place-items: center; width: 46px; height: 25px; color: #fff; font: 800 10px ui-monospace, monospace; }
.method.get { background: var(--blue); }
.method.post { background: var(--green); }

table { width: 100%; margin: 16px 0 22px; border-collapse: collapse; background: var(--white); font-size: 12px; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #edf1ee; color: var(--muted); font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }

.route-list { display: grid; grid-template-columns: minmax(260px, .8fr) 1fr; margin-top: 22px; border-block: 1px solid var(--line); }
.route-list code, .route-list span { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.route-list code:nth-last-child(-n+2), .route-list span:nth-last-child(-n+2) { border-bottom: 0; }
.route-list code { color: var(--green); font-size: 12px; }
.route-list span { color: var(--muted); font-size: 12px; }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding: 13px 16px 13px 34px; border-top: 1px solid var(--line); font-size: 12px; }
.checklist li:nth-child(odd) { border-right: 1px solid var(--line); }
.checklist li::before { position: absolute; left: 12px; color: var(--green); content: "✓"; }
.handoff { display: grid; gap: 8px; margin-top: 24px; padding: 18px; border: 1px solid var(--line); background: var(--white); }
.handoff span { color: var(--muted); font-size: 11px; font-weight: 800; }
.handoff code { overflow-wrap: anywhere; font-size: 12px; }

#copy-toast { position: fixed; right: 22px; bottom: 22px; z-index: 10; padding: 10px 15px; background: var(--ink); color: #fff; font-size: 12px; opacity: 0; transform: translateY(8px); transition: .16s; pointer-events: none; }
#copy-toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 820px) {
  .docs-layout { display: block; width: min(760px, calc(100% - 28px)); }
  .docs-nav { display: none; }
  .docs-content { padding-top: 36px; }
  .docs-topbar { padding: 0 16px; }
  .docs-topbar nav a:not(:first-child) { display: none; }
}

@media (max-width: 560px) {
  .docs-topbar { height: 58px; }
  .docs-brand strong { font-size: 12px; }
  .doc-intro h1 { font-size: 30px; }
  .mode-strip, .steps, .facts, .checklist { grid-template-columns: 1fr; }
  .mode-strip div, .steps li:nth-child(odd), .facts div { border-right: 0; }
  .mode-strip div:first-child, .facts div { border-bottom: 1px solid var(--line); }
  .facts div:last-child { border-bottom: 0; }
  .notice { grid-template-columns: 1fr; gap: 6px; }
  .endpoint-head { align-items: flex-start; flex-direction: column; gap: 9px; }
  .endpoint-head strong { padding-left: 56px; }
  .route-list { grid-template-columns: 1fr; }
  .route-list code, .route-list span { border-bottom: 0; }
  .route-list span { padding-top: 0; border-bottom: 1px solid var(--line); }
  .route-list span:last-child { border-bottom: 0; }
  .checklist li:nth-child(odd) { border-right: 0; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}
