/* 文档样式 - 参考宇树文档中心配色与排版
 *
 * ========== 全站主内容栏字色约定（ Sphinx 输出的各类 .html ） ==========
 * - 基准：凡落在 .rst-content 内、且未在下面被单独声明的文本，继承 --content-text（#484848）。
 * - 例外：可点击超链 → --link-color（#DA1416）；每页一级 h1 → #2C2C2C；右侧 .page-toc → 独立灰/红；
 *   面包屑 → .wy-breadcrumbs 规则；代码块 /.highlight → 深色主题与高亮色；侧栏 → .wy-nav-side 规则。
 * - 新增文档：勿在 MD/HTML 里写内联 style 改正文色；需要强调用加粗或说明块，不要用额外字色制造层级。
 * - 若全站要调整正文灰：只改 :root 里 --content-text（并视情况同步 --content-heading / --inline-code-token）。
 */

:root {
    --header-bg: #2c2c2c;
    /* 侧栏：TDesign 深色导航（theme=dark） */
    --sidebar-bg: #2C2B2B;
    --sidebar-border: #383838;
    --sidebar-text: rgba(255, 255, 255, 0.92);
    --sidebar-text-muted: rgba(255, 255, 255, 0.55);
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --sidebar-group-bg: #333333;
    --sidebar-menu-radius: 10px;
    --sidebar-item-radius: 8px;
    --sidebar-dot: rgba(255, 255, 255, 0.42);
    /* 选中叶子 pill 相对侧栏/分组左右内缩，避免贴边 */
    --sidebar-leaf-inset: 8px;
    /* 展开箭头相对侧栏内容区右缘的统一距离 */
    --sidebar-expand-right: 16px;
    /* 侧栏各级左缩进（展开/折叠/选中共用，避免跳动） */
    --sidebar-pad-l1: 16px;
    --sidebar-pad-l2: 26px;
    --sidebar-pad-l3: 46px; /* 圆点(约26~31)与文字间隙加大 */
    --sidebar-pad-l4: 28px;
    /* 三级圆点左缘与二级文字左缘对齐，勿小于 --sidebar-pad-l2 */
    --sidebar-dot-left: var(--sidebar-pad-l2);
    /* 四级竖线与圆点中心对齐：dotLeft + dotW/2 - lineW/2 ≈ pad-l2 + 2 */
    --sidebar-l4-line-left: calc(var(--sidebar-pad-l2) + 2px);
    --sidebar-active-bg: #181818;
    --sidebar-active-text: #ffffff;
    --sidebar-active-bar: #0C6CE9;
    --sidebar-current-bg: transparent;
    --sidebar-scrollbar-width: 5px;
    --sidebar-scrollbar-thumb: rgba(255, 255, 255, 0.45);
    --sidebar-scrollbar-thumb-hover: rgba(255, 255, 255, 0.62);
    --sidebar-scrollbar-track: rgba(255, 255, 255, 0.1);
    --content-bg: #ffffff;
    --content-text: #484848;
    --content-heading: #484848;
    /* 与正文一级标题底部分割线同色（文件清单目录树表格外框等复用） */
    --content-h1-divider: #d7dce3;
    --link-color: #0C6CE9;
    --link-hover: #0C6CE9;
    /* 行内 code：与正文同色（不再使用蓝色 #35A0FA，避免表格/标题里像超链） */
    --inline-code-token: var(--content-text);
    --inline-code-api: var(--content-text);
    /* 全站 <code>（含任意页面新加 MD 反引号）默认字重；代码块内见 --code-block-code-weight */
    --inline-code-weight: 600;
    --code-block-code-weight: 400;
    /* 英文/数字优先 Roboto，中文保持思源黑体等回退 */
    --font-sans: "Ti5LatinRoboto", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    /* 右侧「本页导读」与正文间距规则（桌面端） */
    --page-toc-width: 240px;
    --page-toc-right: 40px;
    --page-toc-gap: 0px;
    /* 本页导读外框描边；「返回上一步」与之统一 */
    --page-toc-border: 1px solid #e5e7eb;
    --page-toc-bg: #ffffff;
    /* 「返回上一步」固定于视口顶：与侧栏 Logo 区底缘大致对齐（见 --sidebar-header-height） */
    --ti5-back-btn-top: 100px;
    /* 窄屏：顶栏占位，避免与移动版 .wy-nav-top 重叠 */
    --ti5-back-btn-top-mobile: 98px;
    /* 「返回上一步」：与常见文档站代码块一致——偏下方、黑 transparent 柔边 */
    --ti5-back-btn-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    --ti5-back-btn-shadow-hover: 0 6px 14px rgba(0, 0, 0, 0.1), 0 2px 5px rgba(0, 0, 0, 0.06);
    --ti5-scroll-top-bottom: 60px;
    --ti5-scroll-top-right: 24px;
    /* 语法高亮代码块：底部略重、整体干净（对齐参考截图风格） */
    --code-block-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    /* 正文区插图最大宽度：与「页面简介」1. 首页截图（width=90%）同一视觉尺度；改此处即可全站生效 */
    --rst-content-img-max-width: 90%;
    --sidebar-width: 300px;
    --ti5-sidebar-collapsed-width: 52px;
    --ti5-sidebar-footer-height: 48px;
    --sidebar-doc-title-size: 22px;
    --sidebar-header-height: 88px;
    --sidebar-header-padding-x: 16px;
}

/*
 * 全站 <code>（MD 反引号、Docutils literal 等）：默认半粗；任意新页面无需再单写规则。
 * 语法高亮 /.highlight、pre 内的 code 恢复正常字重，避免块状代码发「假粗」。
 */
code {
    font-weight: var(--inline-code-weight) !important;
}
.highlight code,
pre code {
    font-weight: var(--code-block-code-weight) !important;
}

/* 仅匹配拉丁字符与数字：可让英文/数字优先走 Roboto，中文继续使用中文字体 */
@font-face {
    font-family: "Ti5LatinRoboto";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src:
        local("Roboto"),
        local("Roboto Regular"),
        local("Roboto-Regular"),
        url("./fonts/Roboto-Regular-14.ttf") format("truetype");
    unicode-range: U+0000-024F, U+2000-206F, U+20A0-20CF, U+2100-214F;
}

@font-face {
    font-family: "Ti5LatinRoboto";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src:
        local("Roboto Medium"),
        local("Roboto-Medium"),
        url("./fonts/Roboto-Medium-12.ttf") format("truetype");
    unicode-range: U+0000-024F, U+2000-206F, U+20A0-20CF, U+2100-214F;
}

@font-face {
    font-family: "Ti5LatinRoboto";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src:
        local("Roboto Bold"),
        local("Roboto-Bold"),
        url("./fonts/Roboto-Bold-3.ttf") format("truetype");
    unicode-range: U+0000-024F, U+2000-206F, U+20A0-20CF, U+2100-214F;
}

body,
.wy-nav-side,
.wy-nav-content,
.rst-content,
.wy-breadcrumbs,
.wy-menu-vertical,
.wy-side-nav-search,
.wy-nav-top,
input,
button,
select,
textarea {
    font-family: var(--font-sans) !important;
}

/* 覆盖 RTD 主题给标题/导航单独指定的英文字体 */
.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4,
.rst-content h5,
.rst-content h6,
.wy-menu-vertical a,
.wy-breadcrumbs,
.wy-breadcrumbs a,
.wy-side-nav-search > a {
    font-family: var(--font-sans) !important;
}
body {
    color: var(--content-text);
}

/* ========== 全宽布局：铺满两侧空白，自适应视口 ========== */
html, body, .wy-body-for-nav {
    width: 100%;
    max-width: 100%;
    overflow-x: visible !important;
}

/* 避免页面/侧栏因滚动条出现消失产生“抖动” */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
    /* 禁止平滑滚动：切页/回顶时浏览器若用 smooth 会露出“移动”过程 */
    scroll-behavior: auto !important;
    /* 站内 #锚点 跳转时预留顶栏高度，避免标题贴在视口最上缘或被遮挡 */
    scroll-padding-top: 72px;
}

/* 进一步：正文区也强制固定滚动条占位，避免切页时正文宽度变化导致一起跳动 */
body {
    overflow-y: scroll !important;
    scrollbar-gutter: stable;
}
body::-webkit-scrollbar {
    width: 12px !important;     /* 保留空间 */
}
body::-webkit-scrollbar-track {
    background: transparent !important;
}
body::-webkit-scrollbar-thumb {
    background: transparent !important;
}

/* 侧栏滚动：.wy-nav-side 定高 + flex，.wy-side-scroll 可滚动但不显示滚动条
 * 注意：iframe 内嵌（html.ti5-embed）必须排除，否则 display:flex !important 会压过隐藏规则 → 双菜单栏 */
html:not(.ti5-embed) .wy-nav-side {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    box-sizing: border-box !important;
}
.wy-side-scroll {
    position: relative !important;
    width: 100% !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overflow-anchor: none !important; /* 展开子菜单时禁止浏览器滚动锚定，避免菜单栏上下抖 */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
/* Logo + 搜索：侧栏滚动时吸顶固定 */
.wy-side-nav-search {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    background: var(--sidebar-bg, #2c2b2b) !important;
    background-color: var(--sidebar-bg, #2c2b2b) !important;
}
.wy-side-scroll::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
}
/* 菜单列表自身不滚动，避免出现多条滚动轨道 */
.wy-menu-vertical,
.wy-menu-vertical ul {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.wy-menu-vertical::-webkit-scrollbar,
.wy-menu-vertical ul::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}
.wy-grid-for-nav {
    width: 100% !important;
    max-width: 100% !important;
}
/* 覆盖 RTD 主题的 margin-left:300px，内容区占满剩余空间 */
.wy-nav-content-wrap {
    width: auto !important;
    min-width: 0 !important;
    overflow: visible !important;
}
@media (max-width: 768px) {
    .rst-content {
        padding: 0 16px 24px;
    }
}

/* ========== 顶部导航栏：深灰/黑底、白字 ========== */
.wy-nav-top {
    background: var(--header-bg) !important;
    color: #DCDCDC !important;
    border-bottom: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.wy-nav-top a {
    color: #DCDCDC !important;
}
.wy-nav-top i.fa-bars {
    color: #DCDCDC !important;
}

/* ========== 左侧边栏：TDesign 深色导航 ========== */
.wy-nav-side {
    background: var(--sidebar-bg) !important;
    border-right: 1px solid var(--sidebar-border) !important;
}
.wy-side-nav-search {
    background: var(--sidebar-bg) !important;
    border-bottom: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    text-align: left !important;
}
/* 搜索框：深色半透明底 */
.wy-side-nav-search input[type="text"] {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--sidebar-text);
    box-shadow: none;
    padding: 8px 40px 8px 14px; /* 右侧预留图标空间 */
    transition: border-color 0.2s, background-color 0.2s;
}
.wy-side-nav-search input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.35);
}
.wy-side-nav-search input[type="text"]:focus {
    outline: none;
    border-color: var(--sidebar-active-bg);
    background: rgba(255, 255, 255, 0.1) !important;
}

/* 兼容 Chrome/Edge 的自动填充/高亮 */
.wy-side-nav-search input[type="text"]:-webkit-autofill,
.wy-side-nav-search input[type="text"]:-webkit-autofill:hover,
.wy-side-nav-search input[type="text"]:-webkit-autofill:focus,
.wy-side-nav-search input[type="text"]:-webkit-autofill:active {
    -webkit-text-fill-color: var(--sidebar-text) !important;
    transition: background-color 9999s ease-out 0s;
    box-shadow: 0 0 0 1000px rgba(36, 36, 36, 0.95) inset !important;
    background-color: rgba(36, 36, 36, 0.95) !important;
}

/* 侧栏搜索框：右侧放大镜图标（类似截图样式） */
.wy-side-nav-search .wy-form {
    position: relative;
}
.wy-side-nav-search .wy-form::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: url('./icons/search.svg') no-repeat center center;
    background-size: 24px 24px;
    pointer-events: none;                /* 不挡输入框点击，点击仍聚焦输入框 */
    transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}
/* 鼠标移入搜索区域时，放大镜轻微放大 */
.wy-side-nav-search .wy-form::after {
    filter: brightness(0) invert(1) opacity(0.45);
}
.wy-side-nav-search .wy-form:hover::after {
    transform: translateY(-50%) scale(1.05);
    filter: brightness(0) invert(1) opacity(0.7);
}
/* 鼠标按下（点击）时轻微缩小，模拟按压效果 */
.wy-side-nav-search .wy-form:active::after {
    transform: translateY(-50%) scale(0.95);
    opacity: 0.85;
}
/* 侧栏顶部 logo 区域：完全无黑色/深色背景，与侧栏一致（图片本身无黑底） */
.wy-nav-side .wy-side-nav-search,
div.wy-side-nav-search {
    background: var(--sidebar-bg) !important;
    background-color: var(--sidebar-bg) !important;
}
.wy-side-nav-search > a,
.wy-side-nav-search a[href],
.wy-side-nav-search .icon {
    color: var(--sidebar-text) !important;
    background: none !important;
    background-color: transparent !important;
}
.wy-side-nav-search a img.logo {
    width: 58px;
    height: auto;
    object-fit: contain;
    display: inline-block;
    background: transparent !important;
    margin: 0 !important;
    flex-shrink: 0; /* 父级为 flex：避免窄宽时图标被亚像素压缩产生红/灰边杂色 */
    /* 勿用 crisp-edges / -webkit-optimize-contrast：SVG 经 <img> 放大时易在色块边缘出现错误着色（如「T」左侧红杂块） */
    image-rendering: auto;
}
.wy-side-nav-search > a {
    box-sizing: border-box;
    min-height: var(--sidebar-header-height);
    padding: 0 var(--sidebar-header-padding-x);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 0 !important;
    text-align: center;
}
.wy-side-nav-search [role="search"] {
    padding: 0 var(--sidebar-header-padding-x) 12px;
    box-sizing: border-box;
}
.wy-side-nav-search > a:hover,
.wy-side-nav-search > a:focus {
    background: none !important;
    background-color: transparent !important;
}

/* 侧栏顶部文档标题：与 logo 同行显示 */
.wy-side-nav-search .sidebar-doc-title {
    color: var(--sidebar-text) !important;
    font-size: var(--sidebar-doc-title-size);
    font-weight: 600;
    line-height: 1.2;
    padding: 0;
    margin: 0;
    letter-spacing: 0.2px;
    white-space: nowrap;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left;
}

/* 「关于Ti5Robot技术文档」首页：侧栏不显示文内 H2 锚点（项目简介 / 核心开发指南 / 软件工具使用指南），正文与右侧本页导读不变
 * 说明：当前页在侧栏里会变成 href="#"，仅用 index.html 会匹配失败；不能用全局 a[href="#"]+ul，否则会误伤 T170C 等带子菜单的当前项。
 * 约定：该入口在主导航 toctree 中固定为第一个一级项（首页 index）。 */
.wy-menu-vertical > ul > li.toctree-l1:first-child > a[href$="index.html"] + ul,
.wy-menu-vertical > ul > li.toctree-l1:first-child.current > a.reference.internal[href="#"] + ul {
    display: none !important;
}

/* 「关于Ti5Robot技术文档」：侧栏不显示展开/收起箭头（子菜单已隐藏，无需下拉） */
.wy-menu-vertical > ul > li.toctree-l1:first-child > a[href$="index.html"] > .toctree-expand,
.wy-menu-vertical > ul > li.toctree-l1:first-child.current > a.reference.internal[href="#"] > .toctree-expand {
    display: none !important;
}
.wy-menu-vertical > ul > li.toctree-l1:first-child > a[href$="index.html"],
.wy-menu-vertical > ul > li.toctree-l1:first-child.current > a.reference.internal[href="#"] {
    padding-right: 16px !important;
}
/* 首页「关于」：侧栏子项已隐藏，一级行不铺灰卡片 */
.wy-menu-vertical > ul > li.toctree-l1:first-child.current:has(> a.reference.internal[href="#"]),
.wy-menu-vertical > ul > li.toctree-l1:first-child.current:has(> a[href$="index.html"]) {
    background: transparent !important;
    padding: 0 !important;
    margin: 6px 0 !important;
    border-radius: 0 !important;
}
.wy-menu-vertical > ul > li.toctree-l1:first-child.current:has(> a.reference.internal[href="#"]) > a,
.wy-menu-vertical > ul > li.toctree-l1:first-child.current:has(> a[href$="index.html"]) > a {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
}
/* 「关于」独立页（about_ti5humanoid_docs）：隐藏展开箭头。
 * 根级 index 已由上方 :first-child 规则处理。
 * 切勿再按 href="../index.html" 等相对路径全局隐藏：在 sdk/ros2 等子目录页内，
 * 分组入口同样会写成 ../index.html，会误伤展开后的下拉图标。 */
.wy-menu-vertical li.toctree-l1 > a[href*="about_ti5humanoid_docs"] > .toctree-expand {
    display: none !important;
}

/*（已移除）关于页底部水印 */

/* 隐藏 toctree 中的原 caption（已移至搜索框上方） */
.wy-menu-vertical .caption {
    display: none !important;
}

/* =======================================================================
 * 菜单规范（维护基线，改动菜单样式前先看这里）
 *
 * [M1] 一级菜单（toctree-l1）
 * - 常规 16px；TDesign 深色侧栏：选中叶子灰底 #181818 圆角，一级分组标题加粗。
 *
 * [M2] 二/三/四级菜单（toctree-l2/l3/l4）
 * - 一/二级：无圆点；三级：左侧小圆点；四级：左侧竖线引导 + 浅色字、无圆点。
 * - 选中叶子灰底圆角 pill。
 *
 * [M3] 例外偏移（业务约定）
 * - 一级展开分组：圆角灰底卡片包裹标题与子项（参考宇树/TDesign 深色手风琴）。
 *
 * [M4] 禁止项（避免回归）
 * - 勿恢复浅色侧栏白底 #FEFEFE / 浅蓝 #EDF5FF。
 * - 一/二级勿加圆点；竖线引导仅用于四级子树（l3 > ul）。
 * - 展开/折叠/选中：各级 padding-left 须用 --sidebar-pad-l*，勿随状态改左缩进。
 * ======================================================================= */

/* 侧栏菜单列表：层级分明 */
.wy-menu-vertical ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 8px 0;
    border: none !important;
}
.wy-menu-vertical li {
    list-style: none;
    border: none !important;
}

/* 所有菜单项链接：flex 使三角与文字横向对齐 */
/* 侧栏链与展开按钮：禁用过渡，避免 .current 切换时文字/图标“自身微抖” */
.wy-menu-vertical a,
.wy-menu-vertical .toctree-expand {
    transition: none !important;
}

.wy-menu-vertical li > a {
    display: flex !important;
    align-items: center !important;
    line-height: 20px !important; /* 统一行高，避免各级字号不同导致总高度不一致 */
    box-sizing: border-box !important;
    height: 40px !important;      /* 10(top)+20(line)+10(bottom)=40，强制各级一致 */
    min-height: 40px !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
/* 一级菜单：字号稍大，常规字重（仅红色选中项加粗） */
.wy-menu-vertical li.toctree-l1 > a {
    color: var(--sidebar-text) !important;
    padding: 10px 16px 10px var(--sidebar-pad-l1);
    font-weight: 400 !important;
    font-size: 16px;
    border-left: none !important;
}
.wy-menu-vertical li.toctree-l1 > a:hover {
    background: transparent !important;
    color: var(--sidebar-text) !important;
}
/* 侧栏菜单：悬停保持白字，避免展开瞬间蓝/白闪烁 */
.wy-menu-vertical li > a:hover {
    color: var(--sidebar-text) !important;
}

/* 选中的一级菜单（当前所在分组，例如“软件工具使用指南”）：标题加粗 */
.wy-menu-vertical li.toctree-l1.current > a,
.wy-menu-vertical li.toctree-l1 > a.current {
    font-weight: 600 !important;
}

/* 二/三/四级：默认无 li 级竖线；四级竖线改由 l3 > ul 绘制 */
.wy-menu-vertical li.toctree-l2,
.wy-menu-vertical li.toctree-l3,
.wy-menu-vertical li.toctree-l4 {
    position: relative;
    padding-left: 0;
    border-left: none;
}
/* ROS2/SDK 子树：旧引导线伪元素关闭 */
.wy-menu-vertical li.toctree-l1 > a[href*="ros2/index"] + ul li.toctree-l2::before,
.wy-menu-vertical li.toctree-l1 > a[href*="ros2/index"] + ul li.toctree-l3::before,
.wy-menu-vertical li.toctree-l1 > a[href*="ros2/index"] + ul li.toctree-l4::before,
.wy-menu-vertical li.toctree-l1 > a[href*="sdk/index"] + ul li.toctree-l2::before,
.wy-menu-vertical li.toctree-l1 > a[href*="sdk/index"] + ul li.toctree-l3::before,
.wy-menu-vertical li.toctree-l1 > a[href*="sdk/index"] + ul li.toctree-l4::before {
    content: none !important;
    display: none !important;
}
.wy-menu-vertical li.toctree-l2::before,
.wy-menu-vertical li.toctree-l3::before,
.wy-menu-vertical li.toctree-l4::before {
    content: none !important;
    display: none !important;
}
.wy-menu-vertical li.toctree-l2 > a::before,
.wy-menu-vertical li.toctree-l3 > a::before,
.wy-menu-vertical li.toctree-l4 > a::before {
    content: none !important;
    display: none !important;
}

.wy-menu-vertical li.toctree-l2 > a,
.wy-menu-vertical li.toctree-l3 > a,
.wy-menu-vertical li.toctree-l4 > a {
    position: relative !important;
    overflow: visible !important;
}

/* 一/二级：无圆点；三级：左侧小圆点；四级：无圆点 */
.wy-menu-vertical li.toctree-l1 > a::after,
.wy-menu-vertical li.toctree-l2 > a::after,
.wy-menu-vertical li.toctree-l4 > a::after {
    content: none !important;
    display: none !important;
}
.wy-menu-vertical li.toctree-l3 > a {
    position: relative !important;
    overflow: visible !important;
}
.wy-menu-vertical li.toctree-l3 > a::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: var(--sidebar-dot) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: var(--sidebar-dot-left) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

.wy-menu-vertical li.toctree-l2 > a {
    padding: 10px 16px 10px 8px;
    font-size: 16px;
    padding-left: var(--sidebar-pad-l2) !important;
    font-weight: 400 !important;
}
.wy-menu-vertical li.toctree-l3 > a {
    padding: 10px 16px 10px 8px;
    font-size: 16px;
    padding-left: var(--sidebar-pad-l3) !important;
    font-weight: 400 !important;
}
/* 四级：缩进（文字色与二/三级一致） */
.wy-menu-vertical li.toctree-l4 > a {
    padding: 10px 16px 10px 8px;
    font-size: 15px;
    padding-left: var(--sidebar-pad-l4) !important;
    font-weight: 400 !important;
    color: #ffffff !important;
}
/* 一级菜单子项默认收起，仅 .current 或 .on 时展开 */
.wy-menu-vertical li.toctree-l1 > ul {
    display: none !important;
    padding-left: 0;
    margin-bottom: 3px;
    margin-top: 0;
    border-top: none !important;
    max-height: none !important;
    overflow: visible !important; /* 禁止子菜单自身出现内部滚动条 */
}
/* 兜底：二/三级子菜单也不允许内部滚动，避免左侧出现细竖条滚动轨道 */
.wy-menu-vertical li.toctree-l2 > ul,
.wy-menu-vertical li.toctree-l3 > ul {
    max-height: none !important;
    overflow: visible !important;
    scrollbar-width: none !important;
}
.wy-menu-vertical li.toctree-l2 > ul::-webkit-scrollbar,
.wy-menu-vertical li.toctree-l3 > ul::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
}
/* 主题某些状态会在子菜单 ul 左侧画引导线；仅四级子树保留竖线 */
.wy-menu-vertical li.toctree-l1 > ul,
.wy-menu-vertical li.toctree-l2 > ul {
    border-left: none !important;
    box-shadow: none !important;
    background-image: none !important;
}
/* 三级展开的四级子树：左侧细竖线（参考图中嵌套样式） */
.wy-menu-vertical li.toctree-l3 > ul {
    border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
    margin-left: var(--sidebar-l4-line-left) !important; /* 与三级圆点中心对齐 */
    padding-left: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* 当前页（叶子 current）：勿在 hover 时改字重，避免 synthetic bold 引起文字横向位移 */
.wy-nav-side .wy-menu-vertical li.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.current:not(:has(li.current)) > a:hover {
    border-left: none !important;
    border-radius: var(--sidebar-item-radius) !important;
    font-weight: 500 !important;
    font-synthesis: none !important;
}
/* 选中叶子项：左侧蓝色色块（避免被通用 a::before 隐藏规则吞掉） */
.wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.toctree-l1.current:not(:has(li.current)) > a::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    bottom: auto !important;
    width: 3px !important;
    height: 20px !important;
    transform: translateY(-50%) !important;
    background: var(--sidebar-active-bar) !important;
    border-radius: 2px !important;
    z-index: 2 !important;
    pointer-events: none !important;
}
/* 展开子菜单内选中叶子：TDesign 下无需左延白底 hack */
.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a {
    position: relative !important;
    z-index: 3 !important;
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a:hover {
    padding-left: var(--sidebar-pad-l2) !important;
}
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a:hover {
    padding-left: var(--sidebar-pad-l3) !important;
}
.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a:hover {
    padding-left: var(--sidebar-pad-l4) !important;
}
.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a::before {
    z-index: 4 !important;
}
.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a::after {
    content: none !important;
    display: none !important;
}
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a::after {
    left: var(--sidebar-dot-left) !important;
    background: #ffffff !important;
    z-index: 5 !important;
}
/* 路径上的祖先 current：透明底；三级圆点高亮 */
.wy-menu-vertical li.current:has(li.current) > a,
.wy-menu-vertical li.current:has(li.current) > a:hover {
    background: var(--sidebar-current-bg) !important;
    color: var(--sidebar-text) !important;
    border-left: none !important;
    border-radius: 0 !important;
    font-weight: 400 !important;
}
.wy-menu-vertical li.toctree-l2.current:has(li.current) > a::after,
.wy-menu-vertical li.toctree-l4.current:has(li.current) > a::after {
    content: none !important;
    display: none !important;
}
.wy-menu-vertical li.toctree-l3.current:has(li.current) > a::after {
    background: var(--sidebar-active-bar) !important;
}
/* 用户点击展开的项（.on）：保持深色侧栏白字，勿用 link-color 造成展开闪色 */
.wy-menu-vertical li.on > a,
.wy-menu-vertical li.on > a:hover {
    background: var(--sidebar-current-bg) !important;
    color: var(--sidebar-text) !important;
    border-left: none !important;
    border-radius: 0 !important;
    font-weight: 400 !important;
}
.wy-menu-vertical li.toctree-l2.on > a::after,
.wy-menu-vertical li.toctree-l4.on > a::after {
    content: none !important;
    display: none !important;
}
.wy-menu-vertical li.toctree-l3.on > a::after {
    background: var(--sidebar-dot) !important;
}

/* 覆盖主题默认的 a.current，与选中项统一为 #FEFEFE */
.wy-menu-vertical li a.current,
.wy-menu-vertical li a.current:hover {
    background: var(--sidebar-current-bg) !important;
}
/* 「核心开发指南」默认折叠；点击展开（.on）或当前在子页（.current）时显示 ROS/SDK 子项 */
.wy-menu-vertical li.toctree-l1:has(> a[href*="core_dev/index"]) > ul {
    display: none !important;
}
.wy-menu-vertical li.toctree-l1:has(> a[href*="core_dev/index"]).on:not(.force-collapse) > ul,
.wy-menu-vertical li.toctree-l1:has(> a[href*="core_dev/index"]).current:not(.force-collapse) > ul {
    display: block !important;
}

/* 展开的子菜单区域：深色侧栏透明底（勿用 #FEFEFE，选中项右侧会露白条） */
.wy-menu-vertical li.current > ul,
.wy-menu-vertical li.on > ul {
    display: block !important;
    background: transparent !important;
}
/* 页面级兜底：去掉浅色遮罩伪元素 */
.wy-menu-vertical li.current > ul,
.wy-menu-vertical li.on > ul {
    position: relative;
}
.wy-menu-vertical li.current > ul::before,
.wy-menu-vertical li.on > ul::before {
    display: none !important;
    content: none !important;
}
/* 展开分组容器：与侧栏同色 */
.wy-menu-vertical li.toctree-l1.current,
.wy-menu-vertical li.toctree-l1.on {
    background: transparent !important;
}
/* 当前页所在项被用户点击收起时，强制隐藏子菜单 */
.wy-menu-vertical li.toctree-l1.current.force-collapse > ul,
.wy-menu-vertical li.toctree-l1.on.force-collapse > ul {
    display: none !important;
}
/* 展开区域内：非当前项透明，选中项使用变量背景色 */
.wy-menu-vertical li.current ul li:not(.current) > a,
.wy-menu-vertical li.on ul li:not(.current) > a {
    background: transparent !important;
    font-weight: 400 !important;
}
.wy-menu-vertical li.current ul li.on > a,
.wy-menu-vertical li.on ul li.on > a {
    background: transparent !important;
    color: var(--sidebar-text) !important;
}

/* 自定义展开/收起图标：使用 expand.svg / collapse.svg */
.wy-menu-vertical .toctree-expand {
    flex-shrink: 0;
    display: inline-block !important;
    width: 15px;
    height: 13px;
    min-width: 13px;
    min-height: 13px;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: url('./icons/expand.svg') no-repeat center !important;
    background-size: contain !important;
    cursor: pointer;
    vertical-align: middle;
    text-indent: -9999px;
    overflow: hidden;
}

/* 将展开/收缩图标固定到菜单项最右侧（像参考图那样） */
.wy-menu-vertical li.toctree-l1 > a {
    position: relative;
    padding-right: 40px; /* 给右侧图标预留空间 */
}
.wy-menu-vertical li.toctree-l1 > a > .toctree-expand {
    position: absolute !important;
    right: var(--sidebar-expand-right) !important;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2 !important;
}
/* 展开状态：显示 collapse.svg */
.wy-menu-vertical li.toctree-l1.current:not(.force-collapse) > a > .toctree-expand,
.wy-menu-vertical li.toctree-l1.on:not(.force-collapse) > a > .toctree-expand {
    background: url('./icons/collapse.svg') no-repeat center !important;
    background-size: contain !important;
    transform: translateY(-50%) !important;
}
.wy-menu-vertical .toctree-expand::before,
.wy-menu-vertical .toctree-expand span {
    display: none !important;
}
/* 二级及以下菜单不显示展开三角，只保留一级菜单的三角 */
.wy-menu-vertical li.toctree-l2 .toctree-expand,
.wy-menu-vertical li.toctree-l3 .toctree-expand,
.wy-menu-vertical li.toctree-l4 .toctree-expand {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    overflow: hidden !important;
}
/* 兜底：无论 expand 控件插在 li 还是 a 下，非一级菜单一律不占位 */
.wy-menu-vertical li:not(.toctree-l1) > .toctree-expand,
.wy-menu-vertical li:not(.toctree-l1) > a > .toctree-expand {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    overflow: hidden !important;
}
/* 二级及以下菜单不为右侧控件预留空间，避免出现右侧空白块 */
.wy-menu-vertical li.toctree-l2 > a,
.wy-menu-vertical li.toctree-l3 > a,
.wy-menu-vertical li.toctree-l4 > a {
    padding-right: 16px !important;
}
/* 二级 hub（有子菜单，如 T170C 1.0 / Web / 外骨骼）：右侧展开/收起图标 + 子菜单折叠 */
.wy-menu-vertical li.toctree-l2:has(> ul) > a {
    position: relative;
    padding-right: 40px !important;
}
.wy-menu-vertical li.toctree-l2:has(> ul) > a > .toctree-expand {
    display: inline-block !important;
    width: 15px !important;
    height: 13px !important;
    min-width: 15px !important;
    min-height: 13px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    position: absolute !important;
    /* 一级子树有 leaf-inset，补偿后与一级箭头右缘对齐 */
    right: calc(var(--sidebar-expand-right) - var(--sidebar-leaf-inset)) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: url('./icons/expand.svg') no-repeat center !important;
    background-size: contain !important;
    cursor: pointer !important;
    text-indent: -9999px !important;
    z-index: 2 !important;
}
.wy-menu-vertical li.toctree-l2:has(> ul).current:not(.force-collapse) > a > .toctree-expand,
.wy-menu-vertical li.toctree-l2:has(> ul).on:not(.force-collapse) > a > .toctree-expand {
    background: url('./icons/collapse.svg') no-repeat center !important;
    background-size: contain !important;
}
.wy-menu-vertical li.toctree-l2:has(> ul) > a + ul {
    display: none !important;
}
.wy-menu-vertical li.toctree-l2:has(> ul).current:not(.force-collapse) > a + ul,
.wy-menu-vertical li.toctree-l2:has(> ul).on:not(.force-collapse) > a + ul {
    display: block !important;
}
.wy-menu-vertical li.toctree-l2:has(> ul).current.force-collapse > a + ul {
    display: none !important;
}

/* 三级 hub（有子菜单，如「产品用户手册」）：右侧展开/收起图标 + 子菜单折叠 */
.wy-menu-vertical li.toctree-l3:has(> ul) > a {
    position: relative;
    padding-right: 40px !important;
}
.wy-menu-vertical li.toctree-l3:has(> ul) > a > .toctree-expand {
    display: inline-block !important;
    width: 15px !important;
    height: 13px !important;
    min-width: 15px !important;
    min-height: 13px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    position: absolute !important;
    /* 与二级相同：相对侧栏右缘与一级对齐 */
    right: calc(var(--sidebar-expand-right) - var(--sidebar-leaf-inset)) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: url('./icons/expand.svg') no-repeat center !important;
    background-size: contain !important;
    cursor: pointer !important;
    text-indent: -9999px !important;
    z-index: 2 !important;
}
.wy-menu-vertical li.toctree-l3:has(> ul).current:not(.force-collapse) > a > .toctree-expand,
.wy-menu-vertical li.toctree-l3:has(> ul).on:not(.force-collapse) > a > .toctree-expand {
    background: url('./icons/collapse.svg') no-repeat center !important;
    background-size: contain !important;
}
.wy-menu-vertical li.toctree-l3:has(> ul) > a + ul {
    display: none !important;
}
.wy-menu-vertical li.toctree-l3:has(> ul).current:not(.force-collapse) > a + ul,
.wy-menu-vertical li.toctree-l3:has(> ul).on:not(.force-collapse) > a + ul {
    display: block !important;
}
.wy-menu-vertical li.toctree-l3:has(> ul).current.force-collapse > a + ul {
    display: none !important;
}

/* 面包屑及导航区的分隔线：全局隐藏 */
.rst-content div[role="navigation"] hr {
    display: none !important;
}

/* 正文中的 Markdown 分割线统一隐藏（保留脚本注入的分节线与专用分隔线） */
.rst-content hr:not(.ti5-section-divider):not(.start-server-divider) {
    display: none !important;
}

/* ========== 主内容区：覆盖主题 max-width:800px，防止文字被遮挡 ========== */
section.wy-nav-content-wrap .wy-nav-content,
.wy-nav-content {
    background: var(--content-bg) !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow: visible !important;
    margin: 0 !important;
}
/* 主栏根：全页类型（普通文档 / 搜索 / 索引等）凡使用 RTD 主内容区皆继承此基色 */
.rst-content {
    color: var(--content-text);
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 32px 32px 36px !important;
    font-size: 16px;
    line-height: 1.85;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
}
/* .document / articleBody 随 .rst-content 继承 --content-text；链接、h1、本页导读由更具体规则覆盖 */
.rst-content .document,
.rst-content [itemprop="articleBody"] {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}
.rst-content p,
.rst-content li,
.rst-content td,
.rst-content th {
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

/* 内容区：文字上下间距（对齐宇树文档页的节奏） */
.rst-content p {
    margin: 0;
    padding: 0.35rem 0; /* 段落更紧凑（≈5~6px） */
}
.rst-content ul,
.rst-content ol {
    margin: 0.6em 0;
}
.rst-content li {
    margin: 0.5em 0;
}
.rst-content ul ul,
.rst-content ul ol,
.rst-content ol ul,
.rst-content ol ol {
    margin: 0.6em 0;
}

/*
 * 全站兜底：Markdown 若把「说明段 + 代码块」写在有序列表外，会顶格显示。
 * 对「紧邻 ol 结束的段落 + 其后的高亮代码块」做与编号列表相同的左缩进（与 li 正文对齐）。
 * 已写入 li 的正确结构不受影响（ol 后不会紧跟此类 p）。
 */
.rst-content ol.arabic + p:has(+ div.highlight),
.rst-content ol.arabic + p:has(+ div[class*="highlight"]) {
    margin-left: 2.5em;
    margin-right: 0;
    max-width: calc(100% - 2.5em);
}
.rst-content ol.arabic + p:has(+ div.highlight) + div.highlight,
.rst-content ol.arabic + p:has(+ div[class*="highlight"]) + div[class*="highlight"] {
    margin-left: 2.5em;
    max-width: calc(100% - 2.5em);
}
.rst-content ol.arabic + div.highlight,
.rst-content ol.arabic + div[class*="highlight"] {
    margin-left: 2.5em;
    max-width: calc(100% - 2.5em);
}

/* 表格文字：跟随内容区基础字号（避免主题把表格压小） */
.rst-content table,
.rst-content table td,
.rst-content table th {
    font-size: inherit !important;
}
.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4 {
    color: var(--content-heading);
    font-weight: 600;
    /* 标题与正文上下间距：整体再收紧一点 */
    margin: 1.0em 0 0.3em;
    /* 与 html scroll-padding-top 配合，保证 :target / 地址栏 #id 对准可见标题区域 */
    scroll-margin-top: 72px;
}
.rst-content h1 {
    font-size: 34px;
    color: #2C2C2C !important;
    padding-bottom: 40px !important;
    margin-top: 16px !important;
    border-bottom: 4px solid var(--content-h1-divider);
}
/* 封面主标题：与一级标题同字号/字重（无下划线，避免与 H1 分节线叠层） */
.rst-content p.ti5-cover-title {
    font-size: 28px;
    font-weight: 600;
    color: #2C2C2C !important;
    line-height: 1.3;
    margin: 0.4em 0 0.6em;
}
/* 手册封面：标题 + 图 + 底部说明纵向排布并居中 */
.rst-content .ti5-cover-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100vh - 220px);
    box-sizing: border-box;
    padding: 24px 16px 40px;
}
.rst-content .ti5-cover-block > p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 52em;
}
.rst-content .ti5-cover-block p.ti5-cover-title {
    margin: 0 0 20px;
}
.rst-content .ti5-cover-block img,
.rst-content .ti5-cover-block p:has(> img) {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
}
.rst-content .ti5-cover-block img {
    max-width: min(60%, 432px);
    width: 60%;
    height: auto;
}
.rst-content .ti5-cover-block > p:not(.ti5-cover-title):not(:has(> img)) {
    /* 与正文同步：字号/颜色继承 .wy-nav-content（16px / --content-text） */
    font-size: inherit;
    font-weight: inherit;
    color: var(--content-text);
    line-height: inherit;
    margin: 0.25em 0;
}
.rst-content .ti5-cover-block > p:not(.ti5-cover-title):not(:has(> img)):first-of-type,
.rst-content .ti5-cover-block img + p,
.rst-content .ti5-cover-block p:has(> img) + p {
    margin-top: 28px;
}
/* 一级标题右侧「链接到此标题」图标不展示 */
.rst-content h1 .headerlink {
    display: none !important;
}
.rst-content h1:has(+ p.ti5-doc-version) {
    border-bottom: none;
    padding-bottom: 12px !important;
}
.rst-content p.ti5-doc-version {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 4px solid var(--content-h1-divider);
    font-size: 16px;
    font-weight: 400;
    color: #8a8f98;
    line-height: 1.4;
}
.rst-content h2 { font-size: 32px; padding-bottom: 5px; }

/* 章节序号：全站 H2/H3 由 core_dev_heading_numbers.js 自动注入；MD 原文已有数字前缀时跳过 */
.rst-content .ti5-heading-num {
    font-weight: inherit;
    color: inherit;
}

.rst-content h3 { font-size: 22px !important; }

/* 正文分节：H2 大标题区块内容结束后的分隔线（由 section_dividers.js 注入 hr.ti5-section-divider） */
.rst-content hr.ti5-section-divider {
    display: block !important;
    border: 0;
    border-top: 2px solid var(--content-h1-divider);
    margin: 34px 0 8px;
    padding: 0;
    height: 0;
    background: transparent;
}
.rst-content h4 { font-size: 18px; }
/* Sphinx 常把 id 放在 section 上，锚点跳转目标多为 section */
.rst-content .section,
.rst-content section {
    scroll-margin-top: 72px;
}
/* ROS2 话题定义里的消息名标题（ti5_ros2/msg/...）与“关键消息字段”同字号 */
.rst-content section[id^="ti5-ros2-msg-"] > h3 {
    font-size: 16px !important;
    font-weight: 400 !important;
}

/*
 * 枚举/类型表前说明（如 `MotorRunModeEnum`（节选…）：）：与接口 h3 同 22px。
 * 用「前一张 table + 段落后一张 table」缩小命中范围；first-of-type 避免行首空白文本节点导致 :first-child 失效。
 * .ti5-enum-table-intro 由 auto_notice_style.js 兜底（部分环境 :has 或结构差异时）。
 */
.rst-content p.ti5-enum-table-intro,
.rst-content table + p:has(> code:first-of-type):has(+ table) {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: var(--content-heading) !important;
}
.rst-content p.ti5-enum-table-intro code,
.rst-content table + p:has(> code:first-of-type):has(+ table) code {
    font-size: inherit !important;
}

/* 正文内可跳转链接：品牌红（非链接正文已由 .document / articleBody 基色统一为 #484848） */
.rst-content a {
    color: var(--link-color) !important;
}
.rst-content a:hover {
    color: var(--link-hover) !important;
    text-decoration: underline;
}
/* download 角色包在 code.literal 内，需显式跟正文跳转链接同色 */
.rst-content a.reference.download,
.rst-content a.reference.download code,
.rst-content a.reference.download code span.pre {
    color: var(--link-color) !important;
}
.rst-content a.reference.download:hover,
.rst-content a.reference.download:hover code,
.rst-content a.reference.download:hover code span.pre {
    color: var(--link-hover) !important;
}

/* 上手视频等：网页内嵌播放；PDF/打印仅保留文字链（见 .ti5-pdf-only） */
.rst-content .ti5-pdf-only {
    display: none !important;
}
.rst-content .ti5-web-only {
    display: block !important;
}
.rst-content video.ti5-doc-video {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    /* 飞书超宽素材约 21:9；无 src 时靠封面/比例占位，避免塌成一条线 */
    aspect-ratio: 21 / 9;
    object-fit: contain;
    margin: 12px 0 8px;
    background: #f3f3f3;
    border-radius: 8px;
}

/* 面包屑：格式为「父级 / 当前页」，如「用户指南 / 基本使用」（无底部分隔线） */
.wy-breadcrumbs {
    color: #656565;
    padding-bottom: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}
/* 隐藏主题自带的 ::before 斜杠，避免与下方 ::after 重复 */
.wy-breadcrumbs > li.breadcrumb-item::before {
    content: none !important;
}
/* 仅在父级项后添加斜杠分隔符 */
.wy-breadcrumbs > li.breadcrumb-item:not(.active)::after {
    content: " / ";
    padding: 0 5px;
    color: #A6A6A6;
}
.wy-breadcrumbs a {
    color: #656565 !important;
}
.wy-breadcrumbs > li.breadcrumb-item:not(.active) > a:hover {
    color: #0C6CE9 !important;
}
/* 面包屑当前页文字颜色 */
.wy-breadcrumbs > li.breadcrumb-item.active,
.wy-breadcrumbs > li.breadcrumb-item.active a,
.wy-breadcrumbs > li.breadcrumb-item.active span {
    color: #2C2C2C !important;
}

/* 代码块：深色主题 + 过长时换行（接近 VS Code Dark+）
 * Pygments 常把整段 JSON 放在单个 span 内，需 overflow-wrap:anywhere 才能在无空格处断行；
 * Sphinx basic.css 的 pre{overflow:auto} 会出横向滚动条，用 overflow-x:visible 覆盖。 */
.rst-content div[class*="highlight-"] {
    max-width: 100%;
    overflow-x: visible !important;
    /* 外层仅容器，勿边框/阴影，避免与内层 .highlight 叠成「下方空框」 */
    margin: 1em 0;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.highlight {
    background-color: #2C2B2B !important;
    color: #d4d4d4 !important;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #1f2329;
    box-shadow: none !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    position: relative; /* 用于定位复制按钮 */
    max-width: 100%;
    overflow-x: visible !important;
}
.rst-content .highlight pre,
.highlight pre {
    margin: 0;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    overflow-x: visible !important;
    max-width: 100%;
    color: inherit !important;
}
/* 给右上角复制按钮预留空间，避免按钮盖住代码字符 */
.highlight.has-copy-button pre,
.rst-content .highlight.has-copy-button pre {
    padding-right: 36px !important;
}

/* 代码高亮细分：统一为 VS Code Dark+ 风格 */
.highlight .c,
.highlight .ch,
.highlight .cm,
.highlight .c1,
.highlight .cs,
.highlight .cpf { color: #6a9955 !important; font-style: italic; }

.highlight .k,
.highlight .kc,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .ow { color: #c586c0 !important; }

.highlight .nt { color: #c586c0 !important; } /* HTML/XML 标签名 */
.highlight .na { color: #9cdcfe !important; } /* HTML/XML 属性名 */

.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .se,
.highlight .sh,
.highlight .si,
.highlight .sr,
.highlight .ss,
.highlight .sx,
.highlight .dl { color: #ce9178 !important; }

.highlight .m,
.highlight .mb,
.highlight .mf,
.highlight .mh,
.highlight .mi,
.highlight .mo,
.highlight .il { color: #b5cea8 !important; }

.highlight .nb,
.highlight .bp { color: #4ec9b0 !important; }

.highlight .nf,
.highlight .fm { color: #dcdcaa !important; }

.highlight .nc,
.highlight .nn,
.highlight .ne { color: #4ec9b0 !important; }

.highlight .o,
.highlight .p,
.highlight .err,
.highlight .w { color: #d4d4d4 !important; }

/*
 * 正文区 Markdown 反引号 → <code>：与正文同字体、加粗，无灰底/等宽（视觉上类似 **…**；代码块见下行）。
 * 代码块 pre / .highlight 内的 <code> 须恢复等宽，否则会继承 inherit。
 */
.rst-content code {
    background-color: transparent !important;
    background-image: none !important;
    color: var(--inline-code-token) !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: inline !important;
    font-size: inherit !important;
    border: none !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-weight: 700 !important;
}
.rst-content pre code,
.rst-content .highlight code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-weight: var(--code-block-code-weight) !important;
    color: inherit !important;
}
.rst-content code.ti5-api {
    color: var(--inline-code-api) !important;
}
/* 主题对 .rst-content code.literal 单独上色（#e74c3c 等），与默认行内 code 规则同优先级时需显式覆盖 */
.rst-content code.literal {
    color: var(--inline-code-token) !important;
}
.rst-content code.literal.ti5-api {
    color: var(--inline-code-api) !important;
}
.rst-content a code {
    color: inherit !important;
}
.rst-content code span.pre {
    color: inherit !important;
}

.rst-content ul.simple li code {
    background-color: transparent !important;
    color: var(--inline-code-token) !important;
}
.rst-content ul.simple li code.ti5-api {
    color: var(--inline-code-api) !important;
}

.rst-content ul.simple > li p,
.rst-content ul.simple ul > li p {
    color: #484848 !important;
}

/* 正文列表圆点统一浅灰（含含代码块/fence 时生成的无 .simple 的 ul） */
.rst-content [itemprop="articleBody"] ul li::marker {
    color: #cbd5e1;
}
/* 嵌套列表：主题对 .rst-content .section ul li li 直接设 list-style:circle（空心），
   仅改 ul 无法压过 li 上的规则，必须在嵌套 li 上设为 disc */
.rst-content .section ul li li,
.rst-content .toctree-wrapper ul li li,
.rst-content section ul li li,
.rst-content [itemprop="articleBody"] ul li li {
    list-style: disc !important;
    list-style-type: disc !important;
}
.rst-content .section ul li li li,
.rst-content .toctree-wrapper ul li li li,
.rst-content section ul li li li,
.rst-content [itemprop="articleBody"] ul li li li {
    list-style: disc !important;
    list-style-type: disc !important;
}

.rst-content table code {
    background-color: transparent !important;
    color: var(--inline-code-token) !important;
}
.rst-content table code.ti5-api {
    color: var(--inline-code-api) !important;
}

/* 正文强调：**加粗** 与正文同色（表格内除外，见下方） */
.rst-content strong {
    font-weight: 600 !important;
    color: #484848 !important;
}
.rst-content a strong {
    color: inherit !important;
}
.rst-content table strong,
.rst-content table th strong,
.rst-content table td strong {
    font-weight: 400 !important;
    color: inherit !important;
}

/* 代码块复制按钮 */
.ti5-copy-button {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 4px;
    border: none; /* 去掉外部描边，只保留内部图标线条 */
    background: transparent;                    /* 默认透明，不要深色底 */
    cursor: pointer;
    outline: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
.ti5-copy-button:hover {
    background: rgba(236, 72, 153, 0.16);       /* 淡粉色高亮 */
    box-shadow: none;
}
.ti5-copy-button:active {
    transform: scale(0.97);
}

/* 图标：用两个小矩形模拟“叠纸”效果，默认状态 */
.ti5-copy-button::before,
.ti5-copy-button::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
    border-radius: 2px;
    border: 2px solid #e5e7eb;  /* 浅灰线条，类似截图里的描边 */
}
/* 底层纸张 */
.ti5-copy-button::before {
    width: 10px;
    height: 12px;
    top: 7px;
    left: 9px;
    opacity: 0.7;
}
/* 上层纸张（稍向右下偏移） */
.ti5-copy-button::after {
    width: 10px;
    height: 12px;
    top: 5px;
    left: 7px;
    background: rgba(15, 23, 42, 0.95);
}

/* 复制成功：边框和图标变为绿色勾，参考现代文档中心效果 */
.ti5-copy-button.is-copied {
    background: rgba(236, 72, 153, 0.25);       /* 复制成功时稍浓一点的粉色 */
}
.ti5-copy-button.is-copied::before,
.ti5-copy-button.is-copied::after {
    border: none;
}
.ti5-copy-button.is-copied::before {
    width: 10px;
    height: 10px;
    top: 7px;
    left: 7px;
    border-radius: 999px;
    background: none;
    border-bottom: 0;
    border-left: 0;
    border-right: 2px solid #bbf7d0;
    border-top: 2px solid #bbf7d0;
    transform: rotate(45deg);
}
.ti5-copy-button.is-copied::after {
    display: none;
}

/* 复制失败：按钮变为红色叹号提示 */
.ti5-copy-button.is-error {
    background: rgba(244, 63, 94, 0.35);        /* 出错时偏红的粉色 */
}
.ti5-copy-button.is-error::before,
.ti5-copy-button.is-error::after {
    border: none;
}
.ti5-copy-button.is-error::before {
    width: 2px;
    height: 7px;
    top: 6px;
    left: 11px;
    background: #fee2e2;
}
.ti5-copy-button.is-error::after {
    width: 2px;
    height: 2px;
    top: 14px;
    left: 11px;
    border-radius: 999px;
    background: #fee2e2;
}

/*
 * 全站表格呈现约定（含今后新增 Markdown/MyST 表格，无需单页再写样式）：
 * - 表头、单元格：文字左对齐，竖直顶对齐，灰线网格，白底。
 * - 作者在源码里用普通 GFM/MyST 表格即可；勿依赖 HTML 内联 style 做居中，以免与全站冲突。
 */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    background-color: #ffffff;
}
table th,
table td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}
table th {
    background-color: #f3f4f6;
    font-weight: 500;
    color: #484848;
}
/* 表格行底色：统一白色（去掉浅绿色/浅灰条纹） */
table tbody tr:nth-child(odd),
table tbody tr:nth-child(even),
table.wy-table-striped tbody tr:nth-child(2n-1),
.wy-table-striped tbody tr:nth-child(2n-1) {
    background-color: #FFFFFF !important;
}

/* 彻底去除数据行任何残余底色：所有正文单元格统一白底 */
table tbody td,
.rst-content table.docutils tbody td {
    background-color: #FFFFFF !important;
}

/* 数据行首列不再加粗，与正文表格一致 */
table tbody tr > *:first-child {
    font-weight: 400;
}
table tbody tr:has(> td:first-child p > strong),
.rst-content table.docutils tbody tr:has(> td:first-child p > strong) {
    background-color: #FFFFFF !important;
}

/* Docutils 表格（Sphinx 默认）：套用相同网格风格，防止主题覆盖 */
.rst-content table.docutils {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    background-color: #ffffff;
}
.rst-content table.docutils th,
.rst-content table.docutils td {
    border: 1px solid #e5e7eb !important;
    padding: 8px 12px;
    vertical-align: top;
}
.rst-content table.docutils th {
    text-align: center !important;
    vertical-align: middle !important;
}
.rst-content table.docutils thead tr,
.rst-content table.docutils thead th,
.rst-content table.docutils thead th.head {
    background-color: #f3f4f6 !important;
    font-weight: 500;
    color: #484848;
}
/* 机型参数表（T140A/T170A/T170C/T170D）：首行为参数项而非表头，保持白底 */
.rst-content .ti5-spec-table table.docutils thead tr,
.rst-content .ti5-spec-table table.docutils thead th,
.rst-content .ti5-spec-table table.docutils thead th.head {
    background-color: #ffffff !important;
}
.rst-content .ti5-spec-table table.docutils thead tr:hover th,
.rst-content .ti5-spec-table table.docutils thead tr:hover th.head {
    background-color: #ececec !important;
}
.rst-content table.docutils tbody tr.row-odd,
.rst-content table.docutils tbody tr.row-even {
    background-color: #FFFFFF !important;
}

/* 正文表格：悬停时整行浅灰（须写在单元格白底规则之后，并对 td/th 单独设底） */
.rst-content table tbody tr:hover td,
.rst-content table tbody tr:hover th {
    background-color: #ececec !important;
}

/* 全站正文表格对齐（file-tree 除外）：表头与单元格一律居中 */
.wy-nav-content .rst-content table:not(.file-tree-table) th,
.wy-nav-content .rst-content table:not(.file-tree-table) td {
    text-align: center !important;
    vertical-align: middle !important;
}

/* T170C 2.0 配置清单：编号/项/分项约收窄一半，参数列加宽 */
.rst-content table.ti5-config-list-table {
    table-layout: fixed !important;
    width: 100% !important;
}
/* 全站序号/编号列统一 6%（配置清单、主控、序号名称表、关节限位等） */
.rst-content table col.ti5-col-no,
.rst-content table col.ti5-cfg-col-no,
.rst-content table col.ti5-mc-col-no,
.rst-content table col.ti5-in-col-no {
    width: 6% !important;
}
.rst-content table.ti5-config-list-table col.ti5-cfg-col-item {
    width: 10%;
}
.rst-content table.ti5-config-list-table col.ti5-cfg-col-sub {
    width: 10%;
}
.rst-content table.ti5-config-list-table col.ti5-cfg-col-param {
    width: 74%;
}
.rst-content table.ti5-config-list-table th:first-child,
.rst-content table.ti5-config-list-table td:first-child {
    width: auto !important;
}

/* T170C 2.0 机器人主控：序号 6%，配置收窄，标配/选配列加宽 */
.rst-content table.ti5-mainctrl-table {
    table-layout: fixed !important;
    width: 100% !important;
}
.rst-content table.ti5-mainctrl-table col.ti5-mc-col-cfg {
    width: 12%;
}
.rst-content table.ti5-mainctrl-table col.ti5-mc-col-std,
.rst-content table.ti5-mainctrl-table col.ti5-mc-col-opt {
    width: 41%;
}
.rst-content table.ti5-mainctrl-table th:first-child,
.rst-content table.ti5-mainctrl-table td:first-child,
.rst-content table.ti5-mainctrl-table th:nth-child(2),
.rst-content table.ti5-mainctrl-table td:nth-child(2) {
    width: auto !important;
}
/* 主控表：列宽见上；对齐走全站居中规则 */

/* 序号/名称多组并列：各「序号」列等宽 6%，避免首列被全局 26% 撑开 */
.rst-content table.ti5-index-name-table {
    table-layout: fixed !important;
    width: 100% !important;
}
.rst-content table.ti5-index-name-table col.ti5-in-col-name {
    width: 27.333%;
}
/* 两组（4 列）时名称列均分剩余宽度 */
.rst-content table.ti5-index-name-table.ti5-index-name-2pair col.ti5-in-col-name {
    width: 44%;
}
.rst-content table.ti5-index-name-table th:first-child,
.rst-content table.ti5-index-name-table td:first-child {
    width: auto !important;
}

/* 关节序号与限位：首列序号 6% */
.rst-content table.ti5-joint-limit-table {
    table-layout: fixed !important;
    width: 100% !important;
}
.rst-content table.ti5-joint-limit-table col.ti5-joint-col-name {
    width: 40%;
}
.rst-content table.ti5-joint-limit-table col.ti5-joint-col-limit {
    width: 54%;
}
.rst-content table.ti5-joint-limit-table th:first-child,
.rst-content table.ti5-joint-limit-table td:first-child {
    width: auto !important;
}

/* 表格不走横向滚动：内容过长自动换行（覆盖 RTD 的 wy-table-responsive 默认行为） */
.rst-content .wy-table-responsive {
    overflow-x: visible !important;
    overflow-y: visible !important;
    margin-bottom: 0 !important;
}
.rst-content .wy-table-responsive table td,
.rst-content .wy-table-responsive table th,
.rst-content table.docutils td,
.rst-content table.docutils th {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/*
 * 正文表格列宽策略：
 * 1) 第一列固定宽度；
 * 2) 其余列在 fixed 布局下均分剩余空间。
 */
.rst-content table:not(.file-tree-table) th:first-child,
.rst-content table:not(.file-tree-table) td:first-child {
    width: 26%;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}
.rst-content table:not(.file-tree-table) th:first-child p,
.rst-content table:not(.file-tree-table) td:first-child p,
.rst-content table:not(.file-tree-table) th:first-child code,
.rst-content table:not(.file-tree-table) td:first-child code,
.rst-content table:not(.file-tree-table) th:first-child .pre,
.rst-content table:not(.file-tree-table) td:first-child .pre {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

/* 正文表格列宽策略：第一列按既有规则收窄，其余列均分剩余宽度 */
.rst-content table:not(.file-tree-table),
.rst-content table.docutils:not(.file-tree-table) {
    table-layout: fixed;
}

/* 关节控制 API 页：保持整表撑满内容区，配合 fixed 布局让非首列均分 */
html.doc-sdk-joint-api .rst-content table.docutils {
    width: 100% !important;
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 文件清单页：说明文字区域高度稍微增高 */
.rst-content .file-list-intro {
    line-height: 1.8;
    margin-bottom: 12px;
}

/* 文件清单：目录树表不占满整栏、单元格左对齐；外框与 h1 底部分割线同色。
 * 表格外加内边距（尤其右侧）整体拉宽边框区域，单元格内容布局不变。 */
.rst-content table.file-tree-table {
    width: auto !important;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: auto !important;
    border: 2px solid var(--content-h1-divider) !important;
    border-radius: 6px;
    border-collapse: collapse !important;
    box-sizing: border-box;
    padding: 0.75rem 5rem 0.75rem 0.875rem;
}
.rst-content table.file-tree-table th,
.rst-content table.file-tree-table td {
    text-align: left !important;
    vertical-align: top !important;
    border: none !important;
}
/* 目录树列与说明列间距：约为原 1.25rem 的 5 倍 */
.rst-content table.file-tree-table td.desc-cell {
    padding-left: 6.25rem;
}

/* 启动服务端页：命令说明文字强制左对齐 */
.rst-content blockquote.cmd-tip,
.rst-content blockquote.cmd-tip p {
    text-align: left !important;
}

/* 启动服务端页：命令说明用普通段落，确保视觉左对齐 */
.rst-content p.cmd-tip-text {
    text-align: left !important;
    margin: 4px 0 10px 0 !important;
    padding: 0 !important;
}

/* 启动服务端页：顶部简介上下间距约为默认的 2 倍 */
.rst-content p.start-server-intro {
    margin: 0 !important;
    padding: 0.7rem 0 !important;
    /* 增大简介与下一小节之间的垂直间距 */
    margin-bottom: 1.4rem !important;
}

/* 启动服务端页：标题下分割线 */
.rst-content hr.start-server-divider {
    border: 0;
    border-top: 2px solid var(--content-h1-divider);
    /* 调整与上方标题/说明的垂直节奏，贴近参考图 */
    margin: 3rem 0 0.8rem;
}


/* ========== 全站提示框样式（note / warning 等） ========== */
/* 统一逻辑：浅底 + 无左竖线 */
.rst-content .admonition {
    margin: 12px 0 !important;
    padding: 9px 14px !important;
    border: 1px solid #FADEA3 !important;
    border-left: 1px solid #FADEA3 !important;
    border-radius: 8px !important;
    background: #FFF9F1 !important;
    color: #484848;
    line-height: 1.65;
    text-align: left !important;
}
/* 提示框内段落紧凑左对齐 */
.rst-content .admonition > p {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}
/* 标题简洁化（保留标题文本，不要图标） */
.rst-content .admonition .admonition-title {
    display: block !important;
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.5;
    text-align: left !important;
    color: #484848;
    background: transparent !important;
}
.rst-content .admonition:not(.ti5-inline-note) .admonition-title:before {
    content: "💡" !important;
    display: inline-block !important;
    margin-right: 6px;
}
/* 各类型仅做轻微色差，整体风格保持一致 */
.rst-content .admonition.note:not(.ti5-welcome-note):not(.ti5-strong-tip),
.rst-content .admonition.tip,
.rst-content .admonition.hint,
.rst-content .admonition.important {
    border-left-color: #FADEA3 !important;
    background: #FFF9F1 !important;
}
/* 欢迎/关于页顶栏说明：与「前提条件：」同款蓝色底、蓝边、正文色 */
.rst-content .admonition.note.ti5-welcome-note {
    margin: 12px 0 !important;
    padding: 9px 14px !important;
    border: 1px solid #BFDBFE !important;
    border-left: 1px solid #BFDBFE !important;
    border-radius: 8px !important;
    background: #EFF6FF !important;
    color: #484848 !important;
    line-height: 1.65;
    text-align: left !important;
}
.rst-content .admonition.note.ti5-welcome-note > p:not(.admonition-title) {
    color: #484848 !important;
    font-weight: 400 !important;
}
/* 欢迎提示：圆点与正文同一行（不用 flex，避免 PDF/窄屏把链接与文字拆成两列） */
.rst-content .admonition.note.ti5-welcome-note > p.admonition-title + p {
    display: block !important;
}
/* note 类提示框：隐藏默认“备注”标题，仅保留正文 */
.rst-content .admonition.note > .admonition-title {
    display: none !important;
}
/* note 标题被隐藏时，给紧随标题后的正文段补图标（避免命中被隐藏标题） */
.rst-content .admonition.note:not(.ti5-inline-note):not(.ti5-welcome-note) > p.admonition-title + p::before {
    content: "" !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #F59E0B !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22) !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
    position: relative !important;
    top: 0 !important;
}
/* 欢迎页/关于页顶栏说明：与「前提条件：」同款蓝色圆点（不显示灯泡） */
.rst-content .admonition.note.ti5-welcome-note > p.admonition-title + p::before {
    content: "" !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #3B82F6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22) !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
    position: relative !important;
    top: 0 !important;
}
/* inline-note 里被标记为注意态（黄框）的块：也显示图标；灰底说明态仍不显示 */
.rst-content .admonition.ti5-inline-note.ti5-inline-attention > p.admonition-title + p::before {
    content: "" !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #F59E0B !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22) !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
    position: relative !important;
    top: -2px !important;
}
/* 强烈提示：仅用于 motor_menu 等安全警示块，红色调（不影响普通「提示：」） */
.rst-content .admonition.note.ti5-strong-tip,
.rst-content .admonition.ti5-inline-note.ti5-strong-tip,
.rst-content p.ti5-auto-strong-tip,
.rst-content li.ti5-auto-strong-tip {
    margin: 12px 0 !important;
    padding: 9px 14px !important;
    border: 1px solid #F07777 !important;
    border-left: 1px solid #F07777 !important;
    border-radius: 8px !important;
    background: #FFF0F0 !important;
    color: #484848 !important;
    line-height: 1.65;
    text-align: left !important;
}
.rst-content p.ti5-auto-strong-tip .ti5-notice-label,
.rst-content li.ti5-auto-strong-tip .ti5-notice-label,
.rst-content p.ti5-auto-strong-tip > strong:first-child,
.rst-content li.ti5-auto-strong-tip > strong:first-child {
    font-weight: 700 !important;
    color: #484848 !important;
}
.rst-content p.ti5-auto-strong-tip .ti5-notice-label::before,
.rst-content li.ti5-auto-strong-tip .ti5-notice-label::before,
.rst-content p.ti5-auto-strong-tip > strong:first-child::before,
.rst-content li.ti5-auto-strong-tip > strong:first-child::before {
    content: "" !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #EF4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.22) !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
}
.rst-content .admonition.note.ti5-strong-tip > p,
.rst-content .admonition.ti5-inline-note.ti5-strong-tip > p {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}
.rst-content .admonition.note.ti5-strong-tip > p.admonition-title,
.rst-content .admonition.ti5-inline-note.ti5-strong-tip > p.admonition-title {
    display: none !important;
}
.rst-content .admonition.note.ti5-strong-tip > p:not(.admonition-title) > strong:first-of-type,
.rst-content .admonition.ti5-inline-note.ti5-strong-tip > p:not(.admonition-title) > strong:first-of-type {
    display: inline !important;
    margin: 0 !important;
    font-weight: 700 !important;
    color: #484848 !important;
}
.rst-content .admonition.note.ti5-strong-tip > p:not(.admonition-title)::before,
.rst-content .admonition.ti5-inline-note.ti5-strong-tip > p:not(.admonition-title)::before {
    content: "" !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #EF4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.22) !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
    position: relative !important;
    top: -1px !important;
}
.rst-content .admonition.warning,
.rst-content .admonition.attention,
.rst-content .admonition.caution,
.rst-content .admonition.danger {
    border-color: #FADEA3 !important;
    border-left-color: #FADEA3 !important;
    background: #FFF5E8 !important;
}
/* 当前页面用到的无标题提示块 */
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title .admonition-title {
    display: none !important;
}

/* ti5-inline-note（备注/示例/服务名等）：底色灰 + 去掉左侧竖杠 */
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention):not(.ti5-strong-tip) {
    background: #F6F6F6 !important;
    border: 1px solid #D8D8D8 !important;
    border-left: 1px solid #D8D8D8 !important;
    border-radius: 8px !important;
    color: #484848 !important;
}

/* 灰底提示块：「说明：」与单行正文同行；仅当后续有多条列表时标题才独占一行。
   Sphinx/MyST 会在 note 内先插入 p.admonition-title，不能用 p:first-of-type 否则会选错段。 */
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention):not(.ti5-strong-tip) > p:not(.admonition-title):not(:has(+ ul)) > strong:first-of-type {
    display: inline !important;
    margin: 0 !important;
}
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention) > p:not(.admonition-title):has(+ ul:not(:has(> li:only-child))) > strong:first-of-type {
    display: block !important;
    margin: 0 0 2px 0 !important;
}
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention) > p:not(.admonition-title):has(+ ul > li:only-child) > strong:first-of-type {
    display: inline !important;
    margin: 0 !important;
}
/* 说明类块：标题段与列表的阅读节奏 */
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention) > p:not(.admonition-title) {
    margin: 0 0 6px 0 !important;
    line-height: 1.7;
}
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention) > p:not(.admonition-title):not(:has(+ ul)),
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention) > p:not(.admonition-title):has(+ ul > li:only-child) {
    margin: 0 !important;
}
/* 单条列表说明：「说明：」与唯一要点同行、无圆点 */
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention):has(> p:not(.admonition-title) + ul > li:only-child) {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 4px;
}
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention) > p:not(.admonition-title) + ul:has(> li:only-child) {
    display: inline;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    flex: 1 1 auto;
    min-width: 0;
}
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention) > p:not(.admonition-title) + ul:has(> li:only-child) > li {
    display: inline;
    margin: 0 !important;
}
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention) > p:not(.admonition-title) + ul:has(> li:only-child) > li > p {
    display: inline;
    margin: 0 !important;
}
/* 多条列表说明：标题 + 列表分行 */
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention) > ul:not(:has(> li:only-child)) {
    margin: 2px 0 0 0 !important;
    padding-left: 1.2em !important;
}
.rst-content .admonition.ti5-inline-note.ti5-inline-note-no-title:not(.ti5-inline-attention) > ul:not(:has(> li:only-child)) > li {
    margin: 2px 0 !important;
    line-height: 1.7;
}

/* 服务接口卡片：全站可复用（用于“xxx 服务：”下的接口项） */
.rst-content .admonition.ti5-service-card {
    background: #F6F8FC !important;
    border: 1px solid #D8DFEA !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    margin: 10px 0 !important;
    font-size: 14px !important;
}
.rst-content .admonition.ti5-service-card > p:first-of-type {
    color: #484848 !important;
    font-size: 14px !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
}
.rst-content .admonition.ti5-service-card > p:nth-of-type(2) {
    font-size: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
}
.rst-content .admonition.ti5-service-card code {
    font-size: 14px !important;
}

/* 自动识别到的“注意：”段落：统一为浅底、无左竖线 */
.rst-content p.ti5-auto-notice {
    margin: 12px 0 !important;
    padding: 9px 14px !important;
    border: 1px solid #FADEA3 !important;
    border-left: 1px solid #FADEA3 !important;
    border-radius: 8px !important;
    background: #FFF9F1 !important;
    color: #484848;
    line-height: 1.65;
    text-align: left !important;
    font-weight: 400 !important;
}
.rst-content p.ti5-auto-notice strong {
    font-weight: 400 !important;
}
.rst-content p.ti5-auto-notice .ti5-notice-label {
    font-weight: 700 !important;
}
.rst-content p.ti5-auto-notice .ti5-notice-label,
.rst-content p.ti5-auto-tip .ti5-notice-label,
.rst-content li.ti5-auto-notice .ti5-notice-label,
.rst-content li.ti5-auto-tip .ti5-notice-label {
    display: inline-flex !important;
    align-items: center !important;
}
/* 自动识别到的“提示：”段落：与“注意：”同样式 */
.rst-content p.ti5-auto-tip {
    margin: 12px 0 !important;
    padding: 9px 14px !important;
    border: 1px solid #FADEA3 !important;
    border-left: 1px solid #FADEA3 !important;
    border-radius: 8px !important;
    background: #FFF9F1 !important;
    color: #484848;
    line-height: 1.65;
    text-align: left !important;
    font-weight: 400 !important;
}
.rst-content p.ti5-auto-tip strong {
    font-weight: 400 !important;
}
.rst-content p.ti5-auto-tip .ti5-notice-label {
    font-weight: 700 !important;
}
/* “前提条件：”提示块：沿用注意/提示布局，改为蓝色调 */
.rst-content p.ti5-auto-prereq,
.rst-content li.ti5-auto-prereq {
    margin: 12px 0 !important;
    padding: 9px 14px !important;
    border: 1px solid #BFDBFE !important;
    border-left: 1px solid #BFDBFE !important;
    border-radius: 8px !important;
    background: #EFF6FF !important;
    color: #484848;
    line-height: 1.65;
    text-align: left !important;
    font-weight: 400 !important;
}
.rst-content p.ti5-auto-prereq strong,
.rst-content li.ti5-auto-prereq strong,
.rst-content p.ti5-auto-prereq .ti5-notice-label,
.rst-content li.ti5-auto-prereq .ti5-notice-label {
    color: #484848 !important;
    font-weight: 700 !important;
}
.rst-content p.ti5-auto-prereq .ti5-notice-label::before,
.rst-content li.ti5-auto-prereq .ti5-notice-label::before {
    content: "" !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #3B82F6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22) !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
}
/* 兜底：若 JS 未给“前提条件”打上 .ti5-notice-label，也在首个 strong 前显示圆点 */
.rst-content p.ti5-auto-prereq > strong:first-child::before,
.rst-content li.ti5-auto-prereq > strong:first-child::before {
    content: "" !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #3B82F6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22) !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
}
/* “注意：/提示：”浅黄块：标签前橙色圆点（tip 曾仅在后文写了 margin，未写 content/background，导致无点） */
.rst-content p.ti5-auto-notice .ti5-notice-label::before,
.rst-content p.ti5-auto-tip .ti5-notice-label::before,
.rst-content li.ti5-auto-notice .ti5-notice-label::before,
.rst-content li.ti5-auto-tip .ti5-notice-label::before {
    content: "" !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #F59E0B !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22) !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
    position: relative !important;
    top: -2px !important;
}
/* 兜底：若未打 .ti5-notice-label，也在首个 strong 前显示黄色圆点 */
.rst-content p.ti5-auto-notice > strong:first-child::before,
.rst-content p.ti5-auto-tip > strong:first-child::before,
.rst-content li.ti5-auto-notice > strong:first-child::before,
.rst-content li.ti5-auto-tip > strong:first-child::before {
    content: "" !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #F59E0B !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22) !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
    position: relative !important;
    top: 0 !important;
}
/* 兜底：仅无显式标签时显示图标，避免与 .ti5-notice-label::before 叠加成双图标 */
.rst-content p.ti5-auto-notice:not(.ti5-has-label)::before,
.rst-content p.ti5-auto-tip:not(.ti5-has-label)::before,
.rst-content p.ti5-auto-prereq:not(.ti5-has-label)::before,
.rst-content li.ti5-auto-notice:not(.ti5-has-label)::before,
.rst-content li.ti5-auto-tip:not(.ti5-has-label)::before,
.rst-content li.ti5-auto-prereq:not(.ti5-has-label)::before {
    content: none !important;
    display: inline-block;
    margin-right: 0 !important;
}
/* 兜底：即使未被 JS 规范成 .ti5-notice-label，首个 strong（提示前缀）也加粗 */
.rst-content p.ti5-auto-tip > strong:first-child {
    font-weight: 700 !important;
}

/* 「注意/提示」段 + 紧随其后列表：同一浅黄底（auto_notice_style.js 包成 .ti5-auto-warm-group） */
.rst-content .ti5-auto-warm-group {
    margin: 12px 0 !important;
    padding: 0 !important;
    border: 1px solid #FADEA3 !important;
    border-radius: 8px !important;
    background: #FFF9F1 !important;
    color: #484848;
    line-height: 1.65;
}
.rst-content .ti5-auto-warm-group > p.ti5-auto-notice,
.rst-content .ti5-auto-warm-group > p.ti5-auto-tip {
    border: 0 !important;
    margin: 0 !important;
}
.rst-content .ti5-auto-warm-group > ul,
.rst-content .ti5-auto-warm-group > ol {
    margin: 0 !important;
    padding: 0 14px 9px 2em !important;
    background: transparent !important;
    border: 0 !important;
    color: #484848;
}
.rst-content .ti5-auto-warm-group > p:not(.ti5-auto-notice):not(.ti5-auto-tip) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* 「说明/xxx说明」段 + 紧随其后列表：同一灰底说明框（auto_notice_style.js 包成 .ti5-auto-inline-group） */
.rst-content .ti5-auto-inline-group {
    margin: 12px 0 !important;
    padding: 0 !important;
    border: 1px solid #D8D8D8 !important;
    border-radius: 8px !important;
    background: #F6F6F6 !important;
    color: #484848;
    line-height: 1.65;
}
.rst-content .ti5-auto-inline-group > p.ti5-auto-inline-note {
    border: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}
.rst-content .ti5-auto-inline-group > ul,
.rst-content .ti5-auto-inline-group > ol {
    margin: 0 !important;
    padding: 0 14px 9px 2em !important;
    background: transparent !important;
    border: 0 !important;
    color: #484848;
}
.rst-content .ti5-auto-inline-group > p:not(.ti5-auto-inline-note) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* 自动识别到的“说明/服务名/示例”：灰底、无左竖线、标签加粗并换行 */
.rst-content p.ti5-auto-inline-note,
.rst-content li.ti5-auto-inline-note {
    margin: 12px 0 !important;
    padding: 9px 14px !important;
    border: 1px solid #D8D8D8 !important;
    border-left: 1px solid #D8D8D8 !important;
    border-radius: 8px !important;
    background: #F6F6F6 !important;
    color: #484848;
    line-height: 1.65;
    text-align: left !important;
    font-weight: 400 !important;
}
.rst-content p.ti5-auto-inline-note .ti5-notice-label,
.rst-content li.ti5-auto-inline-note .ti5-notice-label,
.rst-content p.ti5-auto-inline-note > strong:first-child,
.rst-content li.ti5-auto-inline-note > strong:first-child {
    display: block !important;
    margin: 0 0 2px 0 !important;
    font-weight: 700 !important;
}
.rst-content p.ti5-auto-inline-note .ti5-notice-label.ti5-label-example::before,
.rst-content li.ti5-auto-inline-note .ti5-notice-label.ti5-label-example::before {
    content: none !important;
    margin-right: 0 !important;
}
/* “示例：”后紧跟代码块时，视觉上合并为同一个示例块 */
.rst-content p.ti5-auto-inline-note:has(.ti5-notice-label.ti5-label-example) {
    margin-bottom: 0 !important;
    padding-bottom: 4px !important;
    border: 1px solid #D8D8D8 !important;
    border-bottom: 0 !important;
    border-radius: 8px 8px 0 0 !important;
}
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    padding: 0 14px 10px 14px !important;
    background: #F6F6F6 !important;
    border: 1px solid #D8D8D8 !important;
    border-top: 0 !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: none !important;
}
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] > .highlight {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] pre {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: #484848 !important;
    border: 0 !important;
}
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] .ti5-copy-button {
    display: none !important;
}
/* 示例块内代码：去掉深色代码块外观，按普通正文呈现 */
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"],
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] .highlight,
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] code,
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] .k,
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] .s,
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] .n,
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] .w,
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] .nb,
.rst-content p.ti5-auto-inline-note:has(.ti5-label-example) + div[class*="highlight-"] .p {
    color: #484848 !important;
}
.rst-content li.ti5-auto-notice,
.rst-content li.ti5-auto-tip {
    margin: 12px 0 !important;
    padding: 9px 14px !important;
    border: 1px solid #FADEA3 !important;
    border-left: 1px solid #FADEA3 !important;
    border-radius: 8px !important;
    background: #FFF9F1 !important;
    color: #484848;
    line-height: 1.65;
    text-align: left !important;
}
.rst-content li.ti5-auto-notice .ti5-notice-label,
.rst-content li.ti5-auto-tip .ti5-notice-label {
    font-weight: 700 !important;
}
/* 若“提示/注意”写在 blockquote 里，去掉引用框默认样式，只保留统一提示框 */
.rst-content blockquote.ti5-auto-callout-wrap {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
.rst-content blockquote.ti5-auto-callout-wrap > div {
    margin: 0 !important;
    padding: 0 !important;
}
.rst-content blockquote.ti5-auto-callout-wrap > div > p {
    margin-left: 0 !important;
}

/* “注意/提示”位于列表项中时：隐藏编号并与上方正文左边界对齐 */
.rst-content li.ti5-notice-li {
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}
.rst-content li.ti5-notice-li > p.ti5-auto-notice,
.rst-content li.ti5-notice-li > p.ti5-auto-tip {
    margin-left: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

/* 页脚按钮：全局隐藏「上一页 / 下一页」导航 */
.rst-footer-buttons {
    display: none !important;
}

/* 右下角回到顶部：灰色圆钮 + 悬停图标时在下方显示「回到顶部」（图标位置固定） */
.ti5-scroll-top-btn {
    position: fixed;
    right: var(--ti5-scroll-top-right);
    bottom: var(--ti5-scroll-top-bottom);
    z-index: 120;
    display: block;
    width: 44px;
    height: 44px;
    min-width: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #999999;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.ti5-scroll-top-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #999999;
    box-shadow: none;
    transition: box-shadow 0.2s ease;
}
.ti5-scroll-top-btn__icon::before {
    content: "";
    display: block;
    width: 12px;
    height: 12px;
    border-left: 2.5px solid #ffffff;
    border-top: 2.5px solid #ffffff;
    border-radius: 1px;
    transform: rotate(45deg);
    margin-top: 4px;
}
.ti5-scroll-top-btn__label {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    color: #999999;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ti5-scroll-top-btn__icon:hover + .ti5-scroll-top-btn__label {
    opacity: 1;
    visibility: visible;
}
.ti5-scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ti5-scroll-top-btn__icon:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}
.ti5-scroll-top-btn:focus-visible {
    outline: none;
}
.ti5-scroll-top-btn:focus-visible .ti5-scroll-top-btn__icon {
    outline: 2px solid #bbbbbb;
    outline-offset: 3px;
}
@media (max-width: 1024px) {
    .ti5-scroll-top-btn {
        right: 16px;
        bottom: 56px;
        width: 40px;
        height: 40px;
    }
    .ti5-scroll-top-btn__icon {
        width: 40px;
        height: 40px;
    }
    .ti5-scroll-top-btn__label {
        font-size: 12px;
    }
}

/* 返回上一步：JS 注入统一挂在 body 下 #ti5-back-root，避免 fixed 受正文祖先影响而错到视口底部 */
#ti5-back-root {
    position: fixed !important;
    top: var(--ti5-back-btn-top) !important;
    right: var(--page-toc-right) !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 100 !important;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}
/* 桌面端：与「本页导读」同宽、同距视口右缘，按钮在条带内右对齐，右缘与导读外框对齐 */
@media (min-width: 1025px) {
    #ti5-back-root {
        width: var(--page-toc-width) !important;
        max-width: var(--page-toc-width) !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: flex-start !important;
    }
}
@media (max-width: 1024px) {
    #ti5-back-root {
        top: var(--ti5-back-btn-top-mobile) !important;
        right: 16px !important;
    }
}
#ti5-back-root a.back-link.ti5-back-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    pointer-events: auto;
}

/* 返回上一步：默认隐藏；显示时为视口固定，与「本页导读」右缘、侧栏 Logo 顶对齐 */
.rst-content {
    position: relative;
}
/* 仅通过链接进入时显示的返回按钮（如 ROS2 页）默认隐藏 */
.back-link {
    display: none !important;
}
/* 返回按钮：图标（back.svg 默认，back_hover.svg 悬停）在文字左侧 */
.ti5-back-btn::before,
a.back-link.ti5-back-btn::before,
.rst-content .document [itemprop="articleBody"] section p:has(> a[href*="software_tools.html"]) > a[href*="software_tools.html"]::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 0;
    vertical-align: middle;
    background: url('./icons/back.svg') no-repeat center;
    background-size: contain;
    transition: background-image 0.2s ease;
}
/* hover 时文字和图标变红（切换为 back_hover.svg） */
.ti5-back-btn:hover::before,
a.back-link.ti5-back-btn:hover::before,
.rst-content .document [itemprop="articleBody"] section p:has(> a[href*="software_tools.html"]) > a[href*="software_tools.html"]:hover::before {
    background-image: url('./icons/back_hover.svg');
}
/* 返回按钮统一样式（固定于视口：桌面端与 .page-toc 同 right，顶与 Logo 行对齐） */
.ti5-back-btn:not(.back-link),
.rst-content .document [itemprop="articleBody"] section p:has(> a[href*="software_tools.html"]) > a[href*="software_tools.html"]:not(.back-link) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #484848 !important;
    background: #FFFFFF !important;
    border: 1px solid #cfd8e3 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    box-shadow: var(--ti5-back-btn-shadow) !important;
    transform: none;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
@media (min-width: 1025px) {
    .ti5-back-btn:not(.back-link),
    .rst-content .document [itemprop="articleBody"] section p:has(> a[href*="software_tools.html"]) > a[href*="software_tools.html"]:not(.back-link) {
        position: fixed !important;
        top: var(--ti5-back-btn-top) !important;
        right: var(--page-toc-right) !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 100;
    }
}
@media (max-width: 1024px) {
    .ti5-back-btn:not(.back-link),
    .rst-content .document [itemprop="articleBody"] section p:has(> a[href*="software_tools.html"]) > a[href*="software_tools.html"]:not(.back-link) {
        position: fixed !important;
        top: var(--ti5-back-btn-top-mobile) !important;
        right: 16px !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 100;
    }
}
.ti5-back-btn:hover,
a.back-link.ti5-back-btn:hover,
.rst-content .document [itemprop="articleBody"] section p:has(> a[href*="software_tools.html"]) > a[href*="software_tools.html"]:hover {
    background: #FFFFFF !important;
    color: #0C6CE9 !important;
    border: 1px solid #cfd8e3 !important;
    box-shadow: var(--ti5-back-btn-shadow-hover) !important;
}
/* .back-link 默认隐藏；被 JS 显示时需有按钮样式（固定于视口，与导读右对齐） */
a.back-link.ti5-back-btn {
    display: none !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #484848 !important;
    background: #FFFFFF !important;
    border: 1px solid #cfd8e3 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    box-shadow: var(--ti5-back-btn-shadow) !important;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
@media (min-width: 1025px) {
    a.back-link.ti5-back-btn {
        position: fixed !important;
        top: var(--ti5-back-btn-top) !important;
        right: var(--page-toc-right) !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 100;
    }
}
@media (max-width: 1024px) {
    a.back-link.ti5-back-btn {
        position: fixed !important;
        top: var(--ti5-back-btn-top-mobile) !important;
        right: 16px !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 100;
    }
}
/* 返回按钮文字轻微下移（图标不动） */
a.back-link.ti5-back-btn {
    transform: none;
}
a.back-link.ti5-back-btn::before {
    transform: none;
}
/* 精确控制返回按钮文字下移，不影响图标 */
.ti5-back-btn .ti5-back-text,
a.back-link.ti5-back-btn .ti5-back-text {
    position: relative;
    top: 1px;
}
/* 容纳返回按钮的段落不占行高，避免顶部分块空白 */
.rst-content p:has(> a.ti5-back-btn),
.rst-content p:has(> a.back-link),
.rst-content .document [itemprop="articleBody"] section p:has(> a[href*="software_tools.html"]) {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: visible !important;
}

/* 布局：内容区不撑满时也不留大面积空白 */
.wy-nav-content-wrap .wy-nav-content {
    min-height: auto !important;
}
.wy-body-for-nav .wy-grid-for-nav {
    min-height: auto !important;
}

/* 软件工具页：左侧菜单不需要显示「相关文档」这一小节，仅保留页面内容中的标题 */
.wy-menu-vertical li.toctree-l3 > a.reference.internal[href="#id2"] {
    display: none !important;
}

/* 右侧「本页导读」导航 */
.page-toc {
    position: fixed;
    right: var(--page-toc-right);
    top: 220px;
    width: var(--page-toc-width);
    box-sizing: border-box;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    background: var(--page-toc-bg) !important;
    border-radius: 8px;
    box-shadow: var(--code-block-shadow);
    padding: 12px 16px;
    border: var(--page-toc-border);
    font-size: 14px;
}

/* Web 控制系统首页：隐藏正文里的目录块，但保留侧栏菜单结构 */
.web-index-toc {
    display: none !important;
}

/* 钛虎上位机元系统首页：同样隐藏正文里的目录块 */
.control-index-toc {
    display: none !important;
}
/* ROS2 开发指南首页：隐藏正文里的目录块，但保留侧栏菜单结构 */
.ros2-index-toc {
    display: none !important;
}
/* SDK 开发指南首页：隐藏正文里的目录块，但保留侧栏菜单结构 */
.sdk-index-toc {
    display: none !important;
}
/* 核心开发指南首页：隐藏正文里的目录块，但保留侧栏菜单结构 */
.core-dev-index-toc {
    display: block !important;
    /* 让正文内的 toctree 链接文字规则与普通正文列表（如软件工具页）一致 */
    font-size: 16px !important;
}

.core-dev-index-toc,
.core-dev-index-toc ul,
.core-dev-index-toc li,
.core-dev-index-toc a {
    font-size: 16px !important;
    font-weight: 400 !important;
}
.page-toc > p.topic-title {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #2C2C2C !important;
}
.page-toc ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
    min-width: 0;
    max-width: 100%;
}
.page-toc ul ul {
    display: none;
    width: 100%;
    margin: 2px 0 6px 0;
    padding-left: 14px;
    min-width: 0;
    box-sizing: border-box;
}
.page-toc li.ti5-page-toc-parent.is-expanded > ul {
    display: block;
}
.page-toc ul ul > li {
    margin: 2px 0;
}
.page-toc ul ul > li::before {
    width: 4px !important;
    height: 4px !important;
    min-width: 4px !important;
    max-width: 4px !important;
    min-height: 4px !important;
    max-height: 4px !important;
}
.page-toc ul ul > li > a {
    font-size: 14px !important;
}
/* 含 H3 子节的 H2：子列表换行到标题下方，勿与标题同一行横排 */
.page-toc li.ti5-page-toc-parent {
    display: block;
    position: relative;
    padding-left: 16px;
}
.page-toc li.ti5-page-toc-parent::before {
    position: absolute;
    left: 0;
    top: 9px;
    margin-top: 0;
}
.page-toc li.ti5-page-toc-parent > a {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-weight: 400 !important;
    padding-right: 22px;
}
.page-toc li.ti5-page-toc-parent > ul {
    margin-top: 2px;
    padding-left: 0;
}
.page-toc .ti5-page-toc-toggle {
    position: absolute;
    right: 0;
    top: 1px;
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: #999999;
    cursor: pointer;
    line-height: 0;
}
.page-toc .ti5-page-toc-toggle:hover {
    color: var(--link-color);
}
.page-toc .ti5-page-toc-toggle::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    margin: 7px auto 0;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
}
.page-toc li.ti5-page-toc-parent.is-expanded > .ti5-page-toc-toggle::before {
    transform: rotate(45deg);
    margin-top: 9px;
}
/* flex：圆点与文字单行居中；链接单行 + 末尾省略号（完整标题见 a[title]） */
/* 正文全域 .rst-content li { word-break: break-word !important } 会继承到导读，需压回，否则仍折行、ellipsis 不生效 */
.rst-content .page-toc li {
    word-break: normal !important;
    overflow-wrap: normal !important;
}
.page-toc li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
    padding-left: 0;
    min-width: 0;
}
.page-toc li::before {
    content: "";
    flex-shrink: 0;
    align-self: center;
    margin-top: 0;
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    max-width: 6px !important;
    min-height: 6px !important;
    max-height: 6px !important;
    aspect-ratio: 1 / 1 !important;
    box-sizing: border-box !important;
    border-radius: 50% !important;
    background: #d1d5db; /* 默认灰色圆点 */
    background-clip: padding-box !important;
}
.page-toc li.active::before {
    background: var(--link-color); /* 当前条目圆点 */
}
/* <a> 默认 inline 时 text-overflow 不可靠，须 block/inline-block */
.rst-content .page-toc a,
.page-toc a {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    color: #656565 !important;
    font-weight: 400 !important;
    text-decoration: none;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}
.page-toc a:hover {
    color: var(--link-color) !important;
    text-decoration: none !important;
}

/* 放在通用链接规则之后，确保当前项文字变红（字重与未选中一致） */
.page-toc li.active > a {
    color: var(--link-color) !important;
    font-weight: 400 !important;
}

@media (max-width: 1024px) {
    .page-toc {
        display: none;
    }
}

/*
 * 桌面端：正文右侧统一留空，与「本页导读」块布局一致。
 * 计算公式：导读宽 + 距视口右 + 与正文间隙（当前为 240 + 40 + 0）。
 * 无导读的页面也通过相同 padding-right 与其它页对齐，避免栏宽跳变。
 *
 * 正文插图：max-width 使用 --rst-content-img-max-width（默认 90% 栏宽），与首页大图统一视觉尺度。
 */
@media (min-width: 1025px) {
    .wy-nav-content .rst-content {
        padding-right: calc(var(--page-toc-width) + var(--page-toc-right) + var(--page-toc-gap)) !important;
    }
    .wy-nav-content .rst-content img {
        max-width: var(--rst-content-img-max-width) !important;
        height: auto !important;
    }
    .wy-nav-content .rst-content a.image-reference,
    .wy-nav-content .rst-content a.reference.internal.image-reference {
        max-width: var(--rst-content-img-max-width) !important;
    }
    .wy-nav-content .rst-content a.image-reference img,
    .wy-nav-content .rst-content a.reference.internal.image-reference img {
        max-width: var(--rst-content-img-max-width) !important;
        height: auto !important;
    }
    .wy-nav-content .rst-content figure,
    .wy-nav-content .rst-content .image {
        max-width: var(--rst-content-img-max-width) !important;
    }
    .wy-nav-content .rst-content figure img,
    .wy-nav-content .rst-content .image img {
        max-width: var(--rst-content-img-max-width) !important;
        height: auto !important;
    }
}

/* 窄屏同样使用「正文插图最大宽度」，避免仅桌面端被缩窄 */
@media (max-width: 1024px) {
    .wy-nav-content .rst-content img {
        max-width: var(--rst-content-img-max-width) !important;
        height: auto !important;
    }
    .wy-nav-content .rst-content a.image-reference,
    .wy-nav-content .rst-content a.reference.internal.image-reference {
        max-width: var(--rst-content-img-max-width) !important;
    }
    .wy-nav-content .rst-content a.image-reference img,
    .wy-nav-content .rst-content a.reference.internal.image-reference img {
        max-width: var(--rst-content-img-max-width) !important;
        height: auto !important;
    }
    .wy-nav-content .rst-content figure,
    .wy-nav-content .rst-content .image {
        max-width: var(--rst-content-img-max-width) !important;
    }
    .wy-nav-content .rst-content figure img,
    .wy-nav-content .rst-content .image img {
        max-width: var(--rst-content-img-max-width) !important;
        height: auto !important;
    }
}

/*
 * 正文区插图：在主栏（文本区域）内水平居中；相对邻接行内文字时 vertical-align: middle。
 * align-right 仍靠右；侧栏 / 顶栏 logo 等不在 .rst-content 内，不受影响。
 */
.wy-nav-content .rst-content [align="center"] {
    text-align: center !important;
}

.wy-nav-content .rst-content figure,
.wy-nav-content .rst-content .figure,
.wy-nav-content .rst-content figcaption {
    text-align: center !important;
}

.wy-nav-content .rst-content figure,
.wy-nav-content .rst-content .image {
    display: block !important;
    width: fit-content !important;
    max-width: var(--rst-content-img-max-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

.wy-nav-content .rst-content img {
    vertical-align: middle !important;
}

.wy-nav-content .rst-content img,
.wy-nav-content .rst-content a.image-reference img,
.wy-nav-content .rst-content a.reference.internal.image-reference img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

.wy-nav-content .rst-content img.align-center,
.wy-nav-content .rst-content object.align-center {
    margin-left: auto !important;
    margin-right: auto !important;
}

.wy-nav-content .rst-content img.align-right,
.wy-nav-content .rst-content object.align-right {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* 图片链接块：包裹层缩至图宽并整体居中 */
.wy-nav-content .rst-content a.image-reference,
.wy-nav-content .rst-content a.reference.internal.image-reference {
    display: block !important;
    width: fit-content !important;
    max-width: var(--rst-content-img-max-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

.wy-nav-content .rst-content a.image-reference:has(img.align-right),
.wy-nav-content .rst-content a.reference.internal.image-reference:has(img.align-right) {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/*
 * Sphinx/MyST：`{image}` 常生成「section 直子级」的 a.image-reference（外无 <p>），
 * 与 img 上 width:60% 等组合时，仅靠 a 的 margin:auto 易表现为贴左；与正文同栏内居中。
 */
.wy-nav-content .rst-content section > a.reference.internal.image-reference:not(:has(img.align-right)),
.wy-nav-content .rst-content .section > a.reference.internal.image-reference:not(:has(img.align-right)) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: center !important;
}

.wy-nav-content .rst-content section > a.reference.internal.image-reference:not(:has(img.align-right)) img,
.wy-nav-content .rst-content .section > a.reference.internal.image-reference:not(:has(img.align-right)) img {
    display: inline-block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    vertical-align: middle !important;
    float: none !important;
}

/* 段落内仅一张图或仅一个图链：段落内居中 */
.wy-nav-content .rst-content p:has(> img:only-child),
.wy-nav-content .rst-content p:has(> a.image-reference:only-child) {
    text-align: center !important;
}

.wy-nav-content .rst-content p > img:only-child,
.wy-nav-content .rst-content p > a.image-reference:only-child {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 正文中的截图图片：直角（0圆角） */
.rst-content [itemprop="articleBody"] img {
    border-radius: 0 !important;
    overflow: hidden !important;
    background-color: transparent !important;
    padding: 0 !important;
    box-sizing: border-box;
    /* 去掉“投影/阴影”（若主题/浏览器/额外样式给图片加了 shadow 或 drop-shadow） */
    box-shadow: none !important;
    filter: none !important;
}

/* Sphinx/MyST 生成图片通常外层是 <a class="image-reference"> 包裹；
   阴影若在外层而非 img 上，这里也要一起关掉。 */
.rst-content [itemprop="articleBody"] a.image-reference,
.rst-content [itemprop="articleBody"] a.reference.internal.image-reference {
    box-shadow: none !important;
    filter: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    display: block !important;
    width: fit-content !important;
    max-width: var(--rst-content-img-max-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 正文图片底色：给图片下方与四周统一浅灰底板 */
.rst-content [itemprop="articleBody"] a.image-reference,
.rst-content [itemprop="articleBody"] a.reference.internal.image-reference,
.rst-content [itemprop="articleBody"] figure,
.rst-content [itemprop="articleBody"] .image,
.rst-content [itemprop="articleBody"] p:has(> img:only-child),
.rst-content [itemprop="articleBody"] p:has(> a.image-reference:only-child) {
    background-color: transparent !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* STLink 截图：父级外链层勿 overflow:hidden，否则子级 img 的 clip-path 在部分浏览器下几乎看不出裁切 */
.wy-nav-content .rst-content [itemprop="articleBody"] a.reference.internal.image-reference:has(img[src*="stlink_menu"]),
.wy-nav-content .rst-content [itemprop="articleBody"] a.reference.internal.image-reference:has(img[src*="stlink_para"]) {
    overflow: visible !important;
}

/* Ethercat控制模式：与 layout.html 内联兜底一致，避免父级 a.image-reference 的 overflow:hidden 裁掉弹窗边距与文字 */
.wy-nav-content .rst-content [itemprop="articleBody"] a.image-reference:has(img[src*="%E6%8E%A7%E5%88%B6%E6%A8%A1%E5%BC%8F"]),
.wy-nav-content .rst-content [itemprop="articleBody"] a.reference.internal.image-reference:has(img[src*="%E6%8E%A7%E5%88%B6%E6%A8%A1%E5%BC%8F"]) {
    overflow: visible !important;
}

/* 兜底：有些页面的图片外层可能是 .image / figure / p 之类 */
.rst-content [itemprop="articleBody"] figure,
.rst-content [itemprop="articleBody"] .image {
    box-shadow: none !important;
    filter: none !important;
}
.rst-content [itemprop="articleBody"] figure img,
.rst-content [itemprop="articleBody"] .image img {
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    overflow: hidden !important;
}

/* 全局兜底：防止个别页面不含 itemprop=articleBody，导致图片规则漏掉 */
.wy-nav-content .rst-content img,
.wy-nav-content .document img,
.wy-nav-content article img {
    border-radius: 0 !important;
    background-color: transparent !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    filter: none !important;
}

.wy-nav-content .rst-content a.image-reference,
.wy-nav-content .rst-content a.reference.internal.image-reference,
.wy-nav-content .rst-content figure,
.wy-nav-content .rst-content .image {
    box-shadow: none !important;
    filter: none !important;
}

/*
 * 上位机「整窗截图」类资源：源 PNG 常带一圈投影/暗边。
 * 显示时四边各裁 20px（与仓库 doc/help/crop_control_screenshot_edges.py 目标文件一致）。
 * 另含固件在线升级四张（ota_menu / ota_para / ota_pre / ota_complete）。
 * 例外：motorSearch 等为红框标注图，无投影边，不列入裁切。
 * 若已对源图做物理裁切，请注释本段整段规则，避免双重裁切。
 */
.wy-nav-content .rst-content img[src*="motorPage"],
.wy-nav-content .rst-content img[src*="motorSense"],
.wy-nav-content .rst-content img[src*="motorParamterSetting"],
.wy-nav-content .rst-content img[src*="motorControl"],
.wy-nav-content .rst-content img[src*="motorStatus"],
.wy-nav-content .rst-content img[src*="motorChart"],
.wy-nav-content .rst-content img[src*="motorExport"],
.wy-nav-content .rst-content img[src*="motorError"],
.wy-nav-content .rst-content img[src*="ota_menu"],
.wy-nav-content .rst-content img[src*="ota_para"],
.wy-nav-content .rst-content img[src*="ota_pre"],
.wy-nav-content .rst-content img[src*="ota_complete"],
.wy-nav-content .rst-content img[src*="控制-构建模式"],
.wy-nav-content .rst-content img[src*="拖出电机模型"],
.wy-nav-content .rst-content img[src*="通信参数设置"] {
    clip-path: inset(20px) !important;
}

/* Ethercat 弹窗类截图：标题栏紧贴上边，inset(20px) 会裁掉标题首字，此处不再做 CSS 裁边 */

/*
 * Ethercat控制模式.png：合订页若用原生 <img>，部分构建链会丢掉内联 width，正文又统一 max-width:90%，视觉上像没改小。
 * 用文件名在 _images 中的 URL 编码片段匹配（与 src 中 %E6%8E%A7… 一致），强制 40% 栏宽。
 */
.wy-nav-content .rst-content img[src*="%E6%8E%A7%E5%88%B6%E6%A8%A1%E5%BC%8F"] {
    width: 40% !important;
    max-width: 40% !important;
    height: auto !important;
    overflow: visible !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
}

/* 固件 STLink 菜单/参数截图：四边各裁 40px（须配合上条外链 overflow:visible；img 自身也勿 overflow:hidden，以免裁切不可见） */
.wy-nav-content .rst-content img[src*="stlink_menu"],
.wy-nav-content .rst-content img[src*="stlink_para"] {
    clip-path: inset(40px) !important;
    -webkit-clip-path: inset(40px) !important;
    overflow: visible !important;
}

/* 自定义模块·动作录制两张（ActionRecord / ActionRecordStep）：四边各裁 2px */
.wy-nav-content .rst-content img[src*="ActionRecordStep.png"],
.wy-nav-content .rst-content img[src*="ActionRecord.png"] {
    clip-path: inset(2px) !important;
}

/* 全站 <img> 直角（覆盖主题/内联样式；不含侧栏 CSS 圆点等 ::after） */
html body img {
    border-radius: 0 !important;
}

/* 软件工具使用指南：入口简介块单独放宽段落与列表间距 */
.rst-content .ti5-menu-brief {
    margin: 0.35rem 0 0.85rem;
}
.rst-content .ti5-menu-brief .ti5-menu-brief-intro > p,
.rst-content .ti5-menu-brief .ti5-menu-brief-item > p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.7;
}
.rst-content .ti5-menu-brief > .docutils.container + .docutils.container {
    margin-top: 0.5rem !important;
}

/* =======================================================================
 * TDesign 深色手风琴侧栏（覆盖上文浅色菜单规则）
 * - 深底 #2C2B2B；展开一级分组为圆角灰卡片 #333
 * - 子项圆点 + 灰底圆角选中 pill #181818
 * ======================================================================= */

.wy-menu-vertical {
    padding: 8px 10px 16px !important;
}

/* 一级：折叠态平铺；展开态由下方卡片规则包裹 */
.wy-menu-vertical li.toctree-l1 {
    margin: 6px 0 !important;
}

.wy-menu-vertical li.toctree-l1 > a {
    color: var(--sidebar-text) !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: var(--sidebar-item-radius) !important;
    padding: 10px 40px 10px var(--sidebar-pad-l1) !important;
    height: 40px !important;
    min-height: 40px !important;
    font-weight: 500 !important;
}

/* 展开的一级分组：圆角灰卡片（仅含真实子菜单 toctree-l2+ 时）
 * 左右 padding 必须为 0，否则展开后标题相对折叠态右移 */
.wy-menu-vertical li.toctree-l1.current:not(.force-collapse):has(> ul > li.toctree-l2),
.wy-menu-vertical li.toctree-l1.on:has(> ul > li.toctree-l2) {
    background: var(--sidebar-group-bg) !important;
    border-radius: var(--sidebar-menu-radius) !important;
    padding: 6px 0 8px !important;
    margin: 8px 0 !important;
    box-sizing: border-box !important;
}

/* 一级叶子（无子菜单）：无灰卡片，选中时仅链接灰底 pill */
.wy-menu-vertical li.toctree-l1.current:not(.force-collapse):not(:has(> ul > li.toctree-l2)),
.wy-menu-vertical li.toctree-l1.on:not(:has(> ul > li.toctree-l2)),
.wy-menu-vertical li.toctree-l1[data-ti5-about-injected].current,
.wy-menu-vertical li.toctree-l1[data-ti5-about-injected].on {
    background: transparent !important;
    padding: 0 !important;
    margin: 6px 0 !important;
    border-radius: 0 !important;
}

.wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):not(:has(> ul > li.toctree-l2)) > a,
.wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):not(:has(> ul > li.toctree-l2)) > a:hover,
.wy-menu-vertical li.toctree-l1[data-ti5-about-injected].current > a,
.wy-menu-vertical li.toctree-l1[data-ti5-about-injected].current > a:hover {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
    font-weight: 500 !important;
}

.wy-menu-vertical li.toctree-l1.current.force-collapse {
    background: transparent !important;
    padding: 0 !important;
}

.wy-menu-vertical li.toctree-l2 > a,
.wy-menu-vertical li.toctree-l3 > a,
.wy-menu-vertical li.toctree-l4 > a {
    color: #ffffff !important;
    margin: 2px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: var(--sidebar-item-radius) !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 9px 16px 9px 8px !important;
    font-size: 15px !important;
    font-weight: 400 !important;
}

.wy-menu-vertical li.toctree-l2 > a {
    padding-left: var(--sidebar-pad-l2) !important;
}

.wy-menu-vertical li.toctree-l3 > a {
    padding-left: var(--sidebar-pad-l3) !important;
}

.wy-menu-vertical li.toctree-l4 > a {
    padding-left: var(--sidebar-pad-l4) !important;
    color: #ffffff !important;
}

.wy-menu-vertical li.toctree-l1 > ul {
    padding: 0 var(--sidebar-leaf-inset) 2px !important;
    padding-left: var(--sidebar-leaf-inset) !important;
    padding-right: var(--sidebar-leaf-inset) !important;
    margin-top: 2px !important;
    margin-left: 0 !important;
}

/* 无树形竖线（li 级）；四级竖线仅由 l3 > ul 提供 */
.wy-menu-vertical li.toctree-l2,
.wy-menu-vertical li.toctree-l3,
.wy-menu-vertical li.toctree-l4 {
    border-left: none !important;
    padding-left: 0 !important;
}

.wy-menu-vertical li.toctree-l1 > a[href*="ros2/index"] + ul li.toctree-l2::before,
.wy-menu-vertical li.toctree-l1 > a[href*="ros2/index"] + ul li.toctree-l3::before,
.wy-menu-vertical li.toctree-l1 > a[href*="ros2/index"] + ul li.toctree-l4::before,
.wy-menu-vertical li.toctree-l1 > a[href*="sdk/index"] + ul li.toctree-l2::before,
.wy-menu-vertical li.toctree-l1 > a[href*="sdk/index"] + ul li.toctree-l3::before,
.wy-menu-vertical li.toctree-l1 > a[href*="sdk/index"] + ul li.toctree-l4::before {
    display: none !important;
    content: none !important;
}

/* 一/二级、四级：关闭圆点；三级：保留圆点 */
.wy-menu-vertical li.toctree-l1 > a::after,
.wy-menu-vertical li.toctree-l2 > a::after,
.wy-menu-vertical li.toctree-l4 > a::after,
.wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.toctree-l2.current:has(li.current) > a::after,
.wy-menu-vertical li.toctree-l4.current:has(li.current) > a::after,
.wy-menu-vertical li.toctree-l2.on > a::after,
.wy-menu-vertical li.toctree-l4.on > a::after,
.wy-menu-vertical li.current > ul li.toctree-l2.current:has(li.current) > a::after,
.wy-menu-vertical li.on > ul li.toctree-l2.current:has(li.current) > a::after,
.wy-menu-vertical li.current > ul li.toctree-l4.current:has(li.current) > a::after,
.wy-menu-vertical li.on > ul li.toctree-l4.current:has(li.current) > a::after {
    content: none !important;
    display: none !important;
    background: none !important;
}
.wy-menu-vertical li.toctree-l3 > a::after,
.wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.toctree-l3.current:has(li.current) > a::after,
.wy-menu-vertical li.toctree-l3.on > a::after,
.wy-menu-vertical li.current > ul li.toctree-l3.current:has(li.current) > a::after,
.wy-menu-vertical li.on > ul li.toctree-l3.current:has(li.current) > a::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: var(--sidebar-dot) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: var(--sidebar-dot-left) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a::after,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a::after {
    background: #ffffff !important;
    z-index: 5 !important;
}
/* 四级子树竖线（压过「无树形竖线」） */
.wy-menu-vertical li.toctree-l3 > ul {
    border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
    margin-left: var(--sidebar-l4-line-left) !important; /* 与三级圆点中心对齐 */
    padding-left: 0 !important;
}
.wy-menu-vertical li.toctree-l4 > a {
    color: #ffffff !important;
    padding-left: var(--sidebar-pad-l4) !important;
}

/* 悬停：半透明白底 */
.wy-menu-vertical li.toctree-l1:not(.current):not(.on) > a:hover,
.wy-menu-vertical li.toctree-l1.current:has(li.current) > a:hover,
.wy-menu-vertical li.toctree-l1.on > a:hover,
.wy-menu-vertical li.toctree-l2:not(.current) > a:hover,
.wy-menu-vertical li.toctree-l3:not(.current) > a:hover,
.wy-menu-vertical li.toctree-l4:not(.current) > a:hover,
.wy-menu-vertical li.current ul li:not(.current) > a:hover,
.wy-menu-vertical li.on ul li:not(.current) > a:hover,
.wy-menu-vertical li.current ul li.on > a:hover,
.wy-menu-vertical li.on ul li.on > a:hover,
.wy-menu-vertical li.toctree-l2.current:has(li.current) > a:hover,
.wy-menu-vertical li.toctree-l3.current:has(li.current) > a:hover {
    background: var(--sidebar-hover-bg) !important;
    color: var(--sidebar-text) !important;
    border-radius: var(--sidebar-item-radius) !important;
}

/* 选中叶子：灰底圆角 pill（内缩由一级子树 ul padding 统一提供，避免选中/未选中圆点错位） */
.wy-menu-vertical li.toctree-l2.current:not(:has(li.current)),
.wy-menu-vertical li.toctree-l3.current:not(:has(li.current)),
.wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) {
    border-radius: var(--sidebar-item-radius) !important;
    background: var(--sidebar-active-bg) !important;
}

.wy-menu-vertical li.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current:not(:has(li.current)) > a:hover {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
    font-weight: 500 !important;
    border-radius: var(--sidebar-item-radius) !important;
}

.wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a,
.wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a,
.wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a,
.wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a:hover {
    background: transparent !important;
    color: var(--sidebar-active-text) !important;
}

/* 父页自身为当前页且带有子菜单（如「产品用户手册」）：
   选中灰底只落在标题行，勿把子项（如「前言」）包进选中态 */
.wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):has(> ul),
.wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):has(> ul) {
    background: transparent !important;
    border-radius: 0 !important;
}

.wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):has(> ul) > a,
.wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):has(> ul) > a,
.wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):has(> ul) > a:hover,
.wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):has(> ul) > a:hover {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
    border-radius: var(--sidebar-item-radius) !important;
}

/* 展开分组标题行：保持卡片内透明底（勿单独刷蓝） */
.wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):has(> ul > li.toctree-l2) {
    background: var(--sidebar-group-bg) !important;
}

.wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):has(> ul > li.toctree-l2) > a,
.wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):has(> ul > li.toctree-l2) > a:hover,
.wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):has(> ul > li.toctree-l2):has(> ul) > a,
.wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):has(> ul > li.toctree-l2):has(> ul) > a:hover {
    background: transparent !important;
    color: var(--sidebar-text) !important;
    font-weight: 600 !important;
}

/* 选中叶子：左侧蓝色色块（压过通用 a::before { display:none }） */
.wy-menu-vertical li.toctree-l1.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a::before,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    bottom: auto !important;
    width: 3px !important;
    height: 20px !important;
    transform: translateY(-50%) !important;
    background: var(--sidebar-active-bar) !important;
    border-radius: 2px !important;
    z-index: 4 !important;
    pointer-events: none !important;
}

/* 祖先 current / 展开态：卡片内标题透明底；.on 与默认同字重，避免展开瞬间字宽抖动 */
.wy-menu-vertical li.current:has(li.current) > a,
.wy-menu-vertical li.current:has(li.current) > a:hover {
    background: transparent !important;
    color: var(--sidebar-text) !important;
    font-weight: 500 !important;
}
.wy-menu-vertical li.on > a,
.wy-menu-vertical li.on > a:hover {
    background: transparent !important;
    color: var(--sidebar-text) !important;
    font-weight: 400 !important;
}

.wy-menu-vertical li.toctree-l1.current > a,
.wy-menu-vertical li.toctree-l1 > a.current {
    font-weight: 600 !important;
}

.wy-menu-vertical li.current > ul,
.wy-menu-vertical li.on > ul {
    background: transparent !important;
    padding-left: 0 !important;
}

.wy-menu-vertical li.current > ul::before,
.wy-menu-vertical li.on > ul::before {
    display: none !important;
    content: none !important;
}

.wy-menu-vertical li.toctree-l1.current.force-collapse,
.wy-menu-vertical li.toctree-l1.on.force-collapse {
    background: transparent !important;
    padding: 0 !important;
}

/* 展开分组内同级子项：透明底 */
.wy-menu-vertical li.current ul li:not(.current) > a,
.wy-menu-vertical li.on ul li:not(.current) > a,
.wy-menu-vertical li.current ul li.on > a,
.wy-menu-vertical li.on ul li.on > a {
    background: transparent !important;
    color: var(--sidebar-text) !important;
    font-weight: 400 !important;
}

.wy-menu-vertical li.current ul li.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on ul li.current:not(:has(li.current)) > a {
    color: var(--sidebar-active-text) !important;
}

.wy-menu-vertical li a.current,
.wy-menu-vertical li a.current:hover {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
    border-radius: var(--sidebar-item-radius) !important;
}

/* 展开子菜单内选中项：铺满行宽 */
.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a:hover {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a:hover {
    padding-left: var(--sidebar-pad-l2) !important;
}

.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a:hover {
    padding-left: var(--sidebar-pad-l3) !important;
}

.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a:hover,
.wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a:hover {
    padding-left: var(--sidebar-pad-l4) !important;
}

.wy-menu-vertical li.toctree-l2 > ul {
    padding-left: 0 !important;
    margin-left: 0 !important;
    background: transparent !important;
}
.wy-menu-vertical li.toctree-l3 > ul {
    padding-left: 0 !important;
    margin-left: var(--sidebar-l4-line-left) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: transparent !important;
}

/* 展开/收起图标：浅色 chevron */
.wy-menu-vertical .toctree-expand,
.wy-menu-vertical li.toctree-l2:has(> ul) > a > .toctree-expand,
.wy-menu-vertical li.toctree-l3:has(> ul) > a > .toctree-expand {
    filter: brightness(0) invert(1) opacity(0.45) !important;
}

.wy-menu-vertical li.toctree-l1.current:not(.force-collapse) > a > .toctree-expand,
.wy-menu-vertical li.toctree-l1.on:not(.force-collapse) > a > .toctree-expand,
.wy-menu-vertical li.toctree-l2:has(> ul).current:not(.force-collapse) > a > .toctree-expand,
.wy-menu-vertical li.toctree-l2:has(> ul).on:not(.force-collapse) > a > .toctree-expand,
.wy-menu-vertical li.toctree-l3:has(> ul).current:not(.force-collapse) > a > .toctree-expand,
.wy-menu-vertical li.toctree-l3:has(> ul).on:not(.force-collapse) > a > .toctree-expand {
    filter: brightness(0) invert(1) opacity(0.65) !important;
}

/* =======================================================================
 * 覆盖 sphinx-rtd-theme theme.css 浅色 current（e3e3e3 / fcfcfc / c9c9c9）
 * 典型表现：软件工具/Web 子项灰底白字难读、选中项右侧露浅灰条
 * ======================================================================= */

.wy-nav-side .wy-menu-vertical li.current:not(.toctree-l1),
.wy-nav-side .wy-menu-vertical li.on:not(.toctree-l1) {
    background: transparent !important;
    border-right: none !important;
}

.wy-nav-side .wy-menu-vertical li.toctree-l1.current:not(.force-collapse):has(> ul > li.toctree-l2),
.wy-nav-side .wy-menu-vertical li.toctree-l1.on:has(> ul > li.toctree-l2) {
    background: var(--sidebar-group-bg) !important;
    border-radius: var(--sidebar-menu-radius) !important;
    padding: 6px 0 8px !important; /* 无左右内边距，展开/折叠标题左缘对齐 */
}

.wy-nav-side .wy-menu-vertical li.toctree-l1.current:not(:has(> ul > li.toctree-l2)),
.wy-nav-side .wy-menu-vertical li.toctree-l1.on:not(:has(> ul > li.toctree-l2)),
.wy-nav-side .wy-menu-vertical li.toctree-l1[data-ti5-about-injected].current,
.wy-nav-side .wy-menu-vertical li.toctree-l1[data-ti5-about-injected].on {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.wy-nav-side .wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):not(:has(> ul > li.toctree-l2)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):not(:has(> ul > li.toctree-l2)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l1[data-ti5-about-injected].current > a,
.wy-nav-side .wy-menu-vertical li.toctree-l1[data-ti5-about-injected].current > a:hover {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
}

.wy-nav-side .wy-menu-vertical li.current > a,
.wy-nav-side .wy-menu-vertical li.on > a,
.wy-nav-side .wy-menu-vertical li.current > a:hover,
.wy-nav-side .wy-menu-vertical li.on > a:hover,
.wy-nav-side .wy-menu-vertical li.current a,
.wy-nav-side .wy-menu-vertical li.current a:hover {
    border-right: none !important;
    box-shadow: none !important;
}

/* 主题：.toctree-l2.current 下全部 l3 铺 #c9c9c9 */
.wy-nav-side .wy-menu-vertical li.toctree-l2.current > ul > li.toctree-l3 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.on > ul > li.toctree-l3 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.on li.toctree-l3 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4 > a {
    background: transparent !important;
    color: var(--sidebar-text) !important;
}

.wy-nav-side .wy-menu-vertical li.toctree-l2 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4 > a {
    color: #ffffff !important;
}

/* 叶子文字：默认 / 悬停 / 选中均为纯白（压过主题与 link-color 悬停） */
.wy-nav-side .wy-menu-vertical li.toctree-l2:not(:has(> ul)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3:not(:has(> ul)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4:not(:has(> ul)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2:not(:has(> ul)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l3:not(:has(> ul)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l4:not(:has(> ul)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.current ul li:not(.current):not(:has(> ul)) > a,
.wy-nav-side .wy-menu-vertical li.on ul li:not(.current):not(:has(> ul)) > a,
.wy-nav-side .wy-menu-vertical li.current ul li:not(.current):not(:has(> ul)) > a:hover,
.wy-nav-side .wy-menu-vertical li.on ul li:not(.current):not(:has(> ul)) > a:hover {
    color: #ffffff !important;
}

/* 祖先 current（有子级选中）：透明底 + 亮色字 */
.wy-nav-side .wy-menu-vertical li.current:has(li.current) > a,
.wy-nav-side .wy-menu-vertical li.current:has(li.current) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:has(li.current) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:has(li.current) > a {
    background: transparent !important;
    color: var(--sidebar-text) !important;
}

/* 展开父级 / 路径祖先 / 普通项：仅三级保留圆点 */
.wy-nav-side .wy-menu-vertical li.toctree-l1 > a::after,
.wy-nav-side .wy-menu-vertical li.toctree-l2 > a::after,
.wy-nav-side .wy-menu-vertical li.toctree-l4 > a::after,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:has(li.current) > a::after,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:has(li.current) > a::after,
.wy-nav-side .wy-menu-vertical li.toctree-l2.on > a::after,
.wy-nav-side .wy-menu-vertical li.toctree-l4.on > a::after,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l2.current:has(li.current) > a::after,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l2.current:has(li.current) > a::after,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l4.current:has(li.current) > a::after,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l4.current:has(li.current) > a::after {
    content: none !important;
    display: none !important;
    background: none !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l3 > a::after,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:has(li.current) > a::after,
.wy-nav-side .wy-menu-vertical li.toctree-l3.on > a::after,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l3.current:has(li.current) > a::after,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l3.current:has(li.current) > a::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: var(--sidebar-dot) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: var(--sidebar-dot-left) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l3 > ul {
    border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
    margin-left: var(--sidebar-l4-line-left) !important; /* 与三级圆点中心对齐 */
    padding-left: 0 !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l4 > a {
    color: #ffffff !important;
    padding-left: var(--sidebar-pad-l4) !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a {
    color: var(--sidebar-active-text) !important;
}

/* 选中叶子：灰底 pill（压过 theme 灰底；内缩由一级子树 ul 统一提供） */
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)),
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)),
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) {
    background: var(--sidebar-active-bg) !important;
    border-radius: var(--sidebar-item-radius) !important;
}

/* 选中叶子：左侧蓝色色块 */
.wy-nav-side .wy-menu-vertical li.toctree-l1.current:not(:has(li.current)) > a::before,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a::before,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a::before,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a::before,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a::before,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a::before,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a::before,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a::before,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a::before,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    bottom: auto !important;
    width: 3px !important;
    height: 20px !important;
    transform: translateY(-50%) !important;
    background: var(--sidebar-active-bar) !important;
    border-radius: 2px !important;
    z-index: 4 !important;
    pointer-events: none !important;
}

.wy-nav-side .wy-menu-vertical li.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.current:not(:has(li.current)) > a:hover {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
}

.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a:hover {
    background: transparent !important;
    color: var(--sidebar-active-text) !important;
}

/* 父页自身为当前页且带有子菜单：选中态只落在标题行 */
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):has(> ul),
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):has(> ul) {
    background: transparent !important;
    border-radius: 0 !important;
}

.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):has(> ul) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):has(> ul) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):has(> ul) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):has(> ul) > a:hover {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
    border-radius: var(--sidebar-item-radius) !important;
}

/* 一级 hub：卡片内标题透明底，勿单独刷蓝 */
.wy-nav-side .wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):has(> ul > li.toctree-l2) {
    background: var(--sidebar-group-bg) !important;
}

.wy-nav-side .wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):has(> ul > li.toctree-l2) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l1.current:not(:has(li.current)):has(> ul > li.toctree-l2) > a:hover {
    background: transparent !important;
    color: var(--sidebar-text) !important;
}

/* 展开子菜单 ul：透明底 */
.wy-nav-side .wy-menu-vertical li.current > ul,
.wy-nav-side .wy-menu-vertical li.on > ul,
.wy-nav-side .wy-menu-vertical li.toctree-l2 > ul,
.wy-nav-side .wy-menu-vertical li.toctree-l3 > ul {
    background: transparent !important;
}

.wy-nav-side .wy-menu-vertical li.current ul li:not(.current) > a,
.wy-nav-side .wy-menu-vertical li.on ul li:not(.current) > a {
    background: transparent !important;
    color: var(--sidebar-text) !important;
}
.wy-nav-side .wy-menu-vertical li.current ul li.toctree-l4:not(.current) > a,
.wy-nav-side .wy-menu-vertical li.on ul li.toctree-l4:not(.current) > a {
    color: #ffffff !important;
}

.wy-nav-side .wy-menu-vertical li.current ul li.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.on ul li.current:not(:has(li.current)) > a {
    color: var(--sidebar-active-text) !important;
}

/* 二/三/四级悬停：仅当前行 a（ specificity 高于上文 transparent 兜底；勿用 li:hover 避免整棵子树灰底） */
.wy-nav-side .wy-menu-vertical li.current ul li:not(.current) > a:hover,
.wy-nav-side .wy-menu-vertical li.on ul li:not(.current) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l2:not(.current) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l3:not(.current) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l4:not(.current) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:has(li.current) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:has(li.current) > a:hover {
    background: var(--sidebar-hover-bg) !important;
    color: var(--sidebar-text) !important;
    border-radius: var(--sidebar-item-radius) !important;
}

/* 选中叶子悬停：保持灰底（背景在 li，链接透明） */
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):hover > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):hover > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)):hover > a,
.wy-nav-side .wy-menu-vertical li.current:not(:has(li.current)):hover > a {
    background: transparent !important;
    color: var(--sidebar-active-text) !important;
}

/* 有子菜单的父页当前项：悬停仍保持标题行灰底 */
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):has(> ul):hover > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):has(> ul):hover > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):has(> ul) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):has(> ul) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):has(> ul) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):has(> ul) > a:hover {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
    border-radius: var(--sidebar-item-radius) !important;
}

/* 选中叶子：默认与悬停字重一致，避免 hover 时字宽变化导致文字左移 */
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):hover > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):hover > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)):hover > a,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a:hover {
    font-weight: 500 !important;
    font-synthesis: none !important;
}

/* 选中叶子：各级 padding 默认与 hover 一致，避免悬停时文字左移 */
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current:not(:has(li.current)):hover > a,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l2.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l2.current:not(:has(li.current)) > a:hover {
    padding-left: var(--sidebar-pad-l2) !important;
}

.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current:not(:has(li.current)):hover > a,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l3.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l3.current:not(:has(li.current)) > a:hover {
    padding-left: var(--sidebar-pad-l3) !important;
}

.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current:not(:has(li.current)):hover > a,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a,
.wy-nav-side .wy-menu-vertical li.current > ul li.toctree-l4.current:not(:has(li.current)) > a:hover,
.wy-nav-side .wy-menu-vertical li.on > ul li.toctree-l4.current:not(:has(li.current)) > a:hover {
    padding-left: var(--sidebar-pad-l4) !important;
}

/* 最终兜底：展开/折叠/选中/悬停各级左缘对齐，禁止状态切换改写左缩进 */
.wy-nav-side .wy-menu-vertical li.toctree-l1 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l1.current > a,
.wy-nav-side .wy-menu-vertical li.toctree-l1.on > a,
.wy-nav-side .wy-menu-vertical li.toctree-l1 > a:hover {
    padding-left: var(--sidebar-pad-l1) !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l2 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.current > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2.on > a,
.wy-nav-side .wy-menu-vertical li.toctree-l2 > a:hover {
    padding-left: var(--sidebar-pad-l2) !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l3 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.current > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3.on > a,
.wy-nav-side .wy-menu-vertical li.toctree-l3 > a:hover {
    padding-left: var(--sidebar-pad-l3) !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l4 > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4.current > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4.on > a,
.wy-nav-side .wy-menu-vertical li.toctree-l4 > a:hover {
    padding-left: var(--sidebar-pad-l4) !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l1 > ul {
    padding-left: var(--sidebar-leaf-inset) !important;
    padding-right: var(--sidebar-leaf-inset) !important;
    margin-left: 0 !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l2 > ul {
    padding-left: 0 !important;
    margin-left: 0 !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l1.current:not(.force-collapse):has(> ul > li.toctree-l2),
.wy-nav-side .wy-menu-vertical li.toctree-l1.on:has(> ul > li.toctree-l2),
.wy-nav-side .wy-menu-vertical li.toctree-l1.current.force-collapse,
.wy-nav-side .wy-menu-vertical li.toctree-l1:not(.current):not(.on) {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ========== 侧栏底部收起按钮：已禁用 ========== */
.ti5-sidebar-footer {
    display: none !important;
}

/* ========== 侧栏底部：桌面端收起/展开（保留样式供回滚，footer 已隐藏） ========== */
@media (max-width: 768px) {
    .ti5-sidebar-footer {
        display: none !important;
    }
}

@media (min-width: 769px) {
    html:not(.ti5-embed) .wy-nav-side {
        display: flex !important;
        flex-direction: column !important;
        width: var(--sidebar-width) !important;
        padding-bottom: 0 !important;
        transition: width 0.25s ease;
        z-index: 201;
    }
    .wy-nav-content-wrap {
        transition: margin-left 0.25s ease;
    }
    .wy-side-scroll {
        flex: 1 1 0 !important;
        min-height: 0 !important;
    }

    .ti5-sidebar-footer {
        flex-shrink: 0;
        box-sizing: border-box;
        width: 100%;
        height: var(--ti5-sidebar-footer-height);
        display: flex;
        align-items: center;
        padding: 0 12px;
        background: var(--sidebar-bg);
        border-top: 1px solid var(--sidebar-border);
    }

    .ti5-sidebar-collapse-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border: none;
        border-radius: 6px;
        background: transparent;
        color: var(--sidebar-text);
        cursor: pointer;
        transition: background-color 0.2s, color 0.2s;
    }
    .ti5-sidebar-collapse-btn:hover {
        background: var(--sidebar-hover-bg);
        color: #ffffff;
    }
    .ti5-sidebar-collapse-btn:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.35);
        outline-offset: 2px;
    }
    .ti5-sidebar-collapse-btn__icon {
        position: relative;
        display: block;
        width: 17px;
        height: 14px;
        border: 1.25px solid currentColor;
        border-radius: 3px;
        box-sizing: border-box;
        flex-shrink: 0;
        background: transparent;
        box-shadow: none;
    }
    .ti5-sidebar-collapse-btn__icon::before {
        content: "";
        position: absolute;
        left: 4px;
        top: -1.25px;
        bottom: -1.25px;
        border-left: 1.25px solid currentColor;
    }

    html.ti5-sidebar-collapsed .wy-nav-side {
        width: var(--ti5-sidebar-collapsed-width) !important;
        justify-content: flex-end;
    }
    html.ti5-sidebar-collapsed .wy-side-scroll {
        display: none !important;
    }
    html.ti5-sidebar-collapsed .wy-nav-content-wrap {
        margin-left: 0 !important;
    }
    html.ti5-sidebar-collapsed .ti5-sidebar-footer {
        border-top: none;
    }
}

/* 压过 RTD theme.css 的 .wy-side-scroll{height:100%;overflow-y:scroll} */
nav.wy-nav-side .wy-side-scroll {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}
nav.wy-nav-side .wy-side-scroll::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

/* 全站共用顶栏（_templates/navbar.html，经 layout.html extrabody 注入） */
.my-unique-navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    padding: 10px 24px;
    background: #2C2B2B;
    border-bottom: 1px solid #383838;
    font-size: 14px;
    line-height: 1.4;
}
.my-unique-navbar a {
    color: rgba(255, 255, 255, 0.92) !important;
    text-decoration: none !important;
    white-space: nowrap;
}
.my-unique-navbar a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}
@media screen and (max-width: 768px) {
    .my-unique-navbar {
        padding: 8px 12px;
        gap: 6px 14px;
        font-size: 13px;
    }
}

/* iframe 内嵌：隐藏内页侧栏/顶栏，正文铺满（须压过上方 display:flex !important） */
html.ti5-embed,
html.ti5-embed body,
html.ti5-embed .wy-body-for-nav {
    background: #ffffff !important;
    overflow-y: auto !important;
    scrollbar-gutter: auto !important;
}
/* 壳页本身：取消 stable 滚动条槽，避免右侧露出深色条 */
html.ti5-app-shell,
html.ti5-app-shell body {
    overflow: hidden !important;
    scrollbar-gutter: auto !important;
    background: #ffffff !important;
}
html.ti5-embed .wy-nav-side,
html.ti5-embed nav.wy-nav-side,
html.ti5-embed .wy-nav-top,
html.ti5-embed .my-unique-navbar,
html.ti5-embed .ti5-sidebar-footer,
html.ti5-embed .rst-versions {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
html.ti5-embed .wy-nav-content-wrap,
html.ti5-embed .wy-nav-content-wrap.shift,
html.ti5-embed .wy-grid-for-nav {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: #ffffff !important;
}
html.ti5-embed .wy-nav-content {
    max-width: none !important;
    width: 100% !important;
    background: #ffffff !important;
}
