/* Edvance LMS design (Edvance Visual Brand Guideline): Edvance blue as the one accent, green/orange/red only for status.
   Light is the default; dark follows the device unless the viewer picks Light or Dark (html[data-theme]). */
@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-display: swap; src: url(/fonts/instrument-sans-latin.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url(/fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-display: swap; src: url(/fonts/space-grotesk-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url(/fonts/space-grotesk-latin-700-normal.woff2) format("woff2"); }
:root {
  color-scheme: light;
  --bg: #f3f5fb; --surface: #ffffff; --surface-2: #eef0f6; --border: #dde1ee; --text: #2d2d2d; --text-2: #5e6478;
  --accent: #2237c6; --accent-strong: #2237c6; --grad: linear-gradient(170deg, #2237c6, #182476);
  --ok: #1a6e2e; --warn: #9a4400; --bad: #b8000f;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 1px 3px rgb(0 0 0 / .03);
  --shadow-hover: 0 8px 24px rgb(0 0 0 / .08), 0 2px 6px rgb(0 0 0 / .04);
  --shadow-float: 0 24px 60px rgb(0 0 0 / .18), 0 4px 12px rgb(0 0 0 / .06);
  --dur: 200ms; --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --border: #38383a; --text: #f5f5f7; --text-2: #98989d;
    --accent: #8c9bff; --accent-strong: #2237c6; --ok: #30d158; --warn: #ff9f0a; --bad: #ff6961;
    --shadow: 0 1px 2px rgb(0 0 0 / .5); --shadow-hover: 0 8px 24px rgb(0 0 0 / .6); --shadow-float: 0 24px 60px rgb(0 0 0 / .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --border: #38383a; --text: #f5f5f7; --text-2: #98989d;
  --accent: #8c9bff; --accent-strong: #2237c6; --ok: #30d158; --warn: #ff9f0a; --bad: #ff6961;
  --shadow: 0 1px 2px rgb(0 0 0 / .5); --shadow-hover: 0 8px 24px rgb(0 0 0 / .6); --shadow-float: 0 24px 60px rgb(0 0 0 / .7);
}
:root {
  /* Names used across the older pages, mapped onto the tokens above. */
  --card: var(--surface); --line: var(--border); --muted: var(--text-2); --brand: var(--accent); --brand-ink: #ffffff;
  --soft: var(--surface-2); --tint: color-mix(in srgb, var(--accent) 10%, transparent);
  --ok-bg: color-mix(in srgb, var(--ok) 12%, var(--surface)); --warn-bg: color-mix(in srgb, var(--warn) 12%, var(--surface));
  --bad-bg: color-mix(in srgb, var(--bad) 10%, var(--surface)); --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .font-display { font-family: var(--display); letter-spacing: -.02em; }
header.top { background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
header.top h1 { font-size: 17px; margin: 0; flex: 1; }
main { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 0; box-shadow: inset 0 0 0 1px var(--border); border-radius: 12px; font: inherit; background: var(--surface); color: inherit; transition: box-shadow var(--dur) var(--ease); }
textarea { min-height: 120px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; }
button, .btn { display: inline-block; border: 0; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; background: var(--accent-strong); color: #fff; text-decoration: none;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease), transform 120ms var(--ease); }
button.secondary, .btn.secondary { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
button.danger { background: var(--bad); }
button.ok { background: var(--ok); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.small { padding: 5px 10px; font-size: 13px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 200px; }
.muted { color: var(--muted); }
.error { color: var(--bad); white-space: pre-line; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--bad-bg); color: var(--bad); }
.progress-box { margin: 12px 0; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 6px; }
.progress { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .4s ease; }
.notice { padding: 12px 14px; border-radius: 8px; margin: 12px 0; }
.notice.warn { background: var(--warn-bg); color: var(--warn); } .notice.bad { background: var(--bad-bg); color: var(--bad); } .notice.ok { background: var(--ok-bg); color: var(--ok); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.steps { list-style: none; padding: 0; margin: 12px 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.quiz-marks { margin: 4px 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); }
.quiz-marks ul { list-style: none; padding: 0; margin: 6px 0 0; }
.quiz-marks li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 3px 0; }
.quiz-marks p { margin: 6px 0 0; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.steps .n.done { background: var(--ok); color: #fff; }
.steps .grow { flex: 1; }
video, canvas.preview, img.preview { max-width: 100%; border-radius: 8px; background: #000; }
img.preview { background: none; border: 1px solid var(--line); }
/* Live camera with a guide: the MyKad frame with corner marks, or a dashed oval for the selfie. Same in both themes. */
.cam { position: relative; overflow: hidden; border-radius: 12px; background: #0f1a2b; line-height: 0; }
.cam video { display: block; width: 100%; border-radius: 0; }
.cam video.mirror { transform: scaleX(-1); }
.cam-guide { position: absolute; box-shadow: 0 0 0 100vmax rgb(8 15 28 / .55); border-radius: 14px; pointer-events: none; transition: all var(--dur) var(--ease); }
.cam-guide span { position: absolute; width: 18%; height: 24%; border: 4px solid #3ee0b4; }
.cam-guide span:nth-child(1) { top: -8px; left: -8px; border-right: 0; border-bottom: 0; border-top-left-radius: 16px; }
.cam-guide span:nth-child(2) { top: -8px; right: -8px; border-left: 0; border-bottom: 0; border-top-right-radius: 16px; }
.cam-guide span:nth-child(3) { bottom: -8px; left: -8px; border-right: 0; border-top: 0; border-bottom-left-radius: 16px; }
.cam-guide span:nth-child(4) { bottom: -8px; right: -8px; border-left: 0; border-top: 0; border-bottom-right-radius: 16px; }
.cam-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.cam-card.turned { transform: translate(-50%, -50%) rotate(90deg); }
/* Positions as on a MyKad: IC number top left, name lower left, photo on the right. */
.cam-card b { position: absolute; border: 2px dashed #3ee0b4; border-radius: 6px; background: rgb(62 224 180 / .10); }
.cam-card b::after { content: attr(data-l); position: absolute; left: -2px; bottom: 100%; margin-bottom: 3px; padding: 3px 7px; border-radius: 5px;
  background: #3ee0b4; color: #0b1d2b; font: 700 clamp(10px, 1.6vw, 13px)/1 var(--font); white-space: nowrap; }
.cam-card .g-ic { left: 5%; top: 17%; width: 40%; height: 13%; }
.cam-card .g-name { left: 5%; top: 60%; width: 55%; height: 12%; }
.cam-card .g-face { left: 64%; top: 24%; width: 30%; height: 62%; }
/* Mirrored live view (laptop webcam): the MyKad shows reversed, so the guide is reversed too; its labels stay readable. */
.cam.mirrored .cam-card { transform: translate(-50%, -50%) scaleX(-1); }
.cam.mirrored .cam-card.turned { transform: translate(-50%, -50%) scaleX(-1) rotate(90deg); }
.cam.mirrored .cam-card b::after { transform: scaleX(-1); }
.cam[data-kind="selfie"] .cam-card { display: none; }
.cam[data-kind="selfie"] .cam-guide { border-radius: 50%; border: 4px dashed #3ee0b4; }
.cam[data-kind="selfie"] .cam-guide span { display: none; }
.cam-hint { position: relative; margin: 0; padding: 12px 14px; line-height: 1.4; font-size: 14px; text-align: center; color: #c9f7ea; background: #0f1a2b; }
.cam-box { position: relative; overflow: hidden; }
.hidden { display: none !important; }
.overlay { position: fixed; inset: 0; background: rgba(17,24,39,.85); color: #fff; display: grid; place-items: center; z-index: 50; padding: 20px; text-align: center; }
.overlay .box { max-width: 520px; }
.toast { position: fixed; right: 16px; bottom: 16px; background: var(--bad); color: #fff; padding: 12px 16px; border-radius: 8px; z-index: 60; max-width: 360px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--text-2); border-radius: 8px; box-shadow: none; }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }
.grid-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.grid-imgs figure { margin: 0; } .grid-imgs img { width: 100%; border: 1px solid var(--line); border-radius: 6px; cursor: zoom-in; } .grid-imgs figcaption { font-size: 12px; color: var(--muted); }
pre { white-space: pre-wrap; }
@media (max-width: 600px) { main { margin: 12px auto; } .card { padding: 14px; } }
/* assessments */
.badge.type-quiz { background: var(--tint); color: var(--accent); } .badge.type-midterm { background: var(--warn-bg); color: var(--warn); } .badge.type-final { background: var(--bad-bg); color: var(--bad); } .badge.type-assignment { background: var(--ok-bg); color: var(--ok); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 14px 0; }
.facts > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.facts b { display: block; font-size: 14px; } .facts span { font-size: 12px; color: var(--muted); }
table.sections td { padding: 6px 8px; }
details summary { cursor: pointer; font-weight: 600; margin: 8px 0; }
.notice.blocked b { display: block; margin-bottom: 4px; }
.stimulus { background: var(--surface-2); border-left: 4px solid var(--brand); padding: 12px 14px; border-radius: 6px; white-space: pre-line; margin: 0 0 14px; }
.part { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.part .ph { display: flex; gap: 8px; align-items: baseline; } .part .ph .lbl { font-weight: 700; } .part .ph .mk { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.part textarea { min-height: 160px; }
.picwrap { margin-top: 8px; }
.pics { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 6px; }
.pic { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pic img { width: 140px; height: 105px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.section-banner { background: var(--tint); color: var(--accent); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.section-banner b { display: block; }
.scheme { font-size: 13px; background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); border-radius: 6px; padding: 8px 10px; margin-top: 6px; white-space: pre-line; }
.counted-no { opacity: .6; }
/* ---------- portal (YPR brand: navy, red, gold; classic university typography) ---------- */
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/cormorant-garamond-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url(/fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format("woff2"); }

body.portal {
  --navy: var(--accent); --navy-deep: #0b1d39; --red: var(--bad); --gold: #7cc4ff; --gold-soft: #9fd3ff;
  --stone: var(--bg); --ink: var(--text); --rule: var(--border);
  --serif: var(--display);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink);
  background: var(--stone); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
}
.portal .wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; width: 100%; }
.portal h1, .portal h2, .portal h3, .date-tile .d, .how-steps b, .hero-points b { font-variant-numeric: lining-nums; }
.portal h1, .portal h2, .portal h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.portal .small-text { font-size: 13px; }
.eyebrow { margin: 0 0 6px; font: 600 11.5px/1.2 Inter, system-ui, sans-serif; letter-spacing: 2.2px; text-transform: uppercase; color: var(--gold); }
.eyebrow.dark { color: var(--accent); }

/* utility + brand bars */
.utility { background: var(--navy-deep); color: #c7cde6; font-size: 12.5px; }
.utility .wrap { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: 16px; }
.utility nav { display: flex; gap: 22px; } .utility a { color: #c7cde6; text-decoration: none; } .utility a:hover { color: #fff; }
.brandbar { background: var(--surface); border-bottom: 1px solid var(--rule); position: relative; }
.brandbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: linear-gradient(90deg, var(--navy) 0 70%, var(--red) 70% 90%, var(--gold) 90%); z-index: 2; }
.brandbar .wrap { display: flex; align-items: center; gap: 22px; padding-top: 14px; padding-bottom: 14px; }
.brandbar .brand img { display: block; height: 54px; width: auto; }
.brand-title { flex: 1; border-left: 1px solid var(--rule); padding-left: 22px; display: flex; flex-direction: column; line-height: 1.15; }
.brand-title b { font-family: var(--serif); font-size: 25px; font-weight: 600; color: var(--navy); }
.brand-title span { font-size: 11.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text-2); margin-top: 4px; }
.brand-user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); flex: 0 0 auto; }
/* The title stays on one line; when the name, server time and buttons do not fit beside it they move to their
   own row, right-aligned. */
.brandbar .wrap { flex-wrap: wrap; row-gap: 10px; }
.brand-title b { white-space: nowrap; }
.brand-user { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
@media (max-width: 860px) { .brand-user #who b { max-width: 200px; } }
.brand-user button { white-space: nowrap; flex: 0 0 auto; }
.brand-user #who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; min-width: 0; text-align: right; }
.brand-user #who b { font-weight: 600; color: var(--text); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-user #who small { font-size: 12px; }
.brand-user #who:empty { display: none; }
.srvtime { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; padding-right: 14px; border-right: 1px solid var(--rule); }
.srvtime small { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-2); }
.srvtime b { font-size: 14px; color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* hero */
.hero { position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(201,162,39,.16), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, #0c1540 0%, #14215b 55%, #1d2f7a 100%); }
.hero .hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.hero h1 { color: #fff; font-size: 58px; line-height: 1.02; margin: 6px 0 0; font-weight: 600; }
.hero h1 em { display: block; font-style: italic; font-weight: 500; color: var(--gold-soft); }
.hero-rule { display: block; width: 72px; height: 2px; background: var(--gold); margin: 26px 0 22px; }
.hero .lede { font-size: 17px; line-height: 1.65; color: #d6dbf0; max-width: 560px; margin: 0; }
.hero-points { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 0; }
.hero-points li { padding: 0 26px; border-left: 1px solid rgba(255,255,255,.18); display: flex; flex-direction: column; }
.hero-points li:first-child { padding-left: 0; border-left: 0; }
.hero-points b { font-family: var(--serif); font-size: 22px; font-weight: 600; color: #fff; } .hero-points span { font-size: 13px; color: #aeb6d8; }

/* sign-in card */
.login-card { background: var(--surface); color: var(--ink); border-radius: 4px; padding: 30px 30px 24px; box-shadow: 0 30px 60px -20px rgba(6,10,40,.55), 0 0 0 1px rgba(255,255,255,.06); border-top: 4px solid var(--gold); }
.login-card h2 { font-size: 34px; margin: 0 0 2px; }
.login-card label { font-size: 13px; font-weight: 600; color: var(--text); margin: 16px 0 6px; }
.portal input { border: 1px solid var(--border); border-radius: 3px; padding: 11px 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.portal input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20,33,91,.12); background: var(--surface); }
button.block { width: 100%; padding: 13px 16px; margin-top: 4px; font-size: 15px; }
.login-card .fine { font-size: 12px; color: var(--text-2); border-top: 1px solid var(--rule); margin: 20px 0 0; padding-top: 14px; line-height: 1.55; }

/* main */
.portal-main { max-width: 1160px; width: 100%; margin: 0 auto; padding: 56px 24px 64px; flex: 1; }
.landing { display: flex; flex-direction: column; gap: 56px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--navy); padding-bottom: 12px; margin-bottom: 8px; }
.section-head h2 { font-size: 38px; margin: 0; line-height: 1; }
.portal .card { border-radius: 12px; border-color: var(--border); }

.assess-list { list-style: none; margin: 0; padding: 0; }
.assess-list li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 26px; align-items: center; padding: 22px 6px; border-bottom: 1px solid var(--rule); transition: background .15s; }
.assess-list li:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.date-tile { width: 92px; text-align: center; background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--red); border-radius: 2px; padding: 8px 0 10px; display: flex; flex-direction: column; }
.date-tile.none { border-top-color: var(--border); }
.date-tile .m { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--red); }
.date-tile .d { font-family: var(--serif); font-size: 42px; font-weight: 600; line-height: 1; color: var(--navy); margin: 2px 0; }
.date-tile .y { font-size: 11.5px; color: var(--text-2); }
.al-main { min-width: 0; }
.al-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.al-main h3 { font-size: 26px; margin: 8px 0 2px; line-height: 1.15; }
.al-main p { margin: 2px 0 0; }
.al-close { font-size: 14px; color: var(--ink); font-weight: 500; margin-top: 8px !important; }
.portal .badge { border-radius: 2px; text-transform: uppercase; letter-spacing: 1px; font-size: 10.5px; padding: 3px 8px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.urgent { background: var(--bad-bg); color: var(--bad); }
.chip.soon { background: var(--tint); color: var(--accent); } .chip.closed { background: var(--surface-2); color: var(--text-2); }
.fact-close { border-color: color-mix(in srgb, var(--bad) 30%, transparent) !important; background: var(--bad-bg) !important; }

.how-steps { margin: 18px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.how-steps li { padding: 8px 24px 4px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.how-steps li:first-child { border-left: 0; padding-left: 0; }
.how-steps .num { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--gold); font-weight: 600; }
.how-steps b { font-family: var(--serif); font-size: 22px; color: var(--navy); font-weight: 600; line-height: 1.15; }
.how-steps li > span:last-child { color: var(--text-2); font-size: 14px; line-height: 1.55; }

.help-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--navy); padding: 22px 26px; }
.help-strip h3 { font-size: 26px; margin: 0 0 4px; } .help-strip p { margin: 0; color: var(--text-2); font-size: 14px; }

.portal-foot { background: var(--surface); border-top: 1px solid var(--rule); font-size: 13px; color: var(--text-2); }
.portal-foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.foot-brand { display: flex; align-items: center; gap: 14px; } .foot-brand img { height: 36px; width: auto; }
.foot-brand span { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; border-left: 1px solid var(--rule); padding-left: 14px; }
.foot-meta { display: flex; gap: 22px; flex-wrap: wrap; } .portal-foot a { color: var(--navy); }

/* signed-in dashboard keeps the same look */
.portal #dash .card h2, .portal #dash .card h3 { font-family: var(--serif); }
.portal #dash .card h2 { font-size: 28px; } .portal #dash .card h3 { font-size: 22px; }
.portal .cover h2 { font-size: 30px; }

@media (max-width: 960px) {
  .hero .hero-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; padding-bottom: 48px; }
  .hero h1 { font-size: 42px; }
  .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .how-steps li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  .portal .wrap { padding-left: 16px; padding-right: 16px; }
  .utility span { display: none; } .utility .wrap { justify-content: center; }
  .brandbar .wrap { gap: 14px; } .brandbar .brand img { height: 40px; }
  .brand-title { padding-left: 14px; flex: 1 1 0; } .brand-title b { font-size: 19px; white-space: normal; } .brand-title span { display: none; }
  .brandbar .wrap { flex-wrap: wrap; row-gap: 8px; }
  .brand-user .srvtime { order: 5; flex: 1 1 100%; flex-direction: row; justify-content: flex-end; gap: 8px; align-items: baseline; border-right: 0; border-top: 1px solid var(--rule); padding: 6px 0 0; }
  .brand-user { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
  .srvtime b { font-size: 13px; }
  .hero h1 { font-size: 36px; } .hero .lede { font-size: 15.5px; }
  .hero-points li { padding: 0 14px; } .hero-points b { font-size: 18px; } .hero-points span { font-size: 12px; }
  .login-card { padding: 24px 20px 20px; }
  .portal-main { padding: 36px 16px 48px; } .landing { gap: 40px; }
  .section-head h2 { font-size: 30px; }
  .assess-list li { grid-template-columns: 70px minmax(0, 1fr); gap: 16px; }
  .date-tile { width: 70px; } .date-tile .d { font-size: 32px; }
  .al-main h3 { font-size: 21px; }
  .how-steps { grid-template-columns: 1fr; } .how-steps li { border-left: 0; padding-left: 0; }
  .help-strip { flex-direction: column; align-items: flex-start; }
}

/* Student dashboard: slim extension bar, assessment tabs and the install popup. */
.ext-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--rule, var(--line)); border-left: 4px solid var(--ok); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.ext-bar.bad { border-left-color: var(--red, #c8202a); }
.ext-bar .grow { flex: 1; min-width: 200px; }
.exam-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--navy, #14215b); margin: 4px 0 16px; overflow-x: auto; }
#examTabs button.exam-tab { background: transparent; color: var(--muted); border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 16px; font-weight: 600; white-space: nowrap; }
#examTabs button.exam-tab:hover { background: transparent; color: var(--navy); }
#examTabs button.exam-tab.active { color: var(--navy); border-bottom-color: var(--navy); }
.exam-tab .count { display: inline-block; min-width: 22px; margin-left: 8px; padding: 1px 7px; border-radius: 99px; background: var(--tint); color: var(--accent); font-size: 12px; }
.ext-dialog { background: var(--surface); color: var(--text); width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: var(--radius); padding: 22px 24px; box-shadow: 0 20px 60px rgba(12,21,64,.3); }
.ext-dialog::backdrop { background: rgba(12,21,64,.45); }
.ext-dialog .dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ext-dialog .dlg-head h3 { margin: 0 0 8px; font-size: 22px; }
.portal .ext-dialog .dlg-x { padding: 2px 10px; font-size: 20px; line-height: 1; }
.ext-dialog ol li { margin: 4px 0; }
.ext-dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* PDPA terms with an I Agree button (IC verification) */
.terms { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-top: 20px; background: var(--surface-2); }
.terms h3 { margin: 0 0 8px; font-size: 16px; }
.terms ol { margin: 0 0 10px; padding-left: 20px; }
.terms li { margin: 6px 0; }
.terms li .muted, .bil .muted { font-size: 13px; }
.terms details { margin: 8px 0; font-size: 14px; }
.agree-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.agree-row button { flex: 0 0 auto; }
.bil p { margin: 4px 0; }

/* Loading screens (loader.js): the page overlay while a page first loads, and the pill while data loads */
.ypr-loader { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(10px) saturate(.9); backdrop-filter: blur(10px) saturate(.9); transition: opacity .3s ease; }
.ypr-loader.yl-out { opacity: 0; pointer-events: none; }
.yl-logo { width: 220px; max-width: 70vw; height: auto; margin-bottom: 22px; }
.yl-title { font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--text); }
.yl-sub { font-size: 13.5px; color: var(--text-2); margin-bottom: 18px; }
.yl-bar, .yp-bar { display: block; width: min(320px, 76vw); height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.yl-bar i, .yp-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #1b2669, #5a62b0); transition: width .12s linear; }
.yl-pct { margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
html.ypr-loading body { overflow: hidden; }
.ypr-pill { position: fixed; top: 10px; left: 50%; z-index: 9998; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 8px 16px 8px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 28px rgb(0 0 0 / .12); font-size: 13.5px; font-weight: 600; color: var(--text);
  opacity: 0; transform: translate(-50%, -8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.ypr-pill.on { opacity: 1; transform: translate(-50%, 0); }
.yp-spin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--text) 18%, transparent); border-top-color: #3a4290; animation: pl-spin .7s linear infinite; }
.yp-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.ypr-pill .yp-bar { width: 72px; flex: none; }
.yp-pct { min-width: 38px; text-align: right; color: #3a4290; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .yl-logo { background: #fff; border-radius: 14px; padding: 10px 14px; }
:root[data-theme="dark"] .yl-bar i, :root[data-theme="dark"] .yp-bar i { background: linear-gradient(90deg, #5a62b0, #9aa2f0); }
:root[data-theme="dark"] .yp-pct { color: #9aa2f0; } :root[data-theme="dark"] .yp-spin { border-top-color: #9aa2f0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .yl-logo { background: #fff; border-radius: 14px; padding: 10px 14px; }
  :root:not([data-theme="light"]) .yl-bar i, :root:not([data-theme="light"]) .yp-bar i { background: linear-gradient(90deg, #5a62b0, #9aa2f0); }
  :root:not([data-theme="light"]) .yp-pct { color: #9aa2f0; } :root:not([data-theme="light"]) .yp-spin { border-top-color: #9aa2f0; }
}
@media print { .ypr-loader, .ypr-pill { display: none !important; } }
.dot-spin { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; vertical-align: -1px; animation: pl-spin .7s linear infinite; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .yp-spin, .dot-spin { animation-duration: 2.5s; } }

/* Tables inside question text and marking schemes (imported from Word as "cell | cell" lines). */
.rich .rt-text { white-space: pre-wrap; }
.rich .rt-table { overflow-x: auto; margin: 8px 0; }
.rich table { width: auto; min-width: 50%; font-size: 14px; background: var(--surface); }
.rich th, .rich td { border: 1px solid var(--border); padding: 5px 10px; text-align: left; white-space: normal; vertical-align: top; }
.rich th { background: var(--surface-2); font-weight: 600; color: var(--text); font-size: 14px; text-transform: none; letter-spacing: 0; }
.rich td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Dashboard tab */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.dash-range { border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--card); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.dash-grid .card { margin-bottom: 0; }
.dash-grid.now { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.dash-now { color: inherit; text-decoration: none; padding: 14px 16px; }
.dash-now .dash-num { font-size: 26px; }
.dash-num { font-size: 28px; font-weight: 700; }
.dash-num.warn { color: var(--warn); }
.dash-title { font-weight: 600; color: var(--muted); }
.dash-value { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dash-change { font-size: 13px; font-weight: 600; }
.dash-sub, .dash-hint { font-size: 13px; }
.dash-bars { display: flex; align-items: flex-end; gap: 3px; margin: 12px 0 6px; }
.dash-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.dash-bar > div { width: 100%; border-radius: 3px 3px 0 0; }
.dash-axis { display: flex; gap: 3px; font-size: 11px; color: var(--muted); }
.dash-axis span { flex: 1; min-width: 2px; white-space: nowrap; overflow: visible; }
.dash-head select { width: auto; max-width: 100%; }


/* =====================================================================================================
   Edvance LMS design (design-concept.md): components, layout and motion for every page.
   ===================================================================================================== */
a { color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.muted { color: var(--text-2); }
th { color: var(--text-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
th, td { border-bottom-color: var(--border); }
tbody tr { transition: background var(--dur) var(--ease); }
tbody tr:hover > td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.num, .dash-num, .stat-num, .facts b { font-variant-numeric: tabular-nums; }
:where(a, button, summary, label[for], select, [role="button"], input[type="checkbox"], input[type="radio"]) { cursor: pointer; }

/* Buttons: primary solid blue (gradient and glow on hover), secondary white with a grey line, ghost text only. */
button:not(:disabled):hover, .btn:hover { filter: none; }
button:not(.secondary):not(.danger):not(.ok):not(.ghost):not(:disabled):hover, .btn:not(.secondary):not(.ghost):not(.danger):not(.ok):hover {
  background: var(--grad); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent-strong) 35%, transparent); }
button.secondary:not(:disabled):hover, .btn.secondary:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); background: var(--surface); }
.btn.ghost, button.ghost { background: transparent; color: var(--accent); box-shadow: none; border: 0; }
.btn.ghost:hover, button.ghost:not(:disabled):hover { background: var(--tint); color: var(--accent); box-shadow: none; }
button.danger, .btn.danger { background: var(--bad); color: #fff; }
button.ok, .btn.ok { background: var(--ok); color: #fff; }
:root[data-theme="dark"] button.danger, :root[data-theme="dark"] button.ok { color: #000; }
button:not(:disabled):active, .btn:active { transform: scale(.97); }
button.small, .btn.small { padding: 5px 10px; font-size: 13px; }
button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 8px; background: transparent; color: var(--text-2); box-shadow: none; }
.icon-btn:not(:disabled):hover { background: var(--tint) !important; color: var(--accent) !important; box-shadow: none !important; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Inputs: thin grey ring, pale blue ring on hover, 2px blue ring and soft halo on focus. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover, select:hover, textarea:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, var(--border)); }
input:focus, select:focus, textarea:focus, .portal input:focus { outline: none; border-color: transparent; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-strong); box-shadow: none; }
.portal input { border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--border); }

/* Cards */
.card-hover:hover, a.card:hover, .dash-now:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); text-decoration: none; }
.notice { border-radius: 12px; }
.badge { border-radius: 99px; padding: 2px 8px; font-size: 12px; line-height: 1.4; display: inline-flex; align-items: center; justify-content: center; }
.badge.ok, .badge.warn, .badge.bad, .badge.info { background: var(--surface); box-shadow: inset 0 0 0 1px currentColor; }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.bad { color: var(--bad); } .badge.info { color: var(--accent); }
.chip, .portal .badge { border-radius: 99px; letter-spacing: 0; text-transform: none; font-size: 12px; }
.overlay { background: rgb(0 0 0 / .78); }

/* Tabs and segmented controls: a pale grey well; the chosen tab is white. */
.tabs:not(.side-nav), .etabs, .dash-range { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--surface-2); border: 0; border-radius: 10px; }
.tabs:not(.side-nav) button, .etabs button, .dash-range button { background: transparent; color: var(--text-2); box-shadow: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.tabs:not(.side-nav) button:not(:disabled):hover, .etabs button:not(:disabled):hover { background: color-mix(in srgb, var(--text) 5%, transparent) !important; color: var(--text); box-shadow: none !important; }
.tabs:not(.side-nav) button.active, .etabs button.on, .dash-range button.active { background: var(--surface) !important; color: var(--text) !important; box-shadow: 0 1px 3px rgb(0 0 0 / .12) !important; animation: tab-on 220ms var(--ease); }
.etabs .n { color: var(--text-2); } .etabs button.on .n { color: var(--accent); }

/* Menus (⋯ and the like) */
.popmenu { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 12px !important; box-shadow: var(--shadow-float) !important; animation: pop-in 160ms var(--ease); transform-origin: top right; }
.popmenu button { color: var(--text) !important; }
.popmenu button:not(:disabled):hover { background: color-mix(in srgb, var(--text) 5%, transparent) !important; box-shadow: none !important; }
.popmenu button.bad { color: var(--bad) !important; }
.popmenu button small, .popmenu .muted { color: var(--text-2); }

/* In-page dialogs */
.dlg-back, .ext-dialog::backdrop { background: rgb(0 0 0 / .4) !important; animation: fade-in 120ms var(--ease) !important; }
.dlg, .ext-dialog { background: var(--surface) !important; color: var(--text) !important; border-radius: 16px !important; box-shadow: var(--shadow-float) !important; animation: dialog-in 180ms var(--ease) !important; }
.dlg h3 { font-family: var(--display) !important; }
.dlg .dlg-body { color: var(--text-2) !important; } .dlg label { color: var(--text) !important; }
.dlg input { background: var(--surface) !important; color: var(--text) !important; border: 0 !important; box-shadow: inset 0 0 0 1px var(--border); border-radius: 12px !important; }
.dlg input:focus { outline: none !important; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.dlg .dlg-actions button { background: var(--accent-strong) !important; border-radius: 8px !important; }
.dlg .dlg-actions button.dlg-cancel { background: var(--surface) !important; color: var(--text) !important; box-shadow: inset 0 0 0 1px var(--border) !important; }
.dlg .dlg-actions button.dlg-danger { background: var(--bad) !important; }
.dlg .dlg-err { color: var(--bad) !important; }
.toast { background: var(--text); color: var(--bg); border-radius: 12px; box-shadow: var(--shadow-float); animation: fade-in 120ms var(--ease); }

/* Number cards: a coloured 32px icon square, small grey label, big Space Grotesk number. */
.stat-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #fff; flex: none; background: var(--c, #007aff);
  transition: transform var(--dur) var(--ease); }
.stat-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat-head { display: flex; align-items: center; gap: 10px; }
.stat-head .lbl { font-size: 12px; font-weight: 600; color: var(--text-2); line-height: 1.3; }
.dash-num, .stat-num { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.1; letter-spacing: -.02em; }
.dash-now { display: flex; flex-direction: column; gap: 12px; }
.card:hover .stat-icon { transform: translateY(-2px) scale(1.08) rotate(-6deg); }

/* Greeting banner on the staff dashboard */
.hero-banner { position: relative; overflow: hidden; border-radius: 24px; padding: 26px 28px; margin-bottom: 20px; color: #fff;
  background: radial-gradient(420px 220px at 92% -20%, rgb(90 200 250 / .35), transparent 70%), radial-gradient(360px 200px at 70% 130%, rgb(52 199 89 / .22), transparent 70%),
    linear-gradient(135deg, #0b1d39, #0a3f86 55%, #0066cc); }
.hero-banner::after { content: ""; position: absolute; width: 140px; height: 140px; right: 8%; bottom: -60px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 30%, #fff 0, #9fd3ff 20%, #0a84ff 60%, #003a80 100%); opacity: .55; }
.hero-banner h2 { color: #fff; font-size: 26px; margin: 0; position: relative; z-index: 1; }
.hero-banner p { margin: 6px 0 0; color: rgb(255 255 255 / .82); position: relative; z-index: 1; }

/* ---------- Staff panel: floating white sidebar on the left, white top bar ---------- */
:root { --side-w: 256px; }
.side { position: fixed; top: 12px; bottom: 12px; left: 12px; width: calc(var(--side-w) - 24px); z-index: 40; display: flex; flex-direction: column; gap: 10px; padding: 14px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); color: var(--text); overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; border-bottom: 1px solid var(--border); }
.side-brand img { width: 32px; height: 32px; flex: none; }
.side-brand b { display: block; font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.side-brand small { display: block; font-size: 12px; color: var(--text-2); }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-group > summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 10px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--text-2); text-transform: uppercase; border-radius: 6px; user-select: none; }
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); margin-left: auto; margin-right: 4px; transition: transform var(--dur) var(--ease); }
.side-group[open] > summary::after { transform: rotate(45deg); }
.side-group > summary:hover { color: var(--text); }
.side-group .cnt { font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-radius: 99px; padding: 0 6px; letter-spacing: 0; line-height: 16px; }
.side-group[open] > div { animation: open-in 180ms var(--ease); }
.side-nav button, .side-nav .side-link { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text); background: transparent; font-weight: 500; font-size: 14px; box-shadow: none; }
.side-nav button svg, .side-nav .side-link svg, .menu-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-nav button svg, .side-nav .side-link svg { color: var(--text-2); }
.side-nav button .lbl, .side-nav .side-link .lbl { flex: 1; min-width: 0; }
.side-nav .side-link { text-decoration: none; align-items: flex-start; }
.side-nav .side-link svg { margin-top: 1px; }
.side-nav .side-link small { display: block; font-size: 12px; font-weight: 400; line-height: 1.35; color: var(--text-2); margin-top: 2px; }
.side-nav button:not(:disabled):hover, .side-nav .side-link:hover { background: color-mix(in srgb, var(--text) 5%, transparent) !important; box-shadow: none !important; }
.side-nav button.active { background: var(--tint) !important; color: var(--accent); font-weight: 600; }
.side-nav button.active svg { color: var(--accent); }
.side-nav .badge.warn { background: var(--warn); color: #fff; box-shadow: none; min-width: 20px; height: 20px; padding: 0 6px; line-height: 1; }
.side-foot { border-top: 1px solid var(--border); padding: 12px 8px 2px; display: flex; flex-direction: column; gap: 8px; }
.side-foot #logout { width: 100%; }
.side-shade { display: none; }
.menu-btn { background: transparent; color: var(--text); padding: 7px; border-radius: 8px; line-height: 0; box-shadow: none; }
.menu-btn:not(:disabled):hover { background: var(--tint) !important; color: var(--accent); box-shadow: none !important; }
header.top { gap: 12px; }
header.top h1 { font-size: 17px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-tools { display: flex; align-items: center; gap: 10px; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.who-name { font-size: 14px; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live { position: relative; }
.live > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 8px; border-radius: 999px; background: var(--bad-bg); color: var(--text); font-size: 13px; cursor: pointer; white-space: nowrap; user-select: none; }
.live > summary::-webkit-details-marker { display: none; }
.live > summary b { font-weight: 700; color: var(--bad); }
/* Red "on air" icon: the dot and the two waves blink in turn. */
.live-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--bad); stroke-width: 2.4; stroke-linecap: round; }
.live-icon .c { fill: var(--bad); stroke: none; }
.live-icon .c, .live-icon .w1, .live-icon .w2 { animation: live-blink 1.4s ease-in-out infinite; }
.live-icon .w1 { animation-delay: .2s; }
.live-icon .w2 { animation-delay: .4s; }
@keyframes live-blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .live-icon .c, .live-icon .w1, .live-icon .w2 { animation: none; } }
.live-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 270px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-float); padding: 12px 14px; font-size: 13.5px; }
.live-head { font-weight: 700; margin-bottom: 8px; }
.live-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.live-names { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.live-foot { color: var(--text-2); font-size: 12px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
.theme-pick { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 10px; }
.theme-pick button { background: transparent; color: var(--text-2); padding: 4px 10px; font-size: 12.5px; border-radius: 8px; box-shadow: none; }
.theme-pick button:not(:disabled):hover { background: transparent !important; color: var(--text); box-shadow: none !important; }
.theme-pick button.on { background: var(--surface) !important; color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .12) !important; }
body.has-side main { max-width: 1160px; }
@media (min-width: 901px) {
  body.has-side { padding-left: var(--side-w); }
  body.has-side header.top { position: sticky; top: 0; z-index: 30; margin: 0; }
  body.has-side .menu-btn { display: none; }
}
@media (max-width: 900px) {
  header.top { position: sticky; top: 0; z-index: 30; padding: 10px 12px; }
  .side { top: 0; bottom: 0; left: 0; border-radius: 0 16px 16px 0; transform: translateX(-16px); opacity: 0; visibility: hidden;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), visibility var(--dur); }
  body.side-open .side { transform: none; opacity: 1; visibility: visible; box-shadow: var(--shadow-float); }
  body.side-open .side-shade { display: block; position: fixed; inset: 0; z-index: 35; background: rgb(0 0 0 / .35); animation: fade-in 120ms var(--ease); }
  .who-name { display: none; }
}
@media (max-width: 520px) { .theme-pick button { padding: 4px 7px; } .live-lbl { display: none; } .live > summary { padding: 5px 9px; } }

/* ---------- Student portal, exam and IC verification pages ---------- */
body.portal { background: var(--bg); font-family: var(--font); }
.portal h1, .portal h2, .portal h3 { font-family: var(--display); letter-spacing: -.02em; color: var(--text); }
.utility { background: #0b1d39; color: #c9d6ea; } .utility a { color: #c9d6ea; } .utility a:hover { color: #fff; }
.brandbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.brandbar::after { display: none; }
.brand-title { border-left-color: var(--border); }
.brand-title b { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; color: var(--text); font-size: 22px; }
.srvtime { border-right-color: var(--border); } .srvtime b { color: var(--text); }
.hero { background: radial-gradient(420px 240px at 100% 0%, rgb(90 200 250 / .3), transparent 70%), radial-gradient(520px 280px at 70% 120%, rgb(52 199 89 / .18), transparent 70%),
    linear-gradient(135deg, #0b1d39, #0a3f86 55%, #0066cc); }
.hero::after { content: ""; position: absolute; width: 150px; height: 150px; left: 52%; bottom: -55px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 30%, #fff 0, #9fd3ff 18%, #0a84ff 55%, #003a80 100%); box-shadow: 0 0 60px rgb(10 132 255 / .45); opacity: .6; }
.hero h1 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; } .hero h1 em { font-style: normal; font-weight: 600; color: #9fd3ff; }
.hero .lede, .hero-points span { color: rgb(255 255 255 / .8); }
.hero-rule { background: linear-gradient(90deg, #9fd3ff, #34c759); border-radius: 2px; }
.hero-points b { font-family: var(--display); font-weight: 700; }
.eyebrow { color: #9fd3ff; } .eyebrow.dark { color: var(--accent); }
.login-card { border-radius: 16px; border-top: 0; box-shadow: var(--shadow-float); }
.login-card h2 { font-size: 28px; }
.section-head { border-bottom-color: var(--border); } .section-head h2 { font-size: 30px; }
.date-tile { border-radius: 12px; border: 1px solid var(--border); border-top: 1px solid var(--border); box-shadow: inset 0 3px 0 var(--accent); }
.date-tile.none { box-shadow: inset 0 3px 0 var(--border); }
.date-tile .m { color: var(--accent); } .date-tile .d { font-family: var(--display); color: var(--text); font-weight: 700; font-size: 36px; }
.how-steps li { border-left-color: var(--border); }
.how-steps .num { font-family: var(--display); font-size: 36px; font-weight: 700; color: var(--accent); }
.how-steps b { font-family: var(--display); color: var(--text); font-size: 18px; font-weight: 700; }
.help-strip { border-radius: 12px; border: 1px solid var(--border); border-left: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--accent); }
.ext-bar { border-radius: 12px; }
.exam-tabs { border-bottom-color: var(--border); }
#examTabs button.exam-tab { box-shadow: none; }
#examTabs button.exam-tab:hover { background: transparent !important; color: var(--text); box-shadow: none !important; }
#examTabs button.exam-tab.active { color: var(--accent); border-bottom-color: var(--accent); animation: tab-on 220ms var(--ease); }
.facts > div { background: var(--surface-2); border-color: transparent; border-radius: 12px; }
.portal #dash .card h2 { font-size: 24px; } .portal #dash .card h3 { font-size: 19px; } .portal .cover h2 { font-size: 26px; }
.portal-foot { background: var(--surface); border-top-color: var(--border); } .portal-foot a { color: var(--accent); }
.foot-brand span { border-left-color: var(--border); }
.terms { border-radius: 12px; }
.brand img, .foot-brand img, .side-brand img, .brand-sys img { filter: none; }
@media (max-width: 960px) { .hero::after { display: none; } }

/* ---------- Motion: CSS only, transform and opacity, enter only, once. ---------- */
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }
@keyframes line-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes tab-on { 0% { transform: scale(.96); } 60% { transform: scale(1.02); } 100% { transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes open-in { from { opacity: 0; transform: translateY(-3px); } }
@keyframes icon-in { from { opacity: 0; transform: scale(.6) rotate(-12deg); } }
/* Only content that arrives with a page change animates (the class is removed shortly after), so refreshes stay still. */
.entering { animation: page-in 260ms var(--ease) backwards; }
.entering .card, .entering .dash-grid > *, .entering .hero-banner { animation: rise-in 320ms var(--ease) backwards; }
.entering .dash-grid > :nth-child(2), .entering > .card:nth-child(2) { animation-delay: 40ms; }
.entering .dash-grid > :nth-child(3), .entering > .card:nth-child(3) { animation-delay: 80ms; }
.entering .dash-grid > :nth-child(4), .entering > .card:nth-child(4) { animation-delay: 120ms; }
.entering .dash-grid > :nth-child(5), .entering > .card:nth-child(5) { animation-delay: 160ms; }
.entering .dash-grid > :nth-child(n+6), .entering > .card:nth-child(n+6) { animation-delay: 200ms; }
.entering tbody tr:nth-child(-n+12), .entering .erow:nth-child(-n+12) { animation: line-in 280ms var(--ease) backwards; }
.entering tbody tr:nth-child(2), .entering .erow:nth-child(2) { animation-delay: 30ms; } .entering tbody tr:nth-child(3), .entering .erow:nth-child(3) { animation-delay: 60ms; }
.entering tbody tr:nth-child(4), .entering .erow:nth-child(4) { animation-delay: 90ms; } .entering tbody tr:nth-child(5), .entering .erow:nth-child(5) { animation-delay: 120ms; }
.entering tbody tr:nth-child(6), .entering .erow:nth-child(6) { animation-delay: 150ms; } .entering tbody tr:nth-child(7), .entering .erow:nth-child(7) { animation-delay: 180ms; }
.entering tbody tr:nth-child(8), .entering .erow:nth-child(8) { animation-delay: 210ms; } .entering tbody tr:nth-child(9), .entering .erow:nth-child(9) { animation-delay: 240ms; }
.entering tbody tr:nth-child(10), .entering .erow:nth-child(10) { animation-delay: 270ms; } .entering tbody tr:nth-child(11), .entering .erow:nth-child(11) { animation-delay: 300ms; }
.entering tbody tr:nth-child(12), .entering .erow:nth-child(12) { animation-delay: 330ms; }
.entering .stat-icon { animation: icon-in 420ms var(--ease) 80ms backwards; }
details[open] > :not(summary) { animation: open-in 180ms var(--ease); }
.portal-main > *, main > .card { animation: page-in 260ms var(--ease) backwards; }
@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
  *, *::before, *::after { animation-duration: 0ms !important; animation-delay: 0ms !important; transition-duration: 0ms !important; }
}
@media print {
  :root, :root[data-theme="dark"] { color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #f2f2f7; --border: #e5e5ea; --text: #1d1d1f; --text-2: #6e6e73; --accent: #0066cc; --ok: #1a6e2e; --warn: #9a4400; --bad: #b8000f; }
}
.stat-head .dash-title { font-size: 13px; font-weight: 600; color: var(--text-2); }
.btn.more { font-size: 18px; line-height: 1; letter-spacing: .05em; padding-top: 7px; padding-bottom: 9px; min-width: 40px; text-align: center; }
.btn.small.more { font-size: 16px; padding: 3px 9px 6px; min-width: 32px; }
main a.dash-now, main a.dash-now:hover { color: var(--text); text-decoration: none; }
.dash-now:hover, .dash-now:focus { border-color: var(--border); }
.portal .hero h1 { color: #fff; } .portal .hero h1 em { color: #9fd3ff; }
.stats > :nth-child(4n+1) { --c: #007aff; } .stats > :nth-child(4n+2) { --c: #34c759; } .stats > :nth-child(4n+3) { --c: #ff9500; } .stats > :nth-child(4n+4) { --c: #ff2d55; }
.stat { gap: 10px !important; padding: 16px !important; border-radius: 12px !important; box-shadow: var(--shadow); }
.stat .stat-num { font-size: 28px; line-height: 1.1; }
.stat.warn .stat-num { color: var(--warn); } .stat.bad .stat-num { color: var(--bad); }
.stat.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)) !important; } .stat.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)) !important; }
.stat .stat-icon, .card .stat-icon { color: #fff; } .stat .stat-head .lbl { font-size: 12.5px; }
.foot-meta { align-items: center; }

/* ---------- Marking, Review & approve: the student list with its search box (marking.js studentList) ---------- */
/* The column (search + list) stays in view on a wide screen; the list scrolls inside it. */
.mlayout > .scol { position: sticky; top: calc(var(--head-h, 0px) + 12px); display: flex; flex-direction: column; gap: 8px; min-width: 0;
  max-height: calc(100vh - var(--head-h, 0px) - 24px); max-height: calc(100dvh - var(--head-h, 0px) - 24px); }
.mlayout > .scol > .slist { position: static; max-height: none; flex: 1 1 auto; min-height: 0; margin-top: 0; }
.scol .ssearch { display: flex; flex-direction: column; gap: 6px; }
.scol .ssearch input[type=search] { padding: 8px 11px; font-size: 14px; }
.scol .srow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; font-size: 12.5px; }
.scol .scount { font-variant-numeric: tabular-nums; }
.scol .sonly { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); white-space: nowrap; margin: 0; font-weight: 400; }
.scol .sitem[hidden], .scol .sempty[hidden] { display: none !important; }
.scol .sempty { padding: 14px 12px; border: 1px dashed var(--border); border-radius: 10px; font-size: 13px; text-align: center; flex-shrink: 0; }
/* Scripts issue filter: one chip per issue still open, with how many students have it. */
.scol .sissues { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.scol .sissues-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.scol .sissues-h button { font-size: 12px; padding: 0; border: 0; background: none; color: var(--accent, #0a66d8); cursor: pointer; font-weight: 400; }
.scol .ichips { display: flex; flex-wrap: wrap; gap: 5px; }
.scol .sissues-h button[hidden] { display: none; }
.scol .ichip { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; font-weight: 400; cursor: pointer; background: var(--surface, transparent); white-space: nowrap; }
.scol .ichip input { width: auto; margin: 0; }
.scol .ichip.on { border-color: var(--accent, #0a66d8); background: color-mix(in srgb, var(--accent, #0a66d8) 12%, transparent); }
.scol .ichip.bad { color: var(--bad); } .scol .ichip.warn { color: var(--warn); }
.scol .ichip .n { color: var(--text-2); font-variant-numeric: tabular-nums; }
.mtable .badge.resolved { opacity: .55; text-decoration: line-through; }
@media (max-width: 820px) {
  .mlayout > .scol { position: static; max-height: none; }
  .scol .sempty { flex: 1 0 100%; }
}

/* ---------- Marking, Marked papers: student search, Previous / Next and template (marking.js paperPicker) ---------- */
/* Row 1: Student, search, list, Previous / n of N / Next. Row 2: Template. */
.ppick { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ppick-student { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ppick-student > b, .ppick-tpl > b { flex: 0 0 auto; min-width: 70px; }
.ppick-fields { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 420px; min-width: 0; }
.ppick-fields input[type=search] { flex: 0 1 260px; min-width: 0; width: auto; padding: 8px 11px; font-size: 14px; }
.ppick-fields select { flex: 1 1 260px; min-width: 0; width: auto; }
.ppick-student > .sempty { flex: 1 0 100%; padding: 8px 12px; border: 1px dashed var(--border); border-radius: 10px; font-size: 13px; text-align: center; }
.ppick-student > .sempty[hidden] { display: none; }
.ppick-nav { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ppick-nav .ppos { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 64px; text-align: center; }
.ppick-tpl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ppick-tpl select { width: auto; min-width: 0; max-width: 100%; flex: 0 1 auto; }
@media (max-width: 600px) {
  .ppick-student > b { flex-basis: 100%; }
  .ppick-fields { flex-basis: 100%; }
  .ppick-fields input[type=search], .ppick-fields select { flex-basis: 100%; }
  .ppick-nav { flex: 1 1 100%; justify-content: space-between; }
  .ppick-tpl select { flex: 1 1 auto; }
}

/* ---------- Edvance LMS logo: portal header, page headers, staff sign-in, printed reports ---------- */
/* flex-basis auto: the name and time move to their own row instead of squeezing the logo text under them. */
.brand-sys { flex: 1 0 auto; display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.brand-sys:hover { text-decoration: none; }
.brandbar .brand-sys img { width: 44px; height: 44px; flex: none; }
.brand-sys b { display: block; font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--text); white-space: nowrap; }
.brand-sys span { display: block; margin-top: 3px; font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-2); }
@media (max-width: 640px) {
  .brand-sys { gap: 8px; flex: 1 1 0; } .brandbar .brand-sys img { width: 36px; height: 36px; }
  .brand-sys b { font-size: 15px; white-space: normal; } .brand-sys span { display: none; }
}
header.top .top-logo { width: 28px; height: 28px; flex: none; margin-right: -6px; }
.login-brand, .print-brand { display: flex; align-items: center; gap: 12px; }
.login-brand { margin-bottom: 14px; }
.login-brand img { width: 44px; height: 44px; flex: none; }
.login-brand b, .print-brand b { display: block; font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.login-brand small, .print-brand small { display: block; font-size: 12.5px; color: var(--text-2); }
.print-brand { display: none; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.print-brand img { width: 40px; height: 40px; flex: none; }
mark { background: var(--warn-bg); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- Teach me: step-by-step tutorials (tour.js) ---------- */
.teach-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 13px; background: var(--tint); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); white-space: nowrap; }
.teach-btn:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 18%, transparent) !important; box-shadow: inset 0 0 0 1px var(--accent) !important; }
.teach-btn svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 520px) { .teach-lbl { display: none; } .teach-btn { padding: 6px 8px; } }
.tour-layer { position: fixed; inset: 0; z-index: 1100; pointer-events: none; }
.tour-block { position: fixed; background: rgb(0 0 0 / .62); pointer-events: auto; transition: none; }
.tour-lid { position: fixed; pointer-events: auto; cursor: default; }
.tour-ring { position: fixed; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 3px var(--accent), 0 0 0 9px color-mix(in srgb, var(--accent) 35%, transparent); animation: tour-pulse 1.6s ease-in-out infinite; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 3px var(--accent), 0 0 0 14px color-mix(in srgb, var(--accent) 12%, transparent); } }
.tour-card { position: fixed; left: 0; top: 0; width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; pointer-events: auto; background: var(--surface); color: var(--text); border-radius: 14px; padding: 16px 18px 14px; box-shadow: var(--shadow-float); border: 1px solid var(--border); transition: transform 180ms var(--ease); }
.tour-card h4 { margin: 4px 0 6px; font-size: 16px; line-height: 1.3; }
.tour-card p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--text); }
.tour-card p.muted { color: var(--text-2); }
.tour-meta { font-size: 11.5px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; }
.tour-bar { height: 4px; border-radius: 99px; background: var(--surface-2); margin: 8px 0 6px; overflow: hidden; }
.tour-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 200ms var(--ease); }
.tour-extra { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.tour-acts { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tour-acts > button:last-child:not(.secondary) { margin-left: auto; }
.tour-hint { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--accent); text-align: right; }
.tour-card.shake { animation: tour-shake 320ms ease; }
@keyframes tour-shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
.tour-banner { position: fixed; left: 50%; bottom: 14px; translate: -50% 0; z-index: 1101; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 999px; background: #1d1d1f; color: #fff; border: 1px solid rgb(255 255 255 / .18); font-size: 13px; box-shadow: 0 6px 20px rgb(0 0 0 / .3); white-space: nowrap; }
.tour-banner button { background: #fff; color: #1d1d1f; padding: 4px 12px; font-size: 12.5px; border-radius: 999px; margin-left: 6px; }
.tour-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff9f0a; }
@media (max-width: 520px) { .tour-banner-txt { display: none; } }
.tour-done { background: var(--ok); }
.tour-menu-back { position: fixed; inset: 0; z-index: 1000; background: rgb(17 24 39 / .45); display: grid; place-items: center; padding: 16px; animation: fade-in 120ms var(--ease); }
.tour-menu { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); color: var(--text); border-radius: 16px; box-shadow: var(--shadow-float); overflow: hidden; }
.tour-menu-h { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px 12px; border-bottom: 1px solid var(--border); }
.tour-menu-h > div { flex: 1; }
.tour-menu-h h3 { margin: 0 0 4px; font-size: 18px; }
.tour-menu-h p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.tour-x { background: transparent; color: var(--text-2); font-size: 22px; line-height: 1; padding: 2px 8px; box-shadow: none; }
.tour-x:not(:disabled):hover { background: var(--surface-2) !important; color: var(--text); box-shadow: none !important; }
.tour-menu-b { overflow: auto; padding: 8px 14px 16px; }
.tour-group { margin-top: 10px; }
.tour-group-h { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; padding: 0 6px 6px; }
.tour-group-h b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.tour-group-h span { font-size: 12px; color: var(--text-2); }
.tour-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); color: var(--text); font-weight: 500; padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--border); margin-bottom: 6px; }
.tour-item:not(:disabled):hover, .tour-item:focus-visible { background: var(--tint) !important; box-shadow: inset 0 0 0 1px var(--accent) !important; }
.tour-item-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--text-2); }
.tour-item.done .tour-item-ic { background: var(--ok); color: #fff; }
.tour-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tour-item-body b { font-size: 14.5px; }
.tour-item-body small { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.tour-item-meta { font-weight: 600; }
.tour-item-go { font-size: 22px; color: var(--text-2); flex: none; }
@media print { .teach-btn, .tour-layer, .tour-banner, .tour-menu-back { display: none !important; } }

/* =====================================================================================================
   Glass: the look of the YPR Marketing & Sales system. A soft colour wash behind every page, translucent
   frosted surfaces (sidebar, top bar, cards, menus, dialogs), larger rounded corners, and Apple-style easing.
   Only the sidebar, bars, menus and dialogs blur what is behind them; cards are translucent without blur so
   long pages stay light on older student laptops. Reduce motion turns every animation off (see above).
   ===================================================================================================== */
:root {
  --ease: cubic-bezier(.22, 1, .36, 1); --spring: cubic-bezier(.34, 1.45, .64, 1); --dur: 260ms;
  --radius: 16px;
  --glass: rgb(255 255 255 / .62); --glass-strong: rgb(255 255 255 / .82); --glass-line: rgb(255 255 255 / .78);
  --glass-edge: rgb(15 23 42 / .07); --blur: saturate(180%) blur(22px);
  --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 8px 24px -12px rgb(15 23 42 / .12);
  --shadow-hover: 0 18px 40px -16px rgb(15 23 42 / .22), 0 2px 6px rgb(15 23 42 / .05);
  --wash:
    radial-gradient(60vw 60vh at 0% 0%, rgb(170 205 255 / .55), transparent 70%),
    radial-gradient(55vw 55vh at 0% 100%, rgb(255 205 216 / .55), transparent 70%),
    radial-gradient(60vw 60vh at 100% 0%, rgb(214 204 255 / .55), transparent 70%),
    radial-gradient(55vw 60vh at 100% 100%, rgb(190 236 255 / .5), transparent 70%),
    #eef2f8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --glass: rgb(30 32 40 / .55); --glass-strong: rgb(30 32 40 / .82); --glass-line: rgb(255 255 255 / .08); --glass-edge: rgb(0 0 0 / .4);
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -14px rgb(0 0 0 / .7); --shadow-hover: 0 20px 44px -16px rgb(0 0 0 / .8);
    --wash:
      radial-gradient(60vw 60vh at 0% 0%, rgb(10 80 190 / .5), transparent 70%),
      radial-gradient(55vw 55vh at 0% 100%, rgb(130 30 100 / .36), transparent 70%),
      radial-gradient(60vw 60vh at 100% 0%, rgb(90 60 190 / .42), transparent 70%),
      radial-gradient(55vw 60vh at 100% 100%, rgb(0 120 160 / .34), transparent 70%),
      #05070d;
  }
}
:root[data-theme="dark"] {
  --glass: rgb(30 32 40 / .55); --glass-strong: rgb(30 32 40 / .82); --glass-line: rgb(255 255 255 / .08); --glass-edge: rgb(0 0 0 / .4);
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -14px rgb(0 0 0 / .7); --shadow-hover: 0 20px 44px -16px rgb(0 0 0 / .8);
  --wash:
    radial-gradient(60vw 60vh at 0% 0%, rgb(10 80 190 / .5), transparent 70%),
    radial-gradient(55vw 55vh at 0% 100%, rgb(130 30 100 / .36), transparent 70%),
    radial-gradient(60vw 60vh at 100% 0%, rgb(90 60 190 / .42), transparent 70%),
    radial-gradient(55vw 60vh at 100% 100%, rgb(0 120 160 / .34), transparent 70%),
    #05070d;
}
/* The wash sits on a fixed layer behind the page, so scrolling never repaints it. */
html { background: var(--bg); }
body, body.portal { background: transparent; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--wash); }

/* Frosted surfaces */
.card, .ext-bar, .help-strip, .terms, .date-tile, .facts > div, .tour-item {
  background: var(--glass); border: 1px solid var(--glass-line); }
.card { border-radius: 20px; box-shadow: var(--shadow); }
.portal .card { border-radius: 20px; border-color: var(--glass-line); }
.facts > div { border-color: var(--glass-line); }
.side, header.top, .brandbar, .popmenu, .live-pop, .dlg, .ext-dialog, .tour-card, .tour-menu, .login-card, body .actions.sticky, body .bar {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.side { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 20px; box-shadow: var(--shadow); }
.side-brand, .side-foot { border-color: var(--glass-edge); }
header.top { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 18px; margin: 12px; box-shadow: var(--shadow); padding: 12px 18px; }
.brandbar { background: var(--glass-strong); border-bottom: 1px solid var(--glass-edge); position: sticky; top: 0; z-index: 30; }
.portal-foot { background: var(--glass); border-top: 1px solid var(--glass-line); }
.popmenu, .live-pop { background: var(--glass-strong) !important; border: 1px solid var(--glass-line) !important; border-radius: 14px !important; }
.dlg, .ext-dialog, .tour-card, .tour-menu { background: var(--glass-strong) !important; border: 1px solid var(--glass-line); border-radius: 22px !important; }
.dlg-back, .ext-dialog::backdrop, .tour-menu-back { background: rgb(10 14 25 / .32) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body .actions.sticky { background: var(--glass-strong); border-radius: 14px; padding: 10px 12px; border: 1px solid var(--glass-line); }
body .bar { background: var(--glass-strong); border-bottom-color: var(--glass-edge); }
input, select, textarea { border-radius: 12px; }
th, td, .steps li, .part, .section-head, .exam-tabs, .live-foot, .tour-menu-h { border-color: var(--glass-edge); }
tbody tr:hover > td { background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* Sidebar: the chosen page is a soft blue pill with a fine blue ring, as in the Marketing system. */
.side-nav button, .side-nav .side-link { border-radius: 12px; padding: 9px 12px; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.side-nav button.active { background: color-mix(in srgb, var(--accent) 16%, transparent) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent) !important; }
.side-nav button:not(.active):not(:disabled):hover { transform: translateX(2px); }
.side-group > summary { font-size: 11.5px; letter-spacing: .1em; }

/* Buttons: pill-ish corners, a gentle lift on hover, spring press. */
button, .btn { border-radius: 12px; transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease), transform 180ms var(--spring); }
button.small, .btn.small { border-radius: 10px; }
button.secondary, .btn.secondary { background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 1px 2px rgb(15 23 42 / .05); }
button.secondary:not(:disabled):hover, .btn.secondary:hover { background: var(--surface); }
button:not(.secondary):not(.danger):not(.ok):not(.ghost):not(:disabled):hover, .btn:not(.secondary):not(.ghost):not(.danger):not(.ok):hover { transform: translateY(-1px); }
.side-nav button:not(:disabled):hover, .tabs:not(.side-nav) button:hover, .etabs button:hover, .theme-pick button:hover, .icon-btn:hover, .menu-btn:hover, #examTabs button:hover { transform: none; }
button:not(:disabled):active, .btn:active { transform: scale(.96); }

/* Segmented controls: frosted well, the chosen segment slides in. */
.tabs:not(.side-nav), .etabs, .dash-range, .theme-pick { background: color-mix(in srgb, var(--text) 6%, transparent); border-radius: 12px; }
.tabs:not(.side-nav) button.active, .etabs button.on, .dash-range button.active, .theme-pick button.on { background: var(--glass-strong) !important; box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 2px 8px -2px rgb(0 0 0 / .12) !important; }
.theme-pick button { display: inline-grid; place-items: center; width: 30px; height: 26px; padding: 0; }
.theme-pick svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-pick svg .fill { fill: currentColor; stroke: none; }
.theme-pick button.on svg { animation: icon-in 360ms var(--spring); }

/* Cards lift on hover where they lead somewhere. */
.card { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease); }
.card-hover:hover, a.card:hover, .dash-now:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.assess-list li { border-radius: 16px; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.assess-list li:hover { background: var(--glass); transform: translateX(2px); }

/* Staff greeting banner: deep navy to blue, a light sweep, and the "Right now" numbers on frosted tiles inside it. */
.hero-banner { border-radius: 26px; padding: 30px 32px; margin-bottom: 22px; box-shadow: 0 24px 50px -24px rgb(10 50 120 / .55);
  background:
    radial-gradient(600px 300px at 100% 100%, rgb(40 150 255 / .55), transparent 70%),
    radial-gradient(500px 280px at 15% 120%, rgb(20 200 170 / .18), transparent 70%),
    linear-gradient(135deg, #0a1b3d 0%, #0b2f6b 50%, #0a5bc4 100%); }
.hero-banner::after { width: auto; height: auto; inset: -40% -10% auto 40%; aspect-ratio: 3 / 1; right: auto; bottom: auto; border-radius: 50%; opacity: 1;
  background: radial-gradient(closest-side, rgb(255 255 255 / .14), transparent); transform: rotate(-12deg); }
.hero-banner h2 { font-size: 30px; }
.hero-banner > p { font-size: 16px; }
.hero-tiles { position: relative; z-index: 1; margin-top: 22px; }
.hero-tiles .dash-grid.now { margin-bottom: 0; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.hero-banner .dash-now { background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .18); border-radius: 16px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .12);
  color: #fff !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hero-banner .dash-now:hover { background: rgb(255 255 255 / .16); border-color: rgb(255 255 255 / .3); box-shadow: 0 16px 30px -16px rgb(0 0 0 / .5); }
.hero-banner .dash-now .lbl { color: rgb(255 255 255 / .78); }
.hero-banner .dash-now .dash-num { color: #fff; }
.hero-banner .dash-now .dash-num.warn { color: #ffcf7a; }
.hero-banner .stat-icon { box-shadow: 0 4px 12px -4px rgb(0 0 0 / .4); }

/* Student portal: the hero becomes a rounded panel inside the page, the sign-in card is frosted. */
.hero { margin: 16px; border-radius: 30px; box-shadow: 0 30px 60px -30px rgb(10 40 110 / .6);
  background:
    radial-gradient(700px 360px at 100% 100%, rgb(40 150 255 / .55), transparent 70%),
    radial-gradient(520px 300px at 10% 110%, rgb(20 200 170 / .16), transparent 70%),
    linear-gradient(135deg, #0a1b3d 0%, #0b2f6b 50%, #0a5bc4 100%); }
.hero::after { width: 70%; height: 80%; left: 40%; top: -45%; bottom: auto; box-shadow: none; opacity: 1; transform: rotate(-12deg);
  background: radial-gradient(closest-side, rgb(255 255 255 / .12), transparent); }
.login-card { background: var(--glass-strong); border: 1px solid var(--glass-line); border-radius: 24px; box-shadow: 0 30px 60px -24px rgb(0 10 40 / .55); }
.portal input, .login-card input { background: var(--surface); }
.login-card .or-rule { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; }
.login-card .or-rule::before, .login-card .or-rule::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: 8px;
  background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; font-size: 15px; text-decoration: none; }
.google-btn:hover { background: #f8f9fa; border-color: #c6c9cd; }
.google-login .small-text { margin: 8px 0 0; text-align: center; }
.login-help { margin: 14px 0 0; font-size: 14px; font-weight: 600; text-align: center; }
.login-card #loginError:empty { display: none; }
.login-card #loginError { margin: 10px 0 0; }
.login-card form .block { margin-top: 14px; }
.code-sent { margin: 12px 0 0; font-size: 14px; color: var(--text); line-height: 1.5; }
.code-input { font-size: 24px; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.code-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 10px; margin: 12px 0 0; font-size: 13px; color: var(--text-2); }
.linklike, .linklike:hover { background: none !important; box-shadow: none !important; border: 0; padding: 0; border-radius: 0; color: var(--accent) !important; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linklike:disabled { opacity: .5; cursor: default; }
.pw-toggle { margin: 10px 0 0; font-size: 13px; text-align: center; }
.login-help a { text-underline-offset: 2px; }
.utility { background: rgb(8 18 40 / .92); }
.date-tile { border-radius: 16px; }
.help-strip { border-radius: 20px; }
.ext-bar { border-radius: 16px; }
@media (max-width: 640px) { .hero { margin: 8px; border-radius: 22px; } }

/* Staff layout: the top bar floats beside the sidebar like the Marketing system. */
@media (min-width: 901px) {
  body.has-side header.top { top: 12px; margin: 12px 12px 0 0; }
}
@media (max-width: 900px) {
  header.top { margin: 8px; top: 8px; border-radius: 16px; padding: 8px 12px; }
  .side { top: 8px; bottom: 8px; left: 8px; border-radius: 20px; }
}

/* Motion: content glides up out of a light blur; menus and dialogs spring in. */
@keyframes page-in { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { filter: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.entering { animation: page-in 420ms var(--ease) backwards; }
.entering .card, .entering .dash-grid > *, .entering .hero-banner { animation: rise-in 520ms var(--ease) backwards; }
.portal-main > *, main > .card { animation: page-in 420ms var(--ease) backwards; }
.dlg, .ext-dialog { animation: dialog-in 320ms var(--spring) !important; }
.popmenu { animation: pop-in 220ms var(--spring); }
details[open] > :not(summary) { animation: open-in 260ms var(--ease); }
/* Switching theme cross-fades the whole page (View Transitions, where the browser has them). */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 380ms; animation-timing-function: var(--ease); }

/* Browsers without backdrop blur get solid surfaces so text stays readable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .side, header.top, .brandbar, .popmenu, .live-pop, .dlg, .ext-dialog, .tour-card, .tour-menu, .login-card, body .actions.sticky, body .bar { background: var(--surface) !important; }
}
@media print {
  body::before { display: none; }
  .card, header.top, .side { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
}
@media (max-width: 640px) {
  .hero-banner { padding: 22px 18px; border-radius: 22px; } .hero-banner h2 { font-size: 24px; }
  .hero-tiles .dash-grid.now { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero-banner .dash-now { padding: 12px; gap: 8px; } .hero-banner .dash-now .dash-num { font-size: 24px; }
}
.dash-now, .dash-now:hover, .dash-now:hover * { text-decoration: none !important; }
.ext-bar { border-left: 4px solid var(--ok); } .ext-bar.bad { border-left-color: var(--bad); }

/* Edvance systems menu (top bar, staff): the other Edvance systems, as in the Edvance LMS's top bar. */
.ypr-sys { position: relative; display: inline-flex; }
button.ypr-sys-btn { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 10px; }
button.ypr-sys-btn svg { width: 18px; height: 18px; }
button.ypr-sys-btn[aria-expanded="true"] { background: var(--tint); }
.ypr-sys-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 264px; max-width: calc(100vw - 24px); padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-float); }
.ypr-sys-pop a { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; outline: none; }
.ypr-sys-pop a:hover, .ypr-sys-pop a:focus-visible { background: var(--tint); }
.ypr-sys-pop b { display: block; font-weight: 600; }
.ypr-sys-pop small { display: block; font-size: 12px; color: var(--text-2); line-height: 1.35; }
.ypr-tile { flex: none; width: 28px; height: 28px; margin-top: 1px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.ypr-line { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ypr-sys-pop a.ypr-feedback { align-items: center; gap: 8px; margin-top: 4px; padding: 8px 12px 6px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; font-size: 12px; color: var(--text-2); }
.ypr-sys-pop a.ypr-feedback:hover { color: var(--text); }
.ypr-sys-pop a.ypr-feedback .ypr-line { width: 14px; height: 14px; }
@media print { .ypr-sys { display: none !important; } }

/* Group Assignment, a page of the staff panel (groups.js): its own styles live in its shadow root. */
.groups-host { display: block; }

/* Portal status and "Report a technical problem" (incident.js) */
.portal-status { font-weight: 600; white-space: normal; text-align: left; max-width: 100%; }
.incident-dialog { width: min(760px, calc(100vw - 32px)); }
.incident-dialog .dlg-head { align-items: center; flex-wrap: wrap; }
.inc-auto { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 8px 0 14px; }
.inc-sub { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 6px 0; font-size: 14px; }
.inc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 12px; }
.inc-grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.inc-ro { display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
.inc-ro span { color: var(--muted); } .inc-ro b { overflow-wrap: anywhere; }
.inc-field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; margin: 0; }
.inc-field select, .inc-field input, .inc-field textarea { width: 100%; box-sizing: border-box; }
.inc-list { list-style: none; padding: 0; margin: 0; }
.inc-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.inc-list li:last-child { border-bottom: 0; }
.inc-list .grow { flex: 1 1 260px; min-width: 0; }
.report-btn { background: var(--bad) !important; color: #fff !important; }
.small-text { font-size: 13px; }
.flag-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* Student feedback (staff panel): average, a bar for each star and the list. */
.fb-summary { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 12px; }
.fb-summary .card { margin-bottom: 8px; }
.fb-avg { text-align: center; } .fb-avg > b { display: block; font: 700 40px var(--display); line-height: 1.1; }
.fb-stars-ro { color: #f5a623; letter-spacing: 1px; } .fb-stars-ro span { color: color-mix(in srgb, var(--text-2) 35%, transparent); }
.fb-bars { display: grid; gap: 6px; }
.fb-bar { display: grid; grid-template-columns: 40px 1fr 36px; gap: 10px; align-items: center; font-size: 13px; }
.fb-bar i { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.fb-bar i b { display: block; height: 100%; background: #f5a623; border-radius: 99px; }
.fb-bar span:last-child { text-align: right; color: var(--text-2); }
@media (max-width: 640px) { .fb-summary { grid-template-columns: 1fr; } }

/* Student portal header: the portal status with the proctoring extension's button under it (index.html). */
.status-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.status-stack .badge { font-size: 12px; }
button.proctor-btn { background: var(--surface); box-shadow: none; padding: 3px 10px; min-height: 0; line-height: 1.4; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
button.proctor-btn:disabled { cursor: default; opacity: 1; }
button.proctor-btn.bad:hover { background: var(--tint) !important; }
.proctor-btn .tick { font-size: 11px; }
/* "Report incident" on an exam card (index.html): a quiet link at the top right, red only on hover. */
button.report-link { flex: 0 0 auto; background: transparent !important; box-shadow: none !important; border: 0; color: var(--text-2); font-size: 13px; font-weight: 600; padding: 2px 4px; min-height: 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); cursor: pointer; }
button.report-link:hover, button.report-link:focus-visible { color: var(--bad) !important; text-decoration-color: currentColor; }
/* Exam card not open yet (index.html, Not taken yet tab): greyed and striped, so it reads as "cannot answer yet". */
.card.not-open { background-image: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--muted) 9%, transparent) 14px 28px); filter: grayscale(.85); opacity: .72; }
.card.not-open:hover { opacity: .9; }
/* IC verification open before the assessment: full colour, with the Verify IC step and button picked out. */
.card.ic-open { border-color: color-mix(in srgb, var(--ok, #15803d) 45%, transparent); }
.steps li.ic-now { background: color-mix(in srgb, var(--ok, #15803d) 10%, transparent); border-radius: 10px; }
.btn.ic-now { background: color-mix(in srgb, var(--ok, #15803d) 75%, #000); border-color: transparent; color: #fff; font-weight: 700; animation: ic-pulse 2s ease-in-out infinite; }
@keyframes ic-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok, #15803d) 45%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { .btn.ic-now { animation: none; } }
/* Not taken yet: assessments not open yet as a short list (index.html upcomingRow). */
.up-list { filter: none; opacity: 1; }
.up-list > h2 { margin: 0 0 4px; }
.up-list > ul { list-style: none; margin: 12px 0 0; padding: 0; }
.up-row { padding: 14px 0; border-top: 1px solid var(--glass-line, var(--border)); }
.up-row .up-head { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; list-style: none; }
.up-row .up-head::-webkit-details-marker { display: none; }
.up-row .up-head::after { content: "▸"; color: var(--muted); transition: transform var(--dur, .2s) var(--ease, ease); }
.up-row details[open] > .up-head::after { transform: rotate(90deg); }
.up-row .up-head > .grow { flex: 1 1 auto; min-width: 0; }
.up-row .up-head > .badge:first-child { min-width: 118px; text-align: center; }
.up-row h3 { margin: 0; font-size: 16px; }
.up-row .up-head p { margin: 2px 0 0; font-size: 13px; }
.up-row .up-head > .badge:last-child { color: var(--muted); }
.up-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 16px; margin: 10px 0 0; }
.up-facts span { display: block; font-size: 12px; color: var(--muted); }
.up-facts b { font-size: 13px; font-weight: 600; }
.up-facts .up-ic b { color: var(--accent); }
@media (max-width: 600px) { .up-row .up-head { flex-wrap: wrap; } .up-row .up-head > .grow { flex-basis: calc(100% - 80px); } }
/* Type tabs above the assessment list (index.html): All, Quiz, Midterm, Final assessment. */
.type-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.type-tabs button { background: var(--glass, var(--surface)); color: var(--text-2); border: 1px solid var(--glass-line, var(--border)); border-radius: 99px; padding: 6px 14px; font-weight: 600; box-shadow: none; }
.type-tabs button:hover { color: var(--text); transform: none; }
.type-tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.type-tabs .count { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; background: var(--tint); color: var(--accent); font-size: 12px; }
.type-tabs button.active .count { background: rgba(255,255,255,.25); color: #fff; }
@media (max-width: 600px) { .up-row .up-head > .badge:first-child { min-width: 0; } }

/* Students list, in the style of the LMS People table: name and email, number with copy, cohort, status, courses, bars. */
table.ppl td { vertical-align: top; padding-top: 14px; padding-bottom: 14px; }
table.ppl .ppl-name { display: block; font-weight: 700; color: var(--text); text-transform: uppercase; text-decoration: none; }
table.ppl .ppl-name:hover { color: var(--accent); }
table.ppl .ppl-sub { color: var(--text-2); font-size: 13px; margin-top: 2px; word-break: break-all; }
table.ppl .copy { background: none; border: 0; box-shadow: none; padding: 2px 4px; margin-left: 6px; color: var(--text-2); cursor: pointer; vertical-align: -2px; min-height: 0; }
table.ppl .copy:hover { color: var(--accent); background: none; }
table.ppl .copy.done { color: var(--ok); }
table.ppl .pills { display: flex; flex-wrap: wrap; gap: 6px; max-width: 330px; }
table.ppl td > div + div { margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn, .pill.course { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info, .pill.k1 { background: var(--tint); color: var(--accent); }
.pill.k2 { background: color-mix(in srgb, #ea580c 13%, var(--surface)); color: #c2410c; }
:root[data-theme="dark"] .pill.k2 { color: #fb923c; }
.pill .x { background: none; border: 0; box-shadow: none; padding: 0 0 0 2px; min-height: 0; color: inherit; font-size: 14px; line-height: 1; cursor: pointer; }

/* Page header for grouped staff pages (subNav in common.js): the title, with the page's buttons on its right, then
   the sub-tabs as an underlined row. Tabs are plain text, grey when off and blue with a blue underline when on. */
.page-head { margin: 0 0 18px; }
.page-head-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 40px; margin-bottom: 6px; }
.page-head-row h2 { margin: 0; flex: 1 1 auto; min-width: 0; }
.page-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.qtabs.subnav { display: flex; flex-wrap: nowrap; gap: 4px; margin: 0 0 18px; padding: 0; border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.qtabs.subnav::-webkit-scrollbar { display: none; }
.page-head .qtabs.subnav { margin-bottom: 0; }
.qtabs.subnav button { flex: 0 0 auto; background: transparent; color: var(--text-2); border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  margin-bottom: -1px; padding: 10px 14px; font-weight: 600; white-space: nowrap; box-shadow: none; }
.qtabs.subnav button:not(:disabled):hover { background: transparent !important; color: var(--text); box-shadow: none !important; transform: none; }
.qtabs.subnav button.on, .qtabs.subnav button.on:not(:disabled):hover { color: var(--accent); border-bottom-color: var(--accent); box-shadow: none !important; }
.qtabs.subnav button:focus-visible { outline-offset: -2px; border-radius: 6px 6px 0 0; }
@media (max-width: 640px) { .qtabs.subnav button { padding: 10px 10px; } }
@media print { .qtabs.subnav { display: none; } }
.page-sub { margin: 0 0 10px; }
.etabs.subtabs { display: flex; width: fit-content; max-width: 100%; margin: 0 0 14px; }
/* Group Assignment brief (type assignment, assignment-paper.js): the lecturer's Word brief, shown read-only. Table
   borders are drawn from the text colour so the rubric's grid stays readable in light and dark. */
.ga-note { border-left: 4px solid var(--ok); }
.ga-kv th { width: 130px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.ga-kv td > div + div { margin-top: 4px; }
@media (max-width: 640px) { .ga-kv th, .ga-kv td { display: block; width: auto; border-bottom: 0; padding: 2px 0; } .ga-kv tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--border); } }
.ga-checks { list-style: none; padding: 0; margin: 0; }
.ga-checks li { padding: 8px 0; border-top: 1px solid var(--border); }
.ga-checks li:first-child { border-top: 0; padding-top: 0; }
.ga-checks .muted { margin-top: 4px; font-size: 13px; }
tr.ga-total td { border-bottom: 0; }
.brief-doc { line-height: 1.55; overflow-wrap: anywhere; color: var(--text); }
.brief-doc h1, .brief-doc h2, .brief-doc h3, .brief-doc h4, .brief-doc h5, .brief-doc h6 { margin: 1.1em 0 .4em; line-height: 1.3; }
.brief-doc h1 { font-size: 20px; } .brief-doc h2 { font-size: 18px; } .brief-doc h3 { font-size: 16px; } .brief-doc h4, .brief-doc h5, .brief-doc h6 { font-size: 15px; }
.brief-doc > :first-child { margin-top: 0; }
.brief-doc p { margin: .5em 0; }
.brief-doc ul, .brief-doc ol { padding-left: 22px; margin: .5em 0; }
.brief-doc table { width: 100%; min-width: 520px; border-collapse: collapse; margin: 10px 0; font-size: 13.5px; background: var(--surface); }
.brief-doc th, .brief-doc td { border: 1px solid color-mix(in srgb, var(--text) 28%, transparent); padding: 6px 8px; vertical-align: top;
  text-transform: none; letter-spacing: 0; font-size: inherit; color: var(--text); }
.brief-doc th, .brief-doc tr:first-child td { background: var(--surface-2); font-weight: 600; }
.brief-doc td p, .brief-doc th p { margin: 0; }
.brief-doc td p + p, .brief-doc th p + p { margin-top: 4px; }
/* =====================================================================================================
   Easy-read mode (html[data-vision="on"]), for students with low vision. The student switches it on with the
   "Aa" button (visionToggle() in common.js); it is kept in this browser only. Everything is drawn 20% larger
   (on phones the text is enlarged instead), in a plain, wide font with more space between lines, with black on white (or white on black)
   instead of grey text and see-through cards, thicker borders and a strong focus ring. It changes only how the
   page looks, so the proctoring is the same.
   ===================================================================================================== */
:root[data-vision="on"] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #eef0f4; --border: #5c5c63; --text: #000000; --text-2: #26262b;
  --accent: #0047b3; --accent-strong: #0047b3; --ok: #0b5a1f; --warn: #7a3300; --bad: #9c000c;
  --font: Verdana, "Atkinson Hyperlegible", Tahoma, "Segoe UI", system-ui, sans-serif; --display: var(--font);
  --glass: #ffffff; --glass-strong: #ffffff; --glass-line: #5c5c63; --glass-edge: #5c5c63; --blur: none; --wash: #ffffff;
  --tint: color-mix(in srgb, var(--accent) 16%, var(--surface));
}
:root[data-vision="on"][data-theme="dark"] {
  --bg: #000000; --surface: #000000; --surface-2: #1d1d21; --border: #b4b4bb; --text: #ffffff; --text-2: #e6e6ea;
  --accent: #8cc8ff; --accent-strong: #2f7fe0; --ok: #5ee68a; --warn: #ffbd59; --bad: #ff8f88;
  --glass: #000000; --glass-strong: #000000; --glass-line: #b4b4bb; --glass-edge: #b4b4bb; --wash: #000000;
}
@media (prefers-color-scheme: dark) {
  :root[data-vision="on"]:not([data-theme="light"]) {
    --bg: #000000; --surface: #000000; --surface-2: #1d1d21; --border: #b4b4bb; --text: #ffffff; --text-2: #e6e6ea;
    --accent: #8cc8ff; --accent-strong: #2f7fe0; --ok: #5ee68a; --warn: #ffbd59; --bad: #ff8f88;
    --glass: #000000; --glass-strong: #000000; --glass-line: #b4b4bb; --glass-edge: #b4b4bb; --wash: #000000;
  }
}
:root[data-vision="on"] body { zoom: 1.2; line-height: 1.7; letter-spacing: .01em; word-spacing: .06em; background: var(--bg); }
/* Phones: no zoom (it would push vw-sized parts off the narrow screen); the text sizes below do the work. */
@media (max-width: 600px) { :root[data-vision="on"] body { zoom: 1; font-size: 17px; } :root[data-vision="on"] button, :root[data-vision="on"] .btn { font-size: 16px; } }
:root[data-vision="on"] .muted, :root[data-vision="on"] .small-text { color: var(--text-2); }
:root[data-vision="on"] .card, :root[data-vision="on"] .box, :root[data-vision="on"] .opt, :root[data-vision="on"] .bar { border: 2px solid var(--border) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
:root[data-vision="on"] textarea, :root[data-vision="on"] input, :root[data-vision="on"] select { border: 2px solid var(--border); background: var(--surface); color: var(--text); font-size: 17px; line-height: 1.7; }
:root[data-vision="on"] :focus-visible, :root[data-vision="on"] textarea:focus, :root[data-vision="on"] input:focus { outline: 3px solid var(--accent) !important; outline-offset: 2px; }
:root[data-vision="on"] main a:not(.btn) { text-decoration: underline; }
/* The assessment paper: question text, choices and answers larger still, and the chosen answer clearly marked. */
:root[data-vision="on"] .qtext { font-size: 19px; line-height: 1.8; }
:root[data-vision="on"] #screen-exam textarea, :root[data-vision="on"] #screen-exam input[type=text] { font-size: 18px; }
:root[data-vision="on"] .opt { font-size: 18px; padding: 14px 16px; }
:root[data-vision="on"] .opt input { width: 22px; height: 22px; flex: 0 0 auto; }
:root[data-vision="on"] .opt:has(input:checked) { border-width: 3px !important; border-color: var(--accent) !important; font-weight: 700; }
:root[data-vision="on"] .nav { grid-template-columns: repeat(4, 1fr); }
:root[data-vision="on"] .nav button { font-size: 16px; padding: 10px 0; border: 2px solid var(--border); }
:root[data-vision="on"] .nav button.current { outline: 3px solid var(--accent); outline-offset: 1px; }
:root[data-vision="on"] #watermark { opacity: .045; }
/* The "Aa" switch. */
.vision-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); color: var(--text); box-shadow: none; padding: 5px 10px; font-size: 13px; border-radius: 10px; white-space: nowrap; }
.vision-btn b { font-family: Verdana, Tahoma, sans-serif; font-size: 15px; letter-spacing: -.02em; }
.vision-btn:not(:disabled):hover { background: var(--tint) !important; color: var(--text); box-shadow: none !important; }
.vision-btn.on { background: var(--accent) !important; color: #fff; }
:root[data-vision="on"][data-theme="dark"] .vision-btn.on { color: #000; }
@media (prefers-color-scheme: dark) { :root[data-vision="on"]:not([data-theme="light"]) .vision-btn.on { color: #000; } }
@media (max-width: 600px) { .bar .vision-btn span { display: none; } .bar .vision-btn { padding: 4px 8px; } }
.vision-hint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border-radius: 12px; padding: 10px 14px; }
:root[data-vision="on"] .part .qtext { font-size: 19px !important; }
:root[data-vision="on"] .portal-main > *, :root[data-vision="on"] main > .card, :root[data-vision="on"] .entering .card { animation: none !important; }
.vision-btn.on:not(:disabled):hover { background: var(--accent) !important; color: #fff; }
:root[data-vision="on"][data-theme="dark"] .report-btn { color: #000; }
@media (prefers-color-scheme: dark) { :root[data-vision="on"]:not([data-theme="light"]) .report-btn { color: #000; } }

/* ---------- Phone nav (phone-nav.js): a bottom tab bar and a More sheet, as in the LMS ---------- */
.phone-only, .phone-bar, .pn-sheet, .pn-shade { display: none; }
@media (max-width: 900px) {
  html, body { overflow-x: clip; }
  img.phone-only { display: block; }
  body.has-phone-bar { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.has-phone-bar .phone-bar { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 45; gap: 4px; padding: 6px;
    background: var(--glass-strong, var(--surface)); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid var(--glass-line, var(--border)); border-radius: 26px; box-shadow: var(--shadow-float); }
  .phone-bar button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; background: transparent; color: var(--text-2); border-radius: 20px; box-shadow: none; font-size: 11.5px; font-weight: 600; }
  .phone-bar button:not(:disabled):hover { background: transparent !important; box-shadow: none !important; transform: none; }
  .phone-bar button.on, .phone-bar button.on:not(:disabled):hover { background: var(--tint) !important; color: var(--accent); }
  .pn-ic { position: relative; display: grid; place-items: center; }
  .pn-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .pn-lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pn-badge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
  .pn-dot { position: absolute; top: -2px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); }
  body.pn-open .pn-shade { display: block; position: fixed; inset: 0; z-index: 46; background: rgb(0 0 0 / .35); }
  body.has-phone-bar .pn-sheet { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 47; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain; outline: none;
    padding: 8px 14px calc(24px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-float);
    transform: translateY(105%); visibility: hidden; transition: transform 280ms var(--ease), visibility 0s 280ms; }
  body.pn-open .pn-sheet { transform: none; visibility: visible; transition: transform 280ms var(--ease); }
  .pn-handle { width: 44px; height: 5px; border-radius: 3px; background: var(--border); margin: 2px auto 14px; }
  .pn-who { display: flex; align-items: center; gap: 12px; margin: 0 2px 6px; }
  .pn-who .avatar { width: 42px; height: 42px; font-size: 15px; }
  .pn-who .grow { flex: 1; min-width: 0; } .pn-who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pn-who small { display: block; color: var(--text-2); }
  .pn-sec h3 { margin: 18px 4px 8px; font: 600 12px/1.2 Inter, system-ui, sans-serif; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-2); }
  .pn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .pn-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 86px; padding: 12px 6px; border-radius: 16px;
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; font-size: 13px; font-weight: 600; text-align: center; text-decoration: none; line-height: 1.2; }
  .pn-tile:not(:disabled):hover { background: var(--tint) !important; box-shadow: none !important; transform: none; color: var(--text); }
  .pn-tile .pn-lbl { white-space: normal; }
  .pn-tile .pn-ic { color: var(--accent); }
  .pn-tile .pn-ic.solid { width: 36px; height: 36px; border-radius: 10px; background: var(--tile); color: #fff; }
  .pn-tile .pn-ic.solid svg { width: 20px; height: 20px; }
  .pn-tile.on { border-color: var(--accent); background: var(--tint); color: var(--accent); }
  .pn-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
  .pn-foot > :first-child { margin-right: auto; }
  /* Staff top bar on a phone: logo, page title, live count, Edvance systems and the avatar (which opens the sheet). */
  body.has-phone-bar #menuBtn, body.has-phone-bar #teachBtn, body.has-phone-bar header.top .theme-pick, body.has-phone-bar header.top .portal-status,
  body.has-phone-bar:not(.side-open) :is(.side, .side-shade) { display: none !important; }
  body.has-phone-bar header.top .avatar { cursor: pointer; width: 36px; height: 36px; }
  body.has-phone-bar header.top .top-tools { gap: 6px; }
  body.has-phone-bar header.top .ypr-sys { order: 1; } body.has-phone-bar header.top .avatar { order: 2; }
  .phone-bar button { font-size: 11px; letter-spacing: -.01em; }
}
@media (max-width: 640px) {
  /* Dashboard figures two to a row with just the number, like the LMS; the chart below still shows the trend. */
  .dash-grid:not(.now) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dash-grid:not(.now) .dash-card { padding: 14px; }
  .dash-grid:not(.now) .dash-card :is(.dash-sub, .dash-hint, .dash-bars) { display: none; }
  .dash-grid:not(.now) .dash-num { font-size: 24px; }
}
@media print { .phone-bar, .pn-sheet, .pn-shade { display: none !important; } }
/* Student portal on a phone: one-line header (logo, title, avatar) like the LMS, with the server time and portal
   status in a slim row under it; the name, Easy-read, Change password and Sign out are in the More sheet. */
@media (max-width: 900px) {
  .utility nav { gap: 18px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .utility .wrap { justify-content: flex-start; }
  body.portal.has-phone-bar .utility { display: none; }
  body.portal.has-phone-bar .brandbar { position: sticky; top: 0; z-index: 30; }
  body.portal.has-phone-bar .brandbar .wrap { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; padding-bottom: 10px; }
  body.portal.has-phone-bar .brandbar .brand { flex: 1 1 0; min-width: 0; }
  body.portal.has-phone-bar .brandbar .brand span { display: none; }
  body.portal.has-phone-bar .brandbar .brand b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  body.portal.has-phone-bar .brandbar > .wrap > .avatar { display: inline-grid; width: 38px; height: 38px; padding: 0; border-radius: 50%; font-size: 14px; box-shadow: none; }
  body.portal.has-phone-bar .brand-user { flex: 1 1 100%; flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
  body.portal.has-phone-bar .brand-user :is(#who, #chpw, #logout, .vision-btn) { display: none !important; }
  body.portal.has-phone-bar .brand-user .srvtime { order: 0; flex: 0 1 auto; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; padding: 0; }
  body.portal.has-phone-bar .brand-user .srvtime small { font-size: 9.5px; }
  body.portal.has-phone-bar .brand-user .srvtime b { font-size: 12.5px; }
  body.portal.has-phone-bar .status-stack { flex-direction: row; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  body.portal.has-phone-bar .status-stack .badge, body.portal.has-phone-bar button.proctor-btn { font-size: 11.5px; }
  /* Assessment tabs as chips, as on the LMS pages. */
  body.portal.has-phone-bar .exam-tabs { border-bottom: 0; gap: 8px; scrollbar-width: none; padding-bottom: 2px; }
  body.portal.has-phone-bar #examTabs button.exam-tab { border: 1px solid var(--border); border-radius: 99px; padding: 8px 14px; background: var(--surface); }
  body.portal.has-phone-bar #examTabs button.exam-tab.active { background: var(--text); color: var(--surface); border-color: var(--text); }
  body.portal.has-phone-bar #examTabs button.exam-tab.active .count { background: color-mix(in srgb, var(--surface) 22%, transparent); color: inherit; }
  body.portal.has-phone-bar .portal-foot { padding-bottom: 8px; }
}
@media (max-width: 600px) { header.top .vision-btn span { display: none; } header.top .vision-btn { padding: 4px 8px; } }

/* Exam top bar: battery and connection, live (DeviceStatus in incident.js). */
.device-status { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.device-status:empty { display: none; }
.ds-item { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.ds-item.ok { color: var(--ok); }
.ds-item.warn { color: var(--warn); }
.ds-item.bad { color: var(--bad); }
.ds-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.ds-icon.ds-batt { width: 24px; height: 14px; }
.ds-icon path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ds-icon path.off { opacity: .25; }
.ds-icon .fill { fill: currentColor; stroke: none; }
.ds-icon circle.off { opacity: .25; }
.ds-icon .cut { stroke-width: 2.4; }
.ds-icon .shell { fill: none; stroke: currentColor; stroke-width: 1.6; }
.ds-icon .level { fill: currentColor; }
.ds-icon .bolt { fill: var(--surface, #fff); stroke: none; }
@media (max-width: 600px) { .device-status { gap: 6px; font-size: 12px; } .device-status .ds-conn .ds-text { display: none; } }

/* Student portal: one paper at a time, the others as buttons above it (onePaper in index.html). */
.paper-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.paper-pick > span { flex-basis: 100%; }
.paper-pick button { background: var(--glass, var(--surface)); color: var(--text); border: 1px solid var(--glass-line, var(--border)); border-radius: 12px; padding: 7px 12px; font-weight: 500; box-shadow: none; display: inline-flex; align-items: center; gap: 6px; }
.paper-pick button:hover { transform: none; border-color: var(--accent); }
.paper-pick button .kind { color: var(--text-2); font-size: 12.5px; }
.paper-pick button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.paper-pick button.active .kind { color: rgba(255,255,255,.85); }
.paper-pick .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.paper-pick button.active .dot { background: #fff; }
