/* ====== VicThree Defence theme ====== */
:root {
  --navy: #0B1F3A;
  --navy-2: #112B4F;
  --navy-3: #0e2342;
  --gold: #C9A24B;
  --gold-soft: #e3c987;
  --ink: #0B1F3A;
  --paper: #f5f7fb;
  --white: #ffffff;
  --muted: #6b7a90;
  --line: #d9e0ec;
  --green: #2e8b57;
  --green-bg: #e6f4ec;
  --red: #c0392b;
  --red-bg: #fbeae8;
  --review: #7a4fb0;
  --review-bg: #efe7fb;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(11, 31, 58, 0.10);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }   /* beats display:grid/flex set below */

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* ====== Header / Banner ====== */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}
.banner-wrap { max-width: 980px; margin: 0 auto; position: relative; }
.banner-wrap img { display: block; width: 100%; height: auto; }
.banner-link { display: block; cursor: pointer; }
.home-btn { position: absolute; bottom: 10px; right: 12px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; color: var(--gold); text-decoration: none; padding: 2px; line-height: 0; }
.home-btn svg { width: 26px; height: 26px; fill: currentColor; display: block; }
.home-btn:hover { filter: brightness(1.15); }
.brand-text {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
}
.brand-mark {
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--gold); color: var(--navy);
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px; letter-spacing: 0.5px;
}
.brand-lines { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { color: var(--white); font-weight: 700; font-size: 20px; }
.brand-sub { color: var(--gold-soft); font-size: 13px; letter-spacing: 0.5px; }

/* ====== Layout ====== */
.container { max-width: 980px; margin: 0 auto; padding: 18px 14px 40px; }
.screen { animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px);} to {opacity:1; transform:none;} }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* ====== Home / test picker ====== */
.home-intro { margin: 8px 0 22px; text-align: center; }
.home-intro h1 {
  margin: 0 0 6px; color: var(--navy);
  font-weight: 700; font-size: clamp(26px, 6vw, 40px);
  letter-spacing: 1px; line-height: 1.15;
}
.home-intro .muted { color: var(--muted); margin: 0; }
@media (max-width: 600px){
  .home-intro h1{ white-space: nowrap; font-size: clamp(14px, 5.2vw, 26px); letter-spacing: .3px; }
}
.test-tabs { display: flex; justify-content: center; gap: 10px; margin: 0 0 20px; flex-wrap: wrap; }
.test-tab { background: #fff; border: 1.5px solid var(--line); color: var(--navy); font-weight: 700; font-size: 14px; padding: 9px 20px; border-radius: 999px; cursor: pointer; }
.test-tab:hover { border-color: var(--navy); }
.test-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.home-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 8px 0 4px; }
@media (max-width: 600px){ .home-choices { grid-template-columns: 1fr; } }
.choice-tile { display: flex; flex-direction: column; gap: 6px; background: var(--navy); color: #fff; border-radius: 14px; padding: 28px 24px; text-decoration: none; min-height: 130px; justify-content: center; box-shadow: 0 2px 12px rgba(11,31,58,.18); transition: box-shadow .18s ease, transform .12s ease, filter .18s ease; }
.choice-tile:hover { filter: brightness(1.04); transform: translateY(-2px); box-shadow: 0 0 0 2px rgba(201,162,75,.55), 0 6px 20px rgba(11,31,58,.22); }
.choice-tile-plain { align-items: center; text-align: center; }
.choice-tile-plain .choice-title { font-size: 30px; }
.choice-title { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.choice-sub { font-size: 13.5px; color: rgba(255,255,255,.82); }
.choice-cta { margin-top: 10px; font-weight: 700; color: var(--gold); }
/* Featured gold tile (single, full-width, above the category grid) */
.choice-featured { background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: var(--navy); margin: 8px 0 18px; box-shadow: 0 4px 16px rgba(201,162,75,.35); }
.choice-featured .choice-title { font-size: 26px; }
.choice-featured .choice-sub { color: rgba(11,31,58,.78); }
.choice-featured .choice-cta { color: var(--navy); }
.choice-featured:hover { filter: brightness(1.03); box-shadow: 0 0 0 2px rgba(11,31,58,.35), 0 8px 22px rgba(201,162,75,.4); }
.test-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.history-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; align-items: start; }
.history-col { display: flex; flex-direction: column; gap: 14px; padding: 0 18px; }
.history-col + .history-col { border-left: 1px solid rgba(28,34,48,.14); }
.history-col-empty { text-align: center; font-size: 13px; padding: 10px 0; }
@media (max-width: 760px){ .history-cols { grid-template-columns: 1fr; } .history-col { padding: 0; } .history-col + .history-col { border-left: none; } }
.subject-groups { display: flex; flex-direction: column; gap: 30px; }
.subject-group-title { font-size: 16px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.test-card {
  display: flex; flex-direction: column; gap: 10px;
  justify-content: center; align-items: center; text-align: center; height: 210px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 18px; text-decoration: none; color: var(--ink);
  border-top: 4px solid var(--gold);
  transition: transform .08s ease, box-shadow .15s ease;
}
.test-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(11,31,58,.16); }
.test-card-title { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.tc-line1 { font-size: 24px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.tc-line2 { font-size: 14px; font-weight: 700; color: var(--gold); letter-spacing: 1.5px; text-transform: uppercase; }
.test-card-topic { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; margin: -2px 0 2px; }
.test-card-meta { display: flex; justify-content: center; gap: 14px; font-size: 13px; color: var(--muted); }
.test-card-cta { color: var(--gold); font-weight: 700; }

.resume-box { background: #fdf8ee; border: 1.5px solid var(--gold); border-radius: 12px; padding: 14px; margin: 12px 0 16px; }
.resume-msg { margin: 0 0 10px; font-size: 14px; color: var(--navy); font-weight: 600; }
.resume-actions { display: flex; gap: 10px; }
.resume-actions .btn { flex: 1; }

/* Last-result tile (light blue) — info on the left, compact button on the right */
.lastresult-box { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #e4eaf4; border: 1.5px solid #a3b4d0; border-radius: 12px; padding: 12px 14px; margin: 14px 0 4px; }
.lastresult-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lastresult-label { font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #566a8c; }
.lastresult-meta { font-size: 15px; font-weight: 700; color: #2f3f5c; }
.lastresult-btn { flex: none; background: #5c7296; color: #fff; border: none; padding: 8px 16px; font-size: 13.5px; white-space: nowrap; }
.lastresult-btn:hover { filter: brightness(1.05); }

/* ---- Guess-Answer checkbox (full mocks) ---- */
.guess-row { display: flex; justify-content: flex-end; }
.guess-check { display: inline-flex; align-items: center; gap: 8px; margin: 10px 2px 0; padding: 7px 12px;
  background: #fff7e6; border: 1.5px solid #e6c877; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  color: #7a5a12; cursor: pointer; user-select: none; }
.guess-check input { width: 16px; height: 16px; accent-color: #c9a24b; cursor: pointer; }
.guess-check.disabled { opacity: .5; cursor: not-allowed; }
.guess-check.disabled input { cursor: not-allowed; }

/* ---- Match-the-following table (List-I / List-II) ---- */
.q-match:empty { display: none; }
.match-table { width: 100%; border-collapse: collapse; margin: 10px 0 4px; font-size: 14.5px; }
.match-table th, .match-table td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.match-table th { background: var(--paper); font-weight: 700; color: var(--navy); font-size: 13px; }
.match-table td { width: 50%; }
.rev-match { font-size: 13.5px; margin: 6px 0; }

/* ---- Access-window gate ---- */
.start-gate { background: #fdecec; border: 1.5px solid #e0a9a9; border-radius: 12px; padding: 18px 16px; margin: 8px 0 4px; text-align: center; }
.gate-line { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--navy); }
.gate-note { margin: 0; font-size: 14px; color: #b23a2e; font-weight: 600; }

/* ---- Results: negative-marking note ---- */
.score-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---- Subject-wise performance table ---- */
.subject-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.subject-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 4px; }
.subject-table th, .subject-table td { padding: 7px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.subject-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 700; }
.subject-table .subj-name { text-align: left; font-weight: 600; color: var(--navy); }
.subject-table td.c-right { color: var(--green); font-weight: 600; }
.subject-table td.c-wrong { color: var(--red); font-weight: 600; }
.subject-table tbody tr:last-child td { border-bottom: none; }
.guess-summary { margin: 10px 0 0; font-size: 13.5px; font-weight: 600; color: #6b5410; background: #fdf6d8; border: 1px solid #ecd98f; border-radius: 8px; padding: 10px 12px; }

/* ---- Reading-comprehension / cloze passage ---- */
sup { font-size: 0.72em; line-height: 0; }
.q-direction { font-size: 13.5px; font-style: italic; color: var(--muted); margin: 0 0 8px; }
.rev-direction { font-size: 12.5px; font-style: italic; color: var(--muted); margin: 0 0 4px; }
.q-passage { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 8px; padding: 12px 14px; margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; max-height: 260px; overflow-y: auto; color: #243b5e; }
.rev-passage { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 8px; padding: 10px 12px; margin: 6px 0; font-size: 13px; line-height: 1.55; max-height: 200px; overflow-y: auto; color: #243b5e; }

/* ---- Multi-paper (Mock 3) ---- */
.paper-tag { font-weight: 700; color: var(--gold); background: rgba(201,162,75,.16); border: 1px solid rgba(201,162,75,.45); padding: 2px 10px; border-radius: 999px; font-size: 12px; margin-right: 8px; }
.mp-sub { font-size: 13.5px; color: var(--muted); margin: 4px 0 14px; line-height: 1.5; }
.paper-tiles { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 4px; }
.paper-tile { display: block; width: 100%; text-align: left; border-radius: 12px; padding: 14px 16px; border: 1.5px solid var(--line); background: #fff; font: inherit; color: inherit; }
.paper-tile .pt-badge { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.paper-tile .pt-title { font-size: 17px; font-weight: 700; color: var(--navy); margin: 2px 0; }
.paper-tile .pt-meta { font-size: 12.5px; color: var(--muted); }
.paper-tile .pt-status { margin-top: 6px; font-size: 13px; font-weight: 700; }
.paper-tile.active { border-color: var(--gold); background: #fdf8ee; box-shadow: 0 2px 8px rgba(201,162,75,.18); }
.pt-actions { display: flex; gap: 10px; margin-top: 12px; }
.pt-actions .btn { flex: 0 0 auto; padding: 9px 20px; }
.paper-tile.done { border-color: var(--green); background: var(--green-bg); }
.paper-tile.done .pt-status { color: var(--green); }
.paper-tile.locked { opacity: .6; background: #f3f5f8; }
.paper-tile.locked .pt-status { color: var(--muted); }
.paper-tile.skipped { border-style: dashed; background: #f3f5f8; }
.paper-tile.skipped .pt-status { color: var(--muted); }
.ov-actions { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 4px; }
.fin-papers { margin: 12px 0; }
.fin-prow { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 2px; border-bottom: 1px dashed var(--line); font-size: 15px; }
.fin-prow:last-child { border-bottom: none; }
.fin-pname { color: var(--navy); font-weight: 600; }
.fin-pscore { font-weight: 700; color: var(--navy); }
.fin-tabs { display: flex; gap: 4px; margin: 18px 0 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-bottom: 2px solid var(--line); }
.fin-tab { flex: 0 0 auto; background: none; border: none; padding: 10px 16px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.fin-tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.fin-panels { margin-top: 16px; }
.fin-paper-head { margin-bottom: 10px; }
.fin-paper-score { font-size: 20px; font-weight: 800; color: var(--navy); }
.fin-rev-toggle { margin-top: 12px; }
.fin-review { margin-top: 12px; }
.score-sub .pill { background: #eef1f6; color: var(--muted); }

.back-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: 13px; margin-bottom: 10px; }
.back-link:hover { color: var(--navy); }
.results-actions { display: flex; flex-direction: column; gap: 10px; }
.results-actions .btn { text-decoration: none; text-align: center; }

/* ====== Start screen ====== */
#quizTitle { margin: 0 0 12px; color: var(--navy); font-size: 24px; }
.meta-list { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.meta-list strong { color: var(--navy); }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.req { color: var(--gold); }
.field input {
  width: 100%; padding: 12px 14px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,0.18); }
.fine-print { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; text-align: center; }
.error-msg { color: var(--red); background: var(--red-bg); padding: 9px 12px; border-radius: 8px; font-size: 14px; margin: 0 0 12px; }

/* ====== Buttons ====== */
.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border: none; border-radius: 10px; padding: 12px 18px;
  transition: transform .05s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-block { display: block; width: 100%; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-outline { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ====== Topbar (timer/progress) ====== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy); color: #fff;
  padding: 10px 14px; border-radius: 12px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.topbar-left { display: flex; flex-direction: column; line-height: 1.1; }
.topbar .muted { color: var(--gold-soft); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
#progressLabel { font-weight: 700; font-size: 16px; }
.timer {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 22px;
  background: var(--gold); color: var(--navy);
  padding: 6px 14px; border-radius: 10px; min-width: 92px; text-align: center;
}
.timer.warn { background: var(--red); color: #fff; animation: pulse 1s infinite; }
.timer.untimed { background: #eaf7ef; color: #1d7a4d; border: 1px solid #b6e0c7; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.55;} }

/* Timed / Untimed segmented toggle (sectional start screen) */
.timing-field .seg-toggle { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); }
.seg-btn { appearance: none; border: none; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; padding: 9px 18px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn:hover { color: var(--navy); }
.seg-btn.active { background: var(--navy); color: #fff; }

/* ====== Quiz grid ====== */
.quiz-grid { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
.question-card { min-height: 220px; }
.q-topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 2px; }
.q-number { color: var(--gold); font-weight: 800; font-size: 18px; }
.mark-btn { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; color: var(--navy); border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 12px; white-space: nowrap; }
.mark-btn:hover { border-color: var(--review); }
.mark-btn.active { background: var(--review-bg); border-color: var(--review); color: #5a3a8a; }
.q-stem { font-size: 18px; font-weight: 600; margin: 6px 0 10px; }
.q-subs { margin: 0 0 14px; padding-left: 18px; color: #243b5e; }
.q-subs li { margin: 3px 0; list-style: none; }

.pyq-tag {
  display: inline-block; background: var(--gold); color: var(--navy);
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  margin-bottom: 10px; letter-spacing: .3px;
}

/* Options */
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 14px; cursor: pointer; background: #fff;
  transition: border-color .12s, background .12s;
}
.option:hover { border-color: var(--gold-soft); }
.option.selected { border-color: var(--gold); background: #fdf8ee; }
.option .letter {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line); display: grid; place-items: center;
  font-weight: 700; color: var(--navy); text-transform: uppercase;
}
.option.selected .letter { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.option .opt-text { flex: 1; }

/* Nav row */
.nav-row { display: flex; gap: 10px; margin-top: 14px; }
.nav-row .btn-navy { margin-left: auto; }

/* ====== Palette ====== */
.palette-title { margin: 0 0 12px; font-size: 15px; color: var(--navy); }
.palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pal-btn {
  position: relative;
  aspect-ratio: 1; border-radius: 8px; border: 1.5px solid var(--line);
  background: #fff; color: var(--navy); font-weight: 700; cursor: pointer;
  font-size: 13px;
}
.pal-btn.answered { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.pal-btn.marked { background: var(--review-bg); border-color: var(--review); color: #5a3a8a; }
.pal-btn.answered.marked::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
/* Guessed (but answered) cells show amber-yellow instead of green. */
.pal-btn.guessed { background: #f7dd8a; border-color: #d7a92c; color: #7a5c10; }
.pal-btn.current { outline: 3px solid var(--gold); border-color: var(--gold); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); margin: 14px 0 10px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: middle; margin-right: 3px; }
.dot-answered { background: var(--green-bg); border: 1.5px solid var(--green); }
.dot-unanswered { background: #fff; border: 1.5px solid var(--line); }
.dot-current { background: var(--gold); }
.dot-marked { background: var(--review-bg); border: 1.5px solid var(--review); }
.palette-stats { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.palette-stats strong { color: var(--navy); }

/* ====== Results ====== */
.score-card { text-align: center; margin-bottom: 18px; }
.score-card h2 { margin: 0 0 4px; color: var(--navy); }
.score-name { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.score-big { font-size: 54px; font-weight: 800; color: var(--gold); line-height: 1; }
.score-total { font-size: 22px; color: var(--muted); margin-left: 6px; }
.score-sub { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill-right { background: var(--green-bg); color: var(--green); }
.pill-wrong { background: var(--red-bg); color: var(--red); }
.pill-skip { background: #eef1f6; color: var(--muted); }

.accuracy-line { margin-top: 14px; font-size: 15px; color: var(--navy); }
.accuracy-line strong { font-size: 22px; color: var(--gold); margin: 0 4px; }

/* ---- Detailed performance report (toggle) ---- */
.report-toggle { margin-bottom: 18px; }
/* Yellowish "View Detailed Performance Report" button */
button.report-toggle { background: #f9e6a3; border: 1.5px solid #dcbb4e; color: #5f4b0f; }
button.report-toggle:hover { filter: brightness(1.04); }
.report-panel { margin-bottom: 18px; }
.report-capture { background: var(--white); padding: 4px 2px 8px; }
.report-head { text-align: center; border-bottom: 2px solid var(--gold); padding-bottom: 12px; margin-bottom: 16px; }
.report-brand { color: var(--gold); font-weight: 800; letter-spacing: 2px; text-transform: uppercase; font-size: 12px; }
.report-title { margin: 4px 0 4px; color: var(--navy); font-size: 19px; }
.report-meta { margin: 0; color: var(--muted); font-size: 13px; }
.report-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.rstat { background: var(--paper); border-radius: 10px; padding: 10px 6px; text-align: center; }
.rstat-num { display: block; font-size: 19px; font-weight: 800; color: var(--navy); }
.rstat-lbl { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.report-highlights { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.report-hl { font-size: 13.5px; padding: 8px 12px; border-radius: 8px; }
.report-hl.strong { background: var(--green-bg); color: var(--green); }
.report-hl.weak { background: var(--red-bg); color: var(--red); }
.report-subhead { margin: 0 0 14px; color: var(--navy); font-size: 15px; }

.topic-row { margin-bottom: 13px; }
.topic-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; margin-bottom: 5px; }
.topic-name { color: var(--navy); font-weight: 600; }
.topic-score { color: var(--muted); white-space: nowrap; }
.topic-track { height: 10px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.topic-fill { height: 100%; border-radius: 999px; min-width: 2px; transition: width .5s ease; }
.topic-fill.good { background: var(--green); }
.topic-fill.mid { background: var(--gold); }
.topic-fill.low { background: var(--red); }

@media (max-width: 520px) { .report-stats { grid-template-columns: repeat(2, 1fr); } }

.review { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.rev-card { border-left: 5px solid var(--line); }
.rev-card.correct { border-left-color: var(--green); }
.rev-card.wrong { border-left-color: var(--red); }
.rev-card.skipped { border-left-color: var(--muted); }
.rev-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rev-q { font-weight: 600; margin: 0 0 8px; }
.rev-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-correct { background: var(--green-bg); color: var(--green); }
.badge-wrong { background: var(--red-bg); color: var(--red); }
.badge-skipped { background: #eef1f6; color: var(--muted); }
.rev-line { font-size: 14px; margin: 4px 0; }
.rev-line .lbl { color: var(--muted); }
.rev-line .ans-right { color: var(--green); font-weight: 600; }
.rev-line .ans-wrong { color: var(--red); font-weight: 600; }
.rev-subs { margin: 2px 0 8px; padding-left: 22px; }
.rev-subs li { font-size: 14px; margin: 2px 0; color: #243b5e; }
.rev-opts { list-style: none; margin: 4px 0 10px; padding: 0; }
.rev-opts li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; padding: 5px 10px; margin: 4px 0; border-radius: 6px; background: var(--paper); }
.rev-opt-letter { font-weight: 700; color: var(--muted); min-width: 16px; text-transform: uppercase; }
.rev-opt.is-correct { background: var(--green-bg); color: var(--green); font-weight: 600; }
.rev-opt.is-correct .rev-opt-letter { color: var(--green); }
.rev-opt.is-wrong { background: var(--red-bg); color: var(--red); }
.rev-opt.is-wrong .rev-opt-letter { color: var(--red); }
.rev-exp { font-size: 14px; background: var(--paper); border-radius: 8px; padding: 10px 12px; margin-top: 8px; color: #243b5e; }
.rev-pyq { display: inline-block; font-size: 10.5px; color: var(--gold); font-weight: 700; letter-spacing: .3px; text-transform: uppercase; background: rgba(201,162,75,.12); border: 1px solid rgba(201,162,75,.4); padding: 1px 8px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }

/* ====== Overlay ====== */
.overlay { position: fixed; inset: 0; background: rgba(11,31,58,.7); display: grid; place-items: center; z-index: 100; }
.overlay-box { background: #fff; border-radius: 14px; padding: 28px 36px; text-align: center; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--gold); border-radius: 50%; margin: 0 auto 14px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== Motivational quote (camouflage tile) ====== */
.quote-tile{
  position:relative; overflow:hidden; text-align:center;
  border-radius:14px; border:2px solid var(--gold);
  margin:26px 0 6px; padding:30px 24px;
  background:#3d3c24 url("assets/camo.png") center/cover no-repeat;
}
.quote-tile::before{content:"";position:absolute;inset:0;background:rgba(14,20,10,.5)}
.quote-text{position:relative;z-index:1;max-width:none;margin:0;color:#fff;
  font-family:"Cinzel",Georgia,serif;font-size:19px;font-weight:700;line-height:1.6;letter-spacing:.5px;text-shadow:0 1px 5px rgba(0,0,0,.7)}
.quote-author{display:block;margin-top:12px;color:var(--gold-soft);font-family:"Cinzel",Georgia,serif;font-weight:700;font-size:14px;letter-spacing:1px}

/* ====== Social / mentorship CTA ====== */
.m-br{display:none}
@media(max-width:600px){.m-br{display:inline}}
.cta{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;text-align:center;
  background:linear-gradient(135deg,#0B1F3A,#12294b);color:#fff;border-radius:14px;padding:14px 18px;margin:16px 0;
  text-decoration:none;transition:filter .15s ease}
.cta:hover{filter:brightness(1.08)}
.cta-text{font-size:15px;font-weight:600;color:#fff;line-height:1.4}
.cta-go{font-size:15px;font-weight:700;color:var(--gold);white-space:nowrap}
.cta:hover .cta-go{color:#fff}
.cta-social{display:flex;gap:16px;align-items:center}
.cta-social a{color:#e0bd6a;display:inline-flex;line-height:0;transition:color .12s,transform .12s}
.cta-social a:hover{color:#fff;transform:translateY(-2px)}

.join-label{text-align:center;font-weight:800;color:#0B1F3A;font-size:16px;margin:26px 0 0}
.foot-social{display:flex;justify-content:center;gap:24px;margin:10px 0 6px}
.foot-social a{color:#0B1F3A;display:inline-flex;line-height:0;transition:color .12s,transform .12s}
.foot-social a:hover{color:#C9A24B;transform:translateY(-2px)}

/* ====== Exam countdown timer(s) ====== */
.exam-timers{display:flex;flex-wrap:wrap;justify-content:center;gap:28px;margin:24px 0 6px}
.exam-timer{text-align:center;font-family:"Consolas","SF Mono",ui-monospace,"DejaVu Sans Mono",monospace}
.exam-timer .et-name{font-size:11px;color:#e0bd6a;letter-spacing:1.5px;text-transform:uppercase}
.exam-timer .et-date{font-size:10.5px;color:#8f9488;letter-spacing:1px;text-transform:uppercase;margin-top:3px}
.exam-timer .et-count{margin-top:10px;line-height:1}

/* seven-segment LED "bomb timer" digits (DSEG7 — SIL OFL font) */
@font-face{
  font-family:'DSEG7';
  src:url('assets/DSEG7Classic-Bold.woff2') format('woff2');
  font-weight:700;font-style:normal;font-display:swap;
}
.et-count .n{
  display:block;text-align:center;text-indent:4px;
  font-family:'DSEG7',monospace;font-size:32px;line-height:1;letter-spacing:4px;
  color:#ff2f2f;
  text-shadow:0 0 8px rgba(255,45,45,.9),0 0 2px rgba(255,95,95,.95);
  animation:led-pulse 2s ease-in-out infinite;
}
.et-count .et-unit{
  display:block;text-align:center;margin-top:7px;
  font-family:monospace;font-size:11px;color:#8f9488;text-transform:uppercase;letter-spacing:1px;
}
@keyframes led-pulse{
  0%,100%{opacity:1;   text-shadow:0 0 9px rgba(255,45,45,.95),0 0 3px rgba(255,95,95,1)}
  50%    {opacity:.38; text-shadow:0 0 3px rgba(255,45,45,.35)}
}
@media(prefers-reduced-motion:reduce){.et-count .n{animation:none}}

/* ====== Footer ====== */
.site-footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px; }

/* ====== Mobile ====== */
@media (max-width: 760px) {
  .quiz-grid { grid-template-columns: 1fr; }
  .palette-col { order: -1; }            /* palette above question on phones */
  .palette { grid-template-columns: repeat(8, 1fr); }
  .q-stem { font-size: 16.5px; }
  .timer { font-size: 20px; }
  .nav-row { flex-wrap: wrap; }
  .nav-row .btn { flex: 1; }
  .nav-row .btn-navy { margin-left: 0; }
}
