.school-subject-learning .kb-course-lesson:has(.exam-structured-paper) { background: var(--bg-2); color: var(--text); }
.school-subject-learning .kb-course-lesson:has(.exam-structured-paper) h1 { font-size: 1.5rem; margin: 0.5rem 0; }
.school-subject-learning .kb-course-lesson:has(.exam-structured-paper) .school-breadcrumb { margin-bottom: 1rem; }
.school-subject-learning .kb-course-lesson:has(.exam-structured-paper) .exam-paper-tabs { margin-bottom: 1.25rem; }
.exam-structured-paper { color: var(--text); font: 16px/1.5 "Times New Roman", Times, serif; }
.exam-paper-format-title { text-align: center; font: bold 16px/1.4 "Times New Roman", Times, serif; margin: 0 0 1rem; }
.exam-question { display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: start; gap: 12px; padding: 0; margin: 0 0 12px; border: 0; }
.exam-question .exam-question-number { font: bold 16px/1.5 "Times New Roman", Times, serif; padding-top: 0.15rem; margin: 0; }
.exam-question-card { min-width: 0; padding: 10px; background: var(--surface-strong); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 3px 12px #00000014; }
.exam-question .exam-question-prompt { font-size: 16px; line-height: 1.5 !important; margin: 0 0 10px; }
.exam-answer-choices { display: block; min-width: 0; border: 0; padding: 0; margin: 0; }
.exam-answer-choice { display: grid; grid-template-columns: 18px 18px minmax(0,1fr); align-items: baseline; gap: 7px; width: fit-content; max-width: 100%; min-height: 34px; padding: 2px 4px 2px 0; border-radius: 4px; cursor: pointer; }
.exam-answer-choice input { margin: 0; accent-color: #168cdb; cursor: pointer; color-scheme: light; }
.exam-answer-choice > span:last-child { margin-left: 18px; overflow-wrap: anywhere; }
.exam-answer-choice:hover { background: var(--surface); }
.exam-answer-choice:focus-within { outline: 2px solid #168cdb; outline-offset: 2px; }
.exam-answer-choice .exam-option-letter { color: inherit; font-weight: 400; }
.exam-question-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 12px; }
.exam-question-actions button { min-width: 84px; min-height: 34px; padding: 7px 20px; border: 0; border-radius: 999px; color: white; font: 14px/1.25 Arial, sans-serif; cursor: pointer; box-shadow: 0 4px 8px #473f9a4d; }
.exam-mark-button { background: #148cdb; }
.exam-solution-button { background: #008900; }
.exam-question-actions button:hover { filter: brightness(0.92); }
.exam-question-actions button:focus-visible { outline: 2px solid #143b73; outline-offset: 3px; }
.exam-question-actions button:disabled { opacity: 0.5; cursor: not-allowed; }
.exam-mark-feedback { margin: 12px 0 0; padding: 8px 10px; font-family: Arial,sans-serif; font-size: 14px; border-radius: 4px; }
.exam-mark-feedback[data-result="correct"] { background: #e8f8e8; color: #16631a; }
.exam-mark-feedback[data-result="incorrect"] { background: #fff0f0; color: #a61616; }
.exam-mark-feedback[data-result="unanswered"] { background: #fff6dc; color: #765200; }
.exam-answer-choice[data-result="correct"] { background: #e8f8e8; }
.exam-answer-choice[data-result="incorrect"] { background: #fff0f0; }
.exam-solution-panel { padding: 12px; margin-top: 14px; border-top: 1px solid var(--line); background: var(--surface); line-height: 1.75; }
.exam-solution-panel p { margin: 0 0 8px; }
.exam-solution-panel p:last-child { margin-bottom: 0; }
.exam-solution-panel[hidden], .exam-mark-feedback[hidden] { display: none; }
.exam-question-note, .exam-import-note { color: #604b0c; font-family: Arial,sans-serif; font-size: 13px; }
.exam-paper-information { margin: 1.5rem 0; font: 14px/1.6 Arial,sans-serif; }
.exam-paper-information summary { cursor: pointer; font-weight: 600; }
.exam-paper-information p { margin-top: 0.75rem; }
.exam-structured-paper .exam-question-diagram { width: min(100%, 640px); padding: 0.75rem; }
.exam-structured-paper .exam-question-diagram img { width: 100%; max-height: none; }
.exam-question-table-wrap { max-width: 100%; overflow-x: auto; margin: 1rem 0; }
.exam-question-table { border-collapse: collapse; color: inherit; }
.exam-question-table th, .exam-question-table td { border: 1px solid var(--line); padding: 0.5rem 0.8rem; text-align: left; }
.exam-question-table th { background: var(--surface); }
.exam-reading-context, .exam-paper-overview { padding: 1rem; margin: 1rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.exam-reading-context h3, .exam-theory-section h3 { font-weight: bold; font-size: 1.1rem; margin-bottom: 0.75rem; }
.exam-reading-context p { line-height: 1.9; }
.exam-structured-paper u { text-underline-offset: 0.15em; }
.dark .exam-answer-choice input { color-scheme: dark; }
.dark .exam-question-actions button:focus-visible { outline-color: var(--blue-2); }
.dark .exam-mark-feedback[data-result="correct"],
.dark .exam-answer-choice[data-result="correct"] { background: #163c30; color: #b9f6ce; }
.dark .exam-mark-feedback[data-result="incorrect"],
.dark .exam-answer-choice[data-result="incorrect"] { background: #48242d; color: #ffc4cc; }
.dark .exam-mark-feedback[data-result="unanswered"] { background: #40351b; color: #ffe09b; }
.dark .exam-question-note, .dark .exam-import-note { color: var(--gold-2); }
@media(max-width:640px) {
    .exam-question { grid-template-columns: 23px minmax(0,1fr); gap: 6px; }
    .exam-question-card { padding: 10px; }
    .exam-answer-choice > span:last-child { margin-left: 8px; }
    .exam-question-actions button { min-height: 40px; }
}
.exam-view-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:1rem 0 1.25rem;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.exam-view-toggle,.exam-step-navigation,.exam-step-navigation>div{display:flex;align-items:center;gap:8px}
.exam-view-toggle button,.exam-step-navigation button{min-height:38px;padding:7px 14px;border:1px solid var(--line);border-radius:8px;background:var(--surface-strong);color:var(--text);font:600 14px/1.25 Arial,sans-serif;cursor:pointer}
.exam-view-toggle button[aria-pressed=true]{border-color:var(--blue-2);background:var(--blue-2);color:#fff}
.exam-view-toggle button:focus-visible,.exam-step-navigation button:focus-visible{outline:2px solid var(--blue-2);outline-offset:2px}
.exam-step-navigation{flex:1;justify-content:space-between;min-width:min(100%,270px)}
.exam-step-navigation p{margin:0;font:600 14px/1.4 Arial,sans-serif}
.exam-step-navigation button:disabled{opacity:.5;cursor:not-allowed}
.exam-step-result{flex-basis:100%;margin:0;padding:10px 12px;border-radius:8px;background:var(--surface-strong);font:600 14px/1.5 Arial,sans-serif}
.exam-question-step[hidden],.exam-step-section[hidden],.exam-step-context[hidden],.exam-step-navigation[hidden],.exam-step-result[hidden]{display:none!important}
@media(max-width:640px){.exam-view-controls{align-items:stretch}.exam-view-toggle{width:100%}.exam-view-toggle button{flex:1}.exam-step-navigation{width:100%;flex-basis:100%}}
.exam-paper-footer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;margin:1.25rem 0}
.exam-paper-footer .exam-paper-information{margin:0}
.exam-paper-footer .exam-step-navigation{min-width:300px;justify-content:flex-end;gap:16px}
.exam-paper-footer .exam-step-result{grid-column:1/-1}
@media(max-width:640px){.exam-paper-footer{grid-template-columns:1fr}.exam-paper-footer .exam-step-navigation{min-width:0;width:100%;justify-content:space-between}.exam-paper-footer .exam-step-result{grid-column:auto}}
