:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f7f8;
  --surface-strong: #eeeff1;
  --text: #242220;
  --muted: #686563;
  --faint: #8a8683;
  --border: #e7e5e3;
  --accent: #f26b5b;
  --accent-strong: #d94f42;
  --accent-soft: #fff1ee;
  --support: #287c72;
  --support-soft: #eaf5f2;
  --warning: #a85f13;
  --warning-soft: #fff7e8;
  --code: #202124;
  --code-text: #f4f5f6;
  --sidebar-width: 288px;
  --toc-width: 220px;
  --topbar-height: 0px;
  --radius: 8px;
  --shadow: 0 12px 32px rgba(36, 34, 32, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

a:hover {
  color: #b63e34;
}

button,
a,
input {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  box-shadow: 0 0 0 3px rgba(242, 107, 91, 0.24);
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  color: #fff;
  background: var(--text);
  border-radius: 6px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--toc-width);
}

.mobile-bar {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: #fff;
}

.sidebar-header {
  padding: 24px 20px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand strong {
  font-size: 16px;
  font-weight: 700;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.back-link {
  width: fit-content;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.back-link svg {
  width: 15px;
  height: 15px;
}

.search-box {
  min-height: 40px;
  margin: 2px 16px 8px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--faint);
}

.search-box:focus-within {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(242, 107, 91, 0.12);
}

.search-box svg {
  width: 17px;
  height: 17px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 14px;
}

.search-box input::placeholder {
  color: var(--faint);
}

.search-box kbd {
  min-width: 20px;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-bottom-color: #d4d1cf;
  border-radius: 4px;
  background: #fff;
  color: var(--faint);
  font: 11px/17px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}

.search-status {
  min-height: 18px;
  margin: 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.doc-nav {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 7px 12px 20px;
  scrollbar-width: thin;
  scrollbar-color: #cfccca transparent;
}

.nav-group + .nav-group {
  margin-top: 21px;
}

.nav-group-title {
  margin: 0 8px 7px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  min-height: 36px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  color: #55514f;
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 650;
}

.nav-item[hidden],
.nav-group[hidden] {
  display: none;
}

.sidebar-footer {
  min-height: 52px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 12px;
}

.sidebar-footer a {
  color: var(--muted);
  text-decoration: none;
}

.drawer-scrim {
  display: none;
}

.main-column {
  min-width: 0;
  padding: 68px 56px 72px;
}

.article {
  width: min(760px, 100%);
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs svg {
  width: 13px;
  height: 13px;
}

.article-header {
  margin: 18px 0 42px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 34px;
  font-weight: 760;
  line-height: 1.28;
  letter-spacing: 0;
}

.article-header p {
  max-width: 670px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.article-body {
  color: #393634;
  font-size: 16px;
  line-height: 1.82;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--text);
  scroll-margin-top: 28px;
  letter-spacing: 0;
}

.article-body h2 {
  margin: 52px 0 16px;
  padding-top: 4px;
  font-size: 26px;
  font-weight: 730;
  line-height: 1.35;
}

.article-body h3 {
  margin: 32px 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
}

.article-body h4 {
  margin: 24px 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body table,
.article-body pre,
.article-body .callout,
.article-body .endpoint-grid,
.article-body .steps,
.article-body .live-pricing {
  margin-top: 16px;
  margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
}

.article-body li + li {
  margin-top: 7px;
}

.article-body strong {
  color: var(--text);
}

.article-body code:not(pre code) {
  padding: 2px 6px;
  border: 1px solid #e4dfdd;
  border-radius: 4px;
  color: #a43f35;
  background: #fff5f3;
  font: 0.88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.article-body pre {
  position: relative;
  overflow: auto;
  padding: 20px;
  border-radius: 8px;
  color: var(--code-text);
  background: var(--code);
  font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  scrollbar-width: thin;
}

.article-body pre code {
  font: inherit;
  white-space: pre;
}

.copy-button {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #4f5155;
  border-radius: 5px;
  color: #d5d7da;
  background: #2d2f33;
  cursor: pointer;
}

.copy-button:hover {
  color: #fff;
  background: #3a3c40;
}

.copy-button svg {
  width: 15px;
  height: 15px;
}

.callout {
  padding: 16px 18px;
  border: 1px solid #d7e7e3;
  border-left: 4px solid var(--support);
  border-radius: 6px;
  background: var(--support-soft);
}

.callout.warning {
  border-color: #f0dfbd;
  border-left-color: var(--warning);
  background: var(--warning-soft);
}

.callout.danger {
  border-color: #f0d1cc;
  border-left-color: var(--accent-strong);
  background: var(--accent-soft);
}

.callout-title {
  margin: 0 0 4px !important;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

.callout p:last-child {
  margin-bottom: 0;
}

.endpoint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.endpoint-item {
  min-width: 0;
  padding: 18px;
}

.endpoint-item + .endpoint-item {
  border-left: 1px solid var(--border);
}

.endpoint-item span {
  display: block;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
}

.endpoint-item code {
  display: block;
  margin-top: 7px;
  padding: 0 !important;
  border: 0 !important;
  color: var(--text) !important;
  background: transparent !important;
}

.steps {
  counter-reset: step;
  padding: 0;
  list-style: none;
}

.steps > li {
  position: relative;
  min-height: 42px;
  padding-left: 50px;
}

.steps > li + li {
  margin-top: 20px;
}

.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 750;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.article-body table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 14px;
}

.article-body th,
.article-body td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  color: var(--text);
  background: var(--surface);
  font-weight: 700;
}

.article-body tr:last-child td {
  border-bottom: 0;
}

.live-pricing {
  min-height: 76px;
}

.pricing-state {
  color: var(--muted);
  font-size: 14px;
}

.check-list {
  padding-left: 0 !important;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 2px;
  width: 13px;
  height: 7px;
  border-bottom: 2px solid var(--support);
  border-left: 2px solid var(--support);
  transform: rotate(-45deg);
}

.article-pager {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pager-link {
  min-width: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  text-decoration: none;
}

.pager-link:hover {
  border-color: #d9b0aa;
  color: var(--text);
  background: var(--accent-soft);
}

.pager-link.next {
  text-align: right;
}

.pager-link small {
  color: var(--faint);
  font-size: 11px;
}

.pager-link span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-footer {
  margin-top: 36px;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 12px;
}

.page-toc {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
  padding: 76px 24px 30px 4px;
  font-size: 12px;
}

.page-toc > p {
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 700;
}

.page-toc nav {
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.toc-link {
  padding: 5px 0;
  display: block;
  color: var(--muted);
  line-height: 1.45;
  text-decoration: none;
}

.toc-link.level-3 {
  padding-left: 12px;
  color: var(--faint);
}

.toc-link:hover,
.toc-link.active {
  color: var(--accent-strong);
}

.toc-help {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
}

.toc-help svg {
  width: 16px;
  height: 16px;
}

.toast {
  position: fixed;
  z-index: 150;
  right: 20px;
  bottom: 20px;
  padding: 9px 13px;
  border-radius: 6px;
  color: #fff;
  background: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .page-toc {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar-height: 56px;
  }

  body {
    padding-top: var(--topbar-height);
  }

  body.drawer-open {
    overflow: hidden;
  }

  .mobile-bar {
    position: fixed;
    z-index: 80;
    top: 0;
    right: 0;
    left: 0;
    height: var(--topbar-height);
    padding: 0 10px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
  }

  .icon-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    color: var(--text);
    background: transparent;
    cursor: pointer;
  }

  .icon-button:hover {
    background: var(--surface);
  }

  .icon-button svg {
    width: 20px;
    height: 20px;
  }

  .mobile-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
  }

  .app-shell {
    display: block;
    min-height: calc(100vh - var(--topbar-height));
  }

  .sidebar {
    position: fixed;
    z-index: 100;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(88vw, 320px);
    height: 100vh;
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  body.drawer-open .sidebar {
    transform: translateX(0);
  }

  .drawer-scrim {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(36, 34, 32, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
  }

  body.drawer-open .drawer-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .main-column {
    padding: 34px 20px 52px;
  }

  .article-header {
    margin-bottom: 32px;
    padding-bottom: 22px;
  }

  .article-header h1 {
    font-size: 28px;
  }

  .article-body h2 {
    margin-top: 42px;
    font-size: 23px;
  }

  .article-body h3 {
    font-size: 19px;
  }

  .endpoint-grid {
    grid-template-columns: 1fr;
  }

  .endpoint-item + .endpoint-item {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .article-body pre {
    margin-right: -4px;
    margin-left: -4px;
    padding: 18px 16px;
    font-size: 12px;
  }

  .article-pager {
    grid-template-columns: 1fr;
  }

  .article-footer {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 390px) {
  .main-column {
    padding-right: 16px;
    padding-left: 16px;
  }

  .article-header h1 {
    font-size: 26px;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
