#quizScreen #discardBtn { min-height:44px; }
#quizScreen #discardBtn[aria-pressed="true"] { color:#7b4700 !important; border-color:#b97813 !important; background:#fff2d8 !important; box-shadow:inset 0 0 0 1px #b97813 !important; }
#quizScreen .strategy-mastery-badge { align-self:center; padding:4px 8px; border:1px solid #26755e; border-radius:4px; color:#185d48; background:#e8f6ee; font-size:13px; font-weight:700; }
#quizScreen .strategy-history { flex-basis:100%; margin:0; color:var(--muted,#536b7d); font-size:12px; line-height:1.5; }
#quizScreen .strategy-mastery-badge[hidden] { display:none; }
.topic-cumulative-accuracy { min-width:0; overflow-wrap:anywhere; }
.topic-cumulative-accuracy strong { color:var(--ink,#102033); font-variant-numeric:tabular-nums; }
.topic-through-report { padding:14px 0; border-bottom:1px solid var(--line,#d5e4f1); min-width:0; }
.topic-report-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; }
.topic-report-heading h2,.topic-report-weak h3 { margin:0; color:var(--ink,#102033); font-size:16px; line-height:1.5; }
.topic-report-heading strong { color:var(--ink,#102033); font-size:18px; line-height:1.5; font-variant-numeric:tabular-nums; }
.topic-through-report :is(small,time,p) { color:var(--muted,#536b7d); font-size:13px; font-weight:400; line-height:1.5; }
.topic-through-report p { margin:6px 0; }
.topic-report-weak { margin-top:12px; }
.topic-through-report summary { min-height:44px; box-sizing:border-box; padding:11px 0; font-size:14px; font-weight:700; color:var(--ink,#102033); cursor:pointer; }
.topic-through-report summary small,.topic-report-weak h3 small { margin-inline-start:5px; }
.topic-report-chart { margin-top:8px; border-top:1px solid var(--line,#d5e4f1); }
.topic-report-bars { display:grid; grid-template-columns:minmax(0,1fr); gap:8px 24px; margin:6px 0 10px; padding:0; list-style:none; }
.topic-report-bars li { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:3px 8px; min-width:0; font-size:13px; line-height:1.45; }
.topic-report-bars li > span:first-child { overflow-wrap:anywhere; }
.topic-report-bars strong { font-variant-numeric:tabular-nums; }
.topic-through-report .topic-report-review { grid-column:1/-1; justify-self:start; margin:3px 0 0; width:auto; min-width:0; max-width:100%; min-height:44px; padding:7px 10px; font-size:13px; line-height:1.4; }
.topic-report-bar { grid-column:1/-1; display:block; height:6px; border-radius:3px; overflow:hidden; background:var(--line,#d5e4f1); }
.topic-report-bar i { display:block; height:100%; background:#287688; }
.topic-report-low .topic-report-bar i { background:#a75628; }
html[data-color-mode="dark"] .topic-report-bar i { background:#74bacb; }
html[data-color-mode="dark"] .topic-report-low .topic-report-bar i { background:#e4a577; }
@media (min-width:760px) {
  .topic-report-bars { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
#quizScreen .weak-question-topic { margin:0 0 8px; padding:3px 0 3px 9px; border-inline-start:3px solid #4786a4; color:#244b62; font-size:14px; line-height:1.5; font-weight:700; overflow-wrap:anywhere; }
html[data-color-mode="dark"] #quizScreen .weak-question-topic { color:var(--night-ink,#e7edf0); border-color:#82bacd; }
.strategy-year-summary { display:flex; flex-wrap:wrap; gap:4px 10px; margin-top:8px; font-size:12px; line-height:1.5; font-weight:500; color:var(--score-muted,#536b7d); }
.strategy-year-warning { flex-basis:100%; font-size:12px; font-weight:700; }
.strategy-year-warning.danger { color:#a52e36; }
.strategy-year-warning.caution { color:#855611; }
#yearStrategyPanel { margin:0 0 24px; padding:0 0 18px; border-bottom:1px solid var(--line,#d5e4f1); min-width:0; }
#yearStrategyPanel h2 { font-size:18px; line-height:1.5; margin:0 0 12px; padding:0; border:0; }
#yearStrategyPanel h2::after { display:none; }
#yearStrategyPanel .strategy-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0 0 10px; }
#yearStrategyPanel .strategy-metrics > div { min-width:0; }
#yearStrategyPanel .strategy-metrics span { display:block; color:var(--score-muted,#536b7d); font-size:12px; }
#yearStrategyPanel .strategy-metrics strong { display:block; font-size:24px; line-height:1.4; font-variant-numeric:tabular-nums; }
#yearStrategyPanel .strategy-metrics strong small { margin-left:4px; font-size:12px; font-weight:400; }
#yearStrategyPanel .strategy-criterion,#yearStrategyPanel .strategy-exam-limit { margin:8px 0 12px; font-size:13px; line-height:1.7; color:var(--score-muted,#536b7d); }
#yearStrategyPanel .strategy-exam-limit small { display:block; font-size:12px; }
#yearStrategyPanel .strategy-warning { padding:10px 12px; margin:10px 0; border-left:3px solid; }
#yearStrategyPanel .strategy-warning strong { font-size:14px; }
#yearStrategyPanel .strategy-warning p { margin:4px 0 0; font-size:13px; line-height:1.65; }
#yearStrategyPanel .strategy-warning.danger { border-color:#ba3943; background:#fff0f0; color:#8b2430; }
#yearStrategyPanel .strategy-warning.caution { border-color:#ad761d; background:#fff6e4; color:#75500f; }
#yearStrategyPanel .strategy-fields { width:100%; border-collapse:collapse; table-layout:fixed; font-size:13px; line-height:1.55; }
#yearStrategyPanel .strategy-fields th,#yearStrategyPanel .strategy-fields td { border-bottom:1px solid var(--line,#d5e4f1); padding:10px 4px; overflow-wrap:anywhere; }
#yearStrategyPanel .strategy-fields thead th { font-size:12px; font-weight:500; color:var(--score-muted,#536b7d); }
#yearStrategyPanel .strategy-fields th:first-child { text-align:left; width:auto; }
#yearStrategyPanel .strategy-fields th:not(:first-child),#yearStrategyPanel .strategy-fields td { text-align:center; width:3.4em; font-variant-numeric:tabular-nums; }
#yearStrategyPanel .strategy-fields tbody th { font-weight:500; }
#yearStrategyPanel .strategy-fields small { display:block; font-size:11px; font-weight:400; color:var(--score-muted,#536b7d); }
#yearStrategyPanel .strategy-fields .needs-choice small { color:#855611; }
#yearStrategyPanel .strategy-question-list { margin-top:16px; }
#yearStrategyPanel .strategy-question-list > summary { min-height:44px; padding:10px 0; box-sizing:border-box; cursor:pointer; font-size:14px; font-weight:700; }
#yearStrategyPanel .strategy-question-list label { display:flex; align-items:center; gap:10px; font-size:13px; }
#yearStrategyPanel select { min-height:44px; border:1px solid var(--line,#b6cbdc); border-radius:4px; padding:6px 10px; background:var(--card,#fff); color:inherit; font:inherit; }
#yearStrategyPanel .strategy-question-row { display:grid; grid-template-columns:1fr auto; gap:3px 10px; width:100%; min-height:60px; padding:10px 2px; margin:0; border:0; border-bottom:1px solid var(--line,#d5e4f1); border-radius:0; box-shadow:none; background:transparent; color:inherit; text-align:left; cursor:pointer; }
#yearStrategyPanel .strategy-question-row strong { font-size:14px; }
#yearStrategyPanel .strategy-question-row span { grid-column:1; font-size:12px; }
#yearStrategyPanel .strategy-question-row small { grid-column:2; grid-row:1/3; align-self:center; font-size:12px; }
#yearStrategyPanel .strategy-source { display:inline-block; margin-top:12px; font-size:12px; }
#yearStrategyPanel .strategy-empty { font-size:13px; color:var(--score-muted,#536b7d); }
html[data-color-mode="dark"] #quizScreen #discardBtn[aria-pressed="true"] { color:#ffda8a !important; background:#342a19 !important; border-color:#bd9550 !important; box-shadow:inset 0 0 0 1px #bd9550 !important; }
html[data-color-mode="dark"] #quizScreen .strategy-mastery-badge { color:#b5ecd4; background:#183329; border-color:#598b76; }
html[data-color-mode="dark"] #quizScreen .strategy-history,html[data-color-mode="dark"] .strategy-year-summary { color:var(--night-muted); }
html[data-color-mode="dark"] #yearStrategyPanel { color:var(--night-ink); border-color:var(--night-line); }
html[data-color-mode="dark"] #yearStrategyPanel :is(.strategy-criterion,.strategy-exam-limit,.strategy-metrics span,.strategy-fields thead th,.strategy-fields small,.strategy-empty) { color:var(--night-muted); }
html[data-color-mode="dark"] #yearStrategyPanel :is(.strategy-fields th,.strategy-fields td,.strategy-question-row) { border-color:var(--night-line); }
html[data-color-mode="dark"] #yearStrategyPanel select { background:var(--night-raised); border-color:var(--night-line); color:var(--night-ink); }
html[data-color-mode="dark"] #yearStrategyPanel .strategy-warning.danger { background:#351f23; color:#ffbac2; border-color:#ce747e; }
html[data-color-mode="dark"] #yearStrategyPanel .strategy-warning.caution { background:#30291c; color:#f5d493; border-color:#b99454; }
html[data-color-mode="dark"] .strategy-year-warning.danger { color:#ffbac2; }
html[data-color-mode="dark"] .strategy-year-warning.caution,html[data-color-mode="dark"] #yearStrategyPanel .needs-choice small { color:#f5d493; }
.understanding-rating { display:flex; align-items:center; gap:8px; flex-basis:100%; min-width:0; width:100%; max-width:320px; margin-top:4px; }
#understandingRatingLabel { flex:0 0 52px; font-size:13px; font-weight:600; line-height:1.4; }
#understandingRatingLabel > span { display:block; font-size:10px; font-weight:400; color:var(--muted,#536b7d); }
.understanding-segments { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); min-width:176px; flex:1; border-radius:4px; }
#understandingRating button { appearance:none; display:grid; place-items:center; min-width:44px; width:100%; height:44px; padding:0; margin:0; border:1px solid #b7cbd7; border-radius:0; background:#fff; color:#24465c; box-shadow:none; font-family:inherit; font-size:24px; font-weight:500; line-height:1; cursor:pointer; }
#understandingRating button:first-child { border-radius:4px 0 0 4px; }
#understandingRating button:last-child { border-radius:0 4px 4px 0; }
#understandingRating button + button { border-left-width:0; }
#understandingRating button[aria-pressed="true"] { background:#e4f0fa !important; color:#124c71 !important; box-shadow:inset 0 0 0 2px #397fac !important; }
#understandingRating button:focus-visible,.understanding-dashboard button:focus-visible,.understanding-year-summary button:focus-visible { outline:2px solid #247ca2; outline-offset:2px; position:relative; z-index:1; }
.understanding-dashboard { min-width:0; }
.understanding-dashboard[hidden] { display:none !important; }
.understanding-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.understanding-filters label,.understanding-target label { display:flex; flex-direction:column; gap:5px; min-width:0; font-size:13px; font-weight:600; }
.understanding-filters select,.understanding-target select { display:block; width:100%; min-width:0; min-height:44px; padding:8px; border:1px solid #b7cbd7; border-radius:4px; background:#fff; color:#24465c; font:inherit; font-weight:400; }
.understanding-scope { margin:12px 0 0; color:var(--muted,#536b7d); font-size:12px; }
.understanding-distribution { min-width:0; margin:10px 0 16px; }
.understanding-bar { display:flex; width:100%; height:14px; overflow:hidden; border-radius:3px; background:#d5dade; }
.understanding-bar > span { flex-basis:0; min-width:0; height:100%; }
.grade-excellent { background-color:#237358; }
.grade-good { background-color:#3979a6; }
.grade-partial { background-color:#c49b35; }
.grade-unclear { background-color:#b75b6d; }
.grade-unset { background-color:#c6cdd1; }
.understanding-legend { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; margin-top:8px; }
.understanding-legend > span { display:flex; flex-direction:column; gap:2px; min-width:0; line-height:1.4; font-size:12px; }
.understanding-legend b { font-size:12px; font-weight:600; }
.understanding-legend small { font-size:11px; color:var(--muted,#536b7d); }
.understanding-swatch { display:block; width:100%; max-width:32px; height:3px; }
.understanding-distribution.compact .understanding-bar { height:9px; }
.understanding-distribution.compact .understanding-legend { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px 8px; }
.understanding-distribution.compact .understanding-legend > span { flex-direction:row; gap:3px; font-size:11px; }
.understanding-distribution.compact .understanding-swatch { display:none; }
.understanding-distribution.compact .understanding-legend b { font-size:11px; }
.understanding-target { margin-top:6px; }
.understanding-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 16px; }
.understanding-review-btn,.understanding-detail-btn { appearance:none; min-height:44px; max-width:100%; padding:9px 12px; border:1px solid #b7cbd7; border-radius:4px; font:inherit; font-size:13px; line-height:1.5; cursor:pointer; }
.understanding-review-btn { background:#266b8b; border-color:#266b8b; color:#fff; font-weight:600; flex:1 1 190px; }
.understanding-detail-btn { background:#fff; color:#24465c; }
.understanding-review-btn:disabled,.understanding-detail-btn:disabled { opacity:.45; cursor:default; }
.understanding-year-summary { margin:18px 0; padding:14px 0; border-top:1px solid var(--line,#d5e4f1); border-bottom:1px solid var(--line,#d5e4f1); }
#yearStrategyPanel .understanding-year-summary h3 { margin:0; font-size:15px; line-height:1.5; }
.understanding-field-details,.understanding-question-details { margin-top:14px; border-top:1px solid var(--line,#d5e4f1); }
.understanding-field-details > summary,.understanding-question-details > summary { min-height:44px; padding:12px 0; font-size:14px; font-weight:600; cursor:pointer; }
.understanding-field-row { padding:12px 0 0; border-bottom:1px solid var(--line,#d5e4f1); }
.understanding-field-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; }
.understanding-field-heading h3 { margin:0; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.understanding-field-heading h3 small { display:block; margin-top:2px; color:var(--muted,#536b7d); font-size:11px; font-weight:400; }
.understanding-field-heading button { max-width:150px; font-size:12px; padding:6px 8px; }
.understanding-question-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; width:100%; min-height:64px; margin:0; padding:10px 2px; border:0; border-bottom:1px solid var(--line,#d5e4f1); border-radius:0; background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer; }
.understanding-question-row strong { font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.understanding-question-row > span { grid-column:1; font-size:12px; line-height:1.5; color:var(--muted,#536b7d); }
.understanding-question-row .understanding-question-grade { grid-column:2; grid-row:1/3; align-self:center; min-width:40px; padding:5px; border-radius:4px; text-align:center; color:#fff; font-size:20px; line-height:1.4; }
.understanding-question-row .understanding-question-grade.grade-unset { color:#35424d; font-size:11px; }
.understanding-question-row .understanding-question-grade.grade-partial { color:#3b2b00; }
.understanding-inline { display:block; margin-top:2px; }
#understandingMoreBtn { width:100%; margin:12px 0; }
html[data-color-mode="dark"] #understandingRatingLabel > span { color:var(--night-muted); }
html[data-color-mode="dark"] #understandingRating button { background:#222 !important; border-color:var(--night-line) !important; color:var(--night-ink) !important; }
html[data-color-mode="dark"] #understandingRating button[aria-pressed="true"] { background:#263c48 !important; color:#d9f5ff !important; box-shadow:inset 0 0 0 2px #82bacd !important; }
html[data-color-mode="dark"] :is(.understanding-filters select,.understanding-target select,.understanding-detail-btn) { background:#222; color:var(--night-ink); border-color:var(--night-line); }
html[data-color-mode="dark"] .understanding-review-btn { background:#365c70; border-color:#82a6b7; color:#fff; }
html[data-color-mode="dark"] :is(.understanding-scope,.understanding-legend small,.understanding-field-heading h3 small,.understanding-question-row > span) { color:var(--night-muted); }
html[data-color-mode="dark"] :is(.understanding-year-summary,.understanding-field-details,.understanding-question-details,.understanding-field-row,.understanding-question-row) { border-color:var(--night-line); }
html[data-color-mode="dark"] .grade-excellent { background-color:#69ad91; }
html[data-color-mode="dark"] .grade-good { background-color:#73a9c9; }
html[data-color-mode="dark"] .grade-partial { background-color:#d3b465; }
html[data-color-mode="dark"] .grade-unclear { background-color:#d48392; }
html[data-color-mode="dark"] .grade-unset { background-color:#4b5358; }
html[data-color-mode="dark"] .understanding-question-row .understanding-question-grade { color:#101820; }
html[data-color-mode="dark"] .understanding-question-row .understanding-question-grade.grade-unset { color:var(--night-ink); }
@media (max-width:600px) {
  body[data-subject-theme] .score-tabs.has-understanding .score-tab { min-width:0; flex:1; padding:10px 3px !important; font-size:13px !important; white-space:nowrap; }
  .understanding-actions { gap:8px; }
  .understanding-actions > button { flex-basis:100%; }
}
