/* Model Exam module — builds on SIMS tokens (public/css/app.css), so light/dark themes carry over. */
:root {
  --mx-ink: #14183a;
  --mx-grad: linear-gradient(135deg, #3b5bdb 0%, #6741d9 55%, #9c36b5 100%);
  --mx-natural: #12a26b;
  --mx-social: #7c4ddb;
  --mx-common: #0b9bc9;
  --mx-answered: #3b5bdb;
  --mx-flag: #e59a0b;
}

/* ---------- Staff screens ---------- */
.mx-hero {
  position: relative; overflow: hidden; border-radius: 18px; padding: 1.6rem 1.75rem; color: #fff; background: var(--mx-grad);
  box-shadow: 0 10px 30px rgba(76, 59, 205, .25); margin-bottom: 1.5rem;
}
.mx-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,0) 70%);
}
.mx-hero h1 { font-size: 1.55rem; font-weight: 750; margin: 0; letter-spacing: -.01em; }
.mx-hero .sub { opacity: .85; margin-top: .3rem; max-width: 720px; }
.mx-hero .crumb { font-size: .78rem; opacity: .8; margin-bottom: .35rem; }
.mx-hero .crumb a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.mx-hero .actions { position: relative; z-index: 1; }
.mx-hero .btn-light { background: rgba(255,255,255,.95); border: 0; }
.mx-hero .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.mx-hero .btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
.mx-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: rgba(255,255,255,.16); color: #fff; }
.mx-chip.solid { background: #fff; color: var(--mx-ink); }
.mx-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mx-hero-stats { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 1.25rem; position: relative; z-index: 1; }
.mx-hero-stats .v { font-size: 1.45rem; font-weight: 750; line-height: 1; }
.mx-hero-stats .l { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; margin-top: .3rem; }

.mx-tabs { display: flex; gap: .35rem; flex-wrap: wrap; padding: .35rem; background: var(--sims-surface); border: 1px solid var(--sims-border); border-radius: 14px; margin-bottom: 1.25rem; box-shadow: var(--sims-shadow); }
.mx-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 10px; color: var(--sims-muted); font-weight: 600; font-size: .85rem; }
.mx-tabs a:hover { background: var(--sims-primary-50); color: var(--sims-primary); }
.mx-tabs a.active { background: var(--sims-primary); color: #fff; box-shadow: 0 4px 12px rgba(59,91,219,.3); }
.mx-tabs .count { font-size: .7rem; background: rgba(0,0,0,.08); padding: .05rem .45rem; border-radius: 999px; }
.mx-tabs a.active .count { background: rgba(255,255,255,.25); }

.mx-session-card { position: relative; overflow: hidden; height: 100%; transition: transform .15s, box-shadow .15s; }
.mx-session-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16,24,40,.1); }
.mx-session-card .accent { height: 5px; background: var(--mx-grad); }
.mx-session-card.closed .accent { background: #9aa3b8; }
.mx-session-card.draft .accent { background: repeating-linear-gradient(45deg, #c3c9da 0 8px, #e2e6f0 8px 16px); }
.mx-session-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.mx-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.mx-metrics div { background: var(--sims-bg); border-radius: 10px; padding: .55rem .4rem; text-align: center; }
.mx-metrics .v { font-weight: 750; font-size: 1.05rem; }
.mx-metrics .l { font-size: .66rem; color: var(--sims-muted); text-transform: uppercase; letter-spacing: .05em; }
.mx-progress { height: 8px; border-radius: 999px; background: var(--sims-bg); overflow: hidden; }
.mx-progress > span { display: block; height: 100%; border-radius: 999px; background: var(--mx-grad); transition: width .4s; }
.mx-progress.ok > span { background: var(--mx-natural); }

.mx-stream { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 650; padding: .18rem .55rem; border-radius: 999px; white-space: nowrap; }
.mx-stream::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mx-stream.natural { color: var(--mx-natural); background: #e7f7ef; }
.mx-stream.social { color: var(--mx-social); background: #f2ecfd; }
.mx-stream.common { color: var(--mx-common); background: #e4f6fc; }
[data-theme="dark"] .mx-stream.natural, [data-theme="dark"] .mx-stream.social, [data-theme="dark"] .mx-stream.common { background: rgba(255,255,255,.06); }

.mx-checklist { list-style: none; margin: 0; padding: 0; }
.mx-checklist li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px dashed var(--sims-border); }
.mx-checklist li:last-child { border-bottom: 0; }
.mx-checklist .tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--sims-border); color: transparent; font-size: .8rem; }
.mx-checklist li.done .tick { background: var(--mx-natural); border-color: var(--mx-natural); color: #fff; }
.mx-checklist li.done .txt { color: var(--sims-muted); text-decoration: line-through; }

.mx-timeline { position: relative; padding-left: 1.4rem; }
.mx-timeline::before { content: ""; position: absolute; left: .45rem; top: .3rem; bottom: .3rem; width: 2px; background: var(--sims-border); }
.mx-timeline .item { position: relative; padding: .1rem 0 1rem; }
.mx-timeline .item::before { content: ""; position: absolute; left: -1.22rem; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--sims-surface); border: 3px solid var(--sims-primary); }
.mx-timeline .item.open::before { border-color: var(--mx-natural); box-shadow: 0 0 0 4px rgba(18,162,107,.18); }
.mx-timeline .item.closed::before { border-color: #9aa3b8; }

.mx-q { border: 1px solid var(--sims-border); border-radius: 14px; padding: 1rem 1.15rem; background: var(--sims-surface); margin-bottom: .85rem; }
.mx-q .num { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; background: var(--sims-primary-50); color: var(--sims-primary); flex: none; font-size: .85rem; }
.mx-q .passage { background: var(--sims-bg); border-left: 3px solid var(--sims-info); border-radius: 8px; padding: .6rem .8rem; font-size: .85rem; margin-bottom: .6rem; white-space: pre-line; }
.mx-q .body { white-space: pre-line; font-weight: 550; }
.mx-q ol.opts { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .4rem; }
.mx-q ol.opts li { display: flex; gap: .5rem; padding: .4rem .6rem; border-radius: 8px; border: 1px solid var(--sims-border); font-size: .86rem; }
.mx-q ol.opts li.correct { border-color: var(--mx-natural); background: rgba(18,162,107,.08); font-weight: 600; }
.mx-q ol.opts li b { color: var(--sims-muted); }
.mx-q ol.opts li.correct b { color: var(--mx-natural); }

.mx-live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--sims-danger); box-shadow: 0 0 0 0 rgba(224,67,79,.6); animation: mx-pulse 1.6s infinite; }
@keyframes mx-pulse { 0% { box-shadow: 0 0 0 0 rgba(224,67,79,.55); } 70% { box-shadow: 0 0 0 10px rgba(224,67,79,0); } 100% { box-shadow: 0 0 0 0 rgba(224,67,79,0); } }
.mx-mini-bar { height: 6px; border-radius: 999px; background: var(--sims-bg); overflow: hidden; min-width: 70px; }
.mx-mini-bar span { display: block; height: 100%; background: var(--sims-primary); }
.mx-cred { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; font-weight: 700; }
.mx-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.mx-score.good { color: var(--mx-natural); } .mx-score.mid { color: #c47f00; } .mx-score.low { color: var(--sims-danger); }
.mx-option-input .input-group-text { width: 42px; justify-content: center; font-weight: 700; }
.mx-option-input .form-check-input { margin: 0; }

/* ---------- Candidate portal ---------- */
body.mx-portal { background: radial-gradient(1200px 500px at 100% -10%, rgba(103,65,217,.10), transparent), radial-gradient(900px 400px at -10% 0%, rgba(59,91,219,.10), transparent), var(--sims-bg); min-height: 100vh; }
.mx-top { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: .9rem; padding: .7rem 1.25rem; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--sims-border); }
[data-theme="dark"] .mx-top { background: rgba(22,29,49,.88); }
.mx-brand { display: flex; align-items: center; gap: .6rem; font-weight: 750; color: var(--sims-text); }
.mx-brand .logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--mx-grad); box-shadow: 0 6px 16px rgba(103,65,217,.35); }
.mx-brand small { display: block; font-weight: 500; font-size: .7rem; color: var(--sims-muted); }
.mx-who { display: flex; align-items: center; gap: .55rem; }
.mx-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--mx-grad); font-size: .85rem; flex: none; }
.mx-avatar.lg { width: 64px; height: 64px; font-size: 1.35rem; border: 3px solid rgba(255,255,255,.6); }
.mx-main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.mx-auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.mx-auth-art { position: relative; overflow: hidden; color: #fff; background: var(--mx-grad); padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.mx-auth-art::before, .mx-auth-art::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.mx-auth-art::before { width: 420px; height: 420px; right: -140px; bottom: -120px; }
.mx-auth-art::after { width: 220px; height: 220px; left: -60px; top: 30%; }
.mx-auth-art h1 { font-size: 2.3rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; position: relative; z-index: 1; }
.mx-auth-art .feat { display: flex; gap: .75rem; align-items: flex-start; margin-top: 1rem; position: relative; z-index: 1; }
.mx-auth-art .feat i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.16); flex: none; font-size: 1.1rem; }
.mx-auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.mx-auth-card { width: 100%; max-width: 420px; }
.mx-auth-card .form-control { padding: .75rem .9rem; font-size: 1rem; border-radius: 12px; }
.mx-auth-card .form-control.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.mx-auth-card .form-control.code::placeholder { color: #b8bfd2; font-weight: 500; }
.mx-auth-card .btn-lg { border-radius: 12px; padding: .8rem; font-weight: 650; background: var(--mx-grad); border: 0; }
@media (max-width: 900px) { .mx-auth { grid-template-columns: 1fr; } .mx-auth-art { padding: 1.75rem 1.5rem; } .mx-auth-art h1 { font-size: 1.6rem; } .mx-auth-art .feats { display: none; } }

.mx-welcome { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; border-radius: 18px; padding: 1.4rem 1.5rem; color: #fff; background: var(--mx-grad); box-shadow: 0 12px 30px rgba(76,59,205,.25); margin-bottom: 1.5rem; }
.mx-welcome h1 { font-size: 1.35rem; font-weight: 750; margin: 0; }
.mx-welcome .meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.mx-exam-card { border-radius: 16px; border: 1px solid var(--sims-border); background: var(--sims-surface); padding: 1.15rem; height: 100%; display: flex; flex-direction: column; gap: .75rem; box-shadow: var(--sims-shadow); transition: transform .15s, box-shadow .15s; }
.mx-exam-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16,24,40,.1); }
.mx-exam-card .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.mx-exam-card h3 { font-size: 1.02rem; font-weight: 700; margin: 0; }
.mx-exam-card .facts { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .8rem; color: var(--sims-muted); }
.mx-exam-card.state-start { border-color: var(--mx-natural); box-shadow: 0 0 0 3px rgba(18,162,107,.12); }
.mx-exam-card.state-resume { border-color: var(--mx-flag); box-shadow: 0 0 0 3px rgba(229,154,11,.15); }
.mx-state { font-size: .75rem; font-weight: 650; padding: .25rem .6rem; border-radius: 999px; }
.mx-state.start { background: #e7f7ef; color: #0c7f53; } .mx-state.resume { background: #fff5e0; color: #a96d00; }
.mx-state.done { background: #eef2ff; color: var(--sims-primary); } .mx-state.upcoming { background: #eef0f5; color: #4b5574; } .mx-state.closed { background: #fdecee; color: #c02a36; }

.mx-rules { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.mx-rules li { display: flex; gap: .7rem; align-items: flex-start; }
.mx-rules li i { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--sims-primary-50); color: var(--sims-primary); flex: none; }

/* Exam room */
.mx-exam-top { gap: .6rem; }
.mx-exam-top .subject { font-weight: 700; line-height: 1.15; }
.mx-exam-top .subject small { display: block; color: var(--sims-muted); font-weight: 500; font-size: .72rem; }
.mx-timer { display: inline-flex; align-items: center; gap: .45rem; font-variant-numeric: tabular-nums; font-weight: 750; font-size: 1.05rem; padding: .4rem .85rem; border-radius: 999px; background: var(--sims-primary-50); color: var(--sims-primary); min-width: 118px; justify-content: center; }
.mx-timer.warn { background: #fff5e0; color: #a96d00; }
.mx-timer.danger { background: #fdecee; color: #c02a36; animation: mx-blink 1s steps(2) infinite; }
@keyframes mx-blink { 50% { opacity: .55; } }
.mx-save { font-size: .75rem; color: var(--sims-muted); white-space: nowrap; }
.mx-save.offline { color: var(--sims-danger); font-weight: 600; }
.mx-room { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; max-width: 1240px; margin: 0 auto; padding: 1.25rem 1rem 6rem; }
.mx-qcard { background: var(--sims-surface); border: 1px solid var(--sims-border); border-radius: 18px; box-shadow: var(--sims-shadow); padding: 1.5rem 1.6rem; }
.mx-qhead { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.mx-qno { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sims-primary); }
.mx-qmarks { font-size: .75rem; color: var(--sims-muted); }
.mx-passage { background: var(--sims-bg); border-left: 4px solid var(--mx-common); border-radius: 10px; padding: .9rem 1rem; margin-bottom: 1rem; white-space: pre-line; max-height: 320px; overflow: auto; font-size: .92rem; }
.mx-qtext { font-size: 1.08rem; font-weight: 550; line-height: 1.55; white-space: pre-line; margin-bottom: 1.15rem; }
.mx-options { display: grid; gap: .65rem; }
.mx-option { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; padding: .85rem 1rem; border-radius: 14px; border: 2px solid var(--sims-border); background: var(--sims-surface); color: var(--sims-text); font-size: .98rem; transition: border-color .12s, background .12s, transform .08s; cursor: pointer; }
.mx-option:hover { border-color: #9fb1f5; background: var(--sims-primary-50); }
.mx-option:active { transform: scale(.995); }
.mx-option .letter { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 750; background: var(--sims-bg); color: var(--sims-muted); flex: none; transition: all .12s; }
.mx-option.selected { border-color: var(--mx-answered); background: var(--sims-primary-50); box-shadow: 0 6px 18px rgba(59,91,219,.15); }
.mx-option.selected .letter { background: var(--mx-answered); color: #fff; }
.mx-option .check { margin-left: auto; color: var(--mx-answered); opacity: 0; font-size: 1.2rem; }
.mx-option.selected .check { opacity: 1; }
.mx-qfoot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.4rem; flex-wrap: wrap; }
.mx-flag.active { background: #fff5e0; color: #a96d00; border-color: #f1c66b; }
.mx-side { position: sticky; top: 76px; align-self: start; display: grid; gap: 1rem; }
.mx-panel { background: var(--sims-surface); border: 1px solid var(--sims-border); border-radius: 18px; box-shadow: var(--sims-shadow); padding: 1.1rem; }
.mx-panel h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sims-muted); font-weight: 700; margin: 0 0 .75rem; }
.mx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: .4rem; max-height: 46vh; overflow: auto; padding: 2px; }
.mx-grid button { position: relative; height: 36px; border-radius: 9px; border: 1.5px solid var(--sims-border); background: var(--sims-surface); color: var(--sims-text); font-size: .8rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.mx-grid button.answered { background: var(--mx-answered); border-color: var(--mx-answered); color: #fff; }
.mx-grid button.flagged::after { content: ""; position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--mx-flag); border: 2px solid var(--sims-surface); }
.mx-grid button.current { outline: 3px solid rgba(59,91,219,.35); outline-offset: 1px; border-color: var(--sims-primary); }
.mx-legend { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .72rem; color: var(--sims-muted); margin-top: .75rem; }
.mx-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; border: 1.5px solid var(--sims-border); }
.mx-legend .a::before { background: var(--mx-answered); border-color: var(--mx-answered); }
.mx-legend .f::before { background: var(--mx-flag); border-color: var(--mx-flag); border-radius: 50%; }
.mx-ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto;
  background: conic-gradient(var(--ring-color, var(--sims-primary)) calc(var(--p) * 1%), var(--ring-track, var(--sims-bg)) 0); }
.mx-ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--sims-surface); display: grid; place-items: center; text-align: center; }
.mx-ring .v { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.mx-ring .l { font-size: .68rem; color: var(--sims-muted); text-transform: uppercase; letter-spacing: .06em; }
.mx-ring.sm { width: 96px; height: 96px; } .mx-ring.sm > div { width: 74px; height: 74px; } .mx-ring.sm .v { font-size: 1.2rem; }
.mx-bottom-nav { display: none; }
.mx-preview-banner { background: repeating-linear-gradient(45deg, #fff5e0 0 14px, #ffefc8 14px 28px); color: #7a5200; text-align: center; padding: .45rem; font-weight: 650; font-size: .82rem; }
.mx-offline { position: fixed; left: 50%; bottom: 82px; transform: translateX(-50%); z-index: 1060; background: #c02a36; color: #fff; padding: .55rem 1rem; border-radius: 999px; font-weight: 600; font-size: .85rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.mx-review .opt { padding: .35rem .6rem; border-radius: 8px; border: 1px solid var(--sims-border); font-size: .86rem; }
.mx-review .opt.right { border-color: var(--mx-natural); background: rgba(18,162,107,.08); }
.mx-review .opt.wrong { border-color: var(--sims-danger); background: rgba(224,67,79,.07); }

@media (max-width: 991px) {
  .mx-room { grid-template-columns: 1fr; padding-bottom: 7rem; }
  .mx-side { position: static; order: 2; }
  .mx-qcard { padding: 1.1rem; }
  .mx-qfoot .nav-btns { display: none; }
  .mx-bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; gap: .5rem; padding: .65rem .8rem; background: var(--sims-surface); border-top: 1px solid var(--sims-border); box-shadow: 0 -6px 20px rgba(16,24,40,.08); }
  .mx-bottom-nav .btn { flex: 1; padding: .7rem; border-radius: 12px; font-weight: 650; }
  .mx-top .hide-sm { display: none !important; }
}
@media print { .mx-top, .mx-side, .mx-bottom-nav { display: none !important; } }

/* Exam code entry (4 digits) */
.mx-code-card { text-align: center; border-top: 1px solid var(--sims-border); margin-top: .5rem; padding: 2rem 1rem .5rem; }
.mx-code-lock { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 1.9rem; color: #fff; background: var(--mx-grad); box-shadow: 0 10px 24px rgba(103,65,217,.35); }
.mx-code-title { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: .35rem; }
.mx-code-help { color: var(--sims-muted); max-width: 440px; margin: 0 auto 1.5rem; }
.mx-code { display: flex; justify-content: center; gap: .85rem; border: 0; padding: 0; margin: 0; }
.mx-code input {
  width: 72px; height: 88px; text-align: center; font-size: 2.6rem; font-weight: 800; line-height: 1;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--sims-text);
  background: var(--sims-surface); border: 2.5px solid var(--sims-border); border-radius: 16px; caret-color: var(--sims-primary);
  box-shadow: inset 0 -3px 0 rgba(16,24,40,.04); transition: border-color .12s, box-shadow .12s, transform .08s;
}
.mx-code input:focus { outline: 0; border-color: var(--sims-primary); box-shadow: 0 0 0 5px rgba(59,91,219,.18); transform: translateY(-2px); }
.mx-code input.filled { border-color: var(--mx-answered); background: var(--sims-primary-50); }
.mx-code.is-invalid input { border-color: var(--sims-danger); animation: mx-shake .35s; }
.mx-code-error { color: var(--sims-danger); font-weight: 600; margin-top: .9rem; }
.mx-code-go { min-width: 260px; border-radius: 14px; padding: .85rem 2rem; font-weight: 700; }
@keyframes mx-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-width: 420px) { .mx-code { gap: .5rem; } .mx-code input { width: 58px; height: 72px; font-size: 2.1rem; } }
.mx-code-badge { text-align: center; padding: .55rem 1rem; border-radius: 14px; background: var(--sims-primary-50); border: 1.5px dashed #9fb1f5; }
.mx-code-badge .l { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--sims-primary); }
.mx-code-badge .v { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.9rem; font-weight: 800; letter-spacing: .25em; line-height: 1.1; color: var(--sims-text); padding-left: .25em; }

/* Givens & pictures in questions */
.mx-q .givens, .mx-givens { position: relative; background: #fffaf0; border: 1px dashed #f1c66b; border-radius: 10px; padding: .55rem .8rem .55rem 4.6rem; margin-bottom: .6rem; white-space: pre-line; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; color: var(--sims-text); }
.mx-q .givens .lbl, .mx-givens .lbl { position: absolute; left: .6rem; top: .55rem; font-family: "Inter", sans-serif; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #a96d00; }
[data-theme="dark"] .mx-q .givens, [data-theme="dark"] .mx-givens { background: rgba(229,154,11,.08); }
.mx-q .qimg { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; border: 1px solid var(--sims-border); margin: .5rem 0; background: #fff; }
.mx-q .oimg { max-width: 100%; max-height: 120px; border-radius: 8px; border: 1px solid var(--sims-border); background: #fff; }
.mx-thumb { width: 96px; height: 72px; object-fit: contain; border-radius: 8px; border: 1px solid var(--sims-border); background: #fff; }
.mx-thumb.sm { width: 64px; height: 48px; }
.mx-opt-row { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem; border: 1.5px solid var(--sims-border); border-radius: 12px; }
.mx-opt-row:has(input[type=radio]:checked) { border-color: var(--mx-natural); background: rgba(18,162,107,.05); }
.mx-opt-key { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding-top: .3rem; cursor: pointer; min-width: 34px; }
.mx-opt-key span { font-weight: 800; font-size: 1.05rem; color: var(--sims-muted); }
/* Exam room */
.mx-qimage { display: block; max-width: 100%; max-height: 420px; margin: 0 auto 1.15rem; border-radius: 12px; border: 1px solid var(--sims-border); background: #fff; cursor: zoom-in; }
.mx-option .opt-body { display: grid; gap: .45rem; flex: 1; }
.mx-option .opt-img { max-width: 100%; max-height: 180px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--sims-border); justify-self: start; }
.mx-zoom { position: fixed; inset: 0; z-index: 2000; background: rgba(10,14,30,.85); display: grid; place-items: center; padding: 1.5rem; cursor: zoom-out; }
.mx-zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; background: #fff; }
