*{box-sizing:border-box}body{margin:0;background:#eef3fa;color:#20334f;font:17px/1.55 system-ui,sans-serif}header{background:#fff;border-bottom:1px solid #d4dfed;padding:20px max(24px,calc((100% - 1200px)/2));display:flex;justify-content:space-between;gap:20px}nav,.actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}a{color:#1262b6}header a{text-decoration:none;font-weight:650}main,footer{max-width:1200px;margin:auto;padding:32px 24px}h1{font-size:38px;line-height:1.15;margin:12px 0 28px}h2{font-size:24px;margin:0 0 18px}h3{font-size:20px}.eyebrow{color:#55739a;text-transform:uppercase;letter-spacing:.14em;font-size:13px;font-weight:700}.panel,.task{background:#fff;border:1px solid #d4dfed;border-radius:20px;padding:28px;margin:20px 0}.accent{background:#e4efff;border-color:#b7d3f8}.grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.grid>.panel{margin:0}label{display:block;margin:16px 0;font-weight:600}input,textarea,select,button,.button{font:inherit;border:1px solid #bacde5;border-radius:10px;padding:12px 16px}input,textarea,select{width:100%;background:white;color:#20334f}textarea{min-height:160px;resize:vertical}button,.button{background:#eaf2ff;color:#175aab;cursor:pointer;text-decoration:none;display:inline-block;font-weight:650}button.primary,.button.primary{background:#0866e8;color:white;border-color:#0866e8}button:hover,.button:hover{filter:brightness(.96)}button:disabled{opacity:.55;cursor:wait}small,.muted{color:#61758f;font-size:14px}.list>a{display:block;padding:18px;margin:10px 0;border:1px solid #c7d7ea;border-radius:12px;text-decoration:none}.list strong,.list small{display:block}.pill{display:inline-block;border-radius:20px;background:#e4efff;color:#245a98;padding:5px 12px;font-size:14px}.task-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:20px}.question{line-height:1.6;overflow-wrap:anywhere}.question img,.solution img{max-width:100%;height:auto}.question table,.solution table{max-width:100%;border-collapse:collapse}.question td,.solution td{padding:5px;vertical-align:top}.question p{margin:.6em 0}.question .source-material{margin-bottom:20px}.answer-status{min-height:24px;font-size:14px;color:#4b6c91}.error{color:#ae2635!important}.success{color:#167143!important}#notice:empty{display:none}#notice{padding:12px 16px;border-radius:10px;background:#fff5dc}.student-row{border-top:1px solid #e0e7f0;padding:18px 0}.student-row strong{display:block}.student-row .actions{margin-top:12px}.solution{margin-top:20px;padding-top:20px;border-top:1px solid #d4dfed}.summary-bar{position:sticky;top:0;z-index:2;background:#e4effff5;border:1px solid #b7d3f8;border-radius:12px;padding:14px 20px;display:flex;justify-content:space-between;align-items:center;gap:12px}.answer-value{white-space:pre-wrap;background:#f4f7fb;padding:16px;border-radius:10px;overflow-wrap:anywhere}.task-nav{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.task-nav a{padding:5px 10px;border:1px solid #bad0ec;border-radius:8px;text-decoration:none}.review-form{background:#f4f7fb;padding:16px;border-radius:12px}.review-form input{max-width:160px}footer{font-size:14px}.empty{padding:25px 0;color:#61758f}@media(max-width:760px){.grid{grid-template-columns:1fr}main{padding:22px 14px}header{padding:16px;display:block}header nav{margin-top:10px}h1{font-size:29px}.panel,.task{padding:20px 16px}.question{overflow-x:auto}.summary-bar{flex-wrap:wrap}button,.button{min-height:44px}}@media print{header,footer,button,nav,.actions{display:none}}
.question table{width:100%;font-size:16px}.question .matching-table{table-layout:fixed;margin:12px 0 18px}.question .matching-table>tbody>tr>td{vertical-align:top;padding:5px 0}.question .matching-table>tbody>tr>td:first-child{width:58%}.question .matching-table>tbody>tr>td:nth-child(2){width:20px}.question .options-table{table-layout:auto}.question .options-table td{padding:5px 4px;vertical-align:top}.question .options-table .choice-label{width:32px;white-space:nowrap}.question .options-table p{margin:0}.question .answer-table{max-width:620px;margin:8px 0}.question .answer-table td{border:1px solid #c7d7ea;padding:6px 10px}.solution .export-caption,.solution .export-document>h1{display:none}.review-form .answer-status{display:block;margin-top:10px}input,textarea{font-weight:400}summary{cursor:pointer;color:#175aab}
[hidden]{display:none!important}.back-link{display:inline-flex;align-items:center;min-height:44px;font-weight:600;text-decoration:none;margin-bottom:8px}.back-link:hover{text-decoration:underline}header nav a{padding:8px 10px;border-radius:9px;font-size:14px}header nav a{color:#365570}header nav a:hover{background:#e4edfc}header nav a[aria-current]{color:#203e5e}header nav a[href$="/create"]{background:#0868df;color:#fff;font-weight:750;box-shadow:0 3px 9px #0868df30}header nav a[href$="/create"]:hover{background:#0058c2}.actions a:not(.button){padding:10px 0}#create-area .panel{margin-top:0}@media(max-width:760px){header nav{gap:5px}header nav a{font-size:12px;padding:8px 6px}}

.matching-columns{display:grid;grid-template-columns:1.2fr 1fr;gap:24px}.matching-columns h3{font-size:15px}.solution-note{padding:12px;background:#fff4df}.catalog-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.catalog-choices label{display:flex;gap:10px;margin:0;padding:10px;border:1px solid #d4dfed;border-radius:10px;font-size:14px;font-weight:400}.catalog-choices input{width:18px;flex:none}.catalog-choices span{min-width:0}.catalog-choices small{display:block}.catalog-tools{display:flex;gap:10px;flex-wrap:wrap}.task-preview{padding:16px 0;border-bottom:1px solid #d4dfed}.task-preview summary{font-weight:650}.builder-actions{position:sticky;bottom:0;background:#fff;padding:16px;box-shadow:0 -4px 20px #25416512;border-radius:12px}.answer-help{font-size:13px;color:#61758f}@media(max-width:760px){.catalog-choices,.matching-columns{grid-template-columns:1fr}.builder-actions{position:static}}
.catalog-choices{max-height:340px;overflow-y:auto;overscroll-behavior:contain;padding:2px 8px 2px 2px;scrollbar-gutter:stable}.catalog-choices label:has(input:checked){background:#eaf2ff;border-color:#8fb7ec}.catalog-choices label:focus-within{outline:2px solid #0866e8;outline-offset:-2px}@media(max-width:760px){.catalog-choices{max-height:300px}}

.work-filters{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.work-filters button{padding:9px 12px;font-size:14px;background:#fff;min-height:44px}.work-filters [aria-pressed=true]{background:#0866e8;color:white}.stage-pill{display:inline-block;padding:5px 10px;margin:8px 0;border-radius:10px;font-size:14px;background:#eaf2ff;color:#23548c}.stage-submitted{background:#fff0ce;color:#795715}.stage-reviewed{background:#e0f2e8;color:#236647}.work-counts{font-size:14px;color:#536b85;margin:10px 0}.teacher-dashboard .list b{font-size:15px}.student-row>small{display:block}.teacher-dashboard{min-width:0}.teacher-dashboard a{overflow-wrap:anywhere}.grid:has(.teacher-dashboard){grid-template-columns:minmax(0,2fr) minmax(0,1fr)}@media(max-width:760px){.grid:has(.teacher-dashboard){grid-template-columns:1fr}.work-filters button{flex:1 1 140px;text-align:left}.review-form input{max-width:100%}}

/* Exam grading */
.review-form h4{margin:0;font-size:1.1rem}.review-form .criterion{display:grid;gap:10px}.criterion-help{font-weight:400;font-size:.92rem;line-height:1.6;color:#52647f}.criteria-source{font-size:.9rem}.grading-summary{margin:18px 0;padding:20px;background:#edf4ff;border:1px solid #d0dff5;border-radius:14px}.grading-summary p{margin:10px 0 0}.legacy-grade{padding:12px;border:1px solid #dfd5af;background:#fff9ea;border-radius:10px;font-size:.9rem}.review-form select{width:100%;max-width:260px;min-height:44px;padding:10px;background:white;border:1px solid #b6c8e3;border-radius:9px;font:inherit}.review-form{min-width:0}.criterion-help,.criteria-source{overflow-wrap:anywhere}

/* Exam response grid: equal columns, including empty writing cells. */
.question .correction-table,.answer-block .correction-table,.solution .correction-table{width:100%;max-width:100%;table-layout:fixed;border-collapse:collapse;margin:18px 0}
.correction-table th,.correction-table td{width:50%;border:1px solid #9caec5!important;padding:10px 12px!important;vertical-align:top;white-space:normal!important;overflow-wrap:break-word}
.correction-table th{text-align:center;font-weight:600;background:#f5f8fd}
.correction-table p{margin:0!important}.correction-table td{height:58px}
@media(max-width:540px){.correction-table th,.correction-table td{padding:8px!important;font-size:14px}}

.question .short-answer-line{width:auto;max-width:100%;border:0;border-collapse:collapse;margin:14px 0;table-layout:auto}.question .short-answer-line td{border:0;padding:0 8px 0 0;vertical-align:bottom}.question .short-answer-line td:first-child{white-space:nowrap}.question .short-answer-line td:last-child{width:140px;min-width:90px;border-bottom:1px solid #72839a;height:28px}.question .short-answer-line p{margin:0}
.question .comparison-answer-table{width:420px;max-width:100%;table-layout:fixed}.question .comparison-answer-table th{font-weight:normal;text-align:center;border:1px solid #c7d7ea;padding:6px}.question .comparison-answer-table td{width:25%;height:34px}
.question .short-answer-cells td:nth-child(n+2){width:36px;min-width:36px;height:34px;border:1px solid #72839a;padding:0}
