/*
 * 帮助中心前台样式（公开页面 /help，独立于用户中心与开发文档布局）。
 * 企业级极简：白底 / #F8FAFC 浅灰底、1px 边框、0–4px 圆角、阴影不超过 0 1px 2px rgba(0,0,0,.05)、单一品牌蓝 + 中性灰阶。
 * 复用 resources/css/app.css 的变量与 .button、.brand-mark、.sr-only、.skip-link，其余类名统一以 help- 为前缀。
 *
 * 断点：≥1200 桌面三栏（目录 + 正文 + 本页目录）；768–1199 iPad / 小屏桌面两栏（目录 + 正文，本页目录折叠在正文顶部）；
 *       ≤767 手机单栏（目录改为左侧抽屉，顶栏搜索收起为图标）。
 */

/* ==================== 基础 ==================== */
.help-html {
    background: var(--card);
}

.help-body {
    --help-topbar-height: 56px;
    --help-sidebar-width: 248px;
    --help-toc-width: 220px;
    --help-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background: var(--card);
    color: var(--text);
}

.help-body [hidden] {
    display: none !important;
}

body.help-drawer-open {
    overflow: hidden;
}

.help-body a {
    color: var(--brand);
    text-decoration: none;
}

.help-body a:hover {
    color: var(--brand-strong);
}

/* 统一可见焦点 */
.help-body a:focus-visible,
.help-body button:focus-visible,
.help-body summary:focus-visible,
.help-body input:focus-visible,
.help-body [tabindex]:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.help-main:focus {
    outline: 0;
}

.help-icon-button {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.help-icon-button:hover {
    background: var(--page);
    color: var(--brand-strong);
}

.help-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== 顶栏 ==================== */
.help-topbar {
    position: sticky;
    z-index: 40;
    top: 0;
    border-bottom: 1px solid var(--border);
    background: var(--card);
}

.help-topbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--help-topbar-height);
    padding: 0 24px;
}

.help-brand {
    display: flex;
    min-width: 0;
    flex: none;
    align-items: center;
    gap: 12px;
}

.help-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.help-body .help-brand-link,
.help-body .help-brand-link:hover {
    color: var(--text);
}

.help-brand-mark {
    width: 30px;
    height: 30px;
}

.help-brand-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.help-brand-divider {
    width: 1px;
    height: 18px;
    background: var(--border-strong);
}

.help-body .help-brand-title {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.help-body .help-brand-title:hover {
    color: var(--brand);
}

.help-top-search {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 360px;
    flex: 1 1 auto;
    align-items: center;
    margin-left: 16px;
}

.help-top-search-icon {
    position: absolute;
    left: 10px;
    color: var(--subtle);
    pointer-events: none;
}

.help-top-search input {
    width: 100%;
    height: 34px;
    padding: 0 12px 0 34px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--page);
    color: var(--text);
    font-size: 13px;
}

.help-top-search input::placeholder {
    color: #64748b;
}

.help-top-search input:focus {
    border-color: var(--brand);
    outline: 0;
    background: var(--card);
}

.help-top-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.help-body .help-top-link {
    display: inline-flex;
    height: 34px;
    align-items: center;
    padding: 0 10px;
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.help-body .help-top-link:hover {
    background: var(--page);
    color: var(--brand-strong);
}

.help-top-actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
}

.help-top-button {
    min-height: 32px;
}

.help-body .button-primary,
.help-body .button-primary:hover {
    color: #fff;
}

.help-body .button-secondary {
    color: var(--muted);
}

.help-body .button-secondary:hover {
    color: var(--brand-strong);
}

.help-search-trigger,
.help-menu-button {
    display: none;
}

/* ==================== 页面骨架 ==================== */
.help-page {
    display: flex;
    flex: 1 0 auto;
    align-items: flex-start;
}

.help-main {
    min-width: 0;
    flex: 1 1 auto;
}

/* ==================== 左侧目录 ==================== */
.help-sidebar {
    position: sticky;
    top: var(--help-topbar-height);
    display: flex;
    width: var(--help-sidebar-width);
    height: calc(100vh - var(--help-topbar-height));
    flex: none;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: var(--page);
}

.help-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 12px 8px;
}

.help-body .help-sidebar-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.help-body .help-sidebar-home:hover {
    background: var(--card);
    color: var(--brand-strong);
}

.help-tree {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 8px 16px;
    overscroll-behavior: contain;
}

.help-tree-group + .help-tree-group {
    margin-top: 2px;
}

.help-tree-summary {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.help-tree-summary::-webkit-details-marker {
    display: none;
}

.help-tree-summary:hover {
    background: var(--card);
}

.help-tree-summary > svg:first-child {
    flex: none;
    color: var(--subtle);
}

.help-tree-group.is-current > .help-tree-summary > svg:first-child {
    color: var(--brand);
}

.help-tree-chevron {
    flex: none;
    margin-left: auto;
    color: var(--subtle);
    transition: transform .15s ease;
    transform: rotate(-90deg);
}

.help-tree-group[open] > .help-tree-summary .help-tree-chevron {
    transform: rotate(0);
}

.help-tree-list {
    margin: 2px 0 6px;
    padding: 0;
    list-style: none;
}

.help-body .help-tree-link {
    position: relative;
    display: block;
    padding: 7px 8px 7px 32px;
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.help-body .help-tree-link:hover {
    background: var(--card);
    color: var(--brand-strong);
}

.help-body .help-tree-link.is-active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-weight: 600;
}

.help-body .help-tree-link.is-active::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 20px;
    width: 2px;
    background: var(--brand);
    content: "";
}

.help-body .help-tree-overview {
    color: var(--subtle);
}

.help-sidebar-foot {
    display: none;
}

.help-backdrop {
    display: none;
}

/* ==================== 首页 ==================== */
.help-hero {
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--border);
    background: var(--page);
}

.help-hero h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
}

.help-hero-desc {
    max-width: 720px;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.help-hero-search {
    display: flex;
    max-width: 720px;
    gap: 8px;
}

.help-hero-input-wrap {
    position: relative;
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
}

.help-hero-input-wrap svg {
    position: absolute;
    left: 14px;
    color: var(--subtle);
    pointer-events: none;
}

.help-hero-input-wrap input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    font-size: 14px;
}

.help-hero-input-wrap input::placeholder {
    color: #64748b;
}

.help-hero-input-wrap input:focus {
    border-color: var(--brand);
    outline: 0;
}

.help-hero-input-wrap input[aria-invalid="true"] {
    border-color: var(--danger);
}

.help-hero-submit {
    min-width: 88px;
    min-height: 44px;
}

.help-hot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
}

.help-hot-label {
    color: var(--muted);
}

.help-hot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.help-body .help-hot-list a {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--card);
    color: var(--muted);
}

.help-body .help-hot-list a:hover {
    border-color: #93c5fd;
    color: var(--brand-strong);
}

.help-home {
    padding-top: 32px;
    padding-bottom: 48px;
}

.help-section-head h2,
.help-panel-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
}

.help-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.help-category-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.help-category-card:hover {
    border-color: #bfdbfe;
}

.help-category-head {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.help-category-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--brand-soft);
    color: var(--brand);
}

.help-category-copy {
    min-width: 0;
}

.help-category-copy h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
}

.help-body .help-category-copy h3 a {
    color: var(--text);
}

.help-body .help-category-copy h3 a:hover {
    color: var(--brand);
}

.help-category-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.help-category-links {
    flex: 1 1 auto;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.help-category-links li + li {
    margin-top: 2px;
}

.help-body .help-category-links a {
    display: block;
    overflow: hidden;
    padding: 4px 0;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.help-body .help-category-links a:hover {
    color: var(--brand-strong);
}

.help-category-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    align-self: flex-start;
    font-size: 13px;
    font-weight: 600;
}

.help-home-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.help-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.help-rank-list,
.help-recent-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.help-rank-list li,
.help-recent-list li {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.help-rank-list li:last-child,
.help-recent-list li:last-child {
    border-bottom: 0;
}

.help-rank-list a,
.help-recent-list a {
    overflow: hidden;
    min-width: 0;
    flex: 1 1 auto;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.help-body .help-rank-list a,
.help-body .help-recent-list a {
    color: var(--text);
}

.help-body .help-rank-list a:hover,
.help-body .help-recent-list a:hover {
    color: var(--brand);
}

.help-rank-num {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    background: var(--page);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.help-rank-list li:nth-child(-n + 3) .help-rank-num {
    background: var(--brand);
    color: #fff;
}

.help-rank-tag {
    flex: none;
    padding: 1px 6px;
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.help-recent-list time {
    flex: none;
    color: var(--muted);
    font-size: 12px;
}

/* ==================== 内容区通用 ==================== */
.help-content {
    min-width: 0;
    max-width: 860px;
    padding: 24px 40px 48px;
}

.help-content-wide {
    max-width: 960px;
}

.help-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 12px;
}

.help-breadcrumb svg {
    flex: none;
    color: var(--subtle);
}

.help-breadcrumb [aria-current="page"] {
    color: var(--text);
}

.help-category-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.help-category-header h1,
.help-article-header h1,
.help-search-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
}

.help-category-header p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.help-article-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.help-article-list li {
    border-bottom: 1px solid var(--border);
}

.help-body .help-article-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 4px;
    color: var(--text);
}

.help-body .help-article-row:hover {
    background: var(--page);
}

.help-article-row-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
}

.help-article-row-copy strong {
    font-size: 15px;
    font-weight: 600;
}

.help-body .help-article-row:hover strong {
    color: var(--brand-strong);
}

.help-article-row-copy small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.help-article-row-arrow {
    flex: none;
    color: var(--subtle);
}

/* ==================== 文章页 ==================== */
.help-article-layout {
    display: flex;
    align-items: flex-start;
}

.help-article-layout > .help-content {
    flex: 1 1 auto;
}

.help-article-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.help-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.help-article-summary {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-left: 3px solid var(--brand);
    background: var(--page);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

/* 右侧本页目录（≥1200） */
.help-toc {
    position: sticky;
    top: var(--help-topbar-height);
    width: var(--help-toc-width);
    flex: none;
    padding: 24px 16px 24px 0;
}

.help-toc-inner {
    max-height: calc(100vh - var(--help-topbar-height) - 48px);
    overflow-y: auto;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.help-toc-title {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.help-toc ul,
.help-toc-inline ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.help-body .help-toc a,
.help-body .help-toc-inline a {
    display: block;
    padding: 4px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.help-body .help-toc a:hover,
.help-body .help-toc-inline a:hover,
.help-body .help-toc a.is-active {
    color: var(--brand-strong);
}

.help-body .help-toc a.is-active {
    font-weight: 600;
}

.help-toc-level-3 {
    padding-left: 12px;
}

/* 正文顶部可折叠的本页目录（<1200） */
.help-toc-inline {
    display: none;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--page);
}

.help-toc-inline summary {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.help-toc-inline summary::-webkit-details-marker {
    display: none;
}

.help-toc-inline summary svg:first-child {
    color: var(--brand);
}

.help-toc-chevron {
    margin-left: auto;
    color: var(--subtle);
    transition: transform .15s ease;
    transform: rotate(-90deg);
}

.help-toc-inline[open] .help-toc-chevron {
    transform: rotate(0);
}

.help-toc-inline ul {
    padding: 4px 12px 10px;
    border-top: 1px solid var(--border);
}

.help-body .help-toc-inline a {
    padding: 6px 0;
    font-size: 13px;
}

/* 锚点跳转时让标题避开固定顶栏 */
.help-prose [id] {
    scroll-margin-top: calc(var(--help-topbar-height) + 16px);
}

/* ==================== 正文排版（Markdown 渲染结果，预览区共用） ==================== */
.help-prose {
    color: var(--text);
    font-size: 14px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.help-prose > :first-child {
    margin-top: 0;
}

.help-prose h2 {
    margin: 32px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
}

.help-prose h3 {
    margin: 24px 0 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.help-prose h4,
.help-prose h5,
.help-prose h6 {
    margin: 20px 0 8px;
    font-size: 14px;
    font-weight: 700;
}

.help-prose p {
    margin: 0 0 12px;
}

.help-prose ul,
.help-prose ol {
    margin: 0 0 12px;
    padding-left: 22px;
}

.help-prose li + li {
    margin-top: 4px;
}

.help-prose li > ul,
.help-prose li > ol {
    margin: 4px 0 0;
}

.help-prose a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.help-prose strong {
    font-weight: 700;
}

.help-prose code {
    padding: 1px 5px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--page);
    color: #0f172a;
    font-family: var(--help-mono, ui-monospace, Menlo, Consolas, monospace);
    font-size: 12.5px;
}

.help-prose pre {
    overflow-x: auto;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--page);
    line-height: 1.6;
}

.help-prose pre code {
    padding: 0;
    border: 0;
    background: transparent;
    white-space: pre;
}

.help-prose blockquote {
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid #bfdbfe;
    border-left: 3px solid var(--brand);
    border-radius: 2px;
    background: var(--brand-soft);
    color: #1e3a8a;
}

.help-prose blockquote > :last-child {
    margin-bottom: 0;
}

.help-prose hr {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.help-prose img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
}

.help-table-wrap {
    overflow-x: auto;
    margin: 0 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.help-prose table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.6;
}

.help-prose th,
.help-prose td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.help-prose th {
    background: var(--page);
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}

.help-prose tbody tr:last-child td {
    border-bottom: 0;
}

/* ==================== 反馈 / 翻页 / 联系 ==================== */
.help-feedback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--page);
}

.help-feedback-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.help-feedback-form {
    display: flex;
    gap: 8px;
}

.help-feedback-button svg {
    flex: none;
}

.help-feedback-button[aria-pressed="true"] {
    border-color: var(--brand);
    color: var(--brand-strong);
}

.help-feedback-done {
    margin: 0;
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}

.help-feedback-done.is-error {
    color: var(--danger);
}

.help-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.help-body .help-pager-link {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}

.help-body .help-pager-link:hover {
    border-color: #93c5fd;
    color: var(--brand-strong);
}

.help-pager-link small {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--muted);
    font-size: 12px;
}

.help-pager-link strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.help-pager-link.is-next {
    align-items: flex-end;
    text-align: right;
}

.help-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.help-contact-copy {
    min-width: 0;
    flex: 1 1 320px;
}

.help-contact h2 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
}

.help-contact p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.help-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ==================== 搜索 / 空状态 ==================== */
.help-search-form {
    margin-top: 12px;
}

.help-field-error {
    margin: 8px 0 0;
    color: var(--danger);
    font-size: 13px;
}

.help-search-tip,
.help-search-count {
    margin: 16px 0;
    color: var(--muted);
    font-size: 13px;
}

.help-search-count strong {
    color: var(--brand-strong);
}

.help-result-list {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
    list-style: none;
}

.help-result {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.help-result-title {
    font-size: 16px;
    font-weight: 600;
}

.help-result-snippet {
    margin: 6px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.help-result mark {
    padding: 0 1px;
    background: #fef3c7;
    color: inherit;
}

.help-result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.help-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.help-pagination .is-disabled {
    opacity: .55;
    pointer-events: none;
}

.help-pagination-info {
    color: var(--muted);
    font-size: 13px;
}

.help-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 40px 16px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    text-align: center;
}

.help-empty-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--page);
    color: var(--subtle);
}

.help-empty strong {
    font-size: 15px;
}

.help-empty p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

/* ==================== 页脚 ==================== */
.help-footer {
    border-top: 1px solid var(--border);
    background: var(--page);
}

.help-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    color: var(--muted);
    font-size: 12px;
}

.help-footer-inner p {
    margin: 0;
}

.help-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.help-body .help-footer-links a {
    color: var(--muted);
}

.help-body .help-footer-links a:hover {
    color: var(--brand-strong);
}

/* ==================== 响应式 ==================== */

/* 宽屏：右侧本页目录 */
@media (min-width: 1200px) {
    .help-toc-inline {
        display: none;
    }
}

/* <1200：右侧目录收起，改为正文顶部可折叠目录 */
@media (max-width: 1199px) {
    .help-toc {
        display: none;
    }

    .help-article-layout.has-toc .help-toc-inline {
        display: block;
    }

    .help-content {
        padding: 24px 32px 40px;
    }
}

/* iPad 横屏 / 小屏桌面 */
@media (max-width: 1199px) and (min-width: 768px) {
    .help-body {
        --help-sidebar-width: 224px;
    }
}

/* iPad 竖屏（768–1023）：两栏保留，顶栏精简 */
@media (max-width: 1023px) {
    .help-top-nav,
    .help-brand-name,
    .help-brand-divider {
        display: none;
    }

    .help-top-search {
        margin-left: 0;
    }

    .help-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .help-content {
        padding: 20px 24px 36px;
    }
}

/* 手机（≤767）：单栏，目录改为抽屉 */
@media (max-width: 767px) {
    .help-topbar-inner {
        gap: 8px;
        padding: 0 12px;
    }

    .help-top-search {
        display: none;
    }

    .help-search-trigger {
        display: inline-flex;
        margin-left: auto;
    }

    .help-top-actions {
        order: 3;
    }

    .help-top-actions .help-top-button:not(:last-child),
    .help-has-sidebar .help-top-actions {
        display: none;
    }

    .help-page {
        flex-direction: column;
        align-items: stretch;
    }

    /* 无脚本时：目录作为普通区块显示在正文上方 */
    .help-sidebar {
        position: static;
        width: auto;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    /* 脚本接管后：左侧抽屉 */
    .help-js .help-menu-button {
        display: inline-flex;
    }

    .help-js .help-sidebar {
        position: fixed;
        z-index: 60;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(86vw, 320px);
        height: 100%;
        border-right: 1px solid var(--border);
        border-bottom: 0;
        background: var(--card);
        visibility: hidden;
        transition: transform .2s ease, visibility .2s;
        transform: translateX(-100%);
    }

    .help-js .help-sidebar.is-open {
        visibility: visible;
        transform: translateX(0);
    }

    .help-js .help-sidebar-head {
        padding: 12px;
        border-bottom: 1px solid var(--border);
    }

    .help-js .help-sidebar-close {
        display: inline-flex;
    }

    .help-js .help-tree {
        padding-top: 8px;
    }

    .help-sidebar-foot {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 8px;
        border-top: 1px solid var(--border);
    }

    .help-body .help-sidebar-foot a {
        display: flex;
        min-height: 40px;
        align-items: center;
        gap: 8px;
        padding: 0 8px;
        border-radius: var(--radius);
        color: var(--muted);
        font-size: 13px;
    }

    .help-body .help-sidebar-foot a:hover {
        background: var(--page);
        color: var(--brand-strong);
    }

    .help-js .help-backdrop {
        position: fixed;
        z-index: 55;
        inset: 0;
        display: block;
        background: rgba(15, 23, 42, .32);
    }

    .help-body .help-tree-link,
    .help-tree-summary {
        min-height: 40px;
    }

    .help-body .help-tree-link {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .help-container {
        padding: 0 16px;
    }

    .help-hero {
        padding: 28px 0 24px;
    }

    .help-hero h1 {
        font-size: 22px;
    }

    .help-hero-desc {
        font-size: 13px;
    }

    .help-hero-submit {
        min-width: 64px;
    }

    .help-home {
        padding-top: 24px;
        padding-bottom: 32px;
    }

    .help-category-grid,
    .help-home-lists,
    .help-pager {
        grid-template-columns: minmax(0, 1fr);
    }

    .help-category-card,
    .help-panel {
        padding: 16px;
    }

    .help-body .help-category-links a {
        padding: 8px 0;
    }

    .help-content {
        max-width: none;
        padding: 16px 16px 32px;
    }

    .help-category-header h1,
    .help-article-header h1,
    .help-search-title {
        font-size: 21px;
    }

    .help-prose {
        font-size: 15px;
    }

    .help-prose h2 {
        font-size: 18px;
    }

    .help-feedback {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .help-feedback-form {
        width: 100%;
    }

    .help-feedback-button {
        min-height: 40px;
        flex: 1 1 0;
    }

    .help-pager-link.is-next {
        align-items: flex-start;
        text-align: left;
    }

    .help-pager-placeholder {
        display: none;
    }

    .help-contact {
        padding: 16px;
    }

    .help-contact-actions,
    .help-contact-actions .button {
        width: 100%;
    }

    .help-contact-actions .button {
        min-height: 40px;
    }

    .help-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .help-footer-links {
        gap: 0 16px;
    }

    /* 手机端页脚链接加大点击区域 */
    .help-body .help-footer-links a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        overflow-wrap: anywhere;
    }
}

@media (prefers-reduced-motion: reduce) {
    .help-js .help-sidebar,
    .help-tree-chevron,
    .help-toc-chevron {
        transition: none;
    }
}
