/* mock_test.css – listing, instructions, results, leaderboard pages */

/* ── Hero ── */
.mt-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1e3a6e 100%);
  padding: 5rem 0 3rem;
  margin-top: 0;
}
.mt-hero-inner { max-width: 1050px; margin: 0 auto; padding: 0 1.5rem; }
.mt-hero-text h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin: 0.5rem 0;
}
.mt-hero-text p { color: rgba(255,255,255,0.75); font-size: 1.05rem; max-width: 600px; }
.mt-pill {
  display: inline-block;
  background: rgba(255,107,0,0.25);
  border: 1px solid rgba(255,107,0,0.5);
  color: #FFB347;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.highlight { color: var(--saffron); }

/* ── Exam Hero (per-exam page) ── */
.mt-exam-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  padding: 5rem 2rem 2.5rem;
  margin-top: 0;
}
.mt-exam-hero-inner { max-width: 900px; margin: 0 auto; }
.mt-exam-hero-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.mt-exam-hero-content h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}
.mt-exam-hero-content p { color: rgba(255,255,255,0.75); }
.mt-exam-hero-logo {
  height: 64px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
}
.mt-pass-notice {
  margin-top: 0.75rem;
  background: rgba(255,107,0,0.15);
  border: 1px solid rgba(255,107,0,0.4);
  border-radius: 8px;
  padding: 8px 14px;
  color: #FFC085;
  font-size: 0.88rem;
}
.mt-pass-notice a { color: var(--saffron-light); font-weight: 700; }

/* ── Container ── */
.mt-container { padding: 2.5rem 1.5rem; }

/* ── Exam Card Grid ── */
.mt-exams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
  gap: 1.25rem;
  justify-content: start;
}
.mt-exam-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem 1.25rem 1.1rem;
  text-decoration: none;
  color: var(--navy);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.mt-exam-card:hover {
  border-color: var(--saffron);
  box-shadow: 0 6px 24px rgba(255,107,0,0.12);
  transform: translateY(-2px);}
.mt-exam-logo img {
  height: 80px;
  width: 80px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--gray-light);
  padding: 6px;
}
.mt-exam-logo-placeholder {
  height: 80px; width: 80px;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--saffron);
}
.mt-exam-logo-placeholder.large { height: 80px; width: 80px; font-size: 1.4rem; }
.mt-exam-info { flex: 1; width: 100%; }
.mt-exam-info h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.mt-exam-desc  { font-size: 0.78rem; color: var(--gray-mid); margin-bottom: 0.4rem; }
.mt-exam-meta  { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.mt-meta-chip  {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.mt-chip-total { background: #EEF2FF; color: #4338CA; }
.mt-chip-free  { background: #DCFCE7; color: #16A34A; }
.mt-chip-stage { background: #FDF4FF; color: #7C3AED; }
.mt-exam-arrow { display: none; }

/* ── Stage / Type Groups ── */
.mt-stage-section   { margin-bottom: 2.5rem; }
.mt-stage-header    { margin-bottom: 1rem; }
.mt-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy);
  color: #fff;
  padding: 6px 18px;
  border-radius: 20px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
}
.mt-type-section  { margin-bottom: 1.75rem; }
.mt-type-heading  {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-mid);
  margin-bottom: 0.85rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--saffron);
}

/* ── Test Cards ── */
.mt-tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}
.mt-test-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  position: relative;
}
.mt-test-card:hover { border-color: var(--saffron); box-shadow: 0 6px 20px rgba(255,107,0,0.1); }
.mt-test-card.attempted { border-color: var(--accent-green); }

.mt-live-badge {
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  text-align: center;
}
.mt-live-badge.upcoming { background: #d97706; }

.mt-test-card-body { padding: 1rem 1rem 0.5rem; flex: 1; }
.mt-test-card-body h4 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--navy);
}
.mt-test-desc { font-size: 0.8rem; color: var(--gray-mid); margin-bottom: 0.5rem; }
.mt-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: #EEF2FF;
  color: #4338CA;
  margin-right: 4px;
}
.mt-tag-topic { background: #FDF4FF; color: #7C3AED; }

.mt-test-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--gray-light);
  font-size: 0.75rem;
  color: var(--gray-mid);
}
.mt-test-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--gray-light);
  background: var(--gray-light);
}
.mt-free-tag { font-size: 0.75rem; font-weight: 700; color: #16A34A; }
.mt-paid-tag { font-size: 0.75rem; font-weight: 700; color: var(--saffron); }

/* ── Buttons ── */
.mt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}
.mt-btn-primary { background: var(--saffron); color: #fff; }
.mt-btn-primary:hover { background: var(--saffron-light); }
.mt-btn-secondary { background: var(--gray-light); color: var(--navy); border: 1.5px solid #e2e8f0; }
.mt-btn-secondary:hover { border-color: var(--navy); background: var(--navy); color: #fff; }
.mt-btn-start {
  background: linear-gradient(135deg, var(--saffron), #FF3D00);
  color: #fff;
  padding: 12px 36px;
  font-size: 1.05rem;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(255,107,0,0.35);
}
.mt-btn-start:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,0,0.45); }

/* ── Instructions page ── */
.mt-instructions-wrap { padding-top: 2rem; max-width: 760px !important; }
.mt-back-link { color: var(--navy); font-weight: 600; text-decoration: none; font-size: 0.88rem; }
.mt-back-link:hover { color: var(--saffron); }

.mt-instructions-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  margin-top: 1rem;
}
.mt-instructions-header {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  padding: 1.75rem 2rem;
  color: #fff;
}
.mt-test-type-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.6); margin-bottom: 0.3rem; }
.mt-instructions-header h1 { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; }
.mt-subtitle { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin-top: 0.3rem; }

.mt-stats-row {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid #e2e8f0;
}
.mt-stat {
  flex: 1;
  min-width: 80px;
  padding: 1rem;
  text-align: center;
  border-right: 1px solid #e2e8f0;
}
.mt-stat:last-child { border-right: none; }
.mt-stat-val { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--saffron); }
.mt-stat-label { font-size: 0.72rem; color: var(--gray-mid); text-transform: uppercase; font-weight: 600; }

.mt-live-info {
  background: #FEF2F2;
  border-left: 4px solid var(--red);
  padding: 0.75rem 1.5rem;
  font-size: 0.88rem;
  color: #991B1B;
}

.mt-rules { padding: 1.5rem 2rem; }
.mt-rules h2 { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 0.85rem; }
.mt-rules ul { padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.mt-rules li { font-size: 0.9rem; line-height: 1.6; }

.mt-instructions-cta {
  padding: 1.5rem 2rem 2rem;
  text-align: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.mt-consent { font-size: 0.82rem; color: var(--gray-mid); }
.mt-already-attempted { background: #DCFCE7; color: #166534; padding: 0.75rem 1.25rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; }
.mt-resume-notice { background: #FEF3C7; color: #92400E; padding: 0.75rem 1.25rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; }

/* ── Results page ── */
.mt-result-wrap { max-width: 800px; margin: 0 auto; }
.mt-result-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}
.mt-result-header {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  padding: 1.5rem 2rem;
  color: #fff;
}
.mt-result-exam { font-size: 0.78rem; text-transform: uppercase; color: rgba(255,255,255,0.6); letter-spacing: 0.06em; margin-bottom: 0.25rem; }
.mt-result-header h1 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; }

.mt-score-ring-wrap { text-align: center; padding: 2rem 1rem 0.5rem; }
.mt-score-ring { position: relative; display: inline-block; }
.mt-score-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.mt-score-big { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--navy); line-height: 1; }
.mt-score-total { font-size: 0.78rem; color: var(--gray-mid); }
.mt-percentage { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--saffron); margin-top: 0.25rem; }

.mt-result-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  margin-top: 1rem;
}
.mt-rstat {
  flex: 1;
  min-width: 90px;
  padding: 1rem 0.5rem;
  text-align: center;
  border-right: 1px solid #e2e8f0;
}
.mt-rstat:last-child { border-right: none; }
.mt-rstat-val { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; }
.mt-rstat-label { font-size: 0.7rem; color: var(--gray-mid); text-transform: uppercase; font-weight: 600; margin-top: 2px; }
.mt-rstat-correct .mt-rstat-val { color: #16A34A; }
.mt-rstat-wrong   .mt-rstat-val { color: var(--red); }
.mt-rstat-skip    .mt-rstat-val { color: var(--gray-mid); }
.mt-rstat-rank    .mt-rstat-val { color: var(--saffron); }

.mt-result-actions { display: flex; gap: 1rem; justify-content: center; padding: 1.5rem; flex-wrap: wrap; }

/* Analysis */
.mt-analysis-section { }
.mt-analysis-section h2 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; margin-bottom: 0.25rem; }
.mt-analysis-subtitle  { color: var(--gray-mid); font-size: 0.88rem; margin-bottom: 1.25rem; }

.mt-qa-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  border-left-width: 4px;
}
.mt-qa-correct { border-left-color: #16A34A; }
.mt-qa-wrong   { border-left-color: var(--red); }
.mt-qa-skipped { border-left-color: var(--gray-mid); }

.mt-qa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: var(--gray-light);
}
.mt-qa-num { font-weight: 700; font-size: 0.82rem; color: var(--gray-mid); }
.mt-qa-result-badge { font-size: 0.78rem; font-weight: 700; }
.mt-badge-correct { color: #16A34A; }
.mt-badge-wrong   { color: var(--red); }
.mt-badge-skipped { color: var(--gray-mid); }

.mt-qa-text { padding: 1rem 1rem 0.5rem; font-size: 0.95rem; font-weight: 500; line-height: 1.6; }

.mt-qa-options { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.5rem 1rem 0.75rem; }
.mt-qa-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  background: var(--gray-light);
  font-size: 0.88rem;
  position: relative;
}
.mt-opt-correct { background: #DCFCE7; color: #166534; font-weight: 600; }
.mt-opt-wrong   { background: #FEE2E2; color: #991B1B; text-decoration: line-through; }
.mt-opt-label   { font-weight: 700; min-width: 22px; }
.mt-opt-tick    { margin-left: auto; font-weight: 700; color: #16A34A; }
.mt-opt-cross   { margin-left: auto; font-size: 0.75rem; font-weight: 700; color: var(--red); }

.mt-qa-explanation {
  padding: 0.75rem 1rem;
  background: #FFF3E8;
  border-top: 1px solid #FFE0C2;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #7C2D12;
}

/* ── Leaderboard ── */
.mt-leaderboard-wrap { max-width: 760px; margin: 0 auto; }
.mt-lb-header { text-align: center; padding: 1.5rem 0 1rem; }
.mt-lb-header h1 { font-family: var(--font-head); font-size: 2rem; font-weight: 800; }
.mt-lb-header p  { color: var(--gray-mid); margin-top: 0.25rem; }
.mt-lb-your-rank {
  background: #FFF3E8;
  border: 1.5px solid rgba(255,107,0,0.3);
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.mt-lb-table-wrap {
  background: #fff;
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.mt-lb-table { width: 100%; border-collapse: collapse; }
.mt-lb-table thead { background: var(--navy); color: #fff; }
.mt-lb-table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.mt-lb-table td { padding: 0.75rem 1rem; font-size: 0.9rem; border-bottom: 1px solid #e2e8f0; }
.mt-lb-table tbody tr:last-child td { border-bottom: none; }
.mt-lb-table tbody tr:hover { background: var(--gray-light); }
.mt-lb-you { background: #FFF3E8 !important; font-weight: 600; }
.mt-you-tag {
  background: var(--saffron);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}
.mt-correct-col { color: #16A34A; font-weight: 700; }
.mt-wrong-col   { color: var(--red); font-weight: 700; }

/* ── Empty state ── */
.mt-empty { text-align: center; padding: 4rem 2rem; }
.mt-empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.mt-empty h3   { font-family: var(--font-head); font-size: 1.3rem; margin-bottom: 0.5rem; }
.mt-empty p    { color: var(--gray-mid); }
/* ── Test list cards ── */
.mt-tests-list { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }
.mt-test-card {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 1rem 1.25rem; gap: 1rem;
  transition: box-shadow .15s;
}
.mt-test-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.mt-test-info { flex: 1; }
.mt-test-title { font-weight: 700; font-size: 1rem; margin-bottom: .4rem; }
.mt-test-meta { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .82rem; color: #6b7280; align-items: center; }
.mt-btn { padding: .5rem 1.1rem; border-radius: 8px; font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.mt-btn-primary { background: #f97316; color: #fff; }
.mt-btn-primary:hover { background: #ea6c0a; }
.mt-btn-secondary { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }

/* ── Test list row (reference design) ── */
.mt-back-link { display:inline-block; margin-bottom:1.5rem; color:#f97316; text-decoration:none; font-weight:600; }
.mt-back-link:hover { text-decoration:underline; }

.mt-stage-heading { margin:2rem 0 .75rem; font-size:1.3rem; font-weight:700; border-bottom:2px solid #e5e7eb; padding-bottom:.5rem; color:#0f172a; }
.mt-type-heading  { margin:.25rem 0 .75rem; font-size:1rem; color:#6b7280; font-weight:600; }

.mt-tests-list { display:flex; flex-direction:column; gap:.75rem; margin-bottom:1.5rem; }

.mt-test-row {
  display:flex; align-items:center; justify-content:space-between; gap:1.5rem;
  background:#fff; border:1px solid #e5e7eb; border-radius:14px;
  padding:1.1rem 1.4rem;
  transition: box-shadow .15s, border-color .15s;
}
.mt-test-row:hover { box-shadow:0 4px 16px rgba(0,0,0,.08); border-color:#d1d5db; }

.mt-test-left  { flex:1; }
.mt-test-right { flex-shrink:0; }

.mt-test-row-title {
  font-size:1rem; font-weight:700; color:#0f172a;
  margin-bottom:.45rem; display:flex; align-items:center; gap:.5rem; flex-wrap:wrap;
}
.mt-test-row-meta {
  display:flex; flex-wrap:wrap; gap:1rem;
  font-size:.85rem; color:#6b7280;
}

.mt-row-badge {
  font-size:.72rem; font-weight:700; padding:2px 8px; border-radius:20px;
}
.mt-badge-free  { background:#d1fae5; color:#065f46; }
.mt-badge-paid  { background:#fef3c7; color:#92400e; }
.mt-badge-done  { background:#dbeafe; color:#1e40af; }

.mt-btn-start-now {
  display:inline-block; padding:.6rem 1.6rem;
  background:#22d3ee; color:#fff; font-weight:700; font-size:.95rem;
  border-radius:10px; text-decoration:none;
  transition: background .15s, transform .1s;
}
.mt-btn-start-now:hover { background:#06b6d4; transform:translateY(-1px); }
.mt-btn-locked { background:#94a3b8; }
.mt-btn-locked:hover { background:#64748b; }
/* ── Result page: section summary table ── */
.mt-section-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 1rem; }
.mt-section-table th, .mt-section-table td { padding: 0.6rem 1rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
.mt-section-table thead th { background: #f8fafc; font-weight: 600; color: #475569; }
.mt-cell-correct { color: #16a34a; font-weight: 600; }
.mt-cell-wrong   { color: #dc2626; font-weight: 600; }
.mt-cell-skip    { color: #d97706; font-weight: 600; }
.mt-qa-section { font-size: 0.72rem; background: #eff6ff; color: #1d4ed8; border-radius: 20px; padding: 2px 10px; font-weight: 600; margin-left: 6px; }
.mt-attempt-switcher {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: 10px 16px; margin-bottom: 16px; font-size: 0.88rem; font-weight: 600; color: #475569; flex-wrap: wrap;
}
.mt-attempt-select {
  padding: 6px 12px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 0.88rem; font-weight: 600; color: #0D1B3E; background: #fff; cursor: pointer;
}

/* ═══════════════════════════════════════════════════════
   RESULTS PAGE — MOBILE OVERFLOW FIXES
   ═══════════════════════════════════════════════════════ */

/* Let the wrap and card shrink inside flex/grid parents */
.mt-result-wrap  { min-width: 0; }
.mt-result-card  { max-width: 100%; }

/* The attempt <select> must be allowed to shrink below its
   long option text, otherwise it forces horizontal scroll. */
.mt-attempt-select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  text-overflow: ellipsis;
}

/* Horizontal-scroll wrapper for the cut-off / section tables
   so a wide table scrolls inside its card instead of pushing
   the whole page to the right. */
.mt-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.mt-table-scroll .mt-section-table {
  min-width: 460px;   /* keeps columns readable; scrolls if narrower */
}

@media (max-width: 640px) {
  .mt-container { padding: 1.25rem 0.9rem 2.5rem; }

  /* Attempt switcher: stack vertically */
  .mt-attempt-switcher {
    padding: 10px 12px;
    gap: 8px;
  }
  .mt-attempt-select { width: 100%; }
  .mt-attempt-switcher .mt-btn {
    margin-left: 0 !important;   /* overrides inline style on rank link */
    width: 100%;
    white-space: normal;
  }

  /* Score card header */
  .mt-result-header { padding: 1.1rem 1.2rem; }
  .mt-result-header h1 { font-size: 1.2rem; }
  .mt-result-exam { font-size: 0.7rem; }

  /* Stats: tidy 3-column grid instead of squeezed flex row */
  .mt-result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .mt-rstat {
    min-width: 0;
    padding: 0.85rem 0.35rem;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .mt-rstat:nth-child(-n+3) { border-bottom: 1px solid #e2e8f0; }
  .mt-rstat:nth-child(n+4)  { border-bottom: none; }
  .mt-rstat-val   { font-size: 1.25rem; }
  .mt-rstat-label { font-size: 0.62rem; }

  /* Action buttons: two per row, full width */
  .mt-result-actions { gap: 0.6rem; padding: 1rem; }
  .mt-result-actions .mt-btn { flex: 1 1 45%; }

  /* Analysis tables */
  .mt-analysis-section h2 { font-size: 1.1rem; }
  .mt-section-table th,
  .mt-section-table td { padding: 0.5rem 0.65rem; font-size: 0.82rem; }
}
