:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --fg: #1c2230;
  --muted: #667085;
  --line: #e3e7ef;
  --brand: #e4002b;
  --accent: #2456c5;
  --accent-soft: #eaf0fd;
  --ok: #1d7a35;
  --ok-soft: #e6f4ea;
  --bad: #b3261e;
  --bad-soft: #fdecea;
  --warn-soft: #fff6e0;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151d; --card: #1a202b; --fg: #e8ebf2; --muted: #9aa3b5; --line: #2b3342;
    --accent: #7ea6ff; --accent-soft: #1d2a47; --ok: #6fcf86; --ok-soft: #17301f; --bad: #ff8a80; --bad-soft: #3a1c1a; --warn-soft: #362d14;
  }
}
:root[data-theme="dark"] {
  --bg: #11151d; --card: #1a202b; --fg: #e8ebf2; --muted: #9aa3b5; --line: #2b3342;
  --accent: #7ea6ff; --accent-soft: #1d2a47; --ok: #6fcf86; --ok-soft: #17301f; --bad: #ff8a80; --bad-soft: #3a1c1a; --warn-soft: #362d14;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: "Segoe UI", Arial, Helvetica, sans-serif; line-height: 1.5; }
a { color: var(--accent); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--fg); text-decoration: none; white-space: nowrap; }
.brand .mark { background: var(--brand); color: #fff; padding: 2px 8px; border-radius: 3px; letter-spacing: .5px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.tabs a { padding: 8px 14px; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; font-size: .95rem; }
.tabs a:hover { color: var(--fg); background: var(--bg); }
.tabs a.on { color: var(--accent); background: var(--accent-soft); }

.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 2rem; margin: 0 0 8px; letter-spacing: -.5px; }
.hero p { color: var(--muted); margin: 0; max-width: 720px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; min-width: 140px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 32px 0 14px; flex-wrap: wrap; }
details.book { margin: 0 0 18px; }
details.book > summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; padding: 8px 0; border-bottom: 2px solid var(--line); margin-bottom: 12px; }
details.book > summary::-webkit-details-marker { display: none; }
details.book > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
details.book[open] > summary::before { transform: rotate(90deg); }
details.book > summary h3 { margin: 0; font-size: 1.1rem; }
details.book > summary span { color: var(--muted); font-size: .85rem; }
.section-title h2 { margin: 0; font-size: 1.35rem; }
.section-title p { margin: 0; color: var(--muted); font-size: .92rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; padding-bottom: 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card .sub { color: var(--muted); font-size: .88rem; }
.card .src { color: var(--muted); font-size: .78rem; margin-top: -4px; }
.card .rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: .93rem; }
.row .d { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.tag { font-size: .72rem; background: var(--bg); border: 1px solid var(--line); padding: 1px 7px; border-radius: 99px; color: var(--muted); }
.tag.gt { background: #fff4e0; border-color: #f0c070; color: #8a5a00; font-weight: 600; vertical-align: middle; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font-weight: 600; font-size: .88rem; text-decoration: none; cursor: pointer; white-space: nowrap; font-family: inherit; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
html[data-theme="dark"] .btn.primary, :root:not([data-theme="light"]) .btn.primary { color: #fff; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.small { padding: 4px 10px; font-size: .8rem; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.badge { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.badge.none { background: var(--bg); color: var(--muted); font-weight: 600; }
.sec-ico { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; font-size: 1rem; }
.ico-l { background: #e8f0ff; color: #2456c5; } .ico-r { background: #e9f7ee; color: #1d7a35; }
.ico-w { background: #fff1e5; color: #b9590f; } .ico-s { background: #f4ebff; color: #7a3fc6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sec-ico { filter: brightness(.8) saturate(1.2); } }
.thumb { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px; }
.thumb svg { width: 100%; height: auto; display: block; }
.thumb .chart figcaption { font-size: .8rem; text-align: center; font-weight: 600; color: #222; }
.thumb .chart-table { font-size: .75rem; color: #222; border-collapse: collapse; margin: 0 auto; }
.thumb .chart-table th, .thumb .chart-table td { border: 1px solid #999; padding: 2px 6px; }
.thumb .chart-unit { display: none; }
.prompt { font-size: .92rem; }
.cue { border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; font-size: .9rem; }
.cue ul { margin: 4px 0; padding-left: 18px; }
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }

/* results / history tables */
table.hist { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.hist th, table.hist td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: .92rem; }
table.hist th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; background: var(--bg); }
.table-scroll { overflow-x: auto; padding-bottom: 48px; }

/* results page */
.bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 20px 0; }
.bandbox { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.bandbox .lbl { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; }
.bandbox .val { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.bandbox .raw { color: var(--muted); font-size: .85rem; }
.bandbox.overall { border-color: var(--accent); background: var(--accent-soft); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel h3 { margin-top: 0; }
table.answers { width: 100%; border-collapse: collapse; }
table.answers td, table.answers th { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .92rem; text-align: left; }
table.answers th { font-size: .78rem; color: var(--muted); text-transform: uppercase; }
table.answers tr.ok td.mark { color: var(--ok); font-weight: 700; }
table.answers tr.bad td.mark { color: var(--bad); font-weight: 700; }
table.answers tr.bad td.given { color: var(--bad); text-decoration: line-through; }
table.answers tr.bad td.given.blank { text-decoration: none; font-style: italic; color: var(--muted); }
table.answers .ex { color: var(--muted); font-size: .85rem; }
details.transcript { margin-top: 10px; }
details.transcript summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.tline { margin: 4px 0; font-size: .92rem; }
.tline b { color: var(--muted); font-weight: 600; }
.tline.hit { background: var(--accent-soft, #dce8f7); border-radius: 4px; }
.qm { display: inline-block; min-width: 1.6em; padding: 0 .35em; margin: 0 2px; border-radius: 9px; background: var(--accent); color: var(--bg, #fff);
  font-size: .75rem; font-weight: 700; line-height: 1.5; text-align: center; vertical-align: 1px; }
.qm.hit { box-shadow: 0 0 0 3px var(--fg, #000); }
button.locate { display: block; margin-top: 4px; padding: 1px 6px; font-size: .72rem; border: 1px solid var(--accent); color: var(--accent);
  background: transparent; border-radius: 4px; cursor: pointer; }
button.locate:hover { background: var(--accent); color: var(--bg, #fff); }
.essay-box { white-space: pre-wrap; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--bg); font-size: .95rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
.checklist li { margin: 4px 0; }
select { font-family: inherit; font-size: .9rem; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--fg); }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
  .grid { grid-template-columns: 1fr; }
  .topbar .wrap { gap: 10px; }
}

/* ---------- account */
.acct { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.acct-name { font-weight: 600; font-size: .9rem; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.modal-back { position: fixed; inset: 0; background: rgba(10, 14, 22, .55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--card); color: var(--fg); border-radius: 12px; width: min(400px, 100%); padding: 22px 22px 16px; position: relative; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.modal-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 1.5rem; color: var(--muted); cursor: pointer; }
.modal-tabs { display: flex; gap: 4px; margin-bottom: 14px; }
.modal-tabs button { flex: 1; padding: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-weight: 600; border-radius: 6px; cursor: pointer; }
.modal-tabs button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.modal form { display: flex; flex-direction: column; gap: 10px; }
.modal label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; }
.modal input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--bg); color: var(--fg); }
.modal-err { color: var(--bad); min-height: 1.2em; font-size: .88rem; }
.modal-note { background: var(--accent-soft); padding: 8px 10px; border-radius: 6px; font-size: .88rem; margin: 0 0 12px; }
.modal-small { color: var(--muted); font-size: .78rem; margin: 12px 0 0; }

/* ---------- full test start */
.hero.start { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 32px; margin-top: 28px; box-shadow: var(--shadow); }
.start-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 22px 0 6px; }
.btn.big { font-size: 1.15rem; padding: 14px 34px; border-radius: 10px; }
.start-row .who { color: var(--muted); font-size: .92rem; }
.note-warn { background: var(--warn-soft); padding: 8px 12px; border-radius: 6px; margin-top: 12px !important; color: var(--fg) !important; }
.progs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 22px; }
.prog-top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.prog-top span { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: var(--accent); }
.hist td.from { font-size: .85rem; line-height: 1.35; }
.hist td.from .k { color: var(--muted); display: inline-block; min-width: 68px; }

/* ---------- Engnovate-like lists */
.section-title .count { color: var(--muted); font-size: .9rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.toolbar input, .toolbar select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); font: inherit; font-size: .92rem; }
.toolbar input { flex: 1 1 260px; min-width: 0; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tcard:hover { border-color: var(--accent); transform: translateY(-1px); }
.tc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tc-head h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.tc-head h3 a { color: var(--fg); text-decoration: none; }
.tc-head h3 a:hover { color: var(--accent); }
.tc-head .badge { flex-shrink: 0; }
.tc-sub { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 4px; }
.chip.gt { color: #8a5a00; background: var(--warn-soft); }
.tc-sub .src { color: var(--muted); font-size: .8rem; }
.tc-list { list-style: none; margin: 0; padding: 0; font-size: .86rem; color: var(--muted); }
.tc-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 1px 0; }
.tc-list .n { color: var(--fg); font-weight: 600; margin-right: 4px; }
.tc-types { display: flex; flex-wrap: wrap; gap: 4px; }
.tc-types span { font-size: .74rem; border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px; color: var(--muted); }
.tc-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.pbtn { font-size: .82rem; text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; color: var(--fg); display: inline-flex; gap: 6px; align-items: center; }
.pbtn:hover { border-color: var(--accent); color: var(--accent); }
.dot.ok { font-size: .72rem; color: var(--ok); background: var(--ok-soft); border-radius: 8px; padding: 0 6px; }
.tc-actions .btn { width: 100%; justify-content: center; text-align: center; }
.cue-mini { font-weight: 600; font-size: .92rem; }
.tcard .thumb { max-height: 150px; overflow: hidden; border-radius: 6px; }
.tcard .thumb img { width: 100%; display: block; }
.tcard .prompt { font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tcard .prompt.t2 { color: var(--muted); }
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 26px 0 48px; }
.pager button { border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 6px; padding: 7px 12px; cursor: pointer; font: inherit; }
.pager button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager .gap { padding: 7px 4px; color: var(--muted); }
@media (max-width: 700px) {
  .topbar .wrap { height: auto; flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .hero.start { padding: 20px; }
}
.modal .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.modal input { min-width: 0; width: 100%; }
button.acct-name { border: 0; background: none; color: var(--fg); cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; padding: 4px 6px; border-radius: 6px; }
button.acct-name:hover { background: var(--bg); }
@media (max-width: 420px) { .modal .two { grid-template-columns: 1fr; } }
.dob { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 6px; margin-top: 4px; }
.modal .dob select { padding: 9px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--bg); color: var(--fg); min-width: 0; }
.admin-bar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: var(--warn-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; margin-top: 18px; font-size: .9rem; }
.admin-bar a { font-weight: 600; text-decoration: none; }
.rec { margin: 8px 0; }
.rec audio { width: 100%; margin-top: 4px; }
.lockbox { max-width: 420px; margin: 60px auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.lockbox h2 { margin: 0 0 6px; }
.lockbox p { color: var(--muted); margin: 0 0 14px; }
.lockbox form { display: flex; flex-direction: column; gap: 10px; }
.lockbox input { padding: 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--bg); color: var(--fg); }
.lockbox .modal-err { color: var(--bad); min-height: 1.2em; font-size: .88rem; }
.hist .muted { color: var(--muted); font-size: .8rem; }
.hist.students a { text-decoration: none; }

/* AI examiner report (results page) */
.ai-report { border: 1px solid var(--accent); border-radius: 12px; padding: 14px 16px; margin: 14px 0; background: var(--card); }
.ai-report h4 { margin: 0 0 8px; }
.ai-report .crit { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 10px 0; }
.ai-report .crit > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.ai-report .crit b.cb { font-size: 1.5rem; float: right; font-variant-numeric: tabular-nums; }
.ai-report .crit .cn { font-weight: 700; font-size: .9rem; }
.ai-report .crit p { margin: 6px 0 0; font-size: .9rem; clear: both; }
.ai-report ul { margin: 6px 0 10px; padding-left: 20px; }
.ai-report table.errs { border-collapse: collapse; width: 100%; font-size: .9rem; margin: 6px 0 10px; }
.ai-report table.errs td { border-top: 1px solid var(--line); padding: 5px 8px; vertical-align: top; }
.ai-report table.errs td.q { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; }
.ai-report table.errs td.c { color: var(--ok); }
.ai-report .muted, .ai-wait { color: var(--muted); font-size: .9rem; }
.ai-wait { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.ai-report .stats { font-size: .85rem; color: var(--muted); }

/* ---- account menu (top bar) ---- */
.acct-menu { position: relative; }
.acct-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 99px; padding: 3px 12px 3px 3px; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; max-width: 260px; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--accent); }
.acct-label { overflow: hidden; text-overflow: ellipsis; }
.acct-btn .caret { color: var(--muted); font-size: .75rem; }
.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; letter-spacing: .5px; }
.avatar.big { width: 42px; height: 42px; font-size: .95rem; }
.acct-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .18); padding: 6px; z-index: 50; display: flex; flex-direction: column; }
.acct-pop[hidden] { display: none; }
.acct-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-head div { display: flex; flex-direction: column; min-width: 0; }
.acct-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-head div span { color: var(--muted); font-size: .8rem; }
.acct-pop [role="menuitem"] { display: block; text-align: left; border: 0; background: none; color: var(--fg); font: inherit; font-size: .92rem; padding: 9px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.acct-pop [role="menuitem"]:hover { background: var(--bg); }
.acct-pop .out { color: var(--bad); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.acct-pop .out:hover { background: var(--bad-soft); }
@media (max-width: 700px) { .acct-label, .acct-btn .caret { display: none; } .acct-btn { padding: 3px; } }

/* ---- welcome screen (log in / create account) ---- */
.modal-back.gate { background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent), var(--bg); overflow-y: auto; align-items: flex-start; padding-top: 6vh; }
.modal.wide { width: min(460px, 100%); }
.gate .modal { border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(16, 24, 40, .16); }
.gate-head { text-align: center; margin-bottom: 16px; }
.gate-head .mark { background: var(--brand); color: #fff; padding: 3px 10px; border-radius: 4px; font-weight: 700; letter-spacing: .5px; }
.gate-head h2 { margin: 12px 0 4px; font-size: 1.35rem; }
.gate-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.recent { margin-bottom: 12px; }
.recent-t { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.recent-u { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 10px; padding: 6px 10px; margin-bottom: 6px; cursor: pointer; font: inherit; }
.recent-u:hover, .recent-u.on { border-color: var(--accent); background: var(--accent-soft); }
.recent-u > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.recent-u b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-u small { color: var(--muted); font-size: .78rem; }

/* ---- "Enter your real name" callout ---- */
.realname { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-soft); border: 1px solid #f1c75b; border-left: 4px solid #e8a400; border-radius: 10px; padding: 10px 12px; }
.realname .rn-ico { flex: none; width: 28px; height: 28px; color: #c98a00; margin-top: 1px; }
.realname b { display: block; font-size: .98rem; letter-spacing: .2px; }
.realname span { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.modal input::placeholder { color: var(--muted); opacity: .7; font-weight: 400; }

/* ---- full test: with / without Speaking ---- */
.choices { display: grid; gap: 10px; }
.choice { display: flex; flex-direction: column; gap: 3px; text-align: left; border: 2px solid var(--line); background: var(--card); color: var(--fg); border-radius: 12px; padding: 14px 16px; cursor: pointer; font: inherit; transition: border-color .12s, background .12s; }
.choice:hover, .choice:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.choice b { font-size: 1.05rem; }
.choice .seq { font-size: .88rem; }
.choice .time { color: var(--muted); font-size: .82rem; }
.choice.last { position: relative; }
.choice.last::after { content: "last time"; position: absolute; top: 12px; right: 14px; font-size: .7rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 99px; }
