@font-face{font-family:'NSD';src:url(fonts/nsd-deva.woff2) format('woff2');font-weight:100 900;font-display:swap;unicode-range:U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FF}
@font-face{font-family:'NSD';src:url(fonts/nsd-latin.woff2) format('woff2');font-weight:100 900;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:'NSD','Noto Sans Devanagari','Segoe UI',Arial,sans-serif;font-size:15px;color:#1d1d1d;background:#eef2f6;line-height:1.5;-webkit-text-size-adjust:100%}
.hidden{display:none!important}
button,select,input{font-family:inherit;font-size:inherit}
:focus-visible{outline:3px solid #f5a623;outline-offset:2px}
.small{font-size:12.5px}.muted{color:#5d6670}

/* brand header */
.brand{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border-bottom:3px solid #1b5e9e;padding:0 14px;height:var(--brandh);overflow:hidden}
.brand-left{display:flex;align-items:center;gap:8px;font-weight:700;color:#1b5e9e;letter-spacing:.5px}
.logo-mark{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#e67e22;color:#fff;font-size:19px;font-weight:700}
.brand-mid{font-weight:700;font-size:17px;color:#222;text-align:center}
.brand-right{font-weight:600;color:#444;font-size:14px;text-align:right}
.brand-sub{display:none}

/* login */
#scr-login{max-width:980px;margin:18px auto;padding:0 12px}
.login-top{background:#2b5f8f;color:#fff;border-radius:4px 4px 0 0;padding:14px}
.sysbox{display:flex;gap:16px;align-items:center}
.sys-photo{width:72px;height:84px;background:#fff;border-radius:3px;flex:none;display:grid;place-items:center}
.sys-photo svg{width:60px}
.sys-k{font-size:12px;opacity:.85}.sys-v{font-weight:700;margin-bottom:4px}
.login-card{background:#fff;border:1px solid #cfd8e3;border-top:0;padding:22px;display:flex;flex-direction:column;gap:8px;max-width:420px;margin:0 auto 0 auto;border-radius:0 0 4px 4px;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.login-card h1{margin:0 0 6px;font-size:20px;color:#1b5e9e;text-align:center}
.login-card label{font-weight:600;font-size:13.5px}
.login-card input{padding:10px;border:1px solid #9aa9b8;border-radius:3px}

/* buttons */
.btn{border:1px solid transparent;border-radius:3px;padding:9px 14px;font-weight:600;cursor:pointer;font-size:13.5px;letter-spacing:.2px;min-height:40px}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-wide{width:100%}
.btn-green{background:#39a845;color:#fff;border-color:#2f8c39}.btn-green:hover{background:#2f8c39}
.btn-blue{background:#1f78c1;color:#fff;border-color:#195f99}.btn-blue:hover{background:#195f99}
.btn-orange{background:#f39c12;color:#fff;border-color:#d4860b}.btn-orange:hover{background:#d4860b}
.btn-white{background:#fff;color:#222;border-color:#9aa9b8}.btn-white:hover{background:#f1f4f7}

/* instructions */
.inst-wrap{max-width:1100px;margin:14px auto;background:#fff;border:1px solid #cfd8e3;border-radius:4px;display:flex;flex-direction:column;min-height:calc(100vh - 120px)}
.inst-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid #dde4ec;flex-wrap:wrap}
.inst-head h1{font-size:18px;margin:0;color:#1b5e9e}
.inst-body{padding:6px 20px 14px;overflow:auto;flex:1}
.inst-body h3{color:#b23a1d;font-size:15.5px;margin:14px 0 4px}
.inst-body ol{padding-left:22px;margin:4px 0}.inst-body li{margin:5px 0}
.inst-legend{list-style:none;padding:0;margin:6px 0 6px 6px}.inst-legend li{display:flex;align-items:center;gap:10px}
.inst-foot{border-top:1px solid #dde4ec;padding:12px 16px;display:flex;flex-direction:column;gap:10px;background:#f7f9fb}
.agree{display:flex;gap:8px;align-items:flex-start;font-size:13.5px}.agree input{margin-top:4px;width:18px;height:18px;flex:none}
#btn-proceed{align-self:center;min-width:260px}
select{padding:5px 6px;border:1px solid #9aa9b8;border-radius:3px;background:#fff}

/* status shapes (NTA) */
.st{display:inline-grid;place-items:center;min-width:34px;height:30px;font-weight:700;font-size:13px;color:#fff;position:relative;padding:0 3px;flex:none}
.st0{background:#e8e8e8;color:#222;border:1px solid #bdbdbd;border-radius:3px}
.st1{background:#e8461d;border-radius:3px 3px 50% 50% / 3px 3px 40% 40%}
.st2{background:#3fa63f;border-radius:50% 50% 3px 3px / 40% 40% 3px 3px}
.st3{background:#6a3fa0;border-radius:50%;width:32px;min-width:32px;height:32px}
.st4{background:#6a3fa0;border-radius:50%;width:32px;min-width:32px;height:32px}
.st4::after{content:'✔';position:absolute;right:-5px;bottom:-4px;font-size:12px;line-height:1;color:#3fdc3f;background:#fff;border-radius:50%;padding:1px 2px;text-shadow:0 0 1px #1a7a1a}

/* exam layout */
:root{--brandh:55px}
#scr-exam{display:flex;flex-direction:column;height:calc(100vh - var(--brandh));height:calc(100dvh - var(--brandh));min-height:420px;overflow:hidden}
.exam-info{display:flex;align-items:center;gap:14px;background:#fff;padding:8px 14px;border-bottom:1px solid #d5dde6}
.ei-photo{width:58px;height:66px;border:1px solid #c7d0da;background:#f4f6f8;display:grid;place-items:center;flex:none}
.ei-photo svg{width:48px}.ei-photo.sm{width:40px;height:46px}.ei-photo.sm svg{width:32px}
.ei-text{flex:1;font-size:13.5px;line-height:1.55}.ei-text .k{display:inline-block;min-width:118px;color:#444}
.timer{display:inline-block;background:#1f78c1;color:#fff;font-weight:700;padding:1px 10px;border-radius:3px;font-variant-numeric:tabular-nums;letter-spacing:.5px}
.timer.low{background:#d9341c}
.section-bar{display:flex;justify-content:space-between;align-items:center;background:#dfe9f3;border-bottom:1px solid #c5d3e0;padding:4px 10px}
.sec-tab{background:#1f78c1;color:#fff;font-weight:600;padding:4px 14px;border-radius:3px 3px 0 0;font-size:13.5px}
.palette-toggle{display:none;background:#fff;border:1px solid #9aa9b8;border-radius:3px;padding:5px 10px;font-weight:600;cursor:pointer}
.exam-body{flex:1;display:flex;min-height:0;overflow:hidden;background:#fff}
.qpane{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0}
.qscroll{flex:1;overflow:auto;padding:10px 18px 14px;min-height:0}
.qhead{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #d5dde6;padding-bottom:6px;margin-bottom:10px}
.qhead h2{margin:0;font-size:17px;color:#1d1d1d}
.qmarks{font-size:12px;color:#2f7d32;background:#eaf6ea;border:1px solid #bfe0c0;border-radius:10px;padding:1px 9px}
.qtext{font-size:16px;white-space:normal;word-wrap:break-word}
.qtext p{margin:0 0 6px}
.qtext table.mt{border-collapse:collapse;margin:8px 0 10px;width:100%;max-width:720px;font-size:15px}
.mt th,.mt td{border:1px solid #9aa9b8;padding:5px 8px;text-align:left;vertical-align:top}
.mt th{background:#eef3f8}
.qimg{margin:8px 0 6px}.qimg img{max-width:min(100%,460px);max-height:340px;border:1px solid #ccd5df;border-radius:3px;display:block;background:#fff}
.qimg .cr{font-size:11px;color:#6b7580;margin-top:2px;max-width:460px}

/* stacked bilingual question (NTA CBT style) */
.qlang{padding:4px 0 8px}
.qlang-hi{border-top:2px dashed #c5d3e0;margin-top:6px;padding-top:10px}
.qlang-tag{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.4px;color:#1b5e9e;background:#e8f0f8;border:1px solid #c9d9ea;border-radius:3px;padding:0 6px;margin-bottom:4px}
.qopts-txt{list-style:none;margin:8px 0 0;padding:0;font-size:15.5px}
.qopts-txt li{display:flex;gap:6px;align-items:flex-start;padding:3px 2px}
.qopts-txt .on{font-weight:700;min-width:28px;flex:none}
/* answer belt */
.ansbelt{flex:none;display:flex;align-items:center;gap:6px 18px;flex-wrap:wrap;padding:8px 18px;background:#e9f1f9;border-top:2px solid #1f78c1}
.ab-lab{font-weight:700;font-size:13.5px;color:#1b3f63;margin-right:4px}
.ab-opt{display:inline-flex;align-items:center;gap:6px;cursor:pointer;font-weight:700;font-size:16px;padding:4px 10px 4px 6px;border:1px solid #b5c7d9;border-radius:20px;background:#fff;min-height:38px}
.ab-opt input{width:20px;height:20px;margin:0;accent-color:#1f78c1;cursor:pointer}
.ab-opt.sel{border-color:#1f78c1;background:#d6e8fa}

/* palette */
.palette{width:330px;flex:none;border-left:1px solid #d5dde6;background:#f6f8fa;display:flex;flex-direction:column;overflow:auto}
.pal-user{display:flex;align-items:center;gap:10px;padding:8px 10px;border-bottom:1px solid #dde4ec;background:#fff}
.pal-close{display:none;margin-left:auto;border:0;background:none;font-size:20px;cursor:pointer}
.legend{display:grid;grid-template-columns:1fr 1fr;gap:8px 6px;padding:10px;font-size:12.5px;border-bottom:1px solid #dde4ec;background:#fff}
.legend>div{display:flex;align-items:center;gap:7px}.legend .wide{grid-column:1/-1}
.pal-title{background:#1f78c1;color:#fff;font-weight:600;padding:5px 10px;font-size:13.5px}
.pal-sub{padding:6px 10px 0;font-size:12.5px;color:#444;font-weight:600}
.pal-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(42px,1fr));gap:9px 6px;padding:10px;justify-items:center}
.pal-grid button{border:0;cursor:pointer;font-family:inherit}
.pal-grid button.cur{outline:2px solid #111;outline-offset:2px}

/* actions */
.actions{background:#f1f4f7;border-top:1px solid #cfd8e3;padding:8px 10px;display:flex;flex-direction:column;gap:6px}
.actions .row1,.actions .row2{display:flex;gap:8px;flex-wrap:wrap}
.actions .row2 .btn-submit{margin-left:auto;min-width:120px}

/* modal */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.45);display:grid;place-items:center;z-index:50;padding:12px}
.modal-card{background:#fff;border-radius:4px;max-width:760px;width:100%;padding:16px;max-height:92vh;overflow:auto}
.modal-card h2{margin:0 0 10px;font-size:18px;color:#1b5e9e;border-bottom:1px solid #dde4ec;padding-bottom:6px}
.tbl-wrap{overflow-x:auto}
.sumtbl,.subtbl{border-collapse:collapse;width:100%;font-size:13.5px}
.sumtbl th,.sumtbl td,.subtbl th,.subtbl td{border:1px solid #c5d0db;padding:6px 8px;text-align:center}
.sumtbl th,.subtbl th{background:#eef3f8;font-weight:600}
.subtbl td:first-child{text-align:left}
.confirm-q{text-align:center;font-weight:600;margin:14px 0}.confirm-q .hi{font-weight:500;font-size:13.5px;color:#444}
.modal-btns{display:flex;gap:10px;justify-content:center}

/* result */
.res-wrap{max-width:1000px;margin:14px auto;background:#fff;border:1px solid #cfd8e3;border-radius:4px;padding:16px 18px}
.res-wrap h1{margin:0 0 4px;font-size:20px;color:#1b5e9e}
.res-wrap h2{font-size:16.5px;margin:20px 0 8px;color:#1b5e9e;border-bottom:1px solid #dde4ec;padding-bottom:4px}
.res-cand{color:#444;font-size:13.5px;margin-bottom:10px}
.scorecard{display:flex;gap:16px;align-items:center;flex-wrap:wrap;background:#f4f8fc;border:1px solid #d5e2ef;border-radius:6px;padding:14px}
.score-big{font-size:46px;font-weight:700;color:#1f78c1;line-height:1;min-width:150px;text-align:center}.score-big small{font-size:18px;color:#555;margin-left:4px}
.score-grid{flex:1;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;min-width:250px}
.sc{background:#fff;border:1px solid #dde4ec;border-radius:4px;padding:6px 8px;text-align:center}.sc b{display:block;font-size:20px}.sc span{font-size:12px;color:#555}
.sc.ok b{color:#2f8c39}.sc.bad b{color:#d9341c}.sc.na b{color:#777}
.rev-tools{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.chip{border:1px solid #9aa9b8;background:#fff;border-radius:16px;padding:4px 12px;cursor:pointer;font-weight:600;font-size:13px}
.chip.on{background:#1f78c1;color:#fff;border-color:#1f78c1}
.rq{border:1px solid #dde4ec;border-left:5px solid #999;border-radius:4px;padding:10px 12px;margin:10px 0}
.rq.correct{border-left-color:#39a845}.rq.wrong{border-left-color:#d9341c}.rq.un{border-left-color:#9e9e9e}
.rq-h{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:13px;color:#555;margin-bottom:4px}
.rq-h b{color:#111;font-size:14.5px}
.tag{border-radius:10px;padding:0 8px;font-size:12px;font-weight:600}
.tag.correct{background:#e3f4e4;color:#22702b}.tag.wrong{background:#fde6e2;color:#b2281a}.tag.un{background:#eee;color:#555}
.ropt{padding:4px 8px;border-radius:3px;margin:3px 0;border:1px solid transparent}
.ropt.right{background:#e3f4e4;border-color:#9fd3a4}.ropt.picked-wrong{background:#fde6e2;border-color:#f0a59a}
.ropt .mk{font-size:12px;font-weight:700;margin-left:6px}
.expl{background:#fffbea;border:1px solid #f1e3a6;border-radius:4px;padding:6px 9px;margin-top:6px;font-size:14px}
.lang-sep{border-top:1px dashed #ccd5df;margin:8px 0}
.res-foot{display:flex;gap:10px;justify-content:center;margin:18px 0 6px}
.credits{margin-top:14px;border-top:1px solid #eee;padding-top:8px}
.sitefoot{text-align:center;font-size:12px;color:#6b7580;padding:10px}
#scr-exam:not(.hidden) ~ .sitefoot{display:none}

/* ---------- responsive ---------- */
@media (max-width: 900px){
  .brand-right{display:none}
  .brand-mid{line-height:1.2;text-align:right}
  .brand-sub{display:block;font-size:11.5px;font-weight:600;color:#555}
  .palette{position:fixed;top:0;right:0;bottom:0;width:min(340px,88vw);z-index:40;transform:translateX(105%);transition:transform .2s ease;box-shadow:-4px 0 14px rgba(0,0,0,.2)}
  .palette.open{transform:none}
  .pal-close{display:block}
  .palette-toggle{display:inline-block}
}
@media (max-width: 600px){
  :root{--brandh:47px}
  body{font-size:14.5px}
  .brand{padding:0 8px}.brand-mid{font-size:14.5px}.brand-name{font-size:13px}.logo-mark{width:28px;height:28px;font-size:16px}
  .exam-info{gap:8px;padding:6px 8px;flex-wrap:wrap}
  .ei-photo{width:42px;height:48px}.ei-photo svg{width:34px}
  .ei-text{font-size:12.5px}.ei-text .k{min-width:0}
  .ei-text>div:nth-child(2),.ei-text>div:nth-child(3){display:none}
  .qscroll{padding:8px 10px 12px}
  .ansbelt{padding:6px 8px;gap:6px;justify-content:space-between;flex-wrap:nowrap}
  .ab-lab{font-size:11.5px;margin-right:0;line-height:1.15;max-width:62px}
  .ab-opt{padding:3px 8px 3px 5px;font-size:15px;min-height:36px;gap:4px}
  .qopts-txt{font-size:14.5px}
  .qimg img{max-height:220px}
  .qtext{font-size:15px}
  .actions{padding:6px}
  .actions .row1{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  .actions .row2{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}
  .actions .btn{padding:7px 6px;font-size:12px;min-height:40px}
  .actions .row2 .btn-submit{margin-left:0;min-width:0}
  .score-grid{grid-template-columns:repeat(2,1fr)}
  .res-wrap,.inst-wrap{margin:8px 6px;padding:12px}
  .inst-body{padding:4px 10px 10px}
  .legend{font-size:12px}
}
@media print{
  .ansbelt,.brand,.res-foot,.rev-tools .filters,.sitefoot{display:none}
  body{background:#fff}.res-wrap{border:0;margin:0}
}
