:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --border: #dfe3ee;
  --text: #141a2e;
  --muted: #5b6480;
  --brand: #1f3b8f;
  --brand-ink: #ffffff;
  --brand-soft: #e7ecfb;
  --accent: #f2a541;
  --ok: #18794e;
  --ok-soft: #e3f5ec;
  --warn: #a35c00;
  --warn-soft: #fff3df;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --focus: #3b6cff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 26, 46, .06), 0 6px 24px rgba(20, 26, 46, .06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1320;
    --surface: #171c2c;
    --surface-2: #1e2436;
    --border: #2c3349;
    --text: #e8ebf5;
    --muted: #9aa3bd;
    --brand: #8fa8ff;
    --brand-ink: #0f1320;
    --brand-soft: #222c4d;
    --ok: #4cc38a;
    --ok-soft: #173326;
    --warn: #f0b252;
    --warn-soft: #3a2a12;
    --bad: #ff8a80;
    --bad-soft: #3d1c1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.brand img { display: block; height: 34px; width: auto; }
.brand-label {
  padding-left: 14px; border-left: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- Home ---------- */
.hero { padding: 56px 0 32px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(30px, 5vw, 46px); max-width: 16ch; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 60ch; }

.section-title { font-size: 22px; margin: 40px 0 16px; }

.exam-group {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px;
}
.exam-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.exam-group-head h3 { font-size: 24px; margin: 0; }
.exam-group-head p { color: var(--muted); margin: 4px 0 0; flex-basis: 100%; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }

.test-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.test-card {
  display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
  background: var(--surface);
}
.test-card h4 { margin: 0; font-size: 18px; }
.test-card p { margin: 0; color: var(--muted); font-size: 15px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 16px; height: 16px; flex: none; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.test-card .actions { margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.done-note { font-size: 14px; color: var(--ok); font-weight: 600; }

.exam-group.soon { box-shadow: none; background: transparent; border-style: dashed; }
.soon-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.soon-row .exam-group { margin: 0; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; margin-bottom: 12px;
  background: var(--brand-soft); color: var(--brand); font-weight: 700;
}
.steps h4 { margin: 0 0 4px; font-size: 16px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

.callout {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--warn-soft); color: var(--text); border-radius: var(--radius); padding: 16px 20px; margin: 32px 0;
}
.callout strong { color: var(--warn); }

.site-footer { color: var(--muted); font-size: 14px; padding: 40px 0; text-align: center; }

/* ---------- Test: intro ---------- */
.narrow { max-width: 760px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
}
.page-pad { padding: 32px 0 56px; }
.intro-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 24px; }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 13px; color: var(--muted); }
.rules { padding-left: 20px; margin: 0 0 24px; color: var(--muted); }
.rules li { margin-bottom: 6px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field input, .field select {
  min-height: 44px; padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
}
.field input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Test: runner ---------- */
body.in-test { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.in-test #app { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.runner { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.runner-top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 0 16px; height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.runner-top .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runner-top .title small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.runner-top .right { justify-self: end; display: flex; gap: 8px; }
.timer {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 20px;
  padding: 4px 14px; border-radius: 999px; background: var(--surface-2);
  display: inline-flex; align-items: center; gap: 8px;
}
.timer svg { width: 18px; height: 18px; }
.timer.warn { background: var(--warn-soft); color: var(--warn); }
.timer.danger { background: var(--bad-soft); color: var(--bad); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.progress { height: 4px; background: var(--surface-2); }
.progress > div { height: 100%; background: var(--brand); transition: width .25s; }

.runner-body { flex: 1; min-height: 0; display: flex; }
.pane { overflow-y: auto; padding: 32px 24px; }
.pane-passage {
  flex: 1 1 50%; border-right: 1px solid var(--border); background: var(--surface);
  font-family: var(--serif); font-size: 18px; line-height: 1.7;
}
.pane-passage h3 { font-family: var(--font); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pane-question { flex: 1 1 50%; }
.pane-question .inner, .pane-passage .inner { max-width: 640px; margin: 0 auto; }
.runner-body.single .pane-question .inner { max-width: 720px; }

.q-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.q-num {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: 8px; background: var(--text); color: var(--surface); font-weight: 700;
}
.q-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.flag-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.flag-btn svg { width: 16px; height: 16px; }
.flag-btn[aria-pressed="true"] { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.q-prompt { font-family: var(--serif); font-size: 19px; line-height: 1.6; margin-bottom: 20px; }

.choices { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice label {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 16px; min-height: 52px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s;
}
.choice label:hover { border-color: var(--brand); }
.choice .letter {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--muted); font-weight: 700; font-size: 14px;
}
.choice input:checked + label { border-color: var(--brand); background: var(--brand-soft); }
.choice input:checked + label .letter { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice.idk label { border-style: dashed; color: var(--muted); }
.choice.idk .letter { border-style: dashed; font-size: 16px; }
.kbd-hint { font-size: 13px; color: var(--muted); margin-top: 16px; }
kbd { font-family: var(--font); font-size: 12px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--surface); }

.runner-bottom {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--border); position: relative;
}
.runner-bottom .right { justify-self: end; display: flex; gap: 8px; }
.nav-toggle { background: var(--text); color: var(--surface); border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav-toggle svg { width: 16px; height: 16px; transition: transform .15s; }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.navigator {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; z-index: 10;
}
.navigator h4 { margin: 0 0 4px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; border: 1.5px dashed var(--muted); }
.legend i.a { background: var(--brand); border: 0; }
.legend i.k { background: var(--surface-2); border: 1.5px solid var(--muted); }
.legend i.f { background: var(--warn); border: 0; border-radius: 50%; }
.q-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.q-cell {
  position: relative; height: 42px; border-radius: 8px; border: 1.5px dashed var(--muted);
  background: var(--surface); font-weight: 600; cursor: pointer;
}
.q-cell.answered { background: var(--brand); color: var(--brand-ink); border: 1.5px solid var(--brand); }
.q-cell.idk { background: var(--surface-2); border: 1.5px solid var(--muted); }
.q-cell.current { box-shadow: 0 0 0 3px var(--text); }
.q-cell.flagged::after {
  content: ''; position: absolute; top: -4px; right: -4px; width: 11px; height: 11px;
  background: var(--warn); border-radius: 50%; border: 2px solid var(--surface);
}

/* ---------- Review ---------- */
.review-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
.review-summary .q-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }

/* ---------- Results ---------- */
.result-hero { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.score-ring { --p: 0; width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-2) 0); }
.score-ring > div { width: 118px; height: 118px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.score-ring b { font-size: 34px; line-height: 1; display: block; }
.score-ring span { font-size: 12px; color: var(--muted); }
.score-ring.long b { font-size: 24px; }
.score-ring span { display: block; margin-top: 4px; }
.course-card .course-name .then { color: var(--muted); font-weight: 600; font-size: 20px; }
.writing-box { width: 100%; min-height: 220px; padding: 14px 16px; font: 17px/1.6 'Source Serif 4', Georgia, serif; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; resize: vertical; }
.writing-box:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.word-count { font-size: 14px; color: var(--muted); margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.word-count[data-state="ok"] { color: var(--ok); }
.word-count[data-state="long"] { color: var(--warn); }
.writing-sample { white-space: pre-wrap; font: 16px/1.6 'Source Serif 4', Georgia, serif; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 0; }
.score-form { display: grid; gap: 16px; }
.score-form fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px 16px; margin: 0; }
.score-form legend { font-weight: 700; padding: 0 6px; }
.score-form .crit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.score-form .crit label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.score-form select, .score-form input, .score-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.score-form .band-out { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.final-course { border-left: 5px solid var(--accent); background: var(--surface); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.final-course b.name { font-size: 18px; display: block; margin: 2px 0 4px; }
@media (max-width: 560px) { .score-form .crit { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.result-hero h2 { font-size: 28px; margin-bottom: 4px; }
.result-hero .sub { color: var(--muted); margin: 0; }
.kv { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.result-grid .card { padding: 22px; }
.result-grid h3 { font-size: 17px; }
.level-row { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 15px; }
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: var(--brand); border-radius: 999px; }
.level-row b { text-align: right; font-variant-numeric: tabular-nums; }
.subject-row { grid-template-columns: minmax(120px, 240px) 1fr 44px 96px; }
.subject-row .badge { justify-self: start; }
@media (max-width: 560px) {
  .subject-row { grid-template-columns: 1fr 44px 96px; }
  .subject-row > span:first-child { grid-column: 1 / -1; margin-bottom: -6px; font-weight: 600; }
}
.focus-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.focus-list li { background: var(--bad-soft); color: var(--bad); padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.all-good { color: var(--ok); font-weight: 600; }

.subject-card { margin-top: 20px; }
.stat b.stat-text { font-size: 16px; line-height: 1.3; }
.course-card { margin-top: 20px; border-left: 5px solid var(--accent); }
.course-card .course-name { font-size: 24px; font-weight: 700; margin: 4px 0; }
.course-card .muted { color: var(--muted); }
.combo { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.combo .stat { min-width: 120px; }

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--text); color: var(--surface); padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 50;
}

.center-msg { text-align: center; padding: 80px 16px; color: var(--muted); }

/* ---------- Admin ---------- */
.container.wide { max-width: 1320px; }
.muted { color: var(--muted); }
.login-card { max-width: 400px; margin: 48px auto; }
.login-card .field { margin-bottom: 8px; }
.form-error { color: var(--bad); font-size: 14px; min-height: 1.4em; margin: 4px 0 12px; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-tiles .stat { background: var(--surface); border: 1px solid var(--border); }
.detail-body .stat-tiles .stat { background: var(--surface-2); border: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs button {
  border: 0; background: none; padding: 10px 16px; font-weight: 600; color: var(--muted); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.filters { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.filters .field input, .filters .field select { min-height: 0; height: 38px; padding: 6px 10px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  font-weight: 600; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr[data-id], table.data tbody tr[data-name] { cursor: pointer; }
table.data tbody tr[data-id]:hover, table.data tbody tr[data-name]:hover { background: var(--brand-soft); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .nowrap { white-space: nowrap; }
table.data .empty { text-align: center; color: var(--muted); padding: 32px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 14px; }

.detail-dialog {
  width: min(1000px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); box-shadow: var(--shadow);
}
.detail-dialog::backdrop { background: rgba(10, 14, 28, .55); }
.detail-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 20px 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1;
}
.detail-head h2 { margin: 0 0 4px; font-size: 24px; }
.detail-head p { margin: 0; font-size: 14px; }
.detail-head .eyebrow { margin-bottom: 8px; }
.detail-body { padding: 20px 24px; }
.detail-body h3 { font-size: 16px; margin: 20px 0 10px; }
.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
table.answers .q-cell-text { font-family: var(--serif); font-size: 15px; min-width: 260px; }
.ans { font-weight: 600; }
.ans.ok { color: var(--ok); }
.ans.bad { color: var(--bad); }
.ans.idk, .ans.blank { color: var(--muted); font-weight: 500; font-style: italic; }

@media (max-width: 900px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field:first-child, .filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .detail-cols { grid-template-columns: 1fr; }
  .detail-head, .detail-body { padding: 16px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .runner-body { flex-direction: column; overflow-y: auto; }
  .pane { overflow: visible; padding: 20px 16px; }
  .pane-passage { border-right: 0; border-bottom: 1px solid var(--border); font-size: 17px; flex: none; }
  .pane-question { flex: none; }
  .result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .brand { gap: 10px; }
  .brand img { height: 26px; }
  .brand-label { padding-left: 10px; font-size: 13px; }
  .form-grid { grid-template-columns: 1fr; }
  .intro-stats, .review-summary { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 20px; }
  .runner-top { grid-template-columns: 1fr auto; }
  .runner-top .right { display: none; }
  .runner-bottom { grid-template-columns: auto 1fr; }
  .runner-bottom .left { display: none; }
  .runner-bottom .right .btn { padding: 0 14px; }
  .result-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .result-hero .kv { justify-content: center; }
  .q-prompt { font-size: 18px; }
}
