
:root{--n:#071B3D;--g:#D4AF37;--b:#f4f7fb}*{box-sizing:border-box}body{margin:0;background:var(--b);color:var(--n);font:14px Cairo,Tahoma,sans-serif}header{background:linear-gradient(120deg,#071b3d,#153c6f);color:#fff;padding:16px max(3%,15px) 30px}header .top{max-width:1100px;margin:auto;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:12px;align-items:center}.brand img{width:65px;height:65px;object-fit:contain}.brand strong{font-size:21px}.brand small{display:block;font-size:11px;color:#d7e3ee}header nav a{display:inline-block;margin:3px;padding:9px 13px;border-radius:10px;color:#fff;border:1px solid #ffffff50;text-decoration:none;font-weight:700}header nav a.on{background:var(--g);color:var(--n)}header .intro{max-width:1100px;margin:18px auto 0}h1{font-size:27px;margin:0}h2{margin:0 0 9px;font-size:20px}p{line-height:1.8}.intro p{margin:0;color:#dce7f6}.shell{max-width:1100px;margin:24px auto;padding:0 15px}.grid{display:grid;grid-template-columns:340px 1fr;gap:18px;align-items:start}.panel{border:1px solid #dfe6ef;background:#fff;border-radius:18px;padding:21px;box-shadow:0 5px 24px #071b3d0a;min-width:0}.muted{color:#687991}.field{margin:13px 0}.field label{display:block;font-weight:800;margin-bottom:6px}input,textarea,select{width:100%;padding:11px;border-radius:10px;border:1px solid #cbd6e3;background:#fff;color:var(--n);font:inherit}textarea{min-height:100px;resize:vertical;line-height:1.8}.ltr{direction:ltr;text-align:left}.btn{font:700 13px Cairo;cursor:pointer;border:0;border-radius:10px;background:var(--n);color:white;padding:11px 15px}.gold{background:var(--g);color:var(--n)}.light{background:#eaf0f7;color:var(--n)}.red{background:#ffeded;color:#a32}.full{width:100%}.upload{display:block;border:2px dashed #becbdc;background:#f8fbff;border-radius:12px;padding:25px;text-align:center;cursor:pointer}.upload input{display:none}.upload b{display:block}.qa{border:1px solid #dbe4ed;border-radius:14px;padding:15px;margin:13px 0}.badge{background:#eaf1fa;display:inline-block;border-radius:20px;padding:5px 11px;font-weight:700}.q{white-space:pre-wrap;direction:ltr;text-align:left;background:#f3f6fa;border-radius:11px;padding:14px;margin-top:11px;font:15px/1.8 Arial,sans-serif}.a{white-space:pre-wrap;background:#eef8f1;border-radius:11px;padding:14px;color:#125d2d;font-weight:800;line-height:2;margin-top:11px}.note{padding:7px 10px;border:1px solid #f2d2d1;background:#fff4f4;margin-top:7px;border-radius:7px;color:#bd2026;font-size:11px;font-weight:700;line-height:1.6;white-space:normal;overflow-wrap:break-word;overflow:visible;max-width:100%;min-width:0}.msg{font-size:12px;margin-top:8px;min-height:19px}.bad{color:#b22}.good{color:#166534}.row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}.tabs button.active{background:var(--n);color:#fff}.tab{display:none}.tab.active{display:block}.previewitem{border:1px solid #dfe6ef;border-radius:10px;padding:12px;margin-top:12px}.previewitem textarea{margin-top:8px}.tablewrap{overflow:auto}table{width:100%;min-width:700px;border-collapse:collapse}td,th{padding:10px;border-bottom:1px solid #e3e7ee;text-align:right;vertical-align:top;font-size:12px}th{background:#eef2f8}.stat{padding:14px;background:#fff;border:1px solid #e1e7ee;border-radius:12px}.stat b{font-size:26px;display:block}[hidden]{display:none!important}footer{text-align:center;color:#687991;padding:23px;font-size:11px}@media(max-width:800px){.grid{grid-template-columns:1fr}.two{grid-template-columns:1fr}.brand img{width:46px;height:46px}.brand strong{font-size:16px}header nav a{padding:6px;font-size:11px}.panel{padding:15px}}
.selection-tools{margin:-2px 0 17px;padding:13px 15px;background:#f7f9fc;border:1px solid #d8e2ef;border-radius:12px}.selection-caption{font-weight:800;margin-bottom:9px}.marker-button{border:1px solid #b9cae0}.marker-button:focus-visible,.btn:focus-visible{outline:3px solid var(--g);outline-offset:2px}.selection-tools code{font-family:monospace;border:1px solid #d8e1ef;background:#fff;padding:2px 6px;border-radius:5px;color:#123a64;display:inline-block}.materials-list{display:grid;gap:8px}.material-item{border:1px solid #e0e7f1;border-radius:11px;padding:11px 13px;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fafdff}.material-item span{overflow-wrap:anywhere}.material-item small{color:#687991}.material-item .btn{padding:6px 10px;font-size:11px}.material-item .btn:disabled{opacity:.35}.selection-tools .row button{white-space:nowrap}

/* Header aligned with DrNapester Smart Academic Planner (spv2) */
header{background:#071B3D;color:#fff;border-bottom:4px solid #D4AF37;padding:0}
header .top{max-width:1120px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:78px;padding:14px 22px}
header .top-brand{display:flex;align-items:center;gap:14px;min-width:0}
header .top-brand img{width:59px;height:59px;object-fit:contain;background:transparent;flex-shrink:0}
header .top-brand .brand{display:block;min-width:0;font:800 17px/1.5 Tahoma,"Segoe UI",Arial,sans-serif}
header .top-brand .brand small{display:block;font:700 12px/1.8 Arial,sans-serif;color:#D4AF37;direction:ltr;text-align:right}
header nav{display:flex;align-items:center;gap:8px;white-space:nowrap}
header nav a{display:inline-flex;align-items:center;justify-content:center;min-height:39px;padding:9px 14px;margin:0;background:transparent;color:#fff;border:1px solid #D4AF37;border-radius:9px;font:700 13px/1.5 Tahoma,Arial,sans-serif;text-decoration:none;transition:background .15s}
header nav a:hover,header nav a:focus-visible{background:#15345C;color:#D4AF37;outline-offset:2px}
header nav a.on{background:#D4AF37;color:#071B3D}
.intro{max-width:1110px;margin:23px auto 0;padding:25px 32px;border-radius:18px;background:linear-gradient(130deg,#071B3D 10%,#102E61 100%);color:#fff}
.intro h1{font-size:clamp(21px,3vw,27px);line-height:1.6}
.intro p{font-size:13px;color:#dce7f6;margin:3px 0 0}
.shell{margin-top:17px}
@media(max-width:800px){header .top{padding:12px 16px;gap:9px}header .top-brand{gap:9px}header .top-brand img{width:45px;height:45px}header .top-brand .brand{font-size:13px}header .top-brand .brand small{font-size:10px}header nav{gap:5px}header nav a{font-size:11px;min-height:35px;padding:7px 9px}.intro{margin:16px 12px 0;padding:21px 22px;border-radius:14px}}
@media(max-width:510px){header .top{align-items:flex-start;flex-direction:column;gap:9px;padding:10px 12px}header .top-brand img{width:42px;height:42px}header nav{flex-wrap:wrap}header nav a{font-size:11px;padding:6px 10px;min-height:34px}.intro{margin:12px 11px 0;padding:18px 17px}.intro h1{font-size:21px}}

/* Local-only question cropper */
.crop-overlay{position:fixed;inset:0;z-index:2000;background:rgba(7,27,61,.77);display:flex;align-items:center;justify-content:center;padding:12px;overscroll-behavior:contain}
.crop-overlay[hidden]{display:none!important}
.crop-dialog{width:min(100%,850px);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;border-radius:19px;background:#fff;box-shadow:0 20px 90px #0006;padding:20px;color:var(--n)}
.crop-dialog h2{font-size:20px;margin:0 0 7px}
.crop-dialog p{margin:0 0 13px;color:#60728b;font-size:13px;line-height:1.8}
.crop-stage{display:flex;align-items:center;justify-content:center;min-height:140px;max-height:61dvh;background:#091a32;border-radius:14px;overflow:hidden;padding:9px}
#cropCanvas{display:block;max-width:100%;max-height:55dvh;width:auto;height:auto;touch-action:none;cursor:crosshair;user-select:none;-webkit-user-select:none;box-shadow:0 5px 20px #0005}
.crop-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:15px}
.crop-actions button{flex:1;white-space:nowrap;min-width:135px}
.crop-info{background:#f8fafc;border:1px solid #e0e8f1;border-radius:10px;padding:9px 12px;margin-top:12px;font-size:12px;color:#526781}
.crop-lock{overflow:hidden}
#cropThumb{display:block;max-width:100%;max-height:155px;margin:10px 0 0;border-radius:9px;border:1px solid #e0e6ed;object-fit:contain}
#cropThumb[hidden]{display:none!important}
@media(max-width:620px){.crop-overlay{padding:6px}.crop-dialog{padding:13px;border-radius:13px;max-height:calc(100dvh - 12px)}.crop-dialog h2{font-size:18px}.crop-stage{padding:5px;max-height:57dvh}#cropCanvas{max-height:52dvh}.crop-actions{gap:7px}.crop-actions button{font-size:12px;padding:9px 6px;min-width:calc(50% - 4px)}}

.crop-stage{background:#06090f}
#cropCanvas{cursor:default}


/* Compact question management actions: import stays closed until needed */
.er-compact-actions{margin:12px 0 15px}
.er-compact-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;border:1px solid #dce4ef;background:#f7f9fc;border-radius:12px;padding:9px 12px}
.er-compact-status{display:flex;align-items:center;gap:9px;white-space:nowrap}
.er-compact-status strong{font-size:12px;color:#071B3D}
.er-smallhint{color:#73829a;font-size:11px}
.er-compact-buttons{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.er-compact-buttons .btn{font-size:12px;padding:8px 12px;border-radius:9px;white-space:nowrap;line-height:1.5}
.er-compact-buttons .btn:disabled{opacity:.45;cursor:not-allowed}
#toggleExcelImport{background:#071B3D;color:#fff}
#toggleExcelImport[aria-expanded="true"]{background:#D4AF37;color:#071B3D}
.er-compact-import{margin-top:8px;padding:13px 14px;border-radius:12px;border:1px solid #dce4ef;background:#fbfcff}
.er-import-top{display:flex;justify-content:space-between;align-items:start;gap:10px;margin-bottom:9px}
.er-import-top strong{font-size:14px}
.er-import-top p{margin:3px 0 0;color:#687991;font-size:11px}
.er-close{cursor:pointer;background:#edf1f7;border:0;border-radius:8px;padding:4px 9px;color:#071B3D}
.er-close:hover{background:#e0e7f1}
.er-compact-import .er-file-label{display:block;margin-bottom:6px;font-size:12px;font-weight:700}
.er-import-controls{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;gap:8px;align-items:center}
.er-import-controls input{width:100%;min-width:0;padding:7px 9px;font-size:12px;background:white}
.er-import-controls .btn{padding:8px 12px;white-space:nowrap;font-size:12px}
.er-compact-import #excelPreview{margin-top:4px}
@media(max-width:680px){
 .er-compact-bar{padding:10px;gap:9px}
 .er-compact-status{width:100%;justify-content:space-between}
 .er-compact-buttons{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .er-compact-buttons .btn{padding:9px 5px;font-size:11px;white-space:normal;min-height:38px}
 .er-import-controls{grid-template-columns:1fr 1fr}
 .er-import-controls input{grid-column:1/-1}
 .er-import-controls button{min-width:0}
}
.er-checkbox{width:18px!important;height:18px!important;min-width:18px!important;accent-color:#071B3D;cursor:pointer;vertical-align:middle;padding:0!important}
.er-import-preview{border:1px solid #dce3ed;border-radius:12px;background:#fff;margin-top:12px;padding:12px;overflow:auto}
.er-import-preview table{min-width:600px}
.er-import-preview h4{margin:0 0 8px;font-size:13px}
.er-tiny{font-size:11px;color:#687991}

#studentGrid:not(.has-results){grid-template-columns:minmax(0,440px);justify-content:center}
#resultsPanel[hidden],#matchControls[hidden]{display:none!important}
#resultsPanel>p{font-size:12px;margin:0 0 13px}
.match-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #dee5ef;border-radius:12px;padding:10px 13px;margin:12px 0 15px;background:#f8fafc}
.match-controls label{font-size:13px;font-weight:800;color:#071B3D}
#matchThreshold{width:120px;max-width:45%;height:40px;min-height:40px;margin:0;padding:7px 10px;border-radius:9px;font-weight:800;color:#071B3D;background:#fff;border:1px solid #cad5e5;text-align:center;cursor:pointer}
#matchThreshold:focus-visible{outline:2px solid #D4AF37;outline-offset:2px}
@media(max-width:420px){.match-controls{padding:9px 10px}.match-controls label{font-size:12px}#matchThreshold{width:102px}}
@media(max-width:800px){#studentGrid:not(.has-results){grid-template-columns:minmax(0,470px)}}

/* Mobile-first student search: entire initial form fits in a single phone viewport. */
@media (max-width: 680px) {
  body.exam-student header .top {flex-direction:row;align-items:center;justify-content:space-between;gap:8px;min-height:56px;padding:7px 11px}
  body.exam-student header .top-brand {gap:7px;min-width:0;flex:1}
  body.exam-student header .top-brand img {width:37px;height:37px;flex-shrink:0}
  body.exam-student header .top-brand .brand {font-size:12px;line-height:1.35;min-width:0}
  body.exam-student header .top-brand .brand small {font-size:9px;line-height:1.25}
  body.exam-student header nav {margin:0;flex-shrink:0;gap:0}
  body.exam-student header nav a {min-height:33px;min-width:0;padding:5px 8px;font-size:10px;border-radius:8px;white-space:nowrap}
  body.exam-student .intro {display:none}
  body.exam-student #student.shell {margin:8px auto 0;padding:0 11px}
  body.exam-student #studentGrid {gap:10px}
  body.exam-student #studentGrid:not(.has-results) {grid-template-columns:minmax(0,1fr)}
  body.exam-student #studentGrid>.panel:first-child {padding:13px 14px 12px;border-radius:14px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:10px;row-gap:5px;align-items:start}
  body.exam-student #studentGrid>.panel:first-child>h2,
  body.exam-student #studentGrid>.panel:first-child>p,
  body.exam-student #studentGrid>.panel:first-child>.field:nth-child(n+5),
  body.exam-student #studentGrid>.panel:first-child>#searchBtn,
  body.exam-student #studentGrid>.panel:first-child>#searchMsg {grid-column:1/-1}
  body.exam-student #studentGrid>.panel:first-child>h2 {font-size:19px;line-height:1.5;margin:0}
  body.exam-student #studentGrid>.panel:first-child>p {font-size:11px;line-height:1.4;margin:0 0 2px}
  body.exam-student #studentGrid>.panel:first-child>.field {min-width:0;margin:2px 0 3px}
  body.exam-student #studentGrid>.panel:first-child>.field>label:not(.upload) {font-size:12px;line-height:1.35;margin:0 0 4px}
  body.exam-student #studentGrid select {height:39px;min-height:39px;padding:6px 8px;font-size:14px;border-radius:9px}
  body.exam-student #studentGrid .upload {display:flex;align-items:center;justify-content:center;gap:9px;min-height:55px;padding:10px 12px;border-radius:10px;font-size:17px;line-height:1.2}
  body.exam-student #studentGrid .upload b {font-size:13px;display:inline;margin:0}
  body.exam-student #studentGrid .upload .muted {display:none}
  body.exam-student #studentGrid #query {display:block;min-height:67px;height:67px;max-height:100px;padding:8px 10px;line-height:1.45;font-size:16px;border-radius:9px}
  body.exam-student #studentGrid #searchBtn {height:43px;min-height:43px;padding:8px 12px;line-height:1.5}
  body.exam-student #studentGrid .msg {min-height:0;margin-top:3px;font-size:11px}
  body.exam-student #resultsPanel {padding:14px;border-radius:14px}
  body.exam-student footer {padding:11px 8px;font-size:10px}
}
@media (max-width: 680px) and (max-height: 660px) {
  body.exam-student header .top {min-height:52px;padding-top:5px;padding-bottom:5px}
  body.exam-student #student.shell {margin-top:6px}
  body.exam-student #studentGrid>.panel:first-child {padding:10px 12px;row-gap:3px}
  body.exam-student #studentGrid .upload {min-height:50px;padding:8px 10px}
  body.exam-student #studentGrid #query {min-height:61px;height:61px}
  body.exam-student footer {padding:6px 7px}
}

.no-results-alert{margin:13px 0 4px;padding:12px 14px;border:1px solid #f1b7b7;border-right:4px solid #c62828;border-radius:11px;background:#fff0f0;color:#a51c24;line-height:1.8;overflow-wrap:anywhere;box-shadow:0 2px 8px rgba(166,32,38,.06)}
.no-results-alert .no-results-title{display:block;font-size:14px;font-weight:800;color:#a51c24;margin-bottom:4px}
.no-results-alert .no-results-message{margin:0;font-size:13px;font-weight:700;color:#9d2025}
@media(max-width:680px){.no-results-alert{padding:10px 11px;margin-top:9px}.no-results-alert .no-results-title{font-size:13px}.no-results-alert .no-results-message{font-size:12px;line-height:1.85}}

/* Admin session-check state: prevent a temporary login-form flash. */
.auth-verify{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:205px;text-align:center}
.auth-verify-spinner{width:43px;height:43px;border-radius:50%;border:4px solid #e5ebf2;border-top-color:#D4AF37;animation:authVerifySpin .85s linear infinite}
.auth-verify-title{font-weight:800;font-size:17px;color:#071B3D}
.auth-verify-subtitle{color:#64748b;font-size:12px;line-height:1.8;max-width:290px}
@keyframes authVerifySpin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.auth-verify-spinner{animation:none;border-top-color:#D4AF37}}

.no-results-alert .no-results-message{font-weight:400;margin:7px 0 0;font-size:13px;line-height:1.95;color:#9d2025}
.no-results-alert .no-results-message strong{font-weight:800;color:#88171c}
.no-results-alert .no-results-lead{margin:3px 0 10px}
.no-results-alert .no-results-lead strong{font-size:14px}
@media(max-width:680px){.no-results-alert .no-results-message{font-size:12px;line-height:1.85}.no-results-alert .no-results-lead strong{font-size:13px}}

/* Student course selector: searchable, responsive, no library required */
.course-picker{position:relative;min-width:0}
.course-picker-trigger{width:100%;min-width:0;min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border:1px solid #cbd6e3;border-radius:10px;color:var(--n);background:#fff;font:inherit;cursor:pointer;text-align:right}
.course-picker-trigger:hover{border-color:#9db0c6}
.course-picker-trigger:focus-visible{outline:3px solid #D4AF37;outline-offset:2px}
.course-picker-trigger span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.course-picker-chevron{font-size:18px;color:#475569;line-height:1}
.course-picker-menu{position:absolute;top:calc(100% + 5px);right:0;left:0;z-index:100;background:#fff;padding:8px;border:1px solid #cbd6e3;border-radius:11px;box-shadow:0 12px 32px rgba(7,27,61,.15);min-width:0}
.course-picker-menu[hidden]{display:none!important}
#coursePickerSearch{width:100%;min-width:0;height:41px;min-height:41px;border-radius:8px;padding:7px 10px;font-size:14px;outline-offset:1px;direction:auto;text-align:right}
#coursePickerSearch:focus{border-color:#D4AF37;outline:1px solid #D4AF37}
.course-picker-choices{max-height:225px;overflow-y:auto;overscroll-behavior:contain;margin-top:5px;display:grid;gap:2px}
.course-picker-option{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:right;padding:8px 10px;background:#fff;color:var(--n);font:inherit;font-size:13px;min-height:38px;width:100%;border:0;border-radius:7px;cursor:pointer}
.course-picker-option:hover,.course-picker-option:focus-visible{background:#f1f5fa;outline:0}
.course-picker-option[aria-selected="true"]{background:#f4edc9;font-weight:800}
.course-picker-option small{color:#64748b;font-size:10px;white-space:nowrap}
.course-picker-empty{font-size:12px;color:#63758f;text-align:center;padding:12px 7px}
@media(max-width:680px){body.exam-student #studentGrid .course-picker-trigger{height:39px;min-height:39px;padding:6px 8px;font-size:14px;border-radius:9px}body.exam-student #coursePickerSearch{font-size:16px}body.exam-student .course-picker-menu{min-width:165px;padding:6px;box-shadow:0 10px 25px #071b3d30}body.exam-student .course-picker-option{font-size:13px;min-height:40px}}
.student-question-prompt{display:block!important;text-align:center!important;color:#B4232A!important;font-weight:800!important;margin-bottom:7px!important;font-size:14px!important;line-height:1.6!important}
@media(max-width:680px){body.exam-student #studentGrid>.panel:first-child>.field>label.student-question-prompt{font-size:13px!important;line-height:1.45!important;margin-bottom:5px!important}}


/* Fixed crop viewport: rotating the exam image must not resize the dialog or move controls. */
.crop-stage{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  height:min(55dvh,520px);
  min-height:0;
  max-height:none;
  flex:0 0 auto;
  overflow:hidden;
}
#cropCanvas{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
@media(max-width:620px){
  .crop-stage{
    height:clamp(185px,calc(100dvh - 320px),450px);
    min-height:0;
    max-height:none;
  }
  #cropCanvas{max-height:100%;max-width:100%}
}


/* Student result metadata: clear course, exam, and similarity fields */
.result-meta{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  margin-bottom:12px;
  direction:rtl;
}
.result-meta-item{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  min-width:0;
  padding:10px 12px;
  border:1px solid #dfe7f0;
  border-radius:11px;
  background:#f7f9fc;
}
.result-meta-label{
  display:block;
  color:#66768d;
  font-size:11px;
  line-height:1.4;
  font-weight:700;
}
.result-meta-value{
  display:block;
  color:#071b3d;
  font-size:15px;
  line-height:1.35;
  font-weight:800;
  overflow-wrap:anywhere;
}
.result-meta-code{direction:ltr;text-align:right}
.result-meta-match{
  background:#eef8f1;
  border-color:#cde5d4;
}
.result-meta-match .result-meta-value{
  color:#126139;
  font-size:20px;
}
@media(max-width:620px){
 .result-meta{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:10px}
 .result-meta-item{padding:9px 11px}
 .result-meta-match{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 12px}
 .result-meta-match .result-meta-value{font-size:19px}
 .result-meta-label{font-size:11px}
 .result-meta-value{font-size:14px}
}


/* Clear student-results hierarchy using DrNapester navy and gold. */
.student-intro-notice{
  color:#0B2349;
  background:#FFF9E9;
  border:1px solid #ead8a5;
  border-right:4px solid #D4AF37;
  border-radius:11px;
  padding:10px 13px;
  margin:0 0 12px;
  font-size:12px;
  line-height:1.8;
}
.student-intro-notice strong{font-weight:800;color:#071B3D}
.student-intro-notice span{font-weight:700}
.result-meta,.result-meta:dir(rtl){
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-bottom:11px;
}
.result-meta-item{
  padding:8px 7px;
  border:1px solid #dce4ef;
  border-radius:9px;
  background:#F4F7FC;
  gap:2px;
}
.result-meta-label{font-size:10px;line-height:1.4;color:#61728b;white-space:nowrap}
.result-meta-value{font-size:13px;line-height:1.5;color:#071B3D;min-width:0}
.result-meta-match{
  grid-column:auto;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  background:#FFF6DA;
  border-color:#E6D18A;
}
.result-meta-match .result-meta-label{color:#695116}
.result-meta-match .result-meta-value{color:#735309;font-size:17px}
.qa{
  border:1px solid #D8E1ED;
  border-top:4px solid #D4AF37;
  border-radius:15px;
  padding:14px;
  margin:18px 0 22px;
  background:#FFF;
  box-shadow:0 7px 20px rgba(7,27,61,.075);
}
.qa + .qa{margin-top:25px}
.qa-question-block,.qa-answer-block{
  position:relative;
  border-radius:11px;
  margin-top:10px;
  padding:12px 13px 13px;
  border:1px solid;
  border-right-width:4px;
  min-width:0;
}
.qa-question-block{background:#F0F4FA;border-color:#D6E1EF;border-right-color:#173A70}
.qa-answer-block{background:#E4ECE6;border-color:#C2D4C7;border-right-color:#397654}
.qa-section-title{display:block;font-size:12px;font-weight:800;line-height:1.5;margin-bottom:8px}
.qa-question-block .qa-section-title{color:#143565}
.qa-answer-block .qa-section-title{color:#24563A}
.qa-question-block .q{
  white-space:pre-wrap;
  margin:0;
  padding:0;
  background:transparent;
  border-radius:0;
  font:15px/1.8 Arial,sans-serif;
  color:#102449;
  overflow-wrap:anywhere;
}
.qa-answer-block .a{
  white-space:pre-wrap;
  margin:0;
  padding:0;
  background:transparent;
  border-radius:0;
  color:#214833;
  line-height:1.85;
  font-size:14px;
  font-weight:800;
  overflow-wrap:anywhere;
}
.qa>.note{
  margin-top:10px;
  padding:8px 10px;
  background:#FFF3F2;
  color:#B4232A;
  border:1px solid #F1CDCA;
  border-radius:9px;
  font-size:11px;
  font-weight:700;
}
@media(max-width:620px){
  body.exam-student .student-intro-notice{margin-bottom:8px;padding:7px 9px;font-size:11px;line-height:1.55;border-radius:9px}
  body.exam-student .result-meta{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-bottom:8px}
  body.exam-student .result-meta-item{padding:7px 5px;min-width:0;border-radius:8px;gap:1px}
  body.exam-student .result-meta-match{grid-column:auto;flex-direction:column;align-items:stretch;justify-content:center}
  body.exam-student .result-meta-label{font-size:10px;white-space:nowrap}
  body.exam-student .result-meta-value{font-size:12px;line-height:1.45;overflow-wrap:anywhere}
  body.exam-student .result-meta-match .result-meta-value{font-size:15px}
  body.exam-student .qa{padding:10px;margin:13px 0 19px;border-radius:12px}
  body.exam-student .qa + .qa{margin-top:19px}
  body.exam-student .qa-question-block,body.exam-student .qa-answer-block{padding:9px 10px 10px;margin-top:8px}
  body.exam-student .qa-section-title{font-size:11px;margin-bottom:5px}
  body.exam-student .qa-question-block .q{font-size:14px;line-height:1.7}
  body.exam-student .qa-answer-block .a{font-size:13px;line-height:1.8}
}


/* Subtle extra breathing room in the student search form. */
@media (max-width:680px){
  body.exam-student .student-intro-notice{margin-bottom:12px}
  body.exam-student #studentGrid>.panel:first-child{
    row-gap:9px;
    padding-top:16px;
    padding-bottom:15px;
  }
  body.exam-student #studentGrid>.panel:first-child>p{margin-bottom:4px}
  body.exam-student #studentGrid>.panel:first-child>.field{margin:3px 0 4px}
  body.exam-student #studentGrid>.panel:first-child>.field>label:not(.upload){margin-bottom:6px}
  body.exam-student #studentGrid>.panel:first-child>#searchBtn{margin-top:4px}
}
@media (max-width:680px) and (max-height:660px){
  body.exam-student .student-intro-notice{margin-bottom:9px}
  body.exam-student #studentGrid>.panel:first-child{
    row-gap:6px;
    padding-top:12px;
    padding-bottom:12px;
  }
  body.exam-student #studentGrid>.panel:first-child>.field>label:not(.upload){margin-bottom:5px}
  body.exam-student #studentGrid>.panel:first-child>#searchBtn{margin-top:3px}
}
@media (min-width:681px){
  body.exam-student #studentGrid>.panel:first-child>.field{margin:16px 0}
  body.exam-student #studentGrid>.panel:first-child>.field>label:not(.upload){margin-bottom:8px}
  body.exam-student #studentGrid>.panel:first-child>#searchBtn{margin-top:5px}
}


/* Compact public site analytics under copyright */
.site-metrics{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;margin:9px auto 0;direction:rtl;color:#465b78;font-size:11px;line-height:1.55}
.site-metric{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:135px;padding:6px 12px;border:1px solid #dce5f0;border-radius:999px;background:#fff}
.site-metric strong{font-weight:800;color:#071B3D;font-size:13px;font-variant-numeric:tabular-nums}
@media(max-width:680px){.site-metrics{gap:7px;margin-top:7px}.site-metric{min-width:123px;padding:5px 9px;font-size:10px}.site-metric strong{font-size:12px}}

:root{--n:#071B3D;--g:#D4AF37;--b:#f4f7fb}
*{box-sizing:border-box}html{scroll-behavior:smooth}body.quiz-ai{margin:0;background:#f4f7fb;color:#071b3d;font:14px Tahoma,Arial,sans-serif}[hidden]{display:none!important}
.quiz-shell{max-width:1050px;margin:19px auto 0;padding:0 16px}.quiz-hero{margin:0 0 15px;min-height:150px}.hero-inner{display:flex;align-items:center;justify-content:space-between;gap:20px}.hero-kicker{display:inline-block;color:#e9cb6b;font:700 11px/1.4 Arial;letter-spacing:1.9px;margin-bottom:8px}.hero-number{direction:ltr;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #ffffff28;background:#ffffff0b;border-radius:17px;width:110px;height:110px;flex:0 0 110px}.hero-number strong{font:700 58px/1 Arial;color:#e5c768}.hero-number span{font:700 10px Arial;letter-spacing:1.7px;color:#e1e9f6;margin-top:8px}
.quiz-note{display:flex;align-items:flex-start;gap:10px;background:#fff9e9;border:1px solid #ebd9a4;border-radius:12px;padding:12px 15px;font-size:12px;line-height:1.9;color:#68521c}.note-icon{background:#e4c66b;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;font:bold 13px Arial;flex:0 0 20px}.mode-notice{display:flex;align-items:center;gap:7px;margin:13px 0;color:#66758c;font-size:11px;line-height:1.7}.status-dot{width:8px;height:8px;border-radius:50%;background:#d4af37}.mode-notice.ready .status-dot{background:#19986d}
.quiz-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 17px}.quiz-step{background:#fff;border:1px solid #dfe6ef;border-radius:13px;display:flex;align-items:center;gap:10px;padding:11px 13px;min-width:0;color:#66758c}.quiz-step>span{display:grid;place-items:center;background:#edf1f7;border-radius:10px;width:35px;height:35px;font-size:16px;font-weight:bold;flex:0 0 35px}.quiz-step b,.quiz-step small{display:block;line-height:1.55}.quiz-step b{font-size:12px;color:#324a69}.quiz-step small{font-size:10px;margin-top:3px}.quiz-step.active{border-color:#d4af37;background:#fffdf7}.quiz-step.active>span{background:#071b3d;color:#fff}.quiz-step.active b{color:#071b3d}.quiz-step.done>span{background:#e5f4ec;color:#18704c}
.quiz-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:15px;align-items:start}.quiz-workspace{min-width:0;display:grid;gap:14px}.quiz-panel{background:#fff;border:1px solid #dce5ef;border-radius:17px;padding:20px;min-width:0;box-shadow:0 4px 20px #071b3d06}.panel-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:17px}.panel-head h2{font:800 19px/1.6 Tahoma,Arial;margin:3px 0;color:#071b3d}.panel-head p{font-size:12px;color:#65748a;line-height:1.8;margin:0}.eyebrow{font:700 10px/1.5 Tahoma,Arial;color:#96751e;letter-spacing:.2px}.step-tag{display:grid;place-items:center;width:33px;height:33px;border-radius:9px;background:#f0f4f9;color:#526986;flex:0 0 33px;font:bold 12px Arial}.quiz-upload{color:#071b3d;display:flex;flex-direction:column;align-items:center;gap:8px;padding:23px 13px;border:2px dashed #b9c8dd;border-radius:14px;background:#f8fbff;cursor:pointer}.quiz-upload:hover,.quiz-upload:focus-within{border-color:#d4af37;background:#fffdf6}.quiz-upload b{font-size:13px}.quiz-upload .muted{font-size:11px}.quiz-upload input{position:absolute;width:1px;height:1px;opacity:0;display:block!important}.quiz-panel .field{margin:17px 0}.quiz-panel .field label{font-size:12px;margin-bottom:8px;font-weight:700}.quiz-panel input,.quiz-panel select,.quiz-panel textarea{font:14px/1.75 Tahoma,Arial;border:1px solid #cbd7e5;border-radius:10px;background:#fff;color:#071b3d;padding:10px 12px;width:100%}.quiz-panel textarea{min-height:116px;resize:vertical;overflow-wrap:anywhere}.quiz-panel input:focus,.quiz-panel select:focus,.quiz-panel textarea:focus{outline:2px solid #d4af3770;border-color:#c6a342}.field-help{display:block;color:#728098;font-size:11px;line-height:1.8;margin-top:6px}.quiz-action-row{display:flex;gap:8px;flex-wrap:wrap;align-items:stretch}.quiz-action-row .btn{min-height:44px;flex:1 1 auto;font-weight:700;font-size:12px;white-space:normal;line-height:1.6}.quiz-action-row .light{flex:0 1 auto}.quiz-panel button:disabled{opacity:.55;cursor:not-allowed}.quiz-panel .gold{background:#d4af37;color:#071b3d}.quiz-panel .light{background:#eaf0f7;color:#071b3d}.quiz-panel .msg{font-size:12px;line-height:1.65;min-height:0;margin:6px 0 0}.quiz-panel .msg:empty{display:none}.quiz-panel #cropThumb{display:block;width:auto;max-width:100%;max-height:180px;object-fit:contain;border:1px solid #dce5ef;border-radius:10px;margin:10px auto}.permission-check{display:flex;align-items:flex-start;gap:9px;font-size:11px;line-height:1.8;color:#4a5f78;background:#f4f7fb;padding:11px;border-radius:10px;margin-bottom:15px}.permission-check input{width:17px;height:17px;flex:0 0 17px;margin-top:2px;accent-color:#071b3d}
.model-cards{display:grid;gap:10px}.model-card{border:1px solid #e1e7ef;border-radius:12px;padding:12px;min-width:0;background:#fff}.model-head{display:flex;align-items:center;gap:10px}.model-logo{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:0 0 34px;color:#fff;font:700 20px/1 Arial}.model-name{min-width:0;flex:1}.model-name b{display:block;font:700 14px/1.4 Arial;text-align:right;direction:ltr}.model-name small{font:400 10px/1.5 Arial;color:#77859a;display:block;direction:ltr;text-align:right;overflow-wrap:anywhere}.model-state{color:#75849a;background:#f1f4f8;border-radius:999px;padding:5px 9px;font-size:10px;white-space:nowrap}.model-card[data-state=waiting] .model-state{color:#96751e;background:#fff7e0}.model-card[data-state=ok] .model-state{color:#1b7751;background:#e8f5ee}.model-card[data-state=error] .model-state{color:#a33;background:#fcecec}.model-answer{margin:10px 0 0;padding:10px;border-radius:9px;background:#f4f7fb;font-size:13px;font-weight:700;line-height:1.7;overflow-wrap:anywhere;white-space:pre-wrap}.model-reason{font:12px/1.75 Tahoma,Arial;color:#556780;margin:7px 1px 0;white-space:pre-wrap;overflow-wrap:anywhere}.models-foot{font-size:11px;line-height:1.8;color:#728098;margin:14px 0 0}.result-progress{display:flex;align-items:center;gap:9px;margin-bottom:14px;direction:ltr;color:#65748a;font:700 11px Arial}.progress-track,.agreement-track{height:7px;background:#e6ebf3;border-radius:10px;overflow:hidden;flex:1}.progress-track>div,.agreement-track>div{height:100%;width:0;background:#d4af37;border-radius:10px;transition:width .25s}.consensus{margin:16px 0;border:1px solid #ddce9d;background:#fffcf2;padding:15px;border-radius:13px;overflow-wrap:anywhere}.consensus h3{font-size:15px;margin:7px 0}.consensus #consensusAnswer{font-size:17px;font-weight:700;line-height:1.65;margin:8px 0 13px}.consensus-stat{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin:8px 0}.consensus-stat strong{color:#071b3d;font:700 16px Arial;direction:ltr}.quiz-shell footer a{color:#526986;text-decoration:none}.quiz-shell footer{margin:20px auto;padding:12px}
@media(max-width:740px){.quiz-grid{grid-template-columns:1fr}.quiz-shell{padding:0 11px;margin-top:12px}.quiz-panel{padding:16px}.hero-number{width:76px;height:76px;flex-basis:76px;border-radius:12px}.hero-number strong{font-size:40px}.hero-number span{font-size:8px;letter-spacing:1px}.quiz-step{padding:9px 7px;gap:6px;flex-direction:column;align-items:center;text-align:center}.quiz-step>span{width:30px;height:30px;flex-basis:30px;font-size:14px}.quiz-step b{font-size:10px}.quiz-step small{font-size:9px}.quiz-steps{gap:6px}.quiz-hero{min-height:0!important}.hero-inner{gap:11px}.quiz-action-row .btn{min-height:46px}.model-name b{text-align:right}.model-name small{text-align:right}}
@media(max-width:360px){.hero-number{display:none}.quiz-action-row .btn{flex:1 1 100%}.quiz-step b{font-size:9px}.quiz-step small{font-size:8px}}