/* ==========================================================================
   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
   ========================================================================== */


/* ============================================================
   1. 设计 Token
   ============================================================ */
:root {
  /* 品牌色 */
  --mo-primary:          #004af0;
  --mo-primary-600:      #1d49e7;
  --mo-brand-soft:       #3B82F6;   /* UI 高亮用：代码块竖边 / 顶栏当前项 / TOC 当前项 / 搜索 focus */
  --mo-brand-sidebar:    #2563EB;   /* 侧边栏当前项文字（略深） */
  --mo-cyan:             #31edff;
  --mo-lavender:         #8b7cf0;

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

  /* 中性灰 */
  --mo-ink-900:    #111827;
  --mo-ink-800:    #1F2937;   /* 顶栏 hover / TOC hover / tab 激活文字 */
  --mo-ink-700:    #374151;   /* 顶栏默认 */
  --mo-ink-600:    #4B5563;
  --mo-ink-500:    #6B7280;   /* 品牌字右边的 Docs 小字 */
  --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-font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mo-font-mono: 'JetBrains Mono', 'SF Mono', Menlo, ui-monospace, Consolas, monospace;

  /* 文档导航 */
  --mo-nav-radius:       8px;
  --mo-nav-indent:       18px;
  --mo-nav-height-l2:    36px;
  --mo-nav-height-l3:    34px;
  --mo-nav-hover-bg:     #F1F5F9;
  --mo-nav-active-bg:    #EAF3FF;
  --mo-nav-active-color: #1E40AF;

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


/* ============================================================
   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;
}

body {
  --font-stack: var(--mo-font-sans);
  --font-stack--headings: var(--mo-font-sans);
  font-family: var(--mo-font-sans);
  font-size: 16px;
  line-height: 1.75;
}
/* 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 !important;
}
body:not([data-theme="dark"]) .sidebar-drawer {
  border-right: none;
}
body:not([data-theme="dark"]) .toc-drawer {
  border-left: none;
}
@media (min-width: 1100px) {
  body:not([data-theme="dark"]) .sidebar-drawer,
  body:not([data-theme="dark"]) .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。
   MatrixOne 与 Intelligence 统一使用可信、清晰的企业蓝色，
   所有用 var(--mo-primary / --mo-brand-soft / 紫面色) 的地方自动跟着切换:
   代码块左竖边、顶栏/TOC 当前项、侧边栏 hover、搜索 focus、链接、按钮 hover…… */
html[data-product="intelligence"] {
  --mo-primary:        #2563EB;
  --mo-primary-600:    #1D4ED8;
  --mo-brand-soft:     #3B82F6;
  --mo-brand-sidebar:  #2563EB;
  --mo-surface-150:    #DBEAFE;
}
html[data-product="intelligence"] body:not([data-theme="dark"]) {
  --color-brand-primary: #2563EB;
  --color-brand-content: #2563EB;
  --color-link:          #2563EB;
  --color-link--hover:   #1D4ED8;
}
html[data-product="intelligence"] body[data-theme="dark"] {
  --color-brand-primary: #93C5FD;
  --color-brand-content: #93C5FD;
  --color-link:          #93C5FD;
  --color-link--hover:   #BFDBFE;
  --mo-brand-soft:       #93C5FD;
}

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


/* ============================================================
   3. 正文排版
   ============================================================ */
article[role="main"] {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 48px;
}

/* 短文章的翻页导航紧跟正文，不再被 Furo 推到视口底部。 */
.content {
  justify-content: flex-start;
}

.content > footer {
  margin-top: 24px;
}

@media (min-width: 1100px) {
  .main {
    min-width: 0;
    flex: 1 1 auto;
  }
  .sidebar-drawer {
    flex: 0 0 15rem;
    width: 15rem;
    min-width: 15rem;
    justify-content: flex-start;
  }
  .sidebar-container {
    width: 14rem;
    margin-left: 1rem;
  }
  .content {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding-left: clamp(2rem, 3vw, 3.5rem);
    padding-right: clamp(2rem, 3vw, 3.5rem);
  }
  article[role="main"] {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  .toc-content-icon {
    display: none;
  }
  .toc-drawer {
    flex: 0 0 15.5rem;
    width: 15.5rem;
    min-width: 15.5rem;
    height: auto;
    top: auto;
    left: auto;
    right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* 最后更新时间（正文末尾） */
.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 正文链接：克制蓝（GitHub / Stripe 风）
   默认中等饱和蓝 + 半透明淡蓝下划线；hover 加深 + 下划线变实。
   visited 由顶部全局规则拦掉浏览器紫，继承到这里的颜色。 */
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card),
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):visited {
  color: #2563EB !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(37, 99, 235, 0.3);
  transition: color 0.15s, text-decoration-color 0.15s;
}
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):hover,
article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):visited:hover {
  color: #1D4ED8 !important;
  text-decoration-color: rgba(37, 99, 235, 0.8);
}

/* 暗色模式正文链接 */
body[data-theme="dark"] article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card),
body[data-theme="dark"] article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):visited {
  color: #6b8cff !important;
  text-decoration-color: rgba(107, 140, 255, 0.3);
}
body[data-theme="dark"] article[role="main"] a:not(.headerlink):not(.toc-backref):not(.sd-stretched-link):not(.sd-card):hover {
  color: #9db1ff !important;
  text-decoration-color: rgba(107, 140, 255, 0.8);
}

/* "目录式列表"：li 中只有一个链接子元素时，默认无下划线、克制蓝；hover 才出实下划线。 */
article[role="main"] li > a:only-child,
article[role="main"] li > a:only-child:visited {
  text-decoration: none;
  color: #2563EB !important;
}
article[role="main"] li > a:only-child:hover,
article[role="main"] li > a:only-child:visited:hover {
  color: #1D4ED8 !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
body[data-theme="dark"] article[role="main"] li > a:only-child,
body[data-theme="dark"] article[role="main"] li > a:only-child:visited {
  color: #6b8cff !important;
}
body[data-theme="dark"] article[role="main"] li > a:only-child:hover {
  color: #9db1ff !important;
}

/* 加粗链接：保留蓝，靠字重区分而不是颜色 */
article[role="main"] strong a,
article[role="main"] b a,
article[role="main"] a strong,
article[role="main"] a b {
  color: #2563EB !important;
}
body[data-theme="dark"] article[role="main"] strong a,
body[data-theme="dark"] article[role="main"] b a,
body[data-theme="dark"] article[role="main"] a strong,
body[data-theme="dark"] article[role="main"] a b {
  color: #6b8cff !important;
}


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

/* 4a 容器 —— Snowflake 风:冷灰底 + 主色左竖边
   border-left 用 --mo-primary,跟随产品品牌槽:matrixone 蓝、intelligence 紫。
   背景同时设 background-color 和 background,加 !important,
   防 Pygments / sphinx-design / furo 偶发的简写覆盖。 */
.highlight,
div.highlight {
  position: relative;
  background-color: var(--mo-surface-code) !important;
  background: var(--mo-surface-code) !important;
  border: none;
  border-left: 4px solid var(--mo-primary) !important;
  border-radius: 0 var(--mo-radius-md) var(--mo-radius-md) 0 !important;
  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 !important;
  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) !important;
  font-weight: 600 !important;
}

/* 4e 行内 code —— 跟代码块同色系,加 !important 避免被表格/列表里的细规则盖住 */
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 !important;
  border-radius: var(--mo-radius-sm) !important;
  background-color: var(--mo-surface-code) !important;
  background: var(--mo-surface-code) !important;
  color: var(--mo-code-fg) !important;
  border: none;
}
/* 代码块内的 <code>(<pre><code>...</code></pre>)反置回透明:别叠出双重底色 */
pre code,
.highlight pre code {
  background: transparent !important;
  background-color: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: inherit !important;
}

/* 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 !important;
  overflow: visible !important;
  margin: 0 !important;
}
.mo-code-modal .highlight pre {
  max-height: none !important;
}
.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-left-color: var(--mo-brand-soft);
}
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 !important;
}

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 !important;   /* separate 才让 border-radius + overflow:hidden 工作 */
  border-spacing: 0;
  border: none !important;
  margin: 24px 0;
  font-size: 14px;
  color: #1F2937;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #E5E7EB !important;   /* 用阴影代替边框 */
}
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 !important;
  border-right: none !important;
  border-top: none !important;
}

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

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

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

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

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

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


/* ============================================================
   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: #DCFCE7;
  border-left-color: #10B981;
}
.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: #EAF2FB !important;
  background: #EAF2FB !important;
  border-left-color: #60A5FA !important;
}
.admonition.note > .admonition-title,
.admonition.info > .admonition-title,
.admonition.seealso > .admonition-title {
  color: #1E40AF;
}
.admonition.note > .admonition-title::before,
.admonition.info > .admonition-title::before,
.admonition.seealso > .admonition-title::before {
  background-color: #3B82F6 !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; }


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

/* 一级由顶栏承载；左栏从二级开始显示。 */
.sidebar-tree .toctree-l1 > label,
.sidebar-tree .toctree-l1 > input.toctree-checkbox {
  display: none !important;
}

.sidebar-tree {
  font-family: var(--mo-font-sans);
  font-size: 15px;
}

.sidebar-tree .mo-sidebar-overview-list {
  margin-bottom: 2px;
}

/* 桌面端正文标题和左侧首项共用同一条 16px 顶部基线。 */
@media (min-width: 63.01em) {
  article[role="main"] {
    padding-top: 16px;
  }

  .sidebar-tree {
    margin-top: 16px;
  }

  /* 隐藏的“主页”仍是前置兄弟，清掉它带给当前一级节点的 2px 间距。 */
  .sidebar-tree > ul > li.toctree-l1.current {
    margin-top: 0;
  }

  /* 侧栏保持在视口内独立滚动，目录较长时不再拉长正文页面。 */
  .sidebar-sticky {
    overflow: hidden;
  }

  .sidebar-scroll {
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, .42) transparent;
  }

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

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

  .sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, .34);
    border-radius: 999px;
  }

  .sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, .52);
  }

  body[data-theme="dark"] .sidebar-scroll {
    scrollbar-color: rgba(148, 163, 184, .42) transparent;
  }

  body[data-theme="dark"] .sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .34);
  }
}

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

.sidebar-tree li > ul {
  margin-left: var(--mo-nav-indent);
}

.sidebar-tree li + li {
  margin-top: 2px;
}

.sidebar-tree label {
  width: 28px;
  height: var(--mo-nav-height-l3);
  right: 4px;
  background: transparent;
  border-radius: var(--mo-nav-radius);
  color: var(--mo-ink-700);
  transition: background-color .15s ease, color .15s ease;
}
.sidebar-tree .toctree-l2 > label {
  height: var(--mo-nav-height-l2);
}
.sidebar-tree label:hover,
.sidebar-tree label:focus-visible {
  background: var(--mo-nav-hover-bg);
  color: var(--mo-ink-900);
  outline: none;
}
.sidebar-tree label .icon svg {
  width: 16px;
  height: 16px;
  opacity: 1;
  transform-origin: center;
  transition: transform .2s ease, opacity .15s ease;
}
.sidebar-tree .toctree-checkbox:not(:checked) ~ label .icon svg {
  transform: rotate(0deg);
}
.sidebar-tree .toctree-checkbox:checked ~ label .icon svg {
  transform: rotate(90deg);
}
.sidebar-tree label:hover .icon svg {
  opacity: 1;
}

/* 分组标题 */
.sidebar-tree .caption,
.sidebar-tree p.caption,
.sidebar-tree :not(.caption) > .caption-text {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--mo-ink-900) !important;
  padding: 16px 12px 8px !important;
  margin: 0 !important;
}
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 !important;
}

.sidebar-tree .mo-sidebar-group-heading {
  margin-top: 8px;
  pointer-events: none;
}

.sidebar-tree .mo-sidebar-group-heading > .caption-text {
  display: block;
  padding: 8px 12px 4px !important;
}

/* 链接行：L2 文字从 12px 开始，L3 及以后每级增加 18px。 */
.sidebar-tree a.reference,
.sidebar-tree a.reference:link,
.sidebar-tree a.reference:visited {
  display: flex;
  align-items: center;
  min-height: var(--mo-nav-height-l3);
  height: auto;
  box-sizing: border-box;
  padding: 7px 12px;
  color: var(--mo-ink-600) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 21px;
  text-decoration: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--mo-nav-radius);
  box-shadow: none !important;
  transition: background-color .15s ease, color .15s ease;
}
.sidebar-tree .toctree-l2 > a.reference {
  min-height: var(--mo-nav-height-l2);
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600 !important;
}
.sidebar-tree .toctree-l3 > a.reference,
.sidebar-tree .toctree-l4 > a.reference {
  font-size: 14.5px;
}
.sidebar-tree li.has-children > a.reference {
  padding-right: 38px;
}
.sidebar-tree a.reference:hover,
.sidebar-tree a.reference:visited:hover {
  background: var(--mo-nav-hover-bg) !important;
  color: var(--mo-ink-800) !important;
}

/* 只有最终页面有选中态；祖先 .current 仅负责保持树展开。 */
.sidebar-tree li.current-page > a.reference,
.sidebar-tree li.current-page > a.reference:link,
.sidebar-tree li.current-page > a.reference:visited,
.sidebar-tree a.reference[aria-current="page"] {
  background: var(--mo-nav-active-bg) !important;
  color: var(--mo-nav-active-color) !important;
  font-weight: 600 !important;
}
.sidebar-tree a.reference strong {
  font-weight: inherit !important;
}

body[data-theme="dark"] .sidebar-tree a.reference,
body[data-theme="dark"] .sidebar-tree a.reference:link,
body[data-theme="dark"] .sidebar-tree a.reference:visited {
  background: transparent !important;
  color: #94a3b8 !important;
}
body[data-theme="dark"] .sidebar-tree label {
  color: #cbd5e1;
}
body[data-theme="dark"] .sidebar-tree a.reference:hover,
body[data-theme="dark"] .sidebar-tree a.reference:visited:hover,
body[data-theme="dark"] .sidebar-tree label:hover,
body[data-theme="dark"] .sidebar-tree label:focus-visible {
  background: rgba(148, 163, 184, .10) !important;
  color: #e2e8f0 !important;
}
body[data-theme="dark"] .sidebar-tree li.current-page > a.reference,
body[data-theme="dark"] .sidebar-tree li.current-page > a.reference:visited,
body[data-theme="dark"] .sidebar-tree a.reference[aria-current="page"] {
  background: rgba(96, 165, 250, .16) !important;
  color: #bfdbfe !important;
  font-weight: 600 !important;
}

/* 指南侧栏的大模块入口：概览、三个平台与账户计费形成视觉锚点。 */
.sidebar-tree .toctree-l2 > a.mo-sidebar-module-link {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700 !important;
  color: var(--mo-ink-900) !important;
}

/* 概览是第一块，不加分隔线；其余大模块从横线后开始。 */
.sidebar-tree .toctree-l2.mo-sidebar-module--divided {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--mo-border-100);
}
.sidebar-tree .toctree-l2.mo-sidebar-module--divided > label {
  top: 10px;
}

.sidebar-tree .toctree-l2.mo-sidebar-module.current-page > a.mo-sidebar-module-link {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700 !important;
  color: var(--mo-nav-active-color) !important;
}

.sidebar-tree .toctree-l2.mo-sidebar-module.current > a.mo-sidebar-module-link {
  color: var(--mo-nav-active-color) !important;
}

.sidebar-tree .toctree-l2 > ul {
  margin: 2px 0 6px 14px;
  padding-left: 6px;
  border-left: 1px solid var(--mo-border-100);
}

body[data-theme="dark"]
  .sidebar-tree .toctree-l2.mo-sidebar-module:not(.current-page) > a.mo-sidebar-module-link {
  color: #e2e8f0 !important;
}
body[data-theme="dark"] .sidebar-tree .toctree-l2.mo-sidebar-module--divided {
  border-top-color: rgba(148, 163, 184, .22);
}
body[data-theme="dark"] .sidebar-tree .toctree-l2 > ul {
  border-left-color: rgba(148, 163, 184, .22);
}


/* ============================================================
   8. 右侧 TOC（页面大纲）
   ============================================================ */
/* TOC 标题：隐藏 Furo 默认 "On this page" 文本，用 ::before 注入更克制的版本 */
.toc-title { display: none !important; }
.toc-title-container {
  padding: 12px;
  margin: 0 0 4px;
}
.toc-title-container::before {
  content: "本页内容";
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0 8px;
  border-bottom: 1px solid #F1F5F9;
}
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 !important; }

.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;
}
/* 当前项：主色文字 + 2px 主色竖条，字重 500 */
.toc-tree a.scroll-current,
.toc-tree a.current {
  color: var(--mo-brand-soft);
  font-weight: 500;
  border-left-color: var(--mo-brand-soft);
}

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 a.scroll-current,
body[data-theme="dark"] .toc-tree a.current {
  color: #6b8cff;
  border-left-color: #6b8cff;
}

/* （旧版右栏 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: 12px 32px 16px;
  column-gap: 32px;
  row-gap: 8px;
}

/* 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; }
.mo-topbar__logo {
  height: 28px;
  width: auto;
  display: block;
}
.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: 7px;
  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);
}
.mo-product-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  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-product-switcher.is-open .mo-product-menu { display: block; }
.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__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #1F2937;
  cursor: pointer;
  text-decoration: none;
}
.mo-product-menu__item:hover {
  background: #F8FAFC;
  color: #004af0;
  text-decoration: none;
}
.mo-product-menu__item.is-active {
  background: #EFF6FF;
  color: #004af0;
}
.mo-product-menu__item.is-active svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}
.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-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 8px 24px rgba(0,0,0,.4);
}
body[data-theme="dark"] .mo-product-menu__heading,
body[data-theme="dark"] .mo-product-menu__meta {
  color: #94A3B8;
}
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: #6b8cff;
}
body[data-theme="dark"] .mo-product-menu__item.is-active {
  background: rgba(107,140,255,.15);
  color: #6b8cff;
}

/* 9c 主导航：一级入口使用轻量圆角矩形反馈 */
.mo-topbar__tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  order: 3;
  flex: 0 0 100%;
  width: 100%;
  height: 48px;
}
.mo-topbar__tab,
.mo-topbar__tab:link,
.mo-topbar__tab:visited {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500 !important;
  color: #374151 !important;
  background: transparent;
  text-decoration: none !important;
  border: 0;
  border-radius: var(--mo-nav-radius);
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.mo-topbar__tab:not(.mo-topbar__tab--active):hover,
.mo-topbar__tab:not(.mo-topbar__tab--active):visited:hover {
  color: #1F2937 !important;
  background: #F1F5F9;
  font-weight: 500 !important;
  text-decoration: none !important;
}
.mo-topbar__tab--active,
.mo-topbar__tab--active:link,
.mo-topbar__tab--active:visited {
  color: #2563EB !important;
  background: #EFF6FF;
  font-weight: 600 !important;
}
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 !important; }
body[data-theme="dark"] .mo-topbar__tab:not(.mo-topbar__tab--active):hover {
  color: #e5e7eb !important;
  background: rgba(148, 163, 184, .10);
}
body[data-theme="dark"] .mo-topbar__tabs .mo-topbar__tab--active,
body[data-theme="dark"] .mo-topbar__tabs .mo-topbar__tab--active:link,
body[data-theme="dark"] .mo-topbar__tabs .mo-topbar__tab--active:visited {
  color: #bfdbfe !important;
  background: rgba(96, 165, 250, .16);
}

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

/* 9e 搜索框 320 × 36 */
.mo-topbar__search {
  position: relative;
  width: 320px;
}
.mo-topbar__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #6B7280;
  pointer-events: none;
}
.mo-topbar__search input {
  width: 100%;
  height: 36px;
  padding: 0 44px 0 38px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #F8FAFC;
  color: #1F2937;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.mo-topbar__search input::placeholder { color: #9CA3AF; }
.mo-topbar__search input:focus {
  border-color: #3B82F6;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.mo-topbar__search kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 6px;
  font-family: var(--mo-font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #6B7280;
  background: #F3F4F6;
  border: none;
  border-radius: 4px;
  pointer-events: none;
  line-height: 1;
}
body[data-theme="dark"] .mo-topbar__search input {
  background: #161B22;
  border-color: #30363D;
  color: #E6EDF3;
}
body[data-theme="dark"] .mo-topbar__search input::placeholder { color: #6E7781; }
body[data-theme="dark"] .mo-topbar__search kbd {
  background: #21262D;
  color: #9CA3AF;
}

/* 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 !important; }
.mo-topbar__actions .theme-toggle {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6B7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.mo-topbar__actions .theme-toggle:hover {
  background: #F3F4F6;
  color: #1F2937;
}
body[data-theme="dark"] .mo-topbar__actions .theme-toggle:hover {
  background: rgba(148,163,184,.12);
  color: #e5e7eb;
}

/* 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-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; }

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

/* 响应式 */
@media (max-width: 63em) {
  /* Furo 在同一断点启用带侧栏开关的移动端 header。
     此时停用桌面 topbar，避免两套导航和主题按钮同时占据首屏。 */
  .mo-topbar { display: none; }
  body { padding-top: 0; }
  .sidebar-sticky,
  .toc-sticky {
    top: 0;
    height: 100vh;
  }
  .sidebar-brand,
  .sidebar-search-container { display: flex; }
}
@media (max-width: 1100px) {
  .mo-topbar__search { width: 240px; }
}
@media (max-width: 960px) {
  .mo-topbar__inner { padding: 12px 16px 16px; 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-topbar__search kbd { display: none; }
  .mo-product-pill { max-width: 180px; }
}
@media (max-width: 640px) {
  .mo-topbar__title,
  .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 !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;
}

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 !important;
  color: #e5e7eb !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}


/* ============================================================
  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;
}

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

.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; }


/* —— 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);
}
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: #2563eb;
  margin: 4px 0 14px;
}
.mo-card-icon svg { width: 22px; height: 22px; }
body[data-theme="dark"] .mo-card-icon {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}
/* :has() 将图标和卡片悬浮态保持为同一套蓝色反馈。 */
.sd-card:has(.mo-card-icon):hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.13);
}
body[data-theme="dark"] .sd-card:has(.mo-card-icon):hover {
  border-color: #60a5fa !important;
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.18);
}
.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(59, 130, 246, 0.24);
}


/* ============================================================
  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;
}


/* ============================================================
  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: 280px 1fr;
  gap: 56px;
  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) !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  transition: color .15s, border-color .15s, background .15s;
}
.mo-footer-social:hover {
  color: #fff !important;
  border-color: rgba(255,255,255,.32);
  background: rgba(255,255,255,.04);
}
.mo-footer-nav {
  display: grid;
  grid-template-columns: .9fr 1.15fr .75fr 1fr minmax(246px, 1.45fr);
  gap: 32px;
}
.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: flex;
  flex-direction: column;
  gap: 12px;
}
.mo-footer-link,
.mo-footer-link:link,
.mo-footer-link:visited {
  color: rgba(255,255,255,.62) !important;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none !important;
  transition: color .15s;
}
.mo-footer-link:hover { color: #fff !important; }
.mo-footer-qr-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 12px;
}
.mo-footer-follow {
  min-width: 246px;
}
.mo-footer-follow .mo-footer-title {
  text-align: center;
}
.mo-footer-qr {
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.52);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}
.mo-footer-qr img {
  width: 66px;
  height: 66px;
  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) !important;
  text-decoration: none !important;
  transition: color .15s;
}
.mo-footer-legal-link:hover { color: rgba(255,255,255,.78) !important; }
.mo-footer-sep { color: rgba(255,255,255,.28); }


/* ============================================================
  18. 页面动效与交互层次
   ============================================================ */
html {
  scroll-behavior: smooth;
}

body:not([data-theme="dark"]) {
  background-image:
    radial-gradient(circle at 50% -180px, rgba(37, 99, 235, .07), transparent 460px),
    linear-gradient(180deg, rgba(255, 255, 255, .34), transparent 420px);
  background-attachment: fixed;
}

.mo-topbar {
  transition: background-color .24s ease, box-shadow .24s ease, backdrop-filter .24s ease;
}
.mo-page-scrolled .mo-topbar {
  background: rgba(247, 250, 252, .9);
  box-shadow: 0 8px 28px rgba(15, 23, 42, .07);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
body[data-theme="dark"].mo-page-scrolled .mo-topbar {
  background: rgba(13, 17, 23, .88);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .28);
}

article[role="main"] {
  animation: mo-content-enter .38s cubic-bezier(.2, .75, .25, 1) both;
}
article[role="main"] > h1:first-child::after,
article[role="main"] > section:first-child > h1:first-child::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 13px;
  border-radius: 999px;
  background: var(--mo-gradient-brand);
  opacity: .82;
}

.mo-topbar__tab,
.sidebar-tree a.reference,
.toc-tree a {
  will-change: transform;
}
.mo-topbar__tab {
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}
.mo-topbar__tab:not(.mo-topbar__tab--active):hover {
  transform: translateY(-1px);
}
.mo-topbar__tab--active {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08), 0 3px 10px rgba(37, 99, 235, .07);
}

.sidebar-tree a.reference {
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.sidebar-tree a.reference:hover {
  transform: translateX(2px);
}
.sidebar-tree li.current-page > a.reference,
.sidebar-tree a.reference[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--mo-brand-sidebar) !important;
}
.toc-tree a {
  transition: color .16s ease, border-color .16s ease, transform .16s ease;
}
.toc-tree a:hover {
  transform: translateX(2px);
}

.sd-card,
.admonition,
.highlight,
div.highlight {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.sd-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .09) !important;
}
.admonition:hover,
.highlight:hover,
div.highlight:hover {
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.related-pages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  clear: both;
}
.related-pages a {
  float: none !important;
  clear: none !important;
  box-sizing: border-box;
  width: 100%;
  max-width: none !important;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid var(--color-background-border);
  border-radius: 12px;
  background: var(--color-background-secondary);
  color: var(--color-foreground-primary);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.related-pages a.prev-page {
  grid-column: 1;
  grid-row: 1;
}
.related-pages a.next-page {
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-end;
}
.related-pages a .page-info .title {
  color: var(--color-foreground-primary);
  font-weight: 600;
  text-decoration: none;
}
.related-pages a svg.furo-related-icon {
  box-sizing: content-box;
  width: 16px;
  height: 16px;
  margin: 0 2px 0 10px;
  padding: 8px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .08);
  color: var(--mo-brand-sidebar);
}
.related-pages a.prev-page svg.furo-related-icon {
  margin: 0 10px 0 2px;
  transform: rotate(180deg);
}
.related-pages a:hover {
  border-color: rgba(37, 99, 235, .28);
  background: rgba(37, 99, 235, .055);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}
.related-pages a:hover .page-info .title {
  color: var(--mo-brand-sidebar);
  text-decoration: none;
}
.related-pages a:focus-visible {
  outline: none;
  border-color: rgba(37, 99, 235, .52);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18), 0 10px 26px rgba(15, 23, 42, .08);
}
.related-pages a.next-page:hover svg {
  transform: scale(1.08);
}
.related-pages a.prev-page:hover svg {
  transform: rotate(180deg) scale(1.08);
}
.related-pages a svg {
  transition: transform .18s ease;
}

body[data-theme="dark"] .related-pages a {
  background: rgba(255, 255, 255, .025);
  border-color: rgba(148, 163, 184, .2);
}
body[data-theme="dark"] .related-pages a:hover {
  background: rgba(59, 130, 246, .1);
  border-color: rgba(96, 165, 250, .38);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .24);
}

@media (max-width: 640px) {
  .related-pages {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .related-pages a.prev-page,
  .related-pages a.next-page {
    grid-column: 1;
    grid-row: auto;
  }
  .related-pages a.prev-page { order: 1; }
  .related-pages a.next-page { order: 2; }
}

.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;
}

:is(a, button, input, label)[tabindex]:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(59, 130, 246, .22);
  outline-offset: 2px;
}

@keyframes mo-content-enter {
  from { opacity: .35; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mo-popover-enter {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  article[role="main"],
  .mo-product-menu,
  .mo-lang-menu,
  .mo-version-menu {
    animation: none !important;
  }
  .mo-topbar,
  .mo-topbar__tab,
  .sidebar-tree a.reference,
  .toc-tree a,
  .sd-card,
  .admonition,
  .highlight,
  .related-pages a,
  .related-pages a svg {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1024px) {
  .mo-footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .mo-footer-nav {
    grid-template-columns: repeat(3, 1fr);
    gap: 34px;
  }
}
@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));
    gap: 32px 20px;
  }
  .mo-footer-follow {
    grid-column: 1 / -1;
    justify-self: center;
  }
  .mo-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .mo-footer-legal { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .mo-footer-qr-list { gap: 10px; }
}


/* ============================================================
  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: #2563EB;
  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: #2563EB;
  border: 1px solid #2563EB;
  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 !important;
  text-decoration: none !important;
  transition: color .15s;
}
.mo-sidebar-edit a:hover { color: #2563EB !important; }
.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 !important; }
body[data-theme="dark"] .mo-sidebar-edit a:hover { color: #58A6FF !important; }


/* ============================================================
  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;
}
#search-results {
  scroll-margin-top: calc(var(--mo-topbar-h) + 20px);
}

.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;
  }
}

@media (max-width: 63em) {
  #search-results { scroll-margin-top: calc(var(--header-height) + 20px); }
}

/* 独立搜索工作区：保留全站导航，移除正文页侧栏并强化检索层级。 */
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 .sidebar-drawer,
body.mo-search-page .toc-drawer,
body.mo-search-page .content-icon-container {
  display: none !important;
}
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;
  }
}


/* ============================================================
  19. 顶部工作台（开发者平台风格）
   ============================================================ */
:root {
  --mo-topbar-h: 124px;
}
.mo-topbar {
  background: rgba(252, 253, 255, .96);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}
.mo-topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: #2563eb;
  opacity: .9;
  pointer-events: none;
}
.mo-topbar::after {
  left: 0;
  right: 0;
  background: #e7ebf0;
}
.mo-topbar__inner {
  padding: 13px 32px 13px;
  column-gap: 28px;
  row-gap: 7px;
}
.mo-topbar__identity {
  gap: 12px;
}
.mo-topbar__logo {
  height: 30px;
}
.mo-topbar__docs {
  padding-left: 10px;
  border-left: 1px solid #d9dee7;
  color: #667085;
  font-size: 13px;
  font-weight: 550;
}

.mo-product-pill {
  height: 38px;
  max-width: 236px;
  padding: 0 12px;
  gap: 9px;
  border-color: #d8dee8;
  border-radius: 9px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), inset 0 1px 0 rgba(255,255,255,.7);
}
.mo-product-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.mo-product-pill:hover,
.mo-product-switcher.is-open .mo-product-pill {
  border-color: #aeb9c8;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}

.mo-topbar__search {
  box-sizing: border-box;
  width: 340px;
  height: 40px;
  border: 1px solid #d7dde7;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .035), 0 1px 2px rgba(15, 23, 42, .025);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.mo-topbar__search:hover {
  border-color: #b9c2cf;
  background: #fff;
}
.mo-topbar__search:focus-within {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .11), 0 4px 14px rgba(15, 23, 42, .06);
}
.mo-topbar__search input {
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
  padding-left: 40px;
  padding-right: 48px;
  color: #172033;
  font-size: 13.5px;
  box-shadow: none !important;
}
.mo-topbar__search input:focus {
  border: 0;
  background: transparent;
}
.mo-topbar__search-icon {
  left: 13px;
  width: 17px;
  height: 17px;
  color: #657188;
}
.mo-topbar__search kbd {
  right: 8px;
  min-width: 24px;
  padding: 4px 6px;
  border: 1px solid #d8dee8;
  border-bottom-color: #c3cad5;
  border-radius: 6px;
  background: #fff;
  color: #667085;
  box-shadow: 0 1px 1px rgba(15, 23, 42, .06);
  text-align: center;
}

.mo-topbar__tools {
  gap: 10px;
}
.mo-topbar__actions {
  box-sizing: border-box;
  min-width: 0;
  height: 40px;
  padding: 3px;
  gap: 2px;
  border: 1px solid #d7dde7;
  border-radius: 10px;
  background: #f4f6f9;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 1px 2px rgba(15,23,42,.03);
}
.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-topbar__actions .theme-toggle-container {
  position: relative;
  height: 32px;
  padding-left: 3px;
}
.mo-topbar__actions .theme-toggle-container::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: #d7dde7;
}
.mo-topbar__actions .theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: #667085;
}
.mo-topbar__actions .theme-toggle:hover {
  background: #fff;
  color: #172033;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .09);
}

.mo-topbar__tabs {
  height: 42px;
  gap: 12px;
}
.mo-topbar__tab,
.mo-topbar__tab:link,
.mo-topbar__tab:visited {
  box-sizing: border-box;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  color: #475467 !important;
  font-size: 13.5px;
  font-weight: 550 !important;
}
.mo-topbar__tab:not(.mo-topbar__tab--active):hover,
.mo-topbar__tab:not(.mo-topbar__tab--active):visited:hover {
  background: #eef1f5;
  color: #172033 !important;
}
.mo-topbar__tab--active,
.mo-topbar__tab--active:link,
.mo-topbar__tab--active:visited {
  box-sizing: border-box;
  min-height: 32px;
  padding: 0 11px;
  background: #eff6ff;
  color: #2563eb !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08), 0 3px 10px rgba(37, 99, 235, .07);
}

.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);
}

.mo-page-scrolled .mo-topbar {
  background: rgba(252, 253, 255, .91);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .085), 0 1px 0 rgba(15, 23, 42, .06);
}

body[data-theme="dark"] .mo-topbar {
  background: rgba(10, 14, 21, .97);
  box-shadow: 0 1px 0 #252c37;
}
body[data-theme="dark"] .mo-topbar::after { background: #252c37; }
body[data-theme="dark"] .mo-topbar__docs {
  border-left-color: #343c49;
  color: #8f9bad;
}
body[data-theme="dark"] .mo-product-pill {
  border-color: #343c49;
  background: #131923;
  color: #eef2f7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
body[data-theme="dark"] .mo-topbar__search {
  border-color: #343c49;
  background: #111720;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.18);
}
body[data-theme="dark"] .mo-topbar__search:hover,
body[data-theme="dark"] .mo-topbar__search:focus-within {
  border-color: #506077;
  background: #151c27;
}
body[data-theme="dark"] .mo-topbar__search:focus-within {
  border-color: #4f86ff;
  box-shadow: 0 0 0 3px rgba(79, 134, 255, .14);
}
body[data-theme="dark"] .mo-topbar__search input {
  background: transparent;
  color: #eef2f7;
}
body[data-theme="dark"] .mo-topbar__search kbd {
  border-color: #394251;
  border-bottom-color: #4a5567;
  background: #1d2531;
  color: #9aa6b8;
}
body[data-theme="dark"] .mo-topbar__actions {
  border-color: #343c49;
  background: #111720;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
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);
}
body[data-theme="dark"] .mo-topbar__actions .theme-toggle-container::before {
  background: #343c49;
}
body[data-theme="dark"] .mo-topbar__tab,
body[data-theme="dark"] .mo-topbar__tab:visited {
  color: #9aa6b8 !important;
}
body[data-theme="dark"] .mo-topbar__tab:not(.mo-topbar__tab--active):hover {
  background: #171e29;
  color: #eef2f7 !important;
}
body[data-theme="dark"] .mo-topbar__tabs .mo-topbar__tab--active,
body[data-theme="dark"] .mo-topbar__tabs .mo-topbar__tab--active:link,
body[data-theme="dark"] .mo-topbar__tabs .mo-topbar__tab--active:visited {
  background: rgba(96, 165, 250, .16);
  color: #bfdbfe !important;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .12);
}
body[data-theme="dark"].mo-page-scrolled .mo-topbar {
  background: rgba(10, 14, 21, .91);
  box-shadow: 0 12px 34px rgba(0,0,0,.34), 0 1px 0 #252c37;
}

@media (max-width: 1100px) {
  .mo-topbar__search { width: 260px; }
}
@media (max-width: 960px) {
  .mo-topbar__inner { padding-left: 18px; padding-right: 18px; }
  .mo-topbar__search { width: 210px; }
  .mo-topbar__tab,
  .mo-topbar__tab:link,
  .mo-topbar__tab:visited { padding-left: 11px; padding-right: 11px; }
}


/* ============================================================
  20. 页面大纲层级与锚点定位
   ============================================================ */
/* “本页内容”是阅读导航而不是辅助标签，需要在右栏中保持清晰可读。 */
.toc-title-container {
  padding: 14px 12px 8px;
  margin-bottom: 8px;
}
.toc-title-container::before {
  padding-bottom: 10px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--mo-ink-700);
}
body[data-theme="dark"] .toc-title-container::before {
  color: #cbd5e1;
}

/* 重置 Furo 的嵌套缩进，再按标题级别建立稳定、明显的视觉层级。 */
.toc-tree ul,
.toc-tree ul ul {
  margin-left: 0;
  padding-left: 0;
}
.toc-tree li {
  margin: 0;
}
.toc-tree a {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-left: 0;
  padding: 7px 10px 7px 14px;
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
  border-left-width: 2px;
  border-radius: 0 6px 6px 0;
}
.toc-tree > ul > li > ul > li + li {
  margin-top: 2px;
}
.toc-tree > ul > li > ul > li > ul {
  margin: 2px 0 4px;
}
.toc-tree > ul > li > ul > li > ul > li > a {
  padding-left: 30px;
  font-size: 13.5px;
  line-height: 20px;
  font-weight: 400;
  color: var(--mo-ink-500);
}
.toc-tree > ul > li > ul > li > ul > li > ul > li > a {
  padding-left: 46px;
  font-size: 12.75px;
  color: var(--mo-ink-400);
}
.toc-tree a:hover {
  background: rgba(148, 163, 184, .09);
}
.toc-tree a.scroll-current,
.toc-tree a.current {
  background: rgba(59, 130, 246, .08);
  font-weight: 600;
}
body[data-theme="dark"] .toc-tree a:hover {
  background: rgba(148, 163, 184, .08);
}
body[data-theme="dark"] .toc-tree a.scroll-current,
body[data-theme="dark"] .toc-tree a.current {
  background: rgba(96, 165, 250, .12);
}

/* 锚点落在固定顶栏下方 24px，与桌面左侧导航的首行基线对齐。 */
article[role="main"] section[id] {
  scroll-margin-top: calc(var(--mo-topbar-h) + 24px);
}

@media (max-width: 63em) {
  /* 移动端使用 Furo 的单行页头，保留一行呼吸空间。 */
  article[role="main"] section[id] {
    scroll-margin-top: 64px;
  }
}


/* ============================================================
  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;
}

article[role="main"] table {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.045);
}
article[role="main"] table thead {
  background: linear-gradient(90deg, #eff6ff, #f8fafc);
}
article[role="main"] table thead th {
  color: #1e3a8a;
  font-size: 12px;
  letter-spacing: .025em;
}
article[role="main"] table tbody tr {
  transition: background-color .16s ease;
}
article[role="main"] table tbody tr:hover {
  background: rgba(239, 246, 255, .58);
}

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; }
body[data-theme="dark"] article[role="main"] table thead {
  background: linear-gradient(90deg, rgba(30,64,175,.22), rgba(30,41,59,.75));
}
body[data-theme="dark"] article[role="main"] table thead th { color: #bfdbfe; }
body[data-theme="dark"] article[role="main"] table tbody tr:hover {
  background: rgba(30,64,175,.12);
}

@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; }
}
