{{-- 知识点讲解专用样式 --}}
<style>
    /* ========== PDF 页眉页脚（用于知识点讲解） ========== */
    @page {
        size: A4;
        margin: 2.2cm 2cm 2.3cm 2cm;
        @top-left {
            content: "知了数学·{{ $generateDateTime }}";
            font-size: 13px;
            color: #666;
        }
        @top-center {
            content: "{{ $studentName }}";
            font-size: 13px;
            color: #666;
        }
        @top-right {
            content: "{{ $pdfMeta['header_title'] ?? ($studentName . '｜' . $examCode) }}";
            font-size: 19px;
            font-weight: 600;
            font-family: "Noto Sans", "Liberation Sans", "Nimbus Sans", sans-serif;
            letter-spacing: 0;
            padding-right: 3mm;
            padding-top: 1.8mm;
            color: #222;
        }
        @bottom-left {
            content: "{{ $pdfMeta['header_title'] ?? ($studentName . '｜' . $examCode) }}";
            font-size: 11px;
            color: #666;
        }
        @bottom-right {
            content: counter(page) "/" counter(pages);
            font-size: 13px;
            color: #666;
        }
    }
    /* ========== 屏幕预览样式 ========== */
    @media screen {
        body {
            background: #fff;
            padding: 0;
            font-family: "Noto Serif", "Noto Serif CJK SC", "Noto Sans CJK SC", "Noto Sans", "STSongti-SC", "PingFang SC", "Songti SC", serif;
            line-height: 1.65;
            color: #000;
            font-size: 14px;
        }
        .page {
            background: #fff;
            max-width: 720px;
            margin: 0 auto;
            padding: 0 12px;
            box-shadow: none;
            border-radius: 0;
        }
        .header,
        .kp-explain-header {
            text-align: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid #000;
        }
        .school-name {
            font-size: 28px;
            font-weight: bold;
            margin-bottom: 15px;
        }
        .paper-title {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 15px;
        }
        .kp-explain-title {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 10px;
        }
        .kp-explain-subtitle {
            font-size: 14px;
            color: #666;
        }
        .kp-explain-meta {
            font-size: 14px;
            margin-bottom: 8px;
            color: #333;
            font-weight: 600;
        }
        .info-row {
            display: flex;
            justify-content: space-between;
            font-size: 14px;
            color: #666;
        }
    }

    /* ========== PDF 打印样式（保持原有逻辑） ========== */
    @media print {
        body {
            background: #fff;
            padding: 0;
            font-family: "Noto Serif", "Noto Serif CJK SC", "Noto Sans CJK SC", "Noto Sans", "STSongti-SC", "PingFang SC", "Songti SC", serif;
            line-height: 1.65;
            color: #000;
            font-size: 14px;
        }
        .page {
            width: 100%;
            max-width: none;
            margin: 0;
            padding: 0;
            box-shadow: none;
        }
        .header,
        .kp-explain-header {
            text-align: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid #000;
        }
        .school-name {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 10px;
        }
        .paper-title {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 15px;
        }
        .kp-explain-title {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 10px;
        }
        .kp-explain-subtitle {
            font-size: 14px;
            color: #666;
        }
        .kp-explain-meta {
            font-size: 14px;
            margin-bottom: 8px;
            color: #333;
            font-weight: 600;
        }
        .info-row {
            display: flex;
            justify-content: space-between;
            font-size: 14px;
            color: #666;
        }
    }

    /* ========== 通用内容样式（屏幕+打印共用） ========== */
    .kp-empty { padding: 16px; color: #666; text-align: center; font-size: 13px; }
    .kp-list { display: flex; flex-direction: column; gap: 12px; }
    .kp-section { padding: 0; margin: 0; }
    .kp-section-head {
        padding: 8px 0;
        border-bottom: 1px solid #ccc;
        margin-bottom: 8px;
    }
    .kp-section-body { display: flex; flex-direction: column; gap: 10px; }
    .kp-block { display: flex; flex-direction: column; gap: 4px; }
    .kp-block-title { font-weight: bold; font-size: 14px; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
    .kp-block-title .check {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 14px;
        height: 14px;
        border: 1px solid #333;
        font-size: 10px;
    }
    .kp-block-content {
        font-size: 14px;
        color: #333;
        line-height: 1.75;
        padding-left: 20px;
    }

    /* ========== Markdown 内容样式 ========== */
    .kp-markdown,
    .kp-markdown-content { font-size: 14px; line-height: 1.75; color: #333; }
    .kp-markdown h1,
    .kp-markdown h2,
    .kp-markdown h3,
    .kp-markdown-content h1,
    .kp-markdown-content h2,
    .kp-markdown-content h3 { font-weight: bold; font-size: 14px; margin: 8px 0 4px 0; color: #000; }
    .kp-markdown h2,
    .kp-markdown-content h2 { font-size: 15px; }
    .kp-markdown h3,
    .kp-markdown-content h3 { font-size: 14px; }
    .kp-markdown p,
    .kp-markdown-content p { margin: 4px 0; }
    .kp-markdown ul, .kp-markdown ol,
    .kp-markdown-content ul, .kp-markdown-content ol { margin: 4px 0; padding-left: 24px; }
    .kp-markdown li,
    .kp-markdown-content li { margin: 2px 0; }
    .kp-markdown strong,
    .kp-markdown-content strong { font-weight: bold; color: #000; }
    .kp-markdown em,
    .kp-markdown-content em { font-style: italic; }
    .kp-markdown code,
    .kp-markdown-content code {
        font-family: "Consolas", "Monaco", monospace;
        font-size: 13px;
        background: #f5f5f5;
        padding: 1px 4px;
        border-radius: 2px;
    }
    .kp-markdown pre,
    .kp-markdown-content pre {
        background: #f5f5f5;
        padding: 10px;
        overflow-x: auto;
        margin: 8px 0;
        border-radius: 4px;
    }
    .kp-markdown pre code,
    .kp-markdown-content pre code { background: none; padding: 0; }
    .kp-markdown blockquote,
    .kp-markdown-content blockquote {
        margin: 8px 0;
        padding: 6px 12px;
        border-left: 3px solid #ddd;
        color: #666;
        background: #f9f9f9;
    }
    .kp-markdown table,
    .kp-markdown-content table {
        border-collapse: collapse;
        margin: 8px 0;
        width: 100%;
    }
    .kp-markdown th, .kp-markdown td,
    .kp-markdown-content th, .kp-markdown-content td {
        border: 1px solid #ddd;
        padding: 6px 10px;
        text-align: left;
    }
    .kp-markdown th,
    .kp-markdown-content th { background: #f5f5f5; font-weight: bold; }

    /* ========== KaTeX数学公式样式 ========== */
    .katex { font-size: 1em !important; vertical-align: -0.04em; }
    .katex-display { margin: 0.35em 0 !important; }

    /* ========== 打印专用（不分页） ========== */
    @media print {
        .kp-block-content img,
        .kp-example-content img {
            display: block;
            break-inside: avoid;
            page-break-inside: avoid;
            -webkit-column-break-inside: avoid;
            max-width: min(84%, 420px);
            max-height: 82mm;
            width: auto;
            height: auto;
            margin: 6px auto;
            object-fit: contain;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
            image-rendering: -webkit-optimize-contrast;
        }
    }
</style>
