/* =============================================================================
   ni-paas-im 文档中心 —— RongCloud IM 文档中心对标设计系统（全新独立实现）
   规格：docs/specs/rongcloud-docs-uiux-spec.md（实测：导航 60px / 侧栏 300px /
   容器 1140–1320 / 正文 807px / 目录 237px / 正文 16px / 表格 14.4px /
   辅助 12.8px / 主色 #2160fd / 链接 #1a56ef / 分隔线 #dedede、#dadde1 /
   标题 32px Plus Jakarta Sans）。仅复刻视觉规格，不含融云源码。
   ========================================================================== */

/* ---------- 字体（Inter / Plus Jakarta Sans / Fira Code，开源字体，自托管） ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/Inter.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('assets/fonts/PlusJakartaSans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/FiraCode.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 设计令牌 ---------- */
:root {
  color-scheme: light;
  --navbar-height: 60px;
  --sidebar-width: 300px;
  --container-max: 1320px;
  --content-pad-y: 16px;
  --content-pad-x: 24px;
  --radius-xs: 4px;
  --radius-sm: 6.4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 24px;

  /* 与参照站（docs.rongcloud.cn Docusaurus）逐字一致的字体栈，保证同一字体回退结果 */
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-heading: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-mono: 'Fira Code', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
    'Courier New', monospace;

  --bg: #ffffff;
  --bg-subtle: #f8f8f8;
  --bg-elev: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.05);
  --bg-active: rgba(33, 96, 253, 0.16);
  --text: #1c1e21;
  --text-secondary: #525860;
  --text-muted: #646464;
  --text-faint: #969fa8;
  --menu-text: #606770;
  --primary: #2160fd;
  --primary-hover: #1a56ef;
  --link: #1a56ef;
  --link-hover: #2160fd;
  --border: #dedede;
  --border-table: #dadde1;
  --border-input: #dadde1;
  --code-bg: #f6f8fa;
  --code-border: #dadde1;
  --code-text: #393a34;
  --inline-code-bg: #f6f7f8;
  --table-head-text: #646464;
  --navbar-bg: #ffffff;
  --navbar-border: #dedede;
  --sidebar-bg: #ffffff;
  --footer-bg: #f4f7ff;
  --footer-title: #9ca3af;
  --footer-link: #374151;
  --footer-link-hover: #2160fd;
  --shadow-lw: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
  --shadow-menu: 0 5px 40px rgba(0, 0, 0, 0.2);
  --shadow-search: 0 12px 28px 0 rgba(0, 0, 0, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  --overlay: rgba(0, 0, 0, 0.45);
  --on-primary: #ffffff;
  --scrollbar-thumb: #c4c4c4;

  --note-bg: #fdfdfe;
  --note-border: #a4a6a8;
  --note-fg: #474748;
  --tip-bg: #e6f6e6;
  --tip-border: #009400;
  --tip-fg: #003100;
  --info-bg: #eef9fd;
  --info-border: #4cb3d4;
  --info-fg: #193c47;
  --warning-bg: #fff8e6;
  --warning-border: #e6a700;
  --warning-fg: #4d3800;
  --danger-bg: #ffebec;
  --danger-border: #e13238;
  --danger-fg: #4b1113;

  --tok-comment: #6a737d;
  --tok-keyword: #d73a49;
  --tok-function: #6f42c1;
  --tok-string: #032f62;
  --tok-number: #005cc5;
  --tok-operator: #d73a49;
  --tok-punctuation: #24292e;
  --tok-property: #005cc5;
  --tok-class: #6f42c1;
  --tok-builtin: #e36209;
  --tok-variable: #e36209;
  --tok-tag: #22863a;
  --tok-attr: #6f42c1;
  --tok-regex: #032f62;
  --tok-deleted: #b31d28;
  --tok-inserted: #22863a;
  --tok-meta: #6a737d;

  --z-dropdown: 100;
  --z-navbar: 200;
  --z-overlay: 400;
  --z-modal: 500;
  --transition: 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #161616;
  --bg-subtle: #1c1c1c;
  --bg-elev: #1f1f1f;
  --bg-hover: rgba(255, 255, 255, 0.07);
  --bg-active: rgba(33, 96, 253, 0.24);
  --text: #ffffff;
  --text-secondary: #b4b4b4;
  --text-muted: #999999;
  --text-faint: #7a7a7a;
  --primary: #4d7dff;
  --primary-hover: #6b93ff;
  --link: #6b93ff;
  --link-hover: #8aa9ff;
  --border: #2e2e2e;
  --border-table: #2e2e2e;
  --border-input: #3a3a3a;
  --code-bg: #1e1e1e;
  --code-border: #2e2e2e;
  --code-text: #e6e6e6;
  --inline-code-bg: #2a2a2a;
  --table-head-text: #b4b4b4;
  --navbar-bg: #161616;
  --navbar-border: #2e2e2e;
  --sidebar-bg: #161616;
  --footer-bg: #191919;
  --footer-title: #ffffff;
  --footer-link: #f9f9f9;
  --footer-link-hover: #8aa9ff;
  --shadow-lw: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-menu: 0 5px 40px rgba(0, 0, 0, 0.55);
  --shadow-search: 0 12px 28px 0 rgba(0, 0, 0, 0.55), 0 2px 4px 0 rgba(0, 0, 0, 0.3);
  --overlay: rgba(0, 0, 0, 0.6);
  --scrollbar-thumb: #3a3a3a;
  --note-bg: #262626;
  --note-border: #8d949e;
  --note-fg: #e6e6e6;
  --tip-bg: #17301a;
  --tip-border: #26b226;
  --tip-fg: #b6e6b6;
  --info-bg: #12262e;
  --info-border: #4cb3d4;
  --info-fg: #b9e7f5;
  --warning-bg: #2e2510;
  --warning-border: #e6a700;
  --warning-fg: #ffe7a3;
  --danger-bg: #2e1415;
  --danger-border: #e13238;
  --danger-fg: #ffc9cb;
  --tok-comment: #768390;
  --tok-keyword: #f47067;
  --tok-function: #dcbdfb;
  --tok-string: #96d0ff;
  --tok-number: #6cb6ff;
  --tok-operator: #f47067;
  --tok-punctuation: #adbac7;
  --tok-property: #6cb6ff;
  --tok-class: #dcbdfb;
  --tok-builtin: #f69d50;
  --tok-variable: #f69d50;
  --tok-tag: #8ddb8c;
  --tok-attr: #6cb6ff;
  --tok-regex: #96d0ff;
  --tok-deleted: #ff938a;
  --tok-inserted: #8ddb8c;
  --tok-meta: #768390;
}

/* ---------- 基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--navbar-height) + 12px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
img {
  max-width: 100%;
}
button {
  font-family: inherit;
}
::selection {
  background: rgba(33, 96, 253, 0.24);
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--primary);
  color: var(--on-primary);
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus {
  left: 0;
}
.thin-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.thin-scrollbar::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.thin-scrollbar::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}
.thin-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

/* =============================================================================
   顶部导航
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-navbar);
  display: flex;
  align-items: center;
  height: var(--navbar-height);
  padding: 8px 12px;
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--navbar-border);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}
.navbar__items {
  display: flex;
  align-items: center;
  min-width: 0;
}
.navbar__items--right {
  justify-content: flex-end;
  gap: 8px;
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 20px;
  flex-shrink: 0;
}
.navbar__logo a {
  display: flex;
  align-items: center;
  color: var(--text);
}
.brand-svg {
  height: 26px;
  width: auto;
  display: block;
}
.brand-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 2px;
}
.brand-docs {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  color: var(--text);
}
.brand-docs span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-docs small {
  font-size: 9px;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.navbar__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.navbar__item:hover {
  text-decoration: none;
  color: var(--primary);
}
.navbar__item.navbar__link--active {
  color: var(--link);
}
.navbar__item .caret-icon {
  width: 10px;
  height: 10px;
  color: var(--text-faint);
  transition: transform var(--transition);
}
.navbar__dropdown {
  position: relative;
}
.navbar__dropdown:hover > .navbar__link,
.navbar__dropdown:focus-within > .navbar__link {
  color: var(--primary);
}
.navbar__dropdown:hover .caret-icon,
.navbar__dropdown:focus-within .caret-icon {
  transform: rotate(180deg);
}
.navbar__dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--z-dropdown);
  min-width: 260px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-menu);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms;
}
.navbar__dropdown-menu--wide {
  /* 宽下拉不超出视口：窄屏时收缩，靠右的触发器改为右对齐（见下方规则）。 */
  min-width: min(620px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 16px;
}
/* 顶部导航最后一个下拉（资源 & 工具）在 1440px 及以下右对齐，避免溢出视口右侧。 */
.navbar__items--left > .navbar__dropdown:last-of-type > .navbar__dropdown-menu--wide {
  left: auto;
  right: 0;
}
@media (max-width: 1440px) {
  /* 导航较窄时收紧项间距，保证 1280~1440 不出现横向滚动。 */
  .navbar__item {
    margin-right: 2px;
    padding: 4px 10px;
  }
  .navbar__logo {
    margin-right: 12px;
  }
}
.navbar__dropdown:hover .navbar__dropdown-menu,
.navbar__dropdown:focus-within .navbar__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}
.dropdown-col-title {
  margin: 0 0 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.navbar__dropdown-menu a {
  display: block;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.navbar__dropdown-menu a:hover {
  background: var(--bg-hover);
  color: var(--primary);
  text-decoration: none;
}
.navbar__dropdown-menu .menu-note {
  padding: 6px 8px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 400;
  white-space: normal;
}
.navbar__dropdown-menu .menu-disabled {
  color: var(--text-faint);
  cursor: not-allowed;
}
.navbar__dropdown-menu .menu-disabled:hover {
  background: none;
  color: var(--text-faint);
}
.navbar__dropdown-menu .tag-beta {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 16px;
}

/* 搜索触发器 */
.navbar__search {
  display: flex;
  align-items: center;
}
.DocSearch-Button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 168px;
  height: 36px;
  margin: 0;
  padding: 0 8px 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.DocSearch-Button:hover {
  border-color: var(--primary);
  background: var(--bg-elev);
}
.DocSearch-Button-Container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.DocSearch-Button-Container svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}
.DocSearch-Button-Placeholder {
  font-size: 14px;
  padding: 0;
}
.DocSearch-Button-Keys {
  display: flex;
  align-items: center;
  gap: 2px;
}
.DocSearch-Button-Key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg-elev);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1;
}
.DocSearch-Button-Key svg {
  width: 12px;
  height: 12px;
}

/* 控制台按钮 / 主题 / 语言 */
.navbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  margin-right: 4px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-primary) !important;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.navbar__cta:hover {
  background: var(--primary-hover);
  text-decoration: none;
}
.navbar__cta svg {
  width: 13px;
  height: 13px;
}
.navbar__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.navbar__icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.navbar__icon-btn svg {
  width: 22px;
  height: 22px;
}
.icon-moon {
  display: none;
}
html[data-theme='dark'] .icon-moon {
  display: block;
}
html[data-theme='dark'] .icon-sun {
  display: none;
}
.navbar__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.navbar__toggle svg {
  width: 24px;
  height: 24px;
}
.lang-switch {
  position: relative;
}
.lang-switch__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: var(--z-dropdown);
  min-width: 132px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-menu);
  display: none;
}
.lang-switch.is-open .lang-switch__menu {
  display: block;
}
.lang-switch__menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.lang-switch__menu button:hover {
  background: var(--bg-hover);
}
.lang-switch__menu button[aria-checked='true'] {
  color: var(--primary);
  font-weight: 600;
}

/* =============================================================================
   文档框架
   ========================================================================== */
.docs-container {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - var(--navbar-height));
}
/* 参照站：侧栏容器与正文同高（右边框延伸整页），内部视口 sticky 到顶部；容器上移一个导航高度。 */
.theme-doc-sidebar-container {
  position: relative;
  top: 0;
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  height: auto;
  margin-top: calc(-1 * var(--navbar-height));
  border-right: 0;
  box-shadow: inset -1px 0 0 var(--border);
  background: transparent;
  transition: flex-basis var(--transition), width var(--transition), max-width var(--transition);
}
.theme-doc-sidebar-container.is-collapsed {
  flex-basis: 0;
  width: 0;
  max-width: 0;
  overflow: hidden;
  border-right: 0;
}
.sidebarViewport {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.sidebarViewport-inner {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--navbar-height) 0 56px 0;
}
.theme-doc-sidebar-container.is-collapsed .sidebarViewport {
  display: none;
}
.sidebarCollapseBtn {
  position: absolute;
  right: 0;
  bottom: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--code-border);
  color: var(--text-secondary);
  cursor: pointer;
}
html[data-theme='dark'] .sidebarCollapseBtn {
  background: var(--bg-elev);
}
.sidebarCollapseBtn:hover {
  background: var(--bg-subtle);
}
.sidebarCollapseBtn svg {
  width: 16px;
  height: 16px;
}
.sidebarExpandBtn {
  position: fixed;
  left: 0;
  bottom: 24px;
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  background: var(--code-border);
  color: var(--text-secondary);
  cursor: pointer;
}
html.sidebar-collapsed .sidebarExpandBtn {
  display: flex;
}
html[data-theme='dark'] .sidebarExpandBtn {
  background: var(--bg-elev);
}

/* 侧栏菜单（Infima menu 规格：菜单根 16px/1.65，链接 14px/500，6px 12px，radius 4px 0 0 4px） */
.menu {
  padding: 8px 0 8px 8px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
}
.menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu__list .menu__list {
  margin-top: 4px;
  padding-left: 12px;
}
.menu__list-item {
  margin: 0;
  padding: 0;
}
.menu__list-item--collapsed > .menu__list {
  display: none;
}
.menu__list-item-collapsible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  border-radius: var(--radius-xs);
  transition: background var(--transition);
}
.menu__list-item-collapsible:hover {
  background: none;
}
.menu__list-item-collapsible--active {
  background: none;
}
.menu__link {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 12px;
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
  color: var(--menu-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  transition: color var(--transition);
}
.menu__link:hover {
  color: var(--menu-text);
  text-decoration: none;
  background: none;
}
.menu__link--active,
.menu__link--active:hover {
  color: var(--link);
}
.menu__link--active:not(.menu__link--sublist) {
  background-color: var(--bg-active);
  border-right: 1px solid var(--link);
}
.menu__list-item--fullbleed {
  margin-left: -8px;
}
.menu__list-item--fullbleed > .menu__link {
  width: 100%;
}
.menu__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--menu-text);
  cursor: pointer;
  transition: color var(--transition);
}
.menu__caret:hover {
  color: var(--text);
}
.menu__caret svg {
  width: 12px;
  height: 12px;
  transform: rotate(0deg);
  transition: transform var(--transition);
}
.menu__list-item--collapsed > .menu__list-item-collapsible .menu__caret svg {
  transform: rotate(-90deg);
}
.menu__list-item-collapsible--active .menu__link {
  color: var(--link);
  background: transparent;
  border-right: 0;
}

/* 主内容 */
.docMainContainer {
  flex: 1 1 auto;
  min-width: 0;
}
.docItemWrapper {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--content-pad-y) var(--content-pad-x) 32px;
}
.docItemWrapper > .row {
  display: flex;
  align-items: flex-start;
  margin: 0 -24px;
}
.col {
  padding: 0 24px;
  min-width: 0;
}
.docItemCol {
  flex: 0 0 75%;
  max-width: 75%;
}
.col--3 {
  flex: 0 0 25%;
  max-width: 25%;
}
.docItemContainer {
  min-width: 0;
}

/* 面包屑 + 文档操作条 */
.theme-doc-breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  margin-bottom: 12.8px;
}
.breadcrumbs {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}
.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  font-size: 12.8px;
  line-height: 1.65;
  color: var(--text);
}
.breadcrumbs__item + .breadcrumbs__item::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 10px;
  margin: 0 6px;
  background-color: var(--text-faint);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'><path d='M1 1l5 5-5 5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/></svg>")
    center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'><path d='M1 1l5 5-5 5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/></svg>")
    center/contain no-repeat;
}
.breadcrumbs__link {
  color: var(--text);
  font-size: 12.8px;
  padding: 0;
  border-radius: var(--radius-pill);
}
.breadcrumbs__link:hover {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumbs__item--active .breadcrumbs__link {
  color: var(--text-secondary);
}
.breadcrumbs__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}
.breadcrumbs__home:hover {
  background: var(--bg-hover);
}
.breadcrumbs__home svg {
  width: 14px;
  height: 14px;
}
.doc-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.doc-action {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  height: 34px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.doc-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.doc-action__main,
.doc-action__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.doc-action__main svg,
.doc-action__toggle svg {
  width: 16px;
  height: 16px;
}
.doc-action__toggle {
  padding: 0 6px;
  border-left: 1px solid var(--border-input);
}
.doc-action--single .doc-action__main {
  padding: 0 12px;
}
.doc-action__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: var(--z-dropdown);
  display: none;
  min-width: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-menu);
}
.doc-action.is-open .doc-action__menu {
  display: block;
}
.doc-action__menu button,
.doc-action__menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.doc-action__menu button:hover,
.doc-action__menu a:hover {
  background: var(--bg-hover);
  color: var(--primary);
  text-decoration: none;
}

/* 正文 */
.theme-doc-markdown {
  margin-top: 16px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: break-word;
}
.markdown > h1 {
  margin: 0 0 25px;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.markdown > h1:first-child {
  margin-top: 0;
}
.markdown h2 {
  margin: 40px 0 20px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  scroll-margin-top: calc(var(--navbar-height) + 16px);
}
.markdown h3 {
  margin: 32px 0 16px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  scroll-margin-top: calc(var(--navbar-height) + 16px);
}
.markdown h4 {
  margin: 24px 0 12px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  scroll-margin-top: calc(var(--navbar-height) + 16px);
}
.markdown p {
  margin: 0 0 20px;
}
.markdown ul,
.markdown ol {
  margin: 0 0 20px;
  padding-left: 32px;
}
.markdown li {
  margin: 0;
}
.markdown li > p {
  margin-bottom: 8px;
}
.markdown li > ul,
.markdown li > ol {
  margin-top: 0;
  margin-bottom: 0;
}
.markdown strong {
  font-weight: 600;
}
.markdown a {
  color: var(--link);
}
.markdown a:hover {
  color: var(--link-hover);
}
.markdown hr {
  height: 1px;
  margin: 24px 0;
  border: 0;
  background: var(--border);
}
.markdown img {
  display: block;
  margin: 8px auto 20px;
}
.markdown .anchor {
  position: relative;
}
.markdown .hash-link {
  position: absolute;
  margin-left: 6px;
  padding-left: 4px;
  color: var(--link);
  font-size: 0.8em;
  opacity: 0;
  transition: opacity var(--transition);
}
.markdown h2:hover .hash-link,
.markdown h3:hover .hash-link,
.markdown h4:hover .hash-link,
.markdown .hash-link:focus {
  opacity: 1;
}
.markdown .hash-link:hover {
  text-decoration: none;
}
.markdown code {
  font-family: var(--font-mono);
  font-size: 90%;
  padding: 0.1rem 0.2rem;
  border-radius: var(--radius-sm);
  background: var(--inline-code-bg);
  color: inherit;
  white-space: break-spaces;
  overflow-wrap: anywhere;
}
.markdown a > code {
  color: inherit;
}
.markdown pre {
  margin: 0 0 20px;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--code-border);
  border-width: 1px 0;
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 14.72px;
  line-height: 1.45;
}
.markdown pre code {
  display: block;
  padding: 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}
.markdown table {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  overflow: auto;
  border-collapse: collapse;
  border: 0;
  font-size: 14.4px;
  line-height: 1.65;
}
.markdown thead {
  border-bottom: 0;
}
.markdown tr {
  border-bottom: 0;
  background: transparent;
}
.markdown th {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--border-table);
  color: var(--table-head-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  text-align: left;
  vertical-align: top;
}
.markdown td {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--border-table);
  color: var(--text);
  font-size: 14.4px;
  vertical-align: top;
}
.markdown th p,
.markdown td p {
  margin: 0;
}
.markdown table code {
  font-size: 13px;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 16px;
}
/* 表格自身保留 16px 下边距（与参照站一致）；滚动容器不再叠加 */
.table-scroll {
  margin-bottom: 0;
}
.markdown blockquote {
  margin: 0 0 16px;
  padding: 16px 24px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--tip-bg);
  color: var(--tip-fg);
}
.markdown blockquote p:last-child {
  margin-bottom: 0;
}
.markdown blockquote a {
  color: inherit;
  text-decoration: underline;
}

/* callout / admonition */
.callout {
  margin: 0 0 16px;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  background: var(--note-bg);
  color: var(--note-fg);
  box-shadow: var(--shadow-lw);
}
.callout__heading {
  display: flex;
  align-items: center;
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.callout__heading svg {
  width: 22px;
  height: 22px;
  margin-right: 6px;
  fill: currentColor;
  flex-shrink: 0;
}
.callout p:last-child,
.callout ul:last-child,
.callout ol:last-child {
  margin-bottom: 0;
}
.callout a {
  color: inherit;
  text-decoration: underline;
}
.callout--note {
  background: var(--note-bg);
  color: var(--note-fg);
}
.callout--tip,
.callout--success {
  background: var(--tip-bg);
  color: var(--tip-fg);
}
.callout--info {
  background: var(--info-bg);
  color: var(--info-fg);
}
.callout--warning,
.callout--caution {
  background: var(--warning-bg);
  color: var(--warning-fg);
}
.callout--danger {
  background: var(--danger-bg);
  color: var(--danger-fg);
}

/* 代码块 */
.code-block {
  position: relative;
  margin: 0 0 20px;
  border-radius: var(--radius-sm);
  background: var(--block-background-color, #e7e7e7);
  border: 0;
  overflow: hidden;
}
/* 语言标签 + 复制按钮以浮层呈现（参照站复制按钮为代码区右上角浮层，代码区自身无标题栏） */
.code-block__header {
  position: absolute;
  top: 0;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}
html[data-theme='dark'] .code-block__header {
  background: #222222;
  color: #b4b4b4;
}
.code-block__lang {
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.code-block__copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--code-border);
  border-radius: var(--radius-xs);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.code-block__copy:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.code-block__copy svg {
  width: 13px;
  height: 13px;
}
.code-block__copy.is-copied {
  color: var(--tip-border);
  border-color: var(--tip-border);
}
.code-block pre {
  margin: 0;
  padding: 0;
  border: 0;
  border-width: 1px 0;
  border-style: solid;
  border-color: var(--code-border);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  overflow: auto;
}
.code-block pre code {
  padding: 16px;
}
.code-block__header .code-block__copy {
  margin-top: 8px;
  background: var(--code-bg);
}
.code-block__header .code-block__lang {
  margin-top: 10px;
}
.code-block[data-line-numbers='true'] code {
  counter-reset: line;
}
.code-block[data-line-numbers='true'] .token-line::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block;
  width: 2ch;
  margin-right: 16px;
  color: var(--text-faint);
  text-align: right;
  user-select: none;
}

/* 代码语言 Tab */
.code-tabs {
  margin: 0 0 20px;
  border: 1px solid var(--code-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--code-bg);
}
.code-tabs__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  border-bottom: 1px solid var(--code-border);
  background: var(--bg-subtle);
  overflow-x: auto;
}
html[data-theme='dark'] .code-tabs__nav {
  background: #222222;
}
.code-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.code-tabs__tab:hover {
  color: var(--text);
}
.code-tabs__tab[aria-selected='true'] {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.code-tabs__panel {
  display: none;
}
.code-tabs__panel.is-active {
  display: block;
}
.code-tabs__panel pre {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--code-border);
  border-bottom: 1px solid var(--code-border);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  overflow: auto;
}
.code-tabs__panel pre code {
  display: block;
  padding: 16px;
}
.code-tabs__copy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--code-border);
  border-radius: var(--radius-xs);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
}
.code-tabs__copy svg {
  width: 13px;
  height: 13px;
}

/* Prism 语法高亮 */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--tok-comment);
  font-style: italic;
}
.token.keyword,
.token.atrule,
.token.important {
  color: var(--tok-keyword);
}
.token.function {
  color: var(--tok-function);
}
.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.url {
  color: var(--tok-string);
}
.token.number,
.token.boolean,
.token.constant,
.token.symbol {
  color: var(--tok-number);
}
.token.operator,
.token.entity {
  color: var(--tok-operator);
}
.token.punctuation {
  color: var(--tok-punctuation);
}
.token.property,
.token.attr-name,
.token.selector {
  color: var(--tok-property);
}
.token.class-name,
.token.maybe-class-name {
  color: var(--tok-class);
}
.token.builtin,
.token.variable,
.token.parameter {
  color: var(--tok-variable);
}
.token.tag {
  color: var(--tok-tag);
}
.token.deleted {
  color: var(--tok-deleted);
}
.token.inserted {
  color: var(--tok-inserted);
}
.token.meta {
  color: var(--tok-meta);
}
.token.request-line.method,
.token.header-name {
  color: var(--tok-keyword);
}
.token.bold {
  font-weight: 700;
}
.token.italic {
  font-style: italic;
}

/* 步骤 */
.steps {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps > li {
  position: relative;
  margin: 0 0 20px;
  padding-left: 40px;
  counter-increment: step;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-active);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.steps > li > h3:first-child,
.steps > li > h4:first-child {
  margin-top: 0;
}
.steps__title {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.steps > li > *:last-child {
  margin-bottom: 0;
}

/* API 参考组件 */
.api-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13px;
}
.http-method {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
}
.http-method--get {
  background: #1f8a70;
}
.http-method--post {
  background: #2160fd;
}
.http-method--put {
  background: #b45309;
}
.http-method--patch {
  background: #9a3412;
}
.http-method--delete {
  background: #dc2626;
}
.api-path {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--inline-code-bg);
  color: var(--text);
}
.api-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}
.api-badge--new {
  background: var(--tip-bg);
  color: var(--tip-fg);
}
.api-badge--beta {
  background: var(--warning-bg);
  color: var(--warning-fg);
}
.api-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 32px 0 12px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.api-op-anchor,
.member-anchor {
  scroll-margin-top: calc(var(--navbar-height) + 16px);
}
.api-reference-list {
  display: flex;
  flex-direction: column;
  margin: 0 0 24px;
}
.api-reference-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-table);
  font-size: 15px;
}
.api-reference-item:first-child {
  border-top: 1px solid var(--border-table);
}
.api-reference-item a {
  font-weight: 500;
}
.api-reference-item code {
  font-size: 13px;
}
.api-reference-item__desc {
  color: var(--text-secondary);
  font-size: 13px;
}
.class-graph {
  margin: 0 0 20px;
  padding: 16px 20px;
  border: 1px solid var(--border-table);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}
.class-graph .graph-node--current {
  color: var(--primary);
  font-weight: 600;
}
.class-graph .graph-arrow {
  color: var(--text-faint);
  margin: 0 8px;
}
.member-signature {
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-table);
  border-radius: var(--radius-xs);
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.member-signature .sig-name {
  color: var(--primary);
  font-weight: 600;
}
.member-signature .sig-type {
  color: var(--tok-function);
}
.member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.deprecated {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--danger-bg);
  color: var(--danger-fg);
  font-size: 11px;
  font-weight: 600;
}

/* 页内导航 */
.pagination-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}
.pagination-nav__link {
  display: block;
  padding: 16px;
  border: 1px solid var(--border-table);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}
.pagination-nav__link:hover {
  border-color: var(--primary);
  text-decoration: none;
}
.pagination-nav__link--next {
  text-align: right;
}
.pagination-nav__sublabel {
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
}
.pagination-nav__label {
  color: var(--link);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

/* 右侧目录 */
.tableOfContents {
  position: sticky;
  top: var(--navbar-height);
  max-height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
  padding: 0;
}
.table-of-contents {
  display: block;
  margin: 0;
  padding: 8px 0 8px 8px;
  list-style: none;
  border-left: 1px solid var(--border);
  font-size: 12.8px;
  line-height: 1.65;
}
.table-of-contents ul {
  margin: 0;
  padding-left: 12px;
  list-style: none;
}
.table-of-contents li {
  margin: 0 0 8px;
}
.table-of-contents li:last-child {
  margin-bottom: 0;
}
.table-of-contents__link {
  display: block;
  color: var(--text-secondary);
  font-size: 12.8px;
  font-weight: 400;
  line-height: 1.65;
  transition: color var(--transition);
}
.table-of-contents__link:hover {
  color: var(--primary);
  text-decoration: none;
}
.table-of-contents__link.toc-highlight,
.table-of-contents__link--active,
.table-of-contents__link.is-active {
  color: var(--link);
  font-weight: 400;
}
.toc-title {
  margin: 0 0 8px;
  padding-left: 8px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.toc-mobile {
  display: none;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
}
.toc-mobile__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.toc-mobile__button svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}
.toc-mobile.is-open .toc-mobile__button svg {
  transform: rotate(180deg);
}
.toc-mobile__content {
  display: none;
  padding: 0 16px 12px;
}
.toc-mobile.is-open .toc-mobile__content {
  display: block;
}
.toc-mobile .table-of-contents {
  border-left: 1px solid var(--border);
}

/* =============================================================================
   页脚
   ========================================================================== */
.footer {
  background: var(--footer-bg);
  padding: 32px 48px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}
.footer__col {
  min-width: 120px;
}
.footer__title {
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--footer-title);
  text-transform: uppercase;
}
.footer a {
  display: block;
  color: var(--footer-link);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.footer a:hover {
  color: var(--footer-link-hover);
  text-decoration: none;
}
.footer__meta {
  width: 100%;
  max-width: 1080px;
  margin: 16px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.7;
}
html[data-theme='dark'] .footer__meta {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.footer__meta code {
  font-family: var(--font-mono);
  font-size: 11px;
}

/* =============================================================================
   搜索弹窗
   ========================================================================== */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: var(--overlay);
}
.search-modal[hidden] {
  display: none;
}
.search-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-search);
  overflow: hidden;
}
.search-dialog__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.search-dialog__header svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}
.search-dialog__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}
.search-dialog__input::placeholder {
  color: var(--text-faint);
}
.search-dialog__esc {
  flex-shrink: 0;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-faint);
  font-size: 11px;
}
.search-dialog__results {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px;
}
.search-result-group__title {
  padding: 8px 12px 4px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.search-result {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
}
.search-result:hover,
.search-result.is-active {
  background: var(--bg-hover);
  text-decoration: none;
}
.search-result__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.search-result__meta {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result mark {
  background: rgba(33, 96, 253, 0.18);
  color: inherit;
  border-radius: 2px;
}
.search-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.search-empty__hint {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 12px;
}
.search-dialog__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12px;
}
.search-dialog__footer kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-right: 2px;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-subtle);
  font-family: var(--font-sans);
  font-size: 10px;
}

/* 状态 */
.page-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 14px;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.empty-state,
.error-state {
  margin: 24px 0;
  padding: 32px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  text-align: center;
  color: var(--text-secondary);
}
.empty-state__title,
.error-state__title {
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}
.empty-state__desc,
.error-state__desc {
  margin: 0;
  font-size: 13px;
}
.error-state {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-fg);
}
.error-state__title {
  color: var(--danger-fg);
}
.skeleton-list {
  max-width: 460px;
  margin: 8px 0 24px;
}
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.skeleton {
  display: inline-block;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-subtle) 37%, var(--bg-hover) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
.skeleton--avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.skeleton--line {
  height: 14px;
}
@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
.media-frame {
  margin: 0 0 20px;
  padding: 8px;
  border: 1px solid var(--border-table);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.media-frame img {
  margin: 0 auto;
}

/* 移动端抽屉 */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-navbar) - 1);
  background: var(--overlay);
  display: none;
}
html.drawer-open .mobile-backdrop {
  display: block;
}
.mobile-drawer-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

/* =============================================================================
   响应式
   ========================================================================== */
@media (max-width: 1280px) {
  .DocSearch-Button {
    width: 140px;
  }
  .navbar__cta span {
    display: none;
  }
  .navbar__cta {
    padding: 0 8px;
  }
}
@media (max-width: 1100px) {
  .brand-docs {
    display: none;
  }
  .brand-divider {
    display: none;
  }
  .navbar__logo {
    margin-right: 8px;
  }
}
@media (max-width: 996px) {
  .navbar__toggle {
    display: inline-flex;
  }
  .navbar__items--left .navbar__item,
  .navbar__search .DocSearch-Button-Placeholder,
  .DocSearch-Button-Keys,
  .navbar__cta {
    display: none;
  }
  .DocSearch-Button {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
  .DocSearch-Button-Container {
    gap: 0;
  }
  .theme-doc-sidebar-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-overlay);
    width: min(83vw, 360px);
    max-width: min(83vw, 360px);
    height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-menu);
    transform: translateX(-100%);
    transition: transform var(--transition);
    flex-basis: auto;
    overflow-y: auto;
  }
  html.drawer-open .theme-doc-sidebar-container {
    transform: translateX(0);
  }
  .sidebarCollapseBtn,
  .sidebarExpandBtn {
    display: none !important;
  }
  .mobile-drawer-head {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg);
  }
  .docItemWrapper {
    padding: 16px 16px 24px;
  }
  .docItemWrapper > .row {
    margin: 0 -16px;
  }
  .col {
    padding: 0 16px;
  }
  .docItemCol {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .col--3 {
    display: none;
  }
  .toc-mobile {
    display: block;
  }
  .footer {
    padding: 32px 24px;
  }
  .theme-doc-breadcrumbs {
    flex-wrap: wrap;
  }
  .doc-actions {
    display: none;
  }
  .search-modal {
    padding: 0;
    align-items: stretch;
  }
  .search-dialog {
    max-width: none;
    max-height: none;
    height: 100%;
    border-radius: 0;
  }
}
@media (max-width: 600px) {
  .markdown > h1 {
    font-size: 28px;
  }
  .markdown h2 {
    font-size: 22px;
    margin-top: 32px;
  }
  .markdown table {
    font-size: 13.5px;
  }
  .markdown th,
  .markdown td {
    padding: 10px 8px;
  }
  .pagination-nav {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .footer__col {
    min-width: 45%;
  }
}

/* 打印 / PDF 导出 */
@media print {
  .navbar,
  .theme-doc-sidebar-container,
  .tableOfContents,
  .theme-doc-breadcrumbs,
  .pagination-nav,
  .footer,
  .search-modal,
  .sidebarCollapseBtn,
  .sidebarExpandBtn,
  .code-block__copy,
  .code-tabs__copy {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .docItemWrapper {
    max-width: none;
    padding: 0;
  }
  .docItemWrapper > .row {
    margin: 0;
  }
  .col {
    padding: 0;
    flex: 1 1 auto;
    max-width: none;
  }
  .markdown pre {
    white-space: pre-wrap;
    word-break: break-word;
  }
  a {
    color: #000;
  }
}

/* 无 JavaScript 降级 */
html.no-js .code-tabs__panel {
  display: block;
  border-top: 1px solid var(--code-border);
}
html.no-js .code-tabs__nav {
  display: none;
}

/* =============================================================================
   首页 / 卡片 / 统计 / 语言提示
   ========================================================================== */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: border-color var(--transition), color var(--transition);
}
.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary) !important;
}
.btn--primary:hover {
  background: var(--primary-hover);
  color: var(--on-primary) !important;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0 0 32px;
}
.stat-card {
  padding: 20px;
  border: 1px solid var(--border-table);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}
.stat-card__num {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary);
}
.stat-card__label {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0 0 24px;
}
.doc-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--border-table);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.doc-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lw);
  text-decoration: none;
}
.doc-card__title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.doc-card__desc {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}
.lang-banner {
  margin: 0 0 16px;
  padding: 10px 16px;
  border: 1px solid var(--info-border);
  border-radius: var(--radius-sm);
  background: var(--info-bg);
  color: var(--info-fg);
  font-size: 13px;
}
.lang-banner button {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.table-of-contents__link.toc-level-3 {
  padding-left: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.menu__list-item--disabled > .menu__link {
  color: var(--text-faint);
  cursor: default;
}
.menu__list-item--disabled > .menu__link:hover {
  background: none;
  color: var(--text-faint);
}
@media (max-width: 996px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}


