@font-face { font-family: "Archivo"; src: url(../fonts/archivo.woff2) format("woff2-variations"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(../fonts/atkinson.woff2) format("woff2-variations"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(../fonts/atkinson-italic.woff2) format("woff2-variations"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --bg: #F3F6FA;
  --surface: #FFFFFF;
  --ink: #0E2440;
  --ink-2: #4A5B73;
  --ink-3: #74849A;
  --line: #DCE3ED;
  --line-2: #EBF0F6;
  --blue: #1F63D6;
  --blue-soft: #E7F0FD;
  --amber: #F2A33A;
  --amber-soft: #FFF4E3;
  --go: #13875A;
  --go-soft: #E3F5EC;
  --stop: #C93C3C;
  --stop-soft: #FCEAEA;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 2px rgba(14,36,64,.06), 0 4px 14px rgba(14,36,64,.05);
  --display: "Archivo", system-ui, sans-serif;
  --body: "Atkinson", "Atkinson Hyperlegible Next", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); font-stretch: 88%; line-height: 1.12; margin: 0; letter-spacing: -.005em; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 780; }
h2 { font-size: 24px; font-weight: 750; }
h3 { font-size: 19px; font-weight: 720; }
p { margin: 0; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--ink-2); }
.small { font-size: 14.5px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; font-stretch: 90%; }
.nowrap { white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar { background: var(--ink); color: #fff; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.demobar { position: fixed; top: 0; left: 0; right: 0; z-index: 90; transform: translateY(-100%); transition: transform .25s ease; }
.demobar.open { transform: none; box-shadow: 0 4px 14px rgba(15, 33, 64, .15); }
.demobar-in { background: var(--amber-soft); color: #6B4208; font-size: 14.5px; padding: 8px 20px; display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; text-align: center; border-bottom: 1px solid #F3D7A8; }
.demotab { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: 34px; height: 16px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0 0 8px 8px; background: rgba(120, 135, 160, .5); color: #fff; cursor: pointer; opacity: .6; transition: opacity .15s, background .15s; }
.demotab:hover, .demotab:focus-visible { opacity: 1; background: var(--amber-soft); color: #6B4208; }
.demobar.open .demotab { opacity: 1; background: var(--amber-soft); color: #6B4208; border: 1px solid #F3D7A8; border-top: 0; }
.demobar.open .demotab svg { transform: rotate(180deg); }
.demologin { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.demologin .btn { justify-content: flex-start; }
.demologin code { background: var(--line-2); padding: 1px 6px; border-radius: 5px; }
.topbar .in { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 22px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: 21px; white-space: nowrap; }
.brand .logo { display: flex; align-items: center; }
.brand .logo img { display: block; height: 34px; width: auto; }
.brand .logo.dark img { height: 44px; }
.rolebadge { font-family: var(--body); font-stretch: 100%; font-weight: 800; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; line-height: 1; color: var(--ink); background: var(--amber); padding: 5px 9px 4px; border-radius: 999px; white-space: nowrap; box-shadow: 0 0 0 3px rgba(242,163,58,.18); }
.topbar { background: linear-gradient(100deg, #0B1D37 0%, #12305A 48%, #0E2546 100%); box-shadow: 0 6px 20px rgba(11, 29, 55, .18); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(242,163,58,.85) 20%, rgba(90,169,255,.8) 80%, transparent); }
/* links sit in one frosted, rounded bar; the current page is a solid white pill */
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; align-items: center; margin-left: 14px; padding: 4px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); }
.nav a { display: inline-flex; align-items: center; gap: 7px; color: #C3D1E3; text-decoration: none; padding: 7px 16px; border-radius: 999px; white-space: nowrap; font-size: 14.5px; font-weight: 600; letter-spacing: .005em;
  transition: color .18s, background .18s, box-shadow .18s; }
.nav a .ic { width: 16px; height: 16px; opacity: .8; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.nav a.on { color: var(--ink); background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.22); }
.nav a.on .ic { opacity: 1; color: var(--ink); }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; color: #C9D6E6; font-size: 14.5px; white-space: nowrap; }
.userchip { display: inline-flex; align-items: center; gap: 9px; padding: 3px 3px 3px 13px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  color: #E3EBF5; text-decoration: none; font-weight: 600; transition: background .15s, border-color .15s; }
.userchip:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.24); }
.who .avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #2F6FD6, #1B4FA8); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 13.5px;
  box-shadow: 0 0 0 2px rgba(242,163,58,.9); }
.signout { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); color: #C9D6E6; transition: background .15s, color .15s, border-color .15s; }
.signout:hover { background: rgba(201,60,60,.22); border-color: rgba(255,140,140,.45); color: #fff; }
.signout .ic { width: 17px; height: 17px; }
.iconbtn { background: none; border: 0; color: inherit; padding: 8px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; }
.iconbtn:hover { background: rgba(255,255,255,.08); }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .topbar .in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; gap: 6px 14px; }
  .nav { order: 3; width: 100%; margin: 0 0 4px; }
  .who .name { display: none; }
  .userchip { padding: 3px; }
}
/* The admin bar has eight links: drop the name text first, then give the links their own row. */
@media (max-width: 1300px) { .topbar.admin .who .name { display: none; } .topbar.admin .userchip { padding: 3px; } }
@media (max-width: 1180px) {
  .topbar.admin .in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; gap: 6px 14px; }
  .topbar.admin .nav { order: 3; width: 100%; margin: 0 0 4px; }
}

/* ---------- layout ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 28px 20px 80px; }
.page.narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin-top: 6px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-size: 15px; margin-bottom: 14px; }
.crumb:hover { color: var(--ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-pad { padding: 22px; }
.panel h2 + p, .panel h3 + p { margin-top: 4px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.split.even { grid-template-columns: 1fr 1fr; }
.split > * { min-width: 0; }
@media (max-width: 980px) { .split, .split.even { grid-template-columns: 1fr; } }
/* module page on one column: video, then the quiz, then key points, chapters and reading */
@media (max-width: 980px) {
  .modsplit { gap: 16px; }
  .modsplit > .stack { display: contents; }
  .modsplit #playerHost { order: 1; }
  .modsplit #watchNote { order: 2; }
  .modsplit #quizHost { order: 3; }
  .modsplit .kp { order: 4; }
  .modsplit aside > * { order: 5; }
  .modsplit aside > #quizHost { order: 3; }
  .modsplit .watch-note:empty { display: none; }
}
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- buttons & form ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px;
  font-weight: 700; font-size: 15.5px; cursor: pointer; text-decoration: none; line-height: 1.2; background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn:hover { border-color: #C3CEDC; }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.primary:hover { background: #1854BA; }
.btn.amber { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn.amber:hover { background: #E8952A; }
.btn.danger { color: var(--stop); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-2); color: var(--ink); }
.btn.sm { padding: 7px 11px; font-size: 14px; border-radius: 8px; }
.btn.lg { padding: 13px 22px; font-size: 17px; }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
label.f { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 14px; }
label.f > span.h { display: block; font-weight: 400; color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.input, select.input, textarea.input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #C9D3E0; border-radius: 9px; background: #fff; font-weight: 400; font-size: 16px; }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,99,214,.18); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.err { background: var(--stop-soft); color: #8E2323; border-radius: 9px; padding: 10px 12px; font-size: 15px; margin-bottom: 14px; }
.ok { background: var(--go-soft); color: #0B5E3D; border-radius: 9px; padding: 10px 12px; font-size: 15px; }

/* ---------- chips / status ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.4; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.tag.go { background: var(--go-soft); color: var(--go); }
.tag.stop { background: var(--stop-soft); color: var(--stop); }
.tag.amber { background: var(--amber-soft); color: #94590C; }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag .ic { width: 14px; height: 14px; }
.bar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.bar.go > i { background: var(--go); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .side { background: var(--ink); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login .side h1 { font-size: clamp(36px, 4.4vw, 60px); font-weight: 820; font-stretch: 78%; line-height: .98; max-width: 560px; margin-top: 48px; }
.login .side p { color: #C9D6E6; font-size: 18px; max-width: 460px; margin-top: 18px; }
.login .callline { margin-top: 40px; display: flex; align-items: center; max-width: 520px; }
.login .callline span { flex: 1; height: 3px; background: rgba(157,178,207,.3); }
.login .callline i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid rgba(157,178,207,.5); flex: none; }
.login .callline i.on { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 7px rgba(242,163,58,.2); }
.login .callline i.done { background: #5AA9FF; border-color: #5AA9FF; }
.login .form { display: grid; place-items: center; padding: 40px 24px; }
.login form { width: 100%; max-width: 380px; }
.login form h2 { font-size: 28px; margin-bottom: 6px; }
.login form p.muted { margin-bottom: 24px; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login .side { padding: 32px 24px; } .login .side h1 { margin-top: 24px; } .login .side .foot { display: none; } }

/* ---------- call path (signature) ---------- */
.path-card { padding: 26px 26px 22px; }
.callpath { --cols: 7; --n: 7; position: relative; display: grid; grid-template-columns: repeat(var(--cols), 1fr); margin-top: 22px; }
.callpath + .callpath { margin-top: 30px; }
.callpath::before { content: ""; position: absolute; left: calc(100% / var(--cols) / 2); width: calc(100% * (var(--n) - 1) / var(--cols)); top: 23px; height: 4px; background: var(--line); border-radius: 2px; }
.callpath .fill { position: absolute; left: calc(100% / var(--cols) / 2); top: 23px; height: 4px; background: #5AA9FF; border-radius: 2px; }
.stop-pt { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink); padding: 0 4px; }
.stop-pt .dot { width: 50px; height: 50px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--ink-3); position: relative; z-index: 1; transition: transform .15s; }
.stop-pt:hover .dot { transform: scale(1.06); }
.stop-pt.passed .dot { background: #5AA9FF; border-color: #5AA9FF; color: #fff; }
.stop-pt.now .dot { background: var(--amber); border-color: var(--amber); color: var(--ink); box-shadow: 0 0 0 8px rgba(242,163,58,.22); }
.stop-pt.now .dot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--amber); animation: ring 2s ease-out infinite; }
.stop-pt.locked .dot { color: #A9B6C7; }
.stop-pt.exam .dot { border-radius: 14px; }
.stop-pt .lbl, .stop-pt .sc { display: block; }
.stop-pt .lbl { margin-top: 10px; font-size: 13.5px; line-height: 1.25; font-weight: 700; max-width: 120px; }
.stop-pt .sc { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.stop-pt.passed .sc { color: var(--go); font-weight: 700; }
@keyframes ring { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stop-pt.now .dot::after { animation: none; } }
@media (max-width: 760px) {
  .callpath { grid-template-columns: none; gap: 14px; }
  .callpath + .callpath { margin-top: 14px; }
  .callpath::before { left: 23px; right: auto; top: 24px; bottom: 24px; width: 4px; height: auto; }
  .callpath .fill { display: none; }
  .stop-pt { flex-direction: row; align-items: center; text-align: left; gap: 14px; padding: 0; }
  .stop-pt .dot { flex: none; }   /* never squeeze the circle when a module name is long */
  .stop-pt > span:last-child { min-width: 0; flex: 1; }
  .stop-pt .lbl { margin: 0; max-width: none; font-size: 15px; }
}

/* ---------- home ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.hello p { margin-top: 6px; font-size: 18px; color: var(--ink-2); }
.mod-list { display: flex; flex-direction: column; }
.mod-item { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.mod-item:first-child { border-top: 0; }
.mod-item:hover { background: #FAFCFE; }
.mod-item .n { width: 44px; height: 44px; border-radius: 12px; background: var(--line-2); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--ink-2); }
.mod-item.passed .n { background: var(--go-soft); color: var(--go); }
.mod-item.now .n { background: var(--amber); color: var(--ink); }
.mod-item.locked { color: var(--ink-3); }
.mod-item.locked .n { color: #A9B6C7; }
.mod-item h3 { font-size: 18px; }
.mod-item p { font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }
.mod-item.locked p { color: var(--ink-3); }
@media (max-width: 560px) { .mod-item { grid-template-columns: 44px minmax(0,1fr); padding: 14px 16px; } .mod-item > span:last-child { grid-column: 2; } }
.readlist a { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-size: 15.5px; }
.readlist a:first-child { border-top: 0; }
.readlist .st { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--line-2); color: var(--ink-3); }
.readlist .st.read { background: var(--go-soft); color: var(--go); }
.readlist .st.opened { background: var(--amber-soft); color: #94590C; }
.readlist .st .ic { width: 15px; height: 15px; }

/* ---------- module / video ---------- */
.player { position: relative; background: #0E2440; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.player video { width: 100%; height: 100%; display: block; background: #0E2440; }
.capbox { position: absolute; left: 6%; right: 6%; bottom: 62px; text-align: center; pointer-events: none; }
.capbox span { display: inline; background: rgba(8,20,36,.86); color: #fff; font-size: clamp(14px, 2vw, 22px); line-height: 1.5; padding: 3px 10px; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.player video::cue { font-family: var(--body); font-size: clamp(14px, 2.2vw, 24px); background: rgba(8,20,36,.82); color: #fff; line-height: 1.35; }
.player .big-play { position: absolute; inset: 0; margin: auto; width: 88px; height: 88px; border-radius: 50%; border: 0; background: var(--amber); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 30px rgba(0,0,0,.35); }
.player .big-play .ic { width: 36px; height: 36px; margin-left: 4px; }
.player.playing .big-play { display: none; }
.controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; background: linear-gradient(transparent, rgba(8,20,36,.85)); color: #fff; display: flex; align-items: center; gap: 6px; opacity: 1; transition: opacity .2s; }
.player.playing.idle .controls { opacity: 0; }
.controls .iconbtn { color: #fff; padding: 7px; }
.controls .iconbtn > * { pointer-events: none; }
.controls .time { font-size: 13.5px; font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; }
.seek { flex: 1; position: relative; height: 22px; cursor: pointer; display: flex; align-items: center; }
.seek .track { position: absolute; left: 0; right: 0; height: 5px; border-radius: 3px; background: rgba(255,255,255,.22); }
.seek .watched { position: absolute; left: 0; height: 5px; border-radius: 3px; background: rgba(90,169,255,.55); }
.seek .played { position: absolute; left: 0; height: 5px; border-radius: 3px; background: var(--amber); }
.seek .knob { position: absolute; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(242,163,58,.3); }
.seek .mark { position: absolute; width: 2px; height: 9px; background: rgba(255,255,255,.55); }
.speed { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 6px; padding: 4px 6px; font-size: 13px; }
.speed option { color: var(--ink); }
.watch-note { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.chapters { list-style: none; margin: 0; padding: 0; }
.chapters li button { width: 100%; text-align: left; display: flex; gap: 12px; align-items: baseline; padding: 9px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--ink); }
.chapters li button:hover { background: var(--line-2); }
.chapters li button[disabled] { color: var(--ink-3); cursor: default; background: none; }
.chapters .t { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 13.5px; min-width: 40px; }
.chapters li.on button { background: var(--amber-soft); }
.keypoints { margin: 0; padding: 0; list-style: none; counter-reset: k; }
.keypoints li { position: relative; padding: 10px 0 10px 40px; border-top: 1px solid var(--line-2); }
.keypoints li:first-child { border-top: 0; }
.keypoints li::before { counter-increment: k; content: counter(k); position: absolute; left: 0; top: 10px; width: 26px; height: 26px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-family: var(--display); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.quizbox { border-left: 5px solid var(--amber); }
.quizbox.passed { border-left-color: var(--go); }
.attempts { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 10px; }
.attempts td { padding: 8px 0; border-top: 1px solid var(--line-2); }

/* ---------- quiz ---------- */
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.quiz-top .bar { flex: 1; }
.qcard { padding: 30px; }
.qcard .qn { font-size: 14.5px; font-weight: 700; color: var(--ink-3); margin-bottom: 8px; }
.qcard h2 { font-family: var(--body); font-stretch: 100%; font-size: clamp(20px, 2.6vw, 25px); line-height: 1.35; font-weight: 700; letter-spacing: 0; }
.opts { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.opt { display: flex; align-items: flex-start; gap: 14px; padding: 15px 18px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; text-align: left; font-size: 17px; line-height: 1.45; width: 100%; }
.opt:hover { border-color: #AFC0D6; }
.opt .k { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--ink-3); margin-top: -1px; }
.opt.sel { border-color: var(--blue); background: var(--blue-soft); }
.opt.sel .k { background: var(--blue); border-color: var(--blue); color: #fff; }
.opt.right { border-color: var(--go); background: var(--go-soft); }
.opt.right .k { background: var(--go); border-color: var(--go); color: #fff; }
.opt.wrong { border-color: var(--stop); background: var(--stop-soft); }
.opt.wrong .k { background: var(--stop); border-color: var(--stop); color: #fff; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 10px; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dots button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.dots button.ans { background: var(--blue-soft); border-color: #B9D1F6; color: var(--blue); }
.dots button.cur { outline: 2px solid var(--ink); }
.dots button .ic { width: 15px; height: 15px; }
/* voice-answer questions */
.vrec { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px; border: 2px dashed var(--line); border-radius: 14px; background: #fff; }
.vrec.live { border-style: solid; border-color: var(--stop); background: #FFF6F6; }
.vrec.done { border-style: solid; border-color: #B7E2CB; background: #F5FBF8; }
.vrec audio { flex: 1; min-width: 220px; height: 40px; }
.recdot { width: 14px; height: 14px; border-radius: 50%; background: var(--stop); animation: recpulse 1s ease-in-out infinite; }
@keyframes recpulse { 50% { opacity: .35; transform: scale(.8); } }
.lvl { flex: 1; min-width: 120px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.lvl i { display: block; height: 100%; width: 0; background: var(--go); transition: width .08s; }
.vsent { padding: 12px 14px; border-radius: 10px; background: var(--line-2); }
.result-hero { text-align: center; padding: 38px 24px; }
.result-hero .score { font-family: var(--display); font-weight: 830; font-stretch: 80%; font-size: clamp(64px, 12vw, 108px); line-height: 1; margin: 10px 0 6px; }
.result-hero.pass .score { color: var(--go); }
.result-hero.fail .score { color: var(--stop); }
.review { margin-top: 18px; }
.review .item { padding: 20px 0; border-top: 1px solid var(--line); }
.review .item h3 { font-family: var(--body); font-stretch: 100%; font-size: 17px; line-height: 1.45; display: flex; gap: 10px; }
.review .item h3 .ic { margin-top: 3px; }
.review .opt { cursor: default; font-size: 15.5px; padding: 10px 14px; }
.review .why { margin-top: 10px; font-size: 15px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 10px 14px; }

/* ---------- library / reader ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.lib a.card { display: flex; flex-direction: column; gap: 8px; padding: 18px; text-decoration: none; color: var(--ink); min-height: 150px; }
.lib a.card:hover { border-color: #B8C6D8; }
.lib .cat { font-size: 13px; color: var(--ink-3); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.lib .card p { font-size: 15px; color: var(--ink-2); flex: 1; }
.reader { padding: clamp(22px, 4vw, 44px); }
.reader .doc h2 { margin: 34px 0 12px; font-size: 23px; }
.reader .doc h3 { margin: 20px 0 8px; }
.reader .doc p { margin: 10px 0; }
.reader .doc ul, .reader .doc ol { padding-left: 24px; }
.reader .doc li { margin: 5px 0; }
.reader .doc .lede { font-size: 19px; color: var(--ink-2); }
.reader .doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15.5px; }
.reader .doc th { text-align: left; background: var(--bg); padding: 10px 12px; font-size: 14px; }
.reader .doc td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.reader .doc .say { border-left: 5px solid var(--blue); background: var(--blue-soft); border-radius: 10px; padding: 12px 16px; margin: 10px 0; }
.reader .doc .say p { margin: 0; font-size: 17.5px; }
.reader .doc .say-who { display: block; font-size: 13px; font-weight: 700; color: var(--blue); margin-bottom: 3px; }
.reader .doc .say-customer { border-left-color: var(--amber); background: var(--amber-soft); }
.reader .doc .say-customer .say-who { color: #94590C; }
.reader .doc .say-internal { border-left: 5px dashed var(--amber); background: #FFFBF3; }
.reader .doc .say-internal .say-who { color: #94590C; }
.reader .doc .say-system { border-left-color: var(--ink-3); background: var(--bg); font-style: italic; }
.reader .doc .say-system .say-who { color: var(--ink-3); font-style: normal; }
.reader .doc .note { color: var(--ink-2); font-size: 15.5px; padding-left: 14px; border-left: 3px solid var(--line); }
.reader .doc ol.cols { columns: 2; column-gap: 40px; }
@media (max-width: 600px) { .reader .doc ol.cols { columns: 1; } }
.ackbar { position: sticky; bottom: 0; margin-top: 24px; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: 14px 18px; display: flex; align-items: center; gap: 14px; border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.viewer-frame { width: 100%; height: 70vh; border: 0; border-radius: 10px; background: var(--bg); }

/* ---------- tables (admin & scores) ---------- */
.tbl-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th { text-align: left; font-size: 13px; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFBFD; position: sticky; top: 0; }
table.data th button { all: unset; cursor: pointer; }
table.data td { padding: 11px 12px; border-top: 1px solid var(--line-2); vertical-align: middle; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: #FAFCFE; }
table.data .name { font-weight: 700; }
table.data .sub { font-size: 13px; color: var(--ink-3); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { padding: 18px 20px; }
.kpi .v { font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: 34px; line-height: 1.1; margin-top: 4px; }
.kpi .l { font-size: 14px; color: var(--ink-2); font-weight: 700; }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { margin: 0; width: auto; min-width: 180px; padding: 8px 10px; font-size: 15px; }
.matrix td.c { text-align: center; }
.matrix .m { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.matrix .m.read { background: var(--go-soft); color: var(--go); }
.matrix .m.opened { background: var(--amber-soft); color: #94590C; }
.matrix .m.none { color: #B8C4D3; }
.matrix th.rot { white-space: normal; min-width: 92px; font-size: 12.5px; line-height: 1.25; vertical-align: bottom; }
.credcard { border: 2px dashed var(--blue); background: var(--blue-soft); border-radius: 12px; padding: 16px 18px; }
.credcard dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0; }
.credcard dt { color: var(--ink-2); font-size: 14px; }
.credcard dd { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; font-weight: 700; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 14.5px; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.timeline time { color: var(--ink-3); }
details.attempt summary { cursor: pointer; list-style: none; }
details.attempt summary::-webkit-details-marker { display: none; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 15px; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--amber); }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.empty .ic { width: 34px; height: 34px; color: var(--ink-3); margin-bottom: 8px; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(14,36,64,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; padding: 24px; }
.modal.wide { max-width: 860px; }
.charts { margin-bottom: 24px; }
.chartcard { min-width: 0; }
.ch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ch-head h2 { font-size: 19px; }
.ch-scroll { max-height: 480px; overflow-y: auto; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .passline { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .5; }
.chart .ax { font: 600 11px var(--body); fill: var(--ink-3); }
.chart .ax.pass { fill: var(--ink-2); }
.chart .lab { font: 600 13px var(--body); fill: var(--ink-2); }
.chart .val { font: 700 13px var(--body); fill: var(--ink); }
.chart .none { font: italic 600 12.5px var(--body); fill: var(--ink-3); }
.chart .hit { transition: opacity .12s; }
.chart .hit:hover { opacity: .75; }
/* agents list */
.agentrow { cursor: pointer; transition: background .12s; }
.agentrow:hover { background: #F5F9FF; }
.agentrow:hover .agentcell b { color: var(--blue); }
.agentrow.off { opacity: .6; }
.agentcell { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 210px; }
.agentcell .av { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .02em;
  color: hsl(var(--h) 55% 30%); background: hsl(var(--h) 75% 90%); box-shadow: inset 0 0 0 2px hsl(var(--h) 60% 80%); }
.agentcell .who-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.agentcell b { font-size: 15.5px; transition: color .12s; }
.agentcell small { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--blue-soft); color: #1B4FA8; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip.cc { background: hsl(var(--h) 85% 93%); color: hsl(var(--h) 65% 28%); box-shadow: inset 0 0 0 1px hsl(var(--h) 60% 84%); }
.miniprog { display: flex; align-items: center; gap: 8px; }
.miniprog .bar { width: 90px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--ink-3); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #B5C0CF; }
.status.on { color: var(--go); }
.status.on i { background: var(--go); box-shadow: 0 0 0 3px rgba(19,135,90,.18); }
.seen { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); }
.seen i { width: 8px; height: 8px; border-radius: 50%; background: #C7D0DC; }
.seen.today i { background: var(--go); }
.seen.week i { background: var(--amber); }
.seen.never { color: var(--ink-3); }
.nowon { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.nowon .ic { width: 14px; height: 14px; color: var(--blue); flex: none; }
/* table cells: modules, questions, library */
.rowx { transition: background .12s; }
.rowx:hover { background: #F7FAFE; }
.rowx.off { opacity: .6; }
.numdot { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; background: var(--blue-soft); color: #1B4FA8; font-family: var(--display); font-weight: 800; font-size: 14.5px; }
.numdot.exam { background: #FDF0DC; color: #A8620F; }
.numdot .ic { width: 16px; height: 16px; }
.titlecell { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.titlecell b { font-size: 15.5px; }
.titlecell small { color: var(--ink-3); font-size: 13px; }
.meta { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--line-2); color: var(--ink); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meta .ic { width: 14px; height: 14px; color: var(--ink-3); }
.passpill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #FDF0DC; color: #8A5208; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.qtext { display: block; font-weight: 600; color: var(--ink); line-height: 1.4; }
.qopts { color: var(--ink-3); font-size: 12.5px; }
.answer { display: inline-flex; align-items: flex-start; gap: 7px; padding: 6px 11px; border-radius: 10px; background: #E6F5EE; color: #0E6B47; font-weight: 600; font-size: 14px; line-height: 1.4; }
.answer .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.itemcell { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.ico-tile { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: hsl(var(--h) 85% 93%); color: hsl(var(--h) 60% 35%); }
.ico-tile .ic { width: 18px; height: 18px; }
.tchip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: hsl(var(--h) 85% 93%); color: hsl(var(--h) 62% 30%); font-weight: 800; font-size: 13px; white-space: nowrap; }
.modref { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--ink-2); font-weight: 600; line-height: 1.35; }
.modref .ic { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--ink-3); }
/* agent profile */
.profile-hero { display: flex; align-items: center; gap: 20px; padding: 22px 24px; margin: 6px 0 18px; }
.profile-hero.off { opacity: .75; }
.av.big { flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 27px;
  color: hsl(var(--h) 55% 30%); background: hsl(var(--h) 75% 90%); box-shadow: inset 0 0 0 3px hsl(var(--h) 60% 80%); }
.ph-main { flex: 1; min-width: 0; }
.ph-main h1 { font-size: clamp(26px, 3.4vw, 36px); }
.ph-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; font-size: 14px; }
.ph-item { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.ph-item .ic { width: 15px; height: 15px; color: var(--ink-3); }
.kpi .l { display: flex; align-items: center; gap: 7px; }
.kpi .l .ic { width: 16px; height: 16px; color: var(--ink-3); }
.kpi .of { font-size: .55em; color: var(--ink-3); font-weight: 700; margin-left: 2px; }
.sec-h { display: flex; align-items: center; gap: 9px; margin: 28px 0 12px; }
.sec-h .ic { width: 20px; height: 20px; color: var(--blue); }
.vwatch { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 8px; border-radius: 999px; background: var(--blue-soft); color: #1B4FA8; font-weight: 800; font-size: 13.5px; }
.vwatch .ic { width: 13px; height: 13px; fill: currentColor; }
.passbadge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 8px; background: var(--go); color: #fff; font-weight: 800; font-size: 13.5px; box-shadow: 0 2px 6px rgba(19,135,90,.25); }
.passbadge .ic { width: 15px; height: 15px; }
.cell-date { display: block; margin-top: 4px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.meta.yel { background: #EFEAFB; color: #45338A; }   /* times opened: lavender, so it doesn't look like the amber “Opened” label */
.meta.yel .ic { color: #6B55C2; }
.meta.teal { background: #DDF4F3; color: #0F5F5B; }
.meta.teal .ic { color: #1A8C86; }
.ring { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.ring .track { fill: none; stroke: var(--line); stroke-width: 3; }
.ring .val { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; }
.ring.done { color: var(--go); }
.ring.done .val { stroke: var(--go); }
.data .divcol { border-left: 2px solid var(--line); }
.date-open { color: var(--ink-2); }
.date-read { color: var(--go); font-weight: 700; }
/* agent profile tables: badges in regular weight */
.data.light .meta, .data.light .vwatch, .data.light .passbadge, .data.light .scorepill, .data.light .cell-date, .data.light .tag, .data.light .ring, .data.light .date-read { font-weight: 500; }
.scorepill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.scorepill.go { background: #E6F5EE; color: #0E6B47; }
.scorepill.stop { background: #FCE9E9; color: #A12B2B; }
.attempts { padding: 6px 0; }
.attempt { border-top: 1px solid var(--line-2); }
.attempt:first-child { border-top: 0; }
.attempt summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 13px 20px; cursor: pointer; transition: background .12s; }
.attempt summary::-webkit-details-marker { display: none; }
.attempt summary:hover { background: #F7FAFE; }
.att-row { display: flex; align-items: center; gap: 14px; padding: 13px 20px; }
@media (max-width: 700px) { .att-row { flex-wrap: wrap; gap: 6px 12px; } }
.att-date { display: inline-flex; align-items: center; gap: 6px; min-width: 165px; color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.att-date .ic { width: 14px; height: 14px; }
.att-mod { flex: 1; font-weight: 700; font-size: 15.5px; min-width: 0; }
.att-score { font-weight: 700; color: var(--ink-2); }
.att-result { font-size: 13px; font-weight: 700; min-width: 78px; }
.att-result.go { color: var(--go); }
.att-result.stop { color: var(--stop); }
.att-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 700; white-space: nowrap; }
.att-toggle .ic { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .15s; }
.attempt[open] .att-toggle .ic { transform: rotate(-90deg); }
.attempt[open] summary { background: #F7FAFE; }
.ans { padding: 4px 20px 14px; }
.ansrow { display: flex; gap: 12px; padding: 11px 14px; margin-top: 8px; border-radius: 12px; border: 1px solid var(--line-2); }
.ansrow.ok { background: #F4FBF7; border-color: #CBEBDB; }
.ansrow.bad { background: #FFF6F6; border-color: #F3D2D2; }
.ans-ic { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.ansrow.ok .ans-ic { background: var(--go); }
.ansrow.bad .ans-ic { background: var(--stop); }
.ans-ic .ic { width: 14px; height: 14px; }
.ans-lines { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 5px; font-size: 14px; }
.ans-pick { color: var(--ink-2); }
.ans-right { display: inline-flex; align-items: center; gap: 5px; color: var(--go); font-weight: 700; }
.ans-right .ic { width: 14px; height: 14px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.feed li:first-child { border-top: 0; }
.feed-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: #1B4FA8; }
.feed-ic .ic { width: 15px; height: 15px; }
.ev-quiz_submit .feed-ic, .ev-video_complete .feed-ic, .ev-resource_ack .feed-ic { background: #E6F5EE; color: var(--go); }
.ev-voice_submit .feed-ic { background: #F1E8FC; color: #6B3FB0; }
.ev-session_start .feed-ic { background: var(--line-2); color: var(--ink-2); }
.feed-t { flex: 1; font-weight: 500; color: var(--ink); }
.feed time { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
@media (max-width: 700px) {
  .profile-hero { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .av.big { width: 58px; height: 58px; font-size: 21px; }
  .ph-main { flex: 1 1 calc(100% - 80px); }
  .profile-hero > .btn { width: 100%; }
  .attempt summary { flex-wrap: wrap; gap: 6px 12px; }
  .att-date { min-width: 0; width: 100%; }
}
/* voice answers waiting for review (Overview) */
.vpend { position: relative; display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 2px 7px 2px 5px; border-radius: 999px; background: var(--stop); color: #fff;
  font-size: 11.5px; font-weight: 800; vertical-align: 2px; cursor: pointer; }
.vpend .ic { width: 12px; height: 12px; }
.vpend i { font-style: normal; }
.vpend::after { content: ""; position: absolute; inset: -3px; border-radius: 999px; border: 2px solid var(--stop); animation: vping 1.6s ease-out infinite; }
@keyframes vping { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .vpend::after { animation: none; } }
/* voice answer cards (admin) */
.vcard { padding: 16px; margin-top: 14px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 14px; background: #fff; }
.vcard:first-child { margin-top: 0; }
.vcard.vc-todo { border-left-color: var(--amber); }
.vcard.vc-good { border-left-color: var(--go); }
.vcard.vc-work { border-left-color: #E0A030; }
.vc-head { display: flex; align-items: flex-start; gap: 12px; }
.vc-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #F1E8FC; color: #6B3FB0; }
.vc-ic .ic { width: 18px; height: 18px; }
.vc-title { flex: 1; min-width: 0; }
.vc-title b { display: block; font-size: 15px; line-height: 1.4; }
.vc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.vc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.vc-chip .ic { width: 12px; height: 12px; color: var(--ink-3); }
.vc-pending { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #FDF0DC; color: #8A5208; font-size: 13px; font-weight: 700; white-space: nowrap; }
.vc-pending i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: recpulse 1.4s ease-in-out infinite; }
.vc-player { margin: 12px 0; }
.vc-player audio { display: block; width: 100%; height: 40px; }
.vc-missing { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--line-2); color: var(--ink-2); font-size: 13.5px; border: 1px dashed var(--line); }
.vc-missing .ic { flex: none; width: 18px; height: 18px; color: var(--ink-3); }
.vc-review { padding: 12px; border-radius: 12px; background: #F7FAFE; border: 1px solid var(--line-2); }
.vc-label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.vc-label .ic { width: 14px; height: 14px; color: var(--ink-3); }
.vc-review textarea { width: 100%; resize: vertical; min-height: 58px; }
.vc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vc-actions .muted .ic { width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px; }
.vc-feedback { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #F7FAFE; }
.vc-feedback.good { background: #F4FBF7; border-color: #CBEBDB; }
.vc-feedback.work { background: #FFF8EC; border-color: #F3D7A8; }
.vc-fb-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.vc-fb-ic .ic { width: 15px; height: 15px; }
.vc-feedback b { font-size: 13.5px; }
.vc-feedback p { margin: 3px 0 0; font-size: 14.5px; color: var(--ink); }
.vc-waiting { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: #FFF8EC; color: #8A5208; font-size: 13.5px; font-weight: 600; }
.vc-waiting .ic { width: 15px; height: 15px; }
.vc-btn-good { background: var(--go); border-color: var(--go); color: #fff; }
.vc-btn-good:hover { background: #0F7049; }
.vc-btn-work { background: #FDF0DC; border-color: #F3D7A8; color: #8A5208; }
.readby { cursor: help; border-bottom: 1px dotted currentColor; }
.readtip { position: fixed; z-index: 70; max-width: 280px; max-height: 320px; overflow: auto; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.25); pointer-events: none; }
.readtip ul { margin: 6px 0 0; padding-left: 18px; }
.readtip li { margin: 2px 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue, #1E5BD8); text-decoration: underline; cursor: pointer; }
.modvid { display: block; width: 100%; max-height: 40vh; aspect-ratio: 16/9; background: #000; border-radius: 10px; margin: 8px 0 6px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 15px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 60; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loading { padding: 60px; text-align: center; color: var(--ink-3); }

/* ---------- certificate ---------- */
.cert { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: clamp(28px, 6vw, 70px); text-align: center; position: relative; overflow: hidden; }
.cert::before { content: ""; position: absolute; inset: 14px; border: 2px solid var(--ink); border-radius: 10px; pointer-events: none; }
.cert .kick { font-family: var(--display); font-weight: 700; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cert .cert-logo { display: block; height: 56px; width: auto; max-width: 100%; object-fit: contain; }
.cert h1 { font-size: clamp(34px, 6vw, 62px); font-stretch: 78%; font-weight: 830; margin: 16px 0; }
.cert .who { display: block; color: var(--ink); font-family: var(--display); font-size: clamp(26px, 4vw, 40px); font-weight: 750; margin: 10px 0; }
.cert .line { width: 200px; height: 3px; background: var(--amber); margin: 26px auto; }
@media print {
  .topbar, .no-print, #toast { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; }
}


/* ---------- small phones (down to 280px wide) ---------- */
@media (max-width: 520px) {
  /* quiz: question numbers get their own row, Back / Next underneath */
  .quiz-nav { flex-wrap: wrap; }
  .quiz-nav .dots { order: -1; flex: 1 1 100%; margin-bottom: 4px; }
  .quiz-nav .btn { flex: 1 1 0; }
  /* video: smaller controls, speed menu and volume hidden on tiny screens */
  .controls .iconbtn .ic { width: 18px; height: 18px; }
  .feed li { flex-wrap: wrap; row-gap: 2px; }
  .feed time { width: 100%; padding-left: 42px; }
  .controls { flex-wrap: wrap; padding-top: 18px; row-gap: 2px; }
  .controls .seek { order: -1; flex: 1 1 100%; }
  .controls .time { min-width: 0; font-size: 12.5px; }
  .modal { padding: 18px; }
  .modal-foot { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .page { padding-left: 12px; padding-right: 12px; }
  .topbar .in { padding-left: 12px; padding-right: 12px; gap: 6px 8px; }
  .brand .logo img { height: 28px; }
  .rolebadge { padding: 4px 7px 3px; font-size: 10px; }
  .kpis { grid-template-columns: 1fr; gap: 10px; }
  .kpi .v { font-size: 30px; }
  .panel-pad { padding: 16px; }
  .profile-hero { padding: 14px; }
  .ph-meta { gap: 6px 10px; }
  .page-head { flex-wrap: wrap; gap: 12px; }
  .page-head .row { flex-wrap: wrap; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .input { flex: 1 1 100%; min-width: 0; }
  .controls .iconbtn { padding: 5px; }
  .controls .speed, .controls [data-a="mute"] { display: none; }
  .player .big-play { width: 64px; height: 64px; }
  .player .big-play .ic { width: 28px; height: 28px; }
  .capbox { bottom: 70px; }
  h1 { font-size: 26px; }
}
@media (max-width: 320px) {
  .who { gap: 6px; }
  .signout { width: 32px; height: 32px; }
  .who .avatar { width: 28px; height: 28px; font-size: 12px; }
  .nav a { padding: 6px 12px; font-size: 14px; }
  .btn { padding: 9px 13px; }
  .btn.lg { padding: 12px 16px; font-size: 16px; }
}
