:root {
  color-scheme: light;
  --color-canvas: #f6f8fb;
  --color-surface: #ffffff;
  --color-surface-soft: #f8fafc;
  --color-line: #dde3ea;
  --color-line-strong: #c8d1dc;
  --color-text: #172033;
  --color-muted: #667085;
  --color-soft: #98a2b3;
  --color-brand: #1f5fbf;
  --color-brand-strong: #174a98;
  --color-brand-soft: #edf4ff;
  --color-green: #13795b;
  --color-red: #b42318;
  --color-code-bg: #0f172a;
  --shadow-soft: 0 14px 36px rgba(23, 32, 51, 0.08);
  --radius-sm: 6px;
  --radius-md: 8px;
  --topbar-height: 58px;
  --content-top-gap: 18px;
  --sticky-top: calc(var(--topbar-height) + var(--content-top-gap));
  --space-page: clamp(14px, 3vw, 32px);
  --font-sans: Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --font-mono: Consolas, "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-canvas);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

input {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  padding: 9px 11px;
  outline: none;
}

input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(31, 95, 191, 0.12);
}

h1,
h2,
h3,
p,
dl,
dd {
  margin-top: 0;
}

p {
  color: var(--color-muted);
  line-height: 1.68;
}

code,
.doc-key {
  font-family: var(--font-mono);
}

pre {
  margin: 0;
  overflow: auto;
  border-radius: var(--radius-md);
  background: var(--color-code-bg);
  color: #edf2ff;
  padding: 14px 16px;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--topbar-height);
  padding: 8px var(--space-page);
  border-bottom: 1px solid rgba(221, 227, 234, 0.95);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 2px;
  color: var(--color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-search {
  position: relative;
  display: block;
  min-width: 0;
}

.doc-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.text-btn {
  min-height: 34px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  padding: 7px 10px;
  font-weight: 800;
  white-space: nowrap;
}

.text-btn:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.text-btn.primary {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: #fff;
}

.text-btn.primary:hover {
  border-color: var(--color-brand-strong);
  background: var(--color-brand-strong);
  color: #fff;
}

.text-btn.muted {
  color: var(--color-muted);
}

.label-narrow {
  display: none;
}

.mobile-nav-toggle {
  display: none;
}

.nav-backdrop {
  position: fixed;
  inset: var(--topbar-height) 0 0;
  z-index: 55;
  border: 0;
  background: rgba(15, 23, 42, 0.2);
  padding: 0;
}

body.is-nav-open {
  overflow: hidden;
}

.doc-shell {
  width: min(1500px, calc(100% - var(--space-page) * 2));
  margin: 0 auto;
  padding: var(--content-top-gap) 0 52px;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: start;
}

.doc-sidebar,
.doc-toc {
  position: sticky;
  top: var(--sticky-top);
  min-width: 0;
}

.doc-sidebar {
  display: grid;
  gap: 12px;
}

.drawer-head {
  display: none;
}

.drawer-scroll {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-section,
.toc-card,
.project-intro,
.open-doc {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.sidebar-section,
.toc-card {
  overflow: hidden;
}

.sidebar-section {
  flex: 0 0 auto;
}

.sidebar-section.is-expanded {
  min-height: 0;
}

.sidebar-title {
  width: 100%;
  min-height: 42px;
  border: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-line);
  background: transparent;
  color: var(--color-text);
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto auto;
  column-gap: 10px;
  text-align: left;
}

.sidebar-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.sidebar-title-count {
  justify-self: end;
  min-width: 28px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--color-muted);
  padding: 3px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.sidebar-title::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-soft);
  border-bottom: 2px solid var(--color-soft);
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.sidebar-section.is-expanded .sidebar-title::after {
  transform: rotate(225deg);
}

.module-nav,
.doc-menu {
  padding: 8px;
  display: grid;
  gap: 4px;
  overflow: hidden;
  transition: max-height 0.16s ease, padding 0.16s ease;
}

.sidebar-section:not(.is-expanded) .module-nav,
.sidebar-section:not(.is-expanded) .doc-menu {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.sidebar-section.is-expanded .module-nav,
.sidebar-section.is-expanded .doc-menu {
  max-height: 520px;
  overflow: auto;
}

.doc-menu-tools {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -8px -8px 4px;
  padding: 8px;
  border-bottom: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.98);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.doc-menu-search {
  min-width: 0;
}

.doc-menu-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.global-search-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 90;
  max-height: min(520px, calc(100vh - 92px));
  overflow: auto;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 18px 42px rgba(23, 32, 51, 0.16);
}

.global-search-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 38px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.98);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.global-search-head strong {
  font-size: 13px;
}

.global-search-head span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.global-search-list {
  padding: 6px;
  display: grid;
  gap: 3px;
}

.global-search-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.global-search-item:hover,
.global-search-item.is-active {
  border-color: #bdd2f8;
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

.global-search-item span {
  position: static;
  width: auto;
  height: auto;
  min-width: 0;
  overflow: visible;
  clip: auto;
}

.global-search-item strong,
.global-search-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-item strong {
  color: inherit;
  line-height: 1.35;
}

.global-search-item strong em {
  margin-right: 7px;
  border-radius: 4px;
  background: #e7edf5;
  color: #334155;
  padding: 2px 5px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
}

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

.global-search-item i {
  color: var(--color-muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.global-search-empty {
  padding: 18px 16px;
  display: grid;
  gap: 4px;
}

.global-search-empty strong {
  color: var(--color-text);
}

.global-search-empty span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  color: var(--color-muted);
  line-height: 1.5;
}

.doc-menu-search input {
  height: 32px;
  padding: 6px 9px;
  font-size: 13px;
}

.doc-menu-summary {
  min-width: 34px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--color-muted);
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.api-group {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.api-group-title {
  width: 100%;
  min-height: 33px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: #f7f9fc;
  color: var(--color-text);
  padding: 6px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  text-align: left;
}

.api-group-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.api-group-title em {
  min-width: 26px;
  border-radius: 999px;
  background: #e7edf5;
  color: var(--color-muted);
  padding: 2px 7px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.api-group-title::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--color-soft);
  border-bottom: 2px solid var(--color-soft);
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.api-group.is-expanded .api-group-title::after {
  transform: rotate(225deg);
}

.api-group-title:hover,
.api-group.has-active-doc .api-group-title {
  border-color: #bdd2f8;
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

.api-group-list {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-left: 6px;
  border-left: 2px solid #e7edf5;
}

.module-item,
.doc-menu-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-muted);
  padding: 8px 9px;
  display: grid;
  gap: 3px;
  text-align: left;
}

.module-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.module-item span,
.doc-menu-item span {
  min-width: 0;
}

.module-item strong,
.module-item small:not(.module-type-counts),
.doc-menu-item span,
.doc-menu-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-item strong {
  color: inherit;
}

.module-item small,
.doc-menu-item small {
  color: var(--color-soft);
  font-size: 12px;
}

.module-type-counts {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.module-type-counts b {
  border-radius: 4px;
  background: #eef2f7;
  color: var(--color-muted);
  padding: 2px 5px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.module-item.is-active .module-type-counts b,
.module-item:hover .module-type-counts b {
  background: #dfeafe;
  color: var(--color-brand-strong);
}

.module-item em {
  min-width: 24px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--color-muted);
  padding: 3px 7px;
  font-style: normal;
  font-size: 12px;
  text-align: center;
}

.doc-menu-item span {
  color: inherit;
  font-weight: 800;
  line-height: 1.35;
}

.doc-menu-item span em {
  margin-right: 6px;
  border-radius: 4px;
  background: #e7edf5;
  color: #334155;
  padding: 2px 5px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
}

.module-item:hover,
.module-item.is-active,
.doc-menu-item:hover,
.doc-menu-item.is-active {
  border-color: #bdd2f8;
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

.empty-state {
  padding: 16px 10px;
  color: var(--color-soft);
  font-size: 13px;
  text-align: center;
}

.doc-main {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.project-intro {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 14px;
  align-items: center;
}

.project-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.project-kicker,
.eyebrow {
  margin: 0 0 6px;
  color: var(--color-brand);
  font-size: 12px;
  font-weight: 900;
}

.project-kicker {
  margin: 0;
  border-radius: 4px;
  background: var(--color-brand-soft);
  padding: 3px 6px;
  line-height: 1;
}

.project-copy strong {
  min-width: 0;
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-copy span:last-child {
  min-width: 0;
  color: var(--color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta {
  margin-bottom: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.project-meta div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--color-line);
}

.project-meta div:last-child {
  border-right: none;
}

.project-meta dt {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.project-meta dd {
  margin: 4px 0 0;
  color: var(--color-text);
  font-weight: 900;
  white-space: nowrap;
}

.open-doc {
  padding: 26px 30px 34px;
}

.home-heading {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--color-line);
}

.home-heading h2 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.2;
}

.home-heading p {
  max-width: 760px;
  margin-bottom: 0;
}

.home-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sdk-entry-strip {
  margin-top: 16px;
  border: 1px solid #b8cae8;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #f4f8ff 0%, #ffffff 48%, #f8fbff 100%);
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
}

.sdk-entry-head {
  border-right: 1px solid #d2def0;
  background: #eaf2ff;
  padding: 14px 16px;
  display: grid;
  align-content: center;
  gap: 5px;
}

.sdk-entry-head span,
.sdk-entry-head a {
  color: var(--color-brand);
  font-size: 12px;
  font-weight: 900;
}

.sdk-entry-head a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sdk-entry-head strong {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.25;
}

.sdk-entry-links {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sdk-link {
  min-width: 0;
  border-right: 1px solid var(--color-line);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  transition: background 0.16s ease, color 0.16s ease;
}

.sdk-link:last-child {
  border-right: 0;
}

.sdk-link:hover {
  background: #eef5ff;
  color: var(--color-brand-strong);
}

.sdk-link-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #183b73;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.sdk-link-body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sdk-link-body strong,
.sdk-link-body small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sdk-link-body strong {
  font-size: 14px;
  font-weight: 900;
}

.sdk-link-body small {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.sdk-link-count {
  display: none;
  border-radius: 999px;
  background: var(--color-brand-soft);
  color: var(--color-brand-strong);
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.home-section {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}

.home-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.home-section-header h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.35;
}

.home-section-header p {
  margin-bottom: 0;
}

.home-module-list {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff;
}

.home-module-row {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  background: #fff;
  color: var(--color-text);
  padding: 13px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.home-module-row:nth-child(2n) {
  border-right: 0;
}

.home-module-row:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.home-module-row:hover,
.home-module-row.is-active {
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

.home-module-row span {
  min-width: 0;
}

.home-module-row strong,
.home-module-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-module-row small {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 12px;
}

.home-module-row em {
  border-radius: 999px;
  background: #eef2f7;
  color: var(--color-muted);
  padding: 3px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.home-mini-meta {
  margin: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
}

.home-mini-meta div {
  padding: 8px 12px;
  border-right: 1px solid var(--color-line);
}

.home-mini-meta div:last-child {
  border-right: 0;
}

.home-mini-meta dt {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.home-mini-meta dd {
  margin: 3px 0 0;
  color: var(--color-text);
  font-weight: 900;
}

.home-doc-group {
  border-top: 1px solid var(--color-line);
  padding-top: 14px;
  display: grid;
  gap: 8px;
}

.home-doc-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-doc-title strong {
  font-size: 15px;
}

.home-doc-title span {
  min-width: 24px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--color-muted);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.home-doc-list {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.home-doc-row {
  min-width: 0;
  padding: 11px 12px;
  border-bottom: 1px solid var(--color-line);
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.home-doc-row:last-child {
  border-bottom: 0;
}

.home-doc-row:hover {
  background: var(--color-brand-soft);
}

.home-doc-row span {
  min-width: 0;
}

.home-doc-row strong,
.home-doc-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-doc-row strong {
  color: var(--color-text);
}

.home-doc-row strong em {
  margin-right: 7px;
  border-radius: 4px;
  background: #e7edf5;
  color: #334155;
  padding: 2px 5px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
}

.home-doc-row small {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 12px;
}

.home-doc-row i {
  color: var(--color-muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.home-empty {
  padding: 16px 12px;
  color: var(--color-soft);
  text-align: center;
}

.home-more {
  margin: 0;
  font-size: 13px;
}

.doc-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  gap: 24px;
  align-items: start;
}

.doc-category {
  margin: 0 0 7px;
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 900;
}

.doc-heading h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.22;
}

.doc-heading p {
  margin-bottom: 0;
}

.version-panel {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  padding: 12px;
}

.version-panel span,
.version-panel small {
  display: block;
  color: var(--color-muted);
  font-size: 12px;
}

.version-panel strong {
  display: block;
  margin: 4px 0;
  color: var(--color-text);
  font-size: 22px;
}

.meta-strip {
  margin-top: 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.meta-strip span {
  display: block;
  margin-bottom: 4px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.meta-strip strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.doc-section {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.doc-section h3 {
  margin: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--color-line);
  font-size: 20px;
  line-height: 1.35;
}

.doc-section p {
  margin: 0;
}

.api-info {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.api-info div {
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-line);
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}

.api-info div:last-child {
  border-bottom: none;
}

.api-info span {
  color: var(--color-muted);
  font-weight: 800;
}

.api-info strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.method-badge {
  min-width: 56px;
  border-radius: 4px;
  background: #e6ebf2;
  color: #334155;
  padding: 3px 8px;
  display: inline-flex;
  justify-content: center;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.method-get {
  background: #e8f6ef;
  color: var(--color-green);
}

.method-post,
.method-put,
.method-patch {
  background: var(--color-brand-soft);
  color: var(--color-brand-strong);
}

.method-delete {
  background: #ffe9e9;
  color: var(--color-red);
}

.table-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.field-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
}

.field-table th,
.field-table td {
  border-bottom: 1px solid var(--color-line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.field-table th {
  background: #f7f9fc;
  color: var(--color-muted);
  font-size: 13px;
  white-space: nowrap;
}

.field-table tr:last-child td {
  border-bottom: none;
}

.field-table code,
.markdown-body code,
.doc-list-content code,
.doc-section p code,
.api-info code {
  border: 1px solid #d7e1ef;
  border-radius: 4px;
  background: #f7f9fc;
  color: #334155;
  padding: 1px 4px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.code-block {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-block code {
  display: block;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  overflow-wrap: inherit;
}

.doc-list-content {
  margin: 0;
  padding-left: 22px;
  color: var(--color-text);
  line-height: 1.75;
}

.doc-list-content li + li {
  margin-top: 5px;
}

.template-list,
.qa-list {
  display: grid;
  gap: 10px;
}

.template-card,
.qa-list article {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.template-card strong,
.qa-list strong {
  display: block;
}

.template-card p,
.qa-list p {
  margin: 0;
}

.template-card pre {
  font-size: 13px;
}

.markdown-body {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.78;
}

.markdown-body h3,
.markdown-body h4,
.markdown-body h5 {
  margin: 18px 0 8px;
  color: var(--color-text);
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol {
  margin: 0 0 12px;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 22px;
}

.toc-card {
  padding: 14px;
}

.toc-card strong {
  display: block;
  margin-bottom: 10px;
}

.toc-list {
  display: grid;
  gap: 5px;
}

.toc-list a,
.toc-list span {
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  padding: 6px 8px;
  font-size: 13px;
}

.toc-list a:hover {
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

.empty-page {
  padding: 60px 20px;
  text-align: center;
}

.empty-page h2 {
  margin-bottom: 8px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(520px, calc(100vw - 48px));
  border-radius: var(--radius-md);
  background: var(--color-code-bg);
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(210px, 300px) minmax(220px, 1fr) auto;
  }

  .doc-shell {
    grid-template-columns: 1fr;
  }

  .doc-toc,
  .project-intro {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  body.is-nav-open .mobile-nav-toggle {
    display: none;
  }

  .doc-sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-height);
    bottom: 0;
    z-index: 60;
    width: min(390px, calc(100vw - 54px));
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
    border-right: 1px solid var(--color-line);
    border-radius: 0;
    background: var(--color-canvas);
    padding: 0;
    box-shadow: 18px 0 42px rgba(23, 32, 51, 0.18);
    overscroll-behavior: contain;
    transform: translateX(calc(-100% - 18px));
    transition: transform 0.18s ease;
  }

  .doc-sidebar.is-mobile-open {
    transform: translateX(0);
  }

  .drawer-head {
    min-height: 54px;
    border-bottom: 1px solid var(--color-line);
    background: var(--color-surface);
    padding: 10px 12px 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .drawer-head strong {
    font-size: 16px;
  }

  .drawer-head .text-btn {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 13px;
  }

  .drawer-scroll {
    overflow: auto;
    padding: 12px;
    gap: 10px;
  }

  .doc-heading {
    grid-template-columns: 1fr;
  }

  .home-section-header {
    grid-template-columns: 1fr;
  }

  .sdk-entry-strip {
    grid-template-columns: 1fr;
  }

  .sdk-entry-head {
    border-right: 0;
    border-bottom: 1px solid #d2def0;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .sdk-entry-head strong {
    font-size: 14px;
  }

  .sdk-entry-links {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .sdk-link {
    min-width: 236px;
    border-right: 1px solid var(--color-line);
  }

  .top-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
  }

  .module-nav,
  .doc-menu {
    grid-template-columns: 1fr;
    padding: 0 8px;
    max-height: 0;
    overflow: hidden;
  }

  .sidebar-section.is-expanded .module-nav,
  .sidebar-section.is-expanded .doc-menu {
    padding: 8px;
    max-height: min(46vh, 420px);
    overflow: auto;
  }

  .doc-menu-tools {
    margin: -8px -8px 4px;
    padding: 7px 8px;
  }

  .doc-menu-search input {
    height: 31px;
  }

  .sidebar-section:not(.has-active-item):not(.is-expanded) .module-nav,
  .sidebar-section:not(.has-active-item):not(.is-expanded) .doc-menu {
    display: none;
  }

  .module-item,
  .doc-menu-item {
    padding: 7px 8px;
  }

  .api-group-title {
    min-height: 32px;
    padding: 6px 8px;
  }

  .api-group-list {
    padding-left: 5px;
  }

  .open-doc {
    padding: 18px 16px 24px;
  }

  .home-module-list {
    grid-template-columns: 1fr;
  }

  .home-module-row,
  .home-module-row:nth-child(2n),
  .home-module-row:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }

  .home-module-row:last-child {
    border-bottom: 0;
  }

  .meta-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  :root {
    --topbar-height: 54px;
    --space-page: 12px;
  }

  .topbar {
    min-height: var(--topbar-height);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 14px;
  }

  .brand strong {
    max-width: 7em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
  }

  .brand small {
    max-width: 9em;
    white-space: nowrap;
  }

  .text-btn {
    min-height: 30px;
    padding: 5px 6px;
    font-size: 12px;
  }

  .top-actions {
    gap: 4px;
  }

  .doc-search {
    display: none;
  }

  .top-actions .primary,
  .top-actions .copy-current-link,
  .top-actions .muted {
    display: none;
  }

  .label-wide {
    display: none;
  }

  .label-narrow {
    display: inline;
  }

  input {
    padding: 8px 10px;
  }

  .project-meta {
    grid-template-columns: 1fr;
  }

  .project-copy {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .project-copy span:last-child {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .project-meta div {
    border-right: none;
    border-bottom: 1px solid var(--color-line);
  }

  .project-meta div:last-child {
    border-bottom: none;
  }

  .doc-heading h2 {
    font-size: 24px;
  }

  .home-heading h2 {
    font-size: 25px;
  }

  .sdk-entry-strip {
    margin-top: 12px;
  }

  .sdk-entry-head {
    padding: 8px 10px;
    justify-content: flex-start;
  }

  .sdk-entry-head span,
  .sdk-entry-head a {
    font-size: 12px;
  }

  .sdk-entry-head strong {
    display: none;
  }

  .sdk-link {
    min-width: 208px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    padding: 9px 10px;
  }

  .sdk-link-mark {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .sdk-link-count {
    display: none;
  }

  .home-mini-meta {
    grid-template-columns: 1fr;
  }

  .home-mini-meta div {
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }

  .home-mini-meta div:last-child {
    border-bottom: 0;
  }

  .home-doc-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .home-doc-row i {
    justify-self: start;
  }

  .api-info div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .doc-sidebar {
    width: min(360px, calc(100vw - 42px));
  }

  .drawer-scroll {
    padding: 8px;
    gap: 8px;
  }

  .sidebar-title {
    min-height: 38px;
    padding: 10px 12px;
  }

  .sidebar-section.is-expanded .module-nav,
  .sidebar-section.is-expanded .doc-menu {
    max-height: min(54vh, 430px);
  }

  .doc-menu-tools {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .doc-menu-summary {
    min-width: 30px;
    padding: 4px 6px;
  }
}
