/* AAA hiring: applicant + review pages. Phone-first; light by default, dark on request. */
:root {
  --navy: #141a22; --navy-2: #1f2833; --blue: #2f80ed; --blue-d: #1f63c2;
  --bg: #f4f5f7; --card: #ffffff; --ink: #14171c; --mute: #5b6472; --line: #dfe3e8;
  --ok: #18794e; --ok-bg: #e7f5ee; --warn: #8a5a00; --warn-bg: #fff4dc; --bad: #b3261e; --bad-bg: #fdecea;
  --radius: 12px; --pad: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1218; --card: #161c24; --ink: #e8ecf1; --mute: #9aa4b2; --line: #2a333f;
    --ok-bg: #12301f; --warn-bg: #33270b; --bad-bg: #3a1513; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1218; --card: #161c24; --ink: #e8ecf1; --mute: #9aa4b2; --line: #2a333f;
  --ok-bg: #12301f; --warn-bg: #33270b; --bad-bg: #3a1513; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: var(--blue); }
.top { background: var(--navy); color: #fff; padding: 12px var(--pad); display: flex; align-items: center; gap: 12px; }
.top .mark { font-weight: 800; letter-spacing: .04em; font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.top .mark::before { content: ""; display: block; width: 34px; height: 4px; border-radius: 2px; background: var(--blue); }
.top .sub { color: #b9c3cf; font-size: 13px; margin-left: auto; }
.draft { background: var(--warn-bg); color: var(--warn); padding: 8px var(--pad); font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line); }
main { max-width: 760px; margin: 0 auto; padding: var(--pad); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px var(--pad); margin: 0 0 14px; }
h1 { font-size: 24px; line-height: 1.25; margin: 4px 0 8px; }
h2 { font-size: 19px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 14px 0 6px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 15px; margin: 8px 0 0; }
.meta dt { color: var(--mute); }
.meta dd { margin: 0; font-weight: 600; }
ul.tight { margin: 4px 0 0; padding-left: 20px; }
ul.tight li { margin: 3px 0; }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 8px 0 0; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(s); flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--navy-2); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.steps li.done::before { content: "✓"; background: var(--ok); }
.steps li.now::before { background: var(--blue); }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 15px; }
label .req { color: var(--bad); }
input[type=text], input[type=email], input[type=tel], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; min-height: 46px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 1px; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-weight: 500; margin: 0; cursor: pointer; }
.choice input { margin-top: 4px; width: 20px; height: 20px; flex: 0 0 20px; }
.choice:has(input:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 9%, var(--card)); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.btn { appearance: none; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font: inherit; font-weight: 700; padding: 13px 20px; min-height: 48px; cursor: pointer; }
.btn:hover { background: var(--blue-d); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--blue); border: 1px solid var(--line); }
.btn.bad { background: var(--bad); }
.btn.sm { padding: 7px 12px; min-height: 36px; font-size: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.err { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-weight: 600; }
.okmsg { background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-weight: 600; }
.legal { font-size: 13px; color: var(--mute); }
details summary { cursor: pointer; font-weight: 600; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--ink); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.blue { background: color-mix(in srgb, var(--blue) 15%, var(--card)); color: var(--blue-d); }
/* video */
.vq { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.vq:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.vq .q { font-weight: 600; font-size: 17px; }
video.preview { width: 100%; max-height: 360px; background: #000; border-radius: 10px; margin-top: 10px; display: block; }
audio.preview { width: 100%; margin-top: 10px; display: block; }
.vq .hint { margin-top: 2px; }
.vq details.small { margin-top: 10px; }
.rec { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--bad); }
.rec::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--blue); width: 0; }
/* test runner */
.tbar { position: sticky; top: 0; z-index: 5; background: var(--navy); color: #fff; padding: 10px var(--pad); display: flex; gap: 12px; align-items: center; font-weight: 700; }
.tbar .clock { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 18px; }
.tbar .clock.low { color: #ffb4a8; }
.item .prompt { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
.item img.ex { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin: 0 0 12px; display: block; }
.spot { position: relative; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.spot img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pin { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--bad); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); pointer-events: none; }
.tgt { position: absolute; border: 2px dashed var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); pointer-events: none; border-radius: 4px; }
.tgt.miss { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.pinnote { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.pinnote b { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--bad); color: #fff; display: grid; place-items: center; font-size: 13px; }
.sjt { display: grid; grid-template-columns: 1fr 64px 64px; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sjt > div { padding: 10px; border-top: 1px solid var(--line); }
.sjt > .h { font-size: 12px; font-weight: 700; color: var(--mute); border-top: 0; text-align: center; }
.sjt > .h:first-child { text-align: left; }
.sjt .c { text-align: center; }
.sjt .c input { width: 22px; height: 22px; }
.zoom { font-size: 13px; }
.hidden { display: none !important; }
/* review */
.rv { max-width: 1280px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs button.on { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; color: var(--mute); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr { cursor: pointer; }
table.list tr:hover td, table.list tr.sel td { background: color-mix(in srgb, var(--blue) 7%, var(--card)); }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.score { font-size: 20px; font-weight: 800; }
.split { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
.scroll { overflow-x: auto; }
.trait { border-top: 1px solid var(--line); padding: 10px 0; }
.trait:first-child { border-top: 0; }
.dots { letter-spacing: 2px; color: var(--blue); font-weight: 800; }
blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--blue); background: color-mix(in srgb, var(--blue) 6%, var(--card)); font-size: 14px; border-radius: 0 6px 6px 0; }
blockquote.bad { border-left-color: var(--bad); background: var(--bad-bg); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; font-size: 14px; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; }
.kv.qa { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.kv.qa dd { font-weight: 600; }
.itemrow { display: grid; grid-template-columns: 54px 1fr auto; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.transcript { white-space: pre-wrap; font-size: 14px; background: var(--bg); border-radius: 8px; padding: 10px; max-height: 260px; overflow: auto; }
.statusbar { display: flex; gap: 6px; flex-wrap: wrap; }
.statusbar button.on { outline: 3px solid var(--ink); }
.sticky-top { position: sticky; top: 8px; }
