/* ===============================================================================
   Quectel Sphinx Documentation Theme
   Based on Official Quectel Brand Design System
   基于移远通信官方品牌设计规范
   =============================================================================== */

/* ========================================
   CRITICAL: Override Sphinx Basic Theme
   ======================================== */
/* 这些样式必须在最前面，以确保覆盖 basic.css */

/* 1. 隐藏 basic 主题的所有默认元素 */
div.related,
div.sphinxsidebar,
div.bodywrapper > div.body,
div.footer {
    display: none !important;
}

/* 2. 重置 document wrapper 让它占满整个页面 */
div.documentwrapper {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 3. 重置 document 容器 */
div.document {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 4. 确保 body 没有默认的 padding/margin */
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* ========================================
   Custom Web Fonts - 自定义字体
   
   Font Licenses:
   - Stratos: © Quectel Wireless Solutions Co., Ltd. (Internal use only)
   - Source Han Sans: SIL Open Font License 1.1 (Adobe & Google)
   
   See: static/fonts/FONT_LICENSES.md for full license details
   ======================================== */

/* Stratos Regular - 400 weight (lightest available).
   字体 URL 用站点绝对路径（DEV-33547 / t290008）：相对路径让同一颗 woff2 从
   页面主题与 /zh/_static/ 桥接两个 URL 各下载一次（Lighthouse 实测重复 ~67KB/页，
   bold 820ms 才开始）。绝对路径全站单源；构建路径下的 asset_prefix 重写在
   site_shell.py 注入器里处理（file:// 直开产物不依赖 /static/）。 */
@font-face {
    font-family: 'Stratos';
    src: url('/static/sphinx_quectel_theme/static/fonts/stratos-regular.49779b.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Stratos Medium - 500 weight */
@font-face {
    font-family: 'Stratos';
    src: url('/static/sphinx_quectel_theme/static/fonts/stratos-medium.5e0918.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   CSS Variables - 品牌设计变量系统
   ======================================== */
:root {
    /* Primary Colors - 主色彩 */
    --color-primary: #0066CC;
    --color-primary-dark: #004C99;
    --color-primary-light: #3385D6;
    --color-primary-lighter: #E6F2FF;
    
    /* Secondary Colors - 辅助色 */
    --color-secondary: #E31E24;
    --color-secondary-dark: #C41A1F;
    
    /* Neutral Colors - 中性色 */
    --color-black: #000000;
    --color-gray-500: #333333;
    --color-gray-400: #666666;
    --color-gray-300: #999999;
    --color-gray-200: #CCCCCC;
    --color-gray-100: #F5F5F5;
    --color-white: #FFFFFF;
    
    /* Functional Colors - 功能色 */
    --color-success: #28A745;
    --color-warning: #FFC107;
    --color-error: #DC3545;
    --color-info: #17A2B8;
    
    /* Typography - 字体 */
    --font-family: 'Stratos', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'PingFang SC', 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue', 'Arial', sans-serif;
    --font-size-h1: 32px;  /* 原 48px，减小 */
    --font-size-h2: 28px;  /* 原 36px，减小 */
    --font-size-h3: 24px;  /* 原 28px，减小 */
    --font-size-h4: 20px;  /* 原 24px，减小 */
    --font-size-h5: 17px;  /* 原 20px，减小 */
    --font-size-body: 15px;  /* 原 16px，稍微缩小 */
    --font-size-small: 13px;  /* 原 14px */
    --font-size-xs: 12px;
    
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.65;  /* 原 1.75，更紧凑 */
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 500; /* Stratos only ships 400/500; 600 risked faux-bold */
    --font-weight-bold: 500; /* Stratos only ships 400/500; 700 caused browser faux-bold */
    
    /* Spacing - 间距 */
    --spacing-xxs: 1px;  /* 超小间距，用于列表项，进一步缩小 */
    --spacing-xs: 6px;   /* 原 8px，更紧凑 */
    --spacing-sm: 8px;   /* 原 12px，用于段落间距 */
    --spacing-md: 18px;  /* 原 24px，更紧凑 */
    --spacing-lg: 24px;  /* 原 32px，更紧凑 */
    --spacing-xl: 36px;  /* 原 48px，更紧凑 */
    --spacing-xxl: 48px; /* 原 64px，更紧凑 */
    --spacing-xxxl: 72px; /* 原 96px，更紧凑 */
    
    /* Layout - 布局 */
    --container-max-width: 1200px;
    --header-height: 70px;
    --contents-width: 300px;
    --on-this-page-width: 280px; /* 右侧页面内导航宽度 */
    --toc-title-height: 56px; /* TOC标题固定高度，用于保持一致的界面高度 */
    
    /* Border Radius - 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    /* Shadows - 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    /* Transitions - 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   Reset & Base Styles - 重置和基础样式
   ======================================== */

/* 强制隐藏 Sphinx basic 主题的默认元素 */
.sphinxsidebar,
.related,
.relbar1,
.relbar2,
div.bodywrapper,
div.body,
div.documentwrapper {
    display: none !important;
}

/* 确保 document 容器占满整个宽度 */
.document {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 确保 quectel-layout 正确显示 - 三栏布局 */
.quectel-layout {
    display: flex !important;
    flex: 1 !important;
    width: 100% !important;
    margin: 0 !important;
    padding-top: var(--header-height) !important;
    position: relative !important;
    min-height: calc(100vh - var(--header-height));
}
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

/*
 * 锚点落位时避开固定头部。
 *
 * 浏览器把目标滚到滚动视口顶边，而顶边被固定头部盖住，所以纯原生跳转（从别的页面带 #hash
 * 进来、直接加载带 #hash 的 URL、以及任何 JS 没有拦截的链接）都会把标题藏在头部后面。
 * scroll-margin-top 是标准解法：由浏览器自己算，不需要主题参与，也就不需要主题去猜
 * 自己是不是被嵌在 iframe 里（控制台预览页正是这样：页面自己滚，头部就在页面里）。
 */
.quectel-content [id] {
    scroll-margin-top: calc(var(--header-height) + var(--toc-title-height) + 8px);
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    line-height: var(--line-height-normal);
    color: var(--color-gray-500);
    background: var(--color-white);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Screen Reader Only - 辅助功能 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Search page form - align Sphinx's default search form with Quectel theme */
.quectel-content #search-documentation ~ form[action=""][method="get"] {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: min(100%, 680px);
    margin: 20px auto 28px;
}

.quectel-content #search-documentation ~ form[action=""][method="get"] input[name="q"] {
    flex: 1 1 320px;
    min-width: 240px;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--color-gray-300);
    border-radius: 4px;
    background: var(--color-white);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.4;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.quectel-content #search-documentation ~ form[action=""][method="get"] input[name="q"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: none;
}

.quectel-content #search-documentation ~ form[action=""][method="get"] input[type="submit"] {
    height: 46px;
    padding: 0 18px;
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    background: transparent;
    color: var(--color-primary);
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: var(--font-weight-normal);
    line-height: 1;
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.quectel-content #search-documentation ~ form[action=""][method="get"] input[type="submit"]:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: none;
}

.quectel-content #search-documentation ~ form[action=""][method="get"] input[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: none;
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
}

.quectel-content #search-documentation ~ form[action=""][method="get"] #search-progress {
    display: none !important;
}

@media (max-width: 768px) {
    .quectel-content #search-documentation ~ form[action=""][method="get"] {
        align-items: stretch;
        gap: 10px;
    }

    .quectel-content #search-documentation ~ form[action=""][method="get"] input[name="q"],
    .quectel-content #search-documentation ~ form[action=""][method="get"] input[type="submit"] {
        width: 100%;
    }
}

/* ========================================
   Header - 页眉导航栏
   ======================================== */

/* Logo should maintain its aspect ratio and size */

/* Keep same height on all screens to match official site */

/* Navigation - 导航菜单 */

/* Remove responsive font size - official site uses consistent 17px */

/* Navigation item with submenu - Mega Menu style */

/* Position nav item to full height for bottom alignment */

/* Hover underline effect - aligned with header bottom border */

/* Show underline on hover for all nav links */

/* Arrow indicator - CSS triangle */

/* Mega submenu container - Full width panel */

/* 创建一个更大的桥接区域，覆盖菜单项到子菜单之间的空间 */

/* 当悬停在菜单项时显示子菜单 - 立即显示，无延迟 */

/* Mobile submenu styles */

/* Right Toolbar - 右侧工具栏 */

/* Search result keyword highlight */
.quectel-content .highlighted {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0 2px;
    border-radius: 2px;
}

/* Header Search Toggle Button - 官网样式 icon icon__search-black */

/* Language Switcher - 官网样式语言切换 */

/* Language Dropdown - 参考官网 nav__language 样式 */

/* 添加一个伪元素来桥接按钮和下拉菜单之间的间隙 */

/* Search Dropdown Panel - 官网样式 nav__search__outer */
.quectel-search-dropdown {
    position: fixed;
    width: 100vw;
    top: var(--header-height);
    left: 0;
    z-index: 999;
    background-color: #E9ECEC;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.quectel-search-dropdown.active {
    opacity: 1;
    visibility: visible;
}

.quectel-search-dropdown-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem;
    position: relative;
}

.quectel-search-close-wrapper {
    position: absolute;
    top: 1.875rem;
    right: 1.875rem;
}

.quectel-search-close {
    display: block;
    margin-left: auto;
    cursor: pointer;
    font-size: 1.5rem;
    color: #A6A9A9;
    transition: color var(--transition-normal);
    line-height: 1;
}

.quectel-search-close:hover {
    color: var(--color-text);
}

.quectel-search-form-wrapper {
    margin-top: 0;
}

.quectel-search-form-wrapper form {
    display: flex;
    align-items: center;
    flex-grow: 1;
    font-weight: 400;
    padding: 9px 0;
    background-color: transparent;
    border: 0;
    border-bottom: 2px solid #A6A9A9;
}

.quectel-search-form-wrapper form label {
    width: 100%;
}

.quectel-search-form-wrapper input[type="search"],
.quectel-search-form-wrapper input[type="text"] {
    background-color: transparent;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 2;
    padding: 0;
    width: 100%;
    border: none;
    font-family: var(--font-family);
}

@media (min-width: 768px) {
    .quectel-search-form-wrapper input[type="search"],
    .quectel-search-form-wrapper input[type="text"] {
        font-size: 2.625rem;
        line-height: 1.2;
    }
}

.quectel-search-form-wrapper input:focus {
    outline: none;
    box-shadow: none;
}

.quectel-search-form-wrapper input::placeholder {
    color: #D8DBDB;
    opacity: 1;
}

/* 隐藏浏览器默认的搜索框清空按钮(X) */
.quectel-search-form-wrapper input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.quectel-search-form-wrapper input[type="search"]::-ms-clear {
    display: none;
}

/* Search Submit Button - 放大镜按钮（仅图标，无边框、无背景） */
.quectel-search-submit-btn {
    position: relative;
    margin-left: 1.5rem;
    padding: 0 !important;
    width: 3rem;
    height: 3rem;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none !important;
    transform: none !important;
}

.quectel-search-submit-btn:hover {
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.quectel-search-submit-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke: #6B6C6D;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .quectel-search-submit-btn {
        width: 3rem;
        height: 3rem;
        margin-left: 1rem;
    }
    
    .quectel-search-submit-btn svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* Screen reader only - 官网样式 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.quectel-search-form-wrapper input::placeholder {
    color: var(--color-gray-400);
}

/* ========================================
   Layout - 主体布局
   ======================================== */
.quectel-layout {
    display: flex;
    min-height: 100vh;
}

/* Contents - 左侧目录导航 */
.quectel-contents {
    width: var(--contents-width);
    background: var(--color-white);
    border-right: 1px solid var(--color-gray-200);
    /* 改回固定定位，不跟随内容滚动 */
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    z-index: 99;
    padding-top: 0;
    margin-top: 0;
    /* 使用 flexbox 布局来分离固定区域和滚动区域 */
    display: flex;
    flex-direction: column;
}

/* 隐藏目录导航搜索框 - 统一使用顶部导航的搜索入口 */
.quectel-search-contents {
    display: none !important;
}

/* 隐藏目录导航滚动容器 - 因为其内容（搜索框等）已被隐藏，不再需要 */
.quectel-contents-scrollable {
    display: none !important;
}

.official-context-categories {
    background: #210079;
    border-top-color: #210079;
    border-bottom-color: #210079;
}

.official-context-category,
.official-context-category a,
.official-context-category.is-current,
.official-context-category.is-current a,
.official-context-category-more-trigger {
    color: #fff;
}

.official-context-category.is-current::after {
    background: #ed000c;
}

/* Table of Contents - 目录区域 */
.quectel-toc {
    /* 整个目录区域作为flex容器 */
    display: flex;
    flex-direction: column;
    flex: 1; /* 让目录区域占据侧边栏的全部空间，自适应高度 */
    background: var(--color-white);
    min-height: 0; /* 允许flex item收缩 */
    overflow-y: auto; /* 允许目录内容垂直滚动 */
}

/* 目录内容部分 */
.quectel-contents-content {
    padding: var(--spacing-md) var(--spacing-lg);
    flex: 1;
}

.quectel-toc-title {
    /* 目录标题固定在顶部，不滚动 */
    font-size: var(--font-size-h5);
    color: var(--color-gray-500);
    margin: 0;
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-sm);
    border-bottom: 2px solid var(--color-secondary);
    background: var(--color-white);
    flex-shrink: 0; /* 防止标题被压缩 */
    height: var(--toc-title-height); /* 明确设置固定高度 */
    box-sizing: border-box; /* 确保padding包含在高度内 */
    display: flex;
    align-items: center; /* 垂直居中文字 */
    position: relative; /* 确保在顶部 */
    z-index: 10; /* 确保在滚动内容之上 */
}

/* 折叠按钮容器 - 独立显示在最左侧 */
.contents-toggle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border-right: 1px solid var(--color-gray-200);
    z-index: 100;
}

/* 左侧导航折叠按钮（类似右侧导航的样式） */
.contents-toggle {
    /* Layout */
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    line-height: 1;

    /* Visual */
    border: 1px solid var(--color-gray-200);
    border-radius: 10px;
    background: rgba(0, 102, 204, 0.08); /* brand tint */
    color: var(--color-primary); /* SVG uses currentColor */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);

    /* Interaction */
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast);
}

.contents-toggle svg,
.contents-toggle img {
    width: 20px;
    height: 20px;
    display: block;
    /* 不加 transform 过渡：折叠态用 scaleX(-1) 镜像，必须瞬时就位。
       图标本身不需要动画，保持过渡只会让切换看起来像在“动”。 */
}

.contents-toggle:hover {
    background: rgba(0, 102, 204, 0.14);
    border-color: rgba(0, 102, 204, 0.35);
    color: var(--color-primary-dark);
}

.contents-toggle:active {
    transform: translateY(1px);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.contents-toggle:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(0, 102, 204, 0.22),
        0 1px 2px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 102, 204, 0.55);
}

/* 折叠态把图标**水平镜像**（不是 rotate(180deg)）。
   rotate 会让箭头绕中心转一圈的效果，看起来像在"转圈"；scaleX(-1) 只是左右对调，
   瞬间到位。同时把过渡去掉，避免中间出现旋转/缩放的中间帧。 */
body.contents-collapsed .contents-toggle svg,
body.contents-collapsed .contents-toggle img,
.quectel-contents.collapsed ~ * .contents-toggle svg,
.quectel-contents.collapsed ~ * .contents-toggle img {
    transform: scaleX(-1);
    transition: none;
}

/* 左侧导航收缩状态 */
.quectel-contents.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    border-right: none;
    overflow: hidden;
}

/* 折叠时隐藏所有导航内容 */
.quectel-contents.collapsed .quectel-toc,
.quectel-contents.collapsed .quectel-contents-scrollable {
    display: none;
    opacity: 0;
    visibility: hidden;
}

/* 当左侧导航收缩时，调整主内容区域 */
body.contents-collapsed .quectel-main {
    margin-left: 0 !important; /* 不再为左侧导航预留空间 */
}

/* 窄视口（≤1200px，含 A4 预览画布）下文档中心区退化为块级堆叠，三栏 grid 不生效。
   折叠态的目录/大纲只把宽度归零，高度仍按内容撑开（实测 A4 画布内正文顶部被推到
   1121px，整屏只剩空白）。折叠即不应占据任何流内高度，否则首屏看到的是一段空块。 */
@media (max-width: 1200px) {
    [data-official-document-region="true"] > .quectel-contents.collapsed,
    [data-official-document-region="true"] > .on-this-page.collapsed {
        display: none !important;
    }
}

body.contents-collapsed .quectel-content-header {
    left: 0 !important; /* 标题栏左边距为0 */
    padding-left: calc(var(--spacing-xl) + 32px + var(--spacing-md)); /* 仍然为按钮留出空间 */
}

body.contents-collapsed .quectel-contents-resize-handle {
    display: none !important; /* 隐藏调整宽度的拖动条 */
}

/* Caption样式 - 作为一级标题显示在左侧导航 */
.quectel-toc p.caption {
    margin: 0 0 var(--spacing-sm) 0;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    margin: var(--spacing-sm) var(--spacing-sm) var(--spacing-md) var(--spacing-sm);
}

.quectel-toc p.caption .caption-text {
    color: var(--color-white);
    font-size: var(--font-size-h6);
    font-weight: var(--font-weight-semibold);
    display: block;
    text-align: center;
    letter-spacing: 0.5px;
    /* 支持文字换行显示 */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

/* 目录内容区域 - 在滚动容器内 */
.quectel-toc > ul {
    /* 目录树形内容在滚动容器内 */
    margin: 0;
    padding: var(--spacing-sm) 0 var(--spacing-md); /* 上下padding保留，左右由链接控制 */
    list-style: none;
}

/* 左侧目录区域滚动条样式 */
.quectel-toc::-webkit-scrollbar {
    width: 6px;
}

.quectel-toc::-webkit-scrollbar-track {
    background: var(--color-white);
    border-radius: 3px;
}

.quectel-toc::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: 3px;
    transition: background var(--transition-fast);
}

.quectel-toc::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

/* TOC toggle arrow - 目录切换箭头 (SVG版本) */
.toc-toggle {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 0.25rem !important; /* 减小间距从0.5rem到0.25rem (4px) */
    margin-left: -20px !important; /* 调整负margin: 箭头16px + 间距4px = 20px */
    vertical-align: middle !important;
    min-width: 16px !important;
    min-height: 16px !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s ease !important;
    cursor: pointer !important;
    color: var(--color-gray-600) !important;
}

/* TOC spacer - 目录占位符（叶子节点对齐用） */
.toc-spacer {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 0.25rem !important; /* 减小间距从0.5rem到0.25rem (4px) */
    margin-left: -20px !important; /* 调整负margin: 箭头16px + 间距4px = 20px */
    vertical-align: middle !important;
    min-width: 16px !important;
    min-height: 16px !important;
    flex-shrink: 0 !important;
}

/* 悬停时箭头变颜色 */
.quectel-toc a:hover .toc-toggle {
    color: var(--color-secondary) !important;
}

/* 嵌套列表样式 */
.quectel-toc ul ul {
    margin-left: 12px; /* 进一步减少嵌套缩进，从 16px 减少到 12px */
    padding: 0;
    list-style: none;
    transition: all var(--transition-fast);
}

/* 收起状态的子列表 */
.quectel-toc li:not(.expanded) > ul {
    display: none;
}

/* 展开状态的子列表 */
.quectel-toc li.expanded > ul {
    display: block;
}

.quectel-toc li {
    margin: 0;
}

.quectel-toc a {
    display: flex;
    align-items: center;
    padding: 6px var(--spacing-lg); /* 与标题相同的左右padding */
    color: var(--color-gray-400);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    font-size: var(--font-size-small);
    line-height: 1.3;
    min-width: 0; /* 允许flex子元素收缩 */
}

/* 文字容器 - 仅在溢出时显示省略号 */
.quectel-toc a .toc-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* 悬停效果 - 白底红字 */
.quectel-toc a:hover {
    background: var(--color-white);
    color: var(--color-secondary);
    position: relative;
}

/* 仅在文字溢出时显示浮窗提示 - 使用 fixed 定位在页面最上层，显示在右侧 */
.quectel-toc a[data-overflow="true"]:hover::after,
.on-this-page-link[data-overflow="true"]:hover::after {
    content: attr(data-title);
    position: fixed; /* 固定定位，不受父容器限制 */
    left: var(--left-toc-tooltip-left, 300px); /* 通过 CSS 变量设置，默认 300px */
    top: var(--left-toc-tooltip-top, 100px); /* 通过 CSS 变量设置，默认 100px */
    background: var(--color-gray-500);
    color: var(--color-white);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    white-space: normal;
    word-wrap: break-word;
    max-width: 300px;
    box-sizing: border-box;
    font-size: var(--font-size-small);
    line-height: 1.4;
    z-index: 99999; /* 最高层级 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* 选中效果（滚动自动高亮）- 白底红字 */
.quectel-toc a.current {
    background: var(--color-white) !important;
    color: var(--color-secondary) !important;
}

/* Contents Relations (Prev/Next) - 移到可滚动区域 */
.quectel-contents-relations {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-gray-200);
}

.quectel-contents-prev,
.quectel-contents-next {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    background: var(--color-white);
    border-radius: var(--radius-sm);
    color: var(--color-gray-500);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: var(--font-size-small);
}

.quectel-contents-prev:hover,
.quectel-contents-next:hover {
    background: var(--color-secondary-lighter);
    color: var(--color-secondary);
    transform: translateX(4px);
}

.quectel-contents-prev {
    flex-direction: row;
}

.quectel-contents-next {
    flex-direction: row-reverse;
}

.quectel-contents-relation-icon {
    font-weight: var(--font-weight-bold);
}

/* Contents Resize Handle - 目录导航调整宽度拖动条 */
.quectel-contents-resize-handle {
    position: fixed;
    top: var(--header-height);
    left: calc(var(--contents-width) - 2px); /* 居中在边框上 */
    width: 4px;
    height: calc(100vh - var(--header-height));
    background: transparent;
    cursor: ew-resize;
    z-index: 100;
    /* 拖动中不能有 left 过渡：每帧都在改 left，过渡会让拖动条黏在手指/光标后面。
       过渡只服务于「折叠/展开」这种一次性位移。 */
    transition: none;
}

.quectel-contents-resize-handle.dragging {
    transition: none;
}

/* 命中区域比视觉宽度宽：4px 的条用鼠标很难抓住，但视觉上不该变粗。
   用左右各 4px 的透明 padding 扩大可点击范围（实际命中宽度 12px）。 */
.quectel-contents-resize-handle::after {
    content: '';
    position: absolute;
    inset: 0 -4px;
}

.quectel-contents-resize-handle:hover,
.quectel-contents-resize-handle.dragging {
    background: transparent;
}

.quectel-contents-resize-handle:focus-visible {
    outline: 2px solid var(--color-primary, #0055b8);
    outline-offset: 2px;
}

.quectel-contents-resize-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 40px;
    background: var(--color-gray-300);
    border-radius: 2px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.quectel-contents-resize-handle:hover::before,
.quectel-contents-resize-handle.dragging::before,
.quectel-contents-resize-handle:focus-visible::before {
    opacity: 1;
    background: var(--color-primary, #0055b8);
}

/* Main Content Area */
.quectel-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* 为固定的边栏留出空间 */
    margin-left: var(--contents-width);
    margin-right: var(--on-this-page-width);
    margin-top: var(--toc-title-height);
    background: var(--color-white);
    min-height: calc(100vh - var(--header-height) - var(--toc-title-height));
    transition: margin-right var(--transition-normal);
    /* 关键：flex 项目的自动最小尺寸（min-width:auto）不小于内容的 min-content 宽度，而一个
       Word 表格的 min-content 可能远宽于容器——正文列于是被表格顶宽，整页出现水平滚动条，
       表格自己的 `max-width: 100%` 永远没机会生效（因为父级压根没有变窄）。

       实测（同一页，未加标记的普通页面）：900 px 视口溢出 241 px、1024 px 视口溢出 117 px；
       加上 `min-width: 0` 后两者都是 0，正文列随视口收窄（846→605 / 846→729），表格改为
       换行而不是把页面顶出去。

       只在 769 px 以上会看到：更窄时上方的窄屏分支把表格改成 `display: block` 并允许内部
       滚动，表格的 min-content 就不再传给父级了。 */
    min-width: 0;
}

/* Global search keeps the site header but does not need document navigation. */
body.qdoc-global-search-page {
    overflow: visible !important;
}

body.qdoc-global-search-page .quectel-main {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
}

body.qdoc-global-search-page .quectel-content {
    border-left: 0 !important;
    border-right: 0 !important;
    max-width: none;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.qdoc-global-search-page [data-official-document-main="true"] > .quectel-main > .quectel-content {
    width: 100% !important;
    margin-left: 0 !important;
}

/* 面包屑与搜索内容使用同一列宽，避免全局搜索页左右不齐。 */
body.qdoc-global-search-page [data-official-document-main="true"] > .quectel-main > .quectel-content > .official-context-breadcrumb {
    width: min(100% - 48px, 1215px);
    margin: 12px auto 0;
}

body.qdoc-global-search-page [data-official-document-main="true"] > .quectel-main {
    width: 100% !important;
    margin-left: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
}

body.qdoc-global-search-page [data-official-document-region] {
    display: block !important;
}

body.qdoc-global-search-page [data-official-document-main] {
    width: 100% !important;
    border: 0 !important;
}

body.qdoc-global-search-page .quectel-content-header,
body.qdoc-global-search-page .quectel-contents,
body.qdoc-global-search-page .quectel-contents-overlay,
body.qdoc-global-search-page .on-this-page,
body.qdoc-global-search-page .on-this-page-nav,
body.qdoc-global-search-page .quectel-content-download,
body.qdoc-global-search-page .quectel-share-feedback {
    display: none !important;
}

/* Search results use a centered, single-column layout. */
.qdoc-search-page {
    width: min(100% - 48px, 1215px);
    margin: 0 auto;
    padding: 20px 0 60px;
}

.qdoc-search-page > h1,
.qdoc-search-help {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 搜索条：通栏白色底带，内部为居中的白色输入框（设计稿要求底带与输入框同为白底）。
   底带改白后，原先由 #eaecec 灰底与下方白区形成的分界消失，改为底带下缘 1px 分隔线
   承接同一条视觉边界（颜色沿用原灰底 #eaecec，避免引入新的色阶）。
   滚动时置顶吸住（与文档页一致）：官方 header 会随滚动上移让位
   （--official-site-header-scroll-offset），因此吸顶偏移取 header 的**可见高度**，
   header 完全滚出后归 0，搜索条就贴到视口顶端。三个变量都由
   official-footer-reveal.js 的 syncDocumentScroll() 写入；--qdoc-search-band-top
   是首帧 fallback（脚本尚未执行时用 header 标称高度）。 */
.qdoc-search-band {
    --qdoc-search-band-top: var(--official-site-header-visible-height, var(--official-site-header-height, 110px));
    position: sticky;
    top: var(--qdoc-search-band-top);
    z-index: 1100; /* 高于结果区与筛选侧栏，低于官方固定 header（2000） */
    margin: 0;
    padding: 40px 0;
    background: var(--color-white);
    /* 分隔线下方投射一圈很淡的阴影（设计稿）：滚动吸附时也能提示内容在其下经过。 */
    border-bottom: 1px solid #eaecec;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* 搜索页顶部还有产品分类栏（`.official-context-categories`，sticky 在 header 可见
   下缘，高度 --official-context-category-height）：搜索条要再往下让出一条分类栏高度，
   否则两栏会叠在同一位置。分类栏不存在时（某些预览/无分类栏的树）保持上面的基线。
   放在 document-content.css 而不是 shell bridge，是因为这份规则顺序在
   shell bridge 之前加载、且这里才是搜索条偏移的唯一定义点。 */
body:has(.official-context-categories) .qdoc-search-band {
    top: calc(
        var(--official-site-header-visible-height, var(--official-site-header-height, 110px))
        + var(--official-context-category-height, 76px)
    );
}

.qdoc-search-form {
    display: flex;
    align-items: center;
    width: min(100% - 48px, 1215px);
    height: 40px;
    min-height: 40px;
    margin: 0 auto;
    border: 1px solid #e9ecec;
    border-radius: 4px;
    background: var(--color-white);
    overflow: hidden;
}

.qdoc-search-form input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 0 16px;
    border: 0;
    color: #1a1a1a;
    font: inherit;
    font-size: 14px;
    line-height: 17.64px;
    outline: 0;
    background: transparent;
    box-shadow: none;
}

/* 主题外壳的 Tailwind 产物 app.6131ec.css 会给 [type="text"]:focus 加 1px :focus ring，
   被本表单的 overflow:hidden + border-radius 裁成内缩小框；此处清空以保持单一外框。 */
.qdoc-search-form input[type="text"]:hover,
.qdoc-search-form input[type="text"]:focus,
.qdoc-search-form input[type="text"]:focus-visible,
.qdoc-search-form input[type="search"]:hover,
.qdoc-search-form input[type="search"]:focus,
.qdoc-search-form input[type="search"]:focus-visible {
    outline: 0;
    box-shadow: none;
    -webkit-box-shadow: none;
}

.qdoc-search-form button {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 0;
    background: #ed000c;
    color: var(--color-white);
    cursor: pointer;
}

.qdoc-search-form .quectel-search-submit-btn {
    width: 40px;
    height: 40px;
    margin-left: 0;
    padding: 0 !important;
    border: none !important;
    background: #ed000c !important;
    color: var(--color-white, #fff);
    border-radius: 0 !important;
    box-shadow: none !important;
}

.qdoc-search-form .quectel-search-submit-btn svg {
    width: 24px;
    height: 24px;
}

.qdoc-search-form .quectel-search-submit-btn:hover {
    background: #c90010 !important;
    border-color: transparent !important;
    color: var(--color-white, #fff);
}

.qdoc-search-form button:hover {
    background: #c90010;
}

/* 空内容时不占位，避免在红色按钮右侧留出白边。
   加载文案本身不再展示：`searchtools.js` 仍会写入 `#search-progress`（它只认这个 id），
   但官网搜索页把加载态放在结果区中央，搜索框旁不再出现文字（DEV-35729 后续）。 */
.qdoc-search-form #search-progress,
.qdoc-search-form #search-progress:not(:empty) {
    display: none !important;
}

.qdoc-search-layout {
    display: block;
}

.qdoc-search-layout-global {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    align-items: start;
    gap: 32px;
}

/* 侧栏隐藏（无 facet 注入数据：静态直开 / 预览站 / DB 降级）时收回其占位的
   栅格列，结果区占满整行。 */
.qdoc-search-layout-global:not(:has(.qdoc-search-filter:not([hidden]))) {
    grid-template-columns: minmax(0, 1fr);
}

.qdoc-search-results {
    width: 100%;
    min-width: 0;
}

.qdoc-search-filter {
    min-width: 0;
    color: #1b1b1b;
}

.qdoc-search-filter-header {
    display: flex;
    /* 基线对齐：左「筛选」(18px) 与右「清除」(14px) 字号不同，居中会让 14px 文字
       在 28px 行高里视觉偏低。基线对齐让两段文字落在同一条基线上，与右侧同字号的
       「N 结果」共同保持一条水平阅读线（设计稿）。 */
    align-items: baseline;
    justify-content: space-between;
    /* 结果计数行（.qdoc-search-results-heading）自带 12px 上内边距，这里补等量的上边距，
       让「筛选 / 清除」与右侧「N 结果」的文字顶端落在同一条线上（设计稿对齐）。 */
    padding-top: 12px;
    margin-bottom: 18px;
}

/* 特异性对齐：`.quectel-content h2`（正文通用标题，位于本文件后方、特异性同为两段）
   会把这里压回 28px。加一层父级限定把本规则提到三段，确保设计稿的 18px 生效。 */
.qdoc-search-page .qdoc-search-filter-header h2 {
    margin: 0;
    color: #1b1b1b;
    /* 走查 2026-11 序号27-1：「筛选」与「清除」同为 16px 常规字重。 */
    font-size: 16px;
    font-weight: 400;
    line-height: 28px;
}

.qdoc-search-filter-clear {
    /* 父级用基线对齐（align-items: baseline），这里恢复自然行高即可；
       固定 28px 行高会把 16px 文字的可点区域撑成标题高度，反而让基线偏移。 */
    padding: 0;
    border: 0;
    background: transparent;
    color: #ed000c;
    font: inherit;
    /* 走查 2026-11 序号27-1：筛选/清除字号 16px，常规字重。 */
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
}

.qdoc-search-filter-clear:hover {
    color: #c9000a;
}

.qdoc-search-filter-clear:focus-visible,
.qdoc-search-filter-group summary:focus-visible {
    outline: 2px solid #ed000c;
    outline-offset: 3px;
}

.qdoc-search-filter-group {
    border-top: 1px solid #f0f3f3;
}

.qdoc-search-filter-group:last-child {
    border-bottom: 1px solid #f0f3f3;
}

.qdoc-search-filter-group summary {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #1b1b1b;
    /* 走查 2026-11 序号27-3：产品分类/文档分类标题统一 18px Medium（两者颜色一致，
       统一取 #1b1b1b；无数据组的弱化色由 .is-uncovered 另行按语义处理）。 */
    font-size: 18px;
    font-weight: 500;
    line-height: 20px;
    list-style: none;
    cursor: pointer;
}

.qdoc-search-filter-group summary::-webkit-details-marker {
    display: none;
}

/* 走查 2026-11 序号27-2：展开/收起图标尺寸一致（按「−」的大小），
   两者共用同一宽高与行高，仅字形不同。 */
.qdoc-search-filter-disclosure::before {
    content: "+";
    display: inline-block;
    width: 20px;
    color: #1b1b1b;
    font-size: 18px;
    line-height: 20px;
    text-align: center;
}

.qdoc-search-filter-group[open] .qdoc-search-filter-disclosure::before {
    content: "−";
}

.qdoc-search-filter-options {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0 0 16px;
    list-style: none;
}

.qdoc-search-filter-options label {
    display: flex;
    min-height: 32px;
    align-items: center;
    gap: 8px;
    /* 不要用负 margin 让行"出血"：那会让行超出侧栏内容盒 6px（review Round 1 F4 实测
       aside.scrollWidth − clientWidth = 6px，1440/640/375 三档一致；去掉即 0）。
       行本身是 flex 块级容器，宽度已铺满 <li>；水平 padding 一并去掉后选项文字位置
       与改动前**完全一致**（实测文字左沿相对分组标题的 18px 缩进来自 <ul> 的
       padding-left，不来自本规则），行高 32px / 移动端 44px 与复选框 16px 均不变。 */
    margin: 0;
    padding: 4px 0;
    color: #1a1a1a;
    /* 走查 2026-11 序号28：左右字体大小 16px；左侧文字颜色 #1a1a1a。 */
    font-size: 16px;
    line-height: 20px;
    cursor: pointer;
}

/* 命中数：每个可点选项都回答「会影响多少条」，零命中不再是沉默的失效。
   走查 2026-11 序号28：字号跟随选项行 16px，颜色（数据色）保持不变。 */
.qdoc-search-filter-count {
    margin-left: auto;
    color: #8a8f8f;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.qdoc-search-filter-label {
    min-width: 0;
    color: #1a1a1a;
}

/* 零命中仍可点（禁用会让键盘用户也点不到），只弱化表现。 */
.qdoc-search-filter-options label.is-empty {
    color: #8a8f8f;
}

.qdoc-search-filter-group.is-uncovered summary {
    color: #6b7070;
}

/* 整组在当前结果集上没有数据时的一行说明（不做整组隐藏，语料会随身份/发布状态变化）。 */
.qdoc-search-filter-note {
    margin: 0 0 16px;
    color: #8a8f8f;
    font-size: 12px;
    line-height: 18px;
}

/* 同组多选的口径说明（DEV-37259）：挂在分组标题下方，勾选 ≥ 2 项时出现。
   与上面的「无覆盖」说明同族，只在间距与 ⓘ 前缀上区分，不引入新字号/新颜色。 */
.qdoc-search-filter-note-multi {
    margin: 4px 0 12px;
    padding-left: 15px;
    color: #6b7070;
    font-size: 12px;
    line-height: 18px;
    position: relative;
}

.qdoc-search-filter-note-multi::before {
    content: "ⓘ";
    position: absolute;
    left: 0;
    color: #ed000c;
}

.qdoc-search-filter-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
    accent-color: #ed000c;
}

.qdoc-search-filter-options input[type="checkbox"]:focus-visible {
    outline: 2px solid #ed000c;
    outline-offset: 3px;
}

/* Sphinx 默认的标题与摘要行由设计稿的计数行取代。 */
#search-results > h2,
#search-results > p.search-summary {
    display: none;
}

/* Sphinx 自己的结果列表必须留在容器内（searchtools.js 持有其引用并持续追加），
   但条目已被移入分组列表，因此隐藏该列表本身。
   隐藏不能只依赖 `.qdoc-search-source-list`：该类由 200ms 防抖后的第一次
   分组渲染才补上（DEV-34576 / t290228），此前整个流式渲染窗口内裸列表以
   默认样式直接可见（录屏所见「先展示平铺结果、随后又重排」的二次刷新）。
   `#search-results > ul.search` 是该列表落进容器的唯一形态，从创建起即隐藏。 */
#search-results > ul.search {
    display: none;
}

/*
 * 结果区加载态（对齐官网搜索页 `.loadedStateBox.loading`）。
 *
 * 官网 https://www.quectel.com.cn/search-results 在结果落地前的实际形态是：
 *   结果区中央一个灰色转圈（spinner-border，1.8rem/边框 0.2em、#6c757d），
 *   下方 24px 处一行「正在加载···」（16px / #1a1a1a / 行高 1.6），
 *   整个块上下各 48px 内边距、水平居中。
 *
 * 本站此前把加载文案塞在搜索框右侧（`#search-progress` 气泡），与官网不一致，
 * 且英文页残留 Sphinx 的「Preparing search...」。这里统一为官网形态：
 * 文案节点保留（`searchtools.js` 按 id 写入），但由 CSS 隐藏；加载态改由此节点呈现。
 */
.qdoc-search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 48px 0;
    color: #1a1a1a;
    text-align: center;
}

.qdoc-search-loading[hidden] {
    display: none;
}

.qdoc-search-loading-spinner {
    display: block;
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e0;
    border-top-color: #6c757d;
    border-radius: 50%;
    animation: qdoc-search-loading-spin 0.75s linear infinite;
}

.qdoc-search-loading-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}

@keyframes qdoc-search-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .qdoc-search-loading-spinner {
        animation-duration: 1.5s;
    }
}

/* 零命中空结果态（勾选把它筛空）：说明 + 一键恢复，替代原来的纯空白。 */
.qdoc-search-empty {
    display: grid;
    gap: 12px;
    padding: 32px 24px;
    border: 1px solid #f0f3f3;
    border-radius: var(--radius-md, 8px);
    background: #fafbfb;
}

.qdoc-search-empty-title {
    margin: 0;
    color: #1b1b1b;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.qdoc-search-empty-hint {
    margin: 0;
    color: #6b7070;
    font-size: 14px;
    line-height: 22px;
}

.qdoc-search-empty-action {
    justify-self: start;
    padding: 6px 16px;
    border: 1px solid #ed000c;
    border-radius: var(--radius-md, 8px);
    background: transparent;
    color: #ed000c;
    font: inherit;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}

.qdoc-search-empty-action:hover {
    background: #ed000c;
    color: #fff;
}

.qdoc-search-empty-action:focus-visible {
    outline: 2px solid #ed000c;
    outline-offset: 3px;
}

.qdoc-search-results-heading {
    margin-bottom: 16px;
    padding: 12px;
    border-bottom: 0;
    color: #000000;
    font-family: var(--font-family);
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
}

#search-results {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.qdoc-search-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qdoc-search-page .qdoc-search-group-title {
    margin: 0;
    padding: 12px;
    color: #1b1b1b;
    font-family: var(--font-family);
    font-size: 24px;
    font-weight: 500;
    line-height: 36px;
}

#search-results ul.search {
    margin: 0;
    padding: 0;
    list-style: none;
}

#search-results ul.search li {
    padding: 12px;
    border-bottom: 1px solid #f0f3f3;
    border-radius: 4px;
    transition: background var(--transition-fast);
}

#search-results ul.search li:hover {
    background: #fafafa;
}

.qdoc-search-results .highlighted {
    background-color: rgba(237, 0, 12, 0.12);
    color: #ed000c;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 500;
}

#search-results ul.search li a {
    color: #1a1a1a;
    font-family: var(--font-family);
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    text-decoration: none;
}

#search-results ul.search li a:hover {
    color: #ed000c;
}

#search-results ul.search li p.context {
    display: -webkit-box;
    margin: 12px 0 0;
    overflow: hidden;
    color: #666666;
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 22px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.qdoc-search-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 60px;
}

.qdoc-search-pagination button {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 0 !important;
    /* 走查 2026-11 序号29：圆角 6px → 2px（设计稿）。 */
    border-radius: 2px;
    background: var(--color-gray-100);
    color: var(--color-gray-500);
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.qdoc-search-pagination button:hover,
.qdoc-search-pagination button.is-active {
    border: 0 !important;
    background: #ed000c;
    color: var(--color-white);
}

.qdoc-search-pagination button.is-ellipsis {
    border-color: transparent;
    background: transparent;
    color: var(--color-gray-500);
}

/* 走查 2026-11 序号29：左右箭头 ‹ › 在 14px 下显得偏小偏细，
   单独放大一档保持与数字按钮的视觉平衡。 */
.qdoc-search-pagination button.is-step {
    font-size: 20px;
    line-height: 1;
}

.qdoc-search-pagination button.is-ellipsis:hover {
    border: 0 !important;
    background: var(--color-gray-100);
}

@media (max-width: 640px) {
    .qdoc-search-page {
        width: min(100% - 28px, 1215px);
        padding-top: 16px;
    }

    .qdoc-search-band {
        padding: 24px 0;
    }

    .qdoc-search-form {
        height: 36px;
        min-height: 36px;
    }

    .qdoc-search-form input[type="text"] {
        padding: 0 12px;
        font-size: 13px;
    }

    .qdoc-search-layout-global {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .qdoc-search-filter-header {
        margin-bottom: 12px;
    }

    /* 移动端命中区 44px（与分页按钮的移动端基准一致）。 */
    .qdoc-search-filter-options label {
        min-height: 44px;
    }

    .qdoc-search-form button,
    .qdoc-search-form .quectel-search-submit-btn {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    #search-results {
        gap: 40px;
    }

    .qdoc-search-results-heading {
        margin-bottom: 24px;
    }

    .qdoc-search-group {
        gap: 24px;
    }

    .qdoc-search-page .qdoc-search-group-title {
        font-size: 18px;
        line-height: 26px;
    }

    #search-results ul.search li a {
        font-size: 16px;
        line-height: 24px;
    }

    #search-results ul.search li p.context {
        font-size: 13px;
        line-height: 20px;
    }

    .qdoc-search-pagination {
        gap: 8px;
        margin-top: 40px;
    }

    .qdoc-search-pagination button {
        min-width: 44px;
        height: 44px;
        font-size: 14px;
    }
}

/*
   侧边栏展开/收起时：内容区域应整体移动/压缩，而不是“挤压正文左侧间距”。
   方式：
   - 用 quectel-main 的 margin-left 来给侧边栏让位（整体位移）
   - 同时保证正文容器 quectel-content 始终有稳定的左侧间距（不随主容器缩放变化）
*/
.quectel-main {
    transition: margin-left var(--transition-normal), margin-right var(--transition-normal);
}

html.qdoc-theme-initializing .quectel-main,
html.qdoc-theme-initializing .quectel-content-header,
html.qdoc-theme-initializing .quectel-contents-resize-handle,
html.qdoc-theme-initializing .on-this-page,
html.qdoc-theme-initializing .on-this-page-nav,
html.qdoc-theme-initializing .on-this-page-title,
html.qdoc-theme-initializing .on-this-page-content {
    transition: none !important;
}

/* 正文容器：保持固定的左右内边距，避免导航切换时文字“贴边/被压缩” */
.quectel-content {
    flex: 1 0 auto;
    width: 100%;
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
    box-sizing: border-box;
}

.quectel-content-end-spacer {
    display: block;
    height: clamp(72px, 12vh, 140px);
    width: 100%;
    margin-top: var(--spacing-xl);
    background: var(--color-white);
    pointer-events: none;
}

/* 桌面端隐藏遮罩层 */
.quectel-contents-overlay {
    display: none;
}

/* 内容区域固定标题栏 */
.quectel-content-header {
    position: fixed;
    top: var(--header-height); /* 位于顶部导航下方 */
    left: var(--contents-width); /* 保持位于左侧导航右侧（整体位移） */
    /* Spans to the right edge, and this is deliberate: the page outline is an OVERLAY that starts
       BELOW this bar (its `top` is `var(--header-height) + var(--toc-title-height)`, exactly this
       bar's bottom edge), so reserving the outline's width here bought no space and cost one: the
       title and its buttons sat `--on-this-page-width` short of the right edge, and toggling the
       outline shifted them by 280px - the bar "moved" when the outline appeared
       ("当浮动目录出现时，顶部标题导航栏，不应该动，保持原先位置"). The bar's position no longer depends
       on the outline at all; the outline floats over the CONTENT instead, which is what its own top
       offset already assumed. */
    right: 0;
    height: var(--toc-title-height); /* 与左侧TOC标题高度一致 */
    background: var(--color-white);
    border-bottom: 2px solid var(--color-secondary);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-xl); /* 与正文区域的左右内边距一致 */
    padding-left: calc(var(--spacing-xl) + 32px + var(--spacing-md)); /* 为左侧按钮留出空间 */
    z-index: 100; /* 确保在内容之上，但低于主导航 */
    box-sizing: border-box;
    color: var(--color-gray-500);
    font-size: var(--font-size-h5);
    font-weight: var(--font-weight-medium);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: left var(--transition-normal), right var(--transition-normal); /* 添加过渡动画 */
    /* 作为按钮的定位上下文（按钮将绝对定位在标题栏右侧） */
    position: fixed;
}

/* 内容标题栏内的左侧Contents折叠按钮 */
.quectel-content-header .contents-toggle {
    position: absolute !important;
    top: 50% !important;
    left: var(--spacing-lg) !important;
    right: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    /* 移除边框、背景，只保留图标 */
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    line-height: 1;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--color-primary);
    box-shadow: none;
    cursor: pointer;
    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast),
        color var(--transition-fast);
}

.quectel-content-header .contents-toggle img,
.quectel-content-header .contents-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
    /* 同上：不给图标加 transform 过渡，否则折叠↔展开时箭头会带 0.15s 动效。 */
}

.quectel-content-header .contents-toggle:hover {
    opacity: 0.7;
    color: var(--color-primary-dark);
}

.quectel-content-header .contents-toggle:active {
    transform: translateY(calc(-50% + 1px)) !important;
    opacity: 0.5;
}

.quectel-content-header .contents-toggle:focus-visible {
    outline: 2px solid rgba(0, 102, 204, 0.4);
    outline-offset: 2px;
}

/* 内容标题栏内的 Share Feedback 按钮（位于右侧折叠按钮左侧） */
.quectel-content-header .quectel-share-feedback {
    position: absolute !important;
    top: 50% !important;
    right: calc(var(--spacing-lg) + 24px + var(--spacing-md)) !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    line-height: 1;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast);
}

.quectel-content-header .quectel-share-feedback img,
.quectel-content-header .quectel-share-feedback svg {
    width: 24px;
    height: 24px;
    display: block;
}

.quectel-content-header .quectel-share-feedback:hover {
    opacity: 0.7;
}

.quectel-content-header .quectel-share-feedback:active {
    transform: translateY(calc(-50% + 1px)) !important;
    opacity: 0.5;
}

/* 内容标题栏内的搜索按钮（位于Share Feedback按钮左侧） */
.quectel-content-header .quectel-content-search {
    position: absolute !important;
    top: 50% !important;
    right: calc(var(--spacing-lg) + 24px + var(--spacing-md) + 24px + var(--spacing-md)) !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    line-height: 1;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    color: var(--color-primary);
    transition:
        color var(--transition-fast),
        opacity var(--transition-fast),
        transform var(--transition-fast);
}

.quectel-content-header .quectel-content-search svg {
    display: block;
    width: 24px;
    height: 24px;
}

.quectel-content-header .quectel-content-search:hover {
    color: var(--color-primary-dark);
    opacity: 0.7;
}

.quectel-content-header .quectel-content-search:active {
    transform: translateY(calc(-50% + 1px)) !important;
    opacity: 0.5;
}

/* A floating outline needs no collapse button.
 *
 * The ⊟ button is what a DOCKED panel needs: it takes a permanent 280px of the page, so the reader is
 * given a way to give that space back. The outline no longer does that - it is an overlay that appears
 * while the page scrolls and leaves again when it stops (see the panel rule further down) - so there is
 * nothing to give back and nothing for the button to do. The official site shell settled this the same
 * way: `official-site-shell-bridge.css` hides the button outright
 * (`.quectel-layout .on-this-page-toggle { display: none !important }`), which is also why its layout
 * never needed the collapse hooks this file used to carry.
 *
 * Hidden on standalone pages only, so the shell's own rule stays the single source of that decision
 * inside the shell. `syncOnThisPageCollapsedForViewport()` still clears a server-rendered `collapsed`
 * on load, so a page that arrives collapsed still opens. */
body:not([data-official-site-shell-root]) .quectel-content-header .on-this-page-toggle {
    display: none !important;
}

/* 内容标题栏内的右侧按钮区域（单按钮） */
.quectel-content-header .quectel-content-download {
    position: absolute !important;
    top: 50% !important;
    right: var(--spacing-lg) !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
}

/* ========================================
   批量下载控件（设计稿 961-5397）
   ========================================
   标题栏原来的 24×24 图标按钮换成一个「批量下载」主按钮 + 下拉菜单。控件本身仍占
   `.quectel-content-download` 那个槽位（右 edge 由上面那条规则钉住），所以标题栏、搜索、
   分享、产品系列选择器的位置都不动，只是这个槽位宽了。

   蒙层/弹窗（设计稿 961-5456）在文件末尾，因为它浮在全页之上，不属于标题栏。 */

/* The control is a normal flex item, not an absolutely positioned 24px icon slot.
 *
 * It used to inherit `position: absolute; right: var(--spacing-lg)` from the single-icon
 * button it replaced. That is wrong for a text button: measured on the shell page it detached
 * from the header's flex row and painted on top of the 产品系列 selector, and the bar's own
 * `padding` no longer bounded it. Its position now comes from the header's `gap` like every
 * other control, so the right edge follows the bar's padding at any width.
 *
 * `relative` rather than `static`: the menu is `position: absolute; top: 100%`, and this element
 * is its containing block. Without a positioned ancestor the menu would position against the
 * sticky header instead and hang 40px right of the button. */
.quectel-content-header .quectel-download-control {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
    flex: 0 0 auto;
    align-self: center;
    /* 标题栏是 `display: flex; gap: 16px`，间距已由 gap 提供。 */
    margin: 0 !important;
    z-index: 20;
}

/* 主按钮：红底白字 + 白色下载图标 */
.quectel-content-header .quectel-download-trigger {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
    /* The trigger also carries `.quectel-content-download`, whose base rule (and the shell
       bridge's icon-slot rules) pin it to 24×24 with `flex: 0 0 24px`. Left in place, the red
       button collapses to a 32px sliver and its label spills out beside it - the reported
       "下载按钮显示错乱". The label decides the width now. */
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 42px;
    padding: 0 16px;
    box-sizing: border-box;
    border: none;
    border-radius: 4px;
    background: #ed000c;
    color: #ffffff;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--transition-fast), opacity var(--transition-fast);
}

.quectel-content-header .quectel-download-trigger svg,
.quectel-content-header .quectel-download-trigger img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: block;
    /* 图标在模板里是描边 `<svg>`，红底上要变白；`currentColor` 让它跟着按钮文字走。 */
    stroke: currentColor;
    color: #ffffff;
}

.quectel-content-header .quectel-download-trigger:hover {
    background: #c9000b;
    opacity: 1;
}

.quectel-content-header .quectel-download-trigger:active {
    transform: none;
    opacity: 0.9;
}

.quectel-content-header .quectel-download-trigger:focus-visible {
    outline: 2px solid rgba(237, 0, 12, 0.4);
    outline-offset: 2px;
}

/* 展开态：按钮与菜单连成一体，所以按钮圆角只留上面两个。 */
.quectel-content-header .quectel-download-control.is-open .quectel-download-trigger {
    border-radius: 4px 4px 0 0;
}

/* 下拉菜单（设计稿 961-5397：118×94、白底、直角、柔和投影，两项各 47 高） */
.quectel-download-menu {
    position: absolute;
    top: 100%;
    right: 0;
    /* 设计稿按中文「下载此文档」量出 118px；英文标签更长，所以锁定最小宽度而不是
       固定宽度，否则 nowrap 的文案会溢出菜单。 */
    min-width: 118px;
    width: auto;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    list-style: none;
    background: #ffffff;
    /* 设计稿里菜单是直角浮层，没有圆角。 */
    border-radius: 0;
    box-shadow: 0 2px 16px rgba(20, 17, 31, 0.08);
    overflow: hidden;
    z-index: 30;
}

/* `hidden` 是服务端渲染时就带上的：脚本没起来（`file://`、分包加载失败）也不会出现
   一个没人打开的菜单。这里必须 `!important`，否则上面的 `display` 会把它顶回来。 */
.quectel-download-menu[hidden] {
    display: none !important;
}

/* 菜单项：设计稿 118×47、左右内边距 24、文字水平居中、底部 1px #F0F3F3 分隔线。 */
.quectel-download-menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 47px;
    padding: 0 24px;
    box-sizing: border-box;
    border: none;
    border-bottom: 1px solid #f0f3f3;
    border-radius: 0;
    background: #ffffff;
    color: #333333;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

/* 当前所在动作用品牌红标出来（设计稿里「批量下载」就是这个状态）。 */
.quectel-download-menu-item.is-active {
    color: #ed000c;
}

.quectel-download-menu-item:hover,
.quectel-download-menu-item:focus-visible {
    background: #fafafa;
    color: #ed000c;
    outline: none;
}

/* 移动端：标题栏是网格，第二行留给产品系列选择器、搜索、分享、下载。
 *
 * The control itself has no slot in those grids - they are spelled for
 * `.quectel-content-download`, which is now the trigger INSIDE the control, so the
 * `> .quectel-content-download` selectors no longer reach it and the control would be
 * auto-placed into row 2 column 1, on top of the 产品系列 selector. Placing it in the last
 * column, right-aligned, keeps the toolbar's order and lets the label size the button. */
@media (max-width: 768px) {
    .quectel-content-header .quectel-download-control {
        /* The grids only reserve `repeat(3, 24px)` for the icon controls, which is narrower than
           a text button; an element wider than its own track overflows it to the left and would
           eventually reach the 产品系列 selector. Start at the flexible column instead and
           right-align, so the button always has room and never grows toward the selector. */
        grid-column: 2 / -1;
        grid-row: 2;
        justify-self: end;
        align-self: center;
        margin: 0 !important;
    }

    .quectel-content-header .quectel-download-trigger {
        height: 32px;
        padding: 0 12px;
        font-size: 14px;
        line-height: 22px;
    }

    .quectel-content-header .quectel-download-trigger svg,
    .quectel-content-header .quectel-download-trigger img {
        width: 14px;
        height: 14px;
    }

    /* 菜单按右边缘对齐，窄屏下不会向左顶出视口。 */
    .quectel-download-menu {
        right: 0;
        left: auto;
    }
}

/* The header's position no longer depends on the outline (see the note on `.quectel-content-header`
   above), so the three "collapse the outline, widen the header" hooks that used to live here are
   gone - each could only rewrite `right: 0` to `right: 0`. What still has to respond to the outline's
   collapse is the CONTENT, which really does reserve room for it:
   `body.on-this-page-collapsed .quectel-main { margin-right: 0 }` further down. */

.quectel-content-header-title {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    line-height: 1.4;
}

.quectel-content {
    max-width: var(--content-column-max, 1215px); /* 90% of top navigation content width (1352px * 0.9 = 1216.8px) */
    margin: 0 auto;
}

/* Override basic theme document styles */
.document {
    max-width: none;
    width: 100%;
}

.documentwrapper {
    float: none;
    width: 100%;
}

.bodywrapper {
    margin: 0;
}

.body {
    padding: 0;
}

/* Hide basic theme sidebar elements */
.sphinxsidebar,
.related {
    display: none;
}

/* ========================================
   Typography - 排版样式
   ======================================== */

/* THE `word-html-document` MARK, and where it lives now.
 *
 * Everything below is scoped to `.quectel-content.word-html-document`, i.e. the content
 * container carries the mark rather than holding a `<div class="word-html-document">`. The page
 * used to be the whole cleaned body inside one `{raw} html` block, so the conversion had a
 * wrapper div to hang these rules on; a page delivered as Markdown has no such div, and the
 * mark moved to the container so the rules keep working unchanged.
 *
 * The mark is load-bearing: it is what keeps these rules off the site's hand-written content.
 * Measured: broadening them to `.quectel-content` would reach 1476 hand-written tables and 283
 * hand-written nested lists. `converter_front_matter()` in `word2html/markdown_export.py` is
 * what sets it, and the theme template turns that into the class.
 */

/* Long unbreakable tokens must be allowed to wrap.
 *
 * A Word conversion can emit an APDU or base64 payload as ordinary paragraph text -
 * one measured document carried a single 1838-character token inside a <p>, in a
 * column that is 1215px wide. With no break opportunity that paragraph cannot shrink
 * below the token, so it stretched the content to 14779px: twelve times its column.
 *
 * That is what made the review preview show a tiny page. The console scales the A4
 * column by `target / documentElement.scrollWidth`, so an inflated page shrank
 * everything - images included - to about 9%.
 *
 * `overflow-wrap: break-word` is the right property here, and the choice matters:
 *
 *   - `break-word` breaks a word only when it cannot fit its line, and does NOT
 *     change the element's intrinsic width. Measured: content 14779px -> 1215px,
 *     the column width unchanged, and a long ordinary paragraph kept its height.
 *   - `anywhere` also fixes the overflow but counts its breaks in intrinsic sizing,
 *     so it collapses the column: measured 1215px -> 767px, which re-wraps and
 *     lengthens ordinary prose on every document. Do not use it here.
 *   - `word-break: break-word` behaves like `anywhere` for sizing, so it is avoided
 *     for the same reason.
 *
 * `word-wrap` is the same property under its legacy name, kept for older engines.
 * `pre`/`code` are deliberately excluded: they scroll horizontally by design.
 */
/* A converted page prints the document's own ink. The cleaner reads the colour out of the
   export's own stylesheet and carries it as page front matter (``word-text-colour``), which the
   template puts on this container; without it the page printed the theme's ``#333333`` while
   Word printed the document's ``#404040`` (人工评论 679 "HTML文档中字体颜色不对 需通篇调整").
   The fallback is the theme's own body grey, so a page without the key is unchanged. */
.quectel-content.word-html-document {
    color: var(--word-text-colour, var(--color-gray-500));
}

.quectel-content.word-html-document p,
.quectel-content.word-html-document li,
.quectel-content.word-html-document dd,
.quectel-content.word-html-document dt,
.quectel-content.word-html-document blockquote,
.quectel-content.word-html-document figcaption,
.quectel-content.word-html-document td,
.quectel-content.word-html-document th {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* A converted page's code block sits where Word puts it.
 *
 * Word draws a command, a prototype or a response as a shaded band that hugs the label above it:
 * measured on a function reference's "函数原型" line, the label's ink ends 10.3 pt above the band,
 * whose own top padding is 9.7 pt, so the next ink is 20 pt below the label. The theme's block is
 * an airy card instead - two wrappers with `--spacing-sm` each plus the `<pre>`'s own 16px
 * padding - which printed 38 pt and read as a blank line that is too tall ("函数原型，和参数之间，
 * 空行高度较高"; "定义如下和结构体成员之间。空行高度较高"). The review compared it with Word's page,
 * so the converted page takes Word's own rhythm.
 */
.quectel-content.word-html-document .highlight,
.quectel-content.word-html-document div[class*="highlight-"] {
    margin: 0;
}

/* A converted page's code band holds the code line and nothing else, so it carries no vertical
 * inset: the `<pre>` already measures exactly its own line count.
 *
 * A `margin-bottom: -1.4em` used to stand in the rule below, to take back the empty line box a
 * fence's trailing newline was believed to render. Measured 2026-09-28: it renders no such box - a
 * 28-line block's `<pre>` measures 714 px, i.e. 28 line boxes and nothing for the closing newline -
 * and none of the corpus's 1120 fences across 415 pages has a blank line before its closing fence,
 * so there was nothing left for the rule to take back. Instead it removed ~21 px from every
 * converted band: a one-line block kept 5 px of its 25.5 px line, `.code-block`'s `overflow: hidden`
 * clipped what the block was supposed to show, and because `overflow-x: auto` makes the wrapper a
 * scroll container on BOTH axes, every one of the reference page's 49 code blocks carried a 15 px
 * vertical scrollbar.
 */
.quectel-content.word-html-document .highlight pre,
.quectel-content.word-html-document div[class*="highlight-"] pre {
    padding: 0 24px 0 7px;
}

/* A converted page's code band is as wide as Word's own, and carries Word's own fill.
 *
 * Word lays a code band across its whole text column - measured on the reference document, the
 * band spans 488.9 pt of its 487.5 pt column and the band's first character sits 5.4 pt inside it
 * - and it breaks the code lines at that width. The theme's block insets itself twice, a wrapper
 * padding plus the `<pre>`'s 80 px reservation for the copy button, which left a converted page's
 * code line 495 px of a 613 px column: Word's own 66-character enum entry, one line on Word's
 * page, wrapped onto a second (人工评论 4499 "枚举定义应在一行内展示，不要换行"; 4500 "函数原型尽可能
 * 一行展示，必要时仅支持自然换行"). The reservation goes back to a copy-button width and the
 * wrapper's padding to zero, so the code text starts where Word's does and reaches the column edge.
 *
 * The same band is what the review reads as missing shading: Word fills it with the document's own
 * grey - every one of the reference document's 21 code bands states #D9D9D9, which is
 * `markdown_export.CODE_BLOCK_FILLS`'s primary value - while the theme paints its near-white
 * #f6f8fa, so the delivered page lost the shading the source prints (人工评论 4496 "函数原型的灰色
 * 底纹样式丢失"). The fence carries no fill of its own, so a converted page takes the converter's
 * code-band fill; the HTML artifact keeps the exact per-band value inline on `table.word-code`.
 */
.quectel-content.word-html-document .code-block-content {
    padding: 0;
    background: #d9d9d9 !important;
    /* The band is a column that centers its code line. `min-height` below makes a one-line band
       40 px, while the `<pre>` measures only its own line (26 px at `line-height: 1.7`), so without
       this the code sat on the band's top edge with all the slack underneath it (owner: “代码块应该
       整体垂直居中”). Flex rather than padding because 36 of the reference page's 49 blocks are
       taller than the floor and must keep their own height untouched - flex does nothing to them.
     *
     * `min-height: 40px` is the copy button's own requirement: it is absolutely positioned 8 px
       below the band's top edge and measures 31 px, so it needs 40 px of band - at 27.5 px
       `.code-block`'s `overflow: hidden` cut it off and the command could not be copied at all
       (measured 2026-09-28, identical on all 23 short blocks of the reference page). A band taller
       than the floor keeps its own height, and the site's own blocks pad this wrapper by 16 px, so
       their shortest band is already 58 px and is untouched. */
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 40px;
}

.quectel-content.word-html-document .code-block-content .highlight,
.quectel-content.word-html-document .code-block-content div[class*="highlight-"],
.quectel-content.word-html-document .code-block-content pre {
    /* `!important` to beat the theme's own `#f6f8fa !important` on `.highlight pre`/`pre`. */
    background: #d9d9d9 !important;
}

/* A converted figure that carries a Word callout is a block, not a paragraph.
 *
 * The cleaner renames such a host (``word_html_cleaner.FIGURE_BLOCK_CLASS``): an open ``<p>`` is
 * closed by the HTML parser at the callout's table, which hoisted the callout out of the figure and
 * printed its table at the top of the content instead of over the picture (人工评论 4493 "生成侧此处
 * 多了一个表格和其内内容"). A block is not a paragraph for the stylesheet, so it takes the
 * paragraph's own bottom spacing here.
 */
.quectel-content.word-html-document .word-figure-block {
    margin-bottom: var(--spacing-sm);
}

/* A converted page's code line wraps instead of hiding its tail.
 *
 * Word prints a prototype wider than its column over two lines, breaking at a space
 * ("typedef void (*ql_nw_network_scan_async_cb)(int async_index, ql_nw_scan_result_list_info_t" /
 * "*p_info);"). The theme's block scrolls horizontally by design, which is fine on screen but a
 * print or a screenshot of the delivered page simply cut the line off - the reviewer read the
 * break as a defect ("asunc_cb后，此处截断换行") and the rest of the prototype was not on the page.
 * `pre-wrap` keeps Word's own break opportunity (spaces) and, unlike the scroll box, never hides
 * content. `overflow-wrap: break-word` is the last resort for a single token longer than the
 * column; `word-break: normal` keeps it from cutting an identifier that would fit on a line.
 */
.quectel-content.word-html-document .highlight pre,
.quectel-content.word-html-document div[class*="highlight-"] pre {
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
}

/* An AT session's response line breaks at the column's edge, the way Word breaks it.
 *
 * 人工评论 9064 (DEV-32275 修复轮 2, Quectel_BG77xA-GL&BG95xA-GL_QuecCell_Application_Note_V1.0, 原
 * PDF 第 13 页): `+QENG: "servingcell","NOCONN","GSM",460,…` printed the indicator alone on the first
 * line and pushed the whole parameter run to the second, leaving a column-wide blank gap after the
 * colon. The parameter run is one token no break opportunity follows, so with only Word's spaces to
 * break at, the browser moves the entire run to the next line and `overflow-wrap: break-word` then
 * cuts it at the edge - the gap after the colon. Word fills the line after the colon and breaks
 * where the column ends, which is what `word-break: break-all` restores: it makes every character a
 * break opportunity, so the line fills and breaks at the column instead.
 *
 * Scoped to the AT session's own surface - the response line the exporter marks
 * (`markdown_export.AT_RESPONSE_LINE_CLASS`) and an `atc` fence, the same content's other carrier -
 * so the C prototypes the rule above was written for keep breaking at Word's spaces
 * (`word-break: normal`), which is the owner's decision on 人工评论 4684 / DEV-15136.
 */
.quectel-content.word-html-document p.word-at-response,
.quectel-content.word-html-document div[class*="highlight-atc"] pre {
    word-break: break-all;
}

/* A code band's comment wraps under itself, the way Word continues it at its tab stop.
 *
 * 人工评论 9149 (DEV-32629 修复轮 2, Quectel_BG95&BG77&BG600L_Series_GNSS_Application_Note_V1.5,
 * 原 PDF 第 63 页 3.2 例): Word sets a commented command line's comment at a tab stop and, when the
 * comment is wider than the rest of the band, continues it AT THAT STOP - `AT+QGPSLOC=0` stays on the
 * left, the comment fills its column, and its tail (`ddmm.mmmmN/S,dddmm.mmmmE/W`) starts under the
 * comment (`x≈202pt`) rather than under the command (`x≈56pt`). The delivered line was one text flow,
 * so every wrapped line restarted at the block's left edge and the tail read as a note of its own
 * (`report.` alone on a line). The exporter marks the two runs (`CODE_COMMAND_CLASS` /
 * `CODE_COMMENT_CLASS`): the line lays them out as one row, the comment takes the rest of the column
 * and shrinks into it (`min-width: 0`), so a long comment wraps inside the band instead of pushing
 * past the page edge.
 *
 * The column is NOT Word's fixed tab stop: the owner's decision (2026-10-01, 「代码块就不用分列了」)
 * is that a delivered code block does not keep the source's columns, so the comment starts behind a
 * plain gap (the fence's own two-space gap, `markdown_export.COMMENT_COLUMN_GAP`) and only its wrapped
 * lines align with it. `word-break: normal` is what keeps the comment from inheriting the response
 * line's break-all above - a comment is words, and cutting one mid-word is not Word's break.
 */
.quectel-content.word-html-document p.word-code-line:has(> .word-code-comment) {
    display: flex;
    align-items: baseline;
    column-gap: 0.5em;
}

.quectel-content.word-html-document p.word-code-line > .word-code-command {
    /* The command keeps the width Word gave it: the comment column is what yields to the band, so a
     * short command is never broken in two while its comment has room to wrap (`AT+QGPSLOC=0` split
     * into `AT+QGP` / `SLOC=0` at a narrow preview width is not a shape Word prints). `max-width`
     * still clamps a command wider than the whole band, and `overflow-wrap` then breaks it at the
     * edge - the same last resort the fence's `pre-wrap`/`break-word` gives. */
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
}

.quectel-content.word-html-document p.word-code-line > .word-code-comment {
    flex: 1 1 auto;
    min-width: 0;
    word-break: normal;
    overflow-wrap: break-word;
}

/* A converted page is dense: a Word paragraph carries 7.8pt below it and nothing above, so a
   heading sat almost on the text before it and the page read as one column of blocks (人工
   评论 4921: "建议各级标题能设置段前间距，使其与标题前的正文之间间距稍微大一些"). The
   converted page therefore gets a wider space above every heading level; the site's own pages
   keep the spacing they have, because this is scoped to the `word-html-document` mark. The
   space below a heading is deliberately untouched - that is what the review accepted. */
.quectel-content.word-html-document h1,
.quectel-content.word-html-document h2,
.quectel-content.word-html-document h3,
.quectel-content.word-html-document h4,
.quectel-content.word-html-document h5,
.quectel-content.word-html-document h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    margin-top: 1.6em;
}

/* A Word table carries the source's own column widths, and a document with a wide
 * parameter table could still push the content column sideways and make the reader
 * scroll. The wrapping above is already allowed, so the table only needs permission to
 * shrink into its column. The reviewer's rule is "可以自动换行，并且控制单列的最大
 * 宽度，避免横向滚动条"; the ceiling below is that single-column cap, and the
 * single-cell command/response blocks keep their fill either way. */
.quectel-content.word-html-document table {
    max-width: 100%;
}

.quectel-content.word-html-document td,
.quectel-content.word-html-document th {
    max-width: 420px;
}

/* The same constraints for a page delivered as Markdown: there is no wrapper div to scope
   them to, because the body is real Markdown now and only the structures Markdown cannot
   carry (Word tables with a merged cell or a table inside them - DEC-20; the fill alone no
   longer counts) stay embedded HTML.
   Those tables carry `word-table` (see markdown_export.WORD_TABLE_CLASS), which keeps the
   rule off the 1476 hand-written tables on the site - broadening the two rules above to
   `.quectel-content table` would clamp and reflow every one of them.
   Measured on Quectel_4G_Antenna_YE0012AA_Datasheet_V4.5: without this, a Word table
   declared `width="658"` rendered 1053px inside a 1047px column.

   The width is the site's, and since 2026-10-01 the converter no longer stands in its way: Word's
   own size used to travel on the table (`style="width:657px"`, plus a `width` attribute) with every
   column's width on its cells, and the delivered page printed that page geometry. The owner's call
   reversed it (「这个 table 不用预留 width 这些尺寸的样式，因为表格需要按照 sphinx 的样式做自适应宽度」,
   「包括里面的列宽」, 「宽度和高度都不需要保留，其他的可以保留样式」), so the delivered Markdown drops
   `width` / `height` from a converted table and its cells and keeps everything else - the fills, the
   rules, `vertical-align` - which still paints Word's complex table (DEC-17, revised). The site's
   `.quectel-content table { width: 100% }` therefore fills the content column again, which is what
   the earlier review asked for ("表格没有自适应页面正文宽度，通过调整各列的宽度来自适应表格整体水平宽度
   和正文页面宽度一致", measured 62% of a 1053 px column before).

   The blanket fill (`width: 100% !important`, ab959b18 2026-09-27) stays withdrawn: it is redundant
   now that nothing declares a width, and a rule here would only fight a table that does state one.

   `table-layout: auto` is what lets the columns take their share from their content rather than
   from Word's declared per-column widths, and `max-width: 100%` is the other half: a grid whose
   content exceeds the column stays inside it instead of pushing the page sideways. */
.quectel-content table.word-table {
    max-width: 100%;
}

/* A table's header states its column names, so a name that wraps makes the header two lines tall
   and the column look broken: on the delivered page of Quectel_…_LwM2M_… the first column of
   「表 1：AT 命令类型」 printed "AT 命令类" / "型" while the two columns beside it stayed on one
   line (owner, 2026-10-01: 「尽量保证表头一行，不要换行」). A header line is short, so keeping it
   on one line costs the body columns little and nothing overflows - measured on that page, 68
   tables, 0 of them overflowing with the rule in place, and 0 headers wrapping (3 wrapped before).

   The exception the owner named - 「除非列太多情况下可以宽度小些」 - is the table that has so many
   columns that one line per header would widen it past the content column. Counted in CSS by the
   table having a 6th column, which is what the rule below tests for: from there the headers wrap
   again and the browser may narrow them. `:has()` is already used by the theme's body rules. */
.quectel-content table th {
    white-space: nowrap;
}

/* The same declaration for a converted table: its own rule above (``table.word-table th``, one
   class more specific) sets `white-space: normal` so Word's widths could be redistributed, so the
   header rule has to name the mark as well to reach those tables. */
.quectel-content.word-html-document table th,
.quectel-content table.word-table th {
    white-space: nowrap;
}

.quectel-content table:has(tr > :nth-child(6)) th,
.quectel-content.word-html-document table:has(tr > :nth-child(6)) th {
    white-space: normal;
}

/* A protocol structure table is the six-column exception whose fixed fields still fit on one
   line. Keep its headers and short data columns unbroken while leaving the Payload prose free to
   wrap; the table wrapper owns horizontal scrolling when the viewport is narrower than the grid
   (MD-114). */
.quectel-content.word-html-document table.word-protocol-structure-table:has(tr > :nth-child(6)) th,
.quectel-content.word-html-document table.word-protocol-structure-table:has(tr > :nth-child(6)) td:nth-child(-n+4),
.quectel-content.word-html-document table.word-protocol-structure-table:has(tr > :nth-child(6)) td:nth-child(6) {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

/* A converted table must be free to lay its columns out from its content, and a cell must never
   hide the text that does not fit: the review read the version table as clipped - its
   description column cut the AT command list and the row overlapped the row below it
   (人工评论 4914: "对齐/缩进格式异常"). Word's own widths are the starting point, not a floor,
   so the browser may redistribute them; `white-space: normal` undoes a `nowrap` inherited from a
   converted cell and `overflow: visible` makes sure nothing is clipped instead of wrapped. */
.quectel-content table.word-table {
    table-layout: auto;
}

.quectel-content table.word-table td,
.quectel-content table.word-table th {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* A converted command table states its own two-column grid (``width:195.0pt`` beside
   ``width:296.05pt``) and the browser is still free to redistribute those columns from their
   content - which it does for the one long token a command column holds. Measured on
   Quectel_RG5x&RG6x&RM5x系列_GNSS_应用指导_V2.1 (人工评论 3254: 「AT命令表格灰色底纹列宽过宽，需要调节。
   可否针对AT命令表格两列宽度设置一个固定值？保持所有文档中都是一致的」): the shaded command column of
   2.3.1.4 printed 286.6 px = 43.6% of its 657 px table at a 1376 px viewport and 48.3% at 596 px,
   while the source states 195.0 pt of its own 491.05 pt grid = 39.7% and Word's own PDF prints the
   same column 39.4%. The cause is the cell's own command
   (`AT+QGPSCFG="glonassnmeatype"[,<GLONASS_or_GNSS_NMEA_type>]`): with no break opportunity inside
   it, its min-content width becomes the column's floor and `table-layout: auto` honors that floor
   over the width the source declares. Word breaks that token across two lines itself, so the
   converted page may too - and only the FIRST column may, because the response column carries the
   prose (its ordinary word wrapping is left alone, so no word is cut).

   Measured with the rule in place (both viewports, the delivered page): the same columns print
   39.7% at 1376 px and 39.9% at 596 px, every other command table lands on its own source ratio
   (35.6% for the `gpsnmeatype` table, which states 173.85 pt of 491.05 pt = 35.4%), the widest
   first column of the document moved 43.6% -> 41.2%, and 24 of the page's 32 data tables are
   untouched. This is also why no per-document width is written here: the ratio stays the source's
   own, so it is the same rule for every document.

   The break opportunity is `overflow-wrap: anywhere`, NOT `word-break: break-all`: break-all also
   cuts a word that FITS its column, so a first column narrower than its own text printed the
   label as fragments (measured on Quectel_Antenna_YE0003AA_Datasheet_V4.0, DEV-18753 finding
   1629「断行把英文单词切断了」: at a 1376 px viewport the spec table's first column printed 73 px
   of declared 55.8 pt = 74 px, and `Max. Return Loss (dB)` reached the page as
   `Ma / x. / Re / tur / n L / os / s / (d / B` with `VSWR` as `V / S / W / R` - 44 words cut in
   that column set, where Word's own PDF page 4 prints `Max.` / `Return` / `Loss (dB)` whole on
   separate lines). `overflow-wrap: anywhere` keeps exactly the min-content floor break-all
   provided - measured on a two-column 195.0pt-of-491.05pt grid shaped like the one above, the
   first column prints 262 px = 39.9% of its 657 px table with `anywhere`, the same 39.9% as
   `break-all` (plain `normal` / `break-word` print 267 px = 40.7%) - while breaking a word only
   when it does not fit: after the change the same page reports 0 cut words and no table overflows
   (44 before). */
.quectel-content table.word-table td:first-child,
.quectel-content table.word-table th:first-child {
    word-break: normal;
    overflow-wrap: anywhere;
}

/* A converted table's column-label row keeps every label on one line (MD-78).
 *
 * The row that names the columns holds one short label per cell ("Pin Name" / "Pin No." / "I/O" /
 * "Description" / "DC Characteristics" / "Comment"), and the exporter marks such a row
 * ``word-table-head`` because it is often not the table's first row (a full-width band row is) -
 * ``_promote_header_row`` only ever promotes the first row, so the embedded carrier had no header
 * cell at all and the labels were laid out from their content like any other cell. Measured on
 * DEV-32456 finding 9080 (人工评论 9080, 原 PDF 第 24 页: 「调整Html中的表格列宽，使得Pin No.、
 * Characteristics等单词…在一行显示」): the Pin No. column of the DC-characteristics pin table printed
 * 38 px for a 45 px label, so "Pin No." broke to "Pin" / "No."; the same six labels delivered by the
 * pipe carrier (a real ``th`` header, ``table th {white-space: nowrap}`` above) print whole in 83 px.
 * `overflow-wrap` on a converted cell is free to cut the WORD at an even narrower column (the first
 * column states ``anywhere`` just above), which is why the rule states the wrap properties too.
 *
 * Scoped to the marked rows and to a converted table's own ``th`` - never to every ``td``: a body
 * cell's prose still wraps, and the source's own wide labels are untouched because the exporter
 * only marks a row whose every cell is a short label stated as one (bold, or the site's header fill).
 * Measured on the same built page, before -> after: every pin table's label row one line per label
 * (36 label rows, 0 wrapped), the Pin No. column 38-56 px -> 59-83 px, and each table's column
 * x-positions unchanged so every band of one grid still lines up. The three tables that were wider
 * than the content column before are the same three after (they scroll inside
 * ``div.table-wrapper.is-scrollable``), and no label overflows its cell. */
.quectel-content.word-html-document table.word-table th,
.quectel-content.word-html-document table.word-table tr.word-table-head > th,
.quectel-content.word-html-document table.word-table tr.word-table-head > td {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

/* …and the theme's own escape stays: a table with many columns may narrow its headers so the grid
   still fits the content column (above, at ``table:has(tr > :nth-child(6)) th``). It has to be
   stated again here because this block is later in the file. The threshold moves 6 -> 8 on the
   measurement the owner's newer instruction rests on: the 7-column pin tables of this document
   (Table 7 "Pin Definition of VBAT and GND Pins", Table 8 …) print all seven labels on one line
   inside their 447 px column once the labels may not wrap, so 7 columns is not "too many to fit" -
   and the escape never CUTS a word either, it only lets the label wrap at its own spaces. */
.quectel-content.word-html-document table.word-table:has(tr > :nth-child(8)) th {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}

/* A marked label row is one line even inside a table that took the escape above: the row was marked
   because its labels ARE column names, and a name that wraps stops naming its column. */
.quectel-content.word-html-document table.word-table tr.word-table-head > th,
.quectel-content.word-html-document table.word-table tr.word-table-head > td {
    white-space: nowrap;
}


/* The last column is the one that carries the prose in these tables (a syntax column holds one
   short command, a description carries the sentence), and it was the column that lost: the review
   asked for the second column to give room to the third so that a row as short as "Read Command"
   fits on one line (人工评论 4917: "第二列列宽可减少，第三列列宽可增加，至少让 Read Command 那一行
   能在一行展示").

   The minimum above never moved this document's column: a percentage ``min-width`` on a table cell
   is left unapplied there (measured on the delivered page, the cell computed ``min-width: 55%``
   and still took 38% of its table). Width is what a browser honors, so a table the converter marks
   as prose-last states a *preferred* width instead, and the source's own grid decides the rest.

   Scope: only the tables the converter marks as prose-last (``markdown_export.PROSE_LAST_CLASS``),
   where the last column holds at least twice the text of every column before it and those columns
   hold short data values. On a converted table the browser lays the columns out from the content
   and then takes the width the content column gives it, so the source's grid decides the ratios:
   DEV-14848's Revision History table grew every column by the same 44%, and the three short data
   columns took the room the Note column needed (人工评论 4845 "列宽需要根据文本内容多少做自适应，
   比如此表第一二三列列宽可以窄一些，第四列列宽可以宽一些"). Weighting the last column moves the
   delivered columns from 187/163/233/361 px to 136/119/170/519 px at a 945 px content column,
   while the three data columns keep at least the widths the source declares for them
   (130/113/162 px), so nothing wraps that Word did not wrap. */
.quectel-content table.word-table td:last-child,
.quectel-content table.word-table th:last-child {
    min-width: 55%;
}

/* The weight below is stated as a percentage on the last column. A browser resolves that
   percentage against the table *before* it weighs the columns, and a column whose own cells span
   rows is exactly the shape where it computes the opposite of what it asks for: measured on
   表 3：引脚描述 (L76K&LC76G(AB)&LC762Z(00)&LC760CA(00) 硬件差异说明), the seven columns came out
   41/61/36/36/522/428/**39** px - the prose column, the one the rule exists for, collapsed to
   39 px and printed one character per line (a 3298 px tall cell), while the two columns holding
   one short value each took 522 / 428 px. Laid out without the weight, the same table measured
   65/128/130/131/145/61/**504** px, i.e. the browser's own weighing is already right there.

   The trigger is a spanning cell **in the last column itself**, not merging in general: a table
   with only a full-width title band, or a rowspan in some other column, still weights correctly
   (measured: 4-, 6- and 7-column probes each landed on the asked-for 55%). So the weight is kept
   wherever the last column is a plain column and handed back to the browser wherever it is not. */
.quectel-content table.word-table.word-table-prose-last:not(:has(td[rowspan]:last-child, th[rowspan]:last-child)) td:last-child,
.quectel-content table.word-table.word-table-prose-last:not(:has(td[rowspan]:last-child, th[rowspan]:last-child)) th:last-child {
    /* The source states the column's own width inline (``width:188.3pt``), and an inline
       declaration is what an author rule has to be important to reach - the same reason the
       cell padding and the Word borders above are. */
    width: 55% !important;
}

/* A command table's two columns are its label/command column and its response column, and the
   response is where the text is: the command column states one command per row while the response
   column carries the whole URC sequence. The browser weighs the two columns by the longest LINE
   each holds, so a 78-character command token wins its column and the response column comes out
   narrower than the column it is several times the size of.

   Measured on the delivered AT+QFOTADL=<FTP_URL> table (EG800Z-EU DFOTA 指导): 105 / 282
   characters per row, 18 / 18 lines - and the columns printed 378px / 333px, i.e. 53% / 47% with
   the smaller column the wider one. With this rule the same table prints 30% / 70% and drops 112px
   of height (966 -> 854).

   65% is the owner's number (2026-10-01: 「针对 word-table 增加如果是 响应列 65%吧」). Only the
   tables the converter marks are touched - it reads the source's own ``响应`` label, because the
   corpus holds 2139 *other* two-column tables that state no response at all and must keep the
   browser's own weighing. The declaration is important for the same reason as the two above: the
   cells carry their own inline style and this page must win. */
.quectel-content table.word-table.word-table-response td:last-child,
.quectel-content table.word-table.word-table-response th:last-child {
    width: 65% !important;
}

.quectel-content table.word-table td,
.quectel-content table.word-table th {
    max-width: 420px;
}

/* A converted Word table is a data grid of many short rows, and the site's cell padding and line
   height make every one of them read as a spacious card rather than a table. Measured on the
   Markdown delivery of Quectel_BG95&BG77&BG600L_Series_QCFG_AT_Commands_Manual_V2.2: 57 tables,
   333 rows, a single-line row 40px tall (its header 40px) and a median row 70px. The review asked
   for these tables to sit flatter and then to match the parameter blocks ("word-table的表格 更扁平
   化些 行间距调整下" / "收窄到和 Parameter 行间距即可").

   The target is the parameter block's own rhythm: there a line is `--line-height-normal` (22.5px)
   with a 2px `row-gap` - measured, a single-line parameter row is 23px. A table row uses the same
   line height, so the ROW PITCH (how close one row's text is to the next) matches the parameter
   block exactly (measured: 24px against the block's 23-25px). What the review then adjusted was
   the clearance around the text, not the line spacing ("文字和表边间距太窄，可以适当宽些" / "上下
   边距也调宽些，内部文字间距不动"): 16px on each side and 4px above and below, against the site's
   own 8px/18px, which made every row read as a card (measured: a single-line row was 40px, median
   70px). The paragraph inside the cell must contribute nothing either - measured, a `<p>` in a cell
   carried `margin: 15px 0`, which alone made the row 60px. `!important` is needed on both:
   `.quectel-content table th, …` sets the padding with `!important`, and the site's `p` rule sets
   that margin, with a specificity higher than any selector that can name this table.

   The clearance is what the later review asked to widen again by a step - "表格的单行行高，建议再
   稍微高一些" (人工评论 4933) - so the vertical padding is 6px, not 4px: two pixels per side, which
   is a visibly taller single-line row while the row pitch the review accepted is unchanged.

   The HORIZONTAL clearance then came down, 16px to 12px, because 16px is 32px of every column and
   a dense converted grid carries that cost eleven times over - which is what held such a table's
   minimum width above the text column. Measured on Quectel_4G_Antenna_YECT001W1WM_Datasheet_V1.2:
   the 11-column VSWR grid needed 727 px inside the 722 px A4 column, so its wrapper scrolled by
   5 px and the review saw a horizontal scrollbar it could not get rid of ("这里还有一点点的水平
   滚动条出现"). That 5 px only appears under the console's sub-pixel `zoom`, so the minimum width
   is the number to work from: 12px leaves the same grid 639 px, and it keeps the vertical
   clearance, the row pitch and the flat look the reviews above asked for. */
.quectel-content table.word-table th,
.quectel-content table.word-table td {
    padding: 6px 12px !important;
    line-height: var(--line-height-normal);
}

/* A converted Word table already says "header" with a fill, so the site's red-and-bold treatment
   on top of it is one signal too many. Two shapes carry a fill, and the review asked for both:

   1. A `th` (a data table's first row, promoted by the conversion). Word writes its label bold, so
      the `<b>` inside is weight 700 and the theme adds 500 - at a small size in Quectel red on a
      grey fill (measured contrast about 4.5:1) the doubled weight is what makes the text look
      smeared rather than crisp ("表头如何已经红色底纹了，表头文字可以不用加粗了").
   2. A red band - Word's `#AB2A15` title row, marked `word-dark-band` by the cleaner because it
      keeps the fill and lightens the text ("红底 白字的 也是").

   The weight is flattened, and the fill keeps its job: the band and the colour still say "header",
   and no colour is repainted. */
.quectel-content table.word-table th,
.quectel-content table.word-table th b,
.quectel-content table.word-table th strong,
.quectel-content table.word-table .word-dark-band,
.quectel-content table.word-table .word-dark-band b,
.quectel-content table.word-table .word-dark-band strong {
    font-weight: var(--font-weight-normal) !important;
}

/* The site colours every `th` red (`.quectel-content table th { color: var(--color-secondary) }`,
   the Quectel red the style guide asks of a hand-written table). The rule below carves a converted
   page's header out of that - but **only the embedded converted table** (`table.word-table`,
   `markdown_export.WORD_TABLE_CLASS`), because only that one still holds the source's own row:
   its fill and its ink are Word's, and the site's red on top of them reads as a second, unintended
   signal (人工评论 4912 「表头是特意做成红色文字的吗？建议就统一为黑色文字即可」; finding 881 的
   「原始灰色表头底纹必须保留」). The header inherits the ink under it instead, and the fill is whatever
   the cell states inline - which is why the legacy `th.head` block below had to be carved out of a
   converted page too: an author `!important` beats an inline declaration, so it was repainting the
   source's `#D9D9D9` as the site's `#F5F5F5` (measured: 2636 of the 5948 embedded converted tables
   carry a promoted `th`; a converted page's embedded header printed `rgb(245,245,245)` over its own
   inline `#D9D9D9`).

   A converted table that travels as a **pipe table** is a different thing and is NOT carved out: it
   has neither the source's fill nor its geometry any more (DEC-17 dropped the declared size and the
   column widths, MD-32 the one-column shape), so it is a site table and takes the site's header -
   red included (the rule below states that explicitly rather than leaving it to the legacy blocks).
   Owner, 2026-10-02: 「md的 应该都是为了走 sphinx 风格的，需要保留的，都是在 md 里走嵌入的形式保留了」
   - the Markdown/embedded split already says which table is which.

   The cell's own text carries the red too: `.quectel-content table th p` / `th strong` state
   `color: var(--color-secondary) !important` for the elements *inside* a header cell, so a rule
   that reaches only the `th` element left every converted table printing red - measured on the
   built page of DEV-18513: the `th` computed `rgb(64, 64, 64)` while the `<span>` inside it
   computed `rgb(227, 30, 36)` for 168 of its 183 header cells. DEV-18519 measured the same thing
   on its own delivered page (six header rows: Revision History, Table 1-4, label `rgb(227,30,36)`
   against Word's `rgb(72,72,72)`). Both rounds therefore need the scope on the cell's
   **descendants**, not only on the cell. Each element that holds text is named, and each is
   guarded so a run the source painted itself keeps its colour. */
.quectel-content.word-html-document table.word-table th:not(.word-dark-band):not([style*="color"]),
.quectel-content.word-html-document table.word-table th:not(.word-dark-band):not([style*="color"]) p:not([style*="color"]),
.quectel-content.word-html-document table.word-table th:not(.word-dark-band):not([style*="color"]) b:not([style*="color"]),
.quectel-content.word-html-document table.word-table th:not(.word-dark-band):not([style*="color"]) strong:not([style*="color"]),
.quectel-content.word-html-document table.word-table th:not(.word-dark-band):not([style*="color"]) span:not([style*="color"]),
.quectel-content.word-html-document table.word-table th:not(.word-dark-band):not([style*="color"]) em:not([style*="color"]),
.quectel-content.word-html-document table.word-table th:not(.word-dark-band):not([style*="color"]) i:not([style*="color"]) {
    color: inherit !important;
}

/* A converted page's *pipe* table takes the site's header, red included. Stated here rather than
   left to the style guide's blocks: those are all guarded for a converted page (a converted
   document's own Word table must keep Word's header), so without this the delivered Markdown
   tables were the one shape printing a black header - measured on the built page of EG800Z-EU
   DFOTA 升级指导: all 8 pipe tables computed `rgb(64, 64, 64)` on the `th` (owner, 2026-10-02:
   「表头是红色字体的吧，现在怎么丢失了？」). The colour the source states still wins - a cell that
   painted a run itself keeps it - and the `word-table` exclusion keeps a nested table out of this
   even if one ever carries a `th` (the cleaner's value tables are `dl`s today: measured 0 nested
   `th` across the corpus).

   The fill needs no rule of its own: the site's `table.docutils th` / `th.head` fill is what a pipe
   table already prints, and it is not `!important` over the cell's own inline declaration. */
.quectel-content.word-html-document table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) {
    color: var(--color-secondary) !important; /* Quectel红色 #E31E24 */
}

/* MD-76: the header cell states the colour and everything **inside** it inherits it, so a run the
   source painted keeps its colour to the end of the run - the body cells' treatment, applied to
   the two header chains above and below. A colourless `span` / `code` that a coloured run wraps
   printed the cell's ink instead of the run's (measured on a converted page: `th > span
   style="color:red"` computed rgb(255,0,0) while its own `span.word-nowrap` computed
   rgb(64,64,64)). No fill, weight or geometry moves. */
.quectel-content.word-html-document table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) p:not([style*="color"]),
.quectel-content.word-html-document table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) b:not([style*="color"]),
.quectel-content.word-html-document table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) strong:not([style*="color"]),
.quectel-content.word-html-document table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) span:not([style*="color"]),
.quectel-content.word-html-document table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) em:not([style*="color"]),
.quectel-content.word-html-document table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) i:not([style*="color"]),
.quectel-content.word-html-document table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) code:not([style*="color"]) {
    color: inherit !important;
}

/* MD-71: a converted page that paints red as its own **classification** - a hardware difference
   document's "red means this module differs", which its NOTE states in so many words - cannot also
   print the standard red table header. The header would read as one more "this differs" mark and
   the colour would stop saying anything (人工评论 8987: 「红字表示模块之间的差异，但网页版的表头是统一
   红色字体的。针对GNSS文档，是否会造成混淆？」, 第 8 页 表 1 Special Mark). The conversion marks such a
   page `word-red-classification` (front matter, see `markdown_export.converter_front_matter`) and
   the band keeps everything that carries no meaning - the light grey fill and the flattened weight
   (MD-38) - while its ink follows the page, exactly as the document ink does elsewhere.

   Only a pipe table is named here. A `word-table`'s band carries Word's own cells and the
   conversion itself stops stating the red ink on them (and on its grey group labels), so a header
   run the source painted keeps its colour (DEC-05) instead of being overridden by an author
   `!important`. The selectors mirror the red rule above guard for guard and add the one class, so
   this rule wins on specificity rather than on source order. */
.quectel-content.word-html-document.word-red-classification table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) {
    color: var(--word-text-colour, inherit) !important;
}

/* MD-76: the mark above states the colour on the cell; its descendants inherit, so a header run
   the source painted keeps its colour (same treatment as the red header chain). */
.quectel-content.word-html-document.word-red-classification table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) p:not([style*="color"]),
.quectel-content.word-html-document.word-red-classification table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) b:not([style*="color"]),
.quectel-content.word-html-document.word-red-classification table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) strong:not([style*="color"]),
.quectel-content.word-html-document.word-red-classification table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) span:not([style*="color"]),
.quectel-content.word-html-document.word-red-classification table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) em:not([style*="color"]),
.quectel-content.word-html-document.word-red-classification table:not(.word-table):not(.word-table *) th:not(.word-dark-band):not([style*="color"]) i:not([style*="color"]) {
    color: inherit !important;
}

/* DEC-04 asks a converted table to keep the **原始灰色表头底纹** the source drew, and finding 881
   measured the page printing `rgb(245, 245, 245)` for every one of its 183 header cells while 171
   of them state the source's own `#D9D9D9` inline (Word 参考第 27 页表头带为 `rgb(217, 217, 217)`).
   The 表头样式 rule below states the fill with `!important`, and an inline declaration cannot beat
   an author `!important` - so the fill the source states is what a converted page loses. The rule
   is narrowed to hand-written pages instead (:not(.word-html-document) on 表头样式), and this rule
   keeps the rest of that treatment - the geometry, not the fill and not the ink - on a converted
   page, so carving the page out changes exactly the two declarations the source owns. A cell that
   states no fill still prints the site's light grey band. */
.quectel-content.word-html-document table th {
    padding: var(--spacing-sm) var(--spacing-md) !important;
    text-align: left !important;
    border: 1px solid var(--color-gray-200) !important;
    font-size: var(--font-size-body) !important;
    line-height: var(--line-height-normal) !important;
}

/* The site's `box-shadow` under every table reads as a grey halo around a Word table, whose own
   1px grid is the border the source drew ("有些阴影模糊"). Dropping the shadow leaves the grid
   doing the work, which is also what the flattening above is for. */
.quectel-content table.word-table {
    box-shadow: none;
}

/* A figure's own layout table is not a data table: Word states the picture's placement in its
   cells' empty columns (the cleaner carries those offsets onto the pictures, see
   `_restore_picture_layout_offsets`), so the table has to stay shrink-to-fit and free of the
   data-table column rules - `word-table`'s `td:last-child { min-width: 55% }` stretched the
   second half of DEV-15096's 3.3.4.1 figure away from the first and shrank the antenna to 60 px
   against the 92 px Word draws. Word's own cell padding is layout too, so the cells carry none. */
.quectel-content table.word-figure {
    width: auto;
    max-width: 100%;
    border-collapse: collapse;
    box-shadow: none;
}

.quectel-content table.word-figure td,
.quectel-content table.word-figure th {
    max-width: none;
    min-width: 0;
    padding: 0;
    border: none;
    background: none;
    overflow: visible;
}

/* The pictures of such a figure keep the size Word gave them: the theme's `max-width: 100%`
   on a content image lets the browser shrink the picture to fit, which both squeezed the
   antenna (measured 60 px against Word's 92) and moved it, because a shrunken picture takes
   its own offset's column down with it. The figure's own offsets travel as inline margins, so
   only the surrounding margin is reset here. */
.quectel-content table.word-figure img {
    /* The theme caps every picture in a table cell at 240 px height so a data table's images
       cannot stretch their rows. A figure's picture is the layout: Word draws the antenna
       92 x 369 px, and the cap shrank it to 60 x 240 (2656). Its own column keeps it inside
       the table. */
    max-height: none;
    max-width: 100%;
    width: auto;
    margin: 0;
}

.quectel-content table.word-table th > p,
.quectel-content table.word-table td > p {
    /* Only the paragraph's *vertical* spacing is what the delivery has to drop here. The
       horizontal half is not spacing: Word writes a table cell's text column as
       `margin-left:X; text-indent:-X`, and zeroing the margin half left the negative half
       pulling those rows' first line X out of their column (measured on the delivered page:
       the abbreviation table's AP/BSSID/IP/LTE/MAC/SSID/SSL terms printed at x=47 against
       x=61 for AES and the table's own header - "此处表头下字段没有对齐，比如AES和下面的
       就没对齐"). Both halves are layout, so both are left to the conversion. */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: inherit;
}

/* A parameter table states each parameter and then its description and values ("<service> |
   Integer type. … 1 PS only"); a value table states one parameter's values and what each one
   means ("1 | PS only"). Word drew both as columns without a real table sometimes, and the tab
   that separated them does not survive the conversion, so the delivered page ran the two
   together. The converter rebuilds them as real tables (word_html_cleaner.PARAMETER_TABLE_CLASS
   and its VALUE_TABLE_CLASS) - which is what puts every explanation in one column instead of
   following its own value ("需要统一作对齐处理"). The two share this rendering because the
   review asked for one flat style across parameter blocks ("把参数表格统一下扁平化风格"), not
   because they are the same thing: one holds parameters, the other holds one parameter's
   settings.

   They sit inside a cell that is already a table cell, so they must not read as a box:
   borderless on the sides, backgroundless, sized by their content, both columns left aligned
   with room between them. Without this they would take the site's `width: 100%` and the
   header-free styling of their host.

   The declarations carry `!important` because the properties that have to be reset are set
   again by `.quectel-content table:not([class]) td` further down this file, which has the SAME
   specificity (0,2,2) as the rule below and therefore wins on order alone. Measured on the
   local rebuild of Quectel_BG95&BG77&BG600L_Series_QCFG_AT_Commands_Manual_V2.2: without it
   the value column kept the site's `8px 18px` cell padding, so the values started 18px right
   of their own parameter's text. `!important` is how this file already handles a table cell
   that has to opt out of the site's table styling (see the `border: ... !important` above).

   `vertical-align: top` is load-bearing, not cosmetic: the theme centers a table cell
   (`vertical-align: middle`), so a parameter whose description and values stack in the right
   cell floated its own name halfway down that cell instead of sitting on the description's
   line - measured before the fix: the name cell was 126px tall with the name centered, while the
   two-column parameter tables (which carry Word's own `vertical-align: top`) looked right.

   The rules above and below the block are kept from Word ("保留上下横线效果") and the sides are
   not: Word draws a rule over a parameter table's first row and under its last one, and the
   review asked for exactly those. Both classes get the same pair, so the flattened and the
   two-column parameter blocks of one document cannot drift apart. */
.quectel-content table.word-parameter-table,
.quectel-content table.word-value-table {
    width: auto;
    margin: 0;
    background: none;
    border-top: 1px solid var(--color-gray-200) !important;
    border-bottom: 1px solid var(--color-gray-200) !important;
    border-left: none !important;
    border-right: none !important;
}

.quectel-content table.word-parameter-table td,
.quectel-content table.word-parameter-table th,
.quectel-content table.word-value-table td,
.quectel-content table.word-value-table th {
    width: auto;
    max-width: none;
    background: none;
    padding: 0 !important;
    vertical-align: top !important;
    text-align: left;
    border-left: none !important;
    border-right: none !important;
}

.quectel-content table.word-parameter-table td:first-child,
.quectel-content table.word-value-table td:first-child {
    padding-right: 16px !important;
    white-space: nowrap;
}

/* A parameter's nibble field: four bit columns and the description behind them, drawn by hand
   (CLN-TBL-22 / MD-86). It is a table because a definition entry has two cells and this block
   states five, and it is NOT boxed: Word prints no rule around it, and the parameter block above
   and below it already carries the pair the delivery keeps. Every cell but the last holds one
   character, so the column is the gap - the run Word drew - and `nowrap` keeps a bit and its
   neighbours from reflowing into one string when the column is narrow. */
.quectel-content table.word-bit-field-table {
    width: auto;
    margin: 0;
    border: none !important;
    border-right: none !important;
    box-shadow: none !important;
    background: none;
}

.quectel-content table.word-bit-field-table td,
.quectel-content table.word-bit-field-table th {
    width: auto;
    max-width: none;
    padding: 0 16px 0 0 !important;
    border: none !important;
    background: none;
    vertical-align: top;
    text-align: left;
    white-space: nowrap;
}

.quectel-content table.word-bit-field-table td:last-child,
.quectel-content table.word-bit-field-table th:last-child {
    padding-right: 0 !important;
    white-space: normal;
}

/* Embedded mappings keep their columns without drawing another box inside a definition. */
.quectel-content.word-html-document table.word-parameter-map,
.quectel-content.word-html-document dl dd table {
    width: auto;
    max-width: 100%;
    margin: 0;
    border: none !important;
    border-right: none !important;
    border-collapse: separate;
    border-spacing: 0 2px;
    box-shadow: none !important;
    background: none !important;
}

.quectel-content.word-html-document table.word-parameter-map td,
.quectel-content.word-html-document table.word-parameter-map th,
.quectel-content.word-html-document dl dd table td,
.quectel-content.word-html-document dl dd table th {
    width: auto;
    max-width: none;
    padding: 0 16px 0 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    color: var(--color-gray-500) !important;
    font-weight: normal;
    line-height: var(--line-height-normal);
    text-align: left !important;
    vertical-align: top;
}

.quectel-content.word-html-document table.word-parameter-map td:last-child,
.quectel-content.word-html-document table.word-parameter-map th:last-child,
.quectel-content.word-html-document dl dd table td:last-child,
.quectel-content.word-html-document dl dd table th:last-child {
    padding-right: 0 !important;
}

/* A parameter's own values are a value block INSIDE a parameter table, and they are an
   enumeration rather than a parameter, so the block rules belong only to the outer one -
   otherwise every parameter would be drawn as a boxed sub-block. */
.quectel-content table.word-parameter-table td table.word-value-table,
.quectel-content table.word-parameter-table th table.word-value-table,
.quectel-content table.word-value-table td table.word-value-table,
.quectel-content table.word-value-table th table.word-value-table {
    border-top: none !important;
    border-bottom: none !important;
}

/* On the page delivered as Markdown the same two things are definition lists
   (markdown_export.PARAMETER_LIST_CLASS and VALUE_LIST_CLASS): the name or value is the term,
   the text after it is its definition, and the page then carries no table inside a table. The
   grid is what puts every explanation in one column - the review's "需要统一作对齐处理" -
   without a table. `font-weight` is deliberately NOT raised: the values the source wrote bold
   keep their own `<b>`, so the list does not emphasise the ones the author left plain. Both
   declarations override `.quectel-content dl dt` / `dl dd` by specificity (0,2,2 against
   0,1,2), so no `!important` is needed on this side. The two rules above and below each block
   are the ones the HTML delivery keeps from Word, so the two deliveries agree
   ("把参数表格统一下扁平化风格，保留上下横线效果"). */
.quectel-content dl.word-parameter-list,
.quectel-content dl.word-value-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 16px;
    row-gap: 2px;
    margin: 0;
    border-top: 1px solid var(--color-gray-200);
    border-bottom: 1px solid var(--color-gray-200);
    padding: 6px 0;
}

.quectel-content dl.word-parameter-list dt,
.quectel-content dl.word-parameter-list dd,
.quectel-content dl.word-value-list dt,
.quectel-content dl.word-value-list dd {
    margin: 0;
    padding: 0;
    font-weight: normal;
    color: var(--color-gray-500);
    text-align: left;
    line-height: var(--line-height-normal);
}

.quectel-content dl.word-parameter-list dt,
.quectel-content dl.word-value-list dt {
    white-space: nowrap;
}

/* A *definition list* is drawn as the same block as a parameter list. MyST's deflist is what a
   Word notation list is delivered as (``- **<CR>**<12 nbsp>回车符。`` became ``**<CR>**`` /
   ``: 回车符。``), and the parameter list is that same shape - a term and the description Word
   tabbed it against - so the owner asked for the two to read as one block
   (2026-10-01: 「这里的样式要和参数那里显示一致」). The column used to be held by the no-break
   spaces inside each list item, which only works while the item stays on one line: the moment an
   explanation wrapped, its next line started at the item's own margin (「可以让这里行内部分文字
   左对齐？」). Sharing the rules is what makes them identical - duplicated declarations would drift.
   The one thing NOT shared is the nesting rules below (`dd dl`), which only a block that has
   nested values needs. */
.quectel-content dl.word-parameter-list,
.quectel-content dl.word-value-list,
.quectel-content dl.myst {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 16px;
    row-gap: 2px;
    margin: 0;
    border-top: 1px solid var(--color-gray-200);
    border-bottom: 1px solid var(--color-gray-200);
    padding: 6px 0;
}

.quectel-content dl.word-parameter-list dt,
.quectel-content dl.word-parameter-list dd,
.quectel-content dl.word-value-list dt,
.quectel-content dl.word-value-list dd,
.quectel-content dl.myst dt,
.quectel-content dl.myst dd {
    margin: 0;
    padding: 0;
    font-weight: normal;
    color: var(--color-gray-500);
    text-align: left;
    line-height: var(--line-height-normal);
}

.quectel-content dl.word-parameter-list dt,
.quectel-content dl.word-value-list dt,
.quectel-content dl.myst dt {
    white-space: nowrap;
}

.quectel-content dl.word-parameter-list {
    --word-parameter-label-max-width: 30%;
    grid-template-columns: fit-content(var(--word-parameter-label-max-width)) minmax(0, 1fr);
}

.quectel-content dl.word-parameter-list dt {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ONE rhythm for every parameter, whether it takes one line or several.
   The source writes a parameter's name and its description two ways - inside a `<p>` (the Word
   two-column table) or as a bare node (the flattened block, and the right-hand cell of a rebuilt
   value table) - and the site's paragraph rule gives that `<p>` `margin: 15px 8px`. Measured on
   the Markdown delivery of Quectel_BG95&BG77&BG600L_Series_QCFG_AT_Commands_Manual_V2.2: where a
   `<p>` was present the name's text sat 15px below its own row and the description 8px above the
   values, while the flattened block had neither. Zeroing the margins inside a list is what makes
   the two identical ("即使是多行参数的情况也可以做到像单行参数的表格样式，包括内部间距").

   `!important` is required, not laziness: the rule that sets those margins is
   `.quectel-content p:not(li p):not(td p):not(th p):not(blockquote p):not(.admonition p)…`,
   whose specificity is an order of magnitude higher than any selector that can name our block,
   so without it the reset silently does nothing (measured: `margin-bottom: 8px` survived).

   The spacing between the lines of one parameter is then added back explicitly, because only
   block-level siblings should receive it: a cell can also hold bare inline content
   ("Error code. See <b>Chapter 4</b> for details."), and a blanket `margin-top` on children
   would break that sentence apart. */
.quectel-content dl.word-parameter-list dt > p,
.quectel-content dl.word-parameter-list dd > p,
.quectel-content dl.word-parameter-list dt > ul,
.quectel-content dl.word-parameter-list dd > ul,
.quectel-content dl.word-parameter-list dt > ol,
.quectel-content dl.word-parameter-list dd > ol,
.quectel-content dl.word-value-list dt > p,
.quectel-content dl.word-value-list dd > p,
.quectel-content dl.word-value-list dt > ul,
.quectel-content dl.word-value-list dd > ul,
.quectel-content dl.word-value-list dt > ol,
.quectel-content dl.word-value-list dd > ol,
.quectel-content dl.myst dt > p,
.quectel-content dl.myst dd > p {
    margin: 0 !important;
    line-height: var(--line-height-normal);
}

.quectel-content dl.word-parameter-list dd > p + p,
.quectel-content dl.word-value-list dd > p + p,
.quectel-content dl.word-parameter-list dd > p + ul,
.quectel-content dl.word-value-list dd > p + ul,
.quectel-content dl.word-parameter-list dd > p + ol,
.quectel-content dl.word-value-list dd > p + ol,
.quectel-content dl.word-parameter-list dd > ul + p,
.quectel-content dl.word-value-list dd > ul + p,
.quectel-content dl.myst dd > p + p {
    margin-top: 2px !important;
}

/* A parameter's values are a list of their own inside the description column, and the gap above
   it is the same 2px whether or not a `<p>` happens to precede it (measured: 8px from the
   paragraph's own margin when there was one, 0 when there was not - two different looks for the
   same thing). */
.quectel-content dl.word-parameter-list dd > dl,
.quectel-content dl.word-value-list dd > dl {
    margin-top: 2px !important;
}

/* Same reason as the nested value table: a parameter's values are a list INSIDE a parameter
   list, and they are enumerations, not parameters - only the outer list is ruled.

   The rule reads `dd dl` rather than naming the nested `word-value-list`: the delivered-Markdown
   path is MyST's own deflist, so a parameter's values arrive as a plain `dl.myst` inside the
   outer `dl.myst` and carry no conversion class at all. Measured on the delivered page
   (EG800Z-EU DFOTA 指导): 17 `dl`s, of which the 3 nested ones are `dl.simple.myst` under a
   `dd` and still drew `border-top: 1px solid` / `border-bottom: 1px solid` - the lines the owner
   read as too much separation inside one parameter (「这里嵌入的定义列 可以不用上下边框线，
   避免太分隔了」). `padding` goes with the borders for the same reason: it is the ruled block's
   own inset, and there is no ruling here to inset from. */
.quectel-content dl.word-parameter-list dd dl,
.quectel-content dl.word-value-list dd dl,
.quectel-content dl.myst dd dl {
    border-top: none;
    border-bottom: none;
    padding: 0;
}

/* The same ruling, suppressed for a parameter block inside a **NOTE callout**. Word states the
   note's own frame and then prints the parameter as indented text inside it - the term in the
   left column, its description in the right, no line between them and the note's prose. The
   block rules above reached inside that frame and drew a rule above and below the one parameter,
   which reads as a table row the source never had (human comment 9146, 2026-11-10,
   Quectel_BG95&BG77&BG600L_Series_GNSS_Application_Note_V1.5, PDF p22, the XTRA NOTE's
   ``<DL_err>``: 「<DL_err> is not in a table, it is in a note. Please delete the table row and
   just keep the text about the parameter」).

   The two-column grid stays: the source prints that description at 148.1 pt against the term's
   91.3 pt, which is the pair every body parameter block draws - only the ruling and its own
   6 px inset go, exactly as the ``dd dl`` and table-cell rules above keep their grid and drop
   theirs. Measured on that page's build: a ``dl.myst`` inside ``div.note.admonition`` computed
   ``border-top: 1px solid`` / ``border-bottom: 1px solid`` / ``padding: 6px 0``; with this rule
   it computes ``none`` / ``none`` / ``0`` while the first body parameter block on the same page
   still computes ``1px`` / ``1px`` / ``6px 0``.

   Scoped to ``.admonition`` - the callout every converted Word NOTE arrives as (DEC-10) - and
   not to ``dl`` in general, because a body block keeps its rules: that is the owner's own
   standard for the parameter block (2026-10-01). No tracked ``.md``/``.rst`` source uses an
   admonition, so this reaches only the conversion. */
.quectel-content .admonition dl.word-parameter-list,
.quectel-content .admonition dl.word-value-list,
.quectel-content .admonition dl.myst {
    border-top: none;
    border-bottom: none;
    padding: 0;
}

/* The same hairlines, one level up: a value or parameter list that sits directly in a **table
   cell**. Word gives a cell two stacked lines (``2.55~3.6 V`` over ``典型值 3.3 V``, or
   ``18 个 LCC 引脚`` over ``10 个 LGA 引脚``), the converter delivers that cell as a two-column
   definition list, and the block rules above then draw the list's own top and bottom rules
   *inside* the cell - two lines the source never had, because the cell's border is the only rule
   there. Owner's report (2026-10-20, 表 2：基本信息 of L76K&LC76G(AB)&LC762Z(00)&LC760CA(00)
   硬件差异说明): 「一个单元格里面多余线条样式的问题」.

   Measured on that page: 5 such lists, each computing ``border-top: 1px solid rgb(204,204,204)``
   / ``border-bottom: 1px solid rgb(204,204,204)`` / ``padding: 6px 0`` while its cell's own
   borders are 0/1px/0/0 - so each one drew a line above and below its own text and sat 6px lower
   than the plain-text cells beside it. Suppressing both leaves the row's grid (the cell border)
   as the only horizontal rule, and the list's first line then aligns with its neighbours.
   Corpus: 964 of the 4531 value/parameter lists are inside a cell (744 ``word-value-list`` and
   220 ``word-parameter-list``, on 92 pages); the other 3567 are body blocks, which keep their
   rules. */
.quectel-content.word-html-document table.word-table td dl.word-parameter-list,
.quectel-content.word-html-document table.word-table th dl.word-parameter-list,
.quectel-content.word-html-document table.word-table td dl.word-value-list,
.quectel-content.word-html-document table.word-table th dl.word-value-list {
    border-top: none;
    border-bottom: none;
    padding: 0;
    /* The block rule's 16px column gap is the tab between a value and its description in body
       text (``0`` / ``关闭该功能``). Inside a cell Word wrote a single space instead - the cell
       holds ``2.7~3.4 V``, not a column of values - so the same grid printed ``2.7~3.4      V``
       and ``18      个 LCC 引脚`` (owner 2026-10-20: 「残留可以改」). 0.3em is one word space at
       the body size. */
    column-gap: 0.3em;
}

/* A converted table whose cells carry such a list is laid out with its text at the top of the
   row, the way Word prints it. The theme centers a cell's content (``vertical-align: middle``),
   which is right for a grid of equal-height values and wrong beside a stacked cell: measured on
   表 2 of the document above, the ``VCC`` label (one line) sat 11px below the first line of
   ``2.7~3.4 V`` / ``典型值 3.3 V`` (two blocks) in the same row - the shorter content centered
   against the taller. Scoped to a table that has a definition list in a cell, so every other
   converted table keeps the centering (``vertical-align: top`` measured on this table: both
   first lines at 695px, table height unchanged at 1049px). */
.quectel-content.word-html-document table.word-table:has(td dl, th dl) td,
.quectel-content.word-html-document table.word-table:has(td dl, th dl) th {
    vertical-align: top;
}

/* A Safety Information panel is Word's layout table - one icon per row beside the precaution
   it belongs to - and the converter delivers it as a headless definition list
   (``markdown_export.ICON_LIST_CLASS``): the icon is the term, the precaution its description
   (owner 2026-10-20: 「图片悬浮了，应该转换成一个无头的 md 表格样式…参考走参数表的形式」).
   Same grid as the parameter list - the hairlines above and below are the panel's only rules,
   Word's per-cell borders do not reach the page - and the term column is the icon's own width,
   so every precaution starts at one column. The icon is not a figure: it sits in the text line,
   so the block-image rules above (centered margin, zoom cursor, rounded corners) come off it.
   The icon is vertically centered against its precaution (owner 2026-10-20: 「图片列 要垂直居中」):
   the grid centers the term in the row, and the picture centers in the term's own line box. */
.quectel-content dl.word-icon-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
    margin: 0;
    border-top: 1px solid var(--color-gray-200);
    border-bottom: 1px solid var(--color-gray-200);
    padding: 6px 0;
}

.quectel-content dl.word-icon-list dt,
.quectel-content dl.word-icon-list dd {
    margin: 0;
    padding: 0;
    font-weight: normal;
    color: var(--color-gray-500);
    text-align: left;
    line-height: var(--line-height-normal);
}

.quectel-content dl.word-icon-list dt {
    /* The term holds only the picture: with the line box collapsed (line-height: 0) the dt is
       exactly the icon's height, and the grid's `align-items: center` puts it at the row's
       middle. Baseline centering (`vertical-align: middle`) would depend on the strut's font
       metrics instead. */
    line-height: 0;
}

.quectel-content dl.word-icon-list dt > img {
    display: inline-block;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    cursor: default;
    vertical-align: top;
}

/* Same rhythm as the parameter list: the site's paragraph rule would otherwise push the
   precaution's first line below its icon (see the `dl.word-parameter-list dt > p` block). */
.quectel-content dl.word-icon-list dd > p {
    margin: 0 !important;
    line-height: var(--line-height-normal);
}

.quectel-content h1,
.quectel-content .section > h1 {
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-gray-500);
    margin: var(--spacing-xl) 0 var(--spacing-sm);  /* 上间距拉宽：36px */
}

.quectel-content h2,
.quectel-content .section > h2 {
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-gray-500);
    margin: var(--spacing-lg) 0 var(--spacing-sm);  /* 上间距拉宽：24px */
    padding-bottom: var(--spacing-xs);  /* 原 var(--spacing-sm)，更紧凑 */
    border-bottom: 2px solid var(--color-secondary-lighter);
}

.quectel-content h3,
.quectel-content .section > h3 {
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-gray-500);
    margin: var(--spacing-lg) 0 var(--spacing-xs);  /* 上间距拉宽：24px */
}

.quectel-content h4,
.quectel-content .section > h4 {
    font-size: var(--font-size-h4);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-gray-500);
    margin: var(--spacing-md) 0 var(--spacing-xs);  /* 上间距拉宽：18px */
}

.quectel-content h5,
.quectel-content .section > h5 {
    font-size: var(--font-size-h5);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-gray-500);
    margin: var(--spacing-md) 0 var(--spacing-xs);  /* 上间距拉宽：18px */
}

/* Hide Sphinx headerlink (¶ symbol) */
.quectel-content .headerlink {
    display: none !important;
}

/* Word documents are laid out flush left, and the reviewer asked for the delivered
   page to keep that ("正文文字包括表格内的文字统一左对齐"): the previous justified
   setting re-flowed every paragraph the source had left ragged, so a left-aligned
   paragraph reached the page stretched edge to edge. `text-align` is preserved per
   element from the source, so centered captions and right-aligned cells still win.
   `hyphens: auto` is gone with it: it broke English words across lines ("utilizing
   断开了"，"页面分段单个单词不要被打断") where the source has no hyphen. Long paths,
   URLs and function signatures still wrap, via the overflow-wrap rule below.

   `.text-center` is exempted because this is a default, not a decision: the utility class
   is how an author says "center this", and the selector above is specific enough
   (0,6,14) to beat the class (0,1,0) on its own - which is why a centered caption used to
   reach the page flush left. Exempting it here rather than duplicating the :not() chain
   keeps one rule for the default. Measured before relying on it: the class appears in 0
   of the tracked .md/.rst sources, so nothing already on the site changes behaviour.
   The Markdown converter emits it as `{.text-center}` (markdown_export.CENTRE_MARKER),
   which is how a centered figure caption survives the conversion from Word. */
.quectel-content p:not(li p):not(td p):not(th p):not(blockquote p):not(.admonition p):not(.note p):not(.warning p):not(.tip p):not(.important p):not(.text-center) {
    margin-bottom: var(--spacing-sm);  /* 原 var(--spacing-md)，更紧凑 */
    line-height: var(--line-height-relaxed);
    color: var(--color-gray-500);
    text-align: left;
    hyphens: manual;
    overflow-wrap: break-word;
}

/* A converted page keeps the heading scale its own document prints. Word sets a chapter
   title at 24 pt, a section heading at 14 pt, 12 pt one level deeper and 10.5 pt below that
   (the body size), so the chapter heading is more than 1.7x its section. The site's own
   scale (h1 32 / h2 28 / h3 24 / h4 20 px) put a section heading within 4 px of a chapter
   heading, and the reviewer read the two levels as the same size (人工评论 4402
   「1. Introduction 1.1 Application Modules 在PDF原文，字体大小有明显差异。但是交付文件中，
   两者字体类型不同，大小却没有差异。」). The h1 already matches Word's 24 pt chapter title
   (= 32 px at the delivery's 96 dpi); the levels below now follow Word's own 14 / 12 /
   10.5 pt. Scoped to converted pages, so the site's own pages keep their scale, and the
   two-run heading of the printed page is still not rebuilt (DR-1: the theme sizes every
   level, the cleaner does not write font sizes). */
.quectel-content.word-html-document h2,
.quectel-content .word-html-document h2 {
    font-size: 19px;  /* Word's 14 pt section heading */
}

.quectel-content.word-html-document h3,
.quectel-content .word-html-document h3 {
    font-size: 16px;  /* Word's 12 pt third level */
}

.quectel-content.word-html-document h4,
.quectel-content .word-html-document h4 {
    font-size: 15px;  /* Word's 10.5 pt fourth level, the body size, set bold */
}

/* A paragraph the source justified used to stay justified here (人工评论 715 "文段没对齐"),
   carried from Word's paragraph style to a ``.text-justify`` mark by the cleaner
   (word_html_cleaner._carry_justified_word_styles → markdown_export.JUSTIFY_MARKER).

   That rule was retired on 2026-09-30 (DEC-23): the owner asked for the alignment to be the
   site's own - 「2端对齐由sphinx自身的统一样式来决定」 - so the conversion no longer emits the
   mark, the cleaner drops every ``text-align:justify`` declaration, and the body above stays
   flush left. A paragraph's own ``text-align`` (a centered caption, a right-aligned figure) is
   still honoured. */

/* The conversion's own mark for layout a Markdown paragraph cannot carry: a caption's own weight,
   which comes from its Word paragraph style (人工评论 736 "图表标题没有加粗" - the caption style
   says ``font-weight:bold`` and the figure caption carries no run-level bold).
   ``!important`` because the paragraph rule above states its properties on the same element
   with the :not() chain's specificity, the way ``.text-justify`` needs it.

   The first-line indent mark (``.word-indent-1`` … ``.word-indent-4``) used to sit here beside
   it. It was retired on 2026-09-30 - the owner asked for the Chinese first-line indent to be
   dropped so the delivered page matches the English documents (DEC-22) - so no rule draws it
   and ``markdown_export`` no longer emits the mark. */

/* A paragraph Word prints at a left inset carries the count in ``em`` (see
   ``word_html_cleaner._carry_left_insets`` → ``markdown_export.INSET_MARKER``): the lines under
   a note panel's numbered items (Word's ``margin-left:21.0pt`` = two characters) and indented
   blocks inside a cell. Measured on the AI Playground manual's note panel (人工评论 4985): Word
   prints ``建议操作：`` at 82.76 pt, level with the numbered items' text column, and the page
   printed it at the panel's own edge, 20.9 pt left of that column. */
.quectel-content.word-html-document .word-inset-1 {
    margin-left: 1em !important;
}

.quectel-content.word-html-document .word-inset-2 {
    margin-left: 2em !important;
}

.quectel-content.word-html-document .word-inset-3 {
    margin-left: 3em !important;
}

.quectel-content.word-html-document .word-inset-4 {
    margin-left: 4em !important;
}

.quectel-content.word-html-document .word-inset-5 {
    margin-left: 5em !important;
}

.quectel-content.word-html-document .word-inset-6 {
    margin-left: 6em !important;
}

/* A converted page's label line ("修订记录" / "参数" / "举例" / "备注", a command table's "Parameter"
   band) used to be sized here, from a mark the conversion put on the paragraph
   (``markdown_export.LABEL_LINE_CLASS``). The owner retired the mark on 2026-10-01 -
   「统一去掉 .word-label-line，都走 sphinx 样式控制」 - so a label line is an ordinary paragraph again:
   the site's own body size, with the weight Word's ``<b>`` run states arriving as Markdown emphasis
   (``**修订记录**``). Nothing is lost but Word's hierarchy between a 12 pt label and an 18 pt one,
   which is the same call DEC-22 / DEC-23 / DEC-26 / DEC-29 / DEC-35 make for the other Word layout
   marks. The cleaner still writes the mark, for its own HTML artifact. */

.quectel-content.word-html-document .word-inset-2 {
    margin-left: 2em !important;
}

.quectel-content.word-html-document .word-inset-3 {
    margin-left: 3em !important;
}

.quectel-content.word-html-document .word-inset-4 {
    margin-left: 4em !important;
}

.quectel-content.word-html-document .word-inset-5 {
    margin-left: 5em !important;
}

.quectel-content.word-html-document .word-inset-6 {
    margin-left: 6em !important;
}

/* A converted page's label line ("修订记录" / "参数" / "举例" / "备注", a command table's "Parameter"
   band) used to be sized here, from a mark the conversion put on the paragraph
   (``markdown_export.LABEL_LINE_CLASS``). The owner retired the mark on 2026-10-01 -
   「统一去掉 .word-label-line，都走 sphinx 样式控制」 - so a label line is an ordinary paragraph again:
   the site's own body size, with the weight Word's ``<b>`` run states arriving as Markdown emphasis
   (``**修订记录**``). Nothing is lost but Word's hierarchy between a 12 pt label and an 18 pt one,
   which is the same call DEC-22 / DEC-23 / DEC-26 / DEC-29 / DEC-35 make for the other Word layout
   marks. The cleaner still writes the mark, for its own HTML artifact. */

.quectel-content a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.quectel-content a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Converted-document links use one presentation regardless of Markdown or embedded-HTML form.
   Keep descendants on the anchor's style so Word's nested u/span wrappers cannot drift.
   The document-center breadcrumb is chrome, not Word body content: the injector puts the nav
   inside this same container as its first child (backend/quectel_auth/document_center_context.py),
   so the scope has to exclude it. `:where()` keeps the exclusion flat - a plain `:not()` would put
   this rule above the marker-shape exemption below (measured: superscript links turned italic and
   underlined), and holding specificity still is exactly why the file's other exclusion is written
   `p:where(:not(.word-table-caption, .word-note-label))`. */
.quectel-content.word-html-document a:where(:not(.official-context-breadcrumb *)),
.quectel-content.word-html-document a:visited:where(:not(.official-context-breadcrumb *)),
.quectel-content.word-html-document a:hover:where(:not(.official-context-breadcrumb *)) {
    color: var(--color-primary) !important;
    font-style: italic !important;
    text-decoration: underline !important;
}

.quectel-content.word-html-document a:where(:not(.official-context-breadcrumb *)) *,
.quectel-content.word-html-document a:visited:where(:not(.official-context-breadcrumb *)) *,
.quectel-content.word-html-document a:hover:where(:not(.official-context-breadcrumb *)) * {
    color: inherit !important;
    font-style: inherit !important;
    text-decoration: inherit !important;
}

.quectel-content.word-html-document a:has(> sup),
.quectel-content.word-html-document a:visited:has(> sup),
.quectel-content.word-html-document a:hover:has(> sup),
.quectel-content.word-html-document a:has(> sub),
.quectel-content.word-html-document a:visited:has(> sub),
.quectel-content.word-html-document a:hover:has(> sub) {
    font-style: normal !important;
    text-decoration: none !important;
}

/* ========================================
   Code Blocks - 代码块样式（基于Quectel品牌设计规范）
   ======================================== */
/* Inline code 行内代码 */
.quectel-content code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: #d73a49;
    border: 1px solid #e9ecef;
}

/* Code block container 代码块容器 */
.quectel-content .code-block,
.quectel-content .highlight,
.quectel-content div[class*="highlight-"] {
    position: relative;
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    margin: var(--spacing-sm) 0;  /* 原 var(--spacing-md)，减少上下留白 */
    overflow: hidden;
}

/* Code block header 代码块头部 - 隐藏不显示 */
.quectel-content .code-block-header {
    display: none;
}

/* Language label 语言标签 */
.quectel-content .code-block-language {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Copy button 复制按钮 - 放置在代码块内部右上角 */
.quectel-content .code-copy-btn,
.quectel-content .copybtn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d1d5da;
    border-radius: 4px;
    font-size: 12px;
    color: #586069;
    cursor: pointer;
    transition: all 0.2s ease;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    opacity: 0;
}

.quectel-content .code-block:hover .code-copy-btn,
.quectel-content .highlight:hover .copybtn {
    opacity: 1;
}

.quectel-content .code-copy-btn:hover,
.quectel-content .copybtn:hover {
    background: #ffffff;
    border-color: #959da5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.quectel-content .code-copy-btn.copied {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    opacity: 1;
}

.quectel-content .code-copy-btn svg {
    width: 14px;
    height: 14px;
}

/* Code block content 代码块内容 */
.quectel-content .code-block-content {
    position: relative;
    padding: 16px;
    overflow-x: auto;
    background: #f6f8fa;
}

/* Pre element styling */
.quectel-content pre {
    position: relative;
    background: #f6f8fa !important;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 16px;
    padding-right: 80px; /* 为复制按钮留出空间 */
    overflow-x: auto;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    tab-size: 4;
    font-family: 'SFMono-Regular', 'Cascadia Mono', 'DejaVu Sans Mono', 'Consolas', 'Liberation Mono', 'Courier New', 'Microsoft YaHei Mono', 'Microsoft YaHei', 'PingFang SC', monospace;
    line-height: 1.7;
}

.quectel-content .highlight pre {
    margin: 0;
    border: none;
    background: #f6f8fa !important;
}

.quectel-content pre code {
    display: block;
    padding: 0;
    overflow-x: auto;
    background: transparent !important;
    font-family: inherit;
    font-size: 14px;
    line-height: inherit;
    color: #24292e;
    border: none;
    white-space: inherit;
    word-break: inherit;
    overflow-wrap: inherit;
}

.quectel-content .highlight pre *,
.quectel-content .code-block-content pre * {
    font-family: inherit;
}

/* Syntax highlighting - GitHub style colors
   Use .quectel-content prefix (specificity 0,3,0) to always beat
   pygments.css bare .highlight rules (specificity 0,2,0),
   regardless of CSS load order / browser cache. */

/* Comments: all sub-types */
.quectel-content .highlight .c,
.quectel-content .highlight .c1,
.quectel-content .highlight .cm,
.quectel-content .highlight .cp,
.quectel-content .highlight .cpf,
.quectel-content .highlight .cs,
.quectel-content .highlight .ch { color: #6a737d; font-style: italic; } /* Comment */

/* Keywords: all sub-types */
.quectel-content .highlight .k,
.quectel-content .highlight .kc,
.quectel-content .highlight .kd,
.quectel-content .highlight .ki,
.quectel-content .highlight .kn,
.quectel-content .highlight .kp,
.quectel-content .highlight .kr { color: #d73a49; font-weight: 600; } /* Keyword */

/* Keyword.Type (int, void, char, etc.) */
.quectel-content .highlight .kt { color: #d73a49; } /* Keyword.Type */

/* Names */
.quectel-content .highlight .n  { color: #24292e; }                   /* Name */
.quectel-content .highlight .na { color: #005cc5; }                   /* Name.Attribute */
.quectel-content .highlight .nb { color: #005cc5; }                   /* Name.Builtin */
.quectel-content .highlight .nc { color: #6f42c1; font-weight: 600; } /* Name.Class */
.quectel-content .highlight .nd { color: #e36209; }                   /* Name.Decorator */
.quectel-content .highlight .ne { color: #d73a49; font-weight: 600; } /* Name.Exception */
.quectel-content .highlight .nf { color: #6f42c1; }                   /* Name.Function */
.quectel-content .highlight .ni { color: #24292e; }                   /* Name.Entity */
.quectel-content .highlight .nl { color: #24292e; }                   /* Name.Label */
.quectel-content .highlight .nn { color: #24292e; font-weight: 600; } /* Name.Namespace */
.quectel-content .highlight .nt { color: #22863a; }                   /* Name.Tag */
.quectel-content .highlight .nv { color: #e36209; }                   /* Name.Variable */

/* Operators */
.quectel-content .highlight .o  { color: #d73a49; }                   /* Operator */
.quectel-content .highlight .ow { color: #d73a49; font-weight: 600; } /* Operator.Word */

/* Punctuation */
.quectel-content .highlight .p  { color: #24292e; }                   /* Punctuation */

/* Strings: all sub-types */
.quectel-content .highlight .s,
.quectel-content .highlight .s1,
.quectel-content .highlight .s2,
.quectel-content .highlight .sa,
.quectel-content .highlight .sb,
.quectel-content .highlight .sc,
.quectel-content .highlight .dl,
.quectel-content .highlight .sd,
.quectel-content .highlight .se,
.quectel-content .highlight .sh,
.quectel-content .highlight .si,
.quectel-content .highlight .sl,
.quectel-content .highlight .sr,
.quectel-content .highlight .ss,
.quectel-content .highlight .sx { color: #032f62; }                   /* String */

/* Numbers: all sub-types */
.quectel-content .highlight .m,
.quectel-content .highlight .mb,
.quectel-content .highlight .mf,
.quectel-content .highlight .mh,
.quectel-content .highlight .mi,
.quectel-content .highlight .ml,
.quectel-content .highlight .mo,
.quectel-content .highlight .mx { color: #005cc5; }                   /* Number */

/* Errors - override pygments red border */
.quectel-content .highlight .err { color: #b31d28; background-color: transparent; border: none; } /* Error */

/* Generic tokens */
.quectel-content .highlight .gh { color: #005cc5; font-weight: 600; } /* Generic.Heading */
.quectel-content .highlight .gu { color: #6f42c1; font-weight: 600; } /* Generic.Subheading */
.quectel-content .highlight .gi { color: #22863a; }                   /* Generic.Inserted */
.quectel-content .highlight .gd { color: #b31d28; }                   /* Generic.Deleted */
/* Generic.Error was missing from this palette, and an AT transcript needs it: the module's
   answer to a failed command is ``ERROR``, which the AT lexer emits as Generic.Error
   (web/shared/sphinx_extensions/at_command_lexer.py). Without a rule the word was the only
   unstyled token in a block of otherwise coloured lines. The colour is the one this palette
   already uses for the other "bad news" tokens (.err / .gd), so it writes nothing new into
   the design. */
.quectel-content .highlight .gr { color: #b31d28; }                   /* Generic.Error */

/* Whitespace */
.quectel-content .highlight .w  { color: inherit; }                   /* Text.Whitespace */

/* Ensure proper copy button positioning for legacy code blocks */
.quectel-content .highlight .copybtn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* ========================================
   Tables - 表格样式
   ======================================== */
.quectel-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.quectel-content table th {
    background: var(--color-gray-100);
    color: var(--color-secondary);
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    font-weight: var(--font-weight-semibold);
    border: 1px solid var(--color-gray-200);
    font-size: var(--font-size-body);
}

.quectel-content table td {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-gray-200);
    color: var(--color-gray-500);
}

.quectel-content table tr:hover {
    background: #f0f0f0;
}

.quectel-content table code {
    font-size: 0.85em;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
}

/* ========================================
   Admonitions - 提示框样式 (不同类型使用不同颜色)
   ======================================== */
/* 通用样式 */
.quectel-content .admonition,
.quectel-content .note,
.quectel-content .warning,
.quectel-content .tip,
.quectel-content .important,
.quectel-content .caution,
.quectel-content .danger {
    padding: var(--spacing-sm);  /* 从 24px 减小到 16px */
    border-radius: var(--radius-md);
    /* Top and bottom are the same gap. The top margin used to be 0, which left a converted
       Word NOTE flush against the block above it: a parameter block is a
       `dl.word-parameter-list` whose own margin is 0, so the note's box sat on the list's
       bottom rule with no room at all (人工：“需要调整下顶部和之前内容的间距，最好换一行”).
       No tracked .md/.rst source uses an admonition, so this reaches only the conversion. */
    margin: var(--spacing-md) 0;
    border-left: 4px solid;
}

/* 通用标题样式 */
.quectel-content .admonition-title,
.quectel-content .admonition > p.admonition-title {
    font-weight: var(--font-weight-semibold);
    margin-top: 0;
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
}

/* Note/备注 - 蓝色风格（默认） */
.quectel-content .note,
.quectel-content .admonition.note {
    background: #E6F2FF;
    border-color: #0066CC;
}

.quectel-content .note .admonition-title,
.quectel-content .admonition.note .admonition-title {
    color: #0066CC;
}

.quectel-content .note p,
.quectel-content .admonition.note p {
    color: #0066CC;
}

.quectel-content .note li,
.quectel-content .note ol,
.quectel-content .note ul,
.quectel-content .admonition.note li,
.quectel-content .admonition.note ol,
.quectel-content .admonition.note ul,
.quectel-content .note li::marker,
.quectel-content .admonition.note li::marker {
    color: #0066CC;
}

/* DEC-12: a converted document's NOTE prints the document's own ink, the way the Word page
   prints it. The blue above is this site's style for a hand-written note; a converted page's
   note is the source's own callout - measured on the reference PDF, the label and every item
   are (64,64,64) on the callout's own #F2F2F2 - and repainting it #0066CC is exactly the
   document's "不一致蓝色" the reviewer asked to have checked throughout (人工评论 676 "HTML
   字体中出现不一致蓝色，需通篇检查调整"). The mark scopes it the way every other conversion
   rule is scoped, so the site's hand-written notes keep their blue.
   The ink comes from `--word-text-colour`, which the page's front matter carries and the
   template puts on the content container; a page without it falls back to inheritance, i.e.
   the container's own colour. */
.quectel-content.word-html-document .admonition.note,
.quectel-content.word-html-document .admonition.note .admonition-title,
.quectel-content.word-html-document .admonition.note p,
.quectel-content.word-html-document .admonition.note li,
.quectel-content.word-html-document .admonition.note ol,
.quectel-content.word-html-document .admonition.note ul,
.quectel-content.word-html-document .admonition.note li::marker {
    color: var(--word-text-colour, inherit);
}

/* A converted note prints its bold the weight Word prints it (人工评论 4929 "字都在加粗的部分，没有加粗成功",
   4931 "检查页面中和页面预览哪里加粗了，HTML中有没有加粗").
 *
 * A site-wide rule - `.quectel-content .admonition strong, .note strong, …` - states
 * `var(--font-weight-semibold)` (500) on every `<strong>` inside an admonition. On a converted page
 * that weight is invisible: the deliverable prints in Arial, which ships 400 and 700 only, so 500
 * falls back to 400 - a note's bold read as ordinary text. The converter writes Word's bold runs as
 * `<b>` (weight 700 by default) and everything else as `<strong>`/Markdown `**…**`, so on this page
 * 19 of a note's 22 bold runs printed bold and 3 did not (measured 2026-09-29 on the built page:
 * `AT+QCFG="psm/urc",1`, `AT+QCFG="psm/enter",1` and `+QPSMTIMER: …` inside note 4 of
 * `AT+QCFG="psm"`, `getComputedStyle(...).fontWeight === "500"`). The mark keeps the site's 500.
 * DEC-12/DEC-16 territory: the note's ink, weight and label on a converted page follow the Word page.
 * The weight is the literal 700, not `--font-weight-bold`: the theme defines that variable as 500 for
 * Stratos, the same value that goes missing in Arial, and a converted page already states 700 literally
 * for its label lines (`word-label-line`) and note labels. */

.quectel-content.word-html-document .admonition strong,
.quectel-content.word-html-document .admonition b {
    font-weight: 700;
}

/* Every remaining non-link text surface of a converted page prints the document's own ink (DEC-16).
 *
 * The container rule above states the colour once, and inheritance cannot carry it: the site
 * paints the surfaces themselves - `.quectel-content p:not(li p)…` states the body grey
 * `#333333` on every ordinary paragraph, `.quectel-content table td` states it on every cell,
 * and `.quectel-content h1…h5` state it on the headings - so a converted page printed
 * `rgb(51, 51, 51)` where Word prints `rgb(64, 64, 64)`. Measured 2026-09-29 on the built page
 * of DEV-19025: 22 paragraphs, every table cell, the `h1`-`h3` headings and the inline `code`
 * (the theme's `#D73A49` red) computed `#333333`/red against Word's `#404040` (人工评论 679
 * "HTML文档中字体颜色不对 需通篇调整").
 *
 * The chained rule copies the site's own exemption list, so the paragraphs the site keeps its
 * colour for (a list item, a cell, a blockquote, an admonition, a centered caption) keep theirs;
 * the `:not([style*="color"])` guard is the one DEC-05 asks for (a run the source painted itself
 * keeps its colour) and `:not(.word-dark-band)` is DEC-04's red band with its white text. The
 * declarations are `!important` because the site states several of them with `!important` on
 * hand-written pages' behalf - `.quectel-content table th p` and friends - and the mark has to
 * win over the site's rules without changing them for hand-written pages.
 *
 * DEV-30686 (人工评论 7640) added the figure caption's own span to the chain. The
 * picture-and-caption pair of a converted page travels as the Sphinx figure directive
 * (DEC-26 / MD-25), and docutils prints its caption text inside a <span
 * class="caption-text"> that the site paints #666666 italic (the caption rule further
 * down). That declaration sits on the span itself, so the chain's ink on figcaption
 * and on the caption paragraph could not reach it: inheritance always loses to a
 * declaration on the element. The caption therefore reached the page in the site's
 * grey where Word prints it in the document ink - "图片过后文字变色". Naming the
 * span in the chain gives the ink the same direct declaration, and hand-written
 * pages keep the site caption style untouched.
 */
.quectel-content.word-html-document p:not(li p):not(td p):not(th p):not(blockquote p):not(.admonition p):not(.note p):not(.warning p):not(.tip p):not(.important p):not(.text-center):not([style*="color"]),
.quectel-content.word-html-document li:not([style*="color"]),
.quectel-content.word-html-document dd:not([style*="color"]),
.quectel-content.word-html-document dt:not([style*="color"]),
.quectel-content.word-html-document blockquote:not([style*="color"]),
.quectel-content.word-html-document figcaption:not([style*="color"]),
.quectel-content.word-html-document figure .caption-text:not([style*="color"]),
.quectel-content.word-html-document h1:not([style*="color"]),
.quectel-content.word-html-document h2:not([style*="color"]),
.quectel-content.word-html-document h3:not([style*="color"]),
.quectel-content.word-html-document h4:not([style*="color"]),
.quectel-content.word-html-document h5:not([style*="color"]),
.quectel-content.word-html-document h6:not([style*="color"]),
.quectel-content.word-html-document p > code:not([style*="color"]),
.quectel-content.word-html-document li > code:not([style*="color"]),
.quectel-content.word-html-document table td:not(.word-dark-band):not([style*="color"]) {
    color: var(--word-text-colour, var(--color-gray-500)) !important;
}

/* MD-76: a cell prints the document ink; everything **inside** it inherits, so a run the source
 * painted keeps its colour to the end of the run.
 *
 * The chain above names the cell (`td`) and its inline descendants because the site paints those
 * descendants too - `.quectel-content table td p` and the `td strong` / `td em` rules beside it
 * state the body grey on the elements *inside* a cell, so a rule that reached only the `td` left
 * every line of a converted table in the site's ink (the note above MD-38 measures that). What
 * must not happen is that same declaration landing on a descendant a coloured run already wraps:
 * the conversion writes a Word run word for word, and a run is a `span` of its own colour around
 * the inline elements the rest of the pass nests inside it -
 * `<span style="color:red"><span class=word-nowrap>L76-L</span> and …</span>` is one red run
 * split by a no-wrap marker.
 *
 * Stating the document ink on those descendants overrode the run's own colour: measured on
 * DEV-32220's built page, 25 such markers computed `rgb(64,64,64)` inside a `rgb(255,0,0)` run -
 * table 3's description cells, where the document marks every module difference in red
 * (人工评论 8992 「“L76-L”、“L76-LB”的字体颜色不对，应该为红色（表3有多处都是同样问题）」).
 * `inherit` is the whole fix: a descendant under no coloured ancestor takes the cell's ink (the
 * cell states it), a descendant inside a coloured run takes that run's colour, and the site's own
 * declarations still lose to the `!important`. A converted table's header cells already had this
 * treatment (MD-38's chain states `inherit` on `table.word-table th` and on its descendants); this
 * brings the body cells up to it, and a nested table's cell now inherits from its own row instead
 * of from whatever the outer cell's colour happened to be.
 *
 * The `:not([style*="color"])` guard stays: a run the source painted keeps its colour (DEC-05),
 * and the declaration it carries is what its own descendants now inherit.
 */
.quectel-content.word-html-document table td:not(.word-dark-band):not([style*="color"]) p:not([style*="color"]),
.quectel-content.word-html-document table td:not(.word-dark-band):not([style*="color"]) span:not([style*="color"]),
.quectel-content.word-html-document table td:not(.word-dark-band):not([style*="color"]) b:not([style*="color"]),
.quectel-content.word-html-document table td:not(.word-dark-band):not([style*="color"]) strong:not([style*="color"]),
.quectel-content.word-html-document table td:not(.word-dark-band):not([style*="color"]) em:not([style*="color"]),
.quectel-content.word-html-document table td:not(.word-dark-band):not([style*="color"]) i:not([style*="color"]),
.quectel-content.word-html-document table td:not(.word-dark-band):not([style*="color"]) code:not([style*="color"]) {
    color: inherit !important;
}

/* The cover title - 封面标题字号
 *
 * A converted page names itself with the `#` heading of its first section, which is the line
 * Word prints as its cover title, and Markdown carries no size. The Word size therefore travels
 * as page front matter (`word-cover-title-size`), the template puts it on the content container
 * beside the ink variable above, and the cover heading is sized from it. Measured on the
 * reference document, the delivered page printed the cover title at the theme's `h1` size
 * where Word prints it at 42pt against 10.5pt body text (DEV-18786 finding 2888).
 *
 * Only a page whose cover states its size sets the variable, and only the first section is a
 * cover, so a page that states none keeps the theme's heading size. */
/* The gap under that heading - 封面标题下方间距
 *
 * Word draws the room between the cover title and the release fields under it as the title
 * paragraph's own `margin-bottom` (`margin-top:70.2pt; margin-bottom:46.8pt` on the title of
 * `Quectel_BC65&BC92&BC95-GR_MQTT_Application_Note_V1.1`, and nothing at all on the
 * `NB-IoT Module Series` line below it). The page names itself with that title as a Markdown
 * `#` heading and drops the paragraph it came from, so the spacing went with it and the product
 * line printed 15 px under the title where Word draws ~70 pt (DEV-32193 finding 7530, 人工评论
 * "The text identifying product series is too close to the title"). The declared gap travels as
 * page front matter (`word-cover-title-gap`, same route as the size above) and is applied here;
 * only a cover that states one sets the variable, so every other page keeps `--spacing-sm`. */
.quectel-content.word-html-document > section:first-of-type > h1:first-of-type {
    font-size: var(--word-cover-title-size, var(--font-size-h1));
    margin-bottom: var(--word-cover-title-gap, var(--spacing-sm));
}

/* The same heading is the page's own name, and the header bar prints that name from the template
 * (MD-34), so a converted page printed the document title twice on page 1 - the bar's and this one
 * in the body, word for word (DEV-29651 人工评论 878 「html标题有两个重复的，建议删掉下面多余的标
 * 题」). Only the printing goes: the heading stays in the document tree, because it is what names
 * the page in `env.titles` (the left navigation and the bar both read that), what the right-side
 * On This Page lists as the root entry, and what anchors the first section. This closes DEC-08
 * 「正文里不重复生成文档名称的标题」, which so far dropped the repeat only for a derived title.
 *
 * 2026-11-08 owner: the two are NOT the same string. The body heading carries the **cover title
 * Word printed** and the header bar carries the document's **original name** (its source file
 * name, `document-name` in the page front matter, read by `layout.html`). So the hiding rule
 * below would delete a unique line rather than a repeat, and it is retired: the body keeps its
 * cover heading (sized from `--word-cover-title-size` above), and the bar names the document.
 * Measured on `Quectel_LUA300C(00)_Hardware_Design_V1.0`: cover `LUA300C (00) Hardware Design`
 * against file name `Quectel_LUA300C(00)_Hardware_Design_V1.0`. (The document *list* shows a
 * third string - the 导航显示名 confirmed at publication - which is not part of this page.)
 *
 * A page that states no `document-name` (nothing but a converted page can) still falls back
 * to Sphinx's document title, which IS the body heading - so for those pages the old rule is
 * what prevented the repeat, and short of hiding the bar there is nothing to hide. */

/* Warning/警告 - 黄色风格 */
.quectel-content .warning,
.quectel-content .admonition.warning {
    background: #FFF8E1;
    border-color: #FFC107;
}

.quectel-content .warning .admonition-title,
.quectel-content .admonition.warning .admonition-title {
    color: #F57C00;
}

.quectel-content .warning p,
.quectel-content .admonition.warning p {
    color: #F57C00;
}

.quectel-content .warning li,
.quectel-content .warning ol,
.quectel-content .warning ul,
.quectel-content .admonition.warning li,
.quectel-content .admonition.warning ol,
.quectel-content .admonition.warning ul,
.quectel-content .warning li::marker,
.quectel-content .admonition.warning li::marker {
    color: #F57C00;
}

/* Tip/提示 - 绿色风格 */
.quectel-content .tip,
.quectel-content .admonition.tip {
    background: #E8F5E9;
    border-color: #28A745;
}

.quectel-content .tip .admonition-title,
.quectel-content .admonition.tip .admonition-title {
    color: #28A745;
}

.quectel-content .tip p,
.quectel-content .admonition.tip p {
    color: #1B5E20;
}

.quectel-content .tip li,
.quectel-content .tip ol,
.quectel-content .tip ul,
.quectel-content .admonition.tip li,
.quectel-content .admonition.tip ol,
.quectel-content .admonition.tip ul,
.quectel-content .tip li::marker,
.quectel-content .admonition.tip li::marker {
    color: #1B5E20;
}

/* Important/重要 & Caution/注意 & Danger/危险 - 红色风格 */
.quectel-content .important,
.quectel-content .caution,
.quectel-content .danger,
.quectel-content .admonition.important,
.quectel-content .admonition.caution,
.quectel-content .admonition.danger {
    background: #FFEBEE;
    border-color: #DC3545;
}

.quectel-content .important li,
.quectel-content .important ol,
.quectel-content .important ul,
.quectel-content .caution li,
.quectel-content .caution ol,
.quectel-content .caution ul,
.quectel-content .danger li,
.quectel-content .danger ol,
.quectel-content .danger ul,
.quectel-content .admonition.important li,
.quectel-content .admonition.important ol,
.quectel-content .admonition.important ul,
.quectel-content .admonition.caution li,
.quectel-content .admonition.caution ol,
.quectel-content .admonition.caution ul,
.quectel-content .admonition.danger li,
.quectel-content .admonition.danger ol,
.quectel-content .admonition.danger ul,
.quectel-content .important li::marker,
.quectel-content .caution li::marker,
.quectel-content .danger li::marker,
.quectel-content .admonition.important li::marker,
.quectel-content .admonition.caution li::marker,
.quectel-content .admonition.danger li::marker {
    color: #B71C1C;
}

.quectel-content .important .admonition-title,
.quectel-content .caution .admonition-title,
.quectel-content .danger .admonition-title,
.quectel-content .admonition.important .admonition-title,
.quectel-content .admonition.caution .admonition-title,
.quectel-content .admonition.danger .admonition-title {
    color: #DC3545;
}

.quectel-content .important p,
.quectel-content .caution p,
.quectel-content .danger p,
.quectel-content .admonition.important p,
.quectel-content .admonition.caution p,
.quectel-content .admonition.danger p {
    color: #B71C1C;
}

/* 备注框内所有元素的顶部间距重置 */
.quectel-content .admonition > *:first-child,
.quectel-content .note > *:first-child,
.quectel-content .warning > *:first-child,
.quectel-content .tip > *:first-child,
.quectel-content .important > *:first-child,
.quectel-content .caution > *:first-child,
.quectel-content .danger > *:first-child {
    margin-top: 0 !important;  /* 第一个元素顶部无间距 */
}

/* 备注框内所有元素的底部间距重置 */
.quectel-content .admonition > *:last-child,
.quectel-content .note > *:last-child,
.quectel-content .warning > *:last-child,
.quectel-content .tip > *:last-child,
.quectel-content .important > *:last-child,
.quectel-content .caution > *:last-child,
.quectel-content .danger > *:last-child {
    margin-bottom: 0 !important;  /* 最后一个元素底部无间距 */
}

/* 所有备注类型的段落样式 - 缩小行间距 */
.quectel-content .admonition p,
.quectel-content .note p,
.quectel-content .warning p,
.quectel-content .tip p,
.quectel-content .important p,
.quectel-content .caution p,
.quectel-content .danger p {
    margin: 0 !important;
}

/* 多个段落之间保留适当间距。`!important` 是必需的：备注框的段落重置
   （`.quectel-content .admonition p { margin: 0 !important }`）带着 `!important`，会把这条
   普通声明压掉，所以相邻段落实际一直是 0 间距（人工要看“序号和序号段间空一行”时才发现）。 */
.quectel-content .admonition p + p,
.quectel-content .note p + p,
.quectel-content .warning p + p,
.quectel-content .tip p + p,
.quectel-content .important p + p,
.quectel-content .caution p + p,
.quectel-content .danger p + p {
    margin-top: var(--spacing-sm) !important;
}

/* 序号行与它下面的无序项属于同一组，列表因此在组内不再自己留出上方间距（人工：“序号和无序
   直接段落不需要空行，然后序号和序号段间可以空一行，形成分组的概念”）。分组只能靠间距表达：
   交付页里序号行是 `<p>`、无序项是 `<ul>`，空行与否经 MyST 解析后 DOM 完全相同（实测），
   所以“空一行”在页面上就是 margin。实测修改前：序号行到无序项 15px、无序项到下一个序号行
   1px，正好相反；现在分别是 1px 与 8px。只作用于 admonition 内部（转换页的备注），
   正文的普通“段落 + 列表”保持主题原有间距。 */
.quectel-content .admonition p + ul,
.quectel-content .admonition p + ol {
    margin-top: var(--spacing-xxs) !important;
}

.quectel-content .admonition ul + p,
.quectel-content .admonition ol + p {
    margin-top: var(--spacing-sm) !important;
}

/* Word 的 NOTE 备注块（DEC-10）。交付页把标注块作为 MyST 的 `note` admonition 输出，上面
   的规则就是它的样式；HTML 产物里标注块仍是 Word 自己的表格，由 cleaner 打上 word-note
   标记，这里给它同一个盒子。Word 用 #F2F2F2 填充、上下描红边框，人工评审读作样式失真
   （“NOTE 格式失真”），因此覆盖掉。 */
.quectel-content table.word-note {
    background: #E6F2FF !important;
    border: none !important;
    border-left: 4px solid #0066CC !important;
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0 !important;
    box-shadow: none;
}

.quectel-content table.word-note td {
    background: transparent !important;
    border: none !important;
    padding: var(--spacing-sm) !important;
    color: #0066CC;
}

.quectel-content table.word-note p {
    margin: 0 !important;
}

/* Word 的代码/示例区（OPEN-04）。交付页把它整块输出为围栏代码块，样式由主题的代码块规则给出；
   HTML 产物里它仍是 cleaner 包的表格（`table.word-code`），这里给它同一个盒子（同一套等宽字体栈、
   行高 1.7），让它读起来是代码区而不是表格。底色不在这里给：cleaner 把该块自己的填色留在行内
   （`style="background:#D9D9D9"`），原先这条规则用 `!important` 把它覆盖成主题的近白 #f6f8fa，
   交付页因此丢掉了原文的灰色底纹（人工评论 4496"函数原型的灰色底纹样式丢失"）。只作用于该表内部，
   不动页面其它内容。

   **2026-10-01 起交付页不再产出这种表**：带注释列的代码块也走围栏了（注释列用空格还原，见
   `markdown_export.COMMENT_COLUMN_GAP`，业主「word-code的可以改成 代码块么」），所以这一组规则现在
   只服务 HTML 产物（`word2html/style.css` 是它真正的对像）与任何从旧交付包构建的页面。保留而不删：
   旧包（`word2html-output-v1`）还在被构建，删掉它们那些页面的代码区会当场变成普通表格。 */
.quectel-content table.word-code {
    border: none !important;
    border-radius: 0;
    margin: var(--spacing-md) 0 !important;
    box-shadow: none;
}

/* The cells carry no fill of their own by default, and the declaration below stays *normal* on
   purpose. An author `!important` outranks a normal inline style, so writing
   `background: transparent !important` here also removed the fill the cleaner keeps inline on the
   cells (`style="background:#E5E5E5"`, the block's own shade in the source) - and a code band the
   cleaner had to split into a command and a comment column used to be delivered as this table, not
   as a fence, so the whole block printed on white while Word fills it grey (人工评论 4398 "Example
   没有底纹"). A normal declaration leaves the converted page's own fill in place and still gives the
   site's hand-written pages transparent cells. Since 2026-10-01 such a band is a fence like every
   other (which takes the theme's code-block fill), so this rule again serves only the artifacts and
   the old packages. */
.quectel-content table.word-code td {
    background: transparent;
    border: none !important;
    padding: 0 16px !important;
    font-family: 'SFMono-Regular', 'Cascadia Mono', 'DejaVu Sans Mono', 'Consolas', 'Liberation Mono', 'Courier New', 'Microsoft YaHei Mono', 'Microsoft YaHei', 'PingFang SC', monospace;
    font-size: 0.9em;
    line-height: 1.7;
    color: var(--color-gray-500);
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.quectel-content table.word-code tr:first-child td {
    padding-top: 16px !important;
}

.quectel-content table.word-code tr:last-child td {
    padding-bottom: 16px !important;
}

.quectel-content table.word-code p {
    margin: 0 !important;
}

/* Word sets a code line's comment at a tab stop, so the comments of a block start on one
   column, and the cleaner gives each line a cell of its own so the column survives
   (word_html_cleaner._wrap_code_comments). The column has to be fixed rather than
   content-sized: a table that sizes its columns from their content takes the first column's
   width from its longest command, which moves every comment off the source's column. 40 % is
   where that tab stop sits on Word's own page (measured on the reviewed document: 187.6 pt
   of a 467.4 pt block). The artifact's stylesheet states the same pair. */
.quectel-content table.word-code {
    table-layout: fixed;
}

.quectel-content table.word-code td:first-child {
    width: 40%;
}

/* A code box INSIDE a converted table's cell is not a box: it carries the same fill as the cell it
   sits in, so all it contributes is its own inset - which indents its text past the cell's other
   content. Measured on the delivered page of EG800Z-EU DFOTA 指导 (owner, 2026-10-01: 「第一列
   设置命令 怎么没有左对齐？和其他几个表格不一样，需要清理下」): 3.3.1.2's 「设置命令」 printed its ink at
   x 364 while the same label in 3.3.1.1 and 3.3.1.3 printed at 348 - the cell's own content edge -
   and the box was 55 px tall against those tables' 23 px line.

   The renderer now unwraps such a box before the page is built
   (``markdown_export._unwrap_nested_code_boxes``), so a page converted from today on has none;
   this rule stays for the packages already delivered, whose embedded HTML still carries one. It is
   scoped to a `word-table` host on purpose: measured over the delivered corpus, 46 code boxes sit
   inside another table and 44 of them state the same fill as the cell around them (`#d9d9d9` in a
   `#D9D9D9` cell), so flattening hides nothing - the 2 that differ sit in a `word-note` panel
   (`#F2F2F2`), where the box IS a band. */
.quectel-content table.word-table table.word-code {
    margin: 0 !important;
}

.quectel-content table.word-table table.word-code td {
    padding: 0 !important;
}

/* ========================================
   Table Styles - 表格样式 (基于 Quectel Brand Design Demo)
   ======================================== */

/* 通用表格样式 - 适用于所有Sphinx生成的表格 */
.quectel-content table,
.quectel-content table.docutils,
.quectel-content table.colwidths-auto,
.quectel-content table.align-default {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    table-layout: auto;
}

/* 表头样式 - 最高优先级确保红色显示。
   转换页除外：`:not(.word-html-document)` 让这条风格指南规则不再作用在转换页上，
   转换页的表头底纹与墨色由源文档决定（DEC-04 / 人工评论 4912、finding 881），
   站点手写页与飞书页不受影响（它们的内容容器不带 word-html-document 标记）。 */
.quectel-content:not(.word-html-document) table th,
.quectel-content:not(.word-html-document) table.docutils th,
.quectel-content:not(.word-html-document) table.colwidths-auto th,
.quectel-content:not(.word-html-document) table.align-default th,
.quectel-content:not(.word-html-document) table.spec-table th,
.quectel-content:not(.word-html-document) table th.head,
.quectel-content:not(.word-html-document) .spec-table.docutils.align-default th,
.quectel-content:not(.word-html-document) table.spec-table.docutils.align-default th,
.quectel-content:not(.word-html-document) .spec-table.docutils.align-default th.head,
.quectel-content:not(.word-html-document) table.spec-table.docutils.align-default th.head {
    background: var(--color-gray-100) !important;
    color: var(--color-secondary) !important; /* Quectel红色 #E31E24 */
    padding: var(--spacing-sm) var(--spacing-md) !important;
    text-align: left !important;
    font-weight: var(--font-weight-semibold) !important;
    border: 1px solid var(--color-gray-200) !important; /* 表头单元格有边框 */
    font-size: var(--font-size-body) !important;
    line-height: var(--line-height-normal) !important;
}

/* 确保表头内的 p 和 strong 标签也显示红色 - 最高优先级（转换页除外，见上） */
.quectel-content:not(.word-html-document) table th p,
.quectel-content:not(.word-html-document) table.docutils th p,
.quectel-content:not(.word-html-document) table.colwidths-auto th p,
.quectel-content:not(.word-html-document) table.align-default th p,
.quectel-content:not(.word-html-document) table.spec-table th p,
.quectel-content:not(.word-html-document) table th.head p,
.quectel-content:not(.word-html-document) .spec-table.docutils.align-default th.head p,
.quectel-content:not(.word-html-document) table.spec-table.docutils.align-default th.head p,
.quectel-content:not(.word-html-document) table th strong,
.quectel-content:not(.word-html-document) table.docutils th strong,
.quectel-content:not(.word-html-document) table.colwidths-auto th strong,
.quectel-content:not(.word-html-document) table.align-default th strong,
.quectel-content:not(.word-html-document) table.spec-table th strong,
.quectel-content:not(.word-html-document) table th.head strong,
.quectel-content:not(.word-html-document) .spec-table.docutils.align-default th.head strong,
.quectel-content:not(.word-html-document) table.spec-table.docutils.align-default th.head strong {
    color: var(--color-secondary) !important; /* Quectel红色 #E31E24 */
    font-weight: var(--font-weight-semibold) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 专门针对 th.head 类的样式强化 - 增加更多选择器覆盖。

   转换页除外（`:not(.word-html-document)`，与上面「表头样式」两组规则同一口径）：
   这组规则带着 `background: … !important`，而 author `!important` **压得过内联声明**，
   于是它会把手写页的表头风格刷到转换页的表头上 —— 实测一个内嵌转换表（`table.word-table`，
   单元格内联 `background:#D9D9D9`）的表头计算成站点浅灰 `rgb(245,245,245)`，源底纹被吃掉
   （2026-10-02 探针页；全语料 5948 个内嵌转换表里 2636 个带被转换器提升的 `th`）。
   转换页的两半各有归属：内嵌转换表保留 Word 的底纹与墨色，管道表走站点红色表头
   （见 `.quectel-content.word-html-document table:not(.word-table)` 那条）。

   原先还有三条不带容器的选择器（`.docutils th.head` / `table.docutils th.head` /
   `table.align-default th.head`）；它们对同页 `.quectel-content` 里的表格是重复命中，
   却正是把手写页风格漏到转换页的那条路，已并入带容器前缀的写法。 */
.quectel-content:not(.word-html-document) table th.head,
.quectel-content:not(.word-html-document) table.docutils th.head,
.quectel-content:not(.word-html-document) .docutils th.head,
.quectel-content:not(.word-html-document) th.head {
    color: var(--color-secondary) !important; /* 确保红色显示 #E31E24 */
    font-weight: var(--font-weight-semibold) !important;
    background: var(--color-gray-100) !important;
}

/* 修复表头内部的 p 和 strong 标签颜色继承问题（转换页除外，同上） */
.quectel-content:not(.word-html-document) table th.head p,
.quectel-content:not(.word-html-document) table.docutils th.head p,
.quectel-content:not(.word-html-document) .docutils th.head p,
.quectel-content:not(.word-html-document) th.head p,
.quectel-content:not(.word-html-document) table th.head strong,
.quectel-content:not(.word-html-document) table.docutils th.head strong,
.quectel-content:not(.word-html-document) .docutils th.head strong,
.quectel-content:not(.word-html-document) th.head strong {
    color: var(--color-secondary) !important; /* 确保红色显示 #E31E24 */
    font-weight: var(--font-weight-semibold) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 针对原始HTML表格（无class）的表头样式 */
.quectel-content table:not([class]) th {
    background: var(--color-gray-100);
    color: var(--color-secondary) !important; /* Quectel红色 #E31E24 */
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    font-weight: var(--font-weight-semibold);
    border: 1px solid var(--color-gray-200);
    font-size: var(--font-size-body);
    line-height: var(--line-height-normal);
}

.quectel-content table:not([class]) th strong {
    background: transparent;
    color: var(--color-secondary) !important;
    padding: 0;
    border: none;
}

/* 针对原始HTML表格（无class）的单元格样式 */
.quectel-content table:not([class]) td {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-gray-200) !important;
    vertical-align: middle;
    line-height: var(--line-height-normal);
}

/* 表格单元格样式 */
.quectel-content table td,
.quectel-content table.docutils td,
.quectel-content table.colwidths-auto td,
.quectel-content table.align-default td {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-gray-200) !important;
    vertical-align: middle;
    line-height: var(--line-height-normal);
}

.quectel-content table th {
    vertical-align: middle;
}

/* Feishu tables use wrapper divs and edge <br> elements for cell alignment. */
.quectel-content table th > div,
.quectel-content table td > div {
    margin: 0;
}

.quectel-content table th > div > br:first-child,
.quectel-content table th > div > br:last-child,
.quectel-content table td > div > br:first-child,
.quectel-content table td > div > br:last-child {
    display: none;
}

/* Keep multi-column table images inside their cells instead of stretching rows.

   ``width: auto`` here also threw away the size a picture *states*. Word writes the size it
   prints each table picture at into the export (``width="101" height="92"`` on all four module
   pictures of a compatible-design table), and a resolution upgrade of the raster behind that
   attribute is the same picture drawn sharper, not a bigger one - so forcing the natural width
   printed the two upgraded pictures at 263 px beside two 101 px ones, on a table Word drew at
   one size (人工评论 6210: 「HTML中这两个图片过大，需要修改，同另外两张图保持同等大小」).
   A stated width is the layout the source wrote, so it stands; the auto sizing and the row cap
   below are for the pictures that state nothing, which is what the rule was written for. */
.quectel-content table th img,
.quectel-content table td img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.quectel-content table th img:not([width]),
.quectel-content table td img:not([width]) {
    width: auto;
    max-height: 240px;
}

/* 表格链接样式 */
.quectel-content table a,
.quectel-content table.docutils a,
.quectel-content table.colwidths-auto a,
.quectel-content table.align-default a {
    color: var(--color-primary); /* Quectel蓝色 #0066CC */
    text-decoration: none;
    transition: color var(--transition-fast);
}

.quectel-content table a:hover,
.quectel-content table.docutils a:hover,
.quectel-content table.colwidths-auto a:hover,
.quectel-content table.align-default a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* 产品规格表样式 - 特殊的两列布局（如附件所示）*/
.quectel-content table.spec-table,
.quectel-content table.product-specs {
    max-width: 800px;
    margin: var(--spacing-lg) 0;
    table-layout: fixed;
}

/* 规格表第一列（类别列）- 灰色背景 */
.quectel-content table.spec-table td:first-child,
.quectel-content table.product-specs td:first-child {
    background: var(--color-gray-100);
    font-weight: var(--font-weight-medium);
    color: var(--color-gray-500);
    width: 40%; /* 固定宽度比例 */
    white-space: nowrap;
}

/* 规格表第二列（特性列）- 白色背景 */
.quectel-content table.spec-table td:last-child,
.quectel-content table.product-specs td:last-child {
    background: var(--color-white);
    color: var(--color-gray-500);
    width: 60%; /* 固定宽度比例 */
}

/* ========================================
   原始HTML表格兼容性样式 - 自动应用产品规格表样式
   ======================================== */
/* 为所有没有CSS类的原始HTML表格应用规格表样式 */
.quectel-content table:not([class]) {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    max-width: 100%;
    table-layout: auto;
}

/* 原始HTML表格的表头样式 */
.quectel-content table:not([class]) th {
    background: var(--color-gray-100) !important;
    color: var(--color-secondary) !important; /* Quectel红色 #E31E24 */
    padding: var(--spacing-sm) var(--spacing-md) !important;
    text-align: left !important;
    font-weight: var(--font-weight-semibold) !important;
    border: 1px solid var(--color-gray-200) !important;
    font-size: var(--font-size-body) !important;
    line-height: var(--line-height-normal) !important;
}

/* 原始HTML表格的单元格样式 */
.quectel-content table:not([class]) td {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-gray-200);
    vertical-align: middle;
    line-height: var(--line-height-normal);
}

/* 原始HTML表格第一列（类别列）- 仅为spec表格设置灰色背景 */
.quectel-content table:not([class]) td:first-child {
    /* 移除默认的灰色背景，让所有列保持一致 */
    background: inherit;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    white-space: normal;
}

/* 原始HTML表格第二列（特性列）- 白色背景 */
.quectel-content table:not([class]) td:last-child {
    background: inherit;
    color: var(--color-text);
}

/* 原始HTML表格中的<br>标签处理 */
.quectel-content table:not([class]) td br {
    line-height: 1.6;
}

/* 原始HTML表格的链接样式 */
.quectel-content table:not([class]) a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.quectel-content table:not([class]) a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* 响应式表格 - 窄栏自适应
 *
 * 窄栏下表格用更小的字号和更紧的内边距，但表格本身照常按内容排布、单元格照常换行：
 * 版面能收多窄就收多窄，尽量不出现横向滚动条。
 *
 * 这里刻意不写 `display: block; overflow-x: auto; white-space: nowrap; min-width: 120px`。
 * 那一组声明让每个单元格至少 120 px 宽且不许换行，于是只要表格超过四列就必然出现横向
 * 滚动条：正文被推出可视区，整页截图也会被裁掉（「普通页面也是需要尽量不出现水平滚动条」、
 * 「避免出现水平滚动条，不方便后续AI校对的时候截图不全」）。
 *
 * 真正收不进去的表格（一行里带长命令、长 URL，断词也收不下）由 `initResponsiveTables`
 * 包出来的 `.table-wrapper` 自己横向滚动：那是元素级滚动，不会把整页顶出横向滚动条，
 * 读者照样能看完整张表，也不影响整页截图。 */
@media (max-width: 768px) {
    .quectel-content table,
    .quectel-content table.docutils,
    .quectel-content table.colwidths-auto,
    .quectel-content table.align-default,
    .quectel-content table.spec-table,
    .quectel-content table.product-specs {
        font-size: var(--font-size-small);
    }

    .quectel-content table th,
    .quectel-content table td {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    /* A converted table has to be told the same thing, and with `!important`, because its own cell
       clearance is stated globally with `!important` (see the `word-table` block below). Without
       this the narrow column keeps 12px each side, and 12px is 24px of every column - which is
       what holds a many-column grid's minimum width above the column.

       Measured on Quectel_4G_Antenna_YE0012AA_Datasheet_V4.5, whose "Electrical - Detail" table
       carries 13 columns: at 12px it needs 773px, so inside the A4 preview's 722px text column it
       scrolled by 51px - the small horizontal scrollbar the review kept seeing ("这里 切到这种A4
       宽度的时候，表格还有一点点自适应不好，存在了一点水平滚动条"). At this block's 8px it needs
       669px and fits with 53px to spare, in the A4 preview (526/620 px frames) and on a real narrow
       screen alike. The 10px that would just barely fit (721px against 722px) is too close to rely
       on, which is why the block's own token value is used rather than a new number.

       The vertical clearance does not move: `--spacing-xs` is 6px, the same as the `word-table`
       rule states, so the row height the earlier review settled on is unchanged. Only the
       horizontal clearance tightens, and only at this breakpoint. */
    .quectel-content table.word-table th,
    .quectel-content table.word-table td {
        padding: var(--spacing-xs) var(--spacing-sm) !important;
    }
}

/* 列表样式 */
.quectel-content .admonition ul,
.quectel-content .admonition ol,
.quectel-content .note ul,
.quectel-content .note ol,
.quectel-content .warning ul,
.quectel-content .warning ol,
.quectel-content .tip ul,
.quectel-content .tip ol,
.quectel-content .important ul,
.quectel-content .important ol,
.quectel-content .caution ul,
.quectel-content .caution ol,
.quectel-content .danger ul,
.quectel-content .danger ol {
    margin-bottom: 0;
    line-height: 1.4;
}

/* Strong 标签继承父元素颜色 */
.quectel-content .admonition strong,
.quectel-content .note strong,
.quectel-content .warning strong,
.quectel-content .tip strong,
.quectel-content .important strong,
.quectel-content .caution strong,
.quectel-content .danger strong {
    font-weight: var(--font-weight-semibold);
}

/* ========================================
   Images - 图片样式
   ======================================== */
.quectel-content img {
    max-width: 100%;  /* 自适应，不超过容器宽度 */
    height: auto;     /* 保持宽高比 */
    margin: var(--spacing-md) auto;  /* 减小上下间距，更紧凑 */
    display: block;
    border-radius: var(--radius-md);
    box-shadow: none;
    cursor: zoom-in;
}

/* 没有 width 属性的图片，使用 auto 宽度，并限制最大高度防止图片过高 */
.quectel-content img:not([width]) {
    width: auto;       /* 不强制拉伸宽度 */
    height: auto;      /* 默认高度自适应 */
    max-width: 100%;   /* 不超出容器宽度 */
    max-height: min(500px, 60vh);  /* 防止图片高度过高，与页面文字比例失调 */
    object-fit: contain;  /* 确保在任何约束下都保持原始长宽比 */
}

/* 行内图标（CLN-ICO-01）：图标与它所在的文字同一行。`display:inline` 的标记写在 `<img style>`
   上，而交付页的构建（MyST 的 `html_image`）会把 Markdown 行里的 `<img>` 重读成图片节点，
   只留 src/alt/width/class、丢掉 `style`——图标于是照 `.quectel-content img` 印成居中的独立
   图片块，脱出了它所在的那一行（DEV-34310 人工评论 9415：「图标存在文字段落行里面的场景，
   图标的图片样式不要按照单独图片样式来显示，需要按照和文本行一样」）。导出器同时写
   `img.word-inline-icon` 与外层 raw HTML `<span class="word-inline-icon-wrap">`（MD-96 /
   MD-103）。包装层保证 class 不因构建器把裸图片重读成图片节点而丢失，下面两条规则把行内
   排布画回来：与文字同行、按基线居中、不带图片块的上下间距。 */
.quectel-content img.word-inline-icon {
    display: inline;
    vertical-align: middle;
    margin: 0;
}

.quectel-content span.word-inline-icon-wrap {
    display: inline;
}

.quectel-content span.word-inline-icon-wrap > img {
    display: inline;
    vertical-align: middle;
    margin: 0;
}

/* Word 把 NOTE 图标浮在注记框上沿、靠框的左边缘；页面自己的图片规则（上面的
   ``.quectel-content img``）给每张图 ``margin: … auto``，图标于是在框里居中，人工评审读作
   「NOTE 的图标位置不正确，要和 PDF 一样的形式」（DEV-14936 人工评论 890）。图标仍单独占一行
   （Word 的位图就印在注记文字上方），但和 Word 页一样从框的文字列起排，而不是从中间起排。 */
.quectel-content .note-icon img {
    margin-left: 0;
    margin-right: 0;
}

/* 飞书白板导出的流程图需要优先保证可读性，不沿用普通图片的限高策略 */
.quectel-content img[src*="board_"] {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    object-fit: contain;
}

@media (max-width: 768px) {
    /* 移动端图片高度进一步限制，避免单张图片占满屏幕 */
    .quectel-content img:not([width]) {
        max-height: min(260px, 40vh);
        max-width: 100%;
        object-fit: contain;  /* 保持长宽比 */
    }

    .quectel-content img[src*="board_"] {
        max-height: none !important;
    }
}

/* 存量文档兜底（DEV-32236 / t288700）：旧版 feishu2md 对分栏/表格内无尺寸图片烘焙了
   style="width: 100%; height: auto;"，把小图拉满单元格（「平铺」主诉）。转换器已修复
   （新转换不再产出），但存量 Markdown 工件里还在。内联样式压过 img:not([width]) 的
   width:auto，这里用 !important 把它顶回去：重新构建即恢复自然尺寸，无需重新转换。
   max-width:100%（列宽钳制）与各限高规则不受影响、继续生效。
   :not(.pdf-page-image) 把 word2html 的图纸/正文页图片排除——它们的
   style="display:block;width:100%;height:auto;" 靠 width:100% 与 .pdf-sheet 容器
   等宽（字符层按容器百分比定位），光栅今天恰好总宽于容器故未回归，但那是数值巧合
   不是守护（review P2-2），显式排除后不再依赖巧合。 */
.quectel-content img[style*="width: 100%"]:not(.pdf-page-image),
.quectel-content img[style*="width:100%"]:not(.pdf-page-image) {
    width: auto !important;
}

/* 图纸页（``.pdf-sheet``，由 ``word2html.md_to_sphinx.write_pdf_embed_page`` 生成）：
   让 A4 横向图纸脱离 1215px 的正文字列。

   判据来自图纸自己的文字层：最小的 5pt 网络标签约 0.594 cqw（``PDF_TEXT_LAYER_STYLE``），
   所以标签字高 = 图纸显示宽度 x 0.594%。1215px 列宽下只有 7.2px（反馈「几乎没有可读性」），
   1900px 才是 11.3px 的可读下限；``calc(100vw - 2rem)`` 保证窄屏不横向溢出。

   用 ``margin-left:50% + translateX(-50%)`` 出血，而不是改 ``.quectel-content`` 的
   ``max-width``：图纸页会被 ``{include}`` 拼进 Word 页，父容器是 ``.word-html-document``，
   改父容器会把整篇正文一起拉宽。 */
.quectel-content .pdf-sheet {
    width: min(1900px, calc(100vw - 2rem));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
    cursor: zoom-in;
}

/* 左侧「文档列表」展开时，那 1900px 的出血上限必须扣掉导航宽度，否则图纸比正文列还宽。

   实测（2026-11-07，1223px 视口，`49f23c28` 的 FGS060N 参考设计）：导航折叠时正文列 1206px、
   图纸 1191px 正好放下；**展开后正文列只剩 926px（left 281 → right 1207），图纸仍按
   `100vw - 2rem` 算成 1191px（left 149 → right 1340）**，右侧 133px 越出正文列并被
   `.quectel-main` 的 `overflow-x: clip` 裁掉 —— 反馈的「展开导航后部分设计图被遮罩」。

   限定在 `min-width: 1201px`：三栏 grid 只在该断点存在（`official-site-shell-bridge.css`）。
   更窄时左侧导航是堆叠/抽屉，不占列宽，减掉它反而会把图纸压窄（对比窗的 794px A4 画布就是
   这种情形，那里没有列可减）。

   还限定在 `[data-official-document-region]` 之内：只有官方文档外壳把导航排成 grid 列。
   没有该外壳的页面（独立的图纸页、构建到临时目录的验证页）根本没有导航占位，减掉
   `--contents-width` 只会让图纸白白变窄。 */
@media (min-width: 1201px) {
    body:not(.contents-collapsed)
        [data-official-document-region="true"]
        .quectel-content
        .pdf-sheet {
        width: min(1900px, calc(100vw - var(--contents-width) - 2rem));
    }
}

/* 图纸不是文字：任何 max-height 夹取都会变形或裁切。 */
.quectel-content .pdf-sheet .pdf-page-image {
    max-height: none;
    object-fit: contain;
}

/* 窄屏仍等比缩小（不回退成裁切），可读性交给点击浮层。 */
@media (max-width: 768px) {
    .quectel-content .pdf-sheet {
        width: calc(100vw - 1rem);
    }
}

.quectel-content .figure {
    text-align: center;
    margin: var(--spacing-md) 0;  /* 减小上下间距 */
}

.quectel-content figure.word-composite-figure {
    width: fit-content;
    max-width: 100%;
    margin: var(--spacing-md) auto;
    text-align: center;
}

.quectel-content .word-picture-labels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
}

.quectel-content .word-picture-labels > span {
    min-width: 0;
    text-align: center;
}

.quectel-content .figure img {
    margin: 0 auto;
}

.quectel-content .caption,
.quectel-content .figure .caption,
.quectel-content figure figcaption p,
.quectel-content figure .caption-text {
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--color-gray-400);
    line-height: 1.5;
    margin-top: var(--spacing-sm);
    font-style: italic;
    /* 支持文字换行显示 */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* A figure the build itself produced - ``:::{figure}``, which is how a converted page's picture
   and the caption under it travel (``markdown_export._figure_directive``). docutils prints the
   caption as a ``<span class="caption-text">`` inside the ``<figcaption>``, a shape the two
   selectors in the rule above do not name, and the converted page's paragraph rule is the long
   ``:not()`` chain whose specificity (0,6,14) sets ``text-align: left`` on that paragraph - so
   the caption reached the page as body text, flush left at the body size, on a figure the theme
   otherwise styled. ``!important`` for the same reason ``.text-justify`` needed it: no selector
   naming a caption can reach the chain's specificity. */
.quectel-content figure figcaption,
.quectel-content figure figcaption p,
.quectel-content figure .caption-text {
    text-align: center !important;
}

/* 反馈「下面的文本备注也很小」：转换页的图注走 ``--font-size-xs``（12px），比 15px 正文小
   20%。图注仍是灰斜体（设计意图），只把字号还给正文。作用域限定 ``.word-html-document``：
   站内手写页的图注保持现状。``!important`` 不需要——上面的规则只锁对齐，字号由本条更高的
   特异性胜出。 */
.quectel-content.word-html-document figure figcaption,
.quectel-content.word-html-document figure figcaption p,
.quectel-content.word-html-document figure .caption-text {
    font-size: var(--font-size-body);
    line-height: var(--line-height-normal);
}

/* ========================================
   Lists - 列表样式
   ======================================== */
.quectel-content ul,
.quectel-content ol {
    margin-bottom: var(--spacing-xs);  /* 6px，极其紧凑 */
    padding-left: var(--spacing-md);   /* 18px，更紧凑 */
    line-height: 1.6;    /* 更紧凑的行高 */
}

.quectel-content li {
    margin-bottom: var(--spacing-xxs);  /* 1px，极其紧凑 */
    color: var(--color-gray-500);
}

/* 列表项内的段落，去除多余间距。
   A list item's paragraph keeps the browser's own `p { margin: 1em }`: the body paragraph rule
   below states its margins through a `:not(li p)` chain, so nothing author-side reached these
   paragraphs and only their bottom margin was ever zeroed. At the body size that leftover is
   15px above every item - measured on the delivered page, one line of nested list text occupies
   a 39px box (24px line + 15px) instead of the 24.75px line pitch body text uses, which is the
   "二级无序/有序列表间距样式需要紧凑些，可以和正文相同" the reviewer reported. Zeroing the top
   margin puts the item pitch at 24 + 1 = 25px, level with the body text.
   docutils wraps list item content in a `<p>` on every page (`<ul class="simple"><li><p>…`), so
   this is site-wide rather than a converted-page quirk. */
.quectel-content li > p {
    margin-top: 0;     /* 移除浏览器默认的 1em 顶部间距 */
    margin-bottom: 0;  /* 移除列表项内段落的底部间距 */
}

/* 如果列表项内有多个段落，给中间的段落一些间距 */
.quectel-content li > p + p {
    margin-top: var(--spacing-xxs);  /* 1px */
}


/* 列表之后的段落接着列表自己的节奏，不再叠加段落的上边距（人工评论 9045，DEV-32260 修复轮 3，
   Quectel_BC92_Software_Notes_and_FAQs_V1.0，原 PDF 第 9 页 2.3.1）：「Line spacing between the
   bullet points and the next paragraph is too wide. Please reduce the spacing」。
   Word 在原文里用空段落（`p.word-gap`）分开这两条项目，也用它分开项目与下一段；DEC-25 已决定
   这类紧邻列表的作者空行不交付，块间距由主题给。而主题自己的口径是「列表项与正文同一行距」
   （上面那条 `li > p` 把列表项内段落的 1em 上边距清零，项目行距 = 正文行距 23.1px），列表之后
   的普通段落却仍吃浏览器默认的 `p { margin-top: 1em }`：末条项目到该段首行 37px，是项目行距的
   1.6 倍，列表看着紧凑、下一段被推开，评审读成「间距太大」。
   转换页上紧跟列表的段落按列表自己的间距继续（列表自身的 6px 下边距保留，末条项目到该段首行
   29px ≈ 1.26 倍行距），与列表内部同一节奏。站内手写页不受影响（选择器限定
   `word-html-document`）；制品的 cleaned HTML 页（`word2html/style.css`）保留 Word 自己的段距，
   那是产物页不是交付页。 */
.quectel-content.word-html-document ul + p,
.quectel-content.word-html-document ol + p,
.quectel-content .word-html-document ul + p,
.quectel-content .word-html-document ol + p {
    margin-top: 0;
}


/* 同一节奏的另一半：被段落收尾的列表也不再留自己的 6px 下边距，末条项目到该段首行与项目行距
   相等（实测 23.1px 行距下：改前 39px = 1.69 倍，只去段落上边距 31px = 1.34 倍，两处都去掉
   26px = 1.13 倍）。`:has()` 主题已在使用；列表之后是标题、表格、备注框等其它块时不动。 */
.quectel-content.word-html-document ul:has(+ p),
.quectel-content.word-html-document ol:has(+ p),
.quectel-content .word-html-document ul:has(+ p),
.quectel-content .word-html-document ol:has(+ p) {
    margin-bottom: 0;
}

.quectel-content ul ul,
.quectel-content ol ol,
.quectel-content ul ol,
.quectel-content ol ul {
    margin-top: var(--spacing-xxs);     /* 1px */
    margin-bottom: var(--spacing-xxs);  /* 1px */
}

/* A converted page takes the site's own list styling, so a bullet list draws the browser's own
   markers - ``disc``, then ``circle`` for a nested list - instead of Word's symbol-font shapes
   (U+26AB on a first-level item, U+2713 on a second-level one). The delivery contract keeps
   Word's content, not its bullet geometry (decision DEC-03 in
   word2html/references/FORMAT_CHECKLIST.md; owner 2026-10-04「不用保留Word这种特殊的形状，走MD的sphinx
   统一样式」). */
/* 人工评论 4918: "希望能区分一二级有序或无序列表，这样视觉上更友好些". A nested ordered list
   kept the same marker as its parent, so a sub-enumeration read as a continuation of the outer
   one; the second level now counts in letters and the third in roman numerals, which is the
   convention Word's own list templates use. */
.quectel-content.word-html-document ol ol {
    list-style-type: lower-alpha;
}

.quectel-content.word-html-document ol ol ol {
    list-style-type: lower-roman;
}

.quectel-content.word-html-document ul ol,
.quectel-content.word-html-document ol ul {
    list-style-type: disc;
}

/* A lettered Word parent is carried as text inside a Markdown list item so its numbered
   children can be a real nested list. Hide only that synthetic parent marker and retain the
   children as numbers instead of the mixed-list bullet above. */
.quectel-content.word-html-document ul.word-numbered-parent,
.quectel-content .word-html-document ul.word-numbered-parent {
    list-style: none;
    margin: 0;
    padding: 0;
}

.quectel-content.word-html-document ul.word-numbered-parent > li > ol,
.quectel-content .word-html-document ul.word-numbered-parent > li > ol {
    list-style-type: decimal;
}

/* ========================================
   Blockquote - 引用样式
   ======================================== */
.quectel-content blockquote {
    border-left: 4px solid var(--color-primary);
    background: var(--color-gray-100);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border-radius: var(--radius-sm);
    color: var(--color-gray-400);
    font-style: italic;
}

/* ========================================
   Definition List - 定义列表
   ======================================== */
.quectel-content dl dt {
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-500);
    margin-top: var(--spacing-sm);
}

.quectel-content dl dd {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--color-gray-400);
}

/* ========================================
   Horizontal Rule - 分隔线
   ======================================== */
.quectel-content hr {
    border: none;
    border-top: 2px solid var(--color-gray-200);
    margin: var(--spacing-xl) 0;
}

/* ========================================
   Buttons - 按钮样式
   ======================================== */
.quectel-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
    text-decoration: none;
    min-width: 140px;
}

.quectel-btn-primary {
    background-color: var(--color-primary);
    color: #FFFFFF;
    border-color: var(--color-primary);
}

.quectel-btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    box-shadow: 0 8px 18px rgba(0, 102, 204, 0.18);
    transform: translateY(-1px);
    text-decoration: none;
    color: #FFFFFF;
}

.quectel-btn-secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.quectel-btn-secondary:hover {
    background-color: var(--color-primary-lighter);
    color: var(--color-primary-dark);
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(0, 102, 204, 0.12);
    transform: translateY(-1px);
}

.quectel-btn:focus-visible,
.quectel-btn-primary:focus-visible,
.quectel-btn-secondary:focus-visible,
.quectel-btn-prev:focus-visible,
.quectel-btn-next:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.18);
}

.quectel-btn:disabled,
.quectel-btn[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Page Navigation Buttons */
.quectel-page-nav {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xxl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--color-gray-200);
}

.quectel-btn-prev,
.quectel-btn-next {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-white);
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.quectel-btn-prev:hover,
.quectel-btn-next:hover {
    background: var(--color-secondary);
    color: var(--color-white);
}

.quectel-btn-icon {
    font-weight: var(--font-weight-bold);
}

/* ========================================
   Footer - 页脚
   ======================================== */
.quectel-footer {
    background: #000000;
    color: #ffffff;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: 0;
    width: 100%;
    clear: both;
    position: relative;
    z-index: 101; /* Higher than content and on this page z-index: 100 */
    flex-shrink: 0;
}

.quectel-footer-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.quectel-footer-section h4 {
    color: #a0a0a0;
    margin-bottom: var(--spacing-md);
    margin-top: 0;
    font-size: 14px;
    font-weight: var(--font-weight-normal);
}

.quectel-footer-section p {
    color: #ffffff;
    font-size: 14px;
    line-height: var(--line-height-relaxed);
}

.quectel-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quectel-footer-links li {
    margin-bottom: 8px;
}

.quectel-footer-links a {
    color: #ffffff;
    font-size: 14px;
    text-decoration: none;
    transition: color var(--transition-normal);
}

.quectel-footer-links a:hover {
    color: #cccccc;
}

.quectel-footer-bottom {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md) 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0a0;
    font-size: 14px;
}

.quectel-footer-bottom p {
    margin: 8px 0;
}

/* ========================================
   Responsive Design - 响应式设计
   ======================================== */

/* 大屏幕优化三栏布局 */
@media (min-width: 1400px) {
    :root {
        --contents-width: 320px; /* 左侧目录导航稍微增加宽度 */
        --on-this-page-width: 300px; /* 右侧导航稍微增加宽度 */
    }
}

@media (max-width: 1024px) {
    :root {
        --contents-width: 280px;
        --on-this-page-width: 260px; /* 中等屏幕下减少右侧导航宽度 */
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-h1: 32px;
        --font-size-h2: 28px;
        --font-size-h3: 24px;
        --font-size-h4: 20px;
        --font-size-body: 14px;
    }
    
    /* 移动端背景遮罩层 */
    .quectel-contents-overlay {
        display: block; /* 移动端显示遮罩层 */
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition-normal), visibility var(--transition-normal);
    }
    
    .quectel-contents-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .quectel-contents {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        /* 在移动端保持 flex 布局 */
        display: flex;
        flex-direction: column;
        /* 提高移动端z-index，确保目录导航在遮罩层之上 */
        z-index: 1002;
    }
    
    .quectel-contents.open {
        transform: translateX(0);
        /* 移动端 open 状态完全覆盖 collapsed 状态（collapsed 是桌面端折叠逻辑） */
        width: var(--contents-width) !important;
        min-width: var(--contents-width) !important;
        overflow: visible !important;
    }
    
    /* 移动端目录区域调整 */
    .quectel-toc {
        /* 移动端也自适应高度，但设置一个合理的最大值 */
        max-height: 70vh;
    }
    
    .quectel-toc-title {
        padding: var(--spacing-sm) var(--spacing-md) var(--spacing-xs);
        font-size: var(--font-size-small); /* 移动端标题稍小一些 */
    }
    
    .quectel-toc > ul {
        padding: var(--spacing-xs) var(--spacing-md) var(--spacing-sm);
    }
    
    .quectel-main {
        margin-left: 0;
        margin-top: var(--header-height);
        max-width: 100%;
        /* padding: var(--spacing-md); */
        /* 移动端也需要考虑header高度 */
        min-height: calc(100vh - var(--header-height));
    }
    
    /* 移动端内容标题栏调整 */
    .quectel-content-header {
        left: 0; /* 移动端占满整个宽度 */
        right: 0; /* 移动端右侧边栏隐藏，标题栏延伸到右边缘 */
        padding: 0 var(--spacing-md);
        /* 左侧为 contents-toggle 按钮留出空间（按钮位于 left: spacing-lg，宽24px） */
        padding-left: calc(var(--spacing-lg) + 24px + var(--spacing-sm));
        font-size: var(--font-size-small);
        /* 移动端标题栏在侧边栏(1002)和遮罩层(1001)之上，确保可点击 */
        z-index: 1003;
    }
    
    /* 移动端：侧边栏从标题栏下方开始显示，不覆盖顶部按钮 */
    .quectel-contents {
        top: calc(var(--header-height) + var(--toc-title-height));
        height: calc(100vh - var(--header-height) - var(--toc-title-height));
    }
    
    .quectel-content table {
        font-size: var(--font-size-small);
    }
    
    .quectel-content pre code {
        font-size: 12px;
    }
    
    .quectel-page-nav {
        flex-direction: column;
    }
}

/* ========================================
   Utility Classes - 工具类
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

/* ========================================
   Selectable Titles - 可选中的标题样式
   基于 Demo 的 Typography 设计
   ======================================== */
/* 可选中的标题基础样式 */
.quectel-content h1,
.quectel-content h2,
.quectel-content h3,
.quectel-content h4,
.quectel-content h5 {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* 标题下划线动画效果 */
.quectel-content h1::after,
.quectel-content h2::after,
.quectel-content h3::after,
.quectel-content h4::after,
.quectel-content h5::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary); /* 红色 #E31E24 */
    transition: width 0.3s ease;
}

/* 悬停效果 */
.quectel-content h1:hover,
.quectel-content h2:hover,
.quectel-content h3:hover,
.quectel-content h4:hover,
.quectel-content h5:hover {
    color: var(--color-secondary); /* 红色 */
}

/* 选中状态 */
.quectel-content h1.selected,
.quectel-content h2.selected,
.quectel-content h3.selected,
.quectel-content h4.selected,
.quectel-content h5.selected {
    color: var(--color-secondary); /* 红色 */
}

.quectel-content h1.selected::after,
.quectel-content h2.selected::after,
.quectel-content h3.selected::after,
.quectel-content h4.selected::after,
.quectel-content h5.selected::after {
    width: 100%;
}

/* 添加悬停提示样式 */
.quectel-content h1[title],
.quectel-content h2[title],
.quectel-content h3[title],
.quectel-content h4[title],
.quectel-content h5[title] {
    cursor: pointer;
}

/* ========================================
   Print Styles - 打印样式
   ======================================== */
@media print {
    .quectel-contents,
    .quectel-footer,
    .quectel-page-nav {
        display: none;
    }
    
    .quectel-main {
        margin-left: 0;
        max-width: 100%;
    }
    
    .quectel-content {
        max-width: 100%;
    }
    
    /* 打印时移除标题的交互效果 */
    .quectel-content h1,
    .quectel-content h2,
    .quectel-content h3,
    .quectel-content h4,
    .quectel-content h5 {
        cursor: default;
    }
    
    .quectel-content h1::after,
    .quectel-content h2::after,
    .quectel-content h3::after,
    .quectel-content h4::after,
    .quectel-content h5::after {
        display: none;
    }
}

/* ========================================
   Caption Text & Utility Classes - 说明文字和工具类
   ======================================== */
/* 通用说明文字样式 - 基于Quectel品牌设计规范 */
.caption-text,
.quectel-content .caption-text {
    font-size: var(--font-size-xs);
    color: var(--color-gray-400);
    line-height: 1.5;
    /* 支持文字换行显示 */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* 间距工具类 */
.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

/* 文本对齐工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ========================================
   Table Styles - Quectel 品牌表格样式
   ======================================== */
/* 基于 Quectel_brand_design_demo.html 的 product-table 样式完全匹配 */

/* 1. MyST表格样式 - 带有 spec-table class */
.spec-table,
.spec-table.docutils {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    line-height: 1.6;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.spec-table th,
.spec-table.docutils th {
    background: var(--color-gray-100) !important; /* 灰色背景 #F5F5F5 */
    color: var(--color-secondary) !important; /* 红色文字 #E31E24 */
    padding: var(--spacing-sm) var(--spacing-md) !important;
    text-align: left;
    font-weight: var(--font-weight-semibold);
    border: 1px solid var(--color-gray-200);
    font-family: var(--font-family);
    font-size: var(--font-size-body);
}

.spec-table td,
.spec-table.docutils td {
    padding: var(--spacing-sm) var(--spacing-md) !important;
    border: 1px solid var(--color-gray-200);
    background-color: var(--color-white);
    vertical-align: middle;
}

.spec-table tbody tr:hover td,
.spec-table.docutils tbody tr:hover td {
    background-color: #f0f8ff;
}

/* 2. 默认Sphinx docutils表格样式覆盖 */
.docutils {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    line-height: 1.6;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.docutils th,
.docutils thead th {
    background: var(--color-gray-100) !important; /* 灰色背景 #F5F5F5 */
    color: var(--color-secondary) !important; /* 红色文字 #E31E24 */
    padding: var(--spacing-sm) var(--spacing-md) !important;
    text-align: left;
    font-weight: var(--font-weight-semibold);
    border: 1px solid var(--color-gray-200);
    font-family: var(--font-family);
    font-size: var(--font-size-body);
}

.docutils td {
    padding: var(--spacing-sm) var(--spacing-md) !important;
    border: 1px solid var(--color-gray-200);
    background-color: var(--color-white);
    vertical-align: middle;
}

.docutils tbody tr:hover td {
    background-color: #f0f8ff;
}

/* 3. 原始HTML表格自动样式应用 - 无class属性的表格 */
table:not([class]) {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    line-height: 1.6;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

table:not([class]) th {
    background: var(--color-gray-100) !important; /* 灰色背景 #F5F5F5 */
    color: var(--color-secondary) !important; /* 红色文字 #E31E24 */
    padding: var(--spacing-sm) var(--spacing-md) !important;
    text-align: left !important;
    font-weight: var(--font-weight-semibold) !important;
    border: 1px solid var(--color-gray-200) !important;
    font-family: var(--font-family);
    font-size: var(--font-size-body) !important;
    line-height: 1.6 !important;
}

table:not([class]) td {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-gray-200);
    background-color: var(--color-white);
    vertical-align: middle;
}

table:not([class]) tbody tr:hover td {
    background-color: #f0f8ff;
}

/* 4. 表格标题样式 */
.docutils caption,
.spec-table caption,
table:not([class]) caption {
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-500);
    margin-bottom: var(--spacing-xs);
    text-align: left;
    caption-side: top;
}

/* 5. 表格包装器 - 支持水平滚动 */
.table-wrapper {
    overflow-x: auto;
    margin: var(--spacing-md) 0;
}

.quectel-content .table-wrapper:has(> table[hidden]):not(:has(> table:not([hidden]))) {
    display: none;
}

.table-wrapper table {
    margin: 0; /* 去除内部margin，由wrapper控制 */
}

/* The rule above cannot win inside a converted page: `.quectel-content table.docutils` (0,2,1)
   states `margin: var(--spacing-md) 0` on the table itself and outranks `.table-wrapper table`
   (0,1,1); and the wrapper - `overflow-x: auto`, so a block formatting context - keeps that
   margin inside its own box instead of letting it collapse with the block after it. Against a
   paragraph the difference never showed, because the wrapper's own 18 px bottom margin is what
   governs there; against a heading it did, and the heading stood one table margin further down
   than the very same heading after a paragraph. Measured on the delivered page of EG800Z-EU
   DFOTA 升级指导: H1 「1. 引言」 printed 71 px (ink to ink) below the 修订记录 table against 56 px
   below a paragraph, and H2 「3.2. AT示例声明」 49 px below 表 1 against 35 px (owner,
   2026-10-02: 「一级标题和表格间的间距也大了」). With the margin out of the wrapper's box the two
   distances agree - 53 px and 31 px - because the table no longer adds a second one.

   Only the bottom goes. The table's own top margin is load-bearing: the caption rule below zeroes
   the wrapper's top margin, so the distance from a caption to its table - the one the owner fixed
   on 2026-10-01 (40.3 px -> 22.3 px) - IS that margin-top. Scoped to the converted pages and to
   the wrapper's own table, because the site's own pages were styled with the internal margin. */
.quectel-content.word-html-document .table-wrapper > table {
    margin-bottom: 0 !important;
}

/* A note label prints directly under-word: Word leaves 9.99 pt from the label's ink to the box's
   top rule (8.8 px of box edge), and the label's own 8 px paragraph margin is what carries it.
   The wrapper's top margin would collapse with that margin into 18 px, which the human review
   read as the label detached from the content it labels (「备注」与备注内容分离, DEV-15088 human
   comment 2658). The cleaner marks the label (word_html_cleaner.NOTE_LABEL_CLASS) and
   markdown_export carries the mark onto this page, so the rule reaches the box that follows a
   label and nothing else. Both shapes are covered: the table as Sphinx builds it, and the
   wrapper the page script puts around it. */
/* The label's own bottom margin is what left the gap the review asked to close (人工评论 671
   "「备注」标题与下方内容间隔过大"): Word leaves 9.99 pt from the label's ink to the box's top
   rule, and the block under the label carries no top margin of its own. Scoped to the marked
   label, so an ordinary paragraph keeps the theme's spacing. */
.quectel-content .word-note-label {
    margin-bottom: 0 !important;
}

.quectel-content .word-note-label + .table-wrapper,
.quectel-content .word-note-label + table {
    margin-top: 0 !important;
}

/* A Word table caption stands on the line above its table, and Word floats the table at its own
   anchored offset under it (``tblpY``, 0.11 cm in the DEV-15086 tables) instead of after the
   caption's paragraph spacing. The wrapper's 18 px top margin and the caption's own 8 px
   paragraph margin both added to that distance, so the page printed the caption further from its
   table than the Word page does (人工评论 725「表格标题与表格的间距，即垂直定位保持原文距离：
   0.11cm」; measured caption ink -> table top 27.97 pt against Word's 15.40 pt). The cleaner marks
   the caption (word_html_cleaner.TABLE_CAPTION_CLASS) and markdown_export carries the mark onto
   this page, so the rule reaches the table under a caption and nothing else. What is left is the
   table's own margin-top - Word's caption spacing plus the table's 0.11 cm offset, which the
   cleaner writes.

   The mark also reaches a label line that stands directly above a table (「修订记录」, a command
   table's 「Parameter」/「Example」 band, MD-30): such a line is that table's title too, so it takes
   the title's distance instead of the paragraph's. Measured on EG800Z-EU DFOTA 升级指导, the
   「修订记录」 label printed ink-to-first-row 40.3 px before and 22.3 px after - the eight captions'
   own distance. */
.quectel-content .word-table-caption {
    margin-bottom: 0 !important;
}

.quectel-content .word-table-caption + .table-wrapper,
.quectel-content .word-table-caption + table {
    margin-top: 0 !important;
}

/* 一张表若由正文段落引出，间距接着段落自己的节奏，不叠表格节奏（人工评论 7531，DEV-32193 修复轮 6，
   Quectel_BC65&BC92&BC95-GR_MQTT_Application_Note_V1.1，原 PDF 第 10 页 2.3.1）：
   「Spacing between the text and table is too large. Please reduce it.」。
   Word 把命令表画在说明句下面约 13 pt 处（本文档 8 张命令/URC 表实测 12.96–13.44 pt，量的是句子的墨迹
   底边到红表头上沿），而交付页按主题的表格节奏读：`.table-wrapper` 的 `--spacing-md`（18px）与段落的
   8px 下边距塌陷成 18px，再叠上段落行盒在墨迹下方的 4.75px 与表头 1px 边框 —— 墨迹到表头 31.75px
   （≈23.8 pt），比 Word 的 25.6px 多出约 6px，评审读成「文字与表格间距过大」。
   转换页上一个表格紧跟在段落之后时，距离改由段落这一侧给：12px（段落 8px 下边距与它塌陷后取 12px），
   实测墨迹到表头 25.75px，与 Word 的 25.6px 相等；同一份 cleaned HTML 的构建页上 10 处「段落 + 表」
   全部按此收口。已经定了的两处「表上方的块自有其距离」不变：题注行（`word-table-caption`，MD-29/MD-30）
   与备注标签行（`word-note-label`）各自仍为 0、由表自己的上边距承载，所以这里用 `:where()` 把它们排除，
   且不因此抬高特异度。站内手写页不受影响（限定 `word-html-document`）；制品页 `word2html/style.css`
   是产物页，保留 Word 自己的段距。
   `!important` 不是偷懒：页面脚本给每张表包壳时把 `overflow-x: auto; margin: var(--spacing-md) 0;`
   写成**行内**声明，行内声明压过任何不带 `!important` 的规则（题注/备注标签那两条同理）。 */
.quectel-content.word-html-document p:where(:not(.word-table-caption, .word-note-label)) + .table-wrapper,
.quectel-content.word-html-document p:where(:not(.word-table-caption, .word-note-label)) + table,
.quectel-content .word-html-document p:where(:not(.word-table-caption, .word-note-label)) + .table-wrapper,
.quectel-content .word-html-document p:where(:not(.word-table-caption, .word-note-label)) + table {
    margin-top: 12px !important;
}

.quectel-content.word-html-document dl dd > :is(table, .table-wrapper),
.quectel-content .word-html-document dl dd > :is(table, .table-wrapper) {
    margin-block: 2px !important;
}

.quectel-content.word-html-document .word-table-caption,
.quectel-content .word-html-document .word-table-caption,
.quectel-content.word-html-document p:has(> strong:only-child):has(+ .code-block),
.quectel-content .word-html-document p:has(> strong:only-child):has(+ .code-block) {
    margin-block: var(--spacing-md) 4px !important;
}

/* 题注上方紧接的块若本身就是一张表，题注与它之间按原稿的题注段距分开（人工评论 9406，DEV-35821
   修复轮 4，Quectel_BG95&BG77&BG600L_Series_MQTT_Application_Note_V1.2，原 PDF 第 26 页
   「Table 2: Error Codes of +QMTSTAT: URC」）：「Please add a space between Table 2 title and
   previous table.」。该题注上方是取值参数表落成的定义列表（`dl`，`margin-bottom: 0`），题注自己的
   `--spacing-md` 就是全部距离 —— 构建页实测 18px，而原稿 `p.MsoCaption {margin-top:24.0pt}` 是
   32px，题注读起来像是上一张表的一部分。
   只改「上方是表格形态的块」这一种排布：正文段落之后的题注仍取 18px —— 段与题注之间那点距离在页面上
   读得出来（MD-29/MD-30 的题注→表距离是另一侧的 0，不受影响）；标题之后的题注也不动（本轮没有诉求，
   动它会改掉每一页 `Revision History` 的间距）。裸 `<table>` 与页面脚本包出来的 `.table-wrapper` 两种
   载体都算，`dl` / `.code-block` / `.admonition` 是另外三种落到页面上的表格形态（取值参数表、代码带、
   备注面板）。32px 是 24pt 的像素值，不是新定的口径：它就是本文档题注样式自己的上段距。 */
.quectel-content.word-html-document :is(.table-wrapper, table, dl, .code-block, .admonition) + .word-table-caption,
.quectel-content .word-html-document :is(.table-wrapper, table, dl, .code-block, .admonition) + .word-table-caption {
    margin-top: 32px !important;
}

.quectel-content.word-html-document .word-table-caption + .table-wrapper > table,
.quectel-content .word-html-document .word-table-caption + .table-wrapper > table,
.quectel-content.word-html-document .word-table-caption + table,
.quectel-content .word-html-document .word-table-caption + table,
.quectel-content.word-html-document p:has(> strong:only-child) + .code-block,
.quectel-content .word-html-document p:has(> strong:only-child) + .code-block {
    margin-top: 0 !important;
}

/* 6. 响应式设计 - 移动端表格优化 */
@media (max-width: 768px) {
    .spec-table,
    .spec-table.docutils,
    .docutils,
    table:not([class]) {
        font-size: 14px;
    }
    
    .spec-table th,
    .spec-table.docutils th,
    .docutils th,
    table:not([class]) th,
    .spec-table td,
    .spec-table.docutils td,
    .docutils td,
    table:not([class]) td {
        padding: 8px 12px !important;
    }
}

/* 7. 表格内文本样式重置 - 确保继承正确的样式 */
.spec-table p,
.spec-table.docutils p,
.docutils p,
table:not([class]) p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.spec-table em,
.spec-table.docutils em,
.docutils em,
table:not([class]) em {
    font-style: italic;
    color: var(--color-gray-500);
}

.spec-table strong,
.spec-table.docutils strong,
.docutils strong,
table:not([class]) strong {
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-500);
}

/* ========================================
   Card Components - 卡片组件
   基于移远品牌设计规范的统一卡片样式
   ======================================== */

/* 基础卡片样式 */
.quectel-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: none;
    text-decoration: none;
    display: block;
    position: relative;
}

/* 卡片悬停效果 - 与品牌设计demo保持一致 */
.quectel-card-hover:hover,
.quectel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

/* 卡片网格布局 */
.quectel-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

/* 卡片标题 */
.quectel-card .sd-card-title {
    font-size: var(--font-size-h4);
    color: var(--color-gray-500);
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-semibold);
}

/* 卡片内容 */
.quectel-card .sd-card-text {
    color: var(--color-gray-400);
    line-height: var(--line-height-relaxed);
    margin-bottom: 0;
}

/* ========================================
   Document Feedback System - 文档反馈系统
   ======================================== */

/* 国际化字体优化 */
.doc-feedback-modal {
    font-family: var(--font-family);
}

/* 中文字体优化 */
.doc-feedback-modal:lang(zh),
.doc-feedback-modal:lang(zh-CN),
.doc-feedback-modal:lang(zh-Hans) {
    font-family: var(--font-family), 'PingFang SC', 'Microsoft YaHei', '微软雅黑', 'SimSun', '宋体', sans-serif;
}

/* 英文字体优化 */
.doc-feedback-modal:lang(en) {
    font-family: 'Stratos', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
}

/* 中英文混排时的行高和字间距优化 */
.doc-feedback-content:lang(zh) label,
.doc-feedback-content:lang(zh-CN) label,
.doc-feedback-content:lang(zh-Hans) label {
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.doc-feedback-content:lang(en) label {
    line-height: 1.4;
    letter-spacing: normal;
}

/* 文本输入框的语言适配 */
.doc-feedback-content:lang(zh) textarea,
.doc-feedback-content:lang(zh-CN) textarea,
.doc-feedback-content:lang(zh-Hans) textarea {
    line-height: 1.8;
    letter-spacing: 0.01em;
}

.doc-feedback-content:lang(en) textarea {
    line-height: 1.5;
    letter-spacing: normal;
}

/* 弹窗遮罩层 */
.doc-feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* JS 动态调整为 center 或 flex-start */
    padding: 16px 0;
    box-sizing: border-box;
    z-index: 10000;
    animation: docFeedbackFadeIn 0.3s ease;
    overflow-y: auto; /* 兜底：极小屏幕时允许滚动到弹窗底部 */
}

@keyframes docFeedbackFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 弹窗主体 */
.doc-feedback-modal {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    height: min(720px, calc(var(--doc-feedback-available-height, 100vh) - 32px));
    max-height: calc(var(--doc-feedback-available-height, 100vh) - 32px);
    min-height: 320px;
    overflow: hidden;
    position: relative;
    font-family: var(--font-family);
    animation: docFeedbackSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes docFeedbackSlideIn {
    from { 
        transform: translateY(-20px) scale(0.98);
        opacity: 0;
    }
    to { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* 弹窗头部 - 与访问请求弹窗保持一致 */
.doc-feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-gray-200);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--color-white);
}

.doc-feedback-header h3 {
    margin: 0;
    font-size: 26px;
    font-weight: var(--font-weight-normal);
    color: var(--color-gray-500);
    font-family: var(--font-family);
    line-height: 1.3;
}

.doc-feedback-close {
    background: none;
    border: none;
    color: var(--color-gray-400);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color var(--transition-normal);
    font-weight: var(--font-weight-normal);
}

.doc-feedback-close:hover {
    color: var(--color-gray-500);
}

/* 弹窗内容区域 */
.doc-feedback-content {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-gutter: stable;
}

/* 自定义滚动条样式 */
.doc-feedback-content::-webkit-scrollbar {
    width: 6px;
}

.doc-feedback-content::-webkit-scrollbar-track {
    background: transparent;
}

.doc-feedback-content::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: 3px;
}

.doc-feedback-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

.doc-feedback-content > div {
    margin-bottom: var(--spacing-lg);
}

/* 标签样式 */
.doc-feedback-content label {
    display: block;
    font-weight: var(--font-weight-normal);
    color: var(--color-gray-500);
    margin-bottom: var(--spacing-xs);
    font-size: 14px;
    font-family: var(--font-family);
    line-height: var(--line-height-normal);
}

/* 选中内容显示 */
.selected-content .selected-text-display {
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    font-size: var(--font-size-small);
    line-height: var(--line-height-relaxed);
    color: var(--color-gray-500);
    max-height: 100px;
    overflow-y: auto;
    font-family: var(--font-family);
}

/* 页面信息显示 */
.page-info .page-url-display {
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    font-size: 12px;
    color: var(--color-gray-400);
    word-break: break-all;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* 下拉选择框 */
.doc-feedback-content select {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-size-small);
    font-family: var(--font-family);
    background: var(--color-white);
    color: var(--color-gray-500);
    transition: all var(--transition-normal);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    box-sizing: border-box;
}

.doc-feedback-content select:hover {
    border-color: var(--color-primary-light);
}

.doc-feedback-content select:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-lighter);
}

/* 文本域和输入框 */
.doc-feedback-content textarea, 
.doc-feedback-content input[type="email"] {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-size-small);
    font-family: var(--font-family);
    line-height: var(--line-height-relaxed);
    color: var(--color-gray-500);
    background: var(--color-white);
    transition: all var(--transition-normal);
    resize: vertical;
    box-sizing: border-box;
}

.doc-feedback-content textarea {
    min-height: 100px;
    max-height: 200px;
}

.doc-feedback-content textarea:hover,
.doc-feedback-content input[type="email"]:hover {
    border-color: var(--color-primary-light);
}

.doc-feedback-content textarea:focus, 
.doc-feedback-content input[type="email"]:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-lighter);
}

.doc-feedback-content textarea::placeholder,
.doc-feedback-content input[type="email"]::placeholder {
    color: var(--color-gray-300);
}

/* 字符计数 */
.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--color-gray-300);
    margin-top: 4px;
    font-family: var(--font-family);
}

.char-count span {
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-400);
}

/* 接收通知勾选框 */
.receive-notification {
    margin: var(--spacing-md) 0;
}

.receive-notification .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: normal;
}

.receive-notification input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: var(--spacing-sm);
    cursor: pointer;
    accent-color: var(--color-primary);
}

.receive-notification .checkbox-label span {
    font-size: 14px;
    color: var(--color-gray-500);
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
}

/* 用户邮箱标签和输入框 */
.user-email label {
    font-weight: normal; /* 邮箱地址标签不加粗 */
}

/* 弹窗底部 */
.doc-feedback-footer {
    padding: var(--spacing-lg);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    flex-shrink: 0; /* 确保按钮行始终可见，不被压缩 */
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: var(--color-white);
    border-top: 1px solid var(--color-gray-200);
}

/* 按钮样式 - 继承 Quectel 按钮设计 */
.doc-feedback-footer .btn-cancel {
    background: var(--color-white);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.doc-feedback-footer .btn-cancel:hover {
    background: var(--color-primary-lighter);
    color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 102, 204, 0.12);
}

.doc-feedback-footer .btn-submit {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.doc-feedback-footer .btn-submit:hover:not(:disabled) {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 102, 204, 0.18);
}

.doc-feedback-footer .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.doc-feedback-footer .btn-cancel:focus-visible,
.doc-feedback-footer .btn-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.18);
}

/* 加载状态遮罩 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    z-index: 10001;
}

.loading-spinner {
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: var(--font-family);
}

.doc-feedback-success-view {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--spacing-md) var(--spacing-lg);
}

.doc-feedback-modal .submit-success-view {
    text-align: center;
    padding: 0;
}

.doc-feedback-modal.success-compact {
    height: auto !important;
}

.doc-feedback-modal.success-compact .doc-feedback-success-view {
    flex: 0 1 auto;
    overflow-y: auto;
    padding-bottom: var(--spacing-sm);
}

.doc-feedback-modal .submit-success-title {
    font-size: 22px;
    font-weight: var(--font-weight-normal);
    color: var(--color-success);
    margin: 0 0 var(--spacing-sm);
}

.doc-feedback-modal .submit-success-desc {
    color: var(--color-gray-400);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 var(--spacing-sm);
}

.doc-feedback-modal .submit-success-info {
    background: var(--color-gray-100);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    margin: 0 0 var(--spacing-sm);
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px var(--spacing-sm);
    font-size: 14px;
}

.doc-feedback-modal .submit-success-info dt {
    color: var(--color-gray-400);
    font-weight: var(--font-weight-normal);
}

.doc-feedback-modal .submit-success-info dd {
    margin: 0;
    color: var(--color-gray-600);
    word-break: break-all;
    white-space: pre-wrap;
}

.doc-feedback-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--spacing-xs);
}

.doc-feedback-modal .btn-submit-success-close {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.doc-feedback-modal .btn-submit-success-close:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 102, 204, 0.18);
}

.doc-feedback-modal .btn-submit-success-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.18);
}

/* 消息提示 */
.feedback-message {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-sm);
    margin: 0 0 var(--spacing-md);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-normal);
    font-family: var(--font-family);
    animation: docFeedbackSlideDown 0.3s ease;
    text-align: center;
}

.feedback-message.success {
    background: #E7F5E7;
    color: #1F7A1F;
    border: 1px solid var(--color-success);
}

.feedback-message.error {
    background: #FDE8E8;
    color: #C53030;
    border: 1px solid var(--color-error);
}

/* 字段级错误提示 */
.field-error-message {
    color: var(--color-error);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-normal);
    margin-top: var(--spacing-xs);
    padding: var(--spacing-xs) 0;
    line-height: var(--line-height-tight);
    font-family: var(--font-family);
    animation: docFeedbackSlideDown 0.2s ease;
}

/* 错误状态的字段样式 */
.field-error {
    border-color: var(--color-error) !important;
    box-shadow: inset 0 0 0 1px var(--color-error) !important;
}

.field-error:focus {
    border-color: var(--color-error) !important;
    box-shadow: inset 0 0 0 2px rgba(197, 48, 48, 0.2) !important;
}

@keyframes docFeedbackSlideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .doc-feedback-modal {
        width: 95%;
        /* max-height 由 JS 动态计算，此处不再覆盖 */
    }
    
    .doc-feedback-header {
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .doc-feedback-header h3 {
        font-size: var(--font-size-small);
    }
    
    .doc-feedback-content {
        padding: var(--spacing-lg);
    }
    
    .doc-feedback-footer {
        padding: var(--spacing-md) var(--spacing-lg);
        flex-direction: column-reverse;
    }
    
    .doc-feedback-footer .btn-cancel,
    .doc-feedback-footer .btn-submit {
        width: 100%;
        margin-bottom: var(--spacing-xs);
    }
    
    .doc-feedback-footer .btn-submit {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .doc-feedback-modal {
        width: 100%;
        border-radius: 0;
        /* max-height 由 JS 动态计算 */
    }
}

/* 滚动条样式 */
.doc-feedback-content::-webkit-scrollbar,
.selected-text-display::-webkit-scrollbar {
    width: 6px;
}

.doc-feedback-content::-webkit-scrollbar-track,
.selected-text-display::-webkit-scrollbar-track {
    background: var(--color-gray-100);
    border-radius: 3px;
}

.doc-feedback-content::-webkit-scrollbar-thumb,
.selected-text-display::-webkit-scrollbar-thumb {
    background: var(--color-gray-200);
    border-radius: 3px;
}

.doc-feedback-content::-webkit-scrollbar-thumb:hover,
.selected-text-display::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-300);
}

/* 焦点状态 */
.doc-feedback-content button:focus-visible,
.doc-feedback-content select:focus-visible,
.doc-feedback-content textarea:focus-visible,
.doc-feedback-content input:focus-visible {
    outline: none;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .doc-feedback-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .doc-feedback-modal {
        border: 2px solid var(--color-gray-500);
    }
    
    .doc-feedback-content select,
    .doc-feedback-content textarea,
    .doc-feedback-content input[type="email"] {
        border-width: 2px;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    .doc-feedback-modal,
    .feedback-message {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    
    .doc-feedback-content *,
    .doc-feedback-footer * {
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .doc-feedback-modal {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .doc-feedback-header {
        background: #1a365d;
    }
    
    .selected-content .selected-text-display,
    .page-info .page-url-display {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .doc-feedback-content select,
    .doc-feedback-content textarea,
    .doc-feedback-content input[type="email"] {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .doc-feedback-content select:focus,
    .doc-feedback-content textarea:focus,
    .doc-feedback-content input[type="email"]:focus {
        border-color: var(--color-primary);
    }
    
    .doc-feedback-footer {
        background: #4a5568;
        border-color: #718096;
    }
    
    .char-count {
        color: #a0aec0;
    }
    
    .feedback-message.success {
        background: #22543d;
        color: #9ae6b4;
        border-color: #2f855a;
    }
    
    .feedback-message.error {
        background: #742a2a;
        color: #feb2b2;
        border-color: #c53030;
    }
    
    .field-error-message {
        color: #feb2b2;
    }
    
    .field-error {
        border-color: #c53030 !important;
        box-shadow: inset 0 0 0 1px #c53030 !important;
    }
    
    .field-error:focus {
        border-color: #c53030 !important;
        box-shadow: inset 0 0 0 2px rgba(197, 48, 48, 0.3) !important;
    }
    
    .doc-feedback-footer .btn-cancel {
        background: transparent;
        color: #a0aec0;
        border-color: #718096;
    }
    
    .doc-feedback-footer .btn-cancel:hover {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #a0aec0;
    }
}

/* ================================================================================
   Document Feedback Icon Styles
   文档反馈图标样式
   ================================================================================ */

.feedback-icon {
    position: fixed;
    z-index: 2000; /* 确保在其他元素之上 */
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: auto;
    user-select: none;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.feedback-icon.visible {
    opacity: 1;
    transform: scale(1);
}

.feedback-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.2));
}

.feedback-icon:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

.feedback-icon img {
    width: 32px;
    height: 32px;
    transition: transform 0.2s;
    border-radius: 50%; /* 确保图片是圆形 */
}

.feedback-icon:hover img {
    transform: scale(1.05);
}

/* 工具提示 */
.feedback-icon .feedback-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 2001;
}

.feedback-icon .feedback-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

.feedback-icon:hover .feedback-tooltip {
    opacity: 1;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .feedback-icon {
        width: 28px;
        height: 28px;
    }
    
    .feedback-icon img {
        width: 28px;
        height: 28px;
    }
    
    .feedback-icon .feedback-tooltip {
        font-size: 11px;
        padding: 4px 8px;
        top: -36px;
    }
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .feedback-icon {
        filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.1));
    }
    
    .feedback-icon:hover {
        filter: drop-shadow(0 6px 16px rgba(255, 255, 255, 0.15));
    }
}

/* ========================================
   Right Page Navigation Panel (右侧页面内导航)
   ======================================== */

/* 右侧页面内导航容器 - 改回固定定位 */
.on-this-page {
    width: var(--on-this-page-width); /* 使用专门的页面导航宽度 */
    background: var(--color-white); /* 背景色 */
    border-left: 1px solid var(--color-gray-200); /* 左侧边框而不是右侧 */
    /* 改回固定定位，不跟随内容滚动 */
    position: fixed;
    top: var(--header-height);
    right: 0;
    height: calc(100vh - var(--header-height));
    z-index: 99;
    padding-top: 0;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
}

/* 如果 TOC 尚未填充，仍允许显示标题栏与 toggle（避免按钮因 display:none 消失） */
.on-this-page .on-this-page-list:empty {
    padding: 0;
    margin: 0;
}

/* 收缩状态 - 隐藏整个侧边栏 */
.on-this-page.collapsed {
    /* 折叠后：侧边栏本体完全隐藏，不占空间（正文变宽） */
    width: 0;
    height: calc(100vh - var(--header-height));
    overflow: visible; /* 允许 toggle 以 fixed 形式显示 */
    background: transparent;
    border-left: 0;
}

/* 收缩状态：保留一个“最小标题栏”承载 toggle。
   注意：把标题栏压到 height:0 在某些环境会让内部 button 的布局盒也变成 0x0（看起来像“按钮消失”）。 */
.on-this-page.collapsed .on-this-page-title {
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-bottom: 0;
    overflow: visible; /* 允许 toggle 以 fixed 形式显示 */
    background: transparent;
}

/* 收缩状态下隐藏标题文字（toggle 已移至 nav 内，不再是 title 的子元素） */
.on-this-page.collapsed .on-this-page-title {
    display: none !important;
}

.on-this-page.collapsed .on-this-page-content {
    display: none;
}

/* 移除之前的伪元素文字 */
.on-this-page.collapsed::before {
    display: none;
}

/* 折叠后：容器本体不接收点击（只剩 fixed 的 toggle 可点） */
.on-this-page.collapsed {
    pointer-events: none;
}

/* nav 仍作为顶部栏容器（标题区域固定） */
.on-this-page-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

/* NOTE: collapsed 状态下按钮可见性由 `.quectel-content-download` 的 fixed 规则控制（单按钮方案） */

.on-this-page:not(.collapsed) .on-this-page-nav {
    display: flex;
}

.on-this-page:not(.collapsed) .on-this-page-content {
    display: block;
}

.on-this-page.collapsed .on-this-page-nav,
.on-this-page.collapsed .on-this-page-content {
    display: none;
}

/* 移除之前的伪元素文字 */
.on-this-page.collapsed::before {
    display: none;
}

/* TOC标题 - 固定在顶部不滚动 */
.on-this-page-title {
    font-size: var(--font-size-h5);
    color: var(--color-gray-500);
    margin: 0;
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-sm);
    border-bottom: 2px solid var(--color-secondary);
    background: var(--color-white);
    flex-shrink: 0;
    height: var(--toc-title-height);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between; /* 为切换按钮腾出空间 */
    white-space: nowrap;
    overflow: hidden;
    /* 移除 position: relative，避免创建层叠上下文遮挡提示框 */
}

/* 右侧标题栏与左侧目录标题对齐（结构不同：右侧 title 在 nav 内） */
.on-this-page-nav {
    height: var(--toc-title-height);
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-sm);
    border-bottom: 2px solid var(--color-secondary);
    background: var(--color-white);
    box-sizing: border-box;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 移除 position: relative，避免创建层叠上下文遮挡提示框 */
}

/* 标题文本样式保持与左侧一致（仅负责文字本身） */
.on-this-page-title {
    padding: 0;
    border: 0;
    background: transparent;
    height: auto;
    min-height: 0;
}

/* 展开状态下显示标题文字 */
.on-this-page:not(.collapsed) .on-this-page-title {
    font-size: var(--font-size-h5); /* 恢复正常字体大小 */
}

/* 切换按钮（移远主题 icon button） */
.quectel-content-download {
    /* Layout */
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    line-height: 1;

    /* Visual - 移除边框、背景，只保留图标 */
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--color-primary); /* SVG uses currentColor */
    box-shadow: none;

    /* Interaction */
    cursor: pointer;
    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast),
        color var(--transition-fast);
}

.quectel-content-download svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* When the icon is an image (standalone themed SVG) */
.quectel-content-download img {
    width: 24px;
    height: 24px;
    display: block;
}

/* 双保险：避免图标被其它规则意外隐藏 */
.quectel-content-download,
.quectel-content-download svg {
    opacity: 1 !important;
    visibility: visible !important;
}

.quectel-content-download img {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 展开时：顶层按钮隐藏，不需要恢复成 static（这里保留空规则以明确意图） */

.quectel-content-download:hover {
    opacity: 0.7;
    color: var(--color-primary-dark);
}

.quectel-content-download:active {
    transform: translateY(1px);
    opacity: 0.5;
}

.quectel-content-download:focus-visible {
    outline: 2px solid rgba(0, 102, 204, 0.4);
    outline-offset: 2px;
}

/* 图标不使用过渡动效 */
.quectel-content-download svg {
    transition: none;
}

/* TOC内容区域 - 只有内容可滚动，标题固定 */
.on-this-page-content {
    flex: 1;
    overflow-y: visible;
    min-height: 0;
    position: relative; /* 创建层叠上下文 */
    z-index: 20; /* 高于标题栏的 z-index: 10 */
    /* 移除padding，让内部的列表自己处理 */
}

/* 收缩状态下隐藏内容 */
.on-this-page.collapsed .on-this-page-content {
    opacity: 0;
    overflow: hidden;
}

/* TOC列表 - 添加适当的padding */
.on-this-page-list {
    list-style: none;
    margin: 0;
    padding: var(--spacing-sm) 0 var(--spacing-md); /* 上下padding保留，左右由链接控制 */
}

/* Nested list styling (mirror left `.quectel-toc ul ul`) */
.on-this-page-list ul {
    margin-left: 12px; /* 与左侧完全一致的嵌套缩进 */
    padding: 0;
    list-style: none;
    transition: all var(--transition-fast);
}

/* Collapse/expand children (mirror left `.quectel-toc li:not(.expanded) > ul`) */
.on-this-page-item:not(.expanded) > ul {
    display: none;
}

.on-this-page-item.expanded > ul {
    display: block;
}

/* 智能折叠：添加平滑过渡效果 */
.on-this-page-item > ul {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.on-this-page-item.expanded > ul {
    max-height: none;
    opacity: 1;
}

/* 智能折叠：非激活路径上的项目添加折叠样式 */
.on-this-page-item.auto-collapsed > ul {
    display: none;
    max-height: 0;
    opacity: 0;
}

/* 智能折叠：激活路径上的项目自动展开 */
.on-this-page-item.active-path > .on-this-page-link {
    /* 确保激活路径上的项目链接可见 */
    opacity: 1;
}

.on-this-page-item.active-path > ul {
    display: block;
    max-height: none;
    opacity: 1;
}

/* TOC列表项 */
.on-this-page-item {
    margin: 0;
}

/* 右侧链接/层级/状态：完全遵循左侧 `.quectel-toc a` 体系 */
.on-this-page-link {
    display: flex;
    align-items: center;
    padding: 6px var(--spacing-lg); /* 与标题相同的左右padding */
    color: var(--color-gray-400);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    font-size: var(--font-size-small);
    line-height: 1.3;
    min-width: 0; /* 允许flex子元素收缩 */
    position: relative; /* 为绝对定位的提示框提供定位上下文 */
}

/* Right TOC arrow/spacer - 完全与左侧一致的样式 */
.on-this-page-link .toc-toggle,
.on-this-page-link .on-this-page-node-toggle {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 0.25rem !important; /* 与左侧一致：4px */
    margin-left: -20px !important; /* 与左侧一致：箭头16px + 间距4px = 20px */
    vertical-align: middle !important;
    min-width: 16px !important;
    min-height: 16px !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s ease !important;
    cursor: pointer !important;
    color: var(--color-gray-600) !important;
}

.on-this-page-link .toc-spacer,
.on-this-page-link .on-this-page-node-spacer {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 0.25rem !important; /* 与左侧一致：4px */
    margin-left: -20px !important; /* 与左侧一致：箭头16px + 间距4px = 20px */
    vertical-align: middle !important;
    min-width: 16px !important;
    min-height: 16px !important;
    flex-shrink: 0 !important;
}

.on-this-page-link:hover .toc-toggle,
.on-this-page-link:hover .on-this-page-node-toggle {
    color: var(--color-secondary) !important;
}

/* Arrow direction: collapsed points right; expanded points down (like a tree) */
.on-this-page-item.expanded > .on-this-page-link .toc-toggle,
.on-this-page-item.expanded > .on-this-page-link .on-this-page-node-toggle {
    transform: rotate(90deg);
}

/* Keep injected text span from shrinking weirdly */
.on-this-page-link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* 悬停效果 - 白底红字（与左侧一致） */
.on-this-page-link:hover {
    background: var(--color-white);
    color: var(--color-secondary);
}

/* 当前激活项 - 白底红字（与左侧 `.quectel-toc a.current` 一致） */
.on-this-page-link.active {
    background: var(--color-white) !important;
    color: var(--color-secondary) !important;
    font-weight: var(--font-weight-medium);
}

/* 层级缩进：完全使用 margin-left 嵌套实现，与左侧一致 */
/* 所有链接使用统一的 padding: 6px var(--spacing-lg) */
/* 层级通过 .on-this-page-list ul { margin-left: 12px } 的嵌套自然体现 */


/* 取消右侧 TOC 自身滚动条，改为随内容自然展开 */
.on-this-page-content {
    overflow-y: visible;
    scrollbar-width: none;
}

.on-this-page-content::-webkit-scrollbar {
    display: none;
}

/* Right page outline - the STANDALONE panel. Mirror of the shell's behaviour in
 * `official-site-shell-bridge.css` (which re-scopes these rules to
 * `[data-official-document-region="true"] > .on-this-page` and is loaded only inside the official
 * site shell): a scroll-time overlay. It is hidden while the page is at rest, slides in while the
 * page is being scrolled, and goes away again 500ms after scrolling stops - the JS owns that
 * (`initOnThisPageTOCInteractions` -> `keepOnThisPageVisible` adding `.is-floating-visible`). The ⊟
 * button in the content header pins it away for good ("鼠标不滚动时 不用出现，只有滚动时才显示").
 *
 * WHAT WAS BROKEN, measured on the built page. This block used to be a half-copied version of that
 * design - off-screen `transform: translateX(calc(100% - 44px))` - while a second copy of the panel
 * rule further down the file (later, same specificity) neutralised the slide, so the panel could
 * never move; and a third problem sat behind the CSS: a standalone page resolves its scroll
 * container to `document.scrollingElement`, which never receives the viewport's scroll event, so the
 * reveal never fired and the panel simply stayed open at all times
 * ("右侧动态导航没有动态效果"). The JS now falls back to the document when the resolved container
 * cannot scroll, which is what makes this block's states reachable on a standalone page.
 */
.quectel-layout > .on-this-page {
    display: flex !important;
    position: fixed !important;
    /* Docked to the right edge, and centered VERTICALLY in the band the CONTENT occupies - below the
       site header AND below the content title bar, which is where the text starts: `top` names that
       band's middle and `translateY(-50%)` (on every state, see below) lifts the panel half its own
       height around it. Measured at a 2640x1676 viewport: the panel's center lands on the band's
       (901px), i.e. equal space above and below, which is what "相对于正文 垂直居中" asks for. An
       earlier revision instead anchored the panel beside the text column, which moved it off the right
       edge and left a gap; another centered it against the site header alone, which sat it 28px high. */
    top: calc(
        var(--header-height) + var(--toc-title-height) +
            (100vh - var(--header-height) - var(--toc-title-height)) / 2
    ) !important;
    right: 0 !important;
    z-index: 1400 !important;
    width: min(var(--on-this-page-width, 280px), 86vw) !important;
    height: auto !important;
    /* Half the panel hangs above its `top`, so the cap has to keep BOTH ends clear of the header:
       centering plus this cap puts the panel's top edge at `header + toc-title-bar + 56px` or lower, so
       it can never climb over the title bar. */
    max-height: calc(100vh - var(--header-height) - var(--toc-title-height) - 56px) !important;
    overflow: hidden !important;
    /* At rest: out of the way, and `pointer-events: none` so the strip it still occupies cannot
       swallow clicks while nothing is on screen. Every state keeps `translateY(-50%)`: that is what
       holds the panel centered vertically, and dropping it in one state would make the panel jump half
       its own height on every transition. */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: #fff !important;
    box-shadow: -4px 8px 24px rgba(0, 0, 0, 0.14) !important;
    transform: translateY(-50%) translateX(24px);
    transition: opacity 120ms ease, visibility 120ms ease, transform 180ms ease;
}

/* Revealed while the page scrolls. `:hover`/`:focus-within` are kept so that reaching the panel in
   time keeps it open - the JS only hides it again when it is neither hovered nor focused, so a
   reader who scrolls and then moves onto the outline can use it. */
.quectel-layout > .on-this-page.is-floating-visible,
.quectel-layout > .on-this-page:hover,
.quectel-layout > .on-this-page:focus-within {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.quectel-layout > .on-this-page.collapsed {
    width: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    border-left: 0 !important;
    box-shadow: none !important;
    transform: translateY(-50%) translateX(24px) !important;
}

.quectel-layout > .on-this-page .on-this-page-nav {
    display: none !important;
}

.quectel-layout > .on-this-page.collapsed .on-this-page-content {
    display: none !important;
}

.quectel-layout > .on-this-page:not(.collapsed) .on-this-page-content {
    display: block !important;
    max-height: inherit !important;
    overflow-y: auto !important;
    padding: 12px 16px 16px !important;
}

.on-this-page-content::-webkit-scrollbar-track {
    background: var(--color-gray-100); /* 使用浅灰色背景，与侧边栏背景一致 */
    border-radius: 4px;
}

.on-this-page-content::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: 4px;
    border: 2px solid var(--color-gray-100); /* 添加边框使滚动条与背景有区分 */
}

.on-this-page-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
    border-color: var(--color-gray-200);
}

/* 移除右侧 TOC 旧的“左边框+位移”交互规则，保持与左侧一致的简单 hover/current */

/* 响应式设计 - 统一的响应式布局规则 */
@media (max-width: 1200px) {
    .on-this-page {
        display: none;
    }
    
    /* 调整内容头部在没有右侧边栏时的位置 */
    .quectel-content-header {
        right: 0;
    }
    
    /* 调整主内容区域 */
    .quectel-main {
        margin-right: 0;
    }
}

/* 当右侧边栏收缩时，调整主内容区域的右侧间距 */
/* 
   JavaScript需要在切换收缩状态时同步更新相关类名
*/
/* 方法1：通过body上的类名控制 */
body.on-this-page-collapsed .quectel-main {
    margin-right: 0; /* 侧边栏完全隐藏，不需要预留空间 */
}

/* 方法2：直接在main上添加类名 */
.quectel-main.collapsed {
    margin-right: 0; /* 侧边栏完全隐藏，不需要预留空间 */
}

/* 方法3：使用:has选择器（现代浏览器支持） */
body:has(.on-this-page.collapsed) .quectel-main {
    margin-right: 0; /* 侧边栏完全隐藏，不需要预留空间 */
}

/* 平板设备 */
@media (max-width: 768px) {
    /* 平板设备仍然隐藏右侧边栏 */
    .on-this-page {
        display: none;
    }
    
    .quectel-main {
        margin-right: 0;
    }
    
    /* 移动端左侧目录使用抽屉(off-canvas)模式：
       侧边栏默认 translateX(-100%) 隐藏，仅在 .open 时显示。
       因此这里不要再通过 margin-left 强行给侧边栏预留空间，否则会造成“看起来没隐藏”。 */
    .quectel-contents {
        width: calc(var(--contents-width) - 50px); /* 小屏稍微窄一点（不影响隐藏/显示机制） */
    }
}

/* 手机设备 */
@media (max-width: 480px) {
    .on-this-page {
        display: none;
    }
    
    .quectel-main {
        margin-right: 0;
    }
    
    /* 手机端仍然使用抽屉(off-canvas)模式，仅调整抽屉宽度 */
    .quectel-contents {
        width: 250px;
    }
}

/* 滚动条样式 */
.on-this-page-content::-webkit-scrollbar {
    display: none;
}

.on-this-page-content::-webkit-scrollbar-track {
    background: var(--color-gray-100);
    border-radius: 2px;
}

.on-this-page-content::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: 2px;
    transition: background var(--transition-fast);
}

/* Keep the floating outline available after legacy responsive rules.
 *
 * This copy exists only to undo the `display: none` the @media blocks above apply to `.on-this-page`
 * at <=1200px. It deliberately does NOT re-declare `top`, `max-height`, `transform` or
 * `pointer-events`: a later rule of equal specificity wins, and doing that is what silently killed
 * the slide-in and the vertical centering this file sets up higher up (the panel was pinned in
 * place, kept receiving clicks while collapsed, and in one state dropped its `translateY(-50%)` so
 * it jumped by half its own height). Geometry belongs to that block; this one only has to keep the
 * panel displayable at every width. */
.quectel-layout > .on-this-page {
    display: flex !important;
    position: fixed !important;
    right: 0 !important;
    z-index: 1400 !important;
    width: min(var(--on-this-page-width, 280px), 86vw) !important;
    height: auto !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: -4px 8px 24px rgba(0, 0, 0, 0.14) !important;
}

.quectel-layout > .on-this-page .on-this-page-content {
    display: block !important;
    max-height: inherit !important;
    overflow-y: auto !important;
    padding: 12px 16px 16px !important;
}

.on-this-page-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

/* 页面内导航动画效果 */
.on-this-page {
    transition: width var(--transition-normal), opacity var(--transition-normal);
}

/* 收缩/展开动画 */
.on-this-page-content {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.on-this-page-title {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Video Preview Styling - 视频预览样式
   ======================================== */

/* 视频容器 */
.video-container {
    position: relative;
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-gray-100);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow var(--transition-normal);
}

.video-container:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 视频元素 */
.video-container video {
    display: block;
    width: 100%;
    height: auto;
    background: #000;
}

/* 视频控制栏自定义 */
.video-container video::-webkit-media-controls-panel {
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
}

/* 视频标题/说明 */
.video-caption {
    padding: 12px 16px;
    font-size: var(--font-size-small);
    color: var(--color-gray-400);
    background: var(--color-white);
    border-top: 1px solid var(--color-gray-200);
    text-align: center;
}

.video-caption strong {
    color: var(--color-gray-500);
    font-weight: 500;
}

/* 视频预览框（用于嵌入的 HTML5 视频） */
.video-preview {
    position: relative;
    display: block;
    margin: 24px 0;
    border-radius: 12px;  /* 强制圆角 */
    overflow: hidden;
    background: transparent;  /* 透明背景，无边框效果 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);  /* 增强阴影 */
    transition: transform 600ms ease;  /* 只保留 transform 过渡用于播放时的放大 */
    text-decoration: none;
}

/* HTML5 video 元素样式 */
.video-preview video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 12px;  /* 强制圆角 */
}

/* 禁用视频下载按钮 */
.video-preview video::-webkit-media-controls-download-button {
    display: none !important;  /* 隐藏下载按钮 */
}

.video-preview video::-moz-media-controls-download-button {
    display: none !important;  /* Firefox 下载按钮 */
}

/* 禁用画中画按钮 */
.video-preview video::-webkit-media-controls-picture-in-picture-button {
    display: none !important;  /* 隐藏画中画按钮 */
}

.video-preview video::-moz-media-controls-picture-in-picture-button {
    display: none !important;  /* Firefox 画中画按钮 */
}

/* 通过 CSS 禁用画中画功能 */
.video-preview video {
    -webkit-appearance: none;
    appearance: none;
}

.video-preview video::-webkit-media-controls-enclosure {
    overflow: hidden !important;
}

.video-preview video::-webkit-media-controls {
    overflow: hidden !important;
}

/* 播放图标覆盖层（视频未播放时显示） */
.video-preview::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(227, 30, 36, 0.95);  /* Quectel 红色 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 1;  /* 默认显示播放按钮 */
    transition: opacity 400ms ease;
    z-index: 10;
}

/* 播放图标三角形 */
.video-preview::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-42%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 26px;
    border-color: transparent transparent transparent #fff;
    pointer-events: none;
    opacity: 1;  /* 默认显示播放按钮 */
    transition: opacity 400ms ease;
    z-index: 11;
}

/* 视频播放时隐藏播放图标 */
.video-preview.playing::before,
.video-preview.playing::after {
    opacity: 0;
    visibility: hidden;  /* 确保完全不可见 */
}

/* 模态框视频播放器样式 */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.video-modal-overlay .video-preview {
    cursor: auto;
    margin: 0;
    max-width: 90vw;
    max-height: 90vh;
}

.video-modal-overlay .video-preview video {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
}

/* 模态框中的视频始终不显示播放按钮（因为自动播放） */
.video-modal-overlay .video-preview::before,
.video-modal-overlay .video-preview::after {
    display: none !important;
}

/* 视频说明文字 - 隐藏文件名底部显示 */
.video-caption {
    display: none;  /* 完全隐藏标题栏 */
}

/* 如果需要保留但隐藏文件名，使用以下替代方案 */
/*
.video-caption {
    padding: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}
*/


/* 视频预览图 */
.video-preview-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

.video-preview-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 播放按钮覆盖层 */
.video-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background var(--transition-normal);
}

.video-preview:hover .video-preview-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* 播放按钮图标 */
.video-preview-play-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.video-preview:hover .video-preview-play-icon {
    background: var(--color-white);
    transform: scale(1.1);
}

.video-preview-play-icon::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent var(--color-primary);
    margin-left: 5px;
}

/* 视频信息栏 */
.video-preview-info {
    padding: 16px;
    background: var(--color-white);
    border-top: 1px solid var(--color-gray-200);
}

.video-preview-title {
    margin: 0 0 8px 0;
    font-size: var(--font-size-body);
    font-weight: 500;
    color: var(--color-gray-500);
    line-height: 1.5;
}

.video-preview-description {
    margin: 0;
    font-size: var(--font-size-small);
    color: var(--color-gray-400);
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-container,
    .video-preview {
        margin: 16px 0;
        border-radius: 4px;
    }
    
    .video-caption,
    .video-preview-info {
        padding: 12px;
    }
    
    .video-preview-play-icon {
        width: 60px;
        height: 60px;
    }
    
    .video-preview-play-icon::before {
        border-width: 12px 0 12px 20px;
        margin-left: 4px;
    }
}

/* ========================================
   Grid Layout Card Styling - Quectel Official Style
   完全参考移远官网视频网格样式
   ======================================== */

/* Grid 容器 */
/* .sd-container-fluid 自身的布局（DEV-33547 / t290008 修复轮）：
   sphinx_design 移除后（W4），13 个 md 文件手写的 <div class="sd-container-fluid">
   失去了扩展 CSS 的 `margin-inline:auto + padding-inline:var(--sd-gutter-x,.75rem)`
   （0.75rem = 12px），图片栅格比正文左右各外扩 24px（MR !198
   Round 1 P1 实测）。此处按同一语义复刻，仅恢复容器自身，列宽规则见下方。 */
.sd-container-fluid {
    margin-left: auto;
    margin-right: auto;
    padding-left: 12px;
    padding-right: 12px;
    width: 100%;
}

.sd-container-fluid .sd-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 64px 0 32px 0;
}

/* ========================================
   Grid 布局样式 - 仅负责布局，不添加装饰
   ======================================== */

/* Grid 列宽控制 - 这是布局核心功能 */
/* 特定列宽 - 手动指定（考虑 gap: 24px）*/
/* 简化方案：所有列统一减去 gap 的一半 (24px / 2 = 12px) */
/* 对于特殊的 3 列布局(sd-col-4)，需要减 16px (48px / 3) */
.sd-col-1 { flex: 0 0 calc(8.333333% - 12px) !important; max-width: calc(8.333333% - 12px); }
.sd-col-2 { flex: 0 0 calc(16.666667% - 12px) !important; max-width: calc(16.666667% - 12px); }
.sd-col-3 { flex: 0 0 calc(25% - 12px) !important; max-width: calc(25% - 12px); }
.sd-col-4 { flex: 0 0 calc(33.333333% - 16px) !important; max-width: calc(33.333333% - 16px); }
.sd-col-5 { flex: 0 0 calc(41.666667% - 12px) !important; max-width: calc(41.666667% - 12px); }
.sd-col-6 { flex: 0 0 calc(50% - 12px) !important; max-width: calc(50% - 12px); }
.sd-col-7 { flex: 0 0 calc(58.333333% - 12px) !important; max-width: calc(58.333333% - 12px); }
.sd-col-8 { flex: 0 0 calc(66.666667% - 12px) !important; max-width: calc(66.666667% - 12px); }
.sd-col-9 { flex: 0 0 calc(75% - 12px) !important; max-width: calc(75% - 12px); }
.sd-col-10 { flex: 0 0 calc(83.333333% - 12px) !important; max-width: calc(83.333333% - 12px); }
.sd-col-11 { flex: 0 0 calc(91.666667% - 12px) !important; max-width: calc(91.666667% - 12px); }
.sd-col-12 { flex: 0 0 100% !important; max-width: 100%; }

/* Grid Item 列 - 仅布局 */
.sd-col {
    display: block; /* 改为 block，不使用 flex，避免影响内容布局 */
    /* 移除所有装饰性样式，只保留布局 */
    /* 列内边距（DEV-33547 / t290008 修复轮）：sphinx_design 的 `.sd-row>*` 在基线上
       给每列 12px 左右 padding（border-box，实测图块宽 293.5 = 列宽 317.5 - 24）。
       移除扩展后该 padding 一并消失，这里按同一语义补回，三档视口图块宽度才回 base 值。 */
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
}

/* 移除之前的卡片装饰样式 */
/* Grid 不应该有阴影、边框、背景等装饰 */
/* 如果需要卡片效果，应在内容中使用 sd-card 指令 */

/* 确保等高布局 - 这是布局功能，保留 */
.sd-row {
    align-items: stretch;
}

/* 移除这个规则，因为它会覆盖 .sd-col-{n} 的 flex 设置 */
/* .sd-row .sd-col {
    display: flex;
} */

/* 响应式设计 - 仅调整布局间距 */
@media (max-width: 768px) {
    .sd-container-fluid .sd-row {
        gap: 16px;
        margin: 32px 0 16px 0;
    }
}

/* ========================================
   Word 转换页保真规则（.quectel-content.word-html-document / 旧版包裹 div）
   转换页要像 Word 原稿那样排版：
   - 字体取原稿字体：品牌字体（Stratos 及其回退）的圆形大写 O 在复核里被读成数字零，
     而 Word PDF 用的是 Arial 的窄 O（保真复核 870）。Word 转换页的字体本来也由
     原稿决定，站点手写页面不受影响。
   - 带连字符的复合词不拆行：Word 不把 "non-exclusive" / "third-party" 断成两行，
     浏览器会在连字符处断行（876）。清洗阶段已用 span.word-nowrap 标出这些词。
   - 页面上不再出现自动断词（hyphens），断词同样会把单词拆开。
   - Word 书签留下的空锚点不是链接，不能按主题的链接色渲染（874）。
   ======================================== */
.quectel-content.word-html-document,
.quectel-content .word-html-document,
.quectel-content.word-html-document table,
.quectel-content .word-html-document table,
.quectel-content table.word-table {
    font-family: "Arial", "Helvetica Neue", Helvetica, sans-serif;
}

.quectel-content.word-html-document td,
.quectel-content.word-html-document th,
.quectel-content .word-html-document td,
.quectel-content .word-html-document th {
    font-family: inherit;
}

.quectel-content.word-html-document p,
.quectel-content.word-html-document li,
.quectel-content.word-html-document td,
.quectel-content.word-html-document th,
.quectel-content .word-html-document p,
.quectel-content .word-html-document li,
.quectel-content .word-html-document td,
.quectel-content .word-html-document th {
    hyphens: none !important;
    -webkit-hyphens: none !important;
}

.quectel-content.word-html-document .word-nowrap,
.quectel-content .word-html-document .word-nowrap {
    white-space: nowrap;
}

/* A step item's label sits in a box the cleaner sizes to Word's tab stop
   (`word_html_cleaner` writes `span.word-marker` with that width). The box is a Word
   measurement, while the delivered page sets the text larger: Word's 10.5 pt export body is
   15 px here, so a four-character label needs 60 px inside a 56.7 px box. With the line able
   to break, the label wrapped inside its own box and the item's text started on a second
   line - the review's "步骤二、三内容段落没对齐，空格有误" (DEV-15090 1810). The artifact
   stylesheet (`word2html/style.css`) already states this for the packaged page; the delivered
   page reads this one. */
.quectel-content.word-html-document .word-marker,
.quectel-content .word-html-document .word-marker {
    white-space: nowrap;
}

/* Word's authored blank line (``p.word-gap``): a converted page receives the paragraph the
   cleaner kept, because Markdown cannot write "one blank line here" and the line *is* the gap
   Word printed (``markdown_export.GAP_CLASS``, 人工评论 4506「不同参数之间的间距可以大一些」).
   It is one line box of the body text it sits in and carries no paragraph spacing of its own -
   the artifact stylesheet (``word2html/style.css``) states the same for the packaged page.
   ``!important`` because the converted page's paragraph rule is the long ``:not()`` chain above,
   whose specificity no selector naming this block can reach (measured there: a plain
   ``margin-bottom: 0`` left 8px standing). */
.quectel-content.word-html-document p.word-gap,
.quectel-content .word-html-document p.word-gap {
    margin: 0 !important;
    min-height: 1.5em;
    line-height: 1.5em;
}

.quectel-content.word-html-document a:not([href]),
.quectel-content .word-html-document a:not([href]) {
    color: inherit;
    text-decoration: none;
}

/* Word prints its footnotes at the foot of the page, in a smaller face, under one hairline.
   The cleaner moves every note out of the export's trailing footnote section and back to the
   foot of the section that cites it, marked ``.word-footnotes``
   (``word_html_cleaner._relocate_footnotes``); the artifact stylesheet (``word2html/style.css``)
   stated the look and this sheet never did, so on the delivered page a note printed at body size
   in body ink and read as prose - the shape 人工评论 6213 reported (「不能插入正文中」). The
   hairline belongs to the *group*, not to each note: consecutive notes are one apparatus, the
   way Word rules them. */
.quectel-content.word-html-document .word-footnotes,
.quectel-content .word-html-document .word-footnotes {
    font-size: 0.86em;
    color: #444;
    border-top: 1px solid #d9d9d9;
    margin: 10px 0 14px;
    padding-top: 6px;
}

.quectel-content.word-html-document .word-footnotes + .word-footnotes,
.quectel-content .word-html-document .word-footnotes + .word-footnotes {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

/* MD-77 narrows MD-45: the apparatus hairline separates notes from **prose**, not from a table.
 *
 * Since 2026-11-09 a note cited from a table cell stays under that table (FIX-12, the cleaner's
 * ``word-footnotes-after-table`` mark), and the table's own bottom border is already the rule
 * between the two blocks. MD-45's hairline then printed a second, identical line 10 px below the
 * first - 人工评论 8828 (第 38 页, this document's antenna table) reads it as a rule the page
 * invented: 「脚注上方自动渲染出一条横线」. The ``.table-wrapper`` the page script puts around
 * every converted table is the same shape from the CSS side, so a note group that follows a table
 * carries neither the rule nor the gap that went with it, whichever route placed it there. A group
 * that opens against body text keeps MD-45's look (人工评论 6213 「不能插入正文中」).
 */
.quectel-content.word-html-document .word-footnotes-after-table,
.quectel-content .word-html-document .word-footnotes-after-table,
.quectel-content.word-html-document .table-wrapper + .word-footnotes,
.quectel-content .word-html-document .table-wrapper + .word-footnotes {
    border-top: none;
    margin-top: 6px;
    padding-top: 0;
}

.quectel-content.word-html-document .word-footnotes p,
.quectel-content .word-html-document .word-footnotes p {
    margin: 0 0 4px;
}

/* DEV-31199 (DEC-09 / DEC-43): 脚注引用的悬停浮窗与文末「编号 ｜ 参考」汇总表。
   浮窗数据由转换器写在引用锚点上（`data-footnote-text`，存量页回退 `title`），
   交互脚本 `footnote-popover.js` 只在 `.word-html-document` 页初始化。 */
.quectel-content.word-html-document a[data-footnote-text],
.quectel-content .word-html-document a[data-footnote-text] {
    cursor: help;
    text-decoration: none;
    color: inherit;
}

.footnote-popover {
    position: fixed;
    z-index: 9999;
    max-width: min(420px, calc(100vw - 32px));
    max-height: 40vh;
    overflow: auto;
    padding: 10px 12px;
    font-size: 0.9em;
    line-height: 1.6;
    color: #444;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: var(--radius-md, 8px);
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.15));
    display: none;
}

.footnote-popover[data-open="true"] {
    display: block;
}

.footnote-popover .footnote-popover-mark {
    color: var(--color-primary, #0066CC);
    font-weight: 600;
    margin-right: 4px;
}

.footnote-popover a {
    color: var(--color-primary, #0066CC);
}

/* 文末「编号 ｜ 参考」汇总表（attrs-block `{.word-footnote-summary}`，Sphinx 渲染为
   `table.word-footnote-summary`）。

   它按**普通 Markdown 管道表**呈现（业主 2026-11-17「表格样式要统一按照 md 渲染后的来体现」）：
   站点表的全宽、`--font-size-body` 正文号、红字表头、行框线全部照 `.quectel-content table.docutils`
   走，这里**不再**声明字号与墨色。此前这里给它小字号（0.86em）＋灰墨（#444）＋上横线，想与
   `.word-footnotes` 例外形态同一视觉族，代价是它与页面上其它 Markdown 表看起来不是一套东西。

   只保留两点必要约束：编号列不换行且只占内容宽（否则 `[33]` 会把参考列挤窄），
   回链保持站点链接色（它没有指向站外，`a` 的默认样式在这里会被文档墨色覆盖）。 */
.quectel-content.word-html-document table.word-footnote-summary th:first-child,
.quectel-content .word-html-document table.word-footnote-summary th:first-child,
.quectel-content.word-html-document table.word-footnote-summary td:first-child,
.quectel-content .word-html-document table.word-footnote-summary td:first-child {
    white-space: nowrap;
    width: 1%;
}

.quectel-content.word-html-document table.word-footnote-summary a,
.quectel-content .word-html-document table.word-footnote-summary a {
    color: var(--color-primary, #0066CC);
    text-decoration: none;
}

/* A converted page's headings print Word's bold, not the theme's brand weight.
 *
 * `--font-weight-bold` is 500 because the site's brand face (Stratos) ships 400 and 500 only, and
 * every site heading rule states that variable. A converted page prints Arial instead - see the
 * `font-family` rule above, which takes the document's own ink and face - and Arial ships 400 and
 * 700 only, so 500 rounded down to 400 and *every* heading of a converted page reached the reader
 * regular. 人工评论 7397 (DEV-32088 修复轮 5, Quectel_HCM111Z_AT命令手册_V1.0, 原 PDF 第 12 页
 * 「标题和表格的第一行没加粗」) pinned 2.1.1 `AT+QRST 重启模块`: Word's `Quectel3` style states bold
 * and Word's own PDF prints bold; the packaged artifact prints bold too
 * (`word2html/style.css`: `.div-h3 > h3 { font-weight: 700 }`), while the delivered page measured
 * `getComputedStyle(h3).fontWeight === "500"` with `font-family: Arial` in the offline build.
 *
 * This is the mis-weight the note's `<strong>` had (the `admonition strong` rule above states it
 * there), fixed the same way: the literal 700 rather than the variable, scoped to the
 * `word-html-document` mark so the site's hand-written pages keep the brand font's 500. The
 * selectors come last in this sheet, and out-specify the site's own `.quectel-content h3` (0,1,1).
 */
.quectel-content.word-html-document h1,
.quectel-content.word-html-document h2,
.quectel-content.word-html-document h3,
.quectel-content.word-html-document h4,
.quectel-content.word-html-document h5,
.quectel-content.word-html-document h6,
.quectel-content .word-html-document h1,
.quectel-content .word-html-document h2,
.quectel-content .word-html-document h3,
.quectel-content .word-html-document h4,
.quectel-content .word-html-document h5,
.quectel-content .word-html-document h6 {
    font-weight: 700;
}


/* ========================================
   批量下载弹窗（设计稿 961-5456）
   ========================================
   挂在 body 上、由脚本按需创建（不是每个页面都渲染 800×794 的空壳）。所有尺寸取自设计稿：
   面板 800 宽、24 内边距、24 行间距；弹窗内部行高 52、表头行高 50，分页器 40 高。

   颜色只用移远红 #ED000C 与中性灰，不引第三方控件样式（AGENTS.md：UI 须遵循移远风格）。 */

.qdoc-batch-download-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3);
}

.qdoc-batch-download-overlay[hidden] {
    display: none !important;
}

.qdoc-batch-download-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 800px;
    max-width: 100%;
    max-height: 794px;
    padding: 24px;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-family: var(--font-family);
}

/* 头部：标题 + 关闭 */
.qdoc-batch-download-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.qdoc-batch-download-title {
    margin: 0;
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 500;
    line-height: 36px;
}

.qdoc-batch-download-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: #1a1a1a;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.qdoc-batch-download-close:hover {
    opacity: 0.6;
}

.qdoc-batch-download-close svg {
    display: block;
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

/* 操作行：主按钮 + 已选数量 chip */
.qdoc-batch-download-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qdoc-batch-download-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 15px;
    border: none;
    border-radius: 4px;
    background: #ed000c;
    color: #ffffff;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.qdoc-batch-download-submit:hover:not(:disabled) {
    background: #c9000b;
}

/* 未选任何文件时按钮不可点：设计稿里它只在有选中项时才有意义。 */
.qdoc-batch-download-submit:disabled {
    background: #f5b3b6;
    cursor: not-allowed;
}

.qdoc-batch-download-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    padding: 0 10px 0 11px;
    box-sizing: border-box;
    border-radius: 4px;
    /* #ED000C 的 5% 透明底，用 rgba 写是为了不依赖 color-mix 的浏览器支持。 */
    background: rgba(237, 0, 12, 0.05);
    color: #ed000c;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    white-space: nowrap;
}

.qdoc-batch-download-count[hidden] {
    display: none !important;
}

.qdoc-batch-download-count-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    background: transparent;
    color: #ed000c;
    cursor: pointer;
}

.qdoc-batch-download-count-clear svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* 列表 */
.qdoc-batch-download-list {
    display: flex;
    flex-direction: column;
    /* 面板高度固定但条目可变：列表自己滚动，分页器留在底部看得见。 */
    min-height: 0;
    overflow-y: auto;
    border-top: 1px solid #e9ecec;
}

.qdoc-batch-download-row {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 52px;
    padding: 0 14px;
    box-sizing: border-box;
    border-bottom: 1px solid #f0f3f3;
    flex-shrink: 0;
}

.qdoc-batch-download-row.is-header {
    height: 50px;
    border-bottom-color: #e9ecec;
    /* 表头吸顶，滚动时列名不丢。 */
    position: sticky;
    top: 0;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    z-index: 1;
}

.qdoc-batch-download-cell-name {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

/* 名称过长时省略，不挤压后面的列 */
.qdoc-batch-download-cell-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qdoc-batch-download-cell-type,
.qdoc-batch-download-cell-size,
.qdoc-batch-download-cell-action {
    flex: 0 0 100px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

/* 大小沿用设计稿的 Stratos 350/14，数字对齐更稳 */
.qdoc-batch-download-cell-size {
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.qdoc-batch-download-cell-action {
    display: flex;
    align-items: center;
    flex: 0 0 32px;
}

.qdoc-batch-download-row.is-header .qdoc-batch-download-cell-type,
.qdoc-batch-download-row.is-header .qdoc-batch-download-cell-size {
    flex-basis: 100px;
}

.qdoc-batch-download-row.is-header .qdoc-batch-download-cell-action {
    flex-basis: 32px;
}

/* 单个文件下载图标 */
.qdoc-batch-download-file-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #ed000c;
}

.qdoc-batch-download-file-link svg {
    display: block;
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

/* 复选框：14×14，选中为品牌红 + 白勾 */
.qdoc-batch-download-checkbox {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    border: 1px solid #d8dbdb;
    border-radius: 2px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.qdoc-batch-download-checkbox:checked,
.qdoc-batch-download-checkbox:indeterminate {
    background: #ed000c;
    border-color: #ed000c;
}

/* 勾：两条边框拼出的对勾，省掉一个内联 SVG */
.qdoc-batch-download-checkbox:checked::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 4px;
    width: 3px;
    height: 7px;
    border: solid #ffffff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

/* 半选：一条白横线（设计稿的 indeterminate 形态） */
.qdoc-batch-download-checkbox:indeterminate::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 3px;
    width: 8px;
    height: 2px;
    background: #ffffff;
}

.qdoc-batch-download-checkbox:focus-visible {
    outline: 2px solid rgba(237, 0, 12, 0.4);
    outline-offset: 2px;
}

/* 分页器 */
.qdoc-batch-download-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 40px;
}

.qdoc-batch-download-pagination[hidden] {
    display: none !important;
}

.qdoc-batch-download-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    box-sizing: border-box;
    border: none;
    border-radius: 2px;
    background: #ebedef;
    color: #333333;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.qdoc-batch-download-page:hover:not(:disabled):not(.is-active) {
    background: #dfe2e5;
}

.qdoc-batch-download-page.is-active {
    background: #ed000c;
    color: #ffffff;
    cursor: default;
}

.qdoc-batch-download-page:disabled {
    color: #c4c8c8;
    cursor: not-allowed;
}

/* 状态文案（加载中 / 空列表 / 出错）*/
.qdoc-batch-download-status {
    padding: 48px 0;
    color: #666666;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
}

.qdoc-batch-download-status[hidden] {
    display: none !important;
}

/* 需登录提示：服务端只把公开文件打进 zip，其余写进 zip 里的 README。 */
.qdoc-batch-download-note {
    margin: 0;
    color: #666666;
    font-size: 12px;
    line-height: 20px;
}

.qdoc-batch-download-note[hidden] {
    display: none !important;
}

/* 打开弹窗时锁住页面滚动，避免背景跟着滚 */
body.qdoc-batch-download-open {
    overflow: hidden;
}
