:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.12);
  --text: #101828;
  --muted: #475467;
  --soft: #667085;
  --primary: #2553eb;
  --primary-soft: rgba(37, 83, 235, 0.08);
  --accent: #0ea5e9;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.06);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max: 1480px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 83, 235, 0.1), transparent 22%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 22%),
    linear-gradient(180deg, #fbfcff 0%, #f5f7fb 48%, #eef3fb 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;
}

.docs-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 20px 80px;
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  backdrop-filter: blur(16px);
}

.docs-brand-wrap,
.docs-toolbar,
.toolbar-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.docs-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #5b63ff);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(37, 83, 235, 0.22);
}

.docs-brand-copy {
  display: grid;
  gap: 3px;
}

.docs-brand-copy strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.docs-brand-copy span {
  color: var(--soft);
  font-size: 13px;
}

.language-wrap {
  position: relative;
}

.language-button,
.copy-page-button,
.toolbar-link,
.code-tab,
.copy-code-button,
.faq-toggle {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.language-button,
.copy-page-button,
.toolbar-link {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  cursor: pointer;
}

.language-button:hover,
.copy-page-button:hover,
.toolbar-link:hover,
.code-tab:hover,
.copy-code-button:hover,
.faq-toggle:hover {
  transform: translateY(-1px);
}

.toolbar-link-primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  box-shadow: 0 16px 32px rgba(37, 83, 235, 0.24);
}

.language-current {
  font-weight: 700;
}

.language-caret {
  color: var(--soft);
  font-size: 14px;
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 220px;
  padding: 10px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 18px 56px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.language-wrap.open .language-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.language-option {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.language-option.active,
.language-option:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.search-box {
  flex: 1 1 480px;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--panel-strong);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: var(--shadow-soft);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.search-icon,
.search-kbd {
  color: var(--soft);
}

.search-kbd {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 12px;
  font-weight: 700;
}

.docs-subnav {
  position: sticky;
  top: 82px;
  z-index: 20;
  display: flex;
  gap: 24px;
  margin-top: 6px;
  padding: 0 2px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(16px);
}

.docs-subnav a {
  position: relative;
  padding: 10px 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.docs-subnav a:hover,
.docs-subnav a.active {
  color: var(--text);
}

.docs-subnav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}

.docs-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 260px;
  gap: 28px;
  margin-top: 24px;
  align-items: start;
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: 140px;
}

.sidebar-card,
.toc-card,
.doc-section,
.hero-callout,
.callout-banner,
.faq-item,
.code-shell {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sidebar-card,
.toc-card {
  padding: 18px;
  border-radius: var(--radius-xl);
}

.sidebar-title,
.toc-title {
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.sidebar-group {
  display: grid;
  gap: 12px;
}

.sidebar-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
}

.sidebar-group-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}

.sidebar-link-list {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--muted);
}

.sidebar-link.active,
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
}

.sidebar-link-badge {
  min-width: 40px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(37, 83, 235, 0.1);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.sidebar-link-label {
  flex: 1;
  line-height: 1.5;
}

.docs-main {
  min-width: 0;
}

.docs-article-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 28px;
}

.article-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.docs-article-head h1 {
  margin: 14px 0 14px;
  font-size: clamp(42px, 4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.docs-article-head p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.docs-content {
  display: grid;
  gap: 20px;
}

.doc-section {
  padding: 28px;
  border-radius: 28px;
}

.doc-section[hidden] {
  display: none;
}

.doc-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.doc-section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.endpoint-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 83, 235, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.paragraphs {
  display: grid;
  gap: 14px;
}

.paragraphs p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.inline-code {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--text);
}

.meta-grid,
.cards-grid,
.steps-grid,
.faq-list {
  display: grid;
  gap: 16px;
}

.meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.meta-card,
.small-card,
.step-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow-soft);
}

.meta-card span,
.small-card span,
.step-card span {
  display: block;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.meta-card strong,
.small-card strong,
.step-card strong {
  display: block;
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.45;
}

.meta-card code {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  font-size: 13px;
}

.hero-callout,
.callout-banner {
  padding: 20px;
  border-radius: 24px;
}

.hero-callout {
  margin-top: 22px;
}

.callout-banner {
  margin-top: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 83, 235, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.88);
}

.callout-banner strong,
.hero-callout strong {
  display: block;
  font-size: 22px;
  line-height: 1.3;
}

.callout-banner p,
.hero-callout p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.cards-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.small-card ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.small-card li {
  color: var(--muted);
  line-height: 1.65;
}

.steps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.step-card strong {
  font-size: 21px;
}

.step-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.78;
}

.code-shell {
  margin-top: 22px;
  overflow: hidden;
  border-radius: 24px;
}

.code-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.code-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.code-tab {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.code-tab.active {
  background: rgba(37, 83, 235, 0.1);
  color: var(--primary);
}

.copy-code-button {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.code-pre {
  margin: 0;
  padding: 20px 22px 22px;
  overflow-x: auto;
  background: rgba(11, 18, 32, 0.96);
  color: #dbe7ff;
  font-size: 13px;
  line-height: 1.8;
}

.code-pre code {
  white-space: pre;
}

.table-shell {
  margin-top: 22px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.7);
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  line-height: 1.72;
}

.faq-list {
  margin-top: 20px;
}

.faq-item {
  border-radius: 22px;
  overflow: hidden;
}

.faq-toggle {
  width: 100%;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  cursor: pointer;
}

.faq-toggle strong {
  font-size: 18px;
  line-height: 1.5;
}

.faq-toggle span {
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
}

.faq-answer {
  display: none;
  padding: 0 20px 20px;
  color: var(--muted);
  line-height: 1.85;
}

.faq-item.open .faq-answer {
  display: block;
}

.toc-card nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.toc-link {
  padding: 8px 10px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.toc-link.active,
.toc-link:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary);
}

.empty-state {
  padding: 34px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed rgba(148, 163, 184, 0.22);
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1280px) {
  .docs-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 980px) {
  .docs-shell {
    padding: 16px 16px 72px;
  }

  .docs-header,
  .docs-brand-wrap,
  .docs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-links {
    justify-content: flex-start;
  }

  .docs-subnav {
    top: 148px;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar,
  .docs-toc {
    position: static;
  }

  .docs-sidebar {
    order: 2;
  }

  .docs-main {
    order: 1;
  }

  .meta-grid,
  .cards-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .docs-brand-copy strong {
    font-size: 24px;
  }

  .docs-article-head {
    flex-direction: column;
  }

  .docs-article-head h1 {
    font-size: 36px;
  }

  .doc-section {
    padding: 22px;
  }

  .doc-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-box {
    min-width: 0;
  }

  .search-kbd {
    display: none;
  }
}
