/* ============================================================
   Python 合格考 · 知识点框架 —— 全站共享样式
   保持单页版本视觉风格一致：蓝色渐变 / 白卡片 / 深色代码块
   ============================================================ */

:root {
    --brand-dark: #1e3c72;
    --brand: #2a5298;
    --brand-light: #3b82f6;
    --ink: #1e293b;
    --ink-soft: #334155;
    --line: #e9edf4;
    --bg: #f5f7fb;
    --card: #ffffff;
    --sidebar-w: 268px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- 整体布局：左侧导航 + 右侧内容 ---------- */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: linear-gradient(180deg, #1e3c72 0%, #24447f 55%, #2a5298 100%);
    color: #e8efff;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 1.8rem 0 1.4rem;
    box-shadow: 4px 0 20px rgba(15, 23, 42, 0.12);
    z-index: 10;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 6px; }

.side-brand {
    padding: 0 1.5rem 1.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.14);
    margin-bottom: 1rem;
}

.side-brand .logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
}

.side-brand .sub {
    font-size: 0.78rem;
    opacity: 0.72;
    margin-top: 0.35rem;
    letter-spacing: 0.3px;
}

.side-label {
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.55;
    padding: 0 1.5rem;
    margin: 0.4rem 0 0.5rem;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.9rem;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.62rem 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.82);
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    border-left: 3px solid transparent;
}

.side-nav a .nav-icon {
    font-size: 1.05rem;
    line-height: 1;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.side-nav a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    transform: translateX(2px);
}

.side-nav a.active {
    background: rgba(255,255,255,0.96);
    color: var(--brand-dark);
    font-weight: 600;
    border-left-color: #fbbf24;
    box-shadow: 0 6px 16px -6px rgba(0,0,0,0.35);
}

.side-footer {
    margin: 1.6rem 1.5rem 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.14);
    font-size: 0.75rem;
    line-height: 1.7;
    opacity: 0.65;
}

.main {
    flex: 1;
    min-width: 0;
    padding: 2.2rem clamp(1rem, 4vw, 3.2rem) 3rem;
}

.main-inner {
    max-width: 1080px;
    margin: 0 auto;
}

/* ---------- 页头 ---------- */
header.page-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    padding: 2rem 2rem 1.6rem;
    border-radius: 24px;
    margin-bottom: 1.8rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

header.page-header::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}

header.page-header h1 {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

header.page-header p {
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.badge {
    display: inline-block;
    background: rgba(255,255,255,0.24);
    border: 1px solid rgba(255,255,255,0.55);
    padding: 0.35rem 1rem;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}

.crumb {
    font-size: 0.82rem;
    opacity: 0.78;
    margin-bottom: 0.7rem;
}

.crumb a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- 首页卡片网格 ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.6rem;
}

.card-link {
    display: block;
    border-radius: 20px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card-link:hover {
    transform: translateY(-4px);
}

.card {
    background: var(--card);
    border-radius: 20px;
    padding: 1.7rem 1.6rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.card-link:hover .card {
    box-shadow: 0 20px 25px -12px rgba(0,0,0,0.14);
    border-color: #bfdbfe;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eef2f6;
    padding-bottom: 0.8rem;
}

.card-header .icon {
    font-size: 1.7rem;
    line-height: 1;
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.3px;
}

.card-desc {
    font-size: 0.92rem;
    color: var(--ink-soft);
    flex: 1;
    margin-bottom: 1rem;
}

.card-more {
    font-size: 0.85rem;
    color: var(--brand-light);
    font-weight: 600;
    align-self: flex-end;
}

/* ---------- 详情页内容卡 ---------- */
.content-card {
    background: var(--card);
    border-radius: 22px;
    padding: 2rem clamp(1.2rem, 3vw, 2.2rem);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid var(--line);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

.section-title {
    font-weight: 600;
    color: #334155;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.section-title::before {
    content: "▍";
    color: var(--brand-light);
    font-size: 1.2rem;
    line-height: 1;
}

/* ---------- 代码块与文本组件 ---------- */
.code-block {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border-left: 4px solid var(--brand-light);
}

.code-block .comment { color: #94a3b8; }
.code-block .keyword { color: #f472b6; }
.code-block .func { color: #60a5fa; }
.code-block .str { color: #fcd34d; }

p {
    color: var(--ink-soft);
    font-size: 0.95rem;
}

ul, ol {
    padding-left: 1.4rem;
    color: var(--ink-soft);
}

li {
    margin-bottom: 0.45rem;
    font-size: 0.95rem;
}

code {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    background: #f1f5f9;
    color: #0f172a;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    font-size: 0.88em;
}

.highlight {
    background: #fef9c3;
    padding: 0.1rem 0.3rem;
    border-radius: 6px;
    font-weight: 500;
    color: #854d0e;
}

.tag {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-right: 0.4rem;
    margin-bottom: 0.3rem;
}

.tag-red { background: #fee2e2; color: #b91c1c; }
.tag-green { background: #dcfce7; color: #15803d; }

.example-box {
    background: #f8fafc;
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    border: 1px solid #e2e8f0;
    font-size: 0.92rem;
}

.example-box strong { color: #1e3a8a; }

.table-mini {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table-mini td, .table-mini th {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.table-mini th {
    background: #f1f5f9;
    font-weight: 600;
    color: #1e293b;
}

/* ---------- 真题演练 ---------- */
.practice-block {
    background: #f1f8ff;
    border-radius: 16px;
    padding: 1.1rem 1.2rem;
    border: 1px solid #b8d4f0;
    margin-top: 0.5rem;
}

.practice-block .practice-title {
    font-weight: 700;
    color: #1e3a8a;
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.practice-block .practice-title::before { content: "📝"; font-size: 1rem; }

.practice-item {
    margin-bottom: 0.9rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px dashed #cbd5e1;
}

.practice-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.practice-item .q {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.93rem;
    margin-bottom: 0.3rem;
}

.practice-item .q .qnum {
    background: var(--brand-light);
    color: #fff;
    display: inline-block;
    width: 1.4rem;
    height: 1.4rem;
    line-height: 1.4rem;
    text-align: center;
    border-radius: 50%;
    font-size: 0.72rem;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.practice-item .code-snippet {
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.55;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0.4rem 0;
    border-left: 3px solid #60a5fa;
}

.practice-item .code-snippet .hole {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 2px solid #111;
    border-radius: 50%;
    color: #111;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
    margin: 0 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.practice-item .answer {
    font-size: 0.85rem;
    color: #166534;
    background: #dcfce7;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    margin-top: 0.35rem;
    display: inline-block;
    font-weight: 500;
}

.practice-item .answer strong { color: #14532d; }

/* ---------- range 详解 ---------- */
.range-detail {
    background: #fef9ee;
    border: 1px solid #fcd34d;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    font-size: 0.92rem;
}

.range-detail .range-formula {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    background: #fff7e6;
    padding: 0.4rem 0.9rem;
    border-radius: 10px;
    border-left: 4px solid #f59e0b;
    font-weight: 600;
    color: #92400e;
    display: inline-block;
}

.range-detail table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.6rem 0 0.2rem;
    font-size: 0.88rem;
}

.range-detail td, .range-detail th {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #fde68a;
    text-align: left;
}

.range-detail th {
    background: #fef3c7;
    font-weight: 600;
    color: #78350f;
}

.range-detail .warn { color: #b45309; font-weight: 500; }

/* ---------- 库导入 ---------- */
.import-grid {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.import-item {
    background: #fafcff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.import-item .import-label {
    font-weight: 700;
    color: #1d4ed8;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.import-item .import-code {
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.55;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 0.3rem;
}

.import-item .import-code .kw { color: #f472b6; }
.import-item .import-code .fn { color: #60a5fa; }
.import-item .import-code .st { color: #fcd34d; }
.import-item .import-code .cm { color: #94a3b8; }

.import-item .import-note {
    font-size: 0.84rem;
    color: #475569;
}

.import-item .import-note strong { color: #1e40af; }

/* ---------- 页脚与翻页 ---------- */
.footer-note {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.4rem;
}

.page-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.6rem;
}

.page-nav a {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.8rem 1.1rem;
    font-size: 0.88rem;
    color: var(--brand);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: border-color 0.18s ease, transform 0.18s ease;
    max-width: 48%;
}

.page-nav a:hover {
    border-color: #bfdbfe;
    transform: translateY(-2px);
}

.page-nav a.disabled {
    visibility: hidden;
}

.page-nav .next { text-align: right; margin-left: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    :root { --sidebar-w: 100%; }
    .layout { flex-direction: column; }
    .sidebar {
        width: 100%;
        flex: none;
        height: auto;
        position: static;
        padding: 1rem 0 0.8rem;
    }
    .side-brand { padding: 0 1.2rem 0.8rem; margin-bottom: 0.6rem; }
    .side-brand .logo { font-size: 1.25rem; }
    .side-label, .side-footer { display: none; }
    .side-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 0.8rem 0.3rem;
        gap: 0.4rem;
    }
    .side-nav a {
        white-space: nowrap;
        font-size: 0.82rem;
        padding: 0.45rem 0.7rem;
    }
    .side-nav a:hover { transform: none; }
    .main { padding: 1.2rem 1rem 2rem; }
}

@media (max-width: 640px) {
    header.page-header h1 { font-size: 1.6rem; }
    header.page-header { padding: 1.5rem 1.3rem; }
    .grid { gap: 1.1rem; }
    .content-card { padding: 1.3rem 1.1rem; }
    .code-block, .practice-item .code-snippet, .import-item .import-code {
        font-size: 0.8rem;
        padding: 0.8rem;
    }
}

/* ============================================================
   零基础友好：导读 / 学习路径 / 难度标签
   ============================================================ */
.guide-box {
    background: linear-gradient(135deg, #f0fdf4, #f7fee7);
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.3rem;
}

.guide-title {
    font-weight: 700;
    color: #166534;
    font-size: 0.98rem;
    margin-bottom: 0.4rem;
}

.guide-box p {
    font-size: 0.9rem;
    color: #3f6212;
    margin: 0.25rem 0;
}

.guide-meta {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: #4d7c0f;
}

.difficulty {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    margin-left: 0.3rem;
}

.difficulty.mid { background: #fef9c3; color: #a16207; }
.difficulty.high { background: #fee2e2; color: #b91c1c; }

.path-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.3rem 1.5rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.path-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
}

.path-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.path-step {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    color: #1e40af;
    font-weight: 600;
}

.path-arrow { color: #94a3b8; font-weight: 700; }

.path-tip {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: #64748b;
}

/* ============================================================
   随堂检测 · 自动批阅选择题
   ============================================================ */
.quiz-block {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 1.2rem 1.3rem;
    margin-top: 0.6rem;
}

.quiz-title {
    font-weight: 700;
    color: #1e3a8a;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.quiz-hint {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.quiz-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.9rem;
}

.quiz-item:last-of-type { margin-bottom: 0; }

.quiz-q {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.7rem;
    line-height: 1.6;
}

.quiz-num {
    display: inline-block;
    background: var(--brand-light);
    color: #fff;
    min-width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    text-align: center;
    border-radius: 50%;
    font-size: 0.75rem;
    margin-right: 0.45rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-opt {
    text-align: left;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.5;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.quiz-opt:hover:not(:disabled) {
    border-color: #93c5fd;
    background: #eff6ff;
    transform: translateX(2px);
}

.quiz-opt.correct {
    border-color: #22c55e;
    background: #dcfce7;
    color: #14532d;
    font-weight: 600;
}

.quiz-opt.wrong {
    border-color: #ef4444;
    background: #fee2e2;
    color: #7f1d1d;
    font-weight: 600;
}

.quiz-opt.muted { opacity: 0.55; }
.quiz-opt:disabled { cursor: default; }

.quiz-feedback {
    margin-top: 0.7rem;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    font-size: 0.87rem;
    line-height: 1.6;
}

.quiz-feedback.ok { background: #dcfce7; color: #166534; }
.quiz-feedback.no { background: #fef2f2; color: #991b1b; }
.quiz-why { margin-top: 0.35rem; }
.quiz-why-text { display: none; }

.quiz-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px dashed #cbd5e1;
    flex-wrap: wrap;
}

.quiz-score {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e40af;
}

.quiz-reset {
    background: #fff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    border-radius: 10px;
    padding: 0.45rem 0.9rem;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.quiz-reset:hover { background: #eff6ff; }

@media (max-width: 640px) {
    .path-step { font-size: 0.78rem; }
    .quiz-block { padding: 1rem 0.9rem; }
    .quiz-item { padding: 0.8rem; }
    .quiz-opt { font-size: 0.85rem; }
}

/* ---------- 练习平台入口卡 ---------- */
.practice-entry {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    border-radius: 20px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 10px 25px -8px rgba(30, 60, 114, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.practice-entry:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 32px -10px rgba(30, 60, 114, 0.55);
}
.practice-entry .entry-icon {
    font-size: 2.4rem;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.16);
    border-radius: 16px;
}
.practice-entry .entry-text { flex: 1; }
.practice-entry .entry-text h2 { font-size: 1.2rem; margin-bottom: 0.35rem; font-weight: 700; }
.practice-entry .entry-text p { font-size: 0.92rem; color: #fff; opacity: 1; line-height: 1.6; text-shadow: 0 1px 2px rgba(0,0,0,0.18); }
.practice-entry .entry-go {
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(255,255,255,0.18);
    padding: 0.6rem 1.1rem;
    border-radius: 30px;
    white-space: nowrap;
    flex-shrink: 0;
}
/* ---------- 首页知识点速查（对齐练习平台 11 分类） ---------- */
.kp-quickmap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.6rem;
    box-shadow: 0 4px 14px -8px rgba(30,60,114,.18);
}
.kp-quickmap-title { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.8rem; }
.kp-chip-row { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.kp-chip {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 24px;
    background: #eef3fb;
    color: #1e3c72;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #d9e4f5;
    transition: background 0.15s ease, transform 0.15s ease;
}
.kp-chip:hover { background: #dde9fa; transform: translateY(-1px); }
/* ---------- 侧栏教材依据标注 ---------- */
.side-textbook {
    margin: 0.7rem 1.5rem 0;
    padding: 0.4rem 0.7rem;
    font-size: 0.72rem;
    line-height: 1.5;
    color: #dbe7ff;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
}

/* ---------- 教材对照框 ---------- */
.textbook-box {
    margin: 1.1rem 0;
    border: 1px solid #c7d9f5;
    border-left: 4px solid var(--brand-light);
    border-radius: 14px;
    background: linear-gradient(180deg, #f7faff, #fbfcff);
    padding: 1.2rem 1.3rem 1.1rem;
}
.textbook-tag {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 30px;
    margin-bottom: 0.85rem;
}
.textbook-intro { font-size: 0.94rem; margin-bottom: 0.85rem; color: var(--ink-soft); }
.textbook-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: 0.9rem;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(30,60,114,0.06);
}
.textbook-table th, .textbook-table td {
    border: 1px solid var(--line);
    padding: 0.6rem 0.75rem;
    text-align: left;
    vertical-align: top;
    line-height: 1.7;
}
.textbook-table thead th { background: #eaf1fc; color: var(--brand-dark); font-weight: 700; white-space: nowrap; }
.textbook-table td:first-child { white-space: nowrap; }
.textbook-table code { font-size: 0.86rem; }
.textbook-note {
    background: #eef5ff;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.75;
}
.textbook-foot { font-size: 0.8rem; color: #64748b; margin-top: 0.7rem; }

@media (max-width: 640px) {
    .practice-entry { flex-wrap: wrap; padding: 1.2rem; gap: 0.9rem; }
    .practice-entry .entry-icon { width: 50px; height: 50px; font-size: 1.8rem; }
    .practice-entry .entry-go { width: 100%; text-align: center; }
    .textbook-box { padding: 0.9rem; }
    .textbook-table { font-size: 0.78rem; display: block; overflow-x: auto; }
    .textbook-table th, .textbook-table td { padding: 0.45rem 0.5rem; }
}
