.formal-exams .fe-question--wrong,.formal-exams .fe-review--wrong{border:2px solid #b42332;background:#fff4f4;color:#8e1727}
.formal-exams .fe-question--correct,.formal-exams .fe-review--correct{border:1px solid #315f95;background:#eef4fb;color:#244e82}
.formal-exams .fe-question--unanswered,.formal-exams .fe-review--unanswered{border:1px dashed #607085;background:#f2f5f9;color:#334155}
.formal-exams .fe-review{border-radius:10px;padding:0 12px;margin-bottom:12px;list-style:none}
.formal-exams .fe-answer-compare{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 12px;font-size:16px;line-height:1.6}
.formal-exams .fe-answer-compare span{padding:6px 10px;border-radius:6px;background:#fff;color:#24313b}
.formal-exams .fe-review--wrong .fe-selected-answer{color:#8e1727;border:1px solid #b42332}
.formal-exams .fe-correct-answer{color:#244e82!important;border:1px solid #315f95}
.formal-exams .fe-reviews{padding:0}
.formal-exams .fe-question{min-height:52px;line-height:1.55}
@media(max-width:600px){.formal-exams .fe-answer-compare{gap:8px}.formal-exams .fe-review{padding:0 10px}.formal-exams .fe-reviews summary{font-size:16px;line-height:1.6}}

.formal-exams .qreview-opt.correct,.formal-exams .qverdict.ok{color:#244e82}
.formal-exams .qreview-opt.selected-wrong,.formal-exams .qverdict.no{color:#8e1727}
.formal-exams .fe-runs-table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.6}
.formal-exams .fe-runs-table caption{text-align:left;font-weight:700;margin:10px 0}
.formal-exams .fe-runs-table th,.formal-exams .fe-runs-table td{text-align:left;padding:10px 8px;border-bottom:1px solid #d2dbe1;vertical-align:middle}
.formal-exams .fe-era-row{display:grid;grid-template-columns:minmax(75px,auto) minmax(0,1fr);gap:8px 12px;width:100%;text-align:left;padding:12px;margin:8px 0;border:1px solid #d2dbe1;border-radius:10px;background:#fff;color:#24313b;font-size:15px;line-height:1.6;cursor:pointer}
.formal-exams .fe-era-row meter{grid-column:1/-1;width:100%;height:18px;accent-color:#b42332}
.formal-exams .fe-era-row:disabled{opacity:1;cursor:default;background:#f2f5f9;color:#586772}
.formal-exams .fe-era-row:focus-visible{outline:3px solid #315f95;outline-offset:3px}
@media(max-width:600px){.formal-exams .fe-runs-table{display:block}.formal-exams .fe-runs-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.formal-exams .fe-runs-table tbody{display:grid;gap:12px}.formal-exams .fe-runs-table tr{display:grid;grid-template-columns:1fr 1fr;border:1px solid #d2dbe1;border-radius:10px;padding:8px}.formal-exams .fe-runs-table td{border:0;padding:6px;min-width:0}.formal-exams .fe-runs-table td:before{content:attr(data-label);display:block;font-size:13px;color:#586772}.formal-exams .fe-runs-table td:first-child,.formal-exams .fe-runs-table td:last-child{grid-column:1/-1}.formal-exams .fe-era-row{grid-template-columns:1fr}.formal-exams .fe-runs-table time{overflow-wrap:anywhere}}

.formal-exams .fe-star{min-height:44px;min-width:44px;display:inline-flex;gap:7px;align-items:center;color:#4c5968;background:#fff;border:1px solid #9ba9b7}.formal-exams .fe-star[aria-pressed=true]{background:#fff5d9;border-color:#9b6a00;color:#694800}.formal-exams .fe-star>span{font-size:22px;line-height:1}.formal-exams #feStarStatus{margin:0;font-size:14px;line-height:1.6;flex:1 1 230px}.formal-exams .fe-star-label{display:inline-block;border:1px solid #a77920;border-radius:6px;background:#fff5d9;color:#694800;padding:1px 6px;font-size:13px;font-weight:700;line-height:1.6}.formal-exams .fe-starred-review{border:1px solid #d7b56d;border-radius:12px;background:#fffbf0;padding:14px;margin:18px 0}.formal-exams .fe-starred-review nav{display:flex;flex-wrap:wrap;gap:8px}.formal-exams .fe-starred-review .tool-btn{min-height:44px}.formal-exams .fe-star:focus-visible,.formal-exams .fe-starred-review button:focus-visible{outline:3px solid #315f95;outline-offset:3px}

/* Keep the five answers and the one independent review toggle below the image. */
.formal-exams .fe-answer-tools{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin:16px 0 10px}.formal-exams .fe-answer-tools .fe-choices{margin:0;gap:8px}.formal-exams .fe-answer-tools .fe-star{min-width:76px;justify-content:center}.formal-exams #feStarStatus{margin:0 0 14px;font-size:14px;line-height:1.6}
@media(max-width:600px){.formal-exams .fe-answer-tools{display:grid;grid-template-columns:minmax(0,1fr) 76px;align-items:end;gap:8px}.formal-exams .fe-answer-tools .fe-choices{display:grid;grid-template-columns:repeat(3,minmax(44px,1fr));gap:6px;min-width:0}.formal-exams .fe-answer-tools .fe-star{width:76px;min-height:44px;padding:8px 4px}.formal-exams .fe-answer-tools .fe-choices button{min-width:44px;min-height:44px;padding:8px 4px}}

/* Study-ready explanations in final results; grading colors retain text labels. */
.fe-explanation{color:#24313b;text-align:left;font-size:16px;line-height:1.75;overflow-wrap:anywhere}
.fe-explanation h4{font-size:19px;margin:0 0 12px;color:#172b42}
.fe-explanation ul{padding-left:22px;margin:8px 0}
.fe-explanation li+li{margin-top:8px}
.fe-stem-analysis,.fe-option-analysis{margin:16px 0;padding:16px;background:#fff;border:1px solid #d2dbe1;border-radius:10px}
.fe-exp-keywords{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px;margin:10px 0}
.fe-exp-keywords>span{padding:1px 7px;background:#edf2f8;border-radius:5px}
.fe-exp-answer{color:#244e82;border-left:3px solid #315f95;padding:8px 12px;background:#eef4fb}
.fe-exp-contrast{margin:12px 0;padding:10px 12px;background:#f7f4ea;border-radius:6px}
.fe-option-analysis>ol{list-style:none;padding:0;margin:0}
.fe-explanation .fe-exp-option{border:1px solid;border-radius:8px;padding:10px 12px;margin:12px 0;background:#fff}
.fe-exp-option.is-correct{color:#244e82;border-color:#315f95;background:#eef4fb}
.fe-exp-option.is-incorrect{color:#8e1727;border-color:#c86571;background:#fff7f7}
.fe-exp-option.is-selected{border-width:2px}
.fe-exp-option-heading{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0;font-weight:700}
.fe-exp-option-heading>b{font-size:21px}
.fe-exp-context>summary,.fe-exp-sources>summary{min-height:44px;display:list-item;cursor:pointer;padding:8px 0}
.fe-exp-sources{font-size:14px;color:#465568;margin:10px 0}
.fe-explanation a{color:#244e82;text-decoration:underline}
@media(max-width:600px){.fe-stem-analysis,.fe-option-analysis{padding:12px}.fe-explanation .fe-exp-option{padding:8px}.fe-explanation ul{padding-left:18px}}

.fe-explanation strong{display:inline}.fe-exp-meaning,.fe-exp-core{margin:14px 0}.fe-exp-meaning>b,.fe-exp-core>b{display:block;margin-bottom:4px}

/* Isolated UI proposal: preserve table semantics at every viewport. */
.formal-exams .fe-top-actions{display:flex;gap:8px;flex-wrap:wrap}
.formal-exams .fe-rounds{display:grid;grid-template-columns:1fr;gap:10px}
.formal-exams .fe-round{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.formal-exams .fe-round>[data-round]{border-radius:4px;min-height:48px;flex:1 1 240px;text-align:left;white-space:nowrap}
.formal-exams .fe-round-status{color:#586772}
.formal-exams .fe-history-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:16px 0;flex-wrap:wrap}
.formal-exams .fe-runs-scroll{max-width:100%;overflow-x:auto}
.formal-exams .fe-runs-table{display:table;min-width:580px}
.formal-exams .fe-runs-table thead{position:static;width:auto;height:auto;overflow:visible;clip-path:none;display:table-header-group}
.formal-exams .fe-runs-table tbody{display:table-row-group}
.formal-exams .fe-runs-table tr{display:table-row;border:0;border-radius:0;padding:0}
.formal-exams .fe-runs-table td{display:table-cell;border-bottom:1px solid #d2dbe1;padding:10px 8px}
.formal-exams .fe-runs-table td:before{content:none}
.formal-exams .fe-review-original{margin:12px 0}
.formal-exams .fe-top{flex-wrap:wrap;gap:8px}

/* Result navigation: question number and its recorded era, without dense tiles. */
.formal-exams .fe-question-grid{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0;align-items:stretch}
.formal-exams .fe-question-grid .fe-question{display:inline-flex;align-items:center;justify-content:center;flex:0 1 auto;min-width:132px;max-width:100%;min-height:44px;height:auto;gap:0;padding:8px 12px;border-radius:6px;text-align:center;line-height:1.4}
.formal-exams .fe-question-grid .fe-question b{font-size:14px;line-height:20px;white-space:nowrap}
.formal-exams .fe-question-grid .fe-question:focus-visible,.formal-exams .fe-question-grid .fe-question[aria-current=true]{outline:3px solid #172f53;outline-offset:2px}

.formal-exams .fe-review-toggle{display:flex;align-items:center;gap:7px;margin-left:auto;min-height:44px;white-space:nowrap;font-size:13px;cursor:pointer}
.formal-exams .fe-review-toggle input{width:20px;height:20px;accent-color:#1b2639}
.formal-exams .fe-review-toggle b{min-width:28px}
.formal-exams .fe-review-history li{margin:10px 0}

.formal-exams .fe-round{display:grid;grid-template-columns:minmax(0,1fr) auto}
.formal-exams .fe-round>[data-round]{min-width:0;white-space:normal;grid-column:1;grid-row:1}
.formal-exams .fe-round>.fe-review-toggle{grid-column:2;grid-row:1;margin-left:0}
.formal-exams .fe-round>.fe-round-status{grid-column:1;grid-row:2}
.formal-exams .fe-round>.fe-round-status:empty{display:none}
.formal-exams .fe-round>[data-round-retry]{grid-column:2;grid-row:2}
