/* Assessment controls remain steady, readable and independent of decoration. */
.chapter-progress { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.7rem; padding:1rem 1.3rem; }
.chapter-progress progress { width:100%; height:.65rem; accent-color:var(--lab-cyan,#00dfff); }
.chapter-option-letter { display:inline-grid; place-items:center; min-width:1.7rem; height:1.7rem; border:1px solid currentColor; font-family:var(--terminal-font,monospace); }
.chapter-submit-toolbar { align-items:flex-start; }
.chapter-submit-toolbar .subtle { max-width:38rem; }
.exam-clock { display: grid; gap: .45rem; min-width: min(16rem, 100%); }
.exam-save-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .7rem; color: var(--muted, #bbc7d9); font-size: .82rem; line-height: 1.4; }
.exam-save-status [lang="ar"] { text-align: right; }
.exam-save-status[data-save-state="saved"] { color: var(--lab-cyan, #00dfff); }
.exam-save-status[data-save-state="reconnecting"], .exam-save-status[data-save-state="conflict"] { color: var(--lab-amber, #ffd85b); }
.exam-navigation.card { padding: 1.1rem 1.3rem; }
.exam-progress { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; margin-bottom: .8rem; }
.question-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0; }
.question-links a { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-width: 3.2rem; min-height: 2.8rem; padding: .4rem .6rem; border: 1px solid currentColor; color: var(--muted, #bdc4d5); background: transparent; text-decoration: none; font-variant-numeric: tabular-nums; }
.question-links a[data-answered="true"] { color: var(--lab-cyan, #00dfff); background: color-mix(in srgb, currentColor 8%, transparent); }
.question-links a:focus-visible, [data-exam-question]:focus-visible { outline: 3px solid var(--lab-amber, #ffd85b); outline-offset: 4px; }
.question-links [data-question-marker] { font-size: .85rem; }
[data-exam-question] { scroll-margin-top: 15rem; }
.exam-submit-dialog { width: min(38rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; margin: auto; padding: 1.5rem; border: 1px solid var(--lab-pink, #ff65bd); border-top-width: 3px; border-radius: 0; color: var(--lab-ink, #f3f4f7); background: var(--lab-surface, #101118); box-shadow: 0 1rem 5rem #0009; }
.exam-submit-dialog::backdrop { background: #030710c9; }
.exam-submit-dialog h2 { margin-top: 0; }
.exam-submit-dialog p { line-height: 1.65; }
.exam-submit-dialog .toolbar { align-items: stretch; margin-bottom: 0; }
.exam-submit-dialog button { white-space: normal; flex: 1 1 14rem; }
.exam-save-conflict { border-inline-start: 3px solid var(--lab-amber, #ffd85b); }
html[data-theme="light"] .exam-save-status[data-save-state="saved"] { color: #00667c; }
html[data-theme="light"] .exam-save-status[data-save-state="reconnecting"], html[data-theme="light"] .exam-save-status[data-save-state="conflict"] { color: #825200; }
html[data-theme="light"] .question-links a[data-answered="true"] { color: #00667c; }
html[data-theme="light"] .exam-submit-dialog { background: #fff; color: #172235; }
@media (max-width: 600px) {
 .test-header { align-items: start; flex-wrap: wrap; }
 .exam-clock { flex: 1 1 100%; min-width: 0; }
 .exam-clock .timer { min-width: 0; padding: .5rem .8rem; }
 .exam-navigation.card { padding: 1rem; }
 .question-links { gap: .4rem; }
 [data-exam-question] { scroll-margin-top: 18rem; }
}
@media (forced-colors: active) {
 .question-links a[data-answered="true"] { border-width: 3px; }
 .exam-submit-dialog { border: 2px solid CanvasText; }
}
@media print {
 .exam-navigation, .exam-save-status, .exam-submit-dialog { display: none; }
}
