:root {
  font: 16px/1.65 Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #202739;
  background: #fff;
  --muted: #526075;
  --line: #e0e5ee;
  --soft: #f5f7fb;
  --primary: #4c46cf;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: var(--primary); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: .5rem; z-index: 3; padding: .5rem .8rem; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.masthead-inner {
  max-width: 1440px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: .65rem clamp(1rem, 4vw, 3.75rem);
}
.brand, .back-link { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.brand { font-weight: 750; line-height: 1.3; }
.brand img { flex: none; margin-right: .65rem; }
.back-link { min-height: 38px; margin-left: .65rem; font-size: .875rem; white-space: nowrap; color: var(--muted); }
.back-link span { margin-left: .35rem; }
.back-link:hover { color: var(--primary); }

.docs-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 4.75rem);
  max-width: 1440px;
  margin: 0 auto;
  padding: 2.8rem clamp(1rem, 4vw, 3.75rem) 5rem;
}
.docs-nav {
  position: sticky;
  top: 6rem;
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - 7rem);
  overflow: auto;
}
.nav-title { padding: 0 .65rem .65rem; font-size: .8rem; font-weight: 650; color: var(--muted); }
.docs-nav a {
  display: block;
  margin-bottom: .25rem;
  padding: .48rem .65rem;
  border-radius: .42rem;
  color: var(--muted);
  font-size: .875rem;
  text-decoration: none;
}
.docs-nav a[aria-current="location"], .docs-nav a:hover { background: #eeedff; color: #3933a7; }
.docs-nav a span { margin-right: .25rem; color: #0c6c58; font: 650 .75rem var(--mono); }

.docs { min-width: 0; max-width: 1040px; }
.page-intro > p { margin-top: .6rem; color: var(--muted); font-size: 1rem; }
h1 { font-size: clamp(2rem, 3.5vw, 2.7rem); line-height: 1.18; font-weight: 760; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.65rem); line-height: 1.4; font-weight: 730; }
h3 { margin: 1.65rem 0 .65rem; font-size: 1.05rem; font-weight: 700; }
.base-url, .endpoint { display: flex; align-items: center; flex-wrap: wrap; }
.base-url { margin-top: 1.2rem; font-size: .875rem; }
.base-url dt { margin-right: .65rem; color: var(--muted); }
.base-url dd { min-width: 0; }
.doc-section { margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--line); scroll-margin-top: 5.2rem; }
.doc-section > p { margin-top: .65rem; color: var(--muted); }
.endpoint { margin: .85rem 0 .7rem; padding: .65rem .85rem; border: 1px solid #e4e8f2; border-radius: .5rem; background: var(--soft); }
.endpoint code { min-width: 0; padding: 0; background: transparent; }
.method { margin-right: .7rem; padding: .12rem .4rem; border-radius: .25rem; color: #0c6754; background: #dff3eb; font: 700 .79rem/1.5 var(--mono); }

code { font-family: var(--mono); }
p code, li code, table code, .base-url code {
  padding: .08em .3em;
  color: #35466b;
  background: #eef2fa;
  border-radius: .24rem;
  font-size: .89em;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}
.table-scroll { overflow-x: auto; margin-top: .7rem; border: 1px solid var(--line); border-radius: .55rem; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
caption, .sr-only {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
thead { background: var(--soft); }
th, td { text-align: left; vertical-align: top; padding: .65rem .85rem; border-bottom: 1px solid var(--line); }
th { font-weight: 650; }
tbody th, tbody td { color: var(--muted); }
tbody th:first-child, thead th { white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
td a { margin: 0 .12em; }

.example-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .9rem; align-items: start; }
.code-example { min-width: 0; overflow: hidden; border: 1px solid #2d3651; border-radius: .55rem; background: #161d30; color: #edf2ff; }
figcaption {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding: .45rem .85rem;
  border-bottom: 1px solid #343e58;
  font-size: .8rem;
  font-weight: 650;
  background: #202941;
}
.code-format { color: #bac5df; font: 500 .73rem var(--mono); }
.copy-code {
  min-width: 4.25rem;
  min-height: 32px;
  margin-left: auto;
  padding: .2rem .45rem;
  border: 1px solid #54617e;
  border-radius: .36rem;
  color: #edf2ff;
  background: transparent;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.copy-code:hover { background: #354365; }
.copy-code:focus-visible, pre:focus-visible { outline: 2px solid #b8b6ff; outline-offset: -3px; }
pre {
  margin: 0;
  max-height: 32rem;
  overflow: auto;
  padding: .9rem;
  font: .79rem/1.68 var(--mono);
  tab-size: 2;
}
.syntax-command, .syntax-key { color: #bfd2ff; }
.syntax-option, .syntax-literal { color: #efbc90; }
.syntax-string { color: #abdfca; }
.error-example { margin-top: 1rem; }
.example-note { font-size: .875rem; }
ol { padding-left: 1.35rem; color: var(--muted); }
li { padding-left: .2rem; }
li + li { margin-top: .5rem; }

@media (max-width: 1000px) {
  .docs-layout { grid-template-columns: 170px minmax(0, 1fr); }
  .example-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .masthead-inner { min-height: 56px; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; padding-top: 1.1rem; }
  .docs-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    max-height: none;
    padding: .6rem .3rem .45rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-title { width: 100%; padding-bottom: .2rem; }
  .docs-nav a { padding: .4rem .42rem; }
  .doc-section { margin-top: 1.8rem; padding-top: 1.4rem; scroll-margin-top: 4.5rem; }
  table { overflow-wrap: anywhere; }
  #list-receipts td:nth-child(2), #get-receipt td:nth-child(2) { white-space: nowrap; }
  th, td { padding: .55rem .65rem; }
  figcaption { padding-left: .65rem; padding-right: .65rem; }
  pre { padding: .75rem .65rem; }
}
@media print {
  .masthead, .docs-nav, .copy-code { display: none; }
  .docs-layout { display: block; padding: 0; }
  .code-example, tr { break-inside: avoid; }
  .code-example, figcaption { color: #162033; background: #fff; }
  .code-example span, .code-example pre span { color: inherit; }
  pre { max-height: none; white-space: pre-wrap; overflow-wrap: anywhere; }
}
