:root {
    --doc-nav-offset: 80px;
    --doc-max: 960px;
    --doc-sidebar-w: 260px;
}
html {
    scroll-behavior: smooth;
}

/* 容器与宽度 */
.agreement-doc {
    position: relative;
}

.doc {
    max-width: var(--doc-max);
}
.page-content{
    background: #fff;
    border-bottom: 1px solid var(--line);
}
/* 头部 */
.docHeader h3 {
    font-weight: 700;
}

.docHeader .text-muted {
    color: #6c757d !important;
}

/* 两栏布局 */
.docLayout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* 左侧目录（大屏为粘性侧栏） */
.docToc {
    order: 0;
    position: sticky;
    top: 60px;
    bottom: 0;
}

.docTocInner {
    position: sticky;
    top: calc(var(--doc-nav-offset) + 12px);
}

.docTocTitle {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.docTocNav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.docTocNav a {
    text-decoration: none;
    color: #1f2328;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px dashed transparent;
}

.docTocNav a:hover {
    background: rgba(13, 110, 253, 0.06);
    color: #0b5ed7;
}

.docTocNav a.is-active {
    background: rgba(13, 110, 253, 0.08);
    color: #0a58ca;
    border-color: rgba(13, 110, 253, 0.22);
}

/* 右侧正文 */
.docBody {
    color: #1f2328;
    font-size: 16px;
    line-height: 1.75;
}

.docSection {
    scroll-margin-top: calc(var(--doc-nav-offset) + 16px);
    margin-bottom: 28px;
    font-size: 1rem;
    color: var(--text);
}

.docSection h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--font);
}

.docSection h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--font);
}

.docSection ul {
    padding-left: 1.1rem;
    margin-bottom: 0;
}

.docSection li {
    margin: 6px 0;
}

.docSection p.note {
    margin-top: 8px;
    color: #6c757d;
    font-size: 0.95rem;
}
.banner .banner-title-text .tip {
    font-size: 1rem;
    color: #6c757d;
}

@media (min-width: 992px) {
    .doc {
        max-width: 100%;
    }

    .docLayout {
        grid-template-columns: var(--doc-sidebar-w) minmax(0, calc(var(--doc-max) - var(--doc-sidebar-w) - 32px));
        align-items: start;
    }
}

/* 小屏：目录放在上方块级显示 */
@media (max-width: 767.98px) {
    .docToc {
        border: 1px dashed #e5e7eb;
        border-radius: 12px;
        padding: 12px 14px;
        background: #fafbfc;
    }
}
