/* MICE — Online Exam (student side). Light, simple, large touch targets. */
:root { --navy: #03045E; --blue: #023EBA; --cyan: #00B4D8; --sky: #CAF0F8; --gold: #FBB02D; --ink: #0B1030; --muted: #4A5B7A; --line: #D7E3F0; --bg: #F1F6FC; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(900px 400px at 85% -10%, #DDF4FA, transparent), var(--bg); color: var(--ink); font-family: "Manrope", system-ui, Arial, sans-serif; font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }
.xl-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(14px, 4vw, 32px); background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.xl-brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; }
.xl-brand img { border-radius: 50%; }
.xl-brand strong { display: block; font-weight: 800; line-height: 1.15; }
.xl-brand small { display: block; color: var(--muted); font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.xl-timer { padding: 8px 16px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.xl-timer.low { background: #B42318; animation: xlPulse 1s ease-in-out infinite; }
@keyframes xlPulse { 50% { opacity: .7; } }
.xl-main { flex: 1; width: min(860px, 100% - 28px); margin: 22px auto 40px; }
.xl-card, .xl-exam { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 4vw, 34px); box-shadow: 0 14px 40px rgba(3, 4, 94, .08); }
.xl-card h1, .xl-exam h1 { margin: 4px 0 8px; font-size: clamp(1.5rem, 4.5vw, 2rem); color: var(--navy); line-height: 1.2; }
.xl-card h2 { margin: 22px 0 6px; color: var(--navy); font-size: 1.25rem; }
.xl-eyebrow { margin: 0; color: var(--blue); font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.xl-muted { color: var(--muted); font-weight: 600; }
.xl-input { width: 100%; min-height: 50px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 14px; font: inherit; font-weight: 600; background: #fff; }
.xl-input:focus { outline: 3px solid rgba(2, 62, 186, .22); border-color: var(--blue); }
.xl-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border: 0; border-radius: 14px; background: var(--navy); color: #fff; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, opacity .2s; box-shadow: 0 8px 20px rgba(3, 4, 94, .22); }
.xl-btn:hover { transform: translateY(-1px); }
.xl-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.xl-btn.ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); box-shadow: none; }
.xl-btn.gold { background: var(--gold); color: var(--navy); }
.xl-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.xl-msg { min-height: 1.4em; margin: 12px 0 0; font-weight: 700; color: #B42318; }
.xl-msg.ok { color: #067647; }
.xl-exams { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.xl-exam-card { text-align: left; padding: 16px 18px; border: 2px solid var(--line); border-radius: 16px; background: #fff; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.xl-exam-card strong { display: block; color: var(--navy); font-size: 1.05rem; }
.xl-exam-card span { color: var(--muted); font-weight: 600; font-size: .9rem; }
.xl-exam-card:hover { border-color: var(--cyan); }
.xl-exam-card.is-on { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(2, 62, 186, .14); background: #F4F8FF; }
.xl-names { display: grid; gap: 8px; margin-top: 12px; max-height: 340px; overflow: auto; padding-right: 4px; }
.xl-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; text-align: left; }
.xl-name small { color: var(--muted); font-weight: 600; }
.xl-name:hover { border-color: var(--blue); background: #F4F8FF; }
.xl-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.xl-fact { padding: 12px 14px; border-radius: 14px; background: var(--bg); text-align: center; }
.xl-fact b { display: block; font-size: 1.4rem; color: var(--navy); }
.xl-fact span { color: var(--muted); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.xl-rules { margin: 12px 0; padding-left: 22px; color: #1d2547; font-weight: 600; }
.xl-rules li { margin-bottom: 6px; }
.xl-check { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; font-weight: 700; cursor: pointer; }
.xl-check input { width: 22px; height: 22px; margin-top: 2px; }
.xl-exam-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.xl-exam-head strong { display: block; color: var(--navy); font-size: 1.1rem; }
.xl-exam-head small { color: var(--muted); font-weight: 700; }
.xl-progress span { padding: 6px 14px; border-radius: 999px; background: var(--sky); color: var(--navy); font-weight: 800; font-size: .88rem; }
.xl-qno { margin: 0; color: var(--blue); font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.xl-q h2 { margin: 6px 0 18px; font-size: clamp(1.1rem, 3.4vw, 1.4rem); line-height: 1.45; color: var(--ink); }
.xl-opts { display: grid; gap: 10px; }
.xl-opt { display: flex; gap: 14px; align-items: flex-start; min-height: 54px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-weight: 600; text-align: left; color: var(--ink); cursor: pointer; transition: border-color .12s, background-color .12s; }
.xl-opt i { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--navy); font-style: normal; font-weight: 800; }
.xl-opt:hover { border-color: var(--cyan); }
.xl-opt.is-on { border-color: var(--blue); background: #EEF4FF; }
.xl-opt.is-on i { background: var(--blue); color: #fff; }
.xl-nav .xl-btn { flex: 1 1 120px; }
.xl-grid-wrap { margin-top: 22px; border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; }
.xl-grid-wrap summary { cursor: pointer; font-weight: 800; color: var(--navy); min-height: 36px; display: flex; align-items: center; }
.xl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; margin-top: 10px; }
.xl-gb { min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 800; color: var(--muted); cursor: pointer; }
.xl-gb.done { background: #E3F6EC; border-color: #7BD3A5; color: #067647; }
.xl-gb.now { background: var(--navy); border-color: var(--navy); color: #fff; }
.xl-tick { display: grid; place-items: center; width: 74px; height: 74px; margin-bottom: 12px; border-radius: 50%; background: #E3F6EC; color: #067647; font-size: 2.4rem; font-weight: 800; }
.xl-foot { padding: 18px; text-align: center; color: var(--muted); font-weight: 600; font-size: .85rem; }
@media (max-width: 560px) { .xl-btn { width: 100%; } .xl-row { flex-direction: column; } .xl-nav { flex-direction: row; } .xl-nav .xl-btn { width: auto; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
/* name-first check-in (coaching laptop) */
.xl-names { max-height: min(56vh, 520px); }
.xl-name span { display: grid; gap: 2px; }
.xl-name .xl-chip { flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; background: #E8F0FE; color: var(--blue); font-size: .8rem; font-weight: 800; white-space: nowrap; }
.xl-name.is-done { background: #F6F8FB; color: var(--muted); }
.xl-name.is-done .xl-chip { background: #EEF1F5; color: var(--muted); }
#nameSearch { margin-top: 14px; min-height: 56px; font-size: 1.1rem; }
@media (max-width: 560px) { .xl-name { flex-wrap: wrap; } }
/* phone: keep "Clear answer" on one line */
@media (max-width: 560px) { .xl-nav .xl-btn { padding: 0 10px; white-space: nowrap; font-size: .95rem; } }
/* phone: the three numbers sit in one row */
@media (max-width: 560px) { .xl-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .xl-fact { padding: 10px 4px; } .xl-fact b { font-size: 1.15rem; } .xl-fact span { font-size: .62rem; letter-spacing: .02em; } }
/* saving status, in-progress names, locked page */
.xl-progress { display: grid; justify-items: end; gap: 4px; }
.xl-save { max-width: 260px; text-align: right; font-weight: 700; font-size: .74rem; color: var(--muted); }
.xl-save.ok { color: #067647; }
.xl-save.warn { color: #B42318; }
.xl-name.is-progress { border-color: #F2C14E; background: #FFF9EA; }
.xl-name.is-progress small { color: #8A5A00; }
.xl-msg.error { color: #B42318; font-weight: 800; }
#viewExam.is-locked #qBox, #viewExam.is-locked .xl-nav, #viewExam.is-locked .xl-grid-wrap { opacity: .4; pointer-events: none; }
@media (max-width: 560px) { .xl-exam-head { flex-wrap: wrap; } .xl-save { text-align: left; max-width: none; } .xl-progress { justify-items: start; } }
/* PIN screen */
.xl-pin { margin: 16px 0 6px; max-width: 260px; min-height: 64px; font-size: 2rem; letter-spacing: .6em; text-align: center; padding-left: .6em; }