/* Nexora IMS student portal - builds on admin.css tokens */
body.student { background: var(--bg); }
body.student.in-exam { overflow: hidden; overscroll-behavior: none; }
/* exam lock-down: nothing can be selected or dragged, except the answer box */
body.student.in-exam, body.student.in-exam * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.student.in-exam input, body.student.in-exam textarea { -webkit-user-select: text; user-select: text; }
body.student.in-exam img { -webkit-user-drag: none; }
.viol-chip { padding: 6px 12px; border-radius: 99px; background: var(--amber-bg, #FFF4DB); color: var(--amber, #B7791F); font-size: 12px; font-weight: 800; white-space: nowrap; }
.viol-chip[hidden] { display: none; }
.fs-gate { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 70% 10%, #14403B 0%, #0A2A27 60%, #051513 100%); animation: fade .15s ease both; }
.fs-box { width: min(480px, 100%); text-align: center; padding: 36px 32px 30px; border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.fs-ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: var(--blue-bg, #E8F1FE); color: var(--blue, #0F8C7A); }
.fs-ic.warn { background: #FFF1E3; color: #E9740C; }
.fs-ic svg { width: 30px; height: 30px; }
.fs-box h2 { font-size: 22px; letter-spacing: -.02em; color: var(--navy-800); }
.fs-why { margin-top: 10px; color: var(--ink-2); line-height: 1.6; }
.fs-warn { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: #FFF4DB; color: #8A5A00; font-size: 13.5px; line-height: 1.5; }
.fs-time { margin: 14px 0 20px; font-size: 13px; color: var(--muted); font-weight: 600; }
.fs-box .btn { width: 100%; height: 48px; justify-content: center; }

/* ---------- auth ---------- */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 22px; background: var(--line-2); border: 1px solid var(--line); border-radius: 14px; }
.auth-tabs button { height: 42px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; font-size: 14px; color: var(--muted); transition: all .15s; }
.auth-tabs button.on { background: #fff; color: var(--navy-700); box-shadow: var(--shadow-sm); }
.auth-switch { text-align: center; margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.auth-switch a { font-weight: 700; }
#siForm h1, #rgForm h1 { font-size: 26px; }
#rgForm .gl { margin-top: 12px; }
.gf .gf-pre { position: absolute; left: 42px; font-weight: 700; font-size: 14.5px; color: var(--ink-2); pointer-events: none; padding-right: 10px; border-right: 1.5px solid var(--line); line-height: 22px; }
.gf input.has-pre { padding-left: 88px; }
.gf.bad input { border-color: var(--red); background: #FFF9F9; box-shadow: 0 0 0 4px rgba(229,72,77,.1); }
.gf.good input { border-color: #7FD1A0; }
.ferr { margin: 6px 2px 0; font-size: 12.5px; font-weight: 600; color: #C0282D; }
.pw-rules { display: flex; gap: 14px; flex-wrap: wrap; list-style: none; margin: 8px 2px 0; padding: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.pw-rules li { display: inline-flex; align-items: center; gap: 6px; }
.pw-rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.8px solid #C5D1E6; transition: all .15s; }
.pw-rules li.ok { color: var(--green); }
.pw-rules li.ok::before { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/10px no-repeat; }
.gate-panel .gate-box { max-width: 420px; }
@media (max-height: 820px) { .gate-panel .gate-logo { width: 170px; margin-bottom: 14px; } .auth-tabs { margin-bottom: 14px; } .gate-sub { margin-bottom: 14px; } .gate-foot { margin-top: 16px; } .gate-panel { place-items: start center; } }

/* ---------- shell ---------- */
.sp-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 22px; padding: 0 clamp(16px, 3vw, 36px); height: 66px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.sp-brand { display: flex; align-items: center; gap: 10px; color: var(--navy-800); font-size: 20px; letter-spacing: -.02em; }
.sp-brand img { width: 36px; height: 36px; border-radius: 10px; }
.sp-brand b em { font-style: normal; color: var(--orange-500); }
.sp-nav { display: flex; gap: 4px; }
.sp-nav a { padding: 9px 16px; border-radius: 10px; font-weight: 600; color: var(--ink-2); transition: all .15s; }
.sp-nav a:hover { background: var(--blue-50); color: var(--blue-600); }
.sp-nav a.on { background: var(--blue-100); color: var(--navy-700); }
.sp-user { display: flex; align-items: center; gap: 10px; }
.sp-user b { display: block; font-size: 13.5px; line-height: 1.2; }
.sp-user small { display: block; color: var(--muted); font-size: 12px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-accent); color: #fff; font-weight: 800; }
.sp-main { max-width: 1180px; margin: 0 auto; padding: 26px clamp(16px, 3vw, 36px) 60px; min-height: calc(100vh - 66px); animation: rise .35s ease both; }
.sp-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 4px 0 18px; }
.sp-h h2 { font-size: 24px; letter-spacing: -.02em; color: var(--navy-800); }
.sp-h p { color: var(--muted); margin-top: 2px; }

.sp-hero { position: relative; overflow: hidden; border-radius: 20px; padding: 28px 32px; color: #fff; background: var(--grad-navy); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.sp-hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(247,147,30,.35), transparent 65%); }
.sp-hero h1 { font-size: 26px; letter-spacing: -.02em; position: relative; z-index: 1; }
.sp-hero p { color: rgba(255,255,255,.78); margin-top: 6px; position: relative; z-index: 1; max-width: 520px; }
.sp-stats { display: flex; gap: 12px; position: relative; z-index: 1; flex-wrap: wrap; }
.sp-stat { min-width: 110px; padding: 12px 18px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.sp-stat b { display: block; font-size: 24px; letter-spacing: -.02em; }
.sp-stat small { color: rgba(255,255,255,.7); font-size: 12px; font-weight: 600; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { height: 36px; padding: 0 16px; border-radius: 20px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 13px; color: var(--ink-2); transition: all .15s; }
.chips button:hover { border-color: #C5D1E6; }
.chips button.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.chips button small { opacity: .7; margin-left: 5px; font-weight: 700; }

/* ---------- exam cards ---------- */
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.ex-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; }
.ex-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c, var(--blue-500)); }
.ex-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #CBD8EE; }
.ex-card.live { --c: var(--green); } .ex-card.upcoming { --c: var(--blue-500); } .ex-card.resume { --c: var(--orange-500); } .ex-card.done { --c: var(--violet); } .ex-card.ended { --c: #A9B4CB; }
.ex-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ex-code { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.ex-card h3 { font-size: 18px; letter-spacing: -.01em; color: var(--navy-800); line-height: 1.3; }
.ex-card .ex-desc { color: var(--muted); font-size: 13.5px; margin-top: -6px; }
.ex-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ex-meta div { padding: 10px 6px; border-radius: 12px; background: #F6F9FE; text-align: center; }
.ex-meta b { display: block; font-size: 17px; color: var(--navy-800); letter-spacing: -.01em; }
.ex-meta small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.ex-when { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.ex-when .i { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--muted); }
.ex-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ex-foot .btn { flex: 1 1 130px; height: 44px; }
.st { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.st.live { background: var(--green-bg); color: var(--green); } .st.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
.st.upcoming { background: var(--blue-100); color: var(--blue-600); } .st.resume { background: var(--amber-bg); color: var(--amber); }
.st.done { background: var(--violet-bg); color: var(--violet); } .st.ended { background: var(--line-2); color: var(--muted); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18,161,80,.5); } 70% { box-shadow: 0 0 0 7px rgba(18,161,80,0); } 100% { box-shadow: 0 0 0 0 rgba(18,161,80,0); } }
.score-chip { font-weight: 800; font-size: 13px; }
.score-chip.pass { color: var(--green); } .score-chip.fail { color: var(--red); }
.score-chip.wait { display: inline-flex; align-items: center; gap: 6px; color: var(--amber, #B7791F); font-weight: 700; font-size: 12.5px; }
.score-chip.wait .i { width: 15px; height: 15px; }
/* exam still running */
.resume-bar { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 16px; border-radius: 18px; background: linear-gradient(135deg, #FFF4E5, #FFE9CC); border: 1.5px solid #FFC98A; box-shadow: var(--shadow-sm); }
.resume-bar > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.resume-bar b { color: #8A4B00; font-size: 15.5px; }
.resume-bar span { color: #7A5A2E; font-size: 13.5px; line-height: 1.5; }
.resume-bar em { font-style: normal; font-weight: 800; color: #C2570C; }
.resume-bar .rb-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: #fff; color: #E9740C; }
.resume-bar .rb-ic svg { width: 22px; height: 22px; }
@media (max-width: 640px) { .resume-bar { flex-direction: column; align-items: stretch; text-align: center; } .resume-bar .rb-ic { margin: 0 auto; } }
/* result not released yet */
.rs-wait { text-align: center; padding: 44px 28px; max-width: 620px; margin: 10px auto 0; }
.rs-wait-ic { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px; display: grid; place-items: center; background: #FFF4DB; color: #E9740C; }
.rs-wait-ic svg { width: 34px; height: 34px; }
.rs-wait h2 { font-size: 24px; letter-spacing: -.02em; color: var(--navy-800); }
.rs-wait > p { color: var(--muted); margin-top: 6px; }
.rs-wait-box { margin: 22px auto 6px; padding: 16px 20px; border-radius: 16px; background: var(--line-2); border: 1px solid var(--line); display: grid; gap: 4px; max-width: 360px; }
.rs-wait-box small { color: var(--muted); font-weight: 600; }
.rs-wait-box b { font-size: 20px; color: var(--navy-800); }
.rs-wait-box span { color: var(--orange, #F7931E); font-weight: 800; }
.rs-wait .rs-wait-note { margin-top: 14px; font-size: 13.5px; }
.btn[disabled].btn-ghost { opacity: .7; cursor: default; }

/* ---------- instructions modal ---------- */
.ins-list { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); line-height: 1.75; }
.ins-box { margin-top: 14px; padding: 14px 16px; background: #F6F9FE; border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; color: var(--ink-2); max-height: 150px; overflow: auto; }
.ins-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 4px; }
.ins-meta div { padding: 12px 8px; text-align: center; border-radius: 12px; background: var(--blue-50); border: 1px solid var(--blue-100); }
.ins-meta b { display: block; font-size: 19px; color: var(--navy-800); } .ins-meta small { color: var(--muted); font-weight: 600; font-size: 11.5px; }

/* ---------- runner ---------- */
.run { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--bg); }
.run-head { display: flex; align-items: center; gap: 16px; padding: 0 clamp(14px, 2.4vw, 30px); height: 64px; background: var(--grad-navy); color: #fff; flex: none; }
.run-head .rh-title { min-width: 0; }
.run-head .rh-title b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-head .rh-title small { color: rgba(255,255,255,.7); font-size: 12px; }
.timer { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-weight: 800; font-size: 18px; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.timer .i { width: 19px; height: 19px; }
.timer.warn { background: rgba(247,147,30,.25); border-color: rgba(247,147,30,.6); }
.timer.crit { background: rgba(229,72,77,.3); border-color: rgba(229,72,77,.7); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .6; } }
.save-ind { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.7); min-width: 74px; text-align: right; }
.save-ind.bad { color: #FFB1B3; }
.run-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; padding: 20px clamp(14px, 2.4vw, 30px); overflow: hidden; }
.q-col { display: flex; flex-direction: column; min-height: 0; }
.q-card { flex: 1; min-height: 0; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 24px 28px; }
.q-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.q-no { font-weight: 800; color: var(--navy-700); font-size: 15px; }
.q-tag { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--blue-100); color: var(--blue-600); }
.q-tag.m { background: var(--green-bg); color: var(--green); } .q-tag.n { background: var(--red-bg); color: var(--red); }
.q-flag { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 12.5px; color: var(--muted); transition: all .15s; }
.q-flag.on { background: var(--amber-bg); border-color: #F5C77A; color: var(--amber); }
.q-text { font-size: 18px; line-height: 1.65; color: var(--ink); word-break: break-word; }
.q-text p { margin: 0 0 8px; } .q-text code, .q-text pre { background: #F2F5FB; border-radius: 6px; padding: 1px 6px; font-family: ui-monospace, Consolas, monospace; font-size: .92em; } .q-text pre { padding: 10px 14px; overflow: auto; }
.q-img { display: block; max-width: 100%; max-height: 300px; margin: 14px 0 0; border-radius: 12px; border: 1px solid var(--line); background: #F2F5FB; }
.q-hint { margin: 18px 0 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.q-opts { display: grid; gap: 10px; }
.ro { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 13px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-size: 15.5px; font-weight: 500; color: var(--ink); transition: all .14s; word-break: break-word; }
.ro:hover { border-color: #B8CBEA; background: #FAFCFF; }
.ro .k { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #EEF3FB; color: var(--ink-2); font-weight: 800; font-size: 14px; transition: all .14s; }
.ro .ck { margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #C5D1E6; display: grid; place-items: center; color: #fff; transition: all .14s; }
.ro.sq .ck { border-radius: 7px; }
.ro .ck .i { width: 14px; height: 14px; opacity: 0; stroke-width: 3.2; }
.ro.on { border-color: var(--blue-600); background: var(--blue-50); }
.ro.on .k { background: var(--blue-600); color: #fff; }
.ro.on .ck { background: var(--blue-600); border-color: var(--blue-600); } .ro.on .ck .i { opacity: 1; }
.q-in { max-width: 460px; }
.q-in input { width: 100%; height: 54px; padding: 0 18px; font-size: 17px; border: 2px solid var(--line); border-radius: 14px; outline: none; background: #fff; transition: all .15s; }
.q-in input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(20,160,138,.16); }
.q-in small { display: block; margin-top: 8px; color: var(--muted); }
.q-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 14px; flex: none; }
.q-actions .spacer { flex: 1; }
.q-actions .btn { height: 46px; padding: 0 20px; }

.pal-col { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.pal-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 18px; }
.pal-card h4 { font-size: 14px; color: var(--navy-800); margin-bottom: 12px; display: flex; justify-content: space-between; }
.pal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pal-grid button { position: relative; height: 42px; border-radius: 11px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; color: var(--ink-2); transition: all .12s; }
.pal-grid button:hover { border-color: var(--blue-500); }
.pal-grid button.ans { background: var(--green-bg); border-color: #8BD7AB; color: #0C7A3A; }
.pal-grid button.flag { background: var(--amber-bg); border-color: #F5C77A; color: var(--amber); }
.pal-grid button.flag::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange-500); }
.pal-grid button.cur { border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(10,50,46,.18); background: var(--navy-700); color: #fff; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 14px; font-size: 12px; color: var(--muted); font-weight: 600; }
.legend span { display: flex; align-items: center; gap: 7px; } .legend i { width: 14px; height: 14px; border-radius: 5px; border: 1.5px solid var(--line); background: #fff; }
.legend i.a { background: var(--green-bg); border-color: #8BD7AB; } .legend i.f { background: var(--amber-bg); border-color: #F5C77A; } .legend i.c { background: var(--navy-700); border-color: var(--navy-700); }
.pal-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.pal-sum div { padding: 10px 4px; border-radius: 12px; background: #F6F9FE; } .pal-sum b { display: block; font-size: 19px; color: var(--navy-800); } .pal-sum small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.pal-toggle { display: none; }

/* ---------- result ---------- */
.rs-hero { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; padding: 30px 34px; border-radius: 22px; color: #fff; background: var(--grad-navy); box-shadow: var(--shadow); margin-bottom: 18px; position: relative; overflow: hidden; }
.rs-hero.pass { background: linear-gradient(145deg, #05503a 0%, #0B7A4B 60%, #12A150 100%); } .rs-hero.fail { background: linear-gradient(145deg, #4b0f12 0%, #8f1d22 60%, #c0392b 100%); }
.rs-ring { position: relative; width: 150px; height: 150px; } .rs-ring svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.rs-ring .trk { stroke: rgba(255,255,255,.18); } .rs-ring .bar { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.rs-ring b { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; font-size: 32px; letter-spacing: -.03em; } .rs-ring b small { font-size: 12px; font-weight: 600; opacity: .8; letter-spacing: 0; }
.rs-hero h2 { font-size: 26px; letter-spacing: -.02em; } .rs-hero p { color: rgba(255,255,255,.82); margin-top: 4px; }
.rs-pill { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 6px 14px; border-radius: 20px; background: rgba(255,255,255,.16); font-weight: 800; font-size: 13px; }
.rs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.rs-tile { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.rs-tile b { display: block; font-size: 24px; letter-spacing: -.02em; color: var(--navy-800); } .rs-tile small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.rs-tile.g b { color: var(--green); } .rs-tile.r b { color: var(--red); } .rs-tile.a b { color: var(--amber); }
.rs-sub { display: grid; gap: 12px; }
.rs-sub .row2 { display: grid; grid-template-columns: 150px 1fr 60px; gap: 12px; align-items: center; font-size: 13.5px; font-weight: 600; }
.rv { display: grid; gap: 14px; }
.rv-card { padding: 20px 22px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.rv-card.correct { border-left-color: var(--green); } .rv-card.wrong { border-left-color: var(--red); } .rv-card.skipped { border-left-color: #B3BDD3; }
.rv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.rv-res { padding: 3px 11px; border-radius: 20px; font-weight: 800; font-size: 12px; } .rv-res.correct { background: var(--green-bg); color: var(--green); } .rv-res.wrong { background: var(--red-bg); color: var(--red); } .rv-res.skipped { background: var(--line-2); color: var(--muted); }
.rv-got { margin-left: auto; font-weight: 800; } .rv-got.p { color: var(--green); } .rv-got.n { color: var(--red); }
.rv-opts { display: grid; gap: 8px; margin-top: 12px; }
.rv-opt { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 14.5px; }
.rv-opt .k { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #EEF3FB; font-weight: 800; font-size: 13px; flex: none; }
.rv-opt.ok { border-color: #8BD7AB; background: #F0FAF4; } .rv-opt.ok .k { background: var(--green); color: #fff; }
.rv-opt.no { border-color: #F2B5B7; background: #FFF6F6; } .rv-opt.no .k { background: var(--red); color: #fff; }
.rv-opt em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.rv-ans { margin-top: 12px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; } .rv-ans b { color: var(--navy-800); }
.rv-exp { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: #FFF9EC; border: 1px solid #F7E3B3; color: #6B4E06; font-size: 14px; line-height: 1.6; }

@media (max-width: 980px) {
  .run-body { grid-template-columns: 1fr; overflow-y: auto; padding-bottom: 90px; }
  .q-col { min-height: auto; } .q-card { overflow: visible; }
  .pal-col { overflow: visible; }
  .pal-toggle { display: inline-flex; }
  .pal-col.closed .pal-grid, .pal-col.closed .legend { display: none; }
}
@media (max-width: 720px) {
  .sp-user div { display: none; } .sp-top { gap: 10px; }
  .sp-hero { padding: 22px 20px; } .rs-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 24px 18px; }
  .ex-grid { grid-template-columns: 1fr; } .rs-sub .row2 { grid-template-columns: 100px 1fr 50px; }
  .q-card { padding: 18px 16px; } .q-text { font-size: 16.5px; } .ins-meta { grid-template-columns: repeat(2, 1fr); }
  .run-head { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; } .run-head .rh-title { flex: 1 1 100%; order: -1; }
  .q-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px; } .q-actions .btn { padding: 0 14px; height: 44px; }
}
