/* ==========================================================================
   MatrixOne Docs — custom.css（最终精修版）
   代码块：深色 → Snowflake / GitHub 风浅色（冷灰底 + 左侧品牌竖边）
   其余元素：继续克制，品牌色只留在真正的品牌锚点。

   分区：
     1. 设计 Token（:root 变量）
     2. Furo 主题变量覆盖
     3. 正文排版
     4. 代码（浅色代码块 / 行内 code / MatrixOne 方言高亮）
     5. 表格
     6. 引用 & admonition
     7. 左侧侧边栏
     8. 右侧 TOC
     9. 顶栏
    10. sphinx-design tab-set（Segment 风格）
    11. 首页 Hero
    12. sphinx-design 卡片
    13. 语言 pill
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-semi-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* Geist（Vercel，OFL 免费）——替代 Inter 作拉丁主字体，中文仍走 PingFang SC */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}


/* ============================================================
   1. 设计 Token
   ============================================================ */
:root {
  /* 品牌色：全站 UI 蓝只认这一套，禁止再散落 Apple/Tailwind 蓝 */
  --mo-primary:            #004af0;
  --mo-primary-600:        #1d49e7;
  --mo-primary-soft:       rgba(0, 74, 240, 0.10);  /* 选中底 */
  --mo-primary-soft-hover: rgba(0, 74, 240, 0.16);  /* 选中悬停底 */
  --mo-brand-soft:         #004af0;
  --mo-brand-sidebar:      #004af0;
  --mo-cyan:               #31edff;
  --mo-lavender:           #8b7cf0;
  /*
   * Snowflake 同构：正文阅读宽 ≈833px（52rem）；
   * 左栏 320 + TOC 256；宽屏时正文+TOC 在 .main 内居中（14"近铺满，27"两侧对称留白）。
   */
  --mo-content-max:        52rem;

  --mo-gradient-brand:   linear-gradient(135deg, #004af0 0%, #31edff 100%);

  /* 中性灰 */
  --mo-ink-900:    #08090B;
  --mo-ink-800:    #0F1114;   /* 顶栏 hover / TOC hover / tab 激活文字 */
  --mo-ink-700:    #17191D;   /* 顶栏默认 */
  --mo-ink-600:    #363B42;
  --mo-ink-500:    #50565E;   /* 辅助文字 */
  --mo-ink-450:    #475569;
  --mo-ink-400:    #94A3B8;
  --mo-ink-350:    #64748B;   /* 注释 / segment tab 默认 */
  --mo-ink-300:    #6E7781;   /* 代码注释 / 复制按钮默认 */

  /* 浅面色 */
  --mo-surface-50:     #F8FAFC;
  --mo-surface-100:    #F1F5F9;  /* segment tab 容器 */
  --mo-surface-150:    #EFF6FF;  /* 侧边栏当前项 bg */
  --mo-surface-code:   #F1F5FA;  /* 代码块 / 行内 code 底色（极淡冷灰蓝，与页面淡蓝底色轻微区分） */
  --mo-surface-faint:  #FAFBFC;
  --mo-border-100:     #E2E8F0;
  --mo-border-code:    #D0D7DE;  /* 代码块右侧极淡描边（仅暗色模式下用来区分代码块边界） */

  /* 代码文字色（GitHub 风） */
  --mo-code-fg:         #24292F;   /* 默认字色 */
  --mo-code-keyword:    #0969DA;   /* 关键字蓝 */
  --mo-code-dialect:    #8250DF;   /* MatrixOne 方言紫 */
  --mo-code-string:     #0A3069;   /* 字符串深蓝 */
  --mo-code-number:     #0550AE;   /* 数字中蓝 */
  --mo-code-comment:    #6E7781;   /* 注释中灰 */
  --mo-code-operator:   #CF222E;   /* 操作符橙红 */
  --mo-code-variable:   #953800;   /* 变量深橙 */
  --mo-code-function:   #8250DF;   /* 函数名紫 */

  /* 圆角 */
  --mo-radius-sm:  4px;
  --mo-radius:     6px;
  --mo-radius-md:  8px;
  --mo-radius-lg:  12px;

  /* 顶栏控件：搜索 / 主题按钮共用，保证圆角与高度一致 */
  --mo-control-h:       32px;
  --mo-control-radius:  8px;
  --mo-control-fill:    #f5f7fa;
  --mo-control-fill-hover: #eef1f5;
  --mo-control-mute:    #8b9198;

  /* 字体 */
  --mo-font-mono: 'JetBrains Mono', 'SF Mono', Menlo, ui-monospace, Consolas, monospace;

  /* 顶栏尺寸（Logo/工具 + 主导航两行） */
  --mo-topbar-h:         112px;
}

/* 取消 Furo ≥97em 把 html 提到 110%——大屏整体放大后不可能和 14" 同视觉 */
@media (min-width: 97em) {
  html {
    font-size: 100%;
  }
}

/* ============================================================
   2. Furo 主题变量覆盖
   ============================================================ */
body:not([data-theme="dark"]) {
  --color-brand-primary: var(--mo-primary);
  --color-brand-content: var(--mo-primary);
  --color-link: var(--mo-primary);
  --color-link--hover: var(--mo-primary-600);

  --color-inline-code-background: var(--mo-surface-code);
  --color-code-background: var(--mo-surface-code);
  --color-code-foreground: var(--mo-code-fg);

  --color-background-primary: #F7FAFC;
  --color-background-secondary: #EEF4FA;
  --color-background-border: var(--mo-border-100);
  --color-foreground-primary: var(--mo-ink-900);
  --color-foreground-secondary: var(--mo-ink-600);

  /* 页面底色（浅蓝灰）—— Furo 主体、侧栏、TOC 共享同一片底色，
     而 admonition / code-block / sd-card 保留更浅的填充色，
     形成"卡片浮在浅底色上"的层次感，避免整页一片白显得简陋。 */
  background: #F7FAFC;
}
/* Furo 容器透明，让 body 底色透出来；
   sidebar / TOC 也透明，跟内容区共享同一片冷灰，避免"白边框 vs 灰中心"的硬切。
   topbar 保持白色，靠底部 1px 描边作为视觉分隔。 */
body:not([data-theme="dark"]) .page,
body:not([data-theme="dark"]) main,
body:not([data-theme="dark"]) .main,
body:not([data-theme="dark"]) .sidebar-drawer,
body:not([data-theme="dark"]) .toc-drawer {
  background: transparent;
}
body:not([data-theme="dark"]) .sidebar-drawer {
  border-right: none;
}
body:not([data-theme="dark"]) .toc-drawer {
  border-left: none;
}
@media (min-width: 1100px) {
  .sidebar-drawer,
  .toc-drawer {
    position: relative;
  }
  body:not([data-theme="dark"]) .sidebar-drawer::after,
  body:not([data-theme="dark"]) .toc-drawer::before {
    content: "";
    position: absolute;
    top: 32px;
    bottom: 32px;
    width: 1px;
    border-radius: 999px;
    background: linear-gradient(
      180deg,
      rgba(148, 163, 184, 0),
      rgba(148, 163, 184, 0.26) 16%,
      rgba(148, 163, 184, 0.34) 50%,
      rgba(148, 163, 184, 0.26) 84%,
      rgba(148, 163, 184, 0)
    );
    pointer-events: none;
  }
  body:not([data-theme="dark"]) .sidebar-drawer::after {
    right: 0;
  }
  body:not([data-theme="dark"]) .toc-drawer::before {
    left: 0;
  }
}
body[data-theme="dark"] {
  --color-brand-primary: #6b8cff;
  --color-brand-content: #6b8cff;
  --color-link: #6b8cff;
  --color-link--hover: #9db1ff;

  --color-inline-code-background: #1A2233;
  --color-code-background: #1A2233;
  --color-code-foreground: #E6EDF3;

  /* 暗色下的代码块 token 同步覆写,这样 .highlight(用 --mo-surface-code)和 furo 行内 code(用 --color-code-background)颜色一致 */
  --mo-surface-code: #1A2233;
  --mo-brand-soft:   #58A6FF;   /* 代码块左竖边、顶栏/TOC 当前项一并提亮,符合暗色对比 */
  --mo-code-fg:      #E6EDF3;
}

/* —— 产品品牌槽 ——
   <html data-product="..."> 由 _theme/_templates/layout.html 注入,
   值由 conf.py 的 html_context.product 决定:matrixone / intelligence。
   两个产品统一使用 Matrix Origin 蓝色品牌体系，避免 intelligence 页面
   在链接、焦点、卡片和导航状态中零散冒出紫色。 */
html[data-product="intelligence"] {
  --mo-primary:        #004AF0;
  --mo-primary-600:    #1D49E7;
  --mo-brand-soft:     #004AF0;
  --mo-brand-sidebar:  #004AF0;
  --mo-surface-150:    #EAF2FF;
}
html[data-product="intelligence"] body:not([data-theme="dark"]) {
  --color-brand-primary: #004AF0;
  --color-brand-content: #004AF0;
  --color-link:          #004AF0;
  --color-link--hover:   #003CC7;
}
html[data-product="intelligence"] body[data-theme="dark"] {
  --color-brand-primary: #60A5FA;
  --color-brand-content: #60A5FA;
  --color-link:          #60A5FA;
  --color-link--hover:   #93C5FD;
  --mo-brand-soft:       #60A5FA;
}

/* —— 全局 :visited 拦截 ——
   浏览器默认把访问过的链接染成 #551A8B 紫色，会盖过作者样式。
   这里强制 visited 继承当前色，消除"满屏紫色"。 */
a:visited        { color: inherit; }
a:visited:hover  { color: var(--mo-brand-soft); }


/* ============================================================
   3. 正文排版
   ============================================================ */
article[role="main"] {
  max-width: var(--mo-content-max, 52rem);
  margin-left: 0;
  margin-right: 0;
  padding: 0 48px;
}

@media (min-width: 1100px) {
  /*
   * Snowflake：左栏贴边固定；正文锁阅读宽；TOC 贴正文；
   * .main 内 justify center → 窄屏近似铺满，宽屏正文+TOC 两侧对称留白。
   * 盖住 Furo width:46em / sidebar calc(50%-26em) / toc fixed 抽屉。
   */
  .page {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    overflow-x: clip;
  }
  .main {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: center;
  }
  .sidebar-drawer {
    flex: 0 0 var(--mo-sidebar-left);
    width: var(--mo-sidebar-left);
    min-width: var(--mo-sidebar-left);
    max-width: var(--mo-sidebar-left);
    justify-content: flex-start;
  }
  .sidebar-container {
    width: calc(var(--mo-sidebar-left) - var(--mo-sidebar-inline, 23px));
    margin-left: var(--mo-sidebar-inline, 23px);
  }
  .content {
    /* 不 stretch：否则宽屏会把 TOC 顶开，破坏 Snowflake 居中带 */
    flex: 0 1 auto;
    width: min(calc(var(--mo-content-max, 52rem) + 64px), 100%);
    max-width: calc(var(--mo-content-max, 52rem) + 64px);
    min-width: 0;
    padding-left: 40px;
    padding-right: 24px;
  }
  article[role="main"] {
    width: 100%;
    max-width: var(--mo-content-max, 52rem);
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .toc-content-icon {
    display: none;
  }
  .toc-drawer {
    flex: 0 0 var(--mo-sidebar-right);
    width: var(--mo-sidebar-right);
    min-width: var(--mo-sidebar-right);
    position: relative;
    height: auto;
    top: auto;
    left: auto;
    right: auto;
    margin-left: 24px;
    margin-right: 0;
    padding: 0 12px 0 20px;
    border-left: 0;
  }
  .toc-drawer.no-toc {
    display: none;
    width: 0;
    min-width: 0;
    margin: 0;
  }
}

/* 最后更新时间（正文末尾） */
.mo-lastupdated {
  margin: 56px 0 0;
  font-size: 13px;
  font-style: italic;
  color: var(--mo-ink-500);
}
.mo-lastupdated strong {
  font-weight: 700;
  font-style: normal;
  color: var(--mo-ink-900);
}
body[data-theme="dark"] .mo-lastupdated { color: #94a3b8; }
body[data-theme="dark"] .mo-lastupdated strong { color: #f3f4f6; }

article h1 {
  font-size: 30px;
  font-weight: 600;
  color: var(--mo-ink-900);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 24px;
  padding: 0;
  border: none;
}
article h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--mo-ink-900);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 48px 0 16px;
  padding: 0;
  border: none;
}
article h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--mo-ink-800);
  line-height: 1.4;
  margin: 32px 0 12px;
}
article h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--mo-ink-700);
  line-height: 1.4;
  margin: 24px 0 8px;
}
article :is(h1, h2, h3, h4) .headerlink {
  color: var(--mo-border-100);
  font-weight: 400;
  opacity: 0;
  transition: opacity .15s ease;
}
article :is(h1, h2, h3, h4):hover .headerlink { opacity: 1; }

body[data-theme="dark"] article h1,
body[data-theme="dark"] article h2 { color: #f3f4f6; }
body[data-theme="dark"] article h3 { color: #e5e7eb; }
body[data-theme="dark"] article h4 { color: #d1d5db; }

article p {
  margin: 0 0 1.25em;
  line-height: 1.7;
}
article ul,
article ol {
  margin: 0 0 1.25em;
  padding-left: 1.5em;
}
article li + li { margin-top: 0.5em; }
article li > p { margin-bottom: 0.5em; }

/* 3d 正文链接：默认跟正文同色、无下划线；悬停才蓝字+蓝下划线（对齐「快速开始」条目手感） */
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link),
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):visited {
  color: var(--mo-text-body, #15171a);
  -webkit-text-fill-color: var(--mo-text-body, #15171a);
  text-decoration: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):hover,
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):visited:hover {
  color: var(--mo-primary, #004af0);
  -webkit-text-fill-color: var(--mo-primary, #004af0);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--mo-primary, #004af0);
}

body[data-theme="dark"] article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link),
body[data-theme="dark"] article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):visited,
html[data-mo-resolved-theme="dark"] body article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link),
html[data-mo-resolved-theme="dark"] body article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):visited {
  color: var(--mo-text-body, #adb7c7);
  -webkit-text-fill-color: var(--mo-text-body, #adb7c7);
  text-decoration: none;
}
body[data-theme="dark"] article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):hover,
html[data-mo-resolved-theme="dark"] body article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):hover {
  color: #6ea8ff;
  -webkit-text-fill-color: #6ea8ff;
  text-decoration: underline;
  text-decoration-color: #6ea8ff;
}

/* 列表单链 / 加粗内链：同样「默认正文色，悬停才蓝」 */
article[role="main"] li > a:only-child,
article[role="main"] li > a:only-child:visited,
article[role="main"] strong a,
article[role="main"] b a,
article[role="main"] a strong,
article[role="main"] a b {
  color: inherit;
  -webkit-text-fill-color: inherit;
  text-decoration: none;
}
article[role="main"] li > a:only-child:hover,
article[role="main"] strong a:hover,
article[role="main"] b a:hover,
article[role="main"] a:hover strong,
article[role="main"] a:hover b {
  color: var(--mo-primary, #004af0);
  -webkit-text-fill-color: var(--mo-primary, #004af0);
}


/* ============================================================
   4. 代码
     4a. 代码块容器（GitHub / Snowflake 风：冷灰底 + 左侧品牌竖边）
     4b. 代码文字基线
     4c. 语法高亮（浅色背景专用配色）
     4d. MatrixOne 方言关键字（JS 注入的 .mo-keyword span）
     4e. 行内 code
     4f. 复制按钮（克制化）
     4g. 暗色模式
   ============================================================ */

/* 4a 容器 —— 中性底，无品牌左边线（蓝留给链接/CTA） */
.highlight,
div.highlight {
  position: relative;
  background-color: var(--mo-surface-code);
  background: var(--mo-surface-code);
  border: 1px solid var(--mo-border-100, rgba(15, 17, 20, 0.08));
  border-left: 1px solid var(--mo-border-100, rgba(15, 17, 20, 0.08));
  border-radius: var(--mo-radius-md);
  box-shadow: none;
  margin: 16px 0;
}
/* 外层 wrapper(<div class="highlight-python">):透明,让内层 .highlight 拿底色 */
[class^="highlight-"],
[class*=" highlight-"] {
  background: transparent;
  margin: 20px 0;
}

/* 4b 代码文字 —— pre 透明,让 .highlight 的底色透出 */
.highlight pre {
  padding: 16px 20px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--mo-code-fg);
  background: transparent;
  font-family: var(--mo-font-mono);
  font-feature-settings: "liga" 1;
  overflow-x: auto;
}

/* 4c 语法高亮（light 模式） */
body:not([data-theme="dark"]) .highlight .k,
body:not([data-theme="dark"]) .highlight .kc,
body:not([data-theme="dark"]) .highlight .kd,
body:not([data-theme="dark"]) .highlight .kn,
body:not([data-theme="dark"]) .highlight .kp,
body:not([data-theme="dark"]) .highlight .kr,
body:not([data-theme="dark"]) .highlight .kt {
  color: var(--mo-code-keyword);
  font-weight: 600;
}

body:not([data-theme="dark"]) .highlight .s,
body:not([data-theme="dark"]) .highlight .s1,
body:not([data-theme="dark"]) .highlight .s2,
body:not([data-theme="dark"]) .highlight .sb,
body:not([data-theme="dark"]) .highlight .sc,
body:not([data-theme="dark"]) .highlight .sd,
body:not([data-theme="dark"]) .highlight .se,
body:not([data-theme="dark"]) .highlight .sh,
body:not([data-theme="dark"]) .highlight .si,
body:not([data-theme="dark"]) .highlight .sr,
body:not([data-theme="dark"]) .highlight .ss,
body:not([data-theme="dark"]) .highlight .sx,
body:not([data-theme="dark"]) .highlight .dl {
  color: var(--mo-code-string);
}

body:not([data-theme="dark"]) .highlight .m,
body:not([data-theme="dark"]) .highlight .mb,
body:not([data-theme="dark"]) .highlight .mf,
body:not([data-theme="dark"]) .highlight .mh,
body:not([data-theme="dark"]) .highlight .mi,
body:not([data-theme="dark"]) .highlight .mo,
body:not([data-theme="dark"]) .highlight .il {
  color: var(--mo-code-number);
}

body:not([data-theme="dark"]) .highlight .c,
body:not([data-theme="dark"]) .highlight .c1,
body:not([data-theme="dark"]) .highlight .cm,
body:not([data-theme="dark"]) .highlight .cp,
body:not([data-theme="dark"]) .highlight .cs,
body:not([data-theme="dark"]) .highlight .cd,
body:not([data-theme="dark"]) .highlight .ch {
  color: var(--mo-code-comment);
  font-style: italic;
}

body:not([data-theme="dark"]) .highlight .o,
body:not([data-theme="dark"]) .highlight .ow {
  color: var(--mo-code-operator);
}
body:not([data-theme="dark"]) .highlight .nv,
body:not([data-theme="dark"]) .highlight .vi,
body:not([data-theme="dark"]) .highlight .vg {
  color: var(--mo-code-variable);
}
body:not([data-theme="dark"]) .highlight .nf,
body:not([data-theme="dark"]) .highlight .fm {
  color: var(--mo-code-function);
}

/* 4d MatrixOne 方言关键字（JS 注入） */
.highlight .mo-keyword {
  color: var(--mo-code-dialect);
  font-weight: 600;
}

/* 4e 行内 code —— 跟代码块同色系,加 避免被表格/列表里的细规则盖住 */
code.literal,
.rst-content code.literal,
p code,
li code,
td code,
th code {
  font-family: var(--mo-font-mono);
  font-size: 0.875em;
  padding: 2px 6px;
  border-radius: var(--mo-radius-sm);
  background-color: var(--mo-surface-code);
  background: var(--mo-surface-code);
  color: var(--mo-code-fg);
  border: none;
}
/* 代码块内的 <code>(<pre><code>...</code></pre>)反置回透明:别叠出双重底色 */
pre code,
.highlight pre code {
  background: transparent;
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* 4f 复制按钮（克制图标化） */
button.copybtn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  padding: 4px;
  background: transparent;
  border: none;
  color: var(--mo-ink-300);
  border-radius: var(--mo-radius-sm);
  opacity: 0.8;
  box-shadow: none;
  transition: background .15s ease, color .15s ease, opacity .15s ease;
}
button.copybtn:hover {
  background: rgba(0,0,0,0.06);
  color: var(--mo-code-fg);
  opacity: 1;
}
button.copybtn.success {
  color: var(--mo-brand-soft);
  opacity: 1;
}

/* 4f-2 折叠 + 全屏(由 code-collapse.js 注入) ——————————————————————
   超过 12 行的代码块默认收 320px,底部蒙版 + 中央"展开"按钮,
   右上角加一个全屏按钮(在 copybtn 左侧 32px)。 */
.mo-code-collapsible {
  position: relative;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
/* 折叠状态:底部从代码块色到透明的渐变,文字渐隐到底色 */
.mo-code-collapsed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(
    to bottom,
    rgba(229, 233, 240, 0) 0%,
    rgba(229, 233, 240, 0.7) 55%,
    var(--mo-surface-code) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* 中央浮动展开/收起按钮 */
.mo-code-expand-btn {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: #ffffff;
  border: 1px solid #D1D5DB;
  border-radius: 999px;
  cursor: pointer;
  color: var(--mo-primary);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.mo-code-expand-btn:hover {
  background: #F8FAFC;
  border-color: var(--mo-primary);
  color: var(--mo-primary);
  box-shadow: 0 2px 12px rgba(59, 130, 246, .15);
}
.mo-code-expand-btn__icon {
  display: inline-flex;
  align-items: center;
}

/* 全屏按钮:右上角,放在 copybtn(right:12, 24x24)左侧,留 8px 间隔 */
.mo-code-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 44px;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #6B7280;
  transition: background .15s, color .15s;
}
.mo-code-fullscreen-btn:hover {
  background: rgba(15, 23, 42, .06);
  color: #1F2937;
}

/* 全屏模态 */
.mo-code-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: mo-fade-in .18s ease-out;
}
.mo-code-modal {
  position: relative;
  width: 1000px;
  max-width: 90vw;
  max-height: 88vh;
  padding: 24px 16px 16px;
  background: #ffffff;
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .35);
}
.mo-code-modal .highlight,
.mo-code-modal div.highlight {
  max-height: none;
  overflow: visible;
  margin: 0;
}
.mo-code-modal .highlight pre {
  max-height: none;
}
.mo-code-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #D1D5DB;
  border-radius: 50%;
  cursor: pointer;
  color: #6B7280;
  padding: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.mo-code-close-btn:hover {
  background: #F3F4F6;
  color: #1F2937;
  border-color: #9CA3AF;
}

body.mo-code-modal-open { overflow: hidden; }   /* 模态打开时禁滚 */

@keyframes mo-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 暗色 */
body[data-theme="dark"] .mo-code-collapsed::after {
  background: linear-gradient(
    to bottom,
    rgba(22, 27, 34, 0) 0%,
    rgba(22, 27, 34, 0.7) 55%,
    #161B22 100%
  );
}
body[data-theme="dark"] .mo-code-expand-btn {
  background: #1A2233;
  border-color: #30363D;
  color: var(--mo-brand-soft);
}
body[data-theme="dark"] .mo-code-expand-btn:hover {
  background: #243049;
  border-color: var(--mo-brand-soft);
  box-shadow: 0 2px 12px rgba(88, 166, 255, .2);
}
body[data-theme="dark"] .mo-code-fullscreen-btn { color: #9CA3AF; }
body[data-theme="dark"] .mo-code-fullscreen-btn:hover {
  background: rgba(148, 163, 184, .12);
  color: #E5E7EB;
}
body[data-theme="dark"] .mo-code-modal {
  background: #0D1117;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
body[data-theme="dark"] .mo-code-close-btn {
  background: #1A2233;
  border-color: #30363D;
  color: #9CA3AF;
}
body[data-theme="dark"] .mo-code-close-btn:hover {
  background: #243049;
  color: #E5E7EB;
}

/* 4g 暗色模式代码 */
body[data-theme="dark"] .highlight {
  background: #161B22;
  border-color: rgba(255, 255, 255, 0.10);
  border-left-color: rgba(255, 255, 255, 0.10);
}
body[data-theme="dark"] .highlight pre {
  color: #E6EDF3;
}
body[data-theme="dark"] .highlight .k,
body[data-theme="dark"] .highlight .kc,
body[data-theme="dark"] .highlight .kd,
body[data-theme="dark"] .highlight .kn,
body[data-theme="dark"] .highlight .kp,
body[data-theme="dark"] .highlight .kr,
body[data-theme="dark"] .highlight .kt { color: #79C0FF; font-weight: 600; }

body[data-theme="dark"] .highlight .s,
body[data-theme="dark"] .highlight .s1,
body[data-theme="dark"] .highlight .s2,
body[data-theme="dark"] .highlight .sb,
body[data-theme="dark"] .highlight .sc,
body[data-theme="dark"] .highlight .sd,
body[data-theme="dark"] .highlight .se,
body[data-theme="dark"] .highlight .sh,
body[data-theme="dark"] .highlight .si,
body[data-theme="dark"] .highlight .sr,
body[data-theme="dark"] .highlight .ss,
body[data-theme="dark"] .highlight .sx,
body[data-theme="dark"] .highlight .dl { color: #A5D6FF; }

body[data-theme="dark"] .highlight .m,
body[data-theme="dark"] .highlight .mb,
body[data-theme="dark"] .highlight .mf,
body[data-theme="dark"] .highlight .mh,
body[data-theme="dark"] .highlight .mi,
body[data-theme="dark"] .highlight .mo,
body[data-theme="dark"] .highlight .il { color: #79C0FF; }

body[data-theme="dark"] .highlight .c,
body[data-theme="dark"] .highlight .c1,
body[data-theme="dark"] .highlight .cm,
body[data-theme="dark"] .highlight .cp,
body[data-theme="dark"] .highlight .cs,
body[data-theme="dark"] .highlight .cd,
body[data-theme="dark"] .highlight .ch {
  color: #8B949E;
  font-style: italic;
}

body[data-theme="dark"] .highlight .o,
body[data-theme="dark"] .highlight .ow { color: #FF7B72; }

body[data-theme="dark"] .highlight .mo-keyword {
  color: #D2A8FF;
}

body[data-theme="dark"] code.literal,
body[data-theme="dark"] p code,
body[data-theme="dark"] li code {
  background: #161B22;
  color: #E6EDF3;
}
body[data-theme="dark"] button.copybtn:hover {
  background: rgba(255,255,255,0.08);
  color: #E6EDF3;
}


/* ============================================================
   5. 表格 —— Snowflake / GitHub 风
     - 表头明显跳出(背景 #E5E9F0 与代码块同色,不再 #F6F8FA 极淡)
     - 无竖线,靠列对齐+留白区分;行间 1px 极淡线
     - box-shadow 0 0 0 1px 当外框,圆角 8px 给"卡片感"
     - tbody 第一列略加粗,作为"行 ID"提示(参数名 / 字段名)
     - hover 行微妙背景反馈
   选择器覆盖 Sphinx 默认 .docutils、MyST、可能的 .rst-content / .bd-content 包裹层。
   ============================================================ */
article[role="main"] table,
article[role="main"] table.docutils,
.rst-content table,
.bd-content table {
  width: 100%;
  border-collapse: separate;   /* separate 才让 border-radius + overflow:hidden 工作 */
  border-spacing: 0;
  border: none;
  margin: 24px 0;
  font-size: 14px;
  color: #1F2937;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #E5E7EB;   /* 用阴影代替边框 */
}
article[role="main"] table th,
article[role="main"] table td,
article[role="main"] table.docutils th,
article[role="main"] table.docutils td,
.rst-content table th,
.rst-content table td {
  border-left: none;
  border-right: none;
  border-top: none;
}

/* 表头:深一档底色,与代码块同灰,清晰可辨 */
article[role="main"] table thead th,
article[role="main"] table.docutils thead th,
.rst-content table thead th {
  background: #E5E9F0;
  color: #111827;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  text-transform: none;
  letter-spacing: 0.01em;
  padding: 14px 20px;
  border-bottom: 1px solid #C7D2E0;
  border-top: none;
}

/* 表体:行间细线,顶端对齐 */
article[role="main"] table tbody td,
article[role="main"] table.docutils tbody td,
.rst-content table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid #E5E7EB;
  border-top: none;
  line-height: 1.6;
  vertical-align: top;
  color: #1F2937;
  background: #ffffff;
  font-size: 14px;
}

article[role="main"] table tbody tr:last-child td,
.rst-content table tbody tr:last-child td {
  border-bottom: none;
}
article[role="main"] table tbody tr:hover td,
.rst-content table tbody tr:hover td {
  background: #FAFBFC;
}

/* 第一列略加粗:参数名 / 字段名通常落在这里 */
article[role="main"] table tbody td:first-child,
.rst-content table tbody td:first-child {
  font-weight: 500;
}

/* 行内 code 在表格里:沿用全局色系,无需额外覆盖。但表头里的 code 需要在深底上加白底色块,这里专门处理。 */
article[role="main"] table thead th code,
.rst-content table thead th code {
  background: #ffffff;
  color: #1F2937;
}

/* 暗色模式 */
body[data-theme="dark"] article[role="main"] table,
body[data-theme="dark"] .rst-content table {
  box-shadow: 0 0 0 1px #30363D;
  color: #C9D1D9;
}
body[data-theme="dark"] article[role="main"] table thead th,
body[data-theme="dark"] .rst-content table thead th {
  background: #161B22;
  color: #E6EDF3;
  border-bottom-color: #30363D;
}
body[data-theme="dark"] article[role="main"] table tbody td,
body[data-theme="dark"] .rst-content table tbody td {
  background: #0D1117;
  color: #C9D1D9;
  border-bottom-color: #21262D;
}
body[data-theme="dark"] article[role="main"] table tbody tr:hover td,
body[data-theme="dark"] .rst-content table tbody tr:hover td {
  background: #161B22;
}
body[data-theme="dark"] article[role="main"] table thead th code,
body[data-theme="dark"] .rst-content table thead th code {
  background: #0D1117;
  color: #E6EDF3;
}


/* ============================================================
   6. 引用 & admonition  ——  Snowflake 同款分级配色
     原则：饱和色背景跳出白底 + 主色左竖边 + 标题加粗彩字
     色系：note/info/seealso→灰蓝；tip/hint→淡绿；warning/caution/attention→淡黄；
           important/danger/error→饱和粉红
     标题:15px / 600,与正文同号,加重视觉权重
   ============================================================ */
article blockquote {
  border-left: 3px solid var(--mo-border-100);
  background: transparent;
  padding: 4px 16px;
  color: var(--mo-ink-600);
  margin: 1.25em 0;
  font-style: normal;
}

/* 通用框架（覆盖 Furo 默认的饱和色） */
.admonition {
  background: var(--mo-surface-50);
  border: none;
  border-left: 3px solid var(--mo-border-100);
  border-radius: var(--mo-radius-md);
  padding: 16px 20px;
  box-shadow: none;
  margin: 1.25em 0;
  color: var(--mo-ink-700);
}
.admonition > * { color: var(--mo-ink-700); }
.admonition > p:not(.admonition-title) { margin: 0 0 0.75em; }
.admonition > *:last-child { margin-bottom: 0; }

/* 标题：去掉 Furo 的饱和底色，只留文字 + 图标。15px/600 给足视觉权重。 */
.admonition > p.admonition-title {
  background: transparent !important;
  margin: 0 0 8px;
  padding: 0 0 0 24px;      /* 左侧 24px 给图标让位 */
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--mo-ink-900);
}
.admonition > p.admonition-title::before {
  top: 2px;
  left: 0;
  width: 16px;
  height: 16px;
}

/* —— tip / hint：饱和淡绿 —— */
.admonition.tip,
.admonition.hint {
  background: #F2FAF5;
  border-left-color: #8FE0BC;
}
.admonition.tip > .admonition-title,
.admonition.hint > .admonition-title {
  color: #065F46;
}
.admonition.tip > .admonition-title::before,
.admonition.hint > .admonition-title::before {
  background-color: #10B981 !important;
}

/* —— note / info / seealso：中性浅底，左边线不用品牌蓝 —— */
.admonition.note,
.admonition.info,
.admonition.seealso {
  background-color: var(--mo-surface-50, #f7f8fa) !important;
  background: var(--mo-surface-50, #f7f8fa) !important;
  border-left-color: var(--mo-border-100, #d8dde6) !important;
}
.admonition.note > .admonition-title,
.admonition.info > .admonition-title,
.admonition.seealso > .admonition-title {
  color: var(--mo-ink-900, #101215);
}
.admonition.note > .admonition-title::before,
.admonition.info > .admonition-title::before,
.admonition.seealso > .admonition-title::before {
  background-color: #94a3b8 !important;
}

/* —— warning / caution / attention：饱和淡黄 —— */
.admonition.warning,
.admonition.caution,
.admonition.attention {
  background: #FEF08A;
  border-left-color: #F59E0B;
}
.admonition.warning > .admonition-title,
.admonition.caution > .admonition-title,
.admonition.attention > .admonition-title {
  color: #713F12;
}
.admonition.warning > .admonition-title::before,
.admonition.caution > .admonition-title::before,
.admonition.attention > .admonition-title::before {
  background-color: #F59E0B !important;
}

/* —— important / danger / error：Snowflake 同款饱和粉红
   important 从警告分组挪到这里:这种语义在 Snowflake 文档里就是"红色严重提示"。 */
.admonition.important,
.admonition.danger,
.admonition.error {
  background: #FCE4E4;
  border-left-color: #EF4444;
}
.admonition.important > .admonition-title,
.admonition.danger > .admonition-title,
.admonition.error > .admonition-title {
  color: #991B1B;
}
.admonition.important > .admonition-title::before,
.admonition.danger > .admonition-title::before,
.admonition.error > .admonition-title::before {
  background-color: #EF4444 !important;
}

/* 暗色模式：背景切换到对应深色，竖边色和图标色保持不变 */
body[data-theme="dark"] .admonition             { background: #1a2338; color: #cbd5e1; }
body[data-theme="dark"] .admonition > *         { color: #cbd5e1; }
body[data-theme="dark"] .admonition.tip,
body[data-theme="dark"] .admonition.hint        { background: rgba(16,185,129,.08); }
body[data-theme="dark"] .admonition.note,
body[data-theme="dark"] .admonition.info,
body[data-theme="dark"] .admonition.seealso    { background: rgba(59,130,246,.08); }
body[data-theme="dark"] .admonition.warning,
body[data-theme="dark"] .admonition.caution,
body[data-theme="dark"] .admonition.attention  { background: rgba(245,158,11,.08); }
body[data-theme="dark"] .admonition.important,
body[data-theme="dark"] .admonition.danger,
body[data-theme="dark"] .admonition.error      { background: rgba(239,68,68,.08); }
body[data-theme="dark"] .admonition > .admonition-title { color: #f3f4f6; }/* 下面这些是「分组侧栏」成立的前提（藏掉 Furo 原生的折叠机关与非当前分支）。
   加 html[data-mo-grouped-sidebar] 前缀，是因为它们只在 grouped-sidebar.js
   排过的结构上才成立：没有那个脚本的站点（例如只装了本样式表的 moi5.0），
   套上去会把 Furo 原生侧栏的展开箭头和当前分支一起藏掉，读者会迷路。 */



/* ============================================================
   7. 左侧侧边栏
   ============================================================ */

/* Furo 原生折叠机关（toctree-checkbox + label.toctree-toggle）的样式：
   - 一级章节标题（toctree-l1）不允许折叠（它本身就是顶栏分类），隐藏其 toggle 和 hidden checkbox
   - 二级及更深的 label 沿用 Furo 默认 SVG chevron（已能跟随 :checked 状态旋转），
     只做一点尺寸与悬浮态微调。 */
html[data-mo-grouped-sidebar] .sidebar-tree .toctree-l1 > label,
html[data-mo-grouped-sidebar] .sidebar-tree .toctree-l1 > input.toctree-checkbox {
  display: none;
}
.sidebar-tree label {
  width: 28px;
  background: transparent;
  border-radius: 6px;
  transition: background-color .15s ease;
}
.sidebar-tree label:hover {
  background: transparent;
}
.sidebar-tree label .icon svg {
  width: 12px;
  height: 12px;
  opacity: .7;
  transition: transform .2s ease, opacity .15s ease;
}
.sidebar-tree label:hover .icon svg {
  opacity: 1;
}

/* 分组标题（caption）：去掉 uppercase + letter-spacing 复古样式 */
.sidebar-tree .caption,
.sidebar-tree p.caption,
.sidebar-tree :not(.caption) > .caption-text {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mo-ink-900);
  padding: 16px 12px 8px;
  margin: 0;
}
body[data-theme="dark"] .sidebar-tree .caption,
body[data-theme="dark"] .sidebar-tree p.caption,
body[data-theme="dark"] .sidebar-tree :not(.caption) > .caption-text {
  color: #f3f4f6;
}

/* 默认非当前项：完整四态（a / a:link / a:visited / a:hover）一致 reset。
   color 和 font-weight 都必须 —— 否则 Furo 的
   `.current-page > .reference { font-weight: 700 }` 等高权重规则 +
   浏览器 :visited 默认色会让"访问过的项"看上去更粗 / 紫。
   `.bd-sidebar-primary` 是 pydata-sphinx-theme 的兜底命名，对 Furo 是 no-op。 */
.sidebar-tree a,
.sidebar-tree a:link,
.sidebar-tree a:visited,
.sidebar-tree .reference,
.sidebar-tree .reference:link,
.sidebar-tree .reference:visited,
.sidebar-tree .toctree-l1 > .reference,
.sidebar-tree .toctree-l1 > .reference:visited,
.bd-sidebar-primary a,
.bd-sidebar-primary a:link,
.bd-sidebar-primary a:visited {
  color: var(--mo-ink-600);
  font-weight: 400;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--mo-radius);
  transition: background .1s ease, color .1s ease;
}
.sidebar-tree a:hover,
.sidebar-tree a:visited:hover,
.sidebar-tree .reference:hover,
.sidebar-tree .toctree-l1 > .reference:hover,
.bd-sidebar-primary a:hover,
.bd-sidebar-primary a:visited:hover {
  background: var(--mo-surface-50);
  color: var(--mo-ink-800);
  font-weight: 400;
  text-decoration: none;
}

/* 当前项：中性底 + 标题色（不染品牌蓝）。 */
.sidebar-tree a.current,
.sidebar-tree a.current:link,
.sidebar-tree a.current:visited,
.sidebar-tree .current-page > a.reference,
.sidebar-tree .current-page > a.reference:visited,
.bd-sidebar-primary a.current,
.bd-sidebar-primary a.current:visited {
  background: var(--mo-nav-active-bg, #ebebed);
  color: var(--mo-nav-active, var(--mo-text-heading, #101215));
  -webkit-text-fill-color: var(--mo-nav-active, var(--mo-text-heading, #101215));
  font-weight: 500;
  border-left: none;
  border-radius: 8px;
}
/* Furo 默认给当前页的标题外面套 <strong>，强制 reset 字重 */
.sidebar-tree a.current strong,
.sidebar-tree .current-page > a strong {
  font-weight: 500;
}

body[data-theme="dark"] .sidebar-tree a,
body[data-theme="dark"] .sidebar-tree a:link,
body[data-theme="dark"] .sidebar-tree a:visited,
body[data-theme="dark"] .sidebar-tree .reference,
body[data-theme="dark"] .sidebar-tree .reference:visited,
body[data-theme="dark"] .sidebar-tree .toctree-l1 > .reference {
  color: #94a3b8;
}
body[data-theme="dark"] .sidebar-tree a:hover,
body[data-theme="dark"] .sidebar-tree .reference:hover,
body[data-theme="dark"] .sidebar-tree .toctree-l1 > .reference:hover {
  background: rgba(148,163,184,.08);
  color: #e2e8f0;
}
body[data-theme="dark"] .sidebar-tree a.current,
body[data-theme="dark"] .sidebar-tree a.current:visited,
body[data-theme="dark"] .sidebar-tree .current-page > a.reference {
  background: var(--mo-nav-active-bg, rgba(255, 255, 255, 0.10));
  color: var(--mo-nav-active, #d7dde8);
  -webkit-text-fill-color: var(--mo-nav-active, #d7dde8);
}


/* ============================================================
   8. 右侧 TOC（页面大纲）
   ============================================================ */
/* TOC 标题：隐藏 Furo 默认 "On this page" 文本，用 ::before 注入更克制的版本 */
.toc-title { display: none; }
.toc-title-container {
  padding: 12px;
  margin: 0 0 4px;
}
.toc-title-container::before {
  content: "在此页面";
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #5c626b;
  letter-spacing: 0;
  text-transform: none;
  padding: 0;
  border-bottom: 0;
}
html[lang^="en"] .toc-title-container::before { content: "On this page"; }
body[data-theme="dark"] .toc-title-container::before {
  color: #6E7681;
  border-bottom-color: #21262D;
}

/* 隐藏 Furo 默认的页脚（Copyright + Made with Sphinx/Furo） */
.bottom-of-page { display: none; }

.toc-tree a {
  color: var(--mo-ink-600);
  font-weight: 400;
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -2px;
  transition: color .1s ease, border-color .1s ease;
}
.toc-tree a:hover {
  color: var(--mo-ink-800);
  text-decoration: none;
}
/* 本页目录当前项：中性字重，不染品牌蓝 */
.toc-tree li.scroll-current > a.reference,
.toc-tree a.scroll-current {
  color: var(--mo-text-heading, #101215);
  font-weight: 600;
  border-left-color: rgba(15, 17, 20, 0.22);
}

body[data-theme="dark"] .toc-tree a { color: #94a3b8; }
body[data-theme="dark"] .toc-tree a:hover { color: #e2e8f0; }
body[data-theme="dark"] .toc-tree li.scroll-current > a.reference,
body[data-theme="dark"] .toc-tree a.scroll-current {
  color: var(--mo-dark-heading, #d7dde8);
  border-left-color: rgba(215, 221, 232, 0.35);
}

/* （旧版右栏 feedback 已移除，新卡片样式见 §17 文末） */


/* ============================================================
   9. 顶栏（两行：Logo/工具 · 主导航）
     9a. 容器（两行）
     9b. Logo + MatrixOne Docs 字
     9c. 主导航（中间，inline tabs，距文字 8px 下划线）
     9d. 工具区（margin-left:auto 推到最右）
     9e. 搜索框
     9f. 暗色按钮（Furo 移过来）
     9g. 语言切换 EN 按钮
     9h. 内容下移 + 响应式
   ============================================================ */

/* 9a 容器 */
.mo-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--mo-topbar-h);
  background: var(--color-background-primary);
  border-bottom: none;
}
.mo-topbar::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0),
    rgba(148, 163, 184, 0.28) 10%,
    rgba(148, 163, 184, 0.36) 50%,
    rgba(148, 163, 184, 0.28) 90%,
    rgba(148, 163, 184, 0)
  );
  pointer-events: none;
}
.mo-topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  height: 100%;
  padding: 8px 32px 10px;
  column-gap: 32px;
  row-gap: 2px;
}

/* 9b Logo 区（官方 MO lockup + Docs 小字；明暗两套图） */
.mo-topbar__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  order: 1;
}
.mo-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.mo-topbar__brand:hover { text-decoration: none; }
/* 与远程 docs 顶栏一致：按高度等比缩放，禁止锁死宽高导致糊边 */
.mo-topbar__logo {
  height: 28px;
  width: auto;
  max-width: none;
  display: block;
  object-fit: contain;
  object-position: left center;
  image-rendering: auto;
}
.mo-topbar__logo--dark { display: none; }
body[data-theme="dark"] .mo-topbar__logo--light { display: none; }
body[data-theme="dark"] .mo-topbar__logo--dark  { display: block; }

.mo-topbar__docs {
  font-size: 14px;
  font-weight: 400;
  color: #6B7280;
  line-height: 1;
  border-left: none;
  padding-left: 0;
}
body[data-theme="dark"] .mo-topbar__docs  { color: #9ca3af; }

.mo-product-switcher {
  position: relative;
  display: flex;
  align-items: center;
}
.mo-product-pill {
  height: 32px;
  max-width: 220px;
  padding: 0 10px 0 12px;
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  color: #1F2937;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.mo-product-pill:hover,
.mo-product-switcher.is-open .mo-product-pill {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.mo-product-pill__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mo-product-pill__chevron {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: #64748B;
  transition: transform .15s;
}
.mo-product-switcher.is-open .mo-product-pill__chevron {
  transform: rotate(180deg);
}
/* 下拉是一张安静的清单，不是一张卡片。

   原先它是：11px 大写灰小标题「产品文档」+ 蓝底蓝字的当前项 + 「当前产品」小字 + 蓝对勾，
   四个信号说同一件事，260px 宽只装两行字。产品负责人的原话是「这种非常丑陋的卡片并不是
   一个好的方式去优雅的展现交互」「四不像」。

   现在只留一件事：两行产品名，当前那行右边一个灰对勾。字色跟顶栏一致（--mo-text-nav），
   悬停浮一层中性浅底——和右侧图标按钮同一种悬停手感。**不要往这里加蓝色**：顶栏没有
   一处用填充色表达"选中"，标签页用的是下划线。 */
/* 弹出层要贴着按钮，不能像一张飘过来的卡。三条几何关系是关键：

   ① **文字对齐文字**：菜单里的产品名和按钮上的产品名共用一条左边线。
      算式：切换器自己有 14px 左内距（那条竖线占的），按钮再 3px，共 17px；
      菜单这边是自身 padding 5px + 条目 padding 10px = 15px；差 2px，
      实测按钮文字还有 1px 的次像素偏移，所以取 1px。
      **改动其中任何一个内距都要在浏览器里重新量一次**——差一两像素
      比完全不对齐更难看。
   ② **宽度跟着按钮**：min-width: 100% 让它至少和按钮一样宽，width: max-content 让它
      刚好包住最长的一行——不再是一个和按钮没关系的固定 260/204px。
   ③ **离得近**：距离按钮 5px，投影压到 4px 扩散 14px。原先 8px 间距配 6/20px 的投影，
      看着是浮在半空的另一个物件。 */
.mo-product-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 1px;
  width: max-content;
  min-width: 100%;
  padding: 5px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .05);
  display: none;
  z-index: 1100;
}
.mo-product-switcher.is-open .mo-product-menu { display: block; }
.mo-product-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: var(--mo-type-ui);
  font-weight: 500;
  color: var(--mo-text-nav);
  cursor: pointer;
  text-decoration: none;
}
.mo-product-menu__item:hover {
  background: rgba(15, 23, 42, .045);
  color: var(--mo-text-heading);
  text-decoration: none;
}
.mo-product-menu__item.is-active,
.mo-product-menu__item.is-active:hover {
  background: transparent;
  color: var(--mo-text-nav);
  cursor: default;
}
.mo-product-menu__item.is-active svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--mo-control-mute);
}
.mo-product-menu__title {
  display: block;
  line-height: 1.3;
}
body[data-theme="dark"] .mo-product-pill {
  background: #161B22;
  border-color: #30363D;
  color: #e5e7eb;
}
body[data-theme="dark"] .mo-product-pill:hover,
body[data-theme="dark"] .mo-product-switcher.is-open .mo-product-pill {
  background: rgba(148,163,184,.08);
  border-color: #3b4654;
}
body[data-theme="dark"] .mo-product-menu {
  background: #0d1117;
  border-color: #30363D;
  box-shadow: 0 4px 14px rgba(0,0,0,.36), 0 1px 2px rgba(0,0,0,.3);
}
body[data-theme="dark"] .mo-product-menu__item { color: #e5e7eb; }
body[data-theme="dark"] .mo-product-menu__item:hover {
  background: rgba(148,163,184,.08);
  color: #fff;
}
body[data-theme="dark"] .mo-product-menu__item.is-active,
body[data-theme="dark"] .mo-product-menu__item.is-active:hover {
  background: transparent;
}

/* 9c 主导航（inline tabs，下划线在文字下方 8px） */
.mo-topbar__tabs {
  display: flex;
  align-items: center;
  gap: 32px;
  order: 3;
  flex: 0 0 100%;
  width: 100%;
  height: 36px;
}
.mo-topbar__tab,
.mo-topbar__tab:link,
.mo-topbar__tab:visited {
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.mo-topbar__tab:hover,
.mo-topbar__tab:visited:hover {
  color: #1F2937;
  font-weight: 500;
  text-decoration: none;
}
.mo-topbar__tab--active,
.mo-topbar__tab--active:link,
.mo-topbar__tab--active:visited {
  color: var(--mo-text-heading, #101215);
  font-weight: 600;
  border-bottom-color: transparent;
}
body[data-theme="dark"] .mo-topbar__tab,
body[data-theme="dark"] .mo-topbar__tab:link,
body[data-theme="dark"] .mo-topbar__tab:visited       { color: #9ca3af; }
body[data-theme="dark"] .mo-topbar__tab:hover         { color: #e5e7eb; }
body[data-theme="dark"] .mo-topbar__tab--active,
body[data-theme="dark"] .mo-topbar__tab--active:visited {
  color: var(--mo-dark-heading, #d7dde8);
  border-bottom-color: transparent;
}

/* 9d 工具区（自动靠右） */
.mo-topbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  order: 2;
  flex: 0 0 auto;
}

/* 9e 搜索入口：与顶栏控件同高同圆角的软底圆角矩形 */
.mo-topbar__search {
  position: relative;
  box-sizing: border-box;
  width: 260px;
  height: var(--mo-control-h);
  border: 0;
  border-radius: var(--mo-control-radius);
  background: var(--mo-control-fill);
  box-shadow: none;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.mo-topbar__search:hover {
  background: var(--mo-control-fill-hover);
}
.mo-topbar__search:focus-within {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 74, 240, .14);
}
.mo-topbar__search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--mo-control-mute);
  pointer-events: none;
}
.mo-topbar__search:hover .mo-topbar__search-icon,
.mo-topbar__search:focus-within .mo-topbar__search-icon {
  color: #6e7480;
}
.mo-topbar__search input {
  width: 100%;
  height: 100%;
  padding: 0 12px 0 34px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--mo-text-nav, #101215);
  font-size: 13.5px;
  letter-spacing: -.005em;
  caret-color: var(--mo-primary);
  outline: none;
  box-shadow: none;
}
.mo-topbar__search input::placeholder { color: var(--mo-control-mute); }
.mo-topbar__search input:hover,
.mo-topbar__search input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}
body[data-theme="dark"] .mo-topbar__search {
  border: 0;
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
}
body[data-theme="dark"] .mo-topbar__search:hover {
  background: rgba(255, 255, 255, .11);
}
body[data-theme="dark"] .mo-topbar__search:focus-within {
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 3px rgba(107, 140, 255, .2);
}
body[data-theme="dark"] .mo-topbar__search input {
  background: transparent;
  color: #e8edf5;
  border: 0;
  box-shadow: none;
}
body[data-theme="dark"] .mo-topbar__search input::placeholder { color: #9aa3b2; }
body[data-theme="dark"] .mo-topbar__search-icon { color: #9aa3b2; }

/* 9f Furo 暗色切换按钮（被搬到 .mo-topbar__actions 里） */
.content-icon-container .theme-toggle-container.theme-toggle-content {
  display: none !important;
}
.mo-topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 174px;
}
.mo-topbar__actions .theme-toggle-container { display: flex; }
.mo-topbar__actions .theme-toggle {
  width: var(--mo-control-h);
  height: var(--mo-control-h);
  border: none;
  border-radius: var(--mo-control-radius);
  background: transparent;
  color: var(--mo-control-mute);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.mo-topbar__actions .theme-toggle:hover {
  background: var(--mo-control-fill);
  color: #1F2937;
}
body[data-theme="dark"] .mo-topbar__actions .theme-toggle:hover {
  background: rgba(148,163,184,.12);
  color: #e5e7eb;
}


/* 9g-2 版本切换 pill + 下拉菜单 */
.mo-version-switcher {
  position: relative;
  display: flex;
  align-items: center;
}
.mo-version-pill {
  height: 32px;
  padding: 0 10px 0 12px;
  background: transparent;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.mo-version-pill:hover,
.mo-version-switcher.is-open .mo-version-pill {
  background: #F8FAFC;
  color: #1F2937;
}
.mo-version-pill__chevron {
  width: 12px;
  height: 12px;
  transition: transform .15s;
}
.mo-version-switcher.is-open .mo-version-pill__chevron {
  transform: rotate(180deg);
}
.mo-version-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.04);
  display: none;
  z-index: 1100;
}
.mo-version-switcher.is-open .mo-version-menu { display: block; }
.mo-version-menu__heading {
  padding: 4px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mo-version-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #1F2937;
  cursor: pointer;
  text-decoration: none;
}
.mo-version-menu__item:hover {
  background: #F8FAFC;
  color: #004af0;
  text-decoration: none;
}
.mo-version-menu__item.is-active { background: #EFF6FF; color: #004af0; }
.mo-version-menu__item.is-active svg { width: 12px; height: 12px; }
body[data-theme="dark"] .mo-version-pill {
  background: transparent;
  border-color: #30363D;
  color: #9ca3af;
}
body[data-theme="dark"] .mo-version-pill:hover,
body[data-theme="dark"] .mo-version-switcher.is-open .mo-version-pill {
  background: rgba(148,163,184,.08);
  color: #e5e7eb;
}
body[data-theme="dark"] .mo-version-menu {
  background: #0d1117;
  border-color: #30363D;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
body[data-theme="dark"] .mo-version-menu__heading { color: #94A3B8; }
body[data-theme="dark"] .mo-version-menu__item { color: #e5e7eb; }
body[data-theme="dark"] .mo-version-menu__item:hover {
  background: rgba(148,163,184,.08);
  color: #6b8cff;
}
body[data-theme="dark"] .mo-version-menu__item.is-active {
  background: rgba(107,140,255,.15);
  color: #6b8cff;
}
/* 9h 内容下移 + Furo sticky 修正
   注意：这些规则不再依赖 body.mo-has-topbar，避免 topbar.js 在 DOMContentLoaded
   之后才加 class 导致首屏布局跳动（先画无顶栏的版本，再被推下去 64px）。
   首屏直接预留顶栏高度并隐藏 Furo 自带的侧栏 brand / 搜索框，
   topbar.js 再异步把顶栏内容填进预留的空白区域即可。 */
body { padding-top: var(--mo-topbar-h); }
.sidebar-sticky,
.toc-sticky {
  top: var(--mo-topbar-h);
  height: calc(100vh - var(--mo-topbar-h));
}
.sidebar-brand,
.sidebar-search-container { display: none; }

/* 响应式 */
@media (max-width: 1100px) {
  .mo-topbar__search { width: 240px; }
}
@media (max-width: 960px) {
  .mo-topbar__inner { padding: 8px 16px 10px; column-gap: 16px; }
  .mo-topbar__tabs { gap: 18px; overflow-x: auto; scrollbar-width: none; }
  .mo-topbar__tabs::-webkit-scrollbar { display: none; }
  .mo-topbar__search { width: 200px; }
  .mo-product-pill { max-width: 180px; }
}
@media (max-width: 640px) {
  .mo-topbar__docs { display: none; }
  .mo-product-pill { max-width: 150px; }
  .mo-topbar__search { width: 160px; }
  .mo-topbar__actions { min-width: 126px; }
  .mo-topbar__search input { font-size: 16px; }
  article[role="main"] { padding: 0 20px; }
}


/* ============================================================
  10. sphinx-design tab-set（Linux / macOS 切换）—— Segment 风格
   ============================================================ */
.sd-tab-set {
  /* 必须保留 sphinx-design 的 flex + wrap:.sd-tab-content 用 width:100% 换到下一行实现"内容在标签下"。
     原先用 inline-flex + nowrap 想做紧凑 Segment pill,结果阻断换行,
     标签被压到 min-content(中文逐字成列)、内容也乱了。 */
  display: flex;
  flex-wrap: wrap;
  background: var(--mo-surface-100);
  padding: 4px;
  border-radius: var(--mo-radius-md);
  margin: 1.25em 0;
}
/* 每个 tab 标签 */
.sd-tab-set > label,
.sd-tab-set > .sd-tab-label {
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mo-ink-350);
  background: transparent;
  border: none;
  border-radius: var(--mo-radius);
  cursor: pointer;
  transition: all 0.15s ease;
}
.sd-tab-set > label:hover,
.sd-tab-set > .sd-tab-label:hover {
  color: var(--mo-ink-700);
  background: transparent;
}
/* 激活 tab */
.sd-tab-set > input:checked + label,
.sd-tab-set > input:checked + .sd-tab-label {
  color: var(--mo-ink-800);
  background: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
/* 内容区恢复常态，取消 sphinx-design 默认的上下 box-shadow 线 */
.sd-tab-content {
  box-shadow: none;
  padding: 16px 0 0;
}

body[data-theme="dark"] .sd-tab-set {
  background: #1a2338;
}
body[data-theme="dark"] .sd-tab-set > input:checked + label,
body[data-theme="dark"] .sd-tab-set > input:checked + .sd-tab-label {
  background: #0f172a;
  color: #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}



/* —— 上下文左树:左侧栏只显示当前一级分类的子树 ——
   配合 _theme/_templates/sidebar/navigation.html。Stripe / Vercel 风:
   顶栏切大分类,左栏只放小分类,非当前大分类不出现。 */
html[data-mo-grouped-sidebar] .sidebar-tree > p.caption { display: none; }                       /* 顶部 caption 已在顶栏 */
html[data-mo-grouped-sidebar] .sidebar-tree > ul > li.toctree-l1:first-child { display: none; }  /* "主页"快捷入口已在 brand */
html[data-mo-grouped-sidebar] .sidebar-tree > ul > li.toctree-l1:not(.current) { display: none; }/* 非当前大分类全部隐藏 */
html[data-mo-grouped-sidebar] .sidebar-tree > ul > li.toctree-l1.current > a.reference { display: none; } /* 当前大分类已在顶栏显示 */
html[data-mo-grouped-sidebar] .sidebar-tree li:not(.current-page):has(> a.reference[href^="#"]) { display: none; } /* 左栏只显示页面目录，不混入当前页正文锚点 */

.sidebar-tree--home .sidebar-hint {
  padding: 16px 20px;
  margin: 8px 0 0;
  color: var(--mo-ink-500);
  font-size: .9rem;
  font-style: italic;
  line-height: 1.5;
}
body[data-theme="dark"] .sidebar-tree--home .sidebar-hint { color: #94a3b8; }




/* ============================================================
  12. sphinx-design 卡片
   ============================================================ */
.sd-card {
  border: 1px solid var(--mo-border-100);
  border-radius: var(--mo-radius-lg);
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: var(--color-background-primary);
}
.sd-card:hover {
  border-color: var(--mo-primary);
  box-shadow: 0 4px 12px rgba(0,74,240,.06);
}
.sd-card .sd-card-title {
  font-weight: 600;
  color: var(--mo-ink-900);
}
body[data-theme="dark"] .sd-card .sd-card-title { color: #f3f4f6; }
.sd-card a.sd-stretched-link::after { border-radius: var(--mo-radius-lg); }

/* —— intelligence 首页卡片图标块：沿用统一品牌蓝 —— */
/* 仅作用于由 icons.js 注入了 .mo-card-icon 的卡片（即 intelligence 首页）  */
.mo-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eff6ff;
  color: #004af0;
  margin: 4px 0 14px;
}
.mo-card-icon svg { width: 22px; height: 22px; }
body[data-theme="dark"] .mo-card-icon {
  background: rgba(37, 99, 235, 0.16);
  color: #93c5fd;
}
/* :has() 让带图标卡片的 hover 保持统一蓝色。 */
.sd-card:has(.mo-card-icon):hover {
  border-color: #004af0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.10);
}
body[data-theme="dark"] .sd-card:has(.mo-card-icon):hover {
  border-color: #60a5fa;
  box-shadow: 0 4px 14px rgba(96, 165, 250, 0.16);
}
.sd-card:has(.mo-card-icon):hover .mo-card-icon {
  background: #dbeafe;
}
body[data-theme="dark"] .sd-card:has(.mo-card-icon):hover .mo-card-icon {
  background: rgba(37, 99, 235, 0.24);
}



/* ============================================================
  15. 左侧导航 visited 完全重置（放在文件末尾，权重最高）
     —— 之前的重置只锁了 color，font-weight / decoration / style
        被外部规则（Furo .current-page>.reference{font-weight:700}
        等）漏过来，造成"访问过的项变粗变深"假象。
        这里把所有四态 + summary + 父级 .current 都显式锁死。
   ============================================================ */
.sidebar-tree a,
.sidebar-tree a:link,
.sidebar-tree a:visited,
.sidebar-tree a:active,
.bd-sidebar-primary a,
.bd-sidebar-primary a:link,
.bd-sidebar-primary a:visited,
.bd-sidebar-primary a:active,
nav.bd-links a,
nav.bd-links a:link,
nav.bd-links a:visited,
nav.bd-links a:active {
  color: #4B5563;
  font-weight: 400;
  text-decoration: none;
  font-style: normal;
}

.sidebar-tree a:hover,
.sidebar-tree a:visited:hover,
.bd-sidebar-primary a:hover,
.bd-sidebar-primary a:visited:hover,
nav.bd-links a:hover,
nav.bd-links a:visited:hover {
  color: #1F2937;
  font-weight: 400;
  text-decoration: none;
}

.sidebar-tree a.current,
.sidebar-tree a.current:visited,
.sidebar-tree a.current:link,
.bd-sidebar-primary a.current,
.bd-sidebar-primary a.current:visited,
.bd-sidebar-primary a.current:link,
nav.bd-links a.current,
nav.bd-links a.current:visited {
  color: #004af0;
  -webkit-text-fill-color: #004af0;
  background: rgba(0, 74, 240, 0.10);
  font-weight: 500;
  border-radius: 8px;
  box-shadow: none;
}

.sidebar-tree summary,
.sidebar-tree summary:hover,
.bd-sidebar-primary summary {
  color: #4B5563;
  font-weight: 400;
}

.sidebar-tree li.current > a,
.sidebar-tree li.current > summary,
.bd-sidebar-primary li.current > a {
  color: #1E40AF;
  font-weight: 600;
}

/* Furo 默认会在当前页的链接里包一个 <strong>，强制 reset 字重 */
.sidebar-tree a strong,
.sidebar-tree a.current strong,
.sidebar-tree li.current > a strong {
  font-weight: inherit;
}

/* 一级目录（toctree-l1）：稍粗 + 稍深，建立层级 */
.sidebar-tree .toctree-l1 > a,
.sidebar-tree .toctree-l1 > a:link,
.sidebar-tree .toctree-l1 > a:visited,
.sidebar-tree .toctree-l1 > a:active {
  font-weight: 500;
  color: #1F2937;
}
.sidebar-tree .toctree-l1 > a:hover,
.sidebar-tree .toctree-l1 > a:visited:hover {
  color: #111827;
  font-weight: 500;
}

/* L1 是当前 section 的父级（有 .current 但不是 current-page）：标题色，不染蓝 */
.sidebar-tree li.toctree-l1.current > a:not(.current-page),
.sidebar-tree li.toctree-l1.current > a:not(.current-page):visited {
  color: var(--mo-text-heading, #101215);
  background: transparent;
  font-weight: 500;
}

/* 暗色模式同步 */
body[data-theme="dark"] .sidebar-tree a,
body[data-theme="dark"] .sidebar-tree a:link,
body[data-theme="dark"] .sidebar-tree a:visited,
body[data-theme="dark"] .sidebar-tree a:active {
  color: #94a3b8;
}
body[data-theme="dark"] .sidebar-tree a:hover,
body[data-theme="dark"] .sidebar-tree a:visited:hover {
  color: #e2e8f0;
}
body[data-theme="dark"] .sidebar-tree .toctree-l1 > a,
body[data-theme="dark"] .sidebar-tree .toctree-l1 > a:visited {
  color: #cbd5e1;
}
body[data-theme="dark"] .sidebar-tree li.toctree-l1.current > a:not(.current-page) {
  color: var(--mo-dark-heading, #d7dde8);
  background: transparent;
}
body[data-theme="dark"] .sidebar-tree a.current,
body[data-theme="dark"] .sidebar-tree a.current:visited,
body[data-theme="dark"] .sidebar-tree li.current > a {
  color: #f3f4f6;
  background: rgba(148, 163, 184, 0.16);
  box-shadow: none;
}


/* ============================================================
  16. 官网同款页脚（JS 注入到 body 末尾，全宽）
   ============================================================ */
.mo-footer {
  position: relative;
  margin-top: 80px;
  padding: 68px 0 34px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(24, 197, 255, .12) 0 1px, transparent 1px) 0 0 / 140px 80px,
    #081E48;
  color: rgba(255, 255, 255, .62);
}
.mo-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 110px;
  background: linear-gradient(180deg, rgba(21, 95, 160, .18), transparent);
  pointer-events: none;
}
.mo-footer-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.mo-footer-main {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.mo-footer-brand-logo {
  display: block;
  width: 104px;
  height: auto;
  margin-bottom: 14px;
}
.mo-footer-tagline {
  margin: 0 0 20px;
  max-width: 280px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,.62);
}
.mo-footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.mo-footer-social,
.mo-footer-social:link,
.mo-footer-social:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 32px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  color: rgba(255,255,255,.62);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
}
.mo-footer-social:hover {
  color: #fff;
  border-color: rgba(255,255,255,.32);
  background: rgba(255,255,255,.04);
}
.mo-footer-nav {
  display: grid;
  grid-template-columns: max-content max-content max-content minmax(155px, 1fr) max-content;
  gap: 28px;
}
.mo-footer-nav > .mo-footer-col:nth-child(4) {
  justify-self: end;
}
.mo-footer-title {
  margin: 0 0 16px;
  color: rgba(255,255,255,.92);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}
.mo-footer-links {
  display: grid;
  gap: 12px;
}
.mo-footer-link,
.mo-footer-link:link,
.mo-footer-link:visited {
  color: rgba(255,255,255,.62);
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  transition: color .15s;
}
.mo-footer-link:hover { color: #fff; }
.mo-footer-qr-list {
  display: grid;
  grid-template-columns: repeat(3, 74px);
  column-gap: 16px;
  row-gap: 18px;
}
.mo-footer-qr {
  width: 74px;
  display: grid;
  justify-items: center;
  row-gap: 8px;
  color: rgba(255,255,255,.52);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}
.mo-footer-qr img {
  width: 72px;
  height: 72px;
  display: block;
  padding: 4px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}
.mo-footer-divider {
  height: 1px;
  margin: 52px 0 28px;
  background: rgba(255,255,255,.10);
}
.mo-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: rgba(255,255,255,.42);
  font-size: 12px;
  line-height: 1.6;
}
.mo-footer-records,
.mo-footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.mo-footer-legal { justify-content: flex-end; }
.mo-footer-legal-link,
.mo-footer-legal-link:link,
.mo-footer-legal-link:visited {
  color: rgba(255,255,255,.42);
  text-decoration: none;
  transition: color .15s;
}
.mo-footer-legal-link:hover { color: rgba(255,255,255,.78); }
.mo-footer-sep { color: rgba(255,255,255,.28); }

@media (max-width: 1024px) {
  .mo-footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .mo-footer-nav {
    grid-template-columns: repeat(3, 1fr);
    gap: 34px;
  }
  .mo-footer-follow { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .mo-footer { padding: 48px 0 28px; }
  .mo-footer-inner { padding: 0 24px; }
  .mo-footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .mo-footer-legal { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .mo-footer-nav { grid-template-columns: 1fr; }
  .mo-footer-qr-list { gap: 14px; }
}


/* ============================================================
  17. 右侧 TOC 下方反馈区 + GitHub 编辑链接（Databricks 风格紧凑版）
   ============================================================ */
.mo-sidebar-feedback {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #F1F5F9;
}

.mo-sidebar-feedback-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.mo-sidebar-feedback-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.mo-sidebar-feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  padding: 6px 10px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: #374151;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.mo-sidebar-feedback-btn-full {
  width: 100%;
  flex: none;
}
.mo-sidebar-feedback-btn:hover {
  border-color: #9CA3AF;
  background: #F9FAFB;
}
.mo-sidebar-feedback-btn.active {
  border-color: #3B82F6;
  color: #004af0;
  background: #EFF6FF;
}
.mo-sidebar-feedback-btn svg { flex-shrink: 0; }

.mo-sidebar-feedback-detail { margin-top: 8px; }
.mo-sidebar-feedback-detail textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  color: #1F2937;
  background: #FFFFFF;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.mo-sidebar-feedback-detail textarea:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 2px rgba(59,130,246,.1);
}
.mo-sidebar-feedback-detail textarea::placeholder { color: #9CA3AF; }

.mo-sidebar-feedback-submit {
  margin-top: 6px;
  width: 100%;
  padding: 6px 10px;
  background: #004af0;
  border: 1px solid #004af0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: #FFFFFF;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.mo-sidebar-feedback-submit:hover {
  background: #1D4ED8;
  border-color: #1D4ED8;
}

.mo-sidebar-feedback-thanks {
  font-size: 13px;
  font-weight: 500;
  color: #10B981;
  padding: 6px 0;
}

/* GitHub 编辑此页（右侧栏） */
.mo-sidebar-edit {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #F1F5F9;
  font-size: 12px;
}
.mo-sidebar-edit a,
.mo-sidebar-edit a:link,
.mo-sidebar-edit a:visited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6B7280;
  text-decoration: none;
  transition: color .15s;
}
.mo-sidebar-edit a:hover { color: #004af0; }
.mo-sidebar-edit svg { flex-shrink: 0; }

/* 暗色模式 */
body[data-theme="dark"] .mo-sidebar-feedback { border-top-color: #21262D; }
body[data-theme="dark"] .mo-sidebar-feedback-title { color: #E6EDF3; }
body[data-theme="dark"] .mo-sidebar-feedback-btn {
  background: #0D1117;
  border-color: #30363D;
  color: #C9D1D9;
}
body[data-theme="dark"] .mo-sidebar-feedback-btn:hover {
  border-color: #6E7681;
  background: #161B22;
}
body[data-theme="dark"] .mo-sidebar-feedback-btn.active {
  border-color: #58A6FF;
  color: #58A6FF;
  background: rgba(88, 166, 255, 0.1);
}
body[data-theme="dark"] .mo-sidebar-feedback-detail textarea {
  background: #0D1117;
  border-color: #30363D;
  color: #C9D1D9;
}
body[data-theme="dark"] .mo-sidebar-feedback-thanks { color: #6ee7b7; }
body[data-theme="dark"] .mo-sidebar-edit { border-top-color: #21262D; }
body[data-theme="dark"] .mo-sidebar-edit a,
body[data-theme="dark"] .mo-sidebar-edit a:visited { color: #8B949E; }
body[data-theme="dark"] .mo-sidebar-edit a:hover { color: #58A6FF; }


/* ============================================================
  18. 阅读体验收口
      统一正文、顶栏与两侧导航的视觉层级；品牌色只作为精确锚点。
   ============================================================ */
:root {
  --mo-font-sans: "Geist", "MiSans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", system-ui, "Segoe UI", "Microsoft YaHei", sans-serif;
  --mo-page-white: #ffffff;
  --mo-type-body: 17px;
  --mo-type-lead: 18px;
  --mo-type-ui: 14px;
  --mo-type-small: 13px;
  --mo-type-meta: 12px;
  --mo-reading-top: 64px;
  /*
     左栏保存的是用户偏好宽度；实际宽度还需受当前视口约束。
     否则在宽屏拖到 560px 后再缩小窗口，左栏会持续挤压正文。
     26vw 让 1100px 临界宽度保留约 286px 给左栏，超宽屏仍可扩至 440px。
  */
  --mo-sidebar-left-preferred: 320px;
  --mo-sidebar-left: clamp(240px, var(--mo-sidebar-left-preferred), clamp(286px, 26vw, 440px));
  --mo-sidebar-right: 256px;
  /* 与顶栏「开始使用」开字对齐：topbar pad 32 + tab nudge 3 - nav pad 12 = 23 */
  --mo-sidebar-inline: 23px;
  --mo-text-heading: #000000;
  --mo-text-strong: #0f1114;
  --mo-text-body: #15171a;
  --mo-text-nav: #101215;
  --mo-text-subtle: #363b42;
  --mo-text-muted: #50565e;
  --mo-reading-ink: var(--mo-text-body);
  --mo-reading-muted: var(--mo-text-muted);
  --mo-reading-faint: #777d85;
  --mo-reading-rule: #e7ebf0;
  --mo-reading-brand: #004af0;
  --mo-toc-neutral: #5c626b;
}

html,
body,
button,
input,
textarea,
select {
  font-family: var(--mo-font-sans);
  font-synthesis: none;
  font-kerning: normal;
}

/* Furo 的 antialiased 会在 macOS 上削薄中文字形；恢复系统原生次像素渲染。 */
html,
body {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

body:not([data-theme="dark"]) {
  --color-background-primary: var(--mo-page-white);
  --color-background-secondary: #f5f4ef;
  --color-background-border: var(--mo-reading-rule);
  --color-foreground-primary: var(--mo-reading-ink);
  --color-foreground-secondary: var(--mo-reading-muted);
  --color-highlight-on-target: transparent;
  background: var(--mo-page-white);
  color: var(--mo-reading-ink);
  font-weight: 400;
}

/* 不再让任何透明承载层透出 Furo 的旧暖白底。 */
body:not([data-theme="dark"]) .page,
body:not([data-theme="dark"]) .main,
body:not([data-theme="dark"]) .content,
body:not([data-theme="dark"]) article[role="main"],
body:not([data-theme="dark"]) .sidebar-drawer,
body:not([data-theme="dark"]) .sidebar-container,
body:not([data-theme="dark"]) .toc-drawer,
body:not([data-theme="dark"]) .toc-sticky {
  background-color: var(--mo-page-white);
}

/* 阅读契约：正文 17/400；栏宽与 14" 锚定 measure 一致。 */
article[role="main"] {
  max-width: var(--mo-content-max, 52rem);
  color: var(--mo-reading-ink);
  font-family: var(--mo-font-sans);
  font-size: var(--mo-type-body);
  font-weight: 400;
  line-height: 29px;
}
article[role="main"] p {
  max-width: none;
  font-size: var(--mo-type-body);
  font-weight: 400;
  line-height: 29px;
}
article[role="main"] h1 + p {
  font-size: var(--mo-type-lead);
  font-weight: 400;
  line-height: 30px;
}
article h1 {
  font-family: var(--mo-font-sans);
  font-size: 40px;
  font-weight: 700;
  line-height: 48px;
  letter-spacing: 0;
  color: var(--mo-text-heading);
  margin-bottom: 16px;
}
article h2 {
  font-family: var(--mo-font-sans);
  font-size: 26px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: 0;
  color: var(--mo-text-heading);
  margin-top: 60px;
  margin-bottom: 16px;
}
article h3 {
  font-family: var(--mo-font-sans);
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: 0;
  color: var(--mo-text-strong);
  margin-top: 36px;
  margin-bottom: 12px;
}
article h4 {
  font-family: var(--mo-font-sans);
  font-size: 17px;
  font-weight: 600;
  line-height: 26px;
  color: var(--mo-text-strong);
  margin-top: 28px;
  margin-bottom: 8px;
}
article[role="main"] strong,
article[role="main"] b {
  font-weight: 600;
}
body:not([data-theme="dark"]) article[role="main"] strong,
body:not([data-theme="dark"]) article[role="main"] b {
  color: var(--mo-text-strong);
}

/* 顶栏是全局定位层：字号小于正文，当前项只留一条克制的品牌色短线。 */
.mo-topbar {
  background: var(--mo-page-white);
}
.mo-topbar::after {
  left: 0;
  right: 0;
  border-radius: 0;
  background: var(--mo-reading-rule);
}
.mo-topbar__tab,
.mo-topbar__tab:link,
.mo-topbar__tab:visited {
  font-size: var(--mo-type-ui);
  font-weight: 500;
  color: var(--mo-text-nav);
  border-bottom-width: 1px;
}
.mo-topbar__tab:hover,
.mo-topbar__tab:visited:hover {
  color: var(--mo-text-strong);
  font-weight: 500;
}
.mo-topbar__tab--active,
.mo-topbar__tab--active:link,
.mo-topbar__tab--active:visited {
  color: var(--mo-text-heading);
  font-weight: 600;
}
.mo-topbar__docs,
.mo-topbar__search input,
.mo-product-pill,
.mo-version-pill {
  font-size: var(--mo-type-ui);
  font-weight: 500;
}

.mo-topbar__docs,
.mo-topbar__search input {
  font-weight: 400;
}
.mo-topbar__identity {
  gap: 12px;
}
.mo-topbar__logo {
  height: 30px;
  width: auto;
}
.mo-topbar__docs {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  letter-spacing: 0;
  height: auto;
  margin-left: 0;
  padding-left: 10px;
  border-left: 1px solid #d9dee7;
  color: #667085;
  transform: none;
}
.mo-version-pill {
  color: var(--mo-text-nav);
}
/* 语言按钮不跟版本 pill 走深色：它和明暗按钮是同一类工具，靠右角安静待着，
   顶栏的深色留给品牌和产品名。这行原先把它一起拉深，结果窄屏标题栏那枚是灰的、
   顶栏这枚是黑的，同一枚按钮往下滚一行就换了颜色。 */

/* 产品切换是顶栏标题关系，不再伪装成一枚独立按钮。 */
.mo-product-switcher {
  margin-left: 2px;
  padding-left: 14px;
}
.mo-product-switcher::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 16px;
  background: var(--mo-reading-rule);
  transform: translateY(-50%);
  pointer-events: none;
}
.mo-product-pill {
  height: 30px;
  padding: 0 3px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--mo-text-nav);
  gap: 6px;
  box-shadow: none;
}
.mo-product-pill:hover,
.mo-product-switcher.is-open .mo-product-pill {
  background: transparent;
  border-color: transparent;
  color: var(--mo-text-heading);
  box-shadow: none;
}
.mo-product-pill:focus-visible {
  outline: 2px solid rgba(63, 102, 136, .22);
  outline-offset: 2px;
}
.mo-product-pill__chevron {
  width: 10px;
  height: 10px;
  color: #8b9198;
}
/* 这里原来把菜单改成右对齐（left:auto; right:0），于是它比按钮宽、往左甩出去一截，
   点的是右边的名字、弹出来的东西却在左边——「分离」就是这么来的。
   现在几何全部交给上面那条 .mo-product-menu，这里不要再覆盖 left/right。 */
body[data-theme="dark"] .mo-product-switcher::before {
  background: #30363d;
}
body[data-theme="dark"] .mo-product-pill,
body[data-theme="dark"] .mo-product-pill:hover,
body[data-theme="dark"] .mo-product-switcher.is-open .mo-product-pill {
  background: transparent;
  border-color: transparent;
  color: #d7dce2;
  box-shadow: none;
}

/* 明暗切换改为“日蚀圆盘”：与搜索同高同圆角，悬停同色底。 */
.mo-topbar__actions .theme-toggle {
  position: relative;
  flex: 0 0 var(--mo-control-h);
  width: var(--mo-control-h);
  height: var(--mo-control-h);
  border: 0;
  border-radius: var(--mo-control-radius);
  background: transparent;
  color: var(--mo-control-mute);
  box-shadow: none;
  transition: background-color .12s ease, color .12s ease;
}
.mo-topbar__actions .theme-toggle svg {
  display: none !important;
}
.mo-topbar__actions .theme-toggle::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%);
  transform: rotate(-35deg);
}
.mo-topbar__actions .theme-toggle:hover {
  background: var(--mo-control-fill);
  color: var(--mo-text-heading);
}
.mo-topbar__actions .theme-toggle:active {
  background: #eef3ff;
  color: var(--mo-reading-brand);
}
.mo-topbar__actions .theme-toggle:focus-visible {
  outline: 2px solid var(--mo-reading-brand);
  outline-offset: 2px;
}
body[data-theme="dark"] .mo-topbar__actions .theme-toggle {
  color: #e6ebf2;
}
body[data-theme="dark"] .mo-topbar__actions .theme-toggle::before {
  background: linear-gradient(90deg, transparent 0 50%, currentColor 50% 100%);
}
body[data-theme="dark"] .mo-topbar__actions .theme-toggle:hover {
  background: rgba(255, 255, 255, .07);
  color: #ffffff;
}
body[data-theme="dark"] .mo-topbar__actions .theme-toggle:active {
  background: rgba(115, 148, 255, .14);
  color: #7394ff;
}
@media (prefers-color-scheme: dark) {
  body[data-theme="auto"] .mo-topbar__actions .theme-toggle::before {
    background: linear-gradient(90deg, transparent 0 50%, currentColor 50% 100%);
  }
}

@media (min-width: 1100px) {
  /* 三层导航：全局工具栏 59px、产品分类栏 53px、下方上下文侧栏。 */
  /* 七列：品牌 · 产品切换 │ 留白 │ 搜索 · 版本 · 语言 · 明暗。
     .mo-topbar__identity 和 .mo-topbar__tools 都是 display: contents，
     它们的孩子直接当网格项，所以新加进顶栏的东西都得自己认领一列，
     不给就全挤进 auto 流里压字。

     2026-08-05 按产品负责人要求改成这个排布：产品名归到品牌那一侧（和仓库里
     moi5.0 的顶栏对齐），右端只留搜索和三个控件。第 3 列是纯留白，把两组撑开。

     **这两行仍然别合并。** 第二行的五个 Tab 是左侧目录的表头，它们竖着属于左栏，
     不是顶栏工具条的一部分——横着摆过去就断了这层关系。 */
  .mo-topbar__inner {
    display: grid;
    grid-template-columns: auto auto minmax(80px, 1fr) auto auto auto auto;
    grid-template-rows: 59px 53px;
    align-items: center;
    align-content: stretch;
    column-gap: 20px;
    row-gap: 0;
    padding: 0 32px;
  }
  .mo-topbar__identity {
    display: contents;
  }
  .mo-topbar__brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    gap: 10px;
  }
  .mo-product-switcher {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
  }
  /* 版本下拉。外形整套复用产品切换，只在这里认领自己那一列。 */
  .mo-switcher--version {
    grid-column: 5;
    grid-row: 1;
    justify-self: end;
  }
  .mo-lang {
    grid-column: 6;
    grid-row: 1;
    justify-self: end;
  }
  .mo-topbar__tools {
    display: contents;
  }
  .mo-topbar__search {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    width: min(320px, 100%);
  }
  .mo-topbar__actions {
    grid-column: 7;
    grid-row: 1;
    min-width: 0;
    gap: 0;
  }
  .mo-topbar__tabs {
    position: relative;
    grid-column: 1 / -1;
    grid-row: 2;
    height: 53px;
    gap: 30px;
  }
  .mo-topbar__tabs::before {
    content: "";
    position: absolute;
    top: 0;
    left: -32px;
    right: -32px;
    height: 1px;
    background: var(--mo-reading-rule);
    pointer-events: none;
  }
  .mo-topbar__tab,
  .mo-topbar__tab:link,
  .mo-topbar__tab:visited {
    position: relative;
    height: 53px;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }
  .mo-topbar__tab::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: calc(100% - 2px);
    height: 2px;
    border-radius: 999px;
    background: transparent;
    opacity: 0;
    transform: translateX(-50%) scaleX(.72);
    transform-origin: center;
    pointer-events: none;
    transition:
      opacity 160ms ease,
      transform 220ms cubic-bezier(.22, 1, .36, 1);
  }
  .mo-topbar__tab--active::after {
    background: var(--mo-reading-brand);
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
  .mo-topbar__tab:first-child {
    margin-left: 3px;
  }

  /* Snowflake：左栏贴边；正文+TOC 在 .main 居中（窄屏≈铺满，宽屏两侧对称）。 */
  .page {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    overflow-x: clip;
  }
  .content {
    flex: 0 1 auto;
    width: min(calc(var(--mo-content-max, 52rem) + 64px), 100%);
    max-width: calc(var(--mo-content-max, 52rem) + 64px);
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
    padding-top: var(--mo-reading-top);
    padding-left: 40px;
    padding-right: 24px;
  }
  article[role="main"] {
    max-width: var(--mo-content-max, 52rem);
    margin-right: 0;
  }
  .main {
    justify-content: center;
    min-width: 0;
  }
  .sidebar-drawer {
    flex: 0 0 var(--mo-sidebar-left);
    flex-basis: var(--mo-sidebar-left);
    width: var(--mo-sidebar-left);
    min-width: var(--mo-sidebar-left);
    max-width: var(--mo-sidebar-left);
  }
  /* 左栏贴顶栏下缘；首字与顶栏「开始使用」开字同左缘。 */
  .sidebar-container {
    width: calc(var(--mo-sidebar-left) - var(--mo-sidebar-inline, 23px));
    margin-left: var(--mo-sidebar-inline, 23px);
    padding-top: 0;
  }
  .sidebar-tree {
    margin-top: 0;
  }
  .toc-drawer {
    flex: 0 0 var(--mo-sidebar-right);
    flex-basis: var(--mo-sidebar-right);
    width: var(--mo-sidebar-right);
    min-width: var(--mo-sidebar-right);
    position: relative;
    right: auto;
    top: auto;
    height: auto;
    margin-left: 24px;
    margin-right: 0;
    padding: 0 8px 0 0;
  }
  .toc-drawer.no-toc {
    display: none;
    width: 0;
    min-width: 0;
    margin: 0;
  }
  body:not([data-theme="dark"]) .toc-drawer::before {
    display: none;
  }
  .toc-sticky {
    position: sticky;
    top: calc(var(--mo-topbar-h) + var(--mo-reading-top));
    height: auto;
    min-height: 0;
    max-height: calc(100vh - var(--mo-topbar-h) - var(--mo-reading-top) - 24px);
    margin-top: var(--mo-reading-top);
    padding-top: 0;
    padding-left: 0;
  }
}

@media (min-width: 1100px) {
  .toc-tree-container {
    padding-bottom: 0;
  }
  .toc-sticky::before {
    content: none;
    display: none;
  }
  /* 左侧分割线承担区域边界，从顶栏下方自然接续。 */
  body:not([data-theme="dark"]) .sidebar-drawer::after {
    top: 0;
    bottom: 34px;
    background: var(--mo-reading-rule);
    border-radius: 0;
  }

  /* 正文渐隐整段（含宽屏左偏移）都在文末「27d」一节。 */
}

/* 正文链接默认跟阅读正文色；悬停才品牌蓝（见文末收口） */
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link),
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):visited {
  color: var(--mo-reading-ink, var(--mo-text-body));
  -webkit-text-fill-color: var(--mo-reading-ink, var(--mo-text-body));
}

/* 锚点定位只负责滚动，不给标题铺一整块黄色高亮。 */
article[role="main"] :target {
  background: transparent;
  box-shadow: none;
}
article[role="main"] :target > :is(h1, h2, h3, h4, h5, h6),
article[role="main"] :is(h1, h2, h3, h4, h5, h6):target {
  background: transparent;
  box-shadow: none;
}

/* 左栏是“手册目录”：可读、稳定，当前项不用大面积蓝底。 */
.sidebar-tree a,
.sidebar-tree a:link,
.sidebar-tree a:visited,
.sidebar-tree a:active,
.bd-sidebar-primary a,
.bd-sidebar-primary a:link,
.bd-sidebar-primary a:visited,
.bd-sidebar-primary a:active,
nav.bd-links a,
nav.bd-links a:link,
nav.bd-links a:visited,
nav.bd-links a:active {
  position: relative;
  color: var(--mo-text-muted);
  font-size: var(--mo-type-ui);
  font-weight: 500;
  line-height: 22px;
  padding: 5px 32px 5px 14px;
  border-radius: 5px;
}
.sidebar-tree a:hover,
.sidebar-tree a:visited:hover,
.bd-sidebar-primary a:hover,
.bd-sidebar-primary a:visited:hover,
nav.bd-links a:hover,
nav.bd-links a:visited:hover {
  color: var(--mo-text-nav);
  background: rgba(50, 52, 55, .035);
}
.sidebar-tree a.current,
.sidebar-tree a.current:visited,
.sidebar-tree a.current:link,
.sidebar-tree .current-page > a.reference,
.sidebar-tree .current-page > a.reference:visited,
.sidebar-tree li.current > a,
.bd-sidebar-primary a.current,
.bd-sidebar-primary a.current:visited,
.bd-sidebar-primary a.current:link,
nav.bd-links a.current,
nav.bd-links a.current:visited {
  color: var(--mo-text-strong);
  background: transparent;
  font-weight: 600;
  box-shadow: none;
}
.sidebar-tree a.current::before,
.sidebar-tree .current-page > a.reference::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 2px;
  height: 13px;
  border-radius: 999px;
  background: var(--mo-reading-brand);
  transform: translateY(-50%);
}
.sidebar-tree li.current > summary,
.sidebar-tree summary,
.sidebar-tree summary:hover {
  color: var(--mo-text-subtle);
  font-size: var(--mo-type-ui);
  font-weight: 500;
}

/* 当前大类的首页作为第三层上下文入口呈现，避免左栏从二级目录突然开始。 */
.sidebar-tree .mo-sidebar-overview {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 4px;
  color: var(--mo-text-strong);
  font-weight: 500;
}
.sidebar-tree .current-page > .mo-sidebar-overview {
  color: var(--mo-text-strong);
}
.sidebar-tree > ul > li.toctree-l1.current.current-page > a.mo-sidebar-overview,
.sidebar-tree > ul > li.toctree-l1.current.current-page > a.mo-sidebar-overview:visited {
  color: var(--mo-text-strong);
}

/* 展开目录的层级节奏：缩进由链接自身承担，避免每层 ul 重复吃掉可用宽度。 */
.sidebar-tree li > ul {
  margin-left: 0;
}
.sidebar-tree li.toctree-l2 {
  margin: 1px 0;
}
.sidebar-tree li.toctree-l2 > a.reference {
  min-height: 34px;
  padding: 6px 32px 6px 14px;
  color: var(--mo-text-nav);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 22px;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: pretty;
}
.sidebar-tree li.toctree-l2 > label {
  right: 4px;
  width: 24px;
  height: 34px;
  border-radius: 4px;
}
.sidebar-tree li.toctree-l2 > label .icon svg {
  width: 10px;
  height: 10px;
  opacity: .62;
}
.sidebar-tree li.toctree-l2 > ul {
  margin: 1px 0 7px;
  padding: 0;
}
.sidebar-tree li.toctree-l3 > a.reference {
  min-height: 28px;
  padding: 4px 12px 4px 30px;
  color: var(--mo-text-subtle);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: pretty;
}
.sidebar-tree li.toctree-l4 > a.reference {
  padding-left: 46px;
  color: var(--mo-text-muted);
  font-size: 13px;
  font-weight: 400;
}
.sidebar-tree li.toctree-l5 > a.reference {
  min-height: 28px;
  padding: 4px 12px 4px 62px;
  color: var(--mo-text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: pretty;
}
.sidebar-tree li.toctree-l6 > a.reference {
  min-height: 28px;
  padding: 4px 12px 4px 78px;
  color: var(--mo-text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: pretty;
}
.sidebar-tree li.toctree-l2.current:not(.current-page) > a.reference {
  color: var(--mo-text-nav);
  font-weight: 500;
}
.sidebar-tree li.toctree-l3.current-page > a.reference,
.sidebar-tree li.toctree-l4.current-page > a.reference {
  color: var(--mo-text-strong);
  font-weight: 600;
}
.sidebar-tree li.toctree-l3.current-page > a.reference::before {
  left: 14px;
}
.sidebar-tree li.toctree-l4.current-page > a.reference::before {
  left: 30px;
}
.sidebar-tree li.toctree-l5.current-page > a.reference::before {
  left: 46px;
}
.sidebar-tree li.toctree-l6.current-page > a.reference::before {
  left: 62px;
}
.sidebar-tree a:focus {
  outline: none;
}
.sidebar-tree a:focus-visible {
  outline: 2px solid rgba(0, 74, 240, .28);
  outline-offset: -2px;
}
.sidebar-tree a:hover,
.sidebar-tree a:visited:hover {
  background: transparent;
}
body:not([data-theme="dark"]) .sidebar-tree li.toctree-l2 > a.reference:hover {
  color: var(--mo-text-strong);
}
body:not([data-theme="dark"]) .sidebar-tree li.toctree-l3 > a.reference:hover,
body:not([data-theme="dark"]) .sidebar-tree li.toctree-l4 > a.reference:hover {
  color: var(--mo-text-nav);
}
body[data-theme="dark"] .sidebar-tree li.toctree-l2 > a.reference {
  color: #c4c9d0;
}
body[data-theme="dark"] .sidebar-tree li.toctree-l3 > a.reference {
  color: #aab1ba;
}
body[data-theme="dark"] .sidebar-tree li.toctree-l4 > a.reference {
  color: #969da7;
}
body[data-theme="dark"] .sidebar-tree li.toctree-l5 > a.reference {
  color: #969da7;
}
body[data-theme="dark"] .sidebar-tree li.toctree-l6 > a.reference {
  color: #858e9b;
}
body[data-theme="dark"] .sidebar-tree li.toctree-l2.current-page > a.reference,
body[data-theme="dark"] .sidebar-tree li.toctree-l3.current-page > a.reference,
body[data-theme="dark"] .sidebar-tree li.toctree-l4.current-page > a.reference,
body[data-theme="dark"] .sidebar-tree li.toctree-l5.current-page > a.reference,
body[data-theme="dark"] .sidebar-tree li.toctree-l6.current-page > a.reference {
  color: #f3f4f6;
}

/* Claude 页内提纲：轻、静、与 H1 齐平；条目常规字重，当前项只加深。 */
.toc-title-container {
  margin: 0 0 12px;
  padding: 0;
  text-align: left;
}
.toc-title-container::before {
  content: "在此页面";
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #3f3f46;
  padding-bottom: 0;
  border-bottom: 0;
}
html[lang^="en"] .toc-title-container::before {
  content: "On this page";
}
.toc-tree {
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
  border-left: 0;
}
.toc-tree ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.toc-tree > ul > li > ul {
  padding-left: 0;
}
.toc-tree ul ul ul {
  padding-left: 12px;
}
.toc-tree li {
  margin: 0;
  padding: 0;
  text-align: left;
}
/* Furo 会把页面 H1 放进 TOC 首项；隐藏它，只留各节。 */
.toc-tree > ul > li:first-child > a.reference {
  display: none;
}
.toc-tree a {
  display: block;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  border-left: 0;
  padding: 6px 0;
  margin-left: 0;
  text-align: left;
  text-decoration: none;
}
.toc-tree a,
.toc-tree a:link,
.toc-tree a:visited {
  color: #71717a;
  -webkit-text-fill-color: #71717a;
  transition: color 0.12s ease;
}
.toc-tree a:hover,
.toc-tree a:visited:hover {
  color: #18181b;
  -webkit-text-fill-color: #18181b;
  text-decoration: none;
}
.toc-tree > ul > li > ul > li > a,
.toc-tree ul ul ul a {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  padding: 6px 0;
}
.toc-tree li.scroll-current > a.reference,
.toc-tree a.scroll-current {
  color: #18181b;
  -webkit-text-fill-color: #18181b;
  font-weight: 500;
  border-left: 0;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .toc-title-container::before {
  color: #a1a1aa;
  border-bottom: 0;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .toc-tree a,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .toc-tree a:link,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .toc-tree a:visited {
  color: #a1a1aa;
  -webkit-text-fill-color: #a1a1aa;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .toc-tree a:hover {
  color: #f4f4f5;
  -webkit-text-fill-color: #f4f4f5;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .toc-tree li.scroll-current > a.reference,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .toc-tree a.scroll-current {
  color: #f4f4f5;
  -webkit-text-fill-color: #f4f4f5;
  font-weight: 500;
}

/* 表格保持辅助信息尺度；阻止表格里的 p 继承正文 24px 行高。 */
article[role="main"] table,
article[role="main"] table th,
article[role="main"] table td,
article[role="main"] table p,
article[role="main"] table a {
  font-size: var(--mo-type-ui);
  line-height: 20px;
}
article[role="main"] table p {
  margin-bottom: 0;
}
/* Claude：TOC 悬停/当前项只用中性加深，不染品牌蓝。 */
.toc-tree a:hover,
.toc-tree a:focus,
.toc-tree a:focus-visible {
  color: #18181b;
  -webkit-text-fill-color: #18181b;
  text-decoration: none;
}
.toc-tree li.scroll-current > a.reference,
.toc-tree li.scroll-current > a.reference:link,
.toc-tree li.scroll-current > a.reference:visited,
.toc-tree li.scroll-current > a.reference:hover,
.toc-tree a.scroll-current,
.toc-tree a.scroll-current:link,
.toc-tree a.scroll-current:visited,
.toc-tree a.scroll-current:hover {
  color: #18181b;
  -webkit-text-fill-color: #18181b;
  font-weight: 500;
  border-left: 0;
}
.toc-tree,
.toc-tree ul,
.toc-tree li {
  border-left: 0;
}
body[data-theme="dark"] .toc-tree a:hover,
body[data-theme="dark"] .toc-tree a:focus,
body[data-theme="dark"] .toc-tree a:focus-visible {
  color: #f4f4f5;
  -webkit-text-fill-color: #f4f4f5;
}
body[data-theme="dark"] .toc-tree li.scroll-current > a.reference,
body[data-theme="dark"] .toc-tree a.scroll-current {
  color: #f4f4f5;
  -webkit-text-fill-color: #f4f4f5;
  font-weight: 500;
}

@media (max-width: 1099px) {
  article[role="main"] { padding-top: 34px; }
}


/* ============================================================
  19. 夜间阅读系统
      以一张连续的蓝灰夜色承载整页；层级由明度差建立，不再拼接多套黑色。
   ============================================================ */
body[data-theme="dark"],
html[data-mo-resolved-theme="dark"] body {
  --mo-dark-canvas: #191e24;
  --mo-dark-sidebar: #1b2128;
  --mo-dark-surface: #1e252f;
  --mo-dark-raised: #222a34;
  --mo-dark-code: #151b22;
  --mo-dark-border: #293246;
  --mo-dark-rule: #252d3a;
  --mo-dark-heading: #d7dde8;
  --mo-dark-strong: #c5cdda;
  --mo-dark-body: #adb7c7;
  --mo-dark-nav: #b8c1cf;
  --mo-dark-muted: #8996aa;
  --mo-dark-faint: #8090a5;
  --mo-dark-link: #5999f8;
  --mo-dark-link-hover: #82b5ff;
  --mo-dark-active-bg: rgba(89, 153, 248, .11);
  /* 阅读字色 token 同步切暗，避免侧栏域标题等仍吃浅色近黑 */
  --mo-text-heading: var(--mo-dark-heading);
  --mo-text-strong: var(--mo-dark-strong);
  --mo-text-body: var(--mo-dark-body);
  --mo-text-nav: var(--mo-dark-nav);
  --mo-text-subtle: var(--mo-dark-muted);
  --mo-text-muted: var(--mo-dark-faint);
  --mo-reading-ink: var(--mo-dark-body);
  --mo-reading-muted: var(--mo-dark-muted);
  --color-background-primary: var(--mo-dark-canvas);
  --color-background-secondary: var(--mo-dark-sidebar);
  --color-background-hover: var(--mo-dark-surface);
  --color-background-border: var(--mo-dark-border);
  --color-foreground-primary: var(--mo-dark-body);
  --color-foreground-secondary: var(--mo-dark-muted);
  --color-foreground-muted: var(--mo-dark-faint);
  --color-brand-primary: var(--mo-dark-link);
  --color-brand-content: var(--mo-dark-link);
  background: var(--mo-dark-canvas);
  color: var(--mo-dark-body);
  color-scheme: dark;
}

html[data-mo-resolved-theme="dark"] {
  background: #191e24;
  color-scheme: dark;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.page, .main, .content, article[role="main"], .toc-drawer, .toc-sticky) {
  background: var(--mo-dark-canvas);
  color: var(--mo-dark-body);
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.sidebar-drawer, .sidebar-container) {
  background: var(--mo-dark-sidebar);
  color: var(--mo-dark-body);
  border-color: var(--mo-dark-rule);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .sidebar-drawer {
  border-right: 0;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .toc-drawer {
  border-left: 0;
}

/* 顶栏与正文使用同一张底，只用细线建立结构。 */
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar {
  background: var(--mo-dark-canvas);
  color: var(--mo-dark-nav);
  box-shadow: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__logo--light {
  display: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__logo--dark {
  display: block;
  /* 暗色直接用 dark SVG，不再 padding / object-fit / filter 二次挤压 */
  padding: 0;
  object-fit: contain;
  filter: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar::after,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__tabs::before,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .toc-sticky::before,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .sidebar-drawer::after {
  background: var(--mo-dark-rule);
  border-color: var(--mo-dark-rule);
}
/* 暗色渐隐同样挪到文末「27d」一节，和亮色写在一起，颜色不会再各写各的。 */

/* 正文不是纯白字，而是有清晰层级的冷灰墨色。 */
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) article[role="main"],
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) article[role="main"] p,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) article[role="main"] li,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) article[role="main"] dd,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) article[role="main"] dt {
  color: var(--mo-dark-body);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] :is(h1, h2) {
  color: var(--mo-dark-heading);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] :is(h3, h4, h5, h6, strong, b) {
  color: var(--mo-dark-strong);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link) {
  color: var(--mo-dark-body, #adb7c7);
  -webkit-text-fill-color: var(--mo-dark-body, #adb7c7);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):hover {
  color: #6ea8ff;
  -webkit-text-fill-color: #6ea8ff;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .headerlink {
  color: var(--mo-dark-faint);
}

/* 顶部身份、导航与搜索。 */
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__docs {
  color: var(--mo-dark-muted);
  border-left-color: var(--mo-dark-border);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-product-switcher::before {
  background: var(--mo-dark-rule);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-product-pill, .mo-version-pill) {
  color: var(--mo-dark-nav);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-product-pill:hover, .mo-version-pill:hover) {
  color: var(--mo-dark-heading);
  background: var(--mo-dark-surface);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-product-pill__chevron {
  color: var(--mo-dark-muted);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-product-menu, .mo-version-menu) {
  background: var(--mo-dark-surface);
  border-color: var(--mo-dark-border);
  /* 投影跟浅色一套同一个尺度（4/14px）。原来是 18/44px，暗色下那圈大光晕
     把菜单托得离按钮更远，看着更像是飘过来的另一个物件。 */
  box-shadow: 0 4px 14px rgba(0, 0, 0, .36), 0 1px 2px rgba(0, 0, 0, .3);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-version-menu__heading) {
  color: var(--mo-dark-faint);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-product-menu__item, .mo-version-menu__item) {
  color: var(--mo-dark-nav);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-product-menu__item:hover, .mo-version-menu__item:hover) {
  color: var(--mo-dark-heading);
  background: var(--mo-dark-raised);
}
/* 当前项不填底、不变蓝——右边那个灰对勾已经说清楚了，见 .mo-product-menu 那节 */
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-product-menu__item.is-active, .mo-product-menu__item.is-active:hover) {
  color: var(--mo-dark-nav);
  background: transparent;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-version-menu__item.is-active {
  color: var(--mo-dark-link);
  background: var(--mo-dark-active-bg);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__tab, .mo-topbar__tab:link, .mo-topbar__tab:visited) {
  color: var(--mo-dark-nav);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__tab:hover, .mo-topbar__tab:visited:hover) {
  color: var(--mo-dark-heading);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__tab--active, .mo-topbar__tab--active:link, .mo-topbar__tab--active:visited) {
  color: var(--mo-dark-heading);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__tab--active::after {
  background: var(--mo-dark-heading, #d7dde8);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__search {
  border: 0;
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__search:hover {
  background: rgba(255, 255, 255, .11);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__search:focus-within {
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 3px rgba(107, 140, 255, .2);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__search input,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__search input:hover,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__search input:focus {
  color: #e8edf5;
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__search input::placeholder,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-topbar__search-icon {
  color: #9aa3b2;
}

/* 左栏保留“手册目录”的安静层级，当前项只留下品牌蓝锚点。 */
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.sidebar-tree .caption, .sidebar-tree p.caption, .sidebar-tree summary) {
  color: var(--mo-dark-strong);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.sidebar-tree a, .sidebar-tree a:link, .sidebar-tree a:visited, .sidebar-tree .reference) {
  color: var(--mo-dark-muted);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.sidebar-tree a:hover, .sidebar-tree a:visited:hover, .sidebar-tree .reference:hover) {
  color: var(--mo-dark-nav);
  background: var(--mo-dark-surface);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.sidebar-tree li.toctree-l2 > a.reference, .sidebar-tree .mo-sidebar-overview) {
  color: var(--mo-dark-nav);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree li.toctree-l3 > a.reference {
  color: var(--mo-dark-muted);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree li.toctree-l4 > a.reference {
  color: var(--mo-dark-faint);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.sidebar-tree a.current, .sidebar-tree .current-page > a.reference, .sidebar-tree li.current > a) {
  color: var(--mo-dark-strong);
  background: transparent;
  box-shadow: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree > ul > li.toctree-l1.current.current-page > a.mo-sidebar-overview {
  color: var(--mo-dark-strong);
  background: transparent;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree a.current::before,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree .current-page > a.reference::before {
  background: var(--mo-dark-link);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .sidebar-tree label:hover {
  color: var(--mo-dark-nav);
  background: var(--mo-dark-surface);
}

/* 右栏比正文更轻，但不再灰暗发虚。 */
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .toc-title-container::before {
  color: var(--mo-dark-faint);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.toc-tree a, .toc-tree a:link, .toc-tree a:visited) {
  color: var(--mo-dark-muted);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.toc-tree a:hover, .toc-tree a:focus, .toc-tree a:focus-visible) {
  color: var(--mo-dark-nav);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.toc-tree li.scroll-current > a.reference, .toc-tree a.scroll-current) {
  color: var(--mo-dark-link);
}

/* 表格、代码和信息卡片全部回到同一套夜色层级。 */
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(article[role="main"] table, .rst-content table) {
  color: var(--mo-dark-body);
  background: transparent;
  border-color: var(--mo-dark-border);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(article[role="main"] table thead th, .rst-content table thead th) {
  color: var(--mo-dark-strong);
  background: var(--mo-dark-surface);
  border-color: var(--mo-dark-border);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(article[role="main"] table tbody td, .rst-content table tbody td) {
  color: var(--mo-dark-body);
  background: var(--mo-dark-canvas);
  border-color: var(--mo-dark-border);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(article[role="main"] table tbody tr:hover td, .rst-content table tbody tr:hover td) {
  background: var(--mo-dark-surface);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.highlight, .highlight pre, code.literal, p code, li code) {
  color: var(--mo-dark-strong);
  background: var(--mo-dark-code);
  border-color: var(--mo-dark-border);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .admonition {
  color: var(--mo-dark-body) !important;
  background: var(--mo-dark-surface) !important;
  border-color: var(--mo-dark-border) !important;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .admonition > * {
  color: var(--mo-dark-body) !important;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .admonition > .admonition-title {
  color: var(--mo-dark-strong) !important;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .sd-card {
  color: var(--mo-dark-body);
  background: var(--mo-dark-surface);
  border-color: var(--mo-dark-border);
  box-shadow: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .sd-card:hover {
  background: var(--mo-dark-raised);
  border-color: #3b4a61;
}

/* 次级交互也使用同一套表面，避免滚到页面下方又出现 GitHub 黑。 */
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-code-collapsed::after {
  background: linear-gradient(
    to bottom,
    rgba(21, 27, 34, 0) 0%,
    rgba(21, 27, 34, .72) 56%,
    var(--mo-dark-code) 100%
  );
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-code-expand-btn, .mo-code-close-btn) {
  color: var(--mo-dark-muted);
  background: var(--mo-dark-surface);
  border-color: var(--mo-dark-border);
  box-shadow: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-code-expand-btn:hover, .mo-code-close-btn:hover) {
  color: var(--mo-dark-heading);
  background: var(--mo-dark-raised);
  border-color: #3b4a61;
  box-shadow: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-code-fullscreen-btn {
  color: var(--mo-dark-muted);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-code-fullscreen-btn:hover {
  color: var(--mo-dark-heading);
  background: var(--mo-dark-surface);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-code-modal {
  color: var(--mo-dark-body);
  background: var(--mo-dark-canvas);
  border: 1px solid var(--mo-dark-border);
  box-shadow: 0 24px 64px rgba(5, 10, 16, .58);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-sidebar-feedback, .mo-sidebar-edit) {
  border-color: var(--mo-dark-border);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-sidebar-feedback-title {
  color: var(--mo-dark-strong);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-sidebar-feedback-btn, .mo-sidebar-feedback-detail textarea) {
  color: var(--mo-dark-body);
  background: var(--mo-dark-surface);
  border-color: var(--mo-dark-border);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-sidebar-feedback-btn:hover {
  color: var(--mo-dark-strong);
  background: var(--mo-dark-raised);
  border-color: #3b4a61;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-sidebar-feedback-btn.active {
  color: var(--mo-dark-link);
  background: var(--mo-dark-active-bg);
  border-color: var(--mo-dark-link);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-sidebar-edit a, .mo-sidebar-edit a:visited) {
  color: var(--mo-dark-muted);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-sidebar-edit a:hover {
  color: var(--mo-dark-link-hover);
}

/* ============================================================
  20. 日升月落主题开关
      图标有方向感；页面只做克制溶解，不移动、不缩放、不闪黑。
   ============================================================ */
.mo-topbar__actions .theme-toggle::before {
  content: none !important;
  display: none !important;
}
.mo-topbar__actions .theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #536276;
  box-shadow: none;
  transition: background-color 160ms ease, color 160ms ease;
}
.mo-topbar__actions .theme-toggle:hover {
  color: #17202b;
  background: rgba(15, 23, 42, .055);
}
.mo-topbar__actions .theme-toggle:active {
  color: #17202b;
  background: rgba(15, 23, 42, .085);
}
.mo-topbar__actions .theme-toggle:focus-visible {
  outline: 2px solid rgba(0, 74, 240, .38);
  outline-offset: 2px;
}
.theme-toggle[data-mo-theme-enhanced="true"] {
  display: grid;
  place-items: center;
}
.theme-toggle[data-mo-theme-enhanced="true"]::before {
  content: none !important;
  display: none !important;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .theme-toggle[data-mo-theme-enhanced="true"]:focus-visible {
  outline: 2px solid var(--mo-dark-link) !important;
  outline-offset: 2px;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mobile-header {
  color: var(--mo-dark-nav);
  background: var(--mo-dark-canvas);
  border-color: var(--mo-dark-border);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__actions .theme-toggle {
  color: #a9b5c8;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__actions .theme-toggle:hover {
  color: #eef3f9;
  background: rgba(255, 255, 255, .065);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__actions .theme-toggle:active {
  color: #ffffff;
  background: rgba(255, 255, 255, .09);
}
.mo-theme-celestial,
.mo-theme-celestial svg {
  display: block !important;
  width: 20px;
  height: 20px;
}
.theme-toggle[data-mo-theme-enhanced="true"] .mo-theme-celestial svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  color: inherit !important;
}
.mo-theme-celestial {
  position: relative;
  view-transition-name: none;
}
.theme-toggle.mo-theme-transition-source .mo-theme-celestial {
  view-transition-name: mo-theme-celestial;
}
.mo-theme-celestial svg {
  overflow: hidden;
}
.mo-theme-celestial__sun,
.mo-theme-celestial__moon {
  transform-box: fill-box;
  transform-origin: center;
  transition-property: transform, opacity;
  will-change: transform, opacity;
}
.mo-theme-celestial__sun {
  opacity: 1;
  transform: translateY(0) rotate(0);
}
.mo-theme-celestial__moon {
  opacity: 0;
  transform: translateY(8px) rotate(10deg);
}
html[data-mo-resolved-theme="light"] .mo-theme-celestial__sun {
  opacity: 1;
  transform: translateY(0) rotate(0);
  transition-duration: 520ms, 300ms;
  transition-timing-function: cubic-bezier(.2, .55, .25, 1), ease;
  transition-delay: 180ms, 180ms;
}
html[data-mo-resolved-theme="light"] .mo-theme-celestial__moon {
  opacity: 0;
  transform: translateY(8px) rotate(10deg);
  transition-duration: 300ms, 240ms;
  transition-timing-function: cubic-bezier(.4, 0, .6, 1), ease;
  transition-delay: 0ms, 0ms;
}
html[data-mo-resolved-theme="dark"] .mo-theme-celestial__sun {
  opacity: 0;
  transform: translateY(8px) rotate(10deg);
  transition-duration: 300ms, 240ms;
  transition-timing-function: cubic-bezier(.4, 0, .6, 1), ease;
  transition-delay: 0ms, 0ms;
}
html[data-mo-resolved-theme="dark"] .mo-theme-celestial__moon {
  opacity: 1;
  transform: translateY(0) rotate(0);
  transition-duration: 520ms, 300ms;
  transition-timing-function: cubic-bezier(.2, .55, .25, 1), ease;
  transition-delay: 180ms, 180ms;
}

html.mo-theme-view-transitioning .mo-theme-celestial__sun,
html.mo-theme-view-transitioning .mo-theme-celestial__moon {
  transition: none !important;
}
::view-transition-old(root) {
  animation: mo-theme-out 420ms cubic-bezier(.4, 0, .6, 1) 40ms both;
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  animation: mo-theme-in 600ms cubic-bezier(.2, .5, .25, 1) 100ms both;
  mix-blend-mode: normal;
}
::view-transition-old(mo-theme-celestial) {
  animation: mo-celestial-set 300ms cubic-bezier(.4, 0, .6, 1) both;
  mix-blend-mode: normal;
  transform-origin: center;
}
::view-transition-new(mo-theme-celestial) {
  animation: mo-celestial-rise 520ms cubic-bezier(.2, .55, .25, 1) 180ms both;
  mix-blend-mode: normal;
  transform-origin: center;
}
@keyframes mo-theme-out {
  0%, 10% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes mo-theme-in {
  0%, 12% { opacity: 0; }
  45% { opacity: .42; }
  100% { opacity: 1; }
}
@keyframes mo-celestial-set {
  0% { opacity: 1; transform: translateY(0) rotate(0); }
  52% { opacity: .72; transform: translateY(2px) rotate(1deg); }
  100% { opacity: 0; transform: translateY(7px) rotate(5deg); }
}
@keyframes mo-celestial-rise {
  0%, 10% {
    opacity: 0;
    transform: translateY(7px) rotate(-5deg) scale(.96);
  }
  48% {
    opacity: .55;
    transform: translateY(3px) rotate(-2deg) scale(.985);
  }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

html.mo-theme-view-transitioning .theme-toggle,
html.mo-theme-fallback-transitioning .theme-toggle {
  pointer-events: none;
}

/* 不支持 View Transition 的浏览器，退化为同样克制的实时颜色过渡。 */
html.mo-theme-fallback-transitioning body,
html.mo-theme-fallback-transitioning :is(
  .page, .main, .content, article[role="main"],
  .mo-topbar, .sidebar-drawer, .sidebar-container,
  .toc-drawer, .toc-sticky, .mo-topbar__search input
) {
  transition:
    background-color 620ms cubic-bezier(.2, .5, .25, 1),
    color 480ms ease,
    border-color 480ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .mo-theme-celestial__sun,
  .mo-theme-celestial__moon {
    transition: none;
  }
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-old(mo-theme-celestial),
  ::view-transition-new(mo-theme-celestial) {
    animation: none;
  }
}


/* ============================================================
  22. 字体灰度
      用系统 UI / 苹方的连续字重取代 Inter 与中文回退的硬切换；
      通过更完整的字号与行高获得清晰度，不再用小字号和纯黑制造锐度。
      字色仅定义浅色基线；暗色由夜间阅读系统覆写 --mo-text-*。
   ============================================================ */
:root {
  --mo-font-sans: "Geist", "MiSans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", system-ui, "Segoe UI", "Microsoft YaHei", sans-serif;
  /* 字号阶以 §18 为准；此处只收口非纯黑字色。 */
  --mo-text-heading: #111318;
  --mo-text-strong: #181b20;
  --mo-text-body: #25282d;
  --mo-text-nav: #2c2f34;
  --mo-text-subtle: #42474f;
  --mo-text-muted: #565d66;
  --mo-reading-ink: var(--mo-text-body);
  --mo-reading-muted: var(--mo-text-muted);
}
/* 暗色下 :root 浅色字色不得回灌；html / body 双挂，覆盖 auto→dark */
html[data-mo-resolved-theme="dark"],
body[data-theme="dark"] {
  --mo-text-heading: #d7dde8;
  --mo-text-strong: #c5cdda;
  --mo-text-body: #adb7c7;
  --mo-text-nav: #b8c1cf;
  --mo-text-subtle: #8996aa;
  --mo-text-muted: #8090a5;
  --mo-reading-ink: var(--mo-text-body);
  --mo-reading-muted: var(--mo-text-muted);
}

html,
body,
button,
input,
textarea,
select {
  font-family: var(--mo-font-sans);
  font-optical-sizing: auto;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures contextual;
  text-rendering: auto;
}

.mo-topbar__tab,
.mo-topbar__tab:link,
.mo-topbar__tab:visited {
  line-height: 18px;
  letter-spacing: 0;
}
.mo-topbar__docs {
  font-family: var(--mo-font-sans);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0;
}

.sidebar-tree li.toctree-l2 > a.reference {
  font-size: 14px;
  line-height: 22px;
}
.sidebar-tree li.toctree-l3 > a.reference,
.sidebar-tree li.toctree-l4 > a.reference {
  font-size: 13px;
  line-height: 20px;
}
.toc-tree a,
.toc-tree > ul > li > ul > li > a {
  font-size: 13px;
  line-height: 20px;
}
.toc-tree ul ul ul a {
  font-size: 12px;
  line-height: 19px;
}

article[role="main"] table,
article[role="main"] table th,
article[role="main"] table td,
article[role="main"] table p,
article[role="main"] table a {
  font-size: 14px;
  line-height: 21px;
}


/* ============================================================
  23. 注意力架构
      当前状态按层级分工：顶栏只用文字对比、左栏保留一次品牌锚点、
      右栏只用中性短线。结构线退后，正文与任务入口回到前景。
   ============================================================ */
:root {
  --mo-reading-rule: rgba(15, 23, 42, .065);
  --mo-nav-hover-surface: #f7f8fa;
  --mo-sidebar-active-surface: #f4f6f8;
  --mo-motion-hover: 150ms;
  --mo-motion-color: 180ms;
  --mo-motion-state: 190ms;
  --mo-motion-marker: 210ms;
  --mo-motion-ease: cubic-bezier(.2, .65, .3, 1);
}

/* 所有长线只表达结构，不承担“当前项”的强调。 */
.mo-topbar::after,
.mo-topbar__tabs::before,
.sidebar-drawer::after {
  background: var(--mo-reading-rule);
}
.mo-topbar__docs {
  border-left-color: var(--mo-reading-rule);
}
.mo-product-switcher::before {
  background-color: var(--mo-reading-rule);
}
.toc-sticky::before {
  display: none;
}

/* 顶层定位：字色负责层级，居中的定位点归属于栏目自身，不依赖左右位置。 */
.mo-topbar__tab,
.mo-topbar__tab:link,
.mo-topbar__tab:visited {
  position: relative;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  color: #41464e;
  background: transparent;
  font-weight: 500;
  letter-spacing: 0;
  transition: color var(--mo-motion-color) ease;
}
.mo-topbar__tab::before {
  content: "";
  position: absolute;
  left: 50%;
  top: auto;
  bottom: -6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mo-reading-brand);
  opacity: 0;
  transform: translateX(-50%) scale(.55);
  transform-origin: center;
  transition:
    opacity var(--mo-motion-color) ease,
    transform var(--mo-motion-marker) var(--mo-motion-ease);
}
.mo-topbar__tab:hover,
.mo-topbar__tab:visited:hover {
  color: var(--mo-text-strong);
  background: transparent;
  transition-duration: var(--mo-motion-hover);
}
.mo-topbar__tab--active,
.mo-topbar__tab--active:link,
.mo-topbar__tab--active:visited,
.mo-topbar__tab--active:hover {
  color: var(--mo-text-heading);
  background: transparent;
  font-weight: 600;
}
.mo-topbar__tab--active::before {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.mo-topbar__tab::after {
  content: none;
  display: none;
}
.mo-topbar__tab:focus-visible {
  outline: 2px solid rgba(0, 74, 240, .32);
  outline-offset: 2px;
}
@media (min-width: 1100px) {
  .mo-topbar__tabs {
    gap: 12px;
  }
}

/* 左栏定位：只有真正的当前页获得柔和底色；祖先路径保持安静。 */
.sidebar-tree a.reference,
.sidebar-tree .mo-sidebar-overview {
  border-radius: 8px;
  transition:
    color var(--mo-motion-color) ease,
    background-color var(--mo-motion-state) ease;
}
.sidebar-tree li:not(.current-page) > a.reference:hover:not(.current),
.sidebar-tree .mo-sidebar-overview:hover {
  color: var(--mo-text-strong);
  background: var(--mo-nav-hover-surface);
  transition-duration: var(--mo-motion-hover);
}
.sidebar-tree li.current:not(.current-page) > a.reference {
  color: var(--mo-text-nav);
  background: transparent;
  box-shadow: none;
}
.sidebar-tree a.current,
.sidebar-tree a.current:link,
.sidebar-tree a.current:visited,
.sidebar-tree .current-page > a.reference,
.sidebar-tree .current-page > a.reference:visited,
.sidebar-tree > ul > li.toctree-l1.current.current-page > a.mo-sidebar-overview,
.sidebar-tree > ul > li.toctree-l1.current.current-page > a.mo-sidebar-overview:visited {
  color: var(--mo-text-strong);
  background: var(--mo-sidebar-active-surface);
  border-radius: 8px;
  font-weight: 600;
  box-shadow: none;
}
.sidebar-tree a.current::before,
.sidebar-tree .current-page > a.reference::before {
  width: 2px;
  height: 14px;
  background: var(--mo-reading-brand);
  opacity: 1;
  transform: translateY(-50%) scaleY(1);
  transform-origin: center;
  transition:
    opacity var(--mo-motion-color) ease,
    transform var(--mo-motion-marker) var(--mo-motion-ease);
}
.sidebar-tree li.toctree-l2 > label .icon svg {
  opacity: .44;
}

/* 页内提纲：不再用蓝字抢正文；当前章节只获得中性短线与墨色。 */
.toc-tree a,
.toc-tree a:link,
.toc-tree a:visited {
  position: relative;
  padding-left: 14px;
  color: #666c75;
  transition: color var(--mo-motion-state) ease;
}
.toc-tree > ul > li > ul > li > a {
  font-weight: 500;
}
.toc-tree a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 18px;
  border-radius: 999px;
  background: var(--mo-text-strong);
  opacity: 0;
  transform: translateY(-50%) scaleY(.55);
  transform-origin: center;
  pointer-events: none;
  transition: none;
}
.toc-tree a:hover,
.toc-tree a:focus {
  color: var(--mo-text-strong);
  transition-duration: var(--mo-motion-hover);
}
.toc-tree li.scroll-current > a.reference,
.toc-tree li.scroll-current > a.reference:link,
.toc-tree li.scroll-current > a.reference:visited,
.toc-tree li.scroll-current > a.reference:hover,
.toc-tree a.scroll-current,
.toc-tree a.scroll-current:link,
.toc-tree a.scroll-current:visited,
.toc-tree a.scroll-current:hover {
  color: var(--mo-text-strong);
  font-weight: 400;
}
.toc-tree > ul > li > ul > li.scroll-current > a.reference {
  font-weight: 500;
}
.toc-tree li.scroll-current > a.reference::before,
.toc-tree a.scroll-current::before {
  opacity: 1;
  transform: translateY(-50%) scaleY(1);
  animation: mo-toc-marker-in 180ms var(--mo-motion-ease) both;
}
@keyframes mo-toc-marker-in {
  from { opacity: 0; transform: translateY(-50%) scaleY(.55); }
  to { opacity: 1; transform: translateY(-50%) scaleY(1); }
}
.toc-tree a:focus-visible {
  outline: 2px solid rgba(0, 74, 240, .32);
  outline-offset: 2px;
}

/* 表格是辅助信息，不再用深色块、重边和外圈同时争抢注意力。 */
body:not([data-theme="dark"]) article[role="main"] table,
body:not([data-theme="dark"]) .rst-content table {
  border-color: var(--mo-reading-rule);
  box-shadow: none;
}
body:not([data-theme="dark"]) article[role="main"] table thead th,
body:not([data-theme="dark"]) .rst-content table thead th {
  background: #f5f7f9;
  border-bottom-color: #e7ebf0;
}
body:not([data-theme="dark"]) article[role="main"] table tbody td,
body:not([data-theme="dark"]) .rst-content table tbody td {
  border-bottom-color: #eef1f4;
}
body:not([data-theme="dark"]) article[role="main"] :is(strong, b) {
  color: inherit;
}

/* 暗色继续使用同一张蓝灰夜色；状态层级与亮色完全同构。 */
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) {
  --mo-dark-rule: rgba(255, 255, 255, .06);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__tab, .mo-topbar__tab:link, .mo-topbar__tab:visited) {
  color: var(--mo-dark-nav);
  background: transparent;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__tab:hover, .mo-topbar__tab:visited:hover) {
  color: var(--mo-dark-heading);
  background: transparent;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__tab--active, .mo-topbar__tab--active:link, .mo-topbar__tab--active:visited, .mo-topbar__tab--active:hover) {
  color: #f3f6fb;
  background: transparent;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__tab--active::before {
  background: var(--mo-dark-link);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__tab:focus-visible {
  outline-color: rgba(89, 153, 248, .52);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree a.reference:hover {
  background: rgba(255, 255, 255, .045);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(
    .sidebar-tree a.current,
    .sidebar-tree .current-page > a.reference,
    .sidebar-tree > ul > li.toctree-l1.current.current-page > a.mo-sidebar-overview
  ) {
  color: var(--mo-dark-strong);
  background: rgba(255, 255, 255, .065);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree li.current:not(.current-page) > a.reference {
  background: transparent;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.sidebar-tree a.current::before, .sidebar-tree .current-page > a.reference::before) {
  background: var(--mo-dark-link);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.toc-tree a, .toc-tree a:link, .toc-tree a:visited) {
  color: var(--mo-dark-muted);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.toc-tree a:hover, .toc-tree a:focus) {
  color: var(--mo-dark-nav);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.toc-tree li.scroll-current > a.reference, .toc-tree a.scroll-current) {
  color: var(--mo-dark-heading);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .toc-tree li.scroll-current > a.reference::before,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .toc-tree a.scroll-current::before {
  background: var(--mo-dark-heading);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .toc-tree a:focus-visible {
  outline-color: rgba(89, 153, 248, .52);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(article[role="main"] table, .rst-content table) {
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  :is(
    .mo-topbar__tab,
    .mo-topbar__tab::before,
    .sidebar-tree a.reference,
    .sidebar-tree a.reference::before,
    .toc-tree a,
    .toc-tree a::before
  ) {
    transition: none;
  }
  .toc-tree li.scroll-current > a.reference::before,
  .toc-tree a.scroll-current::before {
    animation: none;
  }
}


/* ============================================================
  24. 导航字重
      正文/标题字号字重以 §18 为准；此处只约束顶栏与侧栏字重。
   ============================================================ */
article[role="main"] :is(strong, b) {
  font-weight: 600;
}
article[role="main"] table,
article[role="main"] table th,
article[role="main"] table td,
article[role="main"] table p,
article[role="main"] table a {
  font-weight: 400;
  line-height: 22px;
}

.mo-topbar__tab,
.mo-topbar__tab:link,
.mo-topbar__tab:visited,
.mo-topbar__tab--active,
.mo-topbar__tab--active:link,
.mo-topbar__tab--active:visited,
.mo-topbar__tab--active:hover {
  font-weight: 500;
}

.sidebar-tree a.reference,
.sidebar-tree .mo-sidebar-overview,
.sidebar-tree li.toctree-l2 > a.reference,
.sidebar-tree li.toctree-l3 > a.reference,
.sidebar-tree li.toctree-l4 > a.reference {
  font-weight: 400;
}
.sidebar-tree a.current,
.sidebar-tree .current-page > a.reference,
.sidebar-tree > ul > li.toctree-l1.current.current-page > a.mo-sidebar-overview {
  font-weight: 600;
}


/* ============================================================
  25. 顶栏定位线
      顶栏当前状态直接成为结构分割线的一段，不再悬挂独立圆点。
   ============================================================ */
.mo-topbar__docs {
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  color: #667085;
}
.mo-topbar__tab,
.mo-topbar__tab:link,
.mo-topbar__tab:visited {
  line-height: 20px;
}
.toc-tree ul ul ul a {
  font-size: 13px;
  line-height: 20px;
}

/* 顶栏只保留排印与静态深灰短线：无品牌色、无渐变、无位移动画。 */
.mo-topbar__tabs {
  align-items: stretch;
}
.mo-topbar__tab,
.mo-topbar__tab:link,
.mo-topbar__tab:visited {
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #505050;
  background: transparent;
  font-weight: 500;
  transition: color 140ms ease;
}
.mo-topbar__tab::before {
  content: none;
  display: none;
}
.mo-topbar__tab::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 0;
  background: transparent;
  opacity: 1;
  transform: none;
  transition: none;
  pointer-events: none;
}
.mo-topbar__tab:hover,
.mo-topbar__tab:visited:hover {
  color: #252525;
  background: transparent;
}
.mo-topbar__tab--active,
.mo-topbar__tab--active:link,
.mo-topbar__tab--active:visited,
.mo-topbar__tab--active:hover {
  color: #252525;
  background: transparent;
  font-weight: 500;
}
.mo-topbar__tab--active::after {
  background: #252525;
}

@media (min-width: 1100px) {
  .mo-topbar__tabs {
    gap: 24px;
  }
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__tab, .mo-topbar__tab:link, .mo-topbar__tab:visited) {
  color: var(--mo-dark-muted);
  background: transparent;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__tab:hover, .mo-topbar__tab:visited:hover) {
  color: var(--mo-dark-nav);
  background: transparent;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(
    .mo-topbar__tab--active,
    .mo-topbar__tab--active:link,
    .mo-topbar__tab--active:visited,
    .mo-topbar__tab--active:hover
  ) {
  color: var(--mo-dark-heading);
  background: transparent;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__tab--active::after {
  background: var(--mo-dark-heading);
}

@media (max-width: 640px) {
  article[role="main"],
  article[role="main"] p {
    font-size: 16px;
    font-weight: 400;
    line-height: 27px;
  }
  article[role="main"] h1 + p {
    font-size: 17px;
    font-weight: 400;
    line-height: 28px;
  }
  article h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 40px;
  }
  article h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 34px;
  }
  article h3 {
    font-size: 19px;
    font-weight: 600;
    line-height: 28px;
  }
}


/* ============================================================
  26. 搜索入口锁定 —— 与侧栏/主题按钮同圆角体系的软底圆角矩形
   ============================================================ */
.mo-topbar__tools {
  gap: 8px;
}
.mo-topbar__search {
  position: relative;
  box-sizing: border-box;
  width: 260px;
  height: var(--mo-control-h);
  border: 0;
  border-radius: var(--mo-control-radius);
  background: var(--mo-control-fill);
  box-shadow: none;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.mo-topbar__search:hover {
  background: var(--mo-control-fill-hover);
}
.mo-topbar__search:focus-within {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 74, 240, .14);
}
.mo-topbar__search-icon {
  left: 11px;
  width: 14px;
  height: 14px;
  color: var(--mo-control-mute);
}
.mo-topbar__search:hover .mo-topbar__search-icon,
.mo-topbar__search:focus-within .mo-topbar__search-icon {
  color: #6e7480;
}
.mo-topbar__search input {
  height: 100%;
  padding: 0 12px 0 34px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--mo-text-nav, #101215);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: normal;
  caret-color: var(--mo-primary);
  outline: none;
  box-shadow: none;
}
.mo-topbar__search input::placeholder {
  color: var(--mo-control-mute);
  opacity: 1;
}
.mo-topbar__search input:hover,
.mo-topbar__search input:focus,
.mo-topbar__search input:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.mo-topbar__actions .theme-toggle {
  flex-basis: var(--mo-control-h) !important;
  width: var(--mo-control-h) !important;
  height: var(--mo-control-h) !important;
  border-radius: var(--mo-control-radius) !important;
  color: var(--mo-control-mute) !important;
}
.mo-topbar__actions .theme-toggle:hover {
  background: var(--mo-control-fill) !important;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__search {
  border: 0;
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__search:hover {
  background: rgba(255, 255, 255, .11);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__search:focus-within {
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 3px rgba(107, 140, 255, .2);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__search input,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .mo-topbar__search input:hover,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__search input:focus, .mo-topbar__search input:focus-visible) {
  color: #e8edf5;
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__search input::placeholder, .mo-topbar__search-icon) {
  color: #9aa3b2;
}

@media (max-width: 1100px) {
  .mo-topbar__search { width: 220px; }
}
@media (max-width: 960px) {
  .mo-topbar__search { width: 190px; }
}
@media (max-width: 640px) {
  .mo-topbar__search { width: 150px; }
}


/* ============================================================
  27. 左侧目录：单分支上下文
      根页只预览第一章；深层页面只展开当前章。组标题是普通路由，
      不是可折叠控件，因此不需要箭头、数量或展开动画。
   ============================================================ */
html[data-mo-grouped-sidebar] .sidebar-tree li.has-children > label,
html[data-mo-grouped-sidebar] .sidebar-tree li.has-children > input.toctree-checkbox {
  display: none;
}

html[data-mo-grouped-sidebar] .sidebar-tree li.has-children > ul {
  display: none;
}

.sidebar-tree > ul > li.toctree-l1.current > ul,
.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2.mo-sidebar-exposed > ul,
.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2.current > ul {
  display: block;
}

.sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 19, 24, .16) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 7px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(17, 19, 24, .16);
  background-clip: content-box;
  border: 2px solid transparent;
  border-radius: 999px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(17, 19, 24, .28);
}

.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 {
  margin: 1px 0;
}

.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2:first-child {
  margin-top: 4px;
}

.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > a.reference {
  min-height: 34px;
  padding: 6px 12px 6px 14px;
  color: #30343a;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: 0;
}

.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > a.reference:hover {
  color: #111318;
  background: transparent;
}

.sidebar-tree .mo-sidebar-section-heading {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px 6px 14px;
  color: #17191d;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  text-wrap: pretty;
}

.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > ul {
  margin: 1px 0 4px;
  padding: 0;
}

.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > ul > li.toctree-l3 {
  margin: 0;
}

.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > ul > li.toctree-l3 > a.reference {
  min-height: 30px;
  padding: 5px 12px 5px 28px;
  color: #4a4f56;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
}

.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > ul > li.toctree-l3 > a.reference:hover {
  color: #111318;
  background: #f7f8fa;
}

.sidebar-tree > ul > li.toctree-l1.current > ul > li.current:not(.current-page) > a.reference {
  color: #30343a;
  background: transparent;
}

.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > ul >
  li.toctree-l3.current-page > a.reference,
.sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > ul >
  li.toctree-l3.current-page > a.reference:visited {
  color: #111318;
  background: #edf0f3;
  font-weight: 600;
}

html[data-mo-grouped-sidebar] .sidebar-tree a.current::before,
html[data-mo-grouped-sidebar] .sidebar-tree .current-page > a.reference::before {
  content: none;
  display: none;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > a.reference {
  color: #d5dae1;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > a.reference:hover {
  color: #ffffff;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree .mo-sidebar-section-heading {
  color: #f3f5f7;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > ul > li.toctree-l3 > a.reference {
  color: #b7bec8;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > ul > li.toctree-l3 > a.reference:hover {
  color: #f4f6f8;
  background: rgba(255, 255, 255, .05);
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > ul >
  li.toctree-l3.current-page > a.reference {
  color: #ffffff;
  background: rgba(255, 255, 255, .085);
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .sidebar-scroll {
  scrollbar-color: rgba(255, 255, 255, .20) transparent;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, .20);
}

@media (max-width: 960px) {
  .sidebar-tree li.toctree-l2 > a.reference {
    min-height: 40px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .sidebar-tree > ul > li.toctree-l1.current > ul > li.toctree-l2 > ul > li.toctree-l3 > a.reference {
    min-height: 40px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}



/* ============================================================
  15. 首页 · hero 按钮 / 流程行 / 常见任务
   ============================================================ */
.mo-hero-actions {
  display: flex;
  gap: 12px;
  margin: 1.5rem 0 3rem;
}
.mo-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mo-btn--primary {
  background: var(--mo-primary, #004af0);
  color: #fff;
  -webkit-text-fill-color: #fff;
}
.mo-btn--primary:hover { background: var(--mo-primary-600, #1d49e7); }
.mo-btn--ghost {
  border: 1px solid #d7dce3;
  color: var(--mo-ink-700, #17191d);
  -webkit-text-fill-color: var(--mo-ink-700, #17191d);
  background: transparent;
}
.mo-btn--ghost:hover { border-color: var(--mo-ink-500, #50565e); }
body[data-theme="dark"] .mo-btn--ghost {
  border-color: rgba(148, 163, 184, .35);
  color: #e2e8f0;
  -webkit-text-fill-color: #e2e8f0;
}
body[data-theme="dark"] .mo-btn--ghost:hover { border-color: #94a3b8; }

.mo-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 2.25rem 0 .5rem;
  font-size: 1.05rem;
  font-weight: 500;
}
.mo-flow a {
  color: var(--mo-ink-800, #0f1114);
  -webkit-text-fill-color: var(--mo-ink-800, #0f1114);
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.mo-flow a:hover {
  color: var(--mo-primary, #004af0);
  -webkit-text-fill-color: var(--mo-primary, #004af0);
  border-bottom-color: var(--mo-primary, #004af0);
}
.mo-flow .mo-flow__sep {
  color: #c2c9d2;
  font-size: .95rem;
  user-select: none;
}
.mo-flow-note {
  font-size: .85rem;
  color: var(--mo-ink-500, #50565e);
  margin: 0 0 2.5rem;
}
body[data-theme="dark"] .mo-flow a { color: #e2e8f0; -webkit-text-fill-color: #e2e8f0; }
body[data-theme="dark"] .mo-flow a:hover { color: #60a5fa; -webkit-text-fill-color: #60a5fa; border-bottom-color: #60a5fa; }
body[data-theme="dark"] .mo-flow .mo-flow__sep { color: rgba(148, 163, 184, .5); }
body[data-theme="dark"] .mo-flow-note { color: #94a3b8; }

.mo-tasks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  margin: 1rem 0 2rem;
}
.mo-tasks a {
  -webkit-text-fill-color: currentColor;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 2px;
  border-bottom: 1px solid #eef1f5;
  color: var(--mo-ink-700, #17191d);
  font-size: .92rem;
  text-decoration: none;
  transition: color .15s ease;
}
.mo-tasks a::after {
  content: '';
  width: 6px;
  height: 6px;
  border-top: 1.5px solid #c2c9d2;
  border-right: 1.5px solid #c2c9d2;
  transform: rotate(45deg);
  transition: border-color .15s ease;
}
.mo-tasks a:hover { color: var(--mo-primary, #004af0); }
.mo-tasks a:hover::after { border-color: var(--mo-primary, #004af0); }
body[data-theme="dark"] .mo-tasks a {
  color: #e2e8f0;
  border-bottom-color: rgba(148, 163, 184, .18);
}
body[data-theme="dark"] .mo-tasks a:hover { color: #60a5fa; }
@media (max-width: 640px) {
  .mo-tasks { grid-template-columns: 1fr; }
}


/* ============================================================
  16. 正文呼吸感与链接样式（manual 全站）
   ============================================================ */
article[role="main"] p {
  line-height: 1.85;
}
article[role="main"] p + p {
  margin-top: 1.15em;
}
article[role="main"] h1 {
  margin-bottom: .9em;
}
article[role="main"] h2 {
  margin-top: 2.7em;
  margin-bottom: 1em;
}
article[role="main"] table.docutils {
  margin: 1.5em 0 2em;
}
article[role="main"] table.docutils td,
article[role="main"] table.docutils th {
  padding: 11px 16px;
  line-height: 1.7;
}
article[role="main"] ul li,
article[role="main"] ol li {
  line-height: 1.85;
  margin: .4em 0;
}
article[role="main"] blockquote {
  margin: 1.6em 0;
}

/* 正文链接下划线：默认无，悬停才出现（颜色见文末收口） */

/* ============================================================
   分组侧栏 · Cursor / Claude 文档站形式
   参照：
     - Cursor docs：h2 分组标签(12px muted) + 同左缘链接行(h≈29) + hover 圆角底
     - Claude docs：section label 与 a 同用 px-2；active 用浅底 pill
   结构：.mo-nav-group > caption + ul
   铁律：标题与链接只在「行」上垫一次水平 padding，禁止嵌套叠加。
   ============================================================ */
html[data-mo-grouped-sidebar] {
  /* Claude 契约：蓝只用于正文链接/CTA；导航选中=中性底+标题色字；禁止 h1::after 色条 */
  /* 标题 / 一级链接共用同一左缘，禁止再各自写死不同 padding */
  --mo-nav-pad-x: 12px;
  --mo-nav-pad-x-nested: 24px;
  --mo-nav-row-h: 34px;
  --mo-nav-radius: 8px;
  --mo-nav-gap-group: 28px;
  --mo-nav-label: #86868b;
  --mo-nav-link: #1d1d1f;
  --mo-nav-link-muted: #6e6e73;
  --mo-nav-hover: #f2f2f7;                          /* systemGray6 */
  --mo-nav-hover-text: #1d1d1f;
  --mo-nav-active-bg: #ebebed;                      /* 中性抬升，略强于 hover */
  --mo-nav-active: var(--mo-text-heading, #101215); /* 与标题同色，不染品牌蓝 */
}

/* 覆盖 data-theme=dark 与 auto→resolved dark，否则导航 token 仍是浅色近黑 */
html[data-mo-grouped-sidebar] body[data-theme="dark"],
html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
body[data-theme="dark"] html[data-mo-grouped-sidebar] {
  --mo-nav-label: #8e98a8;
  --mo-nav-link: #e6ebf2;
  --mo-nav-link-muted: #aab6c6;
  /* 悬停轻抬升；选中中性底 + 标题色（Claude：current 不染色） */
  --mo-nav-hover: rgba(255, 255, 255, 0.06);
  --mo-nav-hover-text: #e8eef7;
  --mo-nav-active-bg: rgba(255, 255, 255, 0.10);
  --mo-nav-active: var(--mo-dark-heading, #d7dde8);
}

html[data-mo-grouped-sidebar] .sidebar-tree {
  padding: 16px 12px 24px;
  margin: 0;
}

/* caption 已在顶栏，侧栏一律不重复（含「指南」） */
html[data-mo-grouped-sidebar] .sidebar-tree > p.caption,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group > p.caption {
  display: none;
}
html[data-mo-grouped-sidebar] .sidebar-tree > ul > li.toctree-l1:first-child,
html[data-mo-grouped-sidebar] .sidebar-tree > ul > li.toctree-l1:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group > ul > li.toctree-l1:first-child,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group > ul > li.toctree-l1:not(.current) {
  display: block;
}
html[data-mo-grouped-sidebar] .sidebar-tree > ul > li.toctree-l1.current > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group > ul > li.toctree-l1 > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group > ul > li.toctree-l1.current > a.reference {
  display: flex;
}

/* 组容器：Cursor space-y-8 节奏 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 var(--mo-nav-gap-group);
  padding: 0;
  border: 0;
  background: transparent;
  text-align: start;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group:last-child {
  margin-bottom: 0;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single {
  margin-bottom: 12px;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group > ul {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group > ul > li {
  margin: 0;
  padding: 0;
  width: 100%;
  position: relative;
}

/* 多分区 caption（如「指南」）已隐藏；产品/域标题靠 toctree-l1 承担 */

/* 链接行：Apple 侧栏标准——矮行 + 7px continuous 圆角 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:active {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--mo-nav-row-h);
  height: var(--mo-nav-row-h);
  margin: 0;
  padding: 0 28px 0 var(--mo-nav-pad-x);
  border: 0;
  border-radius: var(--mo-nav-radius);
  background: transparent;
  box-shadow: none;
  color: var(--mo-nav-link);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-indent: 0;
  text-decoration: none;
  overflow-wrap: anywhere;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference::before,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current::before,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference::before {
  content: none;
  display: none;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:hover:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:visited:hover:not(.current) {
  background: var(--mo-nav-hover);
  color: var(--mo-nav-link);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:hover:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:visited:hover:not(.current) {
  background: var(--mo-nav-hover);
  color: var(--mo-nav-link);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference strong {
  font-weight: inherit;
}

/* 当前页：Apple systemGray5 选中底，中等字重 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:visited {
  background: var(--mo-nav-active-bg);
  color: var(--mo-nav-active);
  font-weight: 500;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.current:not(.current-page) > a.reference {
  background: transparent;
  color: var(--mo-nav-link);
  font-weight: 500;
}

/* 嵌套页：默认收起；二级常显层 / 展开抽屉除外 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li > ul {
  display: none;
  flex-direction: column;
  margin: 0 0 4px;
  padding: 0;
  margin-left: 0;
  list-style: none;
  width: 100%;
}
/* 一级 caption 下的二级（l1 及其直接子项）常显，不进抽屉 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > ul,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-expanded > ul {
  display: flex;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l2 > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l3 > a.reference {
  min-height: var(--mo-nav-row-h);
  height: var(--mo-nav-row-h);
  padding-left: var(--mo-nav-pad-x-nested);
  font-size: 14px;
  color: var(--mo-nav-link-muted);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l2.current-page > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l3.current-page > a.reference {
  color: var(--mo-nav-active);
  background: var(--mo-nav-active-bg);
  font-weight: 500;
}

/* 废掉 Furo checkbox/label 展开器，改用右侧 chevron 按钮 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.has-children > label,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.has-children > input.toctree-checkbox,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-has-kids > label,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-has-kids > input.toctree-checkbox {
  display: none;
}

/* mo-nav-form-v4: Cursor 侧栏 — 浅灰悬停 + 右侧 chevron 展开 */
html[data-mo-grouped-sidebar] .sidebar-tree {
  /* 左 pad 归零：水平起点由 --mo-sidebar-inline + --mo-nav-pad-x 对齐顶栏开字 */
  padding: 16px 12px 40px 0;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group {
  margin: 0 0 40px;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single {
  margin: 0 0 20px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(38, 37, 30, 0.03);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree .mo-nav-group--single {
  border-bottom-color: rgba(255, 255, 255, 0.03);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-has-kids {
  position: relative;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:active,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:focus {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: var(--mo-nav-row-h);
  height: var(--mo-nav-row-h);
  padding: 0 var(--mo-nav-pad-x);
  border-radius: var(--mo-nav-radius);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-indent: 0;
  color: var(--mo-nav-link);
  background: transparent;
  background-color: transparent;
  background-image: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .12s ease;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:hover:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:visited:hover:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:focus-visible:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:active:not(.current) {
  background: var(--mo-nav-hover);
  background-color: var(--mo-nav-hover);
  background-image: none;
  color: var(--mo-nav-link);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:focus,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:active,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:focus,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:active {
  background: var(--mo-nav-active-bg);
  background-color: var(--mo-nav-active-bg);
  background-image: none;
  color: var(--mo-nav-active);
  -webkit-text-fill-color: var(--mo-nav-active);
  font-weight: 500;
}
/* 当前项悬停：略加深一点蓝，绝不回灰 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:hover {
  background: var(--mo-primary-soft-hover);
  background-color: var(--mo-primary-soft-hover);
  color: var(--mo-primary);
  -webkit-text-fill-color: var(--mo-primary);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l2 > a.reference {
  padding-left: var(--mo-nav-pad-x-nested);
  min-height: var(--mo-nav-row-h);
  height: var(--mo-nav-row-h);
  color: var(--mo-nav-link-muted);
}
/* 单组下 l2 即首屏主列，与顶栏开字 / 一级同左缘 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single li.toctree-l2 > a.reference {
  padding-left: var(--mo-nav-pad-x);
  color: var(--mo-nav-link);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l3 > a.reference {
  padding-left: calc(var(--mo-nav-pad-x-nested) + 12px);
  min-height: var(--mo-nav-row-h);
  height: var(--mo-nav-row-h);
  font-size: 14px;
  color: var(--mo-nav-link-muted);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single li.toctree-l3 > a.reference {
  padding-left: var(--mo-nav-pad-x-nested);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l4 > a.reference {
  padding-left: calc(var(--mo-nav-pad-x-nested) + 24px);
  min-height: 30px;
  height: 30px;
  font-size: 13px;
  color: var(--mo-nav-label);
}
/* 第五、六层仍在同一导航分组中，必须显式累加缩进。
   否则会被通用链接样式重置为一级左边距，展开后看起来像跳出了父级。 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l5 > a.reference {
  padding-left: calc(var(--mo-nav-pad-x-nested) + 40px);
  min-height: 30px;
  height: 30px;
  font-size: 13px;
  color: var(--mo-nav-label);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l6 > a.reference {
  padding-left: calc(var(--mo-nav-pad-x-nested) + 56px);
  min-height: 30px;
  height: 30px;
  font-size: 13px;
  color: var(--mo-nav-label);
}
/* Cursor 式抽屉箭头：右侧 >，展开时旋转 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-drawer {
  position: relative;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-drawer > a.reference {
  padding-right: 32px;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group button.mo-nav-chevron {
  position: absolute;
  top: 0;
  right: 2px;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--mo-nav-row-h);
  height: var(--mo-nav-row-h);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--mo-nav-radius);
  background: transparent;
  color: #86868b;
  cursor: pointer;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group button.mo-nav-chevron:hover {
  background: var(--mo-nav-hover);
  color: var(--mo-nav-hover-text, var(--mo-nav-link));
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group button.mo-nav-chevron svg {
  display: block;
  transition: transform .18s ease;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-expanded > button.mo-nav-chevron svg {
  transform: rotate(90deg);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group button.mo-nav-chevron[aria-expanded="true"] svg {
  transform: rotate(90deg);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree .mo-nav-group button.mo-nav-chevron {
  color: #8b95a5;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .sidebar-tree .mo-nav-group button.mo-nav-chevron:hover {
  background: rgba(148, 163, 184, .12);
  color: #e6ebf2;
}

/* ============================================================
   全站域标题（不限「指南」）
   - mo-level-open：有常显子树的分组标题（产品域 / 架构与核心概念…）
   - single 组可见根链：如指南旁的「总览」
   用 600 + 标题色拉齐中英光学差；子项保持 400
   ============================================================ */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open {
  margin-top: 14px;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group > ul > li:first-child.mo-level-open,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single + .mo-nav-group--multi > ul > li:first-child.mo-level-open {
  margin-top: 0;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > a.reference:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > a.reference:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > a.reference:active,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference:active {
  color: var(--mo-text-heading, #101215);
  -webkit-text-fill-color: var(--mo-text-heading, #101215);
  font-weight: 600;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > a.reference:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference:hover {
  color: var(--mo-text-heading, #101215);
  -webkit-text-fill-color: var(--mo-text-heading, #101215);
}
/* 域标题当前页：与同级 MatrixOne / Genesis 同色，只靠底标示选中（勿染成链接蓝） */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open.current-page > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > a.reference.current,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1.current-page > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference.current {
  color: var(--mo-text-heading, #101215);
  -webkit-text-fill-color: var(--mo-text-heading, #101215);
  background: var(--mo-nav-active-bg);
  background-color: var(--mo-nav-active-bg);
  font-weight: 600;
}
/* 域标题下的直接子项：常规字重，与标题分层 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > ul > li > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > ul > li > a.reference:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > ul > li > a.reference:visited {
  font-weight: 400;
  color: var(--mo-nav-link-muted);
  -webkit-text-fill-color: var(--mo-nav-link-muted);
  letter-spacing: -0.01em;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > ul > li.current-page > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-level-open > ul > li > a.reference.current {
  color: var(--mo-nav-active);
  -webkit-text-fill-color: var(--mo-nav-active);
  font-weight: 500;
}
/* 暗色：域标题必须压过浅色近黑（选择器比通用暗色链接更具体） */
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li.mo-level-open > a.reference,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li.mo-level-open > a.reference:link,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li.mo-level-open > a.reference:visited,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li.mo-level-open > a.reference:hover,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference:link,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference:visited,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference:hover {
  color: var(--mo-dark-heading, #d7dde8);
  -webkit-text-fill-color: var(--mo-dark-heading, #d7dde8);
}
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li.mo-level-open.current-page > a.reference,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li.mo-level-open > a.reference.current,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1.current-page > a.reference,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group--single > ul > li.toctree-l1 > a.reference.current {
  color: var(--mo-dark-heading, #d7dde8);
  -webkit-text-fill-color: var(--mo-dark-heading, #d7dde8);
  background: var(--mo-nav-active-bg);
  background-color: var(--mo-nav-active-bg);
}

/* mo-nav-form-v5: 彻底掐死 Furo 竖条 / label 方块 / 黑底悬停 */
html[data-mo-grouped-sidebar] .sidebar-tree label,
html[data-mo-grouped-sidebar] .sidebar-tree input.toctree-checkbox,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group label,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group input.toctree-checkbox {
  display: none;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference::before,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference::after,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current::before,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current::after,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference::before,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference::after,
html[data-mo-grouped-sidebar] .sidebar-tree a.current::before,
html[data-mo-grouped-sidebar] .sidebar-tree .current-page > a.reference::before {
  content: none;
  display: none;
  visibility: hidden;
  opacity: 0;
  width: 0;
  height: 0;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
  transform: none;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:focus,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:focus-visible,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:active {
  border: 0;
  border-left: 0;
  border-bottom: 0;
  outline: none;
  box-shadow: none;
  text-decoration: none;
  background-image: none;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:hover:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:visited:hover:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:focus-visible:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:active:not(.current) {
  background: var(--mo-nav-hover);
  background-color: var(--mo-nav-hover);
  color: var(--mo-nav-hover-text, var(--mo-nav-link));
  -webkit-text-fill-color: var(--mo-nav-hover-text, var(--mo-nav-link));
  border-radius: 8px;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:focus,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:active,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:focus,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:active {
  background: var(--mo-nav-active-bg);
  background-color: var(--mo-nav-active-bg);
  background-image: none;
  color: var(--mo-nav-active);
  -webkit-text-fill-color: var(--mo-nav-active);
  font-weight: 500;
  border: 0;
  box-shadow: none;
  border-radius: 8px;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:hover {
  background: var(--mo-nav-active-bg);
  background-color: var(--mo-nav-active-bg);
  color: var(--mo-nav-active);
  -webkit-text-fill-color: var(--mo-nav-active);
  filter: brightness(1.08);
}

/* ============================================================
  27b. 正文顶部面包屑（模板 page.html 的 content block 注入）
   ============================================================ */
/* 一行浅灰小字，不做胶囊、不做底色、不做悬停色块。
   悬停只把灰字压深——蓝色和下划线留给正文里的跳转，面包屑是位置指示不是行动号召。
   注意：这段插在 <article> 内，正文链接规则（3d 节）会盖住它，
   所以那条规则的 :not() 链里排除了 .mo-crumbs__link。 */
.mo-crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 1.35rem;
  font-size: .8125rem;
  line-height: 1.5;
}
.mo-crumbs__link {
  display: inline-flex;
  align-items: center;
  color: #8b9098;
  -webkit-text-fill-color: #8b9098;
  text-decoration: none;
  transition: color .15s ease;
}
.mo-crumbs__link:hover {
  color: var(--mo-text-heading, #101215);
  -webkit-text-fill-color: var(--mo-text-heading, #101215);
  text-decoration: none;
}
.mo-crumbs__sep {
  color: #cbcfd6;
  user-select: none;
}
.mo-crumbs__current {
  color: var(--mo-text-heading, #101215);
  font-weight: 500;
}
body[data-theme="dark"] .mo-crumbs__sep,
html[data-mo-resolved-theme="dark"] body .mo-crumbs__sep { color: #4b525c; }
body[data-theme="dark"] .mo-crumbs__link,
html[data-mo-resolved-theme="dark"] body .mo-crumbs__link {
  color: #7f8794;
  -webkit-text-fill-color: #7f8794;
}
body[data-theme="dark"] .mo-crumbs__link:hover,
html[data-mo-resolved-theme="dark"] body .mo-crumbs__link:hover {
  color: #e6e9ee;
  -webkit-text-fill-color: #e6e9ee;
}
body[data-theme="dark"] .mo-crumbs__current,
html[data-mo-resolved-theme="dark"] body .mo-crumbs__current { color: #e6e9ee; }

/* ============================================================
  28. 开始使用 · 卡片网格（Snowflake 结构 + Cursor 卡片质感）
   ============================================================ */
.mo-guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(246px, 1fr));
  gap: 14px;
  margin: 1.15rem 0 2.75rem;
}
.mo-guide-item {
  display: block;
  padding: 18px 20px 19px;
  border: 1px solid #e7e9ed;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.mo-guide-item:hover {
  border-color: #c9ced7;
  background: #fcfcfd;
}
.mo-guide-item__title {
  display: block;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--mo-ink-900, #0f1114);
  -webkit-text-fill-color: var(--mo-ink-900, #0f1114);
  transition: color .15s ease;
}
.mo-guide-item:hover .mo-guide-item__title {
  color: var(--mo-primary, #004af0);
  -webkit-text-fill-color: var(--mo-primary, #004af0);
}
.mo-guide-item__desc {
  display: block;
  margin-top: 7px;
  font-size: .875rem;
  line-height: 1.62;
  color: var(--mo-ink-500, #50565e);
}
body[data-theme="dark"] .mo-guide-item,
html[data-mo-resolved-theme="dark"] body .mo-guide-item {
  border-color: rgba(148, 163, 184, .20);
  background: rgba(255, 255, 255, .022);
}
body[data-theme="dark"] .mo-guide-item:hover,
html[data-mo-resolved-theme="dark"] body .mo-guide-item:hover {
  border-color: rgba(148, 163, 184, .34);
  background: rgba(255, 255, 255, .045);
}
body[data-theme="dark"] .mo-guide-item__title { color: #e6e9ee; -webkit-text-fill-color: #e6e9ee; }
body[data-theme="dark"] .mo-guide-item:hover .mo-guide-item__title { color: #6ea8ff; -webkit-text-fill-color: #6ea8ff; }
body[data-theme="dark"] .mo-guide-item__desc { color: #94a3b8; }


/* ============================================================
   左侧导航:贴顶 sticky + 自身内部滚动
   —— 读正文时保持可见;导航过长时侧栏自己滚(所有条目都可达,不会
   被截断或被页脚盖住);滚到底部时随正文自然让位给通栏页脚。

   关键修正:高度用 max-height(跟随内容),而非写死的 calc 高度。
   原 .sidebar-sticky 被设成 height:calc(100vh - topbar),短导航下方
   撑出大片空白,使 sticky 过早被顶走(看正文时导航就"消失");改成
   height:auto + max-height 后,导航贴顶更久,超出视口才在侧栏内部
   滚动。做法与本主题右侧 TOC(.toc-sticky)一致。
   ============================================================ */
@media (min-width: 1100px) {
  .sidebar-sticky {
    position: sticky;
    top: var(--mo-topbar-h);
    height: auto;
    max-height: calc(100vh - var(--mo-topbar-h));
  }
}


/* ============================================================
   暗色 · 分组侧栏导航配色修正
   分组侧栏(html[data-mo-grouped-sidebar])结构下,导航链接的颜色被一组
   高权重 + 的“亮色”规则写死:普通项 color/-webkit-text-fill-color
   都是 #26251e(近黑)、嵌套项 #6f6c64,激活项还铺了浅色底 #eef0f3——
   这些规则没有暗色分支,于是暗色下变成近黑字压在深色侧栏上,对比度约 1.05,
   几乎不可读(激活项则是深色文字压在浅底块,浅块又与暗色侧栏格格不入)。
   这里用同等结构 + 暗色限定(两种暗色标记都覆盖)把它们改回可读的冷灰/品牌蓝。
   注意必须同时覆盖 -webkit-text-fill-color,否则 Chrome 里仍渲染近黑。
   ============================================================ */
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group a.reference {
  color: #aab6c6;
  -webkit-text-fill-color: #aab6c6;
}
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group li.toctree-l2 > a.reference,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group li.toctree-l3 > a.reference {
  color: #969fae;
  -webkit-text-fill-color: #969fae;
}
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group a.reference:hover,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group a.reference:focus-visible,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group a.reference:active,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:hover:not(.current),
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:visited:hover:not(.current),
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:focus-visible:not(.current),
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:active:not(.current) {
  background: var(--mo-nav-hover);
  background-color: var(--mo-nav-hover);
  color: var(--mo-nav-hover-text, #eef2f8);
  -webkit-text-fill-color: var(--mo-nav-hover-text, #eef2f8);
  filter: none;
}
/* 仅当前页高亮；祖先 li.current（如 AI Studio）保持域标题色，避免双选中 */
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group li.current:not(.current-page) > a.reference,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group li.current:not(.current-page) > a.reference:hover {
  background: transparent;
  background-color: transparent;
  color: var(--mo-dark-heading, #d7dde8);
  -webkit-text-fill-color: var(--mo-dark-heading, #d7dde8);
  filter: none;
}
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group a.current,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group a.current:hover,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group .current-page > a.reference,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
    .sidebar-tree .mo-nav-group .current-page > a.reference:hover {
  background: var(--mo-nav-active-bg);
  background-color: var(--mo-nav-active-bg);
  color: var(--mo-nav-active);
  -webkit-text-fill-color: var(--mo-nav-active);
  filter: none;
}

/* ============================================================
   Content measure —— 锚定 14" 栏宽；媒体跟随栏宽 100%
   ============================================================ */
article[role="main"] {
  max-width: var(--mo-content-max, 52rem);
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}
article[role="main"] :is(p, li, dd, blockquote, .admonition, .sd-card) {
  max-width: none !important;
}
article[role="main"] :is(img, svg, video, iframe, figure, table) {
  max-width: 100%;
  box-sizing: border-box;
}
article[role="main"] :is(img, svg, video) {
  height: auto;
}

/* ============================================================
   Accent lock —— 品牌蓝只锁正文链接 / CTA；顶栏与侧栏走中性选中
   ============================================================ */
.mo-topbar__tab--active,
.mo-topbar__tab--active:link,
.mo-topbar__tab--active:visited,
.mo-topbar__tab--active:hover {
  color: var(--mo-text-heading, #101215);
  -webkit-text-fill-color: var(--mo-text-heading, #101215);
  background: transparent;
  font-weight: 600;
}
.mo-topbar__tab--active::after,
.mo-topbar__tab--active::before {
  background: var(--mo-text-heading, #101215);
  opacity: 1;
}
.sidebar-tree a.current,
.sidebar-tree a.current:link,
.sidebar-tree a.current:visited,
.sidebar-tree .current-page > a.reference,
.sidebar-tree .current-page > a.reference:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:hover {
  color: var(--mo-nav-active);
  -webkit-text-fill-color: var(--mo-nav-active);
  background: var(--mo-nav-active-bg);
  background-color: var(--mo-nav-active-bg);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:hover {
  background: var(--mo-nav-active-bg);
  background-color: var(--mo-nav-active-bg);
}
body:not([data-theme="dark"]) a.reference.external,
body:not([data-theme="dark"]) article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link) {
  color: var(--mo-text-body, #15171a);
}
body:not([data-theme="dark"]) a.reference.external:hover,
body:not([data-theme="dark"]) article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):hover {
  color: var(--mo-primary, #004af0);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__tab--active, .mo-topbar__tab--active:link, .mo-topbar__tab--active:visited, .mo-topbar__tab--active:hover) {
  color: var(--mo-dark-heading, #d7dde8);
  -webkit-text-fill-color: var(--mo-dark-heading, #d7dde8);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  :is(.mo-topbar__tab--active::after, .mo-topbar__tab--active::before) {
  background: var(--mo-dark-heading, #d7dde8);
}


/* ============================================================
   Permalink / 锚点跳转 / 暗色标题收口
   1) ¶ → #（克制、无下划线，避开 Snowflake 同款段落符）
   2) scroll-padding：固定顶栏下锚点不再被盖住
   3) auto→dark 时正文标题与侧栏当前项强制可读
   ============================================================ */
article :is(h1, h2, h3, h4, h5, h6) .headerlink {
  margin-left: 0.4em;
  padding: 0 0.15em;
  border: 0;
  box-shadow: none;
  text-decoration: none;
  -webkit-text-decoration: none;
  font-size: 0;          /* 隐藏原生 ¶ 字形 */
  font-weight: 500;
  line-height: 1;
  vertical-align: 0.08em;
  color: var(--mo-text-muted, #86868b);
  -webkit-text-fill-color: var(--mo-text-muted, #86868b);
  opacity: 0;
  transition: opacity .15s ease, color .15s ease;
}
article :is(h1, h2, h3, h4, h5, h6) .headerlink::before {
  content: "#";
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0;
  color: inherit;
  -webkit-text-fill-color: inherit;
}
article :is(h1, h2, h3, h4, h5, h6):hover .headerlink,
article :is(h1, h2, h3, h4, h5, h6) .headerlink:focus-visible {
  opacity: 1;
}
article :is(h1, h2, h3, h4, h5, h6) .headerlink:hover {
  color: var(--mo-primary, #004af0);
  -webkit-text-fill-color: var(--mo-primary, #004af0);
  text-decoration: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article :is(h1, h2, h3, h4, h5, h6) .headerlink {
  color: #8090a5;
  -webkit-text-fill-color: #8090a5;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article :is(h1, h2, h3, h4, h5, h6) .headerlink:hover {
  color: #8eb0ff;
  -webkit-text-fill-color: #8eb0ff;
}

html {
  scroll-padding-top: calc(var(--mo-topbar-h, 112px) + 28px);
}
article[role="main"] :is(h1, h2, h3, h4, h5, h6, section, [id]) {
  scroll-margin-top: calc(var(--mo-topbar-h, 112px) + 28px);
}

/* 正文标题：auto→dark 也必须亮（旧规则只挂了 data-theme=dark） */
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] :is(h1, h2) {
  color: var(--mo-dark-heading, #d7dde8);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] :is(h3, h4, h5, h6) {
  color: var(--mo-dark-strong, #c5cdda);
}

/* 侧栏暗色当前项：中性底 + 标题色 */
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li.mo-level-open > ul > li.current-page > a.reference,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li.mo-level-open > ul > li > a.reference.current,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group .current-page > a.reference,
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group a.reference.current {
  color: var(--mo-nav-active, #d7dde8);
  -webkit-text-fill-color: var(--mo-nav-active, #d7dde8);
  background: var(--mo-nav-active-bg, rgba(255, 255, 255, 0.10));
  background-color: var(--mo-nav-active-bg, rgba(255, 255, 255, 0.10));
  filter: none;
}
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li.mo-level-open > ul > li > a.reference {
  color: var(--mo-nav-link-muted, #aab6c6);
  -webkit-text-fill-color: var(--mo-nav-link-muted, #aab6c6);
}

/* 暗色交互收口：悬停灰抬升 / 选中蓝底亮字，杜绝浅色白 pill 回灌 */
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:hover:not(.current),
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:visited:hover:not(.current),
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:focus-visible:not(.current),
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:active:not(.current),
:is(html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
    html[data-mo-grouped-sidebar] body[data-theme="dark"])
  .sidebar-tree .mo-nav-group button.mo-nav-chevron:hover {
  background: var(--mo-nav-hover);
  background-color: var(--mo-nav-hover);
  color: var(--mo-nav-hover-text, #eef2f8);
  -webkit-text-fill-color: var(--mo-nav-hover-text, #eef2f8);
  filter: none;
}

/* ============================================================
   正文链接收口：默认蓝字无下划线；悬停加蓝下划线
   （保留 .mo-guide-item 自己的标题悬停蓝）
   ============================================================ */
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link),
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):link,
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):visited {
  color: var(--mo-primary, #004af0);
  -webkit-text-fill-color: var(--mo-primary, #004af0);
  text-decoration: none;
}
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):hover {
  color: var(--mo-primary, #004af0);
  -webkit-text-fill-color: var(--mo-primary, #004af0);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--mo-primary, #004af0);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link),
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):visited {
  color: #6ea8ff;
  -webkit-text-fill-color: #6ea8ff;
  text-decoration: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):not(.mo-btn):not(.mo-guide-item):not(.mo-crumbs__link):hover {
  color: #6ea8ff;
  -webkit-text-fill-color: #6ea8ff;
  text-decoration: underline;
  text-decoration-color: #6ea8ff;
}

/* Quickstart：保留产品截图原始比例，不叠加边框、灰底或阴影。 */
article[role="main"] img.quickstart-shot {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.5rem 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Quickstart 动作样片：真实界面原比例播放；减少动态效果时回退到静态首帧。 */
article[role="main"] figure.quickstart-demo {
  margin: 1.5rem 0;
}
article[role="main"] .quickstart-demo-video {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
article[role="main"] .quickstart-demo-poster {
  display: none;
  width: 100%;
  height: auto;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
article[role="main"] figure.quickstart-demo figcaption {
  margin-top: 0.75rem;
  color: var(--mo-text-muted, #565d66);
  font-size: 0.875rem;
  line-height: 1.6;
}
@media (prefers-reduced-motion: reduce) {
  article[role="main"] .quickstart-demo-video {
    display: none;
  }
  article[role="main"] .quickstart-demo-poster {
    display: block;
  }
}

article[role="main"] img.quickstart-raw-source {
  display: none;
}

/* MOI 数据路径图：按文档主题切换亮、暗 SVG，保持透明画布和原始比例。 */
article[role="main"] img.moi-data-path {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.75rem 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
article[role="main"] img.moi-data-path-dark {
  display: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] img.moi-data-path-light {
  display: none;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] img.moi-data-path-dark {
  display: block;
}

/* 核心概念：延续数据价值图的编辑式留白与亮暗主题切换。 */
article[role="main"] img.moi-platform-map {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.5rem 0 1.75rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}
article[role="main"] img.moi-platform-map-dark { display: none; }
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] img.moi-platform-map-light { display: none; }
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  article[role="main"] img.moi-platform-map-dark { display: block; }

/* 页底 Next/Previous：默认中性标题色；悬停才品牌蓝（不受 Furo a{color:link} 常亮蓝）。 */
.related-pages a.next-page,
.related-pages a.prev-page,
.related-pages a.next-page:link,
.related-pages a.prev-page:link,
.related-pages a.next-page:visited,
.related-pages a.prev-page:visited {
  color: var(--mo-text-heading, #111318);
  -webkit-text-fill-color: var(--mo-text-heading, #111318);
  text-decoration: none;
}
.related-pages a.next-page .page-info .title,
.related-pages a.prev-page .page-info .title {
  color: inherit;
  -webkit-text-fill-color: inherit;
  text-decoration: none;
}
.related-pages a.next-page .page-info .context,
.related-pages a.prev-page .page-info .context {
  color: var(--mo-text-muted, #565d66);
  -webkit-text-fill-color: var(--mo-text-muted, #565d66);
}
.related-pages a.next-page svg.furo-related-icon,
.related-pages a.prev-page svg.furo-related-icon,
.related-pages a.next-page svg.furo-related-icon > use,
.related-pages a.prev-page svg.furo-related-icon > use {
  color: var(--mo-text-muted, #565d66);
  fill: currentColor;
}
.related-pages a.next-page:hover,
.related-pages a.prev-page:hover,
.related-pages a.next-page:focus-visible,
.related-pages a.prev-page:focus-visible {
  color: var(--mo-primary, #004af0);
  -webkit-text-fill-color: var(--mo-primary, #004af0);
}
.related-pages a.next-page:hover .page-info .title,
.related-pages a.prev-page:hover .page-info .title,
.related-pages a.next-page:focus-visible .page-info .title,
.related-pages a.prev-page:focus-visible .page-info .title {
  color: var(--mo-primary, #004af0);
  -webkit-text-fill-color: var(--mo-primary, #004af0);
  text-decoration: none;
}
.related-pages a.next-page:hover svg.furo-related-icon,
.related-pages a.prev-page:hover svg.furo-related-icon,
.related-pages a.next-page:hover svg.furo-related-icon > use,
.related-pages a.prev-page:hover svg.furo-related-icon > use,
.related-pages a.next-page:focus-visible svg.furo-related-icon,
.related-pages a.prev-page:focus-visible svg.furo-related-icon {
  color: var(--mo-primary, #004af0);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.next-page,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.prev-page,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.next-page:visited,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.prev-page:visited {
  color: var(--mo-text-heading, #d7dde8);
  -webkit-text-fill-color: var(--mo-text-heading, #d7dde8);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.next-page .page-info .context,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.prev-page .page-info .context,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.next-page svg.furo-related-icon,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.prev-page svg.furo-related-icon {
  color: var(--mo-text-muted, #8090a5);
  -webkit-text-fill-color: var(--mo-text-muted, #8090a5);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.next-page:hover,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.prev-page:hover,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.next-page:hover .page-info .title,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.prev-page:hover .page-info .title,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.next-page:hover svg.furo-related-icon,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages a.prev-page:hover svg.furo-related-icon {
  color: #6ea8ff;
  -webkit-text-fill-color: #6ea8ff;
}

/* ============================================================
  27d. 三处边界：导航下缘 · 正文渐隐 · 页脚接缝
   这三处原来各有各的毛病，放在一起写，免得颜色和尺寸再各写各的。
   ============================================================ */

/* —— ① 正文顶部 ——
   渐隐只在页面滚动后出现，并始终贴着实际固定顶栏的下缘。具体坐标由
   page-motion.js 从顶栏的真实边界写入，避免断点高度与页面实际布局脱节。 */
.main::before {
  content: "";
  display: block;
  position: fixed;
  top: var(--mo-content-fade-top, var(--mo-topbar-h));
  z-index: 40;
  right: 0;
  height: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, .99) 16%,
    rgba(255, 255, 255, .94) 31%,
    rgba(255, 255, 255, .82) 46%,
    rgba(255, 255, 255, .60) 62%,
    rgba(255, 255, 255, .30) 80%,
    rgba(255, 255, 255, 0) 100%
  );
}

body.mo-page-scrolled .main::before {
  opacity: 1;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .main::before {
  background: linear-gradient(
    to bottom,
    rgba(25, 30, 36, 1) 0%,
    rgba(25, 30, 36, .99) 16%,
    rgba(25, 30, 36, .94) 31%,
    rgba(25, 30, 36, .82) 46%,
    rgba(25, 30, 36, .60) 62%,
    rgba(25, 30, 36, .30) 80%,
    rgba(25, 30, 36, 0) 100%
  );
}

@media (min-width: 1100px) {
  .main::before {
    left: var(--mo-sidebar-left);
  }
}

/* 窄屏保留 Furo 标题栏两端的目录开关；中间站点名称与明暗切换已在顶部工具栏
   提供，避免出现重复标题和重复按钮。 */
@media (max-width: 1099px) {
  .main::before {
    left: 0;
    height: clamp(24px, 4vw, 32px);
  }
  .mobile-header {
    z-index: 41;
  }
  .mobile-header .header-center,
  .mobile-header .theme-toggle-container.theme-toggle-header {
    display: none;
  }
}

/* —— ② 导航下缘 ——
   顶栏底部有一条 1px 分隔线，激活标签的下划线也贴在同一个位置。
   ::after 在树序上排在子元素之后，所以那条灰线是**盖在**下划线上面画的，
   两者又都是 1.5px 这种半像素高度——渲染出来就是一小段糊掉的灰黑色。
   把标签行抬到分隔线之上，下划线取整到 2px，就是干净的一道。 */
.mo-topbar__tabs {
  z-index: 1;
}
.mo-topbar__tab::after {
  height: 2px;
}

/* —— ③ 页脚接缝 ——
   原来正文结束后是 80px 纯白的空当，然后一刀切进深蓝。那段白不像留白，
   像是掉了东西——因为阅读区根本没有收口：内容说没就没了，下一眼就是深蓝。

   收口靠一道横线：顶栏下面有一道，阅读区结束也有一道，上下成对。
   横线之后留 56px 呼吸，深蓝紧接着开始，顶边一道极淡高光，
   让接缝是「一道边」而不是「一个断口」。 */
.page {
  position: relative;
  padding-bottom: 48px;
}
.page::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 48px;
  height: 1px;
  background: var(--mo-reading-rule);
  pointer-events: none;
}

/* —— ④ 上一页 / 下一页 ——
   它和正文不是一个盒子：正文有 832px 的宽度上限，这块没有，于是窗口一宽，
   「下一页」就伸到正文右边界外面去（1990px 下多出 64px）。左边看着齐，右边不齐。
   给它同一个上限即可。

   竖向也是错的：原来「最后更新于」上面 56px、下面只有 32px，
   它就贴着导航走，看起来像导航的标签，而不是正文的收尾。
   现在上下拉开，收口横线也不再贴着导航。 */
.content > footer {
  max-width: var(--mo-content-max, 52rem);
  box-sizing: border-box;
  padding-top: 20px;
  padding-bottom: 32px;
}
/* 窄屏下正文自己带左右内边距（≥1100px 是 0，往下 48px，手机 20px）。
   这块导航必须跟着变，否则窄屏又会两边各多出一截。改正文内边距时这里一起改。 */
@media (max-width: 1099px) {
  .content > footer {
    padding-left: 48px;
    padding-right: 48px;
  }
}
@media (max-width: 640px) {
  .content > footer {
    padding-left: 20px;
    padding-right: 20px;
  }
}
.mo-footer {
  margin-top: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}
/* 左栏那道竖线原来提前 34px 收住，和上面这道横线接不上，
   左下角是个豁口。放到底，两道线交成一个角。 */
@media (min-width: 1100px) {
  body:not([data-theme="dark"]) .sidebar-drawer::after {
    bottom: 0;
  }
}


/* 语言：两个词并排，没有卡片。

   只有两种语言，配一张下拉卡片是小题大做——卡片是给"多到放不下"的选项用的。
   何况产品切换旁边再开一张同尺寸的白卡，两张并排飘在顶栏上，看着就是两块补丁。

   竖线、字号、字重跟产品切换同一套，只是不带小箭头：有箭头表示"这里能展开"，
   没箭头表示"点了就走"。当前语言用正文字色，另一种淡下去，淡的那个才可点。 */
.mo-lang {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;              /* 和产品 pill 同高，点得着 */
  margin-left: 2px;
  padding-left: 14px;
  font-size: var(--mo-type-ui);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.mo-lang__opt {
  display: inline-flex;
  align-items: center;
  height: 100%;
}
.mo-lang::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 16px;
  background-color: var(--mo-reading-rule);
  transform: translateY(-50%);
  pointer-events: none;
}
.mo-lang__opt.is-active {
  color: var(--mo-text-nav);
}
a.mo-lang__opt,
a.mo-lang__opt:link,
a.mo-lang__opt:visited {
  color: var(--mo-control-mute);
  text-decoration: none;
  transition: color .12s ease;
}
a.mo-lang__opt:hover {
  color: var(--mo-text-heading);
  text-decoration: none;
}
a.mo-lang__opt:focus-visible {
  outline: 2px solid rgba(63, 102, 136, .22);
  outline-offset: 3px;
  border-radius: 3px;
}
/* 斜杠比两个词都淡，但得看得见——用 --mo-reading-rule 那种 6% 的线色当字色是看不见的。 */
.mo-lang__sep {
  color: #d2d7de;
  font-weight: 400;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-lang::before {
  background-color: var(--mo-dark-rule);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-lang__opt.is-active {
  color: var(--mo-dark-nav);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) :is(
  a.mo-lang__opt, a.mo-lang__opt:link, a.mo-lang__opt:visited) {
  color: var(--mo-dark-muted);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) a.mo-lang__opt:hover {
  color: var(--mo-dark-heading);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-lang__sep {
  color: #3d4757;
}


/* ============================================================
   产品全景图 .mo-flow —— 「从数据到智能体」
   ------------------------------------------------------------
   画的是形状，不是清单：四路数据汇成一路（数据接入）→ 过一台机器
   （工作流）→ 散成五类产物 → 再汇成知识库 → 连同数据库、技能三样
   装配成上下文 → 落到唯一一张重点卡（智能体）→ 再散开去干活。
   收—放—收—放的节奏本身就是这个产品的结构，所以图里只放名字，
   一句解释都不写，解释交给正文。

   三种视觉身份，用满不超三种：①描边空心＝不在数据流里的东西（外部
   数据源、对外动作）；②实底＝机器（数据接入、工作流）；③白底细边＝
   数据本身（产物、知识库、数据库、技能）。彩色只给智能体一个。
   连线统一一个粗细，汇流处平行分散进入，不拧成一个结。
   ============================================================ */
.mo-flow {
  --f-out-bd:    #d9e0ea;
  --f-op:        #1f2733;
  --f-op-t:      #ffffff;
  --f-chip:      #ffffff;
  --f-chip-bd:   #e0e6f0;
  --f-ink:       #1b2029;
  --f-sub:       #626b79;
  --f-ic:        #6b7484;
  --f-line:      #bcc6d5;
  --f-accent:    #004af0;
  --f-hero-t:    #ffffff;
  --f-accent-bd: rgba(0, 74, 240, .30);
  --f-accent-sf: rgba(0, 74, 240, .055);
  --f-accent-ln: rgba(0, 74, 240, .38);
  margin: 1.75rem 0 2.25rem;
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-flow {
  --f-out-bd:    #333c49;
  --f-op:        #c9d3e2;
  --f-op-t:      #101620;
  --f-chip:      #1c232c;
  --f-chip-bd:   #2f3843;
  --f-ink:       #dee4ee;
  --f-sub:       #97a1b0;
  --f-ic:        #9aa4b3;
  --f-line:      #444e5c;
  --f-accent:    #2f6bff;
  --f-hero-t:    #ffffff;
  --f-accent-bd: rgba(122, 162, 255, .40);
  --f-accent-sf: rgba(122, 162, 255, .085);
  --f-accent-ln: rgba(122, 162, 255, .45);
}
/* 窄屏不缩到看不清：低于 620px 就让它横向滚，而不是把 12px 的字压成 6px */
.mo-flow { overflow-x: auto; }
.mo-flow svg {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 620px;
  height: auto;
  font-family: var(--mo-font-sans);
}

/* ① 不在数据流里的：只描边 */
.mo-flow .fw-out rect  { fill: none; stroke: var(--f-out-bd); stroke-width: 1; }

/* ② 机器：全图仅有的两块实心深色，撑住整张图的重量 */
.mo-flow .fw-op        { fill: var(--f-op); }
.mo-flow .fw-op-t      { fill: var(--f-op-t); }

/* ③ 数据本身：白底细边 */
.mo-flow .fw-chip rect { fill: var(--f-chip); stroke: var(--f-chip-bd); stroke-width: 1; }

/* ④ 智能体：全图唯一的彩色 */
.mo-flow .fw-hero      { fill: var(--f-accent); }
.mo-flow .fw-hero-t    { fill: var(--f-hero-t); }
.mo-flow .fw-hero-s    { fill: var(--f-hero-t); opacity: .66; }

/* 文字与线 */
.mo-flow .fw-t         { fill: var(--f-ink); }
.mo-flow .fw-s         { fill: var(--f-sub); }
.mo-flow .fw-lb-a      { fill: var(--f-accent); opacity: .58; letter-spacing: .08em; }
.mo-flow :is(.fw-ic, .fw-ic-op, .fw-ic-acc) {
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mo-flow .fw-ic        { stroke: var(--f-ic); }
.mo-flow .fw-ic-op     { stroke: var(--f-op-t); }
.mo-flow .fw-ic-acc    { stroke: var(--f-hero-t); }
.mo-flow :is(.fw-flow, .fw-flow-1) path,
.mo-flow path.fw-flow-1 { fill: none; stroke: var(--f-line); stroke-width: 1.2; }
.mo-flow .fw-flow-a path { fill: none; stroke: var(--f-accent-ln); stroke-width: 1.2; }

/* ============================================================
   29. 侧栏选中态 —— 原先散在三处，2026-08-05 收到这里
   ============================================================

   这一节的规则以前分住三个地方，改一处另两处不会跟着变：

     ① page.html 的 <style id="mo-nav-critical">   —— 下面第一段
     ② grouped-sidebar.js 里以 JS 字符串注入的样式 —— 下面第二段
     ③ 本文件里 mo-nav-group 相关那些规则

   ①② 原先排在本文件**之后**生效（一个是 <head> 内联、一个是运行时
   往 <head> 追加的 <style>），所以搬过来必须放在文件末尾、且保持
   「先 ① 后 ②」的顺序 —— 这样层叠顺序和搬之前完全一致。
   往下加新规则请加在本节之后，不要插进这两段中间。

   两段里 密集，是当初为压过 Furo 自带规则加的；
   哪些真需要、哪些是噪音，留到统一收敛 时再处理。
   ============================================================ */

/* —— ① 原 page.html 内联块 ——
   压 Furo 的实心蓝条：选中 = 中性底 + 标题色，蓝留给正文链接。
   不依赖 JS 打标，所以对 html[data-mo-grouped-sidebar] 之外的页面也生效。 */
/* Claude 契约：选中=中性底+标题色；蓝留给正文链接（与 custom.css token 同步） */
.sidebar-tree a.current,
.sidebar-tree a.current:link,
.sidebar-tree a.current:visited,
.sidebar-tree a.current:hover,
.sidebar-tree a.current:focus,
.sidebar-tree a.current:active,
.sidebar-tree .current-page > a.reference {
  background: var(--mo-nav-active-bg, #ebebed); background-color: var(--mo-nav-active-bg, #ebebed); background-image: none;
  color: var(--mo-nav-active, #101215); -webkit-text-fill-color: var(--mo-nav-active, #101215);
  font-weight: 500; border: 0; box-shadow: none;
  border-radius: 8px;
}
.mo-topbar__tab--active,
.mo-topbar__tab--active:link,
.mo-topbar__tab--active:visited,
.mo-topbar__tab--active:hover {
  color: var(--mo-text-heading, #101215); -webkit-text-fill-color: var(--mo-text-heading, #101215);
  font-weight: 600;
}
html[data-mo-grouped-sidebar] .sidebar-tree a.current::before,
html[data-mo-grouped-sidebar] .sidebar-tree a.current::after,
html[data-mo-grouped-sidebar] .sidebar-tree .current-page > a.reference::before,
html[data-mo-grouped-sidebar] .sidebar-tree .current > a.reference::before {
  content: none; display: none; width: 0; height: 0;
  background: transparent; opacity: 0; border: 0;
}
html[data-mo-grouped-sidebar] .sidebar-tree label,
html[data-mo-grouped-sidebar] .sidebar-tree input.toctree-checkbox {
  display: none; visibility: hidden; pointer-events: none;
  width: 0; height: 0; opacity: 0;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference::before,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference::after,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current::before,
html[data-mo-grouped-sidebar] .sidebar-tree a.current::before,
html[data-mo-grouped-sidebar] .sidebar-tree .current-page > a.reference::before {
  content: none; display: none; width: 0; height: 0;
  background: transparent; opacity: 0; border: 0;
}
html[data-mo-grouped-sidebar] {
  --mo-nav-hover: #f2f2f7;
  --mo-nav-hover-text: #1d1d1f;
  --mo-nav-active: #101215;
  --mo-nav-active-bg: #ebebed;
}
html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
html[data-mo-grouped-sidebar] body[data-theme="dark"] {
  --mo-nav-hover: rgba(255, 255, 255, 0.06);
  --mo-nav-hover-text: #e8eef7;
  --mo-nav-active: #d7dde8;
  --mo-nav-active-bg: rgba(255, 255, 255, 0.10);
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:visited {
  background: transparent; background-image: none;
  border: 0; box-shadow: none; outline: none;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:hover:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:focus:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:active:not(.current) {
  background: var(--mo-nav-hover); background-color: var(--mo-nav-hover); background-image: none;
  color: var(--mo-nav-hover-text); -webkit-text-fill-color: var(--mo-nav-hover-text);
  border-radius: 8px;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:focus,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:active,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:focus,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:active {
  background: var(--mo-nav-active-bg); background-color: var(--mo-nav-active-bg); background-image: none;
  color: var(--mo-nav-active); -webkit-text-fill-color: var(--mo-nav-active);
  font-weight: 500; border: 0; box-shadow: none;
  border-radius: 8px;
}

/* —— ② 原 grouped-sidebar.js 注入块 ——
   分组侧栏专用：抹掉 Furo 的展开控件与伪元素装饰，
   定义 --mo-nav-* 四个颜色变量（明暗两套），并给出常态/悬停/选中三种态。 */
html[data-mo-grouped-sidebar] {
  --mo-nav-hover:#f2f2f7;
  --mo-nav-hover-text:#1d1d1f;
  --mo-nav-active:#101215;
  --mo-nav-active-bg:#ebebed;
}
html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"],
html[data-mo-grouped-sidebar] body[data-theme="dark"] {
  --mo-nav-hover:rgba(255,255,255,.06);
  --mo-nav-hover-text:#e8eef7;
  --mo-nav-active:#d7dde8;
  --mo-nav-active-bg:rgba(255,255,255,.10);
}
html[data-mo-grouped-sidebar] .sidebar-tree label,
html[data-mo-grouped-sidebar] .sidebar-tree input.toctree-checkbox {
  display:none;
  visibility:hidden;
  pointer-events:none;
  width:0;
  height:0;
  margin:0;
  padding:0;
  border:0;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference::before,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference::after,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current::before,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current::after,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference::before,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference::after {
  content:none;
  display:none;
  visibility:hidden;
  opacity:0;
  width:0;
  height:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:link,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:visited,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:focus,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.reference:active {
  border:0;
  box-shadow:none;
  outline:none;
  background-image:none;
  -webkit-tap-highlight-color:transparent;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:hover:not(.current),
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li:not(.current-page) > a.reference:visited:hover:not(.current) {
  background:var(--mo-nav-hover);
  background-color:var(--mo-nav-hover);
  color:var(--mo-nav-hover-text);
  -webkit-text-fill-color:var(--mo-nav-hover-text);
  border-radius:8px;
}
.sidebar-tree a.current,
.sidebar-tree a.current:hover,
.sidebar-tree a.current:focus,
.sidebar-tree a.current:active,
.sidebar-tree .current-page > a.reference,
.sidebar-tree .current-page > a.reference:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:hover,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group a.current:focus,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group .current-page > a.reference:hover {
  background:var(--mo-nav-active-bg);
  background-color:var(--mo-nav-active-bg);
  background-image:none;
  color:var(--mo-nav-active);
  -webkit-text-fill-color:var(--mo-nav-active);
  font-weight:500;
  border:0;
  box-shadow:none;
  border-radius:8px;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.current:not(.current-page) > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.current:not(.current-page) > a.reference:hover {
  background:transparent;
  background-color:transparent;
  color:var(--mo-nav-link,#1d1d1f);
  -webkit-text-fill-color:var(--mo-nav-link,#1d1d1f);
}
html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"] .sidebar-tree .mo-nav-group li.current:not(.current-page) > a.reference,
html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"] .sidebar-tree .mo-nav-group li.current:not(.current-page) > a.reference:hover,
html[data-mo-grouped-sidebar] body[data-theme="dark"] .sidebar-tree .mo-nav-group li.current:not(.current-page) > a.reference {
  color:var(--mo-dark-heading,#d7dde8);
  -webkit-text-fill-color:var(--mo-dark-heading,#d7dde8);
  background:transparent;
}
.mo-topbar__tab--active,
.mo-topbar__tab--active:link,
.mo-topbar__tab--active:visited,
.mo-topbar__tab--active:hover {
  color:var(--mo-text-heading,#101215);
  -webkit-text-fill-color:var(--mo-text-heading,#101215);
  font-weight:600;
}
html[data-mo-grouped-sidebar][data-mo-resolved-theme="dark"] .mo-topbar__tab--active,
html[data-mo-grouped-sidebar] body[data-theme="dark"] .mo-topbar__tab--active {
  color:var(--mo-dark-heading,#d7dde8);
  -webkit-text-fill-color:var(--mo-dark-heading,#d7dde8);
}

body:not([data-theme="dark"]) .highlight .s,
body:not([data-theme="dark"]) .highlight .s1,
body:not([data-theme="dark"]) .highlight .s2,
body:not([data-theme="dark"]) .highlight .sb,
body:not([data-theme="dark"]) .highlight .sc,
body:not([data-theme="dark"]) .highlight .sd,
body:not([data-theme="dark"]) .highlight .se,
body:not([data-theme="dark"]) .highlight .sh,
body:not([data-theme="dark"]) .highlight .si,
body:not([data-theme="dark"]) .highlight .sr,
body:not([data-theme="dark"]) .highlight .ss,
body:not([data-theme="dark"]) .highlight .sx,
body:not([data-theme="dark"]) .highlight .dl {
  color: var(--mo-code-string);
}

body:not([data-theme="dark"]) .highlight .m,
body:not([data-theme="dark"]) .highlight .mb,
body:not([data-theme="dark"]) .highlight .mf,
body:not([data-theme="dark"]) .highlight .mh,
body:not([data-theme="dark"]) .highlight .mi,
body:not([data-theme="dark"]) .highlight .mo,
body:not([data-theme="dark"]) .highlight .il {
  color: var(--mo-code-number);
}

body:not([data-theme="dark"]) .highlight .c,
body:not([data-theme="dark"]) .highlight .c1,
body:not([data-theme="dark"]) .highlight .cm,
body:not([data-theme="dark"]) .highlight .cp,
body:not([data-theme="dark"]) .highlight .cs,
body:not([data-theme="dark"]) .highlight .cd,
body:not([data-theme="dark"]) .highlight .ch {
  color: var(--mo-code-comment);
  font-style: italic;
}

body:not([data-theme="dark"]) .highlight .o,
body:not([data-theme="dark"]) .highlight .ow {
  color: var(--mo-code-operator);
}
body:not([data-theme="dark"]) .highlight .nv,
body:not([data-theme="dark"]) .highlight .vi,
body:not([data-theme="dark"]) .highlight .vg {
  color: var(--mo-code-variable);
}

/* 4f-2 折叠 + 全屏(由 code-collapse.js 注入) ——————————————————————
   超过 12 行的代码块默认收 320px,底部蒙版 + 中央"展开"按钮,
   右上角加一个全屏按钮(在 copybtn 左侧 32px)。 */
.mo-code-collapsible {
  position: relative;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
/* 折叠状态:底部从代码块色到透明的渐变,文字渐隐到底色 */
.mo-code-collapsed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(
    to bottom,
    rgba(229, 233, 240, 0) 0%,
    rgba(229, 233, 240, 0.7) 55%,
    var(--mo-surface-code) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* 中央浮动展开/收起按钮 */
.mo-code-expand-btn {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: #ffffff;
  border: 1px solid #D1D5DB;
  border-radius: 999px;
  cursor: pointer;
  color: var(--mo-primary);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.mo-code-expand-btn:hover {
  background: #F8FAFC;
  border-color: var(--mo-primary);
  color: var(--mo-primary);
  box-shadow: 0 2px 12px rgba(59, 130, 246, .15);
}
.mo-code-expand-btn__icon {
  display: inline-flex;
  align-items: center;
}

/* 全屏按钮:右上角,放在 copybtn(right:12, 24x24)左侧,留 8px 间隔 */
.mo-code-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 44px;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #6B7280;
  transition: background .15s, color .15s;
}
.mo-code-fullscreen-btn:hover {
  background: rgba(15, 23, 42, .06);
  color: #1F2937;
}

/* 行内 code 在表格里:沿用全局色系,无需额外覆盖。但表头里的 code 需要在深底上加白底色块,这里专门处理。 */
article[role="main"] table thead th code,
.rst-content table thead th code {
  background: #ffffff !important;
  color: #1F2937 !important;
}
.mo-product-menu__heading {
  padding: 4px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mo-product-menu__title,
.mo-product-menu__meta {
  display: block;
  line-height: 1.3;
}
.mo-product-menu__meta {
  margin-top: 2px;
  font-size: 11px;
  color: #64748B;
}
body[data-theme="dark"] .mo-product-menu__heading,
body[data-theme="dark"] .mo-product-menu__meta {
  color: #94A3B8;
}

/* 9g 语言切换下拉（重新定义，覆盖原 pill 样式） */
.mo-topbar__actions .mo-lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
}
.mo-topbar__actions .mo-lang-pill {
  height: 32px;
  min-width: 64px;
  padding: 0 10px 0 12px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  letter-spacing: 0;
  margin-right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.mo-topbar__actions .mo-lang-pill:hover,
.mo-topbar__actions .mo-lang-switcher.is-open .mo-lang-pill {
  background: #F8FAFC;
  border-color: #E5E7EB;
  color: #1F2937;
  transform: none;
}
.mo-lang-pill__chevron {
  width: 12px;
  height: 12px;
  color: #6B7280;
  flex: 0 0 auto;
  transition: transform .15s;
}
.mo-lang-switcher.is-open .mo-lang-pill__chevron {
  transform: rotate(180deg);
}
.mo-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 132px;
  padding: 8px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.04);
  display: none;
  z-index: 1100;
}
.mo-lang-switcher.is-open .mo-lang-menu { display: block; }
.mo-lang-menu__heading {
  padding: 4px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mo-lang-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #1F2937;
  cursor: pointer;
  text-decoration: none;
}
.mo-lang-menu__item:hover {
  background: #F8FAFC;
  color: #004af0;
  text-decoration: none;
}
.mo-lang-menu__item.is-active {
  background: #EFF6FF;
  color: #004af0;
  cursor: default;
}
.mo-lang-menu__item.is-active svg {
  width: 12px;
  height: 12px;
}
body[data-theme="dark"] .mo-topbar__actions .mo-lang-pill {
  background: #0d1117;
  border-color: #30363D;
  color: #9ca3af;
}
body[data-theme="dark"] .mo-lang-pill__chevron {
  color: #94A3B8;
}
body[data-theme="dark"] .mo-topbar__actions .mo-lang-pill:hover,
body[data-theme="dark"] .mo-topbar__actions .mo-lang-switcher.is-open .mo-lang-pill {
  background: rgba(148,163,184,.08);
  color: #e5e7eb;
  border-color: #30363D;
}
body[data-theme="dark"] .mo-lang-menu {
  background: #0d1117;
  border-color: #30363D;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
body[data-theme="dark"] .mo-lang-menu__heading { color: #94A3B8; }
body[data-theme="dark"] .mo-lang-menu__item { color: #e5e7eb; }
body[data-theme="dark"] .mo-lang-menu__item:hover {
  background: rgba(148,163,184,.08);
  color: #6b8cff;
}
body[data-theme="dark"] .mo-lang-menu__item.is-active {
  background: rgba(107,140,255,.15);
  color: #6b8cff;
}

/* 9g-2 版本切换 pill + 下拉菜单 */
.mo-version-switcher {
  position: relative;
  display: flex;
  align-items: center;
}
.mo-version-pill {
  height: 32px;
  padding: 0 10px 0 12px;
  background: transparent;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.mo-version-pill:hover,
.mo-version-switcher.is-open .mo-version-pill {
  background: #F8FAFC;
  color: #1F2937;
}
.mo-version-pill__chevron {
  width: 12px;
  height: 12px;
  transition: transform .15s;
}
.mo-version-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.04);
  display: none;
  z-index: 1100;
}
.mo-version-menu__heading {
  padding: 4px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mo-version-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #1F2937;
  cursor: pointer;
  text-decoration: none;
}
.mo-version-menu__item:hover {
  background: #F8FAFC;
  color: #004af0;
  text-decoration: none;
}
.mo-version-menu__item.is-active { background: #EFF6FF; color: #004af0; }
.mo-version-menu__item.is-active svg { width: 12px; height: 12px; }

/* 搜索词默认保持高亮，不向读者暴露 Sphinx 的“隐藏搜索结果”开关。 */
#searchbox .highlight-link { display: none; }
@media (max-width: 960px) {

  .mo-topbar__search kbd { display: none; }
}


@media (max-width: 640px) {

  .mo-topbar__title,
  .mo-topbar__docs { display: none; }
}




/* ============================================================
  10. sphinx-design tab-set（Linux / macOS 切换）—— Segment 风格
   ============================================================ */
.sd-tab-set {
  /* 必须保留 sphinx-design 的 flex + wrap:.sd-tab-content 用 width:100% 换到下一行实现"内容在标签下"。
     原先用 inline-flex + nowrap 想做紧凑 Segment pill,结果阻断换行,
     标签被压到 min-content(中文逐字成列)、内容也乱了。 */
  display: flex !important;
  flex-wrap: wrap !important;
  background: var(--mo-surface-100);
  padding: 4px;
  border-radius: var(--mo-radius-md);
  margin: 1.25em 0;
}
/* 每个 tab 标签 */
.sd-tab-set > label,
.sd-tab-set > .sd-tab-label {
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mo-ink-350);
  background: transparent;
  border: none;
  border-radius: var(--mo-radius);
  cursor: pointer;
  transition: all 0.15s ease;
}
.sd-tab-set > label:hover,
.sd-tab-set > .sd-tab-label:hover {
  color: var(--mo-ink-700);
  background: transparent;
}
/* 激活 tab */
.sd-tab-set > input:checked + label,
.sd-tab-set > input:checked + .sd-tab-label {
  color: var(--mo-ink-800) !important;
  background: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
/* 内容区恢复常态，取消 sphinx-design 默认的上下 box-shadow 线 */
.sd-tab-content {
  box-shadow: none !important;
  padding: 16px 0 0 !important;
}


/* ============================================================
  11. 首页 Hero（保留品牌色）
   ============================================================ */
.mo-hero-title {
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--mo-border-100);
  margin-bottom: 12px;
}
.mo-hero-title > h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -.02em;
  background: var(--mo-gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 16px;
  padding: 0;
  border: none;
  line-height: 1.15;
}
.mo-hero-title > h1 .headerlink { display: none; }
.mo-subtitle {
  font-size: 1.05rem;
  color: var(--mo-ink-600);
  max-width: 680px;
  line-height: 1.7;
  margin: 0;
}


/* —— intelligence 首页 hero:不要渐变巨字,改深灰中号(36px / 600 / #1F2937)—— */
html[data-product="intelligence"] .mo-hero-title > h1 {
  font-size: 2.25rem;     /* 36px */
  font-weight: 600;
  letter-spacing: -.01em;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #1F2937;
  -webkit-text-fill-color: #1F2937;
}
body[data-theme="dark"] html[data-product="intelligence"] .mo-hero-title > h1,
html[data-product="intelligence"] body[data-theme="dark"] .mo-hero-title > h1 {
  color: #f3f4f6;
  -webkit-text-fill-color: #f3f4f6;
}


/* ============================================================
  12. sphinx-design 卡片
   ============================================================ */
.sd-card {
  border: 1px solid var(--mo-border-100) !important;
  border-radius: var(--mo-radius-lg) !important;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: var(--color-background-primary);
}
.sd-card:hover {
  border-color: var(--mo-primary) !important;
  box-shadow: 0 4px 12px rgba(0,74,240,.06);
}
.sd-card .sd-card-title {
  font-weight: 600;
  color: var(--mo-ink-900);
}
.sd-card a.sd-stretched-link::after { border-radius: var(--mo-radius-lg); }


/* ============================================================
  13. 语言 pill
   ============================================================ */
.theme-toggle-container .mo-lang-switcher,
.theme-toggle-container .mo-lang-pill { margin-right: 10px; }
.mo-lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.mo-lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1;
  color: var(--mo-primary);
  background: #e8efff;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: .02em;
  transition: background .15s ease, border-color .15s ease;
}
.mo-lang-pill:hover {
  background: #fff;
  border-color: var(--mo-primary);
  text-decoration: none;
}
body[data-theme="dark"] .mo-lang-pill {
  color: #9db1ff;
  background: rgba(107,140,255,.14);
}
body[data-theme="dark"] .mo-lang-pill:hover {
  background: rgba(107,140,255,.22);
  border-color: #6b8cff;
}
.mo-lang-switcher--floating,
.mo-lang-pill--floating {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 50;
}
.mo-footer-follow {
  min-width: 254px;
}
.mo-footer-follow .mo-footer-title {
  text-align: left;
}
.mo-footer-follow .mo-footer-qr-list {
  grid-template-columns: repeat(3, 74px);
}
.mo-footer-follow .mo-footer-qr {
  width: 74px;
}
.sd-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .09) !important;
}

.mo-product-switcher.is-open .mo-product-menu,
.mo-lang-switcher.is-open .mo-lang-menu,
.mo-version-switcher.is-open .mo-version-menu {
  display: block;
  transform-origin: top center;
  animation: mo-popover-enter .16s cubic-bezier(.2, .75, .25, 1) both;
}
@media (prefers-reduced-motion: reduce) {

  article[role="main"],
  .mo-product-menu,
  .mo-lang-menu,
  .mo-version-menu {
    animation: none !important;
  }
}


@media (max-width: 768px) {

  .mo-footer-follow {
    grid-column: 1 / -1;
    justify-self: center;
  }
}




/* ============================================================
  18. 搜索结果分页
   ============================================================ */
#search-results.mo-search-pagination--loading ul.search > li:nth-child(n + 21),
#search-results ul.search > li[hidden] {
  display: none !important;
}
#search-results.mo-search-pagination--filtering ul.search {
  visibility: hidden;
}

.mo-search-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0 4px;
}
.mo-search-pagination__summary {
  color: var(--mo-ink-500);
  font-size: 13px;
}
.mo-search-pagination__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.mo-search-pagination__button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: transparent;
  color: var(--mo-ink-600);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.mo-search-pagination__button:hover:not(:disabled) {
  border-color: #94A3B8;
  background: #F8FAFC;
  color: var(--mo-ink-900);
}
.mo-search-pagination__button[aria-current="page"] {
  border-color: var(--mo-primary);
  background: var(--mo-primary);
  color: #FFFFFF;
}
.mo-search-pagination__button:focus-visible {
  outline: 2px solid var(--mo-primary);
  outline-offset: 2px;
}
.mo-search-pagination__button:disabled:not([aria-current="page"]) {
  cursor: not-allowed;
  opacity: .45;
}
.mo-search-pagination__ellipsis {
  min-width: 24px;
  color: var(--mo-ink-400);
  text-align: center;
}

body[data-theme="dark"] .mo-search-pagination__button {
  border-color: #30363D;
  color: #C9D1D9;
}
body[data-theme="dark"] .mo-search-pagination__button:hover:not(:disabled) {
  border-color: #6E7681;
  background: #161B22;
  color: #F0F6FC;
}
body[data-theme="dark"] .mo-search-pagination__button[aria-current="page"] {
  border-color: #6B8CFF;
  background: #6B8CFF;
  color: #0D1117;
}
@media (max-width: 520px) {

  .mo-search-pagination__summary { width: 100%; }
  .mo-search-pagination__controls {
    width: 100%;
    justify-content: center;
  }
}



/* 独立搜索工作区：保留全站导航，移除正文页侧栏并强化检索层级。 */
body.mo-search-page {
  --mo-search-accent: #2563EB;
  --mo-search-accent-hover: #1D4ED8;
}
body[data-theme="dark"].mo-search-page {
  --mo-search-accent: #6B8CFF;
  --mo-search-accent-hover: #8EA7FF;
}
body.mo-search-page .main,
body.mo-search-page .content,
body.mo-search-page .article-container {
  width: 100%;
  max-width: none;
  min-width: 0;
}
body.mo-search-page .content {
  padding: 0 clamp(24px, 5vw, 72px) 64px;
}
body.mo-search-page article[role="main"] {
  width: 100%;
  max-width: 1120px;
  padding: 0;
}

.mo-search-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 32px 0 30px;
  padding: 32px 36px 26px;
  border: 1px solid #DCE4EE;
  border-radius: 18px;
  background-color: #FFFFFF;
  background-image:
    linear-gradient(rgba(37, 99, 235, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .045) 1px, transparent 1px);
  background-size: 28px 28px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .06);
}
.mo-search-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 3px;
  background: var(--mo-search-accent);
}
.mo-search-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #FFFFFF 0%, rgba(255, 255, 255, .94) 55%, rgba(255, 255, 255, .5) 100%);
  pointer-events: none;
}
.mo-search-hero__intro,
.mo-search-form,
.mo-search-scope {
  position: relative;
  z-index: 1;
}
.mo-search-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: var(--mo-search-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.4;
  text-transform: uppercase;
}
.mo-search-hero__eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
}
.mo-search-hero__title {
  max-width: 760px;
  margin: 0;
  color: #111827;
  font-size: clamp(27px, 2.6vw, 34px);
  font-weight: 720;
  letter-spacing: -.035em;
  line-height: 1.2;
}
.mo-search-hero__description {
  max-width: 680px;
  margin: 8px 0 0;
  color: #64748B;
  font-size: 15px;
  line-height: 1.7;
}
.mo-search-form {
  max-width: 820px;
  margin-top: 20px;
}
.mo-search-form__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.mo-search-form__field {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 4px;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .08), inset 0 0 0 1px rgba(255, 255, 255, .8);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.mo-search-form__field:focus-within {
  border-color: var(--mo-search-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mo-search-accent) 14%, transparent), 0 8px 24px rgba(15, 23, 42, .1);
  transform: translateY(-1px);
}
.mo-search-form__icon {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  color: #64748B;
}
.mo-search-form__icon svg,
.mo-search-form__clear svg,
.mo-search-result__arrow svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.mo-search-form__input {
  min-width: 0;
  flex: 1 1 auto;
  height: 40px;
  padding: 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 15px;
}
.mo-search-form__input::-webkit-search-cancel-button { display: none; }
.mo-search-form__input::placeholder { color: #94A3B8; }
.mo-search-form__clear {
  display: grid;
  flex: 0 0 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748B;
  cursor: pointer;
}
.mo-search-form__clear[hidden] { display: none; }
.mo-search-form__clear:hover {
  background: #F1F5F9;
  color: #0F172A;
}
.mo-search-form__clear svg { width: 17px; height: 17px; }
.mo-search-form__submit {
  align-self: stretch;
  min-width: 74px;
  padding: 0 17px;
  border: 0;
  border-radius: 8px;
  background: var(--mo-search-accent);
  color: #FFFFFF;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.mo-search-form__submit:hover {
  background: var(--mo-search-accent-hover);
  box-shadow: 0 5px 14px color-mix(in srgb, var(--mo-search-accent) 24%, transparent);
  transform: translateY(-1px);
}
.mo-search-form__submit:active { transform: translateY(0); }
.mo-search-form__clear:focus-visible,
.mo-search-form__submit:focus-visible {
  outline: 2px solid var(--mo-search-accent);
  outline-offset: 2px;
}
.mo-search-scope {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.mo-search-scope__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 2px 9px;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  background: rgba(248, 250, 252, .9);
  color: #64748B;
  font-size: 11px;
  font-weight: 600;
}
.mo-search-scope__item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22C55E;
}
.mo-search-scope__item + .mo-search-scope__item::before { background: #94A3B8; }

.mo-search-results {
  margin-bottom: 34px;
}
.mo-search-results__heading {
  margin: 0 0 4px !important;
  color: #111827;
  font-size: 21px !important;
  font-weight: 680;
  letter-spacing: -.02em;
  line-height: 1.35;
}
.mo-search-results__status,
.mo-search-results > p.search-summary {
  margin: 0 0 22px;
  color: #64748B;
  font-size: 14px;
}
.mo-search-results ul.search {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.mo-search-results ul.search > li.mo-search-result {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 20px 58px 20px 22px;
  border: 1px solid #E2E8F0;
  border-radius: 13px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.mo-search-results ul.search > li.mo-search-result:hover {
  z-index: 1;
  border-color: color-mix(in srgb, var(--mo-search-accent) 42%, #CBD5E1);
  background: #FFFFFF;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .075);
  transform: translateY(-2px);
}
.mo-search-result__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin-bottom: 8px;
  color: #94A3B8;
  font-size: 11px;
  line-height: 1.4;
}
.mo-search-result__section {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--mo-search-accent) 22%, #E2E8F0);
  border-radius: 5px;
  background: color-mix(in srgb, var(--mo-search-accent) 6%, #FFFFFF);
  color: var(--mo-search-accent);
  font-weight: 650;
}
.mo-search-result__path {
  overflow: hidden;
  font-family: var(--font-stack--monospace);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mo-search-result__title,
.mo-search-result__title:visited {
  display: inline-block;
  color: #1E293B !important;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -.01em;
  line-height: 1.45;
  text-decoration: none;
}
.mo-search-result__title::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.mo-search-result:hover .mo-search-result__title,
.mo-search-result:hover .mo-search-result__title:visited {
  color: var(--mo-search-accent) !important;
}
.mo-search-result__context,
.mo-search-result > p.context {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0 !important;
  color: #64748B;
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.mo-search-result__arrow {
  position: absolute;
  top: 50%;
  right: 22px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  color: #94A3B8;
  transform: translateY(-50%);
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
  pointer-events: none;
}
.mo-search-result__arrow svg { width: 16px; height: 16px; }
.mo-search-result:hover .mo-search-result__arrow {
  border-color: color-mix(in srgb, var(--mo-search-accent) 30%, #E2E8F0);
  color: var(--mo-search-accent);
  transform: translate(3px, -50%);
}
.mo-search-result .highlighted {
  padding: 0 .08em;
  border-radius: 3px;
  background: color-mix(in srgb, var(--mo-search-accent) 14%, transparent) !important;
  color: inherit !important;
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--mo-search-accent) 45%, transparent);
}

.mo-search-empty {
  display: grid;
  justify-items: center;
  padding: 50px 28px;
  border: 1px dashed #CBD5E1;
  border-radius: 14px;
  background: rgba(255, 255, 255, .55);
  text-align: center;
}
.mo-search-empty__icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid #DCE4EE;
  border-radius: 14px;
  background: #FFFFFF;
  color: var(--mo-search-accent);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.mo-search-empty__icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}
.mo-search-empty h3 {
  margin: 0;
  color: #1E293B;
  font-size: 18px;
}
.mo-search-empty p {
  max-width: 540px;
  margin: 8px 0 16px;
  color: #64748B;
  font-size: 14px;
}
.mo-search-empty ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mo-search-empty li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 30px;
  margin: 0 !important;
  padding: 5px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  color: #64748B;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
}

.mo-search-results .mo-search-pagination {
  margin-top: 6px;
  padding-top: 18px;
}
.mo-search-results .mo-search-pagination__button {
  border-radius: 8px;
  background: rgba(255, 255, 255, .7);
}
.mo-search-results .mo-search-pagination__button[aria-current="page"] {
  border-color: var(--mo-search-accent);
  background: var(--mo-search-accent);
  color: #FFFFFF;
}
.mo-search-results .mo-search-pagination__button:focus-visible {
  outline-color: var(--mo-search-accent);
}

body[data-theme="dark"].mo-search-page .mo-search-hero {
  border-color: #303B4B;
  background-color: #111722;
  background-image:
    linear-gradient(rgba(107, 140, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 140, 255, .055) 1px, transparent 1px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .24);
}
body[data-theme="dark"] .mo-search-hero::after {
  background: linear-gradient(90deg, #111722 0%, rgba(17, 23, 34, .94) 55%, rgba(17, 23, 34, .5) 100%);
}
body[data-theme="dark"] .mo-search-hero__title,
body[data-theme="dark"] .mo-search-results__heading { color: #F0F6FC; }
body[data-theme="dark"] .mo-search-hero__description,
body[data-theme="dark"] .mo-search-results__status { color: #8B98A9; }
body[data-theme="dark"] .mo-search-form__field {
  border-color: #3A4658;
  background: #0D1119;
  box-shadow: 0 7px 22px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(255, 255, 255, .025);
}
body[data-theme="dark"] .mo-search-form__field:focus-within {
  border-color: #829DFF;
  box-shadow: 0 0 0 3px rgba(107, 140, 255, .15), 0 8px 26px rgba(0, 0, 0, .32);
}
body[data-theme="dark"] .mo-search-form__input { color: #F0F6FC; }
body[data-theme="dark"] .mo-search-form__input::placeholder { color: #657184; }
body[data-theme="dark"] .mo-search-form__clear { color: #8B98A9; }
body[data-theme="dark"] .mo-search-form__clear:hover { background: #1B2432; color: #F0F6FC; }
body[data-theme="dark"] .mo-search-scope__item {
  border-color: #303B4B;
  background: rgba(13, 17, 25, .72);
  color: #8B98A9;
}
body[data-theme="dark"] .mo-search-results ul.search > li.mo-search-result {
  border-color: #273242;
  background: rgba(17, 23, 34, .72);
  box-shadow: none;
}
body[data-theme="dark"] .mo-search-results ul.search > li.mo-search-result:hover {
  border-color: #526991;
  background: #141C29;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}
body[data-theme="dark"] .mo-search-result__section {
  border-color: #3B4D70;
  background: rgba(107, 140, 255, .09);
  color: #9DB1FF;
}
body[data-theme="dark"] .mo-search-result__path { color: #657184; }
body[data-theme="dark"] .mo-search-result__title,
body[data-theme="dark"] .mo-search-result__title:visited { color: #E6EDF3 !important; }
body[data-theme="dark"] .mo-search-result__context { color: #8B98A9; }
body[data-theme="dark"] .mo-search-result__arrow { border-color: #344052; color: #657184; }
body[data-theme="dark"] .mo-search-empty {
  border-color: #344052;
  background: rgba(17, 23, 34, .58);
}
body[data-theme="dark"] .mo-search-empty__icon {
  border-color: #344052;
  background: #111722;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
}
body[data-theme="dark"] .mo-search-empty h3 { color: #E6EDF3; }
body[data-theme="dark"] .mo-search-empty p,
body[data-theme="dark"] .mo-search-empty li { color: #8B98A9; }
body[data-theme="dark"] .mo-search-empty li { border-color: #344052; }
body[data-theme="dark"] .mo-search-results .mo-search-pagination__button { background: rgba(17, 23, 34, .72); }
body[data-theme="dark"] .mo-search-results .mo-search-pagination__button[aria-current="page"] {
  border-color: var(--mo-search-accent);
  background: var(--mo-search-accent);
  color: #0D1117;
}
@media (max-width: 700px) {

  body.mo-search-page .content { padding: 0 16px 42px; }
  .mo-search-hero {
    margin: 16px 0 24px;
    padding: 24px 18px 20px;
    border-radius: 14px;
  }
  .mo-search-hero__title { font-size: 25px; }
  .mo-search-form { margin-top: 16px; }
  .mo-search-form__field { min-height: 48px; padding: 4px; }
  .mo-search-form__icon { flex-basis: 34px; }
  .mo-search-form__submit { min-width: 68px; padding: 0 14px; }
  .mo-search-results ul.search > li.mo-search-result { padding: 18px 46px 18px 17px; }
  .mo-search-result__arrow { right: 13px; border: 0; }
  .mo-search-result__path { display: none; }
}


@media (prefers-reduced-motion: reduce) {

  .mo-search-form__field,
  .mo-search-form__submit,
  .mo-search-result,
  .mo-search-result__arrow {
    transition: none !important;
  }
}
.mo-topbar__actions .mo-version-switcher,
.mo-topbar__actions .mo-lang-switcher {
  height: 32px;
}
.mo-topbar__actions .mo-version-pill,
.mo-topbar__actions .mo-lang-pill {
  height: 32px;
  min-width: 68px;
  padding: 0 9px 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475467;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: none;
}
.mo-topbar__actions .mo-lang-pill {
  min-width: 70px;
}
.mo-topbar__actions .mo-version-pill:hover,
.mo-topbar__actions .mo-lang-pill:hover,
.mo-topbar__actions .mo-version-switcher.is-open .mo-version-pill,
.mo-topbar__actions .mo-lang-switcher.is-open .mo-lang-pill {
  border: 0;
  background: #fff;
  color: #172033;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .09);
}

.mo-product-menu,
.mo-version-menu,
.mo-lang-menu {
  margin-top: 3px;
  border-color: #d7dde7;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .13), 0 2px 8px rgba(15, 23, 42, .06);
}
body[data-theme="dark"] .mo-topbar__actions .mo-version-pill,
body[data-theme="dark"] .mo-topbar__actions .mo-lang-pill {
  background: transparent;
  color: #9aa6b8;
}
body[data-theme="dark"] .mo-topbar__actions .mo-version-pill:hover,
body[data-theme="dark"] .mo-topbar__actions .mo-lang-pill:hover,
body[data-theme="dark"] .mo-topbar__actions .mo-version-switcher.is-open .mo-version-pill,
body[data-theme="dark"] .mo-topbar__actions .mo-lang-switcher.is-open .mo-lang-pill,
body[data-theme="dark"] .mo-topbar__actions .theme-toggle:hover {
  background: #202936;
  color: #eef2f7;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}


/* ============================================================
  21. MOI 5.0 商业化内容组件
   ============================================================ */
.mo-product-card.sd-card {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  border-color: #dbe5f3 !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.99), rgba(248,250,252,.96));
  box-shadow: 0 9px 28px rgba(15, 23, 42, .055);
  transition:
    transform .24s cubic-bezier(.2,.8,.2,1),
    border-color .24s ease,
    box-shadow .24s ease;
}
.mo-product-card.sd-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #2563eb, #38bdf8);
  opacity: .72;
  transition: width .24s ease, opacity .24s ease;
}
.mo-product-card.sd-card::after {
  content: "↗";
  position: absolute;
  top: 20px;
  right: 21px;
  color: #94a3b8;
  font-size: 17px;
  transition: color .2s ease, transform .2s ease;
}
.mo-product-card.sd-card:hover {
  transform: translateY(-5px);
  border-color: #60a5fa !important;
  box-shadow: 0 18px 40px rgba(37, 99, 235, .14);
}
.mo-product-card.sd-card:hover::before { width: 5px; opacity: 1; }
.mo-product-card.sd-card:hover::after {
  color: #2563eb;
  transform: translate(2px, -2px);
}
.mo-product-card .sd-card-body {
  padding: 24px 48px 24px 25px;
}
.mo-product-card .sd-card-title {
  margin-bottom: 10px;
  font-size: 16px;
  letter-spacing: -.01em;
}
.mo-product-card .sd-card-text {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

body[data-theme="dark"] .mo-product-card.sd-card {
  border-color: #2c3a4f !important;
  background: linear-gradient(145deg, #111827, #131d2b);
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}
body[data-theme="dark"] .mo-product-card .sd-card-text { color: #94a3b8; }
@media (prefers-reduced-motion: reduce) {

  .mo-product-card.sd-card,
  .mo-product-card.sd-card::before,
  .mo-product-card.sd-card::after {
    transition: none;
  }
  .mo-product-card.sd-card:hover { transform: none; }
}

/* ============================================================
   32. 左栏宽度可拖
   ============================================================
   抓手骑在左栏右边缘上，左右各留 5px 余量，一共 11px —— 太窄抓不住，
   太宽会挡到左栏最后一个字。平时完全看不见，鼠标压上去才浮出一条竖线，
   和顶栏「悬停只变色、不给底不画框」是同一种手感。

   宽度只有一个住址：--mo-sidebar-left。左栏、左栏内距、正文渐隐左缘、
   页脚接缝都读它，所以拖动只改这一个变量，其余自己跟着走。

   窄屏不装抓手（左栏那时是抽屉），见 sidebar-resize.js 里的断点。
   ============================================================ */

.mo-sidebar-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -5px;
  width: 11px;
  z-index: 5;
  cursor: col-resize;
  background: transparent;
  touch-action: none;
}

.mo-sidebar-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: transparent;
  transition: background .12s ease;
}

.mo-sidebar-resizer:hover::before,
.mo-sidebar-resizer:focus-visible::before,
html[data-mo-sidebar-resizing] .mo-sidebar-resizer::before {
  background: rgba(15, 23, 42, .18);
}

html[data-mo-sidebar-resizing] .mo-sidebar-resizer::before {
  background: rgba(15, 23, 42, .32);
}

.mo-sidebar-resizer:focus { outline: none; }

/* 拖动中：整页统一成左右箭头，并禁掉选中，免得拖出一片蓝底 */
html[data-mo-sidebar-resizing],
html[data-mo-sidebar-resizing] body {
  cursor: col-resize;
  user-select: none;
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-sidebar-resizer:hover::before,
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-sidebar-resizer:focus-visible::before {
  background: rgba(148, 163, 184, .26);
}
:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) html[data-mo-sidebar-resizing] .mo-sidebar-resizer::before,
html[data-mo-sidebar-resizing] :is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .mo-sidebar-resizer::before {
  background: rgba(148, 163, 184, .44);
}

@media (max-width: 1099px) {
  .mo-sidebar-resizer { display: none; }
}

/* 临界桌面宽度：优先保证正文可读，收紧列间留白而不让侧栏覆盖正文。 */
@media (min-width: 1100px) and (max-width: 1260px) {
  .content {
    padding-left: 24px;
    padding-right: 16px;
  }
  .toc-drawer {
    margin-left: 8px;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ============================================================
   33. 侧栏多行项目与页尾相邻页面
   ============================================================ */

/* 英文导航项可能需要两到三行。行高不能固定，否则文字会溢出到下一项上；
   单行项目仍保持原来的紧凑高度，多行项目随内容自然增高。 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l2 > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l3 > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l4 > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l5 > a.reference,
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.toctree-l6 > a.reference {
  height: auto;
  min-height: var(--mo-nav-row-h);
  padding-top: 7px;
  padding-bottom: 7px;
  line-height: 1.35;
  white-space: normal;
}

/* 箭头属于分组标题行，而不是整个展开后的子树。
   展开时若按父级 50% 定位，箭头会落到子项中间，看起来像当前页多了一个按钮。 */
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group button.mo-nav-chevron {
  top: 0;
  transform: none;
}
html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-expanded > button.mo-nav-chevron svg {
  transform: rotate(90deg);
}

/* 页尾仅保留相邻页面标题。箭头与标题必须组成一个阅读单元，不能把箭头钉在
   整个半栏的外缘、标题却居中，否则方向与目标会在视觉上断开。 */
.related-pages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--mo-border, #e6e8ec);
}
.related-pages a.prev-page,
.related-pages a.next-page {
  position: static;
  display: inline-grid;
  align-items: center;
  min-width: 0;
  min-height: 40px;
  max-width: 100%;
  padding: 6px 0;
  float: none;
  clear: none;
  border-radius: 8px;
  transition: color 160ms ease, transform 160ms ease;
}
.related-pages a.prev-page {
  grid-column: 1;
  grid-row: 1;
  grid-template-columns: 18px minmax(0, max-content);
  justify-self: start;
  column-gap: 10px;
  text-align: left;
}
.related-pages a.next-page {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: minmax(0, max-content) 18px;
  justify-self: end;
  column-gap: 10px;
  text-align: right;
}
.related-pages .page-info,
.related-pages a.next-page .page-info {
  width: auto;
  min-width: 0;
  align-items: inherit;
  text-align: inherit;
}
.related-pages a.prev-page svg.furo-related-icon,
.related-pages a.next-page svg.furo-related-icon {
  position: static;
  width: 18px;
  height: 18px;
  margin: 0;
  transform: none;
}
.related-pages a.prev-page svg.furo-related-icon {
  grid-column: 1;
  grid-row: 1;
  transform: rotate(180deg);
}
.related-pages a.prev-page .page-info {
  grid-column: 2;
  grid-row: 1;
}
.related-pages a.next-page .page-info {
  grid-column: 1;
  grid-row: 1;
}
.related-pages a.next-page svg.furo-related-icon {
  grid-column: 2;
  grid-row: 1;
}
.related-pages a.prev-page:hover,
.related-pages a.prev-page:focus-visible {
  transform: translateX(-2px);
}
.related-pages a.next-page:hover,
.related-pages a.next-page:focus-visible {
  transform: translateX(2px);
}

:is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body)
  .related-pages {
  border-top-color: rgba(255, 255, 255, .12);
}

@media (max-width: 640px) {
  .related-pages {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 8px;
    margin-top: 36px;
    padding-top: 14px;
  }
  .related-pages a.prev-page {
    grid-column: 1;
    grid-row: 1;
  }
  .related-pages a.next-page {
    grid-column: 1;
    grid-row: 2;
  }
}

/* ============================================================
   34. 桌面侧栏滚动边界

   展开分组后，子树必须参与正常文档流，后续一级目录才会被推开；
   滚动容器则在顶部和底部保留很短的渐隐，提示还有内容可继续查看，
   但不再用遮罩压住完整的目录行。
   ============================================================ */
@media (min-width: 1100px) {
  .sidebar-sticky {
    position: sticky;
    overflow: hidden;
    isolation: isolate;
  }

  .sidebar-scroll {
    min-height: 0;
    padding-bottom: 34px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-drawer.mo-expanded {
    height: auto !important;
    min-height: 0;
    overflow: visible;
  }

  html[data-mo-grouped-sidebar] .sidebar-tree .mo-nav-group li.mo-drawer > ul {
    position: static !important;
    flex: 0 0 auto;
    width: 100%;
  }

  .sidebar-sticky::before,
  .sidebar-sticky::after {
    content: "";
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    pointer-events: none;
  }

  .sidebar-sticky::before {
    top: 0;
    height: 18px;
    background: linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0) 100%);
  }

  .sidebar-sticky::after {
    bottom: 0;
    height: 28px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 100%);
  }

  :is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .sidebar-sticky::before {
    background: linear-gradient(to bottom, #191e24 0%, rgba(25, 30, 36, 0) 100%);
  }

  :is(body[data-theme="dark"], html[data-mo-resolved-theme="dark"] body) .sidebar-sticky::after {
    background: linear-gradient(to bottom, rgba(25, 30, 36, 0) 0%, #191e24 100%);
  }
}

/* ============================================================
   35. 窄屏顶栏

   窄屏不是把桌面顶栏压成三排。第一排只保留身份、产品与状态控件；
   第二排由搜索和栏目导航共享。两排共用确定的 96px 高度，栏目超出时
   横向滚动，不再溢出固定导航边界。
   ============================================================ */
@media (max-width: 1099px) {
  :root {
    --mo-topbar-h: 96px;
  }

  .mo-topbar__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    grid-template-rows: 48px 48px;
    align-items: center;
    align-content: stretch;
    height: 100%;
    padding: 0 16px;
    column-gap: 12px;
    row-gap: 0;
  }

  .mo-topbar__identity,
  .mo-topbar__tools {
    display: contents;
  }

  .mo-topbar__brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .mo-product-switcher {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    justify-self: start;
  }

  .mo-product-pill {
    max-width: min(184px, 100%);
  }

  .mo-switcher--version {
    grid-column: 3;
    grid-row: 1;
  }

  .mo-lang {
    grid-column: 4;
    grid-row: 1;
  }

  .mo-topbar__actions {
    grid-column: 5;
    grid-row: 1;
    min-width: var(--mo-control-h);
    gap: 0;
  }

  .mo-topbar__search {
    grid-column: 1;
    grid-row: 2;
    width: 170px;
  }

  .mo-topbar__tabs {
    grid-column: 2 / -1;
    grid-row: 2;
    min-width: 0;
    width: auto;
    height: 48px;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .mo-topbar__tabs::-webkit-scrollbar {
    display: none;
  }

  .mo-topbar__tab,
  .mo-topbar__tab:link,
  .mo-topbar__tab:visited {
    position: relative;
    flex: 0 0 auto;
    height: 48px;
  }
}

@media (max-width: 640px) {
  .mo-topbar__docs {
    display: none;
  }

  .mo-topbar__search {
    width: 150px;
  }
}
