/* 大题标题：不与后面内容分开 */
.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    page-break-after: avoid;
    break-after: avoid;
}
/* 题目整体：不分页 */
.question {
    margin-bottom: 15px;
    page-break-inside: avoid;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}
/* 题目网格：不分页 */
.question-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 4px;
    row-gap: 6px;
    align-items: flex-start;
    page-break-inside: avoid;
    break-inside: avoid;
}
.question-lead {
    display: flex;
    gap: 4px;
    align-items: flex-start;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.65;
    margin-top: 1px;
}
.question-lead.spacer { visibility: hidden; }
.question-number { white-space: nowrap; margin-right: 2px; }
.question-main { font-size: 14px; line-height: 1.65; font-family: inherit; display: block; }
/* 题目内容：防止孤行 */
.question-stem {
    display: block;
    font-size: 14px;
    font-family: inherit;
    orphans: 3;
    widows: 3;
}
.question-content {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.6;
    orphans: 3;
    widows: 3;
}
.question-main {
    orphans: 3;
    widows: 3;
}
/* 选项容器：不分页 */
.options {
    display: grid;
    row-gap: 8px;
    margin-top: 8px;
    page-break-inside: avoid;
    break-inside: avoid;
}
.options-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 12px;
    page-break-inside: avoid;
    break-inside: avoid;
}
.options-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
    page-break-inside: avoid;
    break-inside: avoid;
}
.options-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    page-break-inside: avoid;
    break-inside: avoid;
}
/* 单个选项：不分页 */
.option {
    width: 100%;
    font-size: 13.2px;
    line-height: 1.6;
    word-wrap: break-word;
    display: flex;
    align-items: baseline;
    page-break-inside: avoid;
    break-inside: avoid;
}
.option strong { margin-right: 4px; flex: 0 0 auto; line-height: 1.6; }
.option-value { display: inline; }
.option-short { white-space: nowrap; }
.option-long { white-space: normal; word-break: break-word; }
.option-inline { display: inline-flex; align-items: baseline; margin-right: 20px; }
.option p, .option div { margin: 0; display: inline; }
.answer-area {
    position: relative;
    margin-top: 12px;
    page-break-inside: avoid;
    break-inside: avoid;
}
.answer-area .answer-label {
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 10px;
    background: #fff;
    padding: 0 4px;
    color: #555;
    letter-spacing: 1px;
}
.answer-area.boxy {
    min-height: 150px;
    border: 1.5px solid #444;
    border-radius: 6px;
    padding: 14px;
}
.question-stem .katex, .question-main .katex, .question-content .katex { font-size: 1em !important; vertical-align: 0; }
.question-stem .katex-display, .question-main .katex-display, .question-content .katex-display { margin: 0.35em 0 !important; }
