/* Virtual Interviewer - design system
 * Shared by the candidate pages (home, interview, report) and the admin panel.
 */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --surface-3: #e9ebef;
  --border: #e4e7ec;
  --border-strong: #cfd4dc;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-ink: #ffffff;
  --accent-soft: #eef2ff;
  --accent-line: #c7d2fe;
  --bar: #4f46e5;
  --good: #067647;  --good-bg: #ecfdf3;  --good-line: #abefc6;
  --warn: #b54708;  --warn-bg: #fffaeb;  --warn-line: #fedf89;
  --bad:  #b42318;  --bad-bg:  #fef3f2;  --bad-line:  #fecdca;
  --rec: #f04438;
  --stage: #0c111d;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 24px -6px rgba(16, 24, 40, .12), 0 4px 8px -4px rgba(16, 24, 40, .06);
  --ring: 0 0 0 4px rgba(79, 70, 229, .18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17; --surface: #121826; --surface-2: #1a2131; --surface-3: #232b3d;
    --border: #262f42; --border-strong: #35405a;
    --text: #f2f4f7; --text-2: #cfd4dc; --muted: #98a2b3;
    --accent: #818cf8; --accent-hover: #a5b4fc; --accent-ink: #0b0f17; --accent-soft: #1e2142; --accent-line: #3a3f7a; --bar: #818cf8;
    --good: #47cd89; --good-bg: #0e2a1d; --good-line: #17533a;
    --warn: #fdb022; --warn-bg: #2d220c; --warn-line: #5c4310;
    --bad: #f97066; --bad-bg: #331512; --bad-line: #6b231d;
    --shadow-xs: none; --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 28px rgba(0, 0, 0, .45);
    --ring: 0 0 0 4px rgba(129, 140, 248, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f17; --surface: #121826; --surface-2: #1a2131; --surface-3: #232b3d;
  --border: #262f42; --border-strong: #35405a;
  --text: #f2f4f7; --text-2: #cfd4dc; --muted: #98a2b3;
  --accent: #818cf8; --accent-hover: #a5b4fc; --accent-ink: #0b0f17; --accent-soft: #1e2142; --accent-line: #3a3f7a; --bar: #818cf8;
  --good: #47cd89; --good-bg: #0e2a1d; --good-line: #17533a;
  --warn: #fdb022; --warn-bg: #2d220c; --warn-line: #5c4310;
  --bad: #f97066; --bad-bg: #331512; --bad-line: #6b231d;
  --shadow-xs: none; --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 28px rgba(0, 0, 0, .45);
  --ring: 0 0 0 4px rgba(129, 140, 248, .25);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14.5px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* Layout classes set display, which would otherwise override the hidden attribute. */
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: .9rem; font-weight: 650; margin-top: 1.2em; color: var(--text-2); }
h4 { font-size: .85rem; font-weight: 650; color: var(--text-2); }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
code { font-size: .88em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .82rem; margin: 6px 0 0; }
.lead { font-size: 1.05rem; color: var(--text-2); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 650; color: var(--accent); margin: 0 0 6px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bad { color: var(--bad); }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 60px; padding: 0 24px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .98rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.logo {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .02em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15);
}
.topnav { display: flex; align-items: center; gap: 6px; }
.topnav a { color: var(--text-2); font-weight: 550; font-size: .88rem; padding: 6px 10px; border-radius: 8px; }
.topnav a:hover { background: var(--surface-2); text-decoration: none; }
.mode { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); color: var(--text-2); background: var(--surface); }
.mode::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.mode.on { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.mode.on::before { background: var(--good); }

/* ---------------------------------------------------------------- layout */
.container { max-width: 1120px; margin: 0 auto; padding: 32px 24px 64px; }
.container.wide { max-width: 1320px; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.row.between { justify-content: space-between; margin-top: 0; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: 16px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-xs); margin-bottom: 20px; min-width: 0;
}
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 20px 24px 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ---------------------------------------------------------------- forms */
label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 16px; color: var(--text-2); }
.field-label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 8px; color: var(--text-2); }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 9px 12px; min-height: 40px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font: inherit; font-size: .92rem; font-weight: 400; box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s;
}
textarea { line-height: 1.55; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--accent); box-shadow: none; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px 8px; margin: 0 0 16px; }
legend { font-weight: 650; font-size: .82rem; color: var(--text-2); padding: 0 6px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 450; margin: 6px 0; color: var(--text); font-size: .9rem; }
label.check input { flex: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* segmented control (radio buttons styled as one bar) */
.seg { display: flex; padding: 3px; gap: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 18px; }
.seg label { flex: 1; margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; padding: 7px 8px; border-radius: 7px; font-size: .84rem; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: background .15s, color .15s;
}
.seg span small { display: block; font-weight: 450; font-size: .72rem; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg input:focus-visible + span { box-shadow: var(--ring); }

/* role cards (radio) */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.choice { margin: 0; position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
}
.choice b { font-size: .9rem; color: var(--text); }
.choice small { font-weight: 450; font-size: .78rem; color: var(--muted); line-height: 1.4; }
.choice svg { width: 22px; height: 22px; color: var(--accent); margin-bottom: 4px; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.choice input:focus-visible + span { box-shadow: var(--ring); }

/* checkbox chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { margin: 0; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border-strong);
  font-size: .82rem; font-weight: 550; color: var(--text-2); background: var(--surface); cursor: pointer; transition: all .15s;
}
.chip-check span::before { content: "+"; font-weight: 700; color: var(--muted); }
.chip-check input:checked + span { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip-check input:checked + span::before { content: "✓"; color: var(--accent); }
.chip-check input:focus-visible + span { box-shadow: var(--ring); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); font: inherit; font-size: .88rem; font-weight: 600;
  cursor: pointer; text-decoration: none; box-shadow: var(--shadow-xs); white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover:not(:disabled) { background: var(--bad-bg); color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn.big { min-height: 46px; padding: 11px 22px; font-size: .95rem; border-radius: 10px; }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: .8rem; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; font-weight: 600; }
.link-btn.danger { color: var(--bad); }
.inline-form { display: inline; margin: 0; }

/* ---------------------------------------------------------------- badges, alerts */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px;
  font-size: .74rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--border); color: var(--text-2); background: var(--surface-2);
}
.badge.accent { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.badge.good, .pill.good { color: var(--good); background: var(--good-bg); border-color: var(--good-line); }
.badge.warn, .pill.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.badge.bad,  .pill.bad  { color: var(--bad);  background: var(--bad-bg);  border-color: var(--bad-line); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 99px; font-weight: 650; font-size: .82rem; border: 1px solid transparent; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: .88rem; margin-bottom: 18px; }
.alert.good { background: var(--good-bg); border-color: var(--good-line); color: var(--good); }
.alert.bad  { background: var(--bad-bg);  border-color: var(--bad-line);  color: var(--bad); }
.alert.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.alert.info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: .95rem; margin-bottom: 4px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * + * { margin-left: 10px; }
.table.compact th, .table.compact td { padding: 8px 4px; background: none; }
.table.compact tbody tr:hover td { background: none; }
.cell-title { font-weight: 600; color: var(--text); }
.cell-sub { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.toolbar input, .toolbar select { margin: 0; width: auto; min-width: 140px; max-width: 220px; }
.toolbar input[type="search"] { flex: 1; min-width: 200px; max-width: none; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-xs); }
.stat span { display: block; color: var(--muted); font-size: .8rem; font-weight: 550; }
.stat b { display: block; font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat b small { font-size: .55em; color: var(--muted); font-weight: 500; }
.stat > small { color: var(--muted); font-size: .78rem; }

/* ---------------------------------------------------------------- home */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
.hero-copy { padding-top: 24px; }
.hero h1 { font-size: 2.45rem; line-height: 1.12; letter-spacing: -.03em; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.features li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.features .ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.features .ico svg { width: 18px; height: 18px; }
.features b { display: block; font-size: .92rem; }
.features span { color: var(--muted); font-size: .86rem; }
.start-card { box-shadow: var(--shadow-lg); }
.start-card h2 { font-size: 1.15rem; }
.details-toggle { margin: 0 0 18px; }
.details-toggle summary { cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--accent); list-style: none; }
.details-toggle summary::-webkit-details-marker { display: none; }
.details-toggle summary::before { content: "▸ "; }
.details-toggle[open] summary::before { content: "▾ "; }
.details-toggle .track-group { margin-top: 14px; }
.details-toggle .track-group h4 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------------------------------------------------------------- video bits */
.video-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--stage); aspect-ratio: 16 / 10; }
.video-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.video-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #e4e7ec; font-size: .9rem; }
.rec {
  position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 6px;
  background: rgba(12, 17, 29, .72); color: #fff; padding: 4px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: .03em;
}
.rec .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: blink 1s infinite; }
.toast { position: absolute; bottom: 12px; left: 12px; right: 12px; background: rgba(12, 17, 29, .78); color: #fff; padding: 8px 12px; border-radius: 10px; font-size: .84rem; }
@keyframes blink { 50% { opacity: .25; } }
.name-tag { position: absolute; left: 12px; bottom: 12px; z-index: 2; background: rgba(12, 17, 29, .66); color: #fff; padding: 4px 10px; border-radius: 8px; font-size: .78rem; font-weight: 600; }

.meter-row { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); font-weight: 550; }
.meter-row svg { width: 16px; height: 16px; flex: none; }
.meter { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter div { height: 100%; width: 0; background: var(--good); border-radius: 99px; transition: width .08s; }

/* background check result */
.bg-result { margin-top: 14px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: .88rem; }
.bg-result ul { margin: 8px 0 0; padding-left: 18px; }
.bg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.big-num { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.big-num small, .tile b small { font-size: .55em; color: var(--muted); font-weight: 500; }
.mini { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 2px 10px; margin: 8px 0; font-size: .84rem; position: relative; }
.mini span { color: var(--text-2); }
.mini b { justify-self: end; grid-column: 2; grid-row: 1; font-variant-numeric: tabular-nums; }
.mini i { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--surface); position: relative; overflow: hidden; }
.bg-report .mini i { background: var(--surface-2); }
.mini i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--bar); border-radius: 99px; }

/* ---------------------------------------------------------------- interview: pre-join */
.prejoin { display: grid; grid-template-columns: 1.45fr 1fr; gap: 28px; align-items: start; }
.prejoin-video .video-wrap { box-shadow: var(--shadow-lg); }
.prejoin-video .meter-row { margin-top: 14px; padding: 0 4px; }
.prejoin-panel h1 { font-size: 1.5rem; margin-bottom: 4px; }
.prejoin-panel > p.muted { margin-bottom: 18px; }
.meet { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); margin-bottom: 18px; }
.meet-info b { display: block; font-size: .95rem; }
.meet-info span { color: var(--muted); font-size: .82rem; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; border: 1px solid var(--border); border-radius: var(--radius); }
.checks li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; font-size: .88rem; }
.checks li + li { border-top: 1px solid var(--border); }
.checks .state { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; background: var(--surface-3); color: var(--muted); }
.checks li.ok .state { background: var(--good-bg); color: var(--good); }
.checks li.ok .state::before { content: "✓"; }
.checks li:not(.ok) .state::before { content: "•"; }
.checks b { display: block; font-weight: 600; }
.checks small { color: var(--muted); font-size: .78rem; }
.summary-line { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; margin: 4px 0 16px; }
.summary-line b { color: var(--text); }

/* ---------------------------------------------------------------- interview: stage */
.stage { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 8px; }
.stage-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.stage-top .progress { flex: 1; min-width: 160px; margin: 0; }
.progress-line { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--text-2); font-weight: 600; }
.chip { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); padding: 3px 10px; border-radius: 99px; font-weight: 600; font-size: .76rem; }
.chip:empty { display: none; }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .4s; }

/* Tiles scale with the window height so the question, answer and controls stay on screen. */
.tile-v { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--stage); height: clamp(220px, 42vh, 440px); box-shadow: var(--shadow); }
.tile-v .video-wrap { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.avatar-wrap { position: absolute; inset: 0; display: block; }
.avatar-wrap .avatar { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.avatar-wrap .avatar .face, .avatar-wrap .avatar3d { border-radius: 0; }
.avatar-wrap .avatar::after { inset: 0; border-radius: 0; border-width: 3px; }
.iv-status-bar { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: rgba(12, 17, 29, .66); color: #fff; padding: 4px 10px; border-radius: 8px; font-size: .78rem; }
.iv-name { font-weight: 650; }
.iv-name small { color: #d0d5dd; font-weight: 500; font-size: .74rem; margin-left: 4px; }
.iv-status { color: inherit; }

.question-card { grid-column: 1; }
.answer-card { grid-column: 2; }
.question-card, .answer-card { margin: 0; display: flex; flex-direction: column; padding: 20px 22px; }
.question {
  margin: 0; padding: 0; font-size: 1.05rem; font-weight: 550; line-height: 1.55; color: var(--text); min-height: 72px; flex: 1;
  max-height: 24vh; overflow-y: auto;
}
.transcript-label { margin: 0; flex: 1; display: flex; flex-direction: column; }
.transcript-label textarea { flex: 1; min-height: 110px; }
.interim { color: var(--muted); font-style: italic; min-height: 1.4em; font-size: .86rem; margin-top: 6px; }

.controlbar {
  grid-column: 1 / -1; position: sticky; bottom: 16px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.controlbar .hint { margin: 0; flex: 1; min-width: 200px; }
.controlbar .row { margin: 0; }

/* avatar (drawn SVG fallback + 3D model) */
.avatar {
  position: relative; flex: none; width: 240px; height: 280px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #e4e9f1, #b8c4d6); overflow: hidden;
}
.avatar3d { position: absolute; inset: 0; border-radius: var(--radius-lg); overflow: hidden; }
.avatar3d canvas { display: block; }
.avatar.is-3d .face { visibility: hidden; }
.avatar-loading {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; padding: 4px 8px; border-radius: 8px;
  background: rgba(12, 17, 29, .7); color: #fff; font-size: .75rem; text-align: center;
}
.avatar .face { display: block; overflow: hidden; width: 100%; height: 100%; border-radius: var(--radius-lg); }
.avatar::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 2;
  border: 3px solid var(--accent); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.avatar.speaking::after { opacity: 1; animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .45; } }
.avatar-slot { flex: none; }
.avatar-slot .avatar { width: 84px; height: 84px; border-radius: 50%; }
.avatar-slot .avatar .face, .avatar-slot .avatar3d { border-radius: 50%; }
.avatar-slot .avatar-loading { display: none; }

.spinner { width: 44px; height: 44px; margin: 10px auto 18px; border-radius: 50%; border: 4px solid var(--surface-3); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.finishing { margin-top: 48px; padding: 40px 32px; }

/* ---------------------------------------------------------------- report */
.report-head { display: flex; justify-content: space-between; gap: 32px; align-items: center; }
.report-head h1 { font-size: 1.9rem; margin-bottom: 4px; }
.ring {
  --p: 0; flex: none; width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0);
}
.ring > div { width: 120px; height: 120px; border-radius: 50%; background: var(--surface); display: grid; place-content: center; text-align: center; }
.ring b { font-size: 2.3rem; line-height: 1; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring b small { font-size: .45em; color: var(--muted); font-weight: 600; }
.ring span { display: block; font-size: .76rem; color: var(--muted); font-weight: 550; margin-top: 2px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-xs); }
.tile span { display: block; color: var(--muted); font-size: .8rem; font-weight: 550; }
.tile b { display: block; font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.tile > small { color: var(--muted); font-size: .78rem; }

.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(130px, 1.4fr) 2fr 44px 104px; align-items: center; gap: 12px; font-size: .86rem; }
.bar-label { color: var(--text-2); font-weight: 550; }
.bar-track { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--bar); border-radius: 99px; }
.bar-row:hover .bar-fill { filter: brightness(1.12); }
.bar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-status { font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; text-align: center; white-space: nowrap; border: 1px solid transparent; }
.bar-status.good, .qa-score.good { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.bar-status.warn, .qa-score.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.bar-status.bad,  .qa-score.bad  { background: var(--bad-bg);  color: var(--bad);  border-color: var(--bad-line); }

.list { padding-left: 20px; margin: 4px 0 8px; }
.list li { margin: 5px 0; }
.list.good li::marker { content: "✓  "; color: var(--good); }
.list.bad li::marker { content: "!  "; color: var(--bad); font-weight: 700; }
.plan { padding-left: 22px; margin: 0; }
.plan li { margin: 10px 0; }
.plan b { display: block; }
.plan span { color: var(--text-2); }

.bg-report { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: start; margin-bottom: 8px; }
.bg-report img { width: 100%; border-radius: 10px; transform: scaleX(-1); }

.qa { border: 1px solid var(--border); border-radius: var(--radius); margin: 10px 0; background: var(--surface); overflow: hidden; }
.qa summary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.qa summary:hover { background: var(--surface-2); }
.qa summary::-webkit-details-marker { display: none; }
.qa[open] summary { border-bottom: 1px solid var(--border); }
.qa-num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); font-weight: 700; font-size: .8rem; color: var(--text-2); }
.qa-q { flex: 1; font-weight: 600; font-size: .92rem; }
.qa-q small { display: block; color: var(--muted); font-weight: 450; font-size: .78rem; margin-top: 2px; }
.qa-score { flex: none; font-weight: 700; padding: 3px 10px; border-radius: 99px; font-variant-numeric: tabular-nums; font-size: .84rem; border: 1px solid transparent; }
.qa-body { padding: 18px; }
.subs { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .84rem; color: var(--text-2); margin-bottom: 14px; }
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.qa-grid video { width: 100%; border-radius: 10px; background: #000; transform: scaleX(-1); margin-bottom: 10px; }
.transcript { background: var(--surface-2); padding: 12px 14px; border-radius: 10px; font-size: .9rem; border: 1px solid var(--border); }
.tip { background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 10px 12px; border-radius: 10px; font-size: .88rem; }
.suggested { margin-top: 16px; border: 1px solid var(--good-line); background: var(--good-bg); border-radius: var(--radius); padding: 14px 16px; }
.suggested h4 { color: var(--good); margin: 0; }
.suggested p { margin: 8px 0 0; color: var(--text); }

/* ---------------------------------------------------------------- admin */
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--border);
}
.sidebar .brand { padding: 4px 8px 18px; }
.side-label { font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 10px 6px; }
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--text-2); font-weight: 550; font-size: .88rem;
}
.side-link svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.side-link:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.side-link.active { background: var(--accent-soft); color: var(--accent); }
.side-link.active svg { color: var(--accent); }
.side-link .count { margin-left: auto; font-size: .72rem; color: var(--muted); font-weight: 600; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; }
.who { display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px; font-size: .84rem; }
.who i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-style: normal; font-weight: 700; font-size: .8rem; }
.who small { display: block; color: var(--muted); font-size: .74rem; }
.admin-main { min-width: 0; }
.admin-main .container { max-width: 1180px; padding-top: 28px; }
.admin-topbar { display: none; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 500px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.login-card { width: 100%; max-width: 400px; }
.login-card .brand { justify-content: center; margin-bottom: 22px; }
.login-card h1 { font-size: 1.3rem; text-align: center; margin-bottom: 4px; }
.login-card > p { text-align: center; color: var(--muted); margin-bottom: 22px; }

.score-cell { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.score-bar { width: 64px; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--bar); border-radius: 99px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; font-size: .88rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero-copy { padding-top: 0; }
  .prejoin { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .brand { padding: 4px 8px; margin-right: auto; }
  .side-label, .sidebar-foot .who { display: none; }
  .sidebar-foot { margin: 0; border: 0; padding: 0; }
}
@media (max-width: 860px) {
  .grid-2, .grid-3, .stage, .qa-grid, .tiles, .form-grid { grid-template-columns: 1fr; }
  .question-card, .answer-card { grid-column: 1; }
  .choices { grid-template-columns: 1fr; }
  .report-head { flex-direction: column-reverse; align-items: flex-start; }
  .bar-row { grid-template-columns: 1fr 44px; }
  .bar-label { grid-column: 1 / -1; }
  .bar-track { grid-column: 1; }
  .bar-status { grid-column: 1 / -1; justify-self: start; }
  .bg-report { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
  .topbar { padding: 0 16px; }
  .container { padding: 24px 16px 48px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .topnav a:not(.btn) { display: none; }
}

@media print {
  .topbar, .no-print, .speak-btn, video { display: none !important; }
  body { background: #fff; }
  .card, .tile { box-shadow: none; break-inside: avoid; }
  details.qa { break-inside: avoid; }
  details.qa:not([open]) > .qa-body { display: block; }
}
