/* 帮助站点壳层：与官网首页一致的留白、字体与主色，正文区排版 */

.help-site-body {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 32%);
    min-height: 100vh;
}

.help-doc-layout {
    max-width: 80rem;
    margin: 0 auto;
    padding: 5rem 1rem 3rem;
    display: grid;
    grid-template-columns: minmax(13rem, 15.5rem) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .help-doc-layout {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 1023px) {
    .help-doc-layout {
        grid-template-columns: 1fr;
        padding-top: 4.5rem;
    }

    .doc-sidebar-wrap {
        display: none;
    }

    .doc-sidebar-wrap.is-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 80;
        background: rgba(15, 23, 42, 0.35);
        padding: 4.5rem 1rem 1rem;
    }

    .doc-sidebar-wrap.is-open .doc-sidebar {
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
    }
}

.doc-toc-toggle {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 70;
    padding: 0.65rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #24a1de 0%, #1d86ba 100%);
    box-shadow: 0 12px 30px -8px rgba(36, 161, 222, 0.55);
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .doc-toc-toggle {
        display: none;
    }
}

.doc-sidebar {
    padding: 0.85rem 0.65rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 10px 40px -18px rgba(15, 23, 42, 0.12);
}

.doc-sidebar .wy-side-nav-search {
    margin-bottom: 0.85rem;
    padding: 0 0.25rem;
}

.doc-sidebar .wy-side-nav-search > a {
    display: block;
    font-size: 0.8125rem;
    font-weight: 800;
    color: #0f172a;
    text-decoration: none;
    padding: 0.55rem 0.45rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, rgba(36, 161, 222, 0.08), rgba(99, 102, 241, 0.06));
    border: 1px solid rgba(36, 161, 222, 0.15);
}

.doc-sidebar .wy-side-nav-search > a:hover {
    color: #0f172a;
    border-color: #24a1de;
    background: rgba(36, 161, 222, 0.12);
}

/* 新版目录：卡片 + 折叠分组 */
.doc-nav-menu {
    font-size: 0.8125rem;
}

.doc-nav-cards {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.doc-nav-card--intro {
    padding: 0.45rem 0.35rem 0.15rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.doc-nav-intro-head {
    display: flex;
    justify-content: flex-end;
    padding: 0 0.35rem 0.35rem;
}

.doc-nav-card-count {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.doc-nav-card-titleline {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1;
    min-width: 0;
}

.doc-nav-card-titleline .doc-nav-card-title {
    flex: 1;
    min-width: 0;
}

.doc-nav-card-titleline .doc-nav-card-count {
    flex-shrink: 0;
    color: #94a3b8;
    font-weight: 700;
}

.doc-nav-card--intro ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-nav-card--intro .toctree-l1 > a {
    display: block;
    padding: 0.5rem 0.55rem;
    border-radius: 0.75rem;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.doc-nav-card--intro .toctree-l1 > a:hover {
    background: rgba(36, 161, 222, 0.08);
    color: #24a1de;
}

.doc-nav-card--intro .toctree-l1 > a.current,
.doc-nav-card--intro .toctree-l1.current > a {
    background: rgba(36, 161, 222, 0.12);
    color: #0f172a;
    border-left-color: #24a1de;
}

details.doc-nav-card {
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 12px -4px rgba(15, 23, 42, 0.06);
}

details.doc-nav-card summary {
    list-style: none;
    cursor: pointer;
    padding: 0.65rem 0.85rem;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: #0f172a;
    background: linear-gradient(90deg, #f8fafc, #fff);
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    user-select: none;
}

details.doc-nav-card summary::-webkit-details-marker {
    display: none;
}

details.doc-nav-card summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(-45deg);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

details.doc-nav-card[open] summary::after {
    transform: rotate(45deg);
}

details.doc-nav-card summary:hover {
    color: #24a1de;
}

.doc-nav-card-body {
    padding: 0.35rem 0.25rem 0.55rem;
}

.doc-nav-card-body ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-nav-card-body .toctree-l1 > a {
    display: block;
    padding: 0.4rem 0.55rem;
    margin-bottom: 2px;
    border-radius: 0.65rem;
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.doc-nav-card-body .toctree-l1 > a:hover {
    background: rgba(36, 161, 222, 0.08);
    color: #24a1de;
}

.doc-nav-card-body .toctree-l1 > a.current,
.doc-nav-card-body .toctree-l1.current > a {
    background: rgba(36, 161, 222, 0.1);
    color: #0f172a;
    border-left-color: #24a1de;
}

.doc-main {
    min-width: 0;
}

.doc-breadcrumb-bar {
    margin-bottom: 1.15rem;
    padding: 0.55rem 0.9rem;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 0.9rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.doc-breadcrumb-bar .wy-breadcrumbs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.doc-breadcrumb-bar .wy-breadcrumbs a {
    color: #24a1de;
    font-weight: 600;
    text-decoration: none;
}

.doc-breadcrumb-bar .wy-breadcrumbs a:hover {
    text-decoration: underline;
}

.doc-breadcrumb-bar hr {
    display: none;
}

.doc-article {
    padding: 1.5rem 1.25rem;
    border-radius: 1.25rem;
    background: #fff;
    border: 1px solid #e8eef5;
    box-shadow: 0 12px 40px -24px rgba(15, 23, 42, 0.14);
}

@media (min-width: 768px) {
    .doc-article {
        padding: 2rem 2.35rem;
    }
}

/* help 文档首页：单行 code 与功能列表 pre 固定可视高度，超出出现纵向滚动（不改 HTML 正文） */
.help-doc-home .help-article-inner > p > code {
    display: block;
    max-height: 2.85rem;
    overflow-y: auto;
    overflow-x: auto;
    overscroll-behavior: contain;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0.4rem 0.65rem;
    border-radius: 0.55rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.help-doc-home .help-article-inner pre {
    max-height: 17rem;
    overflow-y: auto;
    overflow-x: auto;
    overscroll-behavior: contain;
    border-radius: 0.85rem;
}

.help-article-inner {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #334155;
}

.help-article-inner p {
    margin-bottom: 1rem;
}

.help-article-inner h1,
.help-article-inner h2,
.help-article-inner h3,
.help-article-inner h4 {
    font-weight: 800;
    color: #0f172a;
    margin: 1.75rem 0 0.75rem;
    letter-spacing: -0.02em;
}

.help-article-inner h1 {
    font-size: 1.65rem;
}

.help-article-inner h2 {
    font-size: 1.3rem;
}

.help-article-inner h3 {
    font-size: 1.1rem;
}

.help-article-inner blockquote {
    border-left: 4px solid #24a1de;
    background: #f8fafc;
    padding: 0.65rem 1rem;
    margin: 1rem 0;
    border-radius: 0 0.85rem 0.85rem 0;
    color: #475569;
}

.help-article-inner pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem 1.15rem;
    border-radius: 0.85rem;
    overflow-x: auto;
    font-size: 0.8125rem;
    margin: 1rem 0;
}

.help-article-inner code {
    background: #f1f5f9;
    padding: 0.12rem 0.35rem;
    border-radius: 0.35rem;
    font-size: 0.85em;
}

.help-article-inner pre code {
    background: transparent;
    padding: 0;
}

.help-article-inner a,
.help-article-inner a.contactBtn {
    color: #24a1de;
    font-weight: 600;
}

.help-article-inner table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.15rem 0;
    font-size: 0.875rem;
}

.help-article-inner th,
.help-article-inner td {
    border: 1px solid #e2e8f0;
    padding: 0.55rem 0.65rem;
    vertical-align: top;
}

.help-article-inner thead {
    background: #f8fafc;
}

.help-article-inner img {
    max-width: 100%;
    height: auto;
    border-radius: 0.85rem;
    box-shadow: 0 10px 36px -12px rgba(15, 23, 42, 0.12);
}

.help-article-inner hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0, transparent);
    margin: 1.35rem 0;
}

/* 搜索页 */
.help-search-form input[type="text"] {
    width: 100%;
    max-width: 32rem;
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.help-search-results {
    font-size: 0.9375rem;
    color: #475569;
}
