/**
 * 答辩汇总 — 双栏文档站样式（左侧大类目录 + 右侧问答）
 */
:root {
    --df-blue: #3b82f6;
    --df-blue-soft: #eff6ff;
    --df-text: #1f2937;
    --df-muted: #6b7280;
    --df-line: #e5e7eb;
    --df-side: #f5f6f8;
    --df-side-w: 280px;
}

body.df-page {
    margin: 0;
    background: #fff;
    color: var(--df-text);
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.df-layout {
    display: flex;
    width: 100%;
    min-height: calc(100vh - var(--nav-h, 56px));
    border-top: 1px solid var(--df-line);
}

/* —— 左侧栏 —— */
.df-sidebar {
    width: var(--df-side-w);
    flex-shrink: 0;
    background: var(--df-side);
    border-right: 1px solid var(--df-line);
    position: sticky;
    top: var(--nav-h, 56px);
    height: calc(100vh - var(--nav-h, 56px));
    overflow-y: auto;
    align-self: flex-start;
}

.df-side-brand {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 16px 14px 14px;
    background: #fff;
    border-bottom: 1px solid var(--df-line);
    position: sticky;
    top: 0;
    z-index: 2;
}

.df-side-brand > i {
    font-size: 22px;
    color: var(--df-blue);
    line-height: 1.2;
}

.df-side-brand-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
}

.df-side-brand-text em {
    display: block;
    margin-top: 3px;
    font-style: normal;
    font-size: 12px;
    color: var(--df-muted);
}

.df-menu {
    display: flex;
    flex-direction: column;
}

.df-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 14px 14px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    line-height: 1.45;
    border-bottom: 1px solid #e8eaed;
    border-left: 3px solid transparent;
    background: transparent;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.df-menu-item:hover {
    background: #eceff3;
    color: #111827;
}

.df-menu-item.is-active {
    background: var(--df-blue-soft);
    color: var(--df-blue);
    font-weight: 600;
    border-left-color: var(--df-blue);
}

.df-menu-num {
    flex-shrink: 0;
    width: 22px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: #9ca3af;
    letter-spacing: 0.02em;
}

.df-menu-item.is-active .df-menu-num {
    color: var(--df-blue);
}

.df-menu-label {
    flex: 1;
    min-width: 0;
}

/* —— 右侧正文 —— */
.df-content {
    flex: 1;
    min-width: 0;
    background: #fff;
}

.df-content-inner {
    max-width: 820px;
    padding: 40px 56px 80px;
}

.df-title {
    margin: 0 0 20px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    letter-spacing: -0.02em;
}

.df-chapter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.df-chapter-nav--bottom {
    margin-top: 40px;
    margin-bottom: 0;
    padding-top: 24px;
    border-top: 1px solid var(--df-line);
}

.df-chap-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    text-decoration: none;
    line-height: 1.2;
    transition: border-color 0.12s ease, color 0.12s ease;
}

.df-chap-btn:hover {
    border-color: var(--df-blue);
    color: var(--df-blue);
}

.df-chap-btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.df-lead {
    margin: 0 0 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--df-line);
    font-size: 14px;
    line-height: 1.7;
    color: var(--df-muted);
}

.df-qa {
    margin-bottom: 32px;
    padding-bottom: 8px;
}

.df-q {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.55;
    color: #111827;
}

.df-q span:first-child {
    color: var(--df-blue);
    margin-right: 4px;
}

.df-a {
    font-size: 14.5px;
    line-height: 1.85;
    color: #4b5563;
}

.df-a p {
    margin: 0 0 8px;
}

.df-a ul,
.df-a ol {
    margin: 6px 0 10px;
    padding: 0 0 0 1.25em;
}

.df-a li {
    margin: 6px 0;
}

.df-a li strong {
    color: #1f2937;
    font-weight: 600;
}

.df-a a {
    color: var(--df-blue);
}

.df-guide-img-wrap {
    margin: 12px 0 16px;
}

.df-guide-img {
    display: block;
    max-width: min(100%, 720px);
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.df-a code {
    padding: 1px 5px;
    border-radius: 3px;
    background: #f3f4f6;
    font-size: 0.92em;
    font-family: ui-monospace, Consolas, "Courier New", monospace;
    color: #111827;
}

.df-a pre {
    margin: 10px 0 14px;
    padding: 12px 14px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.55;
    color: #1f2937;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 900px) {
    .df-layout {
        flex-direction: column;
    }

    .df-sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--df-line);
    }

    .df-side-brand {
        position: relative;
    }

    .df-menu {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .df-menu-item {
        border-right: 1px solid #e8eaed;
    }

    .df-content-inner {
        padding: 24px 16px 48px;
    }

    .df-title {
        font-size: 22px;
    }
}

@media (max-width: 560px) {
    .df-menu {
        grid-template-columns: 1fr;
    }

    .df-menu-item {
        border-right: none;
    }
}
