/* Nexora IMS student portal - v2 look: floating header, student ID card, featured exam, refined runner.
   Loaded after student.css, so everything here overrides it. */

body.student { background: #FBF8F3; }
body.student::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(880px 520px at 100% -8%, rgba(247,147,30,.18), transparent 62%), radial-gradient(820px 560px at -8% 2%, rgba(15,140,122,.17), transparent 62%), radial-gradient(760px 520px at 60% 118%, rgba(200,100,59,.09), transparent 62%); }

/* ---------- avatar ---------- */
.av { --s: 40px; width: var(--s); height: var(--s); flex: none; border-radius: 32%; overflow: hidden; display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-size: calc(var(--s) * .36); letter-spacing: .02em;
  background: linear-gradient(135deg, hsl(var(--h, 170) 78% 54%), hsl(calc(var(--h, 170) + 30) 82% 42%)); box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 4px 12px rgba(20,34,31,.18); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av b { font-weight: 800; }

/* ---------- floating header ---------- */
.sp-top { position: sticky; top: 12px; z-index: 40; display: block; height: auto; padding: 0 clamp(12px, 2.4vw, 28px); margin-top: 12px; background: transparent; border: 0; backdrop-filter: none; gap: 0; }
.sp-bar { max-width: 1240px; margin: 0 auto; height: 66px; display: flex; align-items: center; gap: 16px; padding: 0 10px 0 18px; border-radius: 24px; background: rgba(255,255,255,.8); backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.95); box-shadow: 0 14px 40px rgba(20,34,31,.11), inset 0 1px 0 #fff; }
.sp-nav { display: flex; gap: 4px; padding: 4px; border-radius: 18px; background: rgba(10,50,46,.05); }
.sp-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 14px; font-weight: 700; font-size: 14px; color: var(--ink-2); transition: all .16s; }
.sp-nav a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sp-nav a:hover { background: #fff; color: var(--navy-700); }
.sp-nav a.on { background: var(--navy-800); color: #fff; box-shadow: 0 6px 16px rgba(18,51,48,.28); }
.sp-me { position: relative; }
.sp-me-btn { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 40px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: all .15s; }
.sp-me-btn:hover { border-color: #C5D1E6; box-shadow: var(--shadow-sm); }
.sp-me-t { text-align: left; } .sp-me-t b { display: block; font-size: 13.5px; line-height: 1.2; color: var(--navy-800); } .sp-me-t small { display: block; font-size: 11.5px; color: var(--muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-me-btn .chev { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sp-menu { position: absolute; right: 0; top: calc(100% + 12px); width: 260px; padding: 8px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(20,34,31,.2); animation: rise .18s ease both; }
.sp-menu[hidden] { display: none; }
.sp-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; } .sp-menu-head b { display: block; color: var(--navy-800); } .sp-menu-head small { color: var(--muted); word-break: break-all; }
.sp-menu a, .sp-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; background: transparent; border-radius: 12px; font: inherit; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; text-align: left; }
.sp-menu a:hover, .sp-menu button:hover { background: var(--blue-50); color: var(--navy-700); }
.sp-menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sp-menu #spOut { color: var(--red); } .sp-menu #spOut:hover { background: var(--red-bg); color: var(--red); }
.sp-main { max-width: 1240px; min-height: calc(100vh - 90px); padding-top: 28px; }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; }
.dash-side { position: sticky; top: 104px; display: grid; gap: 16px; }
.dash-main { min-width: 0; }
.greet { margin: 2px 0 18px; }
.greet h1 { font-size: 32px; letter-spacing: -.035em; color: var(--navy-800); line-height: 1.15; }
.greet h1 span { display: inline-block; animation: wave 2.4s ease-in-out 1; transform-origin: 70% 70%; }
.greet p { margin-top: 6px; color: var(--muted); font-size: 15px; } .greet p b { color: var(--orange-600); }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-10deg); } 50% { transform: rotate(8deg); } }

/* ---------- student ID card ---------- */
.idc { position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; padding: 22px 22px 18px; color: #fff; background: linear-gradient(155deg, #0A1F1D 0%, #15403B 52%, #1F6B62 100%); box-shadow: 0 28px 56px rgba(10,50,46,.34), inset 0 1px 0 rgba(255,255,255,.18); transition: transform .3s ease; }
.idc:hover { transform: translateY(-3px) rotate(-.4deg); }
.idc::before { content: ""; position: absolute; z-index: -1; right: -90px; top: -120px; width: 290px; height: 290px; border-radius: 50%; background: radial-gradient(circle at 32% 32%, #FFC15C, #FF7A12 52%, rgba(255,106,0,0) 72%); opacity: .9; }
.idc::after { content: ""; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%); mask-image: linear-gradient(180deg, #000, transparent 75%); }
.idc .shine { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.2) 46%, transparent 60%); transform: translateX(-130%); transition: transform .9s ease; }
.idc:hover .shine { transform: translateX(130%); }
.idc > * { position: relative; z-index: 1; }
.idc-top { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; opacity: .92; }
.idc-brand { display: inline-flex; align-items: center; gap: 8px; letter-spacing: .08em; font-size: 13px; text-transform: none; } .idc-brand img { width: 26px; height: 26px; border-radius: 8px; background: #fff; padding: 2px; }
.idc-photo { position: relative; width: fit-content; margin: 22px 0 16px; }
.idc-photo .av { border-radius: 30%; box-shadow: 0 0 0 3px rgba(255,255,255,.96), 0 16px 34px rgba(0,0,0,.4); }
.idc-cam { position: absolute; right: -8px; bottom: -8px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid #15403B; display: grid; place-items: center; background: var(--grad-accent); color: #fff; cursor: pointer; box-shadow: 0 8px 18px rgba(255,106,0,.45); transition: transform .15s; }
.idc-cam:hover { transform: scale(1.1); } .idc-cam svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.idc h3 { font-size: 23px; letter-spacing: -.025em; line-height: 1.2; word-break: break-word; }
.idc-no { margin-top: 4px; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12.5px; letter-spacing: .16em; opacity: .75; }
.idc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.idc-grid > div { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); min-width: 0; }
.idc-grid small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.idc-grid b { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.3; word-break: break-word; } .idc-grid em { font-style: normal; font-weight: 500; opacity: .6; }
.idc-bar { height: 30px; margin-top: 18px; border-radius: 4px; opacity: .5; background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 4px, #fff 4px 5px, transparent 5px 9px, #fff 9px 12px, transparent 12px 14px, #fff 14px 15px, transparent 15px 19px); }
.idc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 11.5px; opacity: .85; font-weight: 600; } .idc-foot a { color: #FFC15C; font-weight: 800; } .idc-foot a:hover { text-decoration: underline; }
.idc.big { padding: 28px 28px 22px; } .idc.big h3 { font-size: 27px; }

.pcard { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: all .15s; }
.pcard:hover { border-color: #FFC98A; box-shadow: 0 10px 26px rgba(247,147,30,.18); transform: translateY(-2px); }
.pcard b { color: var(--navy-800); font-size: 14px; } .pcard small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; } .pcard em { font-style: normal; font-weight: 800; color: var(--orange-600); font-size: 13px; }
.pbar { grid-column: 1 / -1; height: 7px; border-radius: 6px; background: #EAF0FA; overflow: hidden; } .pbar i { display: block; height: 100%; border-radius: 6px; background: var(--grad-accent); }
.prog { padding: 18px; border-radius: 22px; } .prog h4 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.prog-row { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: conic-gradient(var(--orange-500) calc(var(--p) * 1%), #E7EDF8 0); }
.ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; }
.ring b, .ring small { position: relative; z-index: 1; line-height: 1.1; } .ring b { font-size: 21px; letter-spacing: -.03em; color: var(--navy-800); } .ring small { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.prog-n { flex: 1; display: grid; gap: 8px; } .prog-n div { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 7px; border-bottom: 1px dashed var(--line); } .prog-n div:last-child { border: 0; padding: 0; }
.prog-n b { font-size: 18px; color: var(--navy-800); order: 2; } .prog-n small { color: var(--muted); font-weight: 600; font-size: 12.5px; }

/* ---------- featured exam ---------- */
.feat { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 30px 32px; margin-bottom: 26px; border-radius: 28px; color: #fff; box-shadow: 0 26px 54px rgba(10,50,46,.26); }
.feat.soon { background: linear-gradient(135deg, #0A2A27 0%, #1B5B52 58%, #C8643B 100%); }
.feat.live { background: linear-gradient(135deg, #053B33 0%, #0A7050 56%, #12A150 100%); box-shadow: 0 26px 54px rgba(10,112,80,.3); }
.feat::before { content: ""; position: absolute; z-index: -1; right: -70px; top: -90px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(255,181,71,.55), transparent 66%); }
.feat::after { content: ""; position: absolute; z-index: -1; left: 40%; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.1), transparent 68%); }
.feat-k { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px; border-radius: 20px; background: rgba(255,255,255,.16); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.feat-k i { width: 8px; height: 8px; border-radius: 50%; background: #FFC15C; animation: pulse2 1.6s infinite; } .feat.live .feat-k i { background: #5CF0A0; }
@keyframes pulse2 { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.feat h2 { margin-top: 14px; font-size: 29px; letter-spacing: -.03em; line-height: 1.2; }
.feat p { margin-top: 6px; color: rgba(255,255,255,.8); max-width: 520px; line-height: 1.55; }
.feat-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.feat-meta span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); font-size: 12.5px; font-weight: 700; }
.feat-meta .i { width: 15px; height: 15px; }
.feat .btn-lg { height: 52px; padding: 0 28px; font-size: 15.5px; }
.feat-wait { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.22); } .feat-wait[disabled] { opacity: 1; }
.cdw { display: grid; grid-template-columns: repeat(4, 74px); gap: 10px; }
.cdw div { padding: 14px 4px 10px; text-align: center; border-radius: 18px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(6px); }
.cdw b { display: block; font-size: 32px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; } .cdw small { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.feat-side { text-align: center; padding: 20px 26px; border-radius: 22px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); min-width: 190px; }
.feat-side small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .75; } .feat-side b { display: block; margin-top: 6px; font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- exam cards ---------- */
.ex-grid { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.ex-card { border-radius: 24px; padding: 22px; gap: 14px; box-shadow: 0 8px 26px rgba(20,34,31,.06); border-color: rgba(203,216,238,.7); }
.ex-card::before { height: 4px; background: linear-gradient(90deg, hsl(var(--h, 170) 80% 55%), hsl(calc(var(--h, 170) + 30) 85% 60%)); }
.ex-card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(20,34,31,.14); }
.ex-card.ended { filter: saturate(.55); opacity: .88; }
.ex-head { display: flex; align-items: flex-start; gap: 12px; }
.ex-ico { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; background: linear-gradient(135deg, hsl(var(--h, 170) 80% 56%), hsl(calc(var(--h, 170) + 30) 82% 44%)); box-shadow: 0 8px 18px hsl(var(--h, 170) 80% 45% / .35); }
.ex-ht { flex: 1; min-width: 0; } .ex-ht .ex-code { display: block; font-size: 11px; margin-bottom: 3px; text-transform: uppercase; }
.ex-ht h3 { font-size: 17px; line-height: 1.3; }
.ex-card .st { flex: none; }
.ex-meta div { background: linear-gradient(180deg, #F7FAFF, #EFF4FD); border: 1px solid #E5ECF8; border-radius: 14px; }
.chips button { height: 38px; border-radius: 14px; } .chips button.on { background: var(--navy-800); border-color: var(--navy-800); box-shadow: 0 6px 14px rgba(18,51,48,.25); }

/* ---------- profile page ---------- */
.pf { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 28px; align-items: start; }
.pf-left { position: sticky; top: 104px; }
#pfCardWrap.drop .idc { outline: 3px dashed #FFB547; outline-offset: 7px; }
.pf-photo-actions { display: flex; gap: 10px; margin-top: 18px; } .pf-photo-actions .btn { flex: 1; }
.pf-hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.5; }
.pf-form { border-radius: 24px; }
.lockf { position: relative; } .lockf .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.lockf .input { padding-left: 40px; background: #F4F7FC; color: var(--ink-2); }
.pf-form .ferr { margin-top: 6px; }

/* ---------- exam runner ---------- */
.run { background: radial-gradient(900px 500px at 100% 0%, rgba(247,147,30,.1), transparent 60%), radial-gradient(800px 500px at 0% 100%, rgba(15,140,122,.1), transparent 60%), var(--bg); }
.run-head { height: 68px; background: linear-gradient(115deg, #0A1F1D 0%, #15403B 60%, #1A6158 100%); box-shadow: 0 8px 24px rgba(10,31,29,.25); position: relative; z-index: 2; }
.run-prog { flex: none; height: 4px; background: rgba(10,50,46,.12); } .run-prog i { display: block; height: 100%; width: 0; background: var(--grad-accent); border-radius: 0 4px 4px 0; transition: width .45s cubic-bezier(.3,.8,.3,1); box-shadow: 0 0 12px rgba(255,106,0,.6); }
.cand { display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 16px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
.cand b { display: block; font-size: 13px; line-height: 1.2; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cand small { display: block; font-size: 11px; letter-spacing: .1em; opacity: .7; }
.cand .av { box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.timer { padding: 6px 16px 6px 7px; border-radius: 16px; gap: 10px; }
.t-ring { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.22) 0); transition: background .3s; }
.t-ring::after { content: ""; position: absolute; inset: 4.5px; border-radius: 50%; background: #123486; }
.timer.warn .t-ring { background: conic-gradient(#FFB547 calc(var(--p) * 1%), rgba(255,255,255,.2) 0); } .timer.crit .t-ring { background: conic-gradient(#FF6B70 calc(var(--p) * 1%), rgba(255,255,255,.2) 0); }
.viol-chip { background: rgba(255,181,71,.2); color: #FFD58A; border: 1px solid rgba(255,181,71,.4); }
.q-card { border-radius: 26px; padding: 28px 34px; box-shadow: 0 16px 44px rgba(20,34,31,.07); border-color: rgba(203,216,238,.7); }
.q-no { padding: 6px 13px; border-radius: 11px; background: var(--navy-800); color: #fff; font-size: 13px; letter-spacing: .02em; }
.q-text { font-size: 19px; line-height: 1.7; }
.ro { border-radius: 18px; padding: 15px 18px; border-width: 2px; }
.ro:hover { transform: translateX(4px); border-color: #A9C2EA; }
.ro .k { border-radius: 12px; width: 36px; height: 36px; }
.ro.on { box-shadow: 0 10px 26px rgba(15,140,122,.2); }
.q-actions .btn { border-radius: 14px; }
.pal-card { border-radius: 24px; box-shadow: 0 16px 44px rgba(20,34,31,.07); border-color: rgba(203,216,238,.7); }
.pal-grid button { border-radius: 13px; height: 44px; }
.pal-grid button.cur { background: var(--grad-accent); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(255,106,0,.38); transform: scale(1.06); }
.legend i.c { background: var(--orange-600); border-color: var(--orange-600); }

/* ---------- results ---------- */
.rs-hero { border-radius: 30px; padding: 34px 38px; }
.rs-hero::after { content: ""; position: absolute; right: -80px; top: -100px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.2), transparent 66%); pointer-events: none; }
.rs-tile { border-radius: 20px; } .rs-tile b { font-size: 26px; }
.card { border-radius: 22px; }
.confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -16px; width: 9px; height: 15px; border-radius: 2px; opacity: 0; animation: fall var(--d, 3s) cubic-bezier(.3,.6,.4,1) var(--w, 0s) forwards; }
@keyframes fall { 0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); } 100% { opacity: 0; transform: translate3d(var(--x, 0), 105vh, 0) rotate(var(--r, 600deg)); } }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .dash, .pf { grid-template-columns: 1fr; } .dash-side, .pf-left { position: static; }
  .dash-side { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } .dash-side .idc { grid-row: span 2; }
  .pf-left { max-width: 440px; margin: 0 auto; width: 100%; }
}
@media (max-width: 900px) { .cand { display: none; } .feat { grid-template-columns: 1fr; } .cdw { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px) {
  .sp-bar { padding: 0 8px 0 12px; gap: 8px; height: 60px; } .sp-brand b { display: none; }
  .sp-nav a span { display: none; } .sp-nav a { padding: 10px 13px; } .sp-me-t, .sp-me-btn .chev { display: none; } .sp-me-btn { padding: 4px; }
  .greet h1 { font-size: 25px; } .feat { padding: 22px 20px; } .feat h2 { font-size: 23px; } .cdw b { font-size: 25px; }
  .dash-side { grid-template-columns: 1fr; } .dash-side .idc { grid-row: auto; }
  .idc.big { padding: 22px; }
  .q-actions { flex-wrap: nowrap; gap: 8px; } .q-actions .spacer { display: none; }
  .q-actions .btn { flex: 1 1 0; justify-content: center; padding: 0 8px; font-size: 13.5px; white-space: nowrap; }
}

/* ---------- my results: list of cards (table-free so it works on a phone) ---------- */
.hist { padding: 0; overflow: hidden; }
.hi { display: grid; grid-template-columns: minmax(0, 1fr) 150px 190px auto; gap: 16px; align-items: center; padding: 16px 22px; border-top: 1px solid var(--line-2); transition: background .12s; }
.hi:first-child { border-top: 0; }
.hi:not(.hi-head):hover { background: #FAFCFF; }
.hi-head { padding: 12px 22px; background: #F6F9FE; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hi-main b { display: block; color: var(--navy-800); font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.hi-main small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.hi-score b { font-size: 17px; color: var(--navy-800); } .hi-score b span { color: var(--muted); font-size: 13px; font-weight: 600; }
.hi-score em { font-style: normal; font-weight: 800; color: var(--orange-600); margin-left: 8px; font-size: 13.5px; }
.hi-res .st { max-width: 100%; white-space: normal; }
.hi-act .btn { height: 38px; padding: 0 18px; }
.viol-chip[hidden] { display: none; }

/* ---------- phones: one consistent pass (this file loads last, so these win) ---------- */
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 720px) {
  body.student .sp-main { padding: 18px 16px calc(40px + env(safe-area-inset-bottom, 0px)); min-height: 0; }
  body.student .sp-h { margin: 2px 0 14px; gap: 10px; } body.student .sp-h h2 { font-size: 21px; }
  body.student .card { border-radius: 20px; }

  /* dashboard: greeting, resume and the featured exam come first; the ID card shrinks to a strip */
  .dash { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .dash > * { min-width: 0; }
  .dash-main, .dash-side { display: contents; }
  .dash .resume-bar { order: 0; margin: 0; }
  .dash .greet { order: 1; margin: 2px 0 0; } .greet p { font-size: 14px; }
  .dash .idc { order: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 14px; padding: 16px; border-radius: 22px; box-shadow: 0 16px 34px rgba(10,50,46,.28); }
  .dash .idc:hover { transform: none; }
  .dash .idc::before { right: -110px; top: -140px; }
  .dash .idc-top, .dash .idc-bar, .dash .idc-foot, .dash .idc .shine { display: none; }
  .dash .idc-photo { grid-row: 1 / span 2; margin: 0; } .dash .idc-photo .av { --s: 66px !important; }
  .dash .idc h3 { font-size: 19px; align-self: end; } .dash .idc-no { align-self: start; margin-top: 3px; font-size: 11.5px; }
  .dash .idc-grid { grid-column: 1 / -1; margin-top: 14px; gap: 8px; } .dash .idc-grid > div { padding: 8px 10px; border-radius: 12px; } .dash .idc-grid b { font-size: 13px; }
  .dash .feat { order: 3; margin: 0; }
  .dash .prog { order: 4; padding: 14px 16px; border-radius: 20px; } .dash .prog h4 { margin-bottom: 10px; }
  .dash .pcard { order: 5; }
  .dash .sp-h { order: 6; margin: 8px 0 0; }
  .dash .ex-grid { order: 7; }
  .prog-row { gap: 14px; } .ring { width: 78px; height: 78px; } .ring::before { inset: 8px; } .ring b { font-size: 17px; } .ring small { font-size: 9.5px; }
  .prog-n { gap: 5px; } .prog-n div { padding-bottom: 5px; } .prog-n b { font-size: 16px; } .prog-n small { font-size: 12px; }

  /* featured exam */
  .feat { padding: 20px 18px; border-radius: 24px; gap: 18px; } .feat h2 { margin-top: 12px; font-size: 22px; } .feat p { font-size: 14px; }
  .feat-meta { gap: 6px; margin: 14px 0 18px; } .feat-meta span { padding: 5px 10px; font-size: 12px; border-radius: 10px; }
  .feat .btn-lg { width: 100%; justify-content: center; height: 50px; padding: 0 18px; }
  .cdw { gap: 8px; } .cdw div { padding: 10px 2px 8px; border-radius: 14px; } .cdw b { font-size: 24px; }
  .feat-side { min-width: 0; padding: 14px; border-radius: 16px; } .feat-side b { font-size: 22px; }

  /* exam list */
  .chips { flex: 0 0 calc(100% + 32px); margin: 0 -16px; padding: 2px 16px 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; } .chips button { flex: none; }
  .ex-grid { gap: 14px; } .ex-card { padding: 18px; border-radius: 22px; gap: 12px; } .ex-card:hover { transform: none; }
  .ex-ht h3 { font-size: 16.5px; } .ex-meta { gap: 6px; } .ex-meta b { font-size: 16px; }
  .ex-foot .btn { flex: 1 1 100%; }

  /* my results */
  .hi { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main act" "score res"; gap: 10px 12px; padding: 14px 16px; align-items: center; }
  .hi-head { display: none; }
  .hi-main { grid-area: main; } .hi-act { grid-area: act; align-self: start; } .hi-score { grid-area: score; } .hi-res { grid-area: res; justify-self: end; text-align: right; }
  .hi-act .btn { height: 36px; padding: 0 16px; }

  /* result detail */
  .rs-hero { padding: 22px 16px; border-radius: 24px; gap: 14px; }
  .rs-ring, .rs-ring svg { width: 124px; height: 124px; } .rs-ring b { font-size: 27px; } .rs-hero h2 { font-size: 21px; }
  .rs-pill { display: flex; width: fit-content; max-width: 100%; justify-content: center; margin-left: auto; margin-right: auto; font-size: 12px; line-height: 1.4; padding: 7px 13px; border-radius: 16px; text-align: center; }
  .rs-pill .i { flex: none; }
  .rs-tiles { grid-template-columns: repeat(6, 1fr); gap: 10px; }
  .rs-tile { grid-column: span 2; padding: 13px 10px; border-radius: 16px; text-align: center; } .rs-tile:nth-child(n+4) { grid-column: span 3; }
  .rs-tile b { font-size: 20px; } .rs-tile small { font-size: 12px; }
  .rs-sub .row2 { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n c" "b b"; gap: 6px 10px; }
  .rs-sub .row2 > span:first-child { grid-area: n; } .rs-sub .row2 > span:last-child { grid-area: c; } .rs-sub .row2 > .bar-track { grid-area: b; }
  .rv-card { padding: 16px 14px; border-radius: 16px; }
  .rv-opt { flex-wrap: wrap; gap: 0 10px; padding: 9px 11px; font-size: 14px; }
  .rv-opt > span:nth-child(2) { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; padding: 2px 0; }
  .rv-opt em { flex: 0 0 100%; margin: 0 0 0 38px; }
  .rv-opt em:empty { display: none; }

  /* profile */
  .pf { gap: 18px; } .pf-left { max-width: none; }
  .pf-form .card-body .row { justify-content: stretch; } #pfSave { width: 100%; justify-content: center; }

  /* exam screen */
  .run-head { height: auto; min-height: 56px; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 12px; }
  .run-head .rh-title { flex: 1 1 0; min-width: 0; order: 0; } .run-head .rh-title b { font-size: 15px; } .run-head .rh-title small { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .run-head .spacer { display: none; }
  .run-head .timer { order: 1; margin-left: 0; padding: 4px 12px 4px 5px; font-size: 16px; gap: 8px; }
  .run-head #rSubmit { order: 2; height: 40px; padding: 0 14px; }
  .run-head .viol-chip:not([hidden]) { order: 3; flex: 1 1 100%; justify-content: center; text-align: center; }
  .save-ind:not(.bad) { display: none; } .save-ind.bad { order: 4; flex: 1 1 100%; min-width: 0; text-align: center; }
  .run-body { padding: 14px 12px 96px; gap: 14px; }
  .q-card { padding: 18px 16px; border-radius: 22px; } .q-text { font-size: 17px; line-height: 1.6; }
  .ro { padding: 12px 13px; border-radius: 16px; gap: 12px; font-size: 15px; } .ro:hover { transform: none; } .ro .k { width: 32px; height: 32px; }
  .pal-card { padding: 14px; border-radius: 20px; } .pal-grid { grid-template-columns: repeat(6, 1fr); } .pal-grid button { height: 42px; }

  /* dialogs become bottom sheets */
  body.student .modal-back { place-items: end center; padding: 0; }
  body.student .modal { max-width: none; width: 100%; border-radius: 24px 24px 0 0; max-height: 92vh; max-height: 92dvh; animation: sheet-up .28s cubic-bezier(.2,.9,.3,1) both; }
  body.student .modal-head { padding: 18px 20px 6px; } body.student .modal-body { padding: 8px 20px 16px; }
  body.student .modal-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px)); } body.student .modal-foot .btn { flex: 1; justify-content: center; }
}
@media (max-width: 380px) {
  .greet h1 { font-size: 22px; } .feat h2 { font-size: 20px; } .cdw b { font-size: 21px; } .cdw small { font-size: 9.5px; letter-spacing: .08em; }
  .dash .idc-photo .av { --s: 58px !important; } .dash .idc h3 { font-size: 17.5px; }
  .ex-meta b { font-size: 15px; } .rs-tile b { font-size: 18px; } .pal-grid { grid-template-columns: repeat(5, 1fr); }
  .run-head .timer { padding-right: 9px; font-size: 15px; } .run-head #rSubmit { padding: 0 11px; }
}

/* ---------- exam screen as a phone app: question strip, floating dock, palette bottom sheet ---------- */
.mo { display: none; }
.pal-toggle .ix { display: none; } .pal-toggle span { display: inline-flex; }
@keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 720px) {
  .run { background: linear-gradient(180deg, #E8EFFB 0%, #F4F7FD 100%); }
  .run-prog { height: 3px; }

  /* strip under the header: where you are + every question as a tappable pill */
  .rn-strip.mo { display: block; flex: none; position: relative; z-index: 1; padding: 10px 0 8px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 10px 22px rgba(20,34,31,.06); }
  .rn-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 14px 9px; }
  .rn-top b { font-size: 15.5px; letter-spacing: -.01em; color: var(--navy-800); } .rn-top b span { color: var(--muted); font-weight: 600; }
  .rn-top em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
  .rn-pills { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rn-pills::-webkit-scrollbar { display: none; }
  .rn-pills button { position: relative; flex: none; width: 38px; height: 38px; border-radius: 13px; border: 1.5px solid var(--line); background: #fff; font-weight: 800; font-size: 14px; color: var(--ink-2); }
  .rn-pills button.ans { background: var(--green-bg); border-color: #8BD7AB; color: #0C7A3A; }
  .rn-pills button.flag { background: var(--amber-bg); border-color: #F5C77A; color: var(--amber); }
  .rn-pills button.flag::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange-500); }
  .rn-pills button.cur { background: var(--navy-800); border-color: var(--navy-800); color: #fff; box-shadow: 0 0 0 3px rgba(255,106,0,.38); transform: scale(1.06); }

  /* question */
  .run-body { padding: 14px 12px calc(112px + env(safe-area-inset-bottom, 0px)); gap: 0; }
  .q-card { position: relative; overflow: hidden; padding: 20px 18px 22px; border-radius: 26px; box-shadow: 0 14px 34px rgba(20,34,31,.08); }
  .q-card::after { content: attr(data-n); position: absolute; right: 14px; top: -4px; font-size: 88px; font-weight: 800; letter-spacing: -.06em; line-height: 1; color: rgba(15,140,122,.07); pointer-events: none; }
  .q-meta { margin-bottom: 12px; gap: 8px; } .q-meta .q-no, .q-meta .q-flag { display: none; }
  .q-text { position: relative; font-size: 18px; line-height: 1.55; font-weight: 600; color: var(--navy-800); }
  .q-hint { margin: 22px 0 10px; }
  .ro { min-height: 58px; padding: 12px 14px; border-radius: 18px; box-shadow: 0 2px 0 rgba(20,34,31,.04); }
  .ro:active { transform: scale(.985); }
  .ro.on { background: linear-gradient(135deg, #EAF2FF, #F1ECFF); border-color: var(--blue-600); box-shadow: 0 10px 24px rgba(15,140,122,.18); }
  .ro .ck { width: 24px; height: 24px; }
  .q-clearm.mo { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 20px; background: #fff; font: inherit; font-weight: 700; font-size: 13px; color: var(--muted); }
  .q-clearm svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

  /* floating dock */
  .q-actions { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 6; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 26px; border: 1px solid rgba(255,255,255,.9);
    background: rgba(255,255,255,.93); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 18px 44px rgba(10,31,29,.22), 0 0 0 1px rgba(10,50,46,.06); }
  .q-actions .do, .q-actions .spacer { display: none; }
  .q-actions .dk.mo { display: grid; place-items: center; position: relative; flex: none; width: 50px; height: 50px; border: 0; border-radius: 17px; background: #EEF3FB; color: var(--navy-700); cursor: pointer; }
  .dk svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .dk em { position: absolute; top: -7px; right: -5px; padding: 2px 6px; border-radius: 10px; background: var(--navy-800); color: #fff; font-weight: 800; font-size: 10.5px; line-height: 1.3; font-style: normal; box-shadow: 0 0 0 2px #fff; }
  .dk.on { background: var(--amber-bg); color: var(--amber); } .dk.on svg { fill: currentColor; }
  .q-actions #qPrev { flex: none; width: 50px; height: 50px; padding: 0; border-radius: 17px; justify-content: center; } .q-actions #qPrev .lbl { display: none; }
  .q-actions #qNext { flex: 1 1 auto; height: 50px; border-radius: 17px; font-size: 15px; justify-content: center; white-space: nowrap; }

  /* palette = bottom sheet */
  .pal-col { position: fixed; inset: 0; z-index: 30; display: none; flex-direction: column; justify-content: flex-end; overflow: visible; background: rgba(10,31,29,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
  .pal-col.open { display: flex; animation: sheet-fade .2s both; }
  .pal-col .pal-card { max-height: 84vh; max-height: 84dvh; overflow-y: auto; padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 28px 28px 0 0; border: 0; animation: sheet-up .28s cubic-bezier(.2,.9,.3,1) both; }
  .sheet-grab.mo { display: block; width: 44px; height: 5px; margin: 0 auto 12px; border-radius: 5px; background: var(--line); }
  .pal-card h4 { font-size: 16px; align-items: center; margin-bottom: 14px; }
  .pal-toggle { display: inline-grid; place-items: center; } .pal-toggle .ig { display: none; } .pal-toggle .ix { display: inline-flex; }
  .pal-col.closed .pal-grid { display: grid; } .pal-col.closed .legend { display: grid; }
  .pal-grid { grid-template-columns: repeat(6, 1fr); gap: 10px; } .pal-grid button { height: 46px; border-radius: 14px; }
  .pal-submit.mo { display: flex; width: 100%; margin-top: 18px; justify-content: center; }
}
@media (max-width: 380px) { .pal-grid { grid-template-columns: repeat(5, 1fr); } .q-text { font-size: 17px; } }

/* ---------- exam screen on a phone: everything fits one screen, no page scroll ---------- */
@keyframes sl-r { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes sl-l { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
  .run-head { min-height: 0; padding: 7px 12px; gap: 8px; }
  .run-head .rh-title b { font-size: 15px; }
  .rh-title small .do { display: none; } .rh-title small .mo { display: inline; }
  .run-head .timer { padding: 3px 11px 3px 4px; font-size: 16px; } .run-head .t-ring { width: 30px; height: 30px; }
  .run-head #rSubmit { height: 38px; padding: 0 13px; border-radius: 13px; }
  .rn-strip.mo { padding: 5px 0 3px; box-shadow: 0 8px 18px rgba(20,34,31,.05); }
  .rn-pills { padding: 2px 12px 5px; gap: 7px; } .rn-pills button { width: 36px; height: 36px; border-radius: 12px; font-size: 13.5px; }

  /* the body never scrolls: the question card takes the space between the strip and the dock and only scrolls itself if one question is very long */
  .run-body { display: flex; flex-direction: column; overflow: hidden; padding: 10px 12px calc(84px + env(safe-area-inset-bottom, 0px)); }
  .q-col { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .q-card { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; padding: 16px 16px 18px; border-radius: 24px; animation: none; }
  .q-card::-webkit-scrollbar { display: none; }
  .q-card.sl-r { animation: sl-r .26s cubic-bezier(.2,.8,.3,1) both; } .q-card.sl-l { animation: sl-l .26s cubic-bezier(.2,.8,.3,1) both; }
  .q-card::after { font-size: 76px; top: -2px; }
  .q-meta { margin-bottom: 10px; }
  .q-text { font-size: 16px; line-height: 1.45; }
  .q-hint { margin: 12px 0 6px; font-size: 11px; } .q-hint.h-one { display: none; } .q-card .q-text ~ .q-opts { margin-top: 12px; }
  .q-card { display: flex; flex-direction: column; }
  .q-card > * { flex: none; }
  .q-card > .q-opts { flex: 1 1 auto; max-height: 300px; grid-auto-rows: minmax(44px, 1fr); gap: 8px; }   /* spare height is shared between the options, so a short question looks full, not empty */
  .q-card > .q-opts .ro { height: 100%; }
  .ro { min-height: 44px; padding: 8px 11px; gap: 10px; border-radius: 14px; font-size: 14.5px; } .ro .k { width: 28px; height: 28px; border-radius: 10px; font-size: 12.5px; }
  .q-img { max-height: 28vh; width: auto; max-width: 100%; object-fit: contain; }
  .q-clearm.mo { margin-top: 12px; padding: 7px 13px; }

  .q-actions { left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding: 7px; gap: 7px; border-radius: 24px; }
  .q-actions .dk.mo, .q-actions #qPrev { width: 46px; height: 46px; border-radius: 15px; } .q-actions #qNext { height: 46px; border-radius: 15px; }
}
@media (max-height: 560px) and (max-width: 720px) { .q-clearm.mo { display: none; } }
@media (max-width: 720px) {
  /* size tiers, applied by fitCard() in student.js only when a question does not fit: tight -> compact -> mini */
  .q-card.tight { padding: 12px 14px 14px; } .q-card.tight::after { display: none; }
  .q-card.tight .q-meta { margin-bottom: 6px; } .q-card.tight .q-text { font-size: 15px; line-height: 1.4; }
  .q-card.tight .q-hint { margin: 8px 0 5px; } .q-card.tight .q-text ~ .q-opts { margin-top: 8px; }
  .q-card.tight > .q-opts { gap: 6px; grid-auto-rows: minmax(38px, auto); }
  .q-card.tight .ro { min-height: 38px; padding: 6px 10px; gap: 9px; border-radius: 13px; font-size: 14px; } .q-card.tight .ro .k { width: 26px; height: 26px; font-size: 12px; border-radius: 9px; }

  .q-card.compact { padding: 10px 12px 12px; } .q-card.compact::after { display: none; }
  .q-card.compact .q-meta { margin-bottom: 5px; } .q-card.compact .q-meta .q-tag { font-size: 10.5px; padding: 2px 8px; }
  .q-card.compact .q-text { font-size: 14px; line-height: 1.36; }
  .q-card.compact .q-hint { display: none; } .q-card.compact .q-text ~ .q-opts { margin-top: 7px; }
  .q-card.compact > .q-opts { gap: 5px; grid-auto-rows: minmax(32px, auto); }
  .q-card.compact .ro { min-height: 32px; padding: 5px 9px; gap: 8px; border-radius: 11px; font-size: 13px; } .q-card.compact .ro .k { width: 22px; height: 22px; font-size: 11px; border-radius: 7px; }
  .q-card.compact .ro .ck { width: 16px; height: 16px; }
  .q-card.compact .q-img { max-height: 18vh; }

  .q-card.mini { padding: 8px 10px 10px; } .q-card.mini::after { display: none; }
  .q-card.mini .q-meta { margin-bottom: 4px; } .q-card.mini .q-meta .q-tag { font-size: 10px; padding: 2px 7px; }
  .q-card.mini .q-text { font-size: 13px; line-height: 1.32; }
  .q-card.mini .q-hint { display: none; } .q-card.mini .q-text ~ .q-opts { margin-top: 5px; }
  .q-card.mini > .q-opts { gap: 4px; grid-auto-rows: minmax(26px, auto); }
  .q-card.mini .ro { min-height: 26px; padding: 4px 8px; gap: 7px; border-radius: 9px; font-size: 12.5px; } .q-card.mini .ro .k { width: 19px; height: 19px; font-size: 10px; border-radius: 6px; }
  .q-card.mini .ro .ck { display: none; }
  .q-card.mini .q-img { max-height: 14vh; }

  /* short options (up to about 32 characters) sit two to a row once the card is in a smaller size */
  .q-card.compact .q-opts.short, .q-card.mini .q-opts.short { grid-template-columns: 1fr 1fr; }
  .q-card.compact .q-opts.short .ro, .q-card.mini .q-opts.short .ro { min-width: 0; }
}

/* ===== organisation branding + candidate identity ===== */
.org-mono { --s: 36px; flex: none; width: var(--s); height: var(--s); display: inline-grid; place-items: center; border-radius: 30%; color: #fff; font-weight: 800; font-size: calc(var(--s) * .38); letter-spacing: -.02em; line-height: 1; background: linear-gradient(135deg, hsl(var(--h) 82% 56%), hsl(calc(var(--h) + 40) 80% 42%)); box-shadow: 0 4px 12px hsla(var(--h) 80% 30% / .35), inset 0 1px 0 rgba(255,255,255,.35); }
.sp-brand.org { gap: 10px; min-width: 0; }
.sp-brand .sp-bt { display: block; min-width: 0; line-height: 1.15; }
.sp-brand.org .sp-bt b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-brand .sp-bt small { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6b7a99); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idc-brand i { font-style: normal; font-weight: 800; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idc-brand { min-width: 0; }
.ag-org { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 10px 14px 10px 10px; border-radius: 18px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.ag-org[hidden] { display: none; }
.ag-org b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; } .ag-org small { display: block; margin-top: 2px; font-size: 12px; opacity: .75; }
.ag-org span:last-child { min-width: 0; }
.run-head::after { content: ; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(247,147,30,.28), transparent 65%); pointer-events: none; }
.run-head > * { position: relative; z-index: 1; }
@media (max-width: 720px) {
  .run-head { flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 0 12px 6px; min-height: 0; overflow: hidden; }
 .run-head .rh-title { display: none; }
 .rh-org.mo { display: flex; order: -3; flex: 0 0 calc(100% + 24px); align-items: center; gap: 7px; min-width: 0; margin: 0 -12px; padding: 5px 12px; background: rgba(255,255,255,.07); border-bottom: 1px solid rgba(255,255,255,.1); font-size: 10.5px; }
 .rh-org.mo > b { flex: none; max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #fff; }
 .rh-org.mo > em { flex: 1 1 0; min-width: 0; text-align: right; font-style: normal; font-weight: 600; font-size: 11.5px; color: rgba(255,255,255,.72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .rh-org.mo > img { width: 18px; height: 18px; border-radius: 6px; background: #fff; padding: 1px; flex: none; }
 .rh-org.mo .org-mono { box-shadow: none; }
  .rh-who.mo { display: flex; order: -1; flex: 1 1 0; min-width: 0; align-items: center; gap: 10px; padding-top: 0; }
 .rh-who .av { box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 4px 12px rgba(0,0,0,.25); flex: none; }
 .rh-who > span:last-child { min-width: 0; }
 .rh-who > span:last-child > b { display: block; font-size: 14.5px; line-height: 1.2; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .rh-who > span:last-child > small { display: block; margin-top: 1px; font-size: 11px; letter-spacing: .03em; color: rgba(255,255,255,.72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .run-head .timer { order: 1; padding: 3px 10px 3px 4px; gap: 6px; font-size: 15px; } .run-head .t-ring { width: 28px; height: 28px; }
  .run-head #rSubmit { order: 2; padding: 0 11px; gap: 5px; }
  .rh-who.mo { gap: 8px; }
}

/* ===== centre logo + contact card ===== */
.org-mono.has-logo { background: #fff; padding: 3px; box-shadow: 0 3px 10px rgba(10,50,46,.18), 0 0 0 1px rgba(10,50,46,.08); border-radius: 26%; }
.org-mono img { width: 100%; height: 100%; object-fit: contain; border-radius: 20%; display: block; }
.oc { margin-top: 18px; padding: 0; overflow: hidden; }
.oc-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: linear-gradient(120deg, #F3F7FF, #FFF6EC); border-bottom: 1px solid var(--line); }
.oc-head small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.oc-head h3 { font-size: 18px; letter-spacing: -.01em; margin: 2px 0 0; } .oc-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.oc-rows { list-style: none; margin: 0; padding: 6px 12px 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2px 14px; }
.oc-rows li { display: flex; align-items: center; gap: 12px; padding: 10px 8px; min-width: 0; }
.oc-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--blue-50, #EEF4FF); color: var(--navy-700, #15403B); } .oc-ic .i { width: 18px; height: 18px; }
.oc-rows li > span:last-child { min-width: 0; font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.oc-rows small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1px; }
.oc-rows a { color: var(--blue-600, #0F8C7A); text-decoration: none; } .oc-rows a:hover { text-decoration: underline; }

/* ===== colour theme for the student portal: warm sand background, deep teal for dark surfaces, coral for action =====
   Overrides the shared tokens (admin.css :root) only inside body.student, so the admin portal keeps its own colours. */
body.student {
  --navy-900: #0A1F1D; --navy-800: #123330; --navy-700: #15403B; --navy-600: #1F5A52;
  --blue-600: #0F8C7A; --blue-500: #14A08A; --blue-100: #D9F3EE; --blue-50: #EEFAF7;
  --ink: #1E1B18; --ink-2: #4A443C; --muted: #857C70; --line: #ECE6DC; --line-2: #F4EFE7; --bg: #FBF8F3;
  --grad-navy: linear-gradient(145deg, #0A1F1D 0%, #15403B 58%, #1F6B62 100%);
  --grad-accent: linear-gradient(135deg, #FFB13B 0%, #FF6B3D 100%);
}
body.student::before {
  background: radial-gradient(880px 520px at 100% -8%, rgba(255,140,66,.16), transparent 62%), radial-gradient(820px 560px at -8% 2%, rgba(20,160,138,.13), transparent 62%), radial-gradient(760px 520px at 60% 118%, rgba(255,177,59,.10), transparent 62%);
}
/* exam cards: live = warm and urgent, up next = calm teal */
.feat.soon { background: linear-gradient(135deg, #0A2A27 0%, #17574E 56%, #2E8C7B 100%); box-shadow: 0 26px 54px rgba(10,50,46,.28); }
.feat.live { background: linear-gradient(135deg, #3A1A0C 0%, #B83E1C 52%, #FF7A3D 100%); box-shadow: 0 26px 54px rgba(184,62,28,.3); }
/* ID card header: keep the centre name on one line and the label beside it */
.idc-top > span:last-child { white-space: nowrap; flex: none; margin-left: 10px; }
.idc-top .idc-brand { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.idc-top .idc-brand > span { flex: none; }
.idc-top .idc-brand > i { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== admit card ===== */
.ex-admit { align-self: flex-start; gap: 8px; }
.ex-admit.btn { height: 36px; padding: 0 14px; font-size: 13px; }
.ex-admit.btn .i { width: 16px; height: 16px; }
.ex-admit.wait { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ex-admit.wait .i { width: 16px; height: 16px; flex: none; }
.feat-admit { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.feat-admit:hover { background: rgba(255,255,255,.24); }
.feat-body .btn + .btn { margin-top: 0; }
.adm-box { display: flex; justify-content: center; align-items: center; min-height: 240px; background: var(--line-2); border-radius: 16px; padding: 14px; }
.adm-load { color: var(--muted); font-weight: 600; }
.adm-img { display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 30px rgba(20,34,31,.18); background: #fff; -webkit-touch-callout: default; }
@media (max-width: 560px) { .adm-box { padding: 8px; } }
.feat-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.feat-admit { margin-left: 0; }
@media (max-width: 560px) { .feat-cta .btn { flex: 1 1 100%; } }

/* phone exam dock: Clear my answer is an icon in the dock (always there, dimmed until an option is chosen), so the question card keeps the same size before and after answering */
.dk:disabled { opacity: .38; cursor: default; }
@media (max-width: 380px) {
  .q-actions { gap: 6px; padding: 6px; }
  .q-actions .dk.mo, .q-actions #qPrev { width: 42px; height: 42px; border-radius: 14px; } .q-actions #qNext { height: 42px; border-radius: 14px; font-size: 14px; }
}
