/*
 * 文档式排版（参考 docs.bigmodel.cn 文档排版）
 * 作用域：.doc-typography
 * 说明：只影响内容区，不影响平台导航、按钮等组件
 */

/* ---------- 字体变量（供页面标题、侧栏共用） ---------- */
:root {
    --doc-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --doc-mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.doc-typography {
    --doc-text: #3f4046;
    --doc-heading: #17191e;
    --doc-muted: #6b7280;
    --doc-primary: #134cff;
    --doc-border: #e5e6eb;
    --doc-soft: #f7f8fa;
    font-family: var(--doc-font);
    font-size: 16px;
    line-height: 1.75;
    color: var(--doc-text);
    letter-spacing: 0.01em;
}

.about-page,
.news-page,
.detail-page,
.doc-page-head,
.doc-layout .doc-sidebar {
    font-family: var(--doc-font);
}

.doc-typography h1,
.doc-typography h2,
.doc-typography h3,
.doc-typography h4,
.doc-typography h5,
.doc-typography h6 {
    font-family: var(--doc-font);
    font-weight: 600;
    color: var(--doc-heading);
}

.doc-typography h1 {
    margin: 0 0 18px;
    font-size: 32px;
    line-height: 1.35;
    letter-spacing: -0.4px;
}

.doc-typography h2 {
    margin: 36px 0 16px;
    font-size: 24px;
    line-height: 1.45;
    letter-spacing: -0.2px;
}

.doc-typography h3 {
    margin: 28px 0 12px;
    font-size: 19px;
    line-height: 1.5;
}

.doc-typography h4 {
    margin: 24px 0 10px;
    font-size: 17px;
    line-height: 1.55;
}

.doc-typography p {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--doc-text);
}

.doc-typography p:last-child {
    margin-bottom: 0;
}

.doc-typography .doc-lead {
    font-size: 17px;
    line-height: 1.75;
    color: #4e5969;
}

.doc-typography strong,
.doc-typography b {
    font-weight: 600;
    color: var(--doc-heading);
}

.doc-typography a:not(.btn) {
    color: var(--doc-primary);
    text-decoration: none;
}

.doc-typography a:not(.btn):hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.doc-typography ul,
.doc-typography ol {
    margin: 0 0 18px;
    padding-left: 1.5em;
}

.doc-typography li {
    margin: 0 0 6px;
    line-height: 1.75;
}

.doc-typography ul > li {
    list-style: disc;
}

.doc-typography ol > li {
    list-style: decimal;
}

.doc-typography li::marker {
    color: #9aa1ad;
}

.doc-typography img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.doc-typography hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid var(--doc-border);
}

.doc-typography blockquote {
    margin: 26px 0;
    padding: 2px 0 2px 24px;
    border-left: 4px solid #dfe0e6;
    color: var(--doc-text);
    font-size: 15.5px;
    line-height: 1.8;
}

.doc-typography blockquote p {
    margin-bottom: 10px;
    font-size: inherit;
    line-height: inherit;
}

.doc-typography code {
    padding: 2px 6px;
    border-radius: 4px;
    background: #f2f3f5;
    color: #1f2328;
    font-family: var(--doc-mono);
    font-size: 0.875em;
}

.doc-typography pre {
    margin: 20px 0;
    padding: 16px 18px;
    border: 1px solid var(--doc-border);
    border-radius: 8px;
    background: var(--doc-soft);
    color: #1f2328;
    font-family: var(--doc-mono);
    font-size: 14px;
    line-height: 1.65;
    overflow: auto;
}

.doc-typography pre code {
    padding: 0;
    background: transparent;
    font-size: inherit;
}

.doc-typography table {
    width: 100%;
    margin: 20px 0;
    border: 1px solid var(--doc-border);
    border-collapse: collapse;
    font-size: 14.5px;
    line-height: 1.65;
}

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

.doc-typography th {
    background: var(--doc-soft);
    color: var(--doc-heading);
    font-weight: 600;
}

.doc-typography tr:last-child td {
    border-bottom: 0;
}

/* ---------- 页头 ---------- */
.doc-page-head {
    margin: 8px 0 30px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e6eb;
}

.doc-page-head h1 {
    margin: 0 0 8px;
    color: #17191e;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.4px;
}

.doc-page-head p {
    margin: 0;
    color: #6b7280;
    font-size: 13.5px;
    line-height: 1.6;
}

/* ---------- 左导航 + 正文两栏（参考文档站） ---------- */
.doc-layout {
    display: flex;
    align-items: flex-start;
    gap: 48px;
}

.doc-layout .doc-sidebar {
    flex: 0 0 260px;
    width: 260px;
    position: sticky;
    top: 24px;
}

.doc-layout .doc-main {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 860px;
}

/* ---------- 左侧文档导航 ---------- */
.doc-tabs {
    margin: 0 0 18px;
    border: 1px solid #e5e6eb;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.doc-tabs-title {
    padding: 0 16px;
    border-bottom: 1px solid #eef0f3;
    background: #f7f8fa;
    color: #17191e;
    font-size: 14px;
    font-weight: 600;
    line-height: 44px;
}

.doc-tab {
    display: block;
    padding: 11px 16px;
    border-bottom: 1px solid #f0f1f4;
    color: #4e5969;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.doc-tab:last-child {
    border-bottom: 0;
}

.doc-tab:hover {
    background: #f7f8fa;
    color: #134cff;
    text-decoration: none;
}

.doc-tab.is-active {
    background: #f0f4ff;
    color: #134cff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #134cff;
}

/* ---------- 左侧信息卡片 ---------- */
.doc-side-card {
    margin: 0 0 18px;
    border: 1px solid #e5e6eb;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.doc-side-card-title {
    padding: 0 16px;
    border-bottom: 1px solid #eef0f3;
    background: #f7f8fa;
    color: #17191e;
    font-size: 14px;
    font-weight: 600;
    line-height: 44px;
}

.doc-side-card span {
    display: block;
    padding: 0 16px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.9;
}

.doc-side-card span:first-of-type {
    margin-top: 12px;
}

.doc-side-card span:last-of-type {
    margin-bottom: 14px;
}

/* ---------- 面板 ---------- */
.doc-pane {
    display: none;
}

.doc-pane.is-active {
    display: block;
}

/* ---------- 右侧“本页目录”（参考文档站） ---------- */
.doc-toc {
    flex: 0 0 200px;
    width: 200px;
    position: sticky;
    top: 24px;
    font-family: var(--doc-font);
}

.doc-toc-title {
    margin: 0 0 12px;
    color: #9aa1ad;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.doc-toc ul {
    margin: 0;
    padding: 0;
    border-left: 1px solid #e5e6eb;
    list-style: none;
}

.doc-toc li {
    margin: 0;
    list-style: none;
}

.doc-toc a {
    display: block;
    margin-left: -1px;
    padding: 5px 0 5px 12px;
    border-left: 2px solid transparent;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
    text-decoration: none;
}

.doc-toc a:hover,
.doc-toc a.active,
.doc-toc a.is-active {
    border-left-color: #134cff;
    color: #134cff;
}

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

.doc-divider {
    margin: 22px 0 26px;
    border: 0;
    border-top: 1px solid #e5e6eb;
}

@media (max-width: 991px) {
    .doc-layout {
        display: block;
    }

    .doc-layout .doc-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 24px;
    }

    .doc-layout .doc-main {
        max-width: 100%;
    }
}
