@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Outfit:wght@300;400;600;700&display=swap');

/* ─── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --navy-deep:    #0A1929;
  --panel-bg:     #0D1B2E;
  --navy-primary: #1E3A5F;
  --bright-blue:  #2E5C99;
  --light-blue:   #4A90E2;
  --gold-accent:  #D4AF37;
  --gold-muted:   rgba(212,175,55,0.15);
  --slate:        #7A8FA6;
  --cream:        #F8F6F1;
  --muted-blue:   #8EA5BC;
  --error-red:    #F87171;
  --success-green:#4ADE80;
  --warning:      #FBBF24;
  --radius:       12px;
  --shadow:       0 4px 24px rgba(0,0,0,0.45);
}

/* ─── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--navy-deep);
  color: var(--cream);
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }

a { color: var(--light-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

button { cursor: pointer; font-family: 'Outfit', sans-serif; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* results.php uses plain .container, the same 1100px wrapper test.php puts the
   question panel in, so the wrong-answer review is exactly as wide as the
   question was during the test.

   It briefly used a bespoke .container--results here instead. That was a bad
   idea: the class only existed in this file, so any browser holding a cached
   copy of the old stylesheet matched no rule at all and let the panel run the
   full width of the window. Reusing a class that has been live for months
   cannot fail that way. */

/* ─── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--panel-bg);
  border-bottom: 2px solid var(--gold-accent);
  padding: 1.25rem 0 0.75rem;
}

.site-header__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.site-header__logo-img {
  height: 52px;
  width: auto;
  border-radius: 4px;
}

.site-header__logo-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1;
}

.site-header__logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-accent);
  letter-spacing: 0.08em;
}

.site-header__logo-slogan {
  font-size: 0.72rem;
  color: var(--muted-blue);
  letter-spacing: 0.05em;
  font-style: italic;
}

/* ─── Site footer / copyright ─────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 1.25rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid var(--navy-primary);
  font-size: 0.73rem;
  color: var(--slate);
  line-height: 1.6;
}

.site-header__user {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted-blue);
}

.site-header__user strong {
  color: var(--cream);
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
}

.btn:active:not(:disabled) { transform: translateY(1px); }

.btn--primary {
  background: var(--bright-blue);
  color: #fff;
}
.btn--primary:hover:not(:disabled) { background: #3a70b8; }

.btn--ghost {
  background: transparent;
  color: var(--muted-blue);
  border: 1px solid var(--navy-primary);
}
.btn--ghost:hover:not(:disabled) { border-color: var(--bright-blue); color: var(--cream); }

.btn--danger {
  background: transparent;
  color: var(--error-red);
  border: 1px solid var(--error-red);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}
.btn--danger:hover:not(:disabled) { background: rgba(248,113,113,0.1); }

.btn--secondary {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--navy-primary);
}
.btn--secondary:hover:not(:disabled) { border-color: var(--bright-blue); color: var(--light-blue); }

.btn--full { width: 100%; }

.btn--lg {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
}

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--panel-bg);
  border: 1px solid var(--navy-primary);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* ─── Login Page ─────────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: radial-gradient(ellipse at top, #0D1B2E 0%, var(--navy-deep) 70%);
}

.login-page__logo {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-page__logo h1 {
  font-size: 2.2rem;
  color: var(--cream);
  margin-bottom: 0.25rem;
}

.login-page__logo p {
  color: var(--muted-blue);
  font-size: 0.95rem;
}

.login-page__logo .accent-bar {
  width: 60px;
  height: 3px;
  background: var(--gold-accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.login-page__hero {
  text-align: center;
  margin-bottom: 2rem;
}

.login-page__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-accent);
  margin-bottom: 0.75rem;
}

.login-page__service {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-blue);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.login-page__headline {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--cream);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.login-page__sub {
  font-size: 0.88rem;
  color: var(--muted-blue);
}

.login-card {
  width: 100%;
  max-width: 420px;
}

/* ─── Form Elements ──────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  background: var(--navy-deep);
  border: 1px solid var(--navy-primary);
  border-radius: 8px;
  color: var(--cream);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--bright-blue);
  box-shadow: 0 0 0 3px rgba(46,92,153,0.25);
}

.form-group input::placeholder { color: var(--slate); }

/* ─── Alert ──────────────────────────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: none;
}

.alert--error {
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.4);
  color: var(--error-red);
}

.alert--success {
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.4);
  color: var(--success-green);
}

/* ─── Dashboard ──────────────────────────────────────────────────────────────── */
.dashboard-page {
  padding: 2.5rem 0 4rem;
}

.dashboard-page__title {
  font-size: 1.8rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.dashboard-page__subtitle {
  color: var(--muted-blue);
  margin-bottom: 2.5rem;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.test-card {
  background: var(--panel-bg);
  border: 1px solid var(--navy-primary);
  border-radius: var(--radius);
  padding: 2rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.test-card:hover {
  border-color: var(--gold-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(212,175,55,0.18);
}

.test-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold-accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.test-card:hover::before { opacity: 1; }

.test-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.test-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.test-card__meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.meta-badge {
  font-size: 0.8rem;
  color: var(--muted-blue);
  background: rgba(46,92,153,0.15);
  border: 1px solid rgba(46,92,153,0.3);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}

.test-card__best-score {
  font-size: 0.85rem;
  color: var(--muted-blue);
  border-top: 1px solid var(--navy-primary);
  padding-top: 0.9rem;
  margin-top: 0.5rem;
}

.test-card__best-score span {
  color: var(--success-green);
  font-weight: 600;
}

/* ─── Test Page ──────────────────────────────────────────────────────────────── */
.test-topbar {
  background: var(--panel-bg);
  border-bottom: 2px solid var(--gold-accent);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.test-topbar__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.test-topbar__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
}

.test-topbar__counter {
  font-size: 0.9rem;
  color: var(--muted-blue);
  white-space: nowrap;
}

.test-topbar__counter strong {
  color: var(--light-blue);
  font-size: 1rem;
}

.timer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cream);
  background: rgba(46,92,153,0.2);
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
  min-width: 80px;
  justify-content: center;
}

.timer--warning { color: var(--warning); background: rgba(251,191,36,0.15); }
.timer--critical { color: var(--error-red); background: rgba(248,113,113,0.15); }
.timer--break-critical { color: var(--error-red); background: rgba(248,113,113,0.15); animation: pulse-timer 1s ease-in-out infinite; }

@keyframes pulse-timer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.btn--pulse { animation: pulse-btn 1s ease-in-out infinite; }
@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46,92,153,0.7); }
  50%       { box-shadow: 0 0 0 8px rgba(46,92,153,0); }
}

.progress-bar-wrap {
  height: 3px;
  background: var(--navy-primary);
}

.progress-bar {
  height: 100%;
  background: var(--gold-accent);
  transition: width 0.3s ease;
}

/* ─── Question Area ──────────────────────────────────────────────────────────── */
.test-main {
  padding: 2.5rem 0 4rem;
}

.question-card {
  background: var(--panel-bg);
  border: 1px solid var(--navy-primary);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

/* ─── Per-question circular countdown clock ──────────────────────────────── */
.q-clock {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.q-clock__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.q-clock__bg {
  fill: none;
  stroke: var(--navy-primary);
  stroke-width: 5;
}
.q-clock__arc {
  fill: none;
  stroke: var(--bright-blue);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s linear, stroke 0.3s ease;
}
.q-clock__text {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream);
  font-family: 'Outfit', sans-serif;
  line-height: 1;
}

.question-card__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-accent);
  margin-bottom: 0.75rem;
}

.question-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted-blue);
  margin-bottom: 0.5rem;
}

.question-card__text {
  font-size: 1.05rem;
  color: var(--cream);
  line-height: 1.7;
}

.question-card__image {
  width: 100%;
  max-width: 680px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.question-card__image--diagram {
  max-width: 210px;
  margin: 1rem auto 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: #fff;
  padding: 8px;
}

.question-card__text--caption {
  text-align: center;
  font-weight: 600;
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ─── Answer Options ─────────────────────────────────────────────────────────── */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.option-btn {
  width: 100%;
  background: var(--panel-bg);
  border: 2px solid var(--navy-primary);
  border-radius: 10px;
  color: var(--cream);
  font-size: 0.95rem;
  padding: 0.9rem 1.25rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: border-color 0.15s, background 0.15s;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--bright-blue);
  background: rgba(46,92,153,0.1);
}

.option-btn.selected {
  border-color: var(--bright-blue);
  background: rgba(46,92,153,0.2);
}

.option-btn.correct {
  border-color: var(--success-green);
  background: rgba(74,222,128,0.1);
  color: var(--success-green);
}

.option-btn.wrong {
  border-color: var(--error-red);
  background: rgba(248,113,113,0.1);
  color: var(--error-red);
}

.option-btn__letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-primary);
  color: var(--muted-blue);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.option-btn.selected .option-btn__letter {
  background: var(--bright-blue);
  color: #fff;
}

.option-btn.correct .option-btn__letter {
  background: var(--success-green);
  color: var(--navy-deep);
}

.option-btn.wrong .option-btn__letter {
  background: var(--error-red);
  color: #fff;
}

/* Figure Analogy options in 2×2 grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.options-grid .option-btn {
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  padding: 0.9rem 0.5rem;
}

/* Option buttons that display an image instead of text label (e.g. QR Q11 graph choices) */
.option-btn--image {
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  min-height: 0;
}

.option-btn__image {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  border-radius: 6px;
  background: #fff;
}

/* Spatial Analogy — labels aligned below each figure cell */
.spatial-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.spatial-img-wrap {
  position: relative;
}

.spatial-img-wrap img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* Blue separator overlay at the gap between Q and A sections */
/* Gap re-measured after the 1/8" (12px) gap regen: across all 59 images the
   white Q/A gap spans left 41.8–42.3% to right 50.9–51.4%. Overlay kept
   strictly inside that band so it never covers the (2B) "?" box or clips
   the first answer figure. */
.spatial-img-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: var(--gap-left, 43.5%);
  width: var(--gap-width, 4%);
  height: 100%;
  background: var(--navy-deep);
  pointer-events: none;
}

/* 3x3 matrix puzzles, which arrived with Figure Analogy tests 5-8.
   Their divider sits at 33.7-43.6% rather than the analogy layout's
   42.5-52.8%, so the overlay and the label row both have to move left.
   Measured across all 139 spatial images; the two shapes do not overlap. */
.spatial-wrap--matrix .spatial-img-wrap {
  --gap-left: 35.5%;
  --gap-width: 6%;
}
.spatial-wrap--matrix .spatial-problem-labels { flex: 0 0 34%; }
.spatial-wrap--matrix .spatial-labels-gap     { flex: 0 0 10%; }
.spatial-wrap--matrix .spatial-answer-labels  { flex: 0 0 56%; }

/* A matrix puzzle is a 3x3 grid with one cell missing - there is no
   first pair and second pair, so (1A) (1B) (2A) (2B) describe nothing. */
.spatial-wrap--matrix .spatial-problem-labels { visibility: hidden; }

.spatial-labels-row {
  display: flex;
  margin-top: 0.3rem;
  padding: 0 0.25rem;
}

.spatial-problem-labels {
  flex: 0 0 45%;
  display: flex;
  justify-content: space-around;
}

.spatial-labels-gap {
  flex: 0 0 8.5%;
  background: var(--navy-deep);
}

.spatial-answer-labels {
  flex: 0 0 46.5%;
  display: flex;
  justify-content: space-around;
}

.spatial-lbl {
  font-size: 0.78rem;
  color: var(--muted-blue);
  font-style: italic;
  line-height: 1;
  padding-top: 0.15rem;
}

/* Answer label buttons (inherit .option-btn base, override size) */
.spatial-lbl--btn {
  width: auto;
  min-width: 2.2rem;
  height: auto;
  padding: 0.2rem 0.4rem;
  font-size: 0.82rem;
  font-style: italic;
  text-align: center;
  justify-content: center;
  color: var(--muted-blue);
  border-color: var(--navy-primary);
  background: transparent;
}

.spatial-lbl--btn.selected {
  background: var(--bright-blue);
  border-color: var(--bright-blue);
  color: #fff;
  font-style: italic;
}

/* ─── Explanation box (review mode) ─────────────────────────────────────────── */
.explanation-box {
  background: rgba(212,175,55,0.07);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted-blue);
  line-height: 1.7;
  display: none;
}

.explanation-box strong { color: var(--gold-accent); }

/* ─── Resource button (learning link on wrong answers) ──────────────────────── */
.btn--resource {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: transparent;
  color: var(--gold-accent);
  border: 1px solid rgba(212,175,55,0.5);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn--resource:hover {
  background: rgba(212,175,55,0.12);
  border-color: var(--gold-accent);
  color: var(--gold-accent);
  text-decoration: none;
}

/* ─── Navigation row ─────────────────────────────────────────────────────────── */
.test-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* ─── Results Page ───────────────────────────────────────────────────────────── */
.results-page {
  padding: 2.5rem 0 4rem;
}

.score-card {
  background: var(--panel-bg);
  border: 1px solid var(--navy-primary);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  /* Centred and capped: the container around it is 900px wide for the review
     below, but a score and a badge stretched that far reads as an empty band. */
  max-width: 480px;
  margin: 0 auto 2rem;
  position: relative;
  overflow: hidden;
}

.score-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.score-card.pass::before { background: var(--success-green); }
.score-card.fail::before { background: var(--error-red); }

.score-card__number {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.score-card.pass .score-card__number { color: var(--success-green); }
.score-card.fail .score-card__number { color: var(--error-red); }

.score-card__label {
  font-size: 1rem;
  color: var(--muted-blue);
  margin-bottom: 1rem;
}

.score-card__badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.score-card.pass .score-card__badge {
  background: rgba(74,222,128,0.15);
  color: var(--success-green);
  border: 1px solid rgba(74,222,128,0.4);
}

.score-card.fail .score-card__badge {
  background: rgba(248,113,113,0.15);
  color: var(--error-red);
  border: 1px solid rgba(248,113,113,0.4);
}

.score-card__meta {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.85rem;
  color: var(--slate);
}

.score-card__meta strong { color: var(--cream); }

.results-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;   /* follows the centred score card above it */
  margin-bottom: 2.5rem;
}

/* ─── Review Section ─────────────────────────────────────────────────────────── */
.review-header {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--gold-accent);
  margin-bottom: 0.5rem;
}

.review-subtitle {
  color: var(--muted-blue);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.review-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.review-counter {
  font-size: 0.85rem;
  color: var(--slate);
}

/* ─── Spinner ────────────────────────────────────────────────────────────────── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--navy-primary);
  border-top-color: var(--gold-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 2rem auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.analysis-progress-bar {
  width: 100%;
  height: 10px;
  background: var(--navy-primary);
  border-radius: 5px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.analysis-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold-accent);
  border-radius: 5px;
  transition: width 0.4s ease;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .test-topbar__title { font-size: 0.85rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .test-topbar__counter { display: none; }
  .question-card { padding: 1.25rem; }
  .score-card__number { font-size: 3rem; }
  .results-actions { flex-direction: column; }
  .score-card__meta { flex-direction: column; gap: 0.5rem; }
}

/* ─── RTL support (Hebrew tests) ──────────────────────────────────────────── */
[dir="rtl"] .question-card__text,
[dir="rtl"] .question-card__title,
[dir="rtl"] .question-card__label,
[dir="rtl"] .explanation-box,
[dir="rtl"] .review-header,
[dir="rtl"] .review-subtitle,
[dir="rtl"] .score-card__label,
[dir="rtl"] .score-card__meta,
[dir="rtl"] .score-card__badge,
[dir="rtl"] .wrong-counter,
[dir="rtl"] p,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .option-btn {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .option-btn__letter {
  margin-right: 0;
  margin-left: 0.75rem;
}

[dir="rtl"] .test-topbar__inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .test-nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .score-card__meta {
  direction: rtl;
}
