/* ── DESIGN TOKENS ── */
:root {
  --red: #C8102E;
  --red-light: #e8192f;
  --red-bg: #fdf0f2;
  --red-mid: #f5c0c8;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9f7f4;
  --card: #ffffff;
  --good: #166534;
  --good-bg: #dcfce7;
  --bad: #991b1b;
  --bad-bg: #fee2e2;
  --warn: #854d0e;
  --warn-bg: #fefce8;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
  --tab-h: 52px;
  --ch-nav-h: 44px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
}

/* ════════════════════════════════════════════
   PIN LOCK OVERLAY
════════════════════════════════════════════ */
#pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
}

.pin-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px 28px;
  width: min(320px, calc(100vw - 32px));
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  text-align: center;
}
.pin-card.shake {
  animation: pin-shake 0.4s ease;
}
@keyframes pin-shake {
  0%,100% { transform: translateX(0); }
  15%      { transform: translateX(-10px); }
  30%      { transform: translateX(10px); }
  45%      { transform: translateX(-8px); }
  60%      { transform: translateX(8px); }
  75%      { transform: translateX(-4px); }
  90%      { transform: translateX(4px); }
}
.pin-hp-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.pin-hp-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 24px;
}
.pin-dots {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 24px;
}
.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.pin-dot.filled {
  background: var(--red-light);
  border-color: var(--red-light);
  transform: scale(1.15);
}
.pin-dot.error {
  background: #ef4444;
  border-color: #ef4444;
  animation: dot-flash 0.4s ease;
}
@keyframes dot-flash {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.pin-btn:active {
  background: var(--red-bg);
  border-color: var(--red);
  transform: scale(0.94);
}
.pin-btn.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}
.pin-btn.back {
  font-size: 18px;
}
.pin-error-msg {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--bad);
  min-height: 18px;
}

/* ════════════════════════════════════════════
   DISCLAIMER OVERLAY
════════════════════════════════════════════ */
#disclaimer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.disclaimer-card {
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px 24px;
  width: min(480px, 100%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.disclaimer-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--ink);
}
.disclaimer-body p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 12px;
}
.disclaimer-body p:last-child { margin-bottom: 0; }
.disclaimer-body em {
  font-style: italic;
  color: var(--ink);
}
.disclaimer-body a {
  color: var(--red);
  text-decoration: none;
}
.disclaimer-body a:hover { text-decoration: underline; }
.disclaimer-btn {
  margin-top: 20px;
  display: block;
  width: 100%;
  padding: 11px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.disclaimer-btn:hover { background: #333; }

/* ════════════════════════════════════════════
   APP SHELL
════════════════════════════════════════════ */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── TAB BAR ── */
.tab-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  height: var(--tab-h);
  display: flex;
  align-items: stretch;
}
.tab-bar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: 4px;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  color: var(--red);
  border-bottom-color: var(--red);
}
.tab-btn .tab-icon { font-size: 16px; }

/* ── TAB PANELS ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ════════════════════════════════════════════
   STUDY GUIDE — CHAPTER NAV
════════════════════════════════════════════ */
.chapter-nav {
  position: sticky;
  top: var(--tab-h);
  z-index: 90;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  height: var(--ch-nav-h);
}
.chapter-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.chapter-nav-inner::-webkit-scrollbar { display: none; }
.ch-nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  border-radius: 4px 4px 0 0;
  -webkit-tap-highlight-color: transparent;
}
.ch-nav-btn:hover { color: var(--red); }
.ch-nav-btn.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ── STUDY MAIN ── */
.study-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

/* ── CHAPTER SECTION ── */
.chapter {
  margin-bottom: 56px;
  scroll-margin-top: calc(var(--tab-h) + var(--ch-nav-h) + 12px);
}
.ch-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.ch-num {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 900;
  flex-shrink: 0;
}
.ch-num.solid { background: #166534; }
.ch-title-group h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 4px;
}
.ch-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 6px;
}
.priority {
  padding: 2px 9px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
}
.p-focus { background: var(--bad-bg); color: var(--bad); }
.p-review { background: var(--warn-bg); color: var(--warn); }
.p-solid { background: var(--good-bg); color: var(--good); }
.official-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  background: var(--red-bg);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--red-mid);
  transition: background 0.15s, color 0.15s;
}
.official-link:hover { background: var(--red); color: #fff; }

/* ── STUDY NOTES ── */
.notes {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.notes h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 14px;
}
.notes h3 + * { }
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.fact {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px 14px;
  border-left: 3px solid var(--red);
}
.fact.green { border-left-color: #22c55e; }
.fact strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 3px;
}
.fact.green strong { color: #166534; }
.fact span, .fact p { font-size: 13.5px; line-height: 1.45; }
.watchout {
  background: var(--warn-bg);
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--warn);
  line-height: 1.5;
}
.watchout::before { content: '⚠️  '; }
.timeline {
  list-style: none;
  position: relative;
  padding-left: 24px;
  margin-top: 8px;
  margin-bottom: 16px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--red-mid);
}
.timeline li {
  position: relative;
  padding: 4px 0 4px 16px;
  font-size: 13.5px;
  line-height: 1.4;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--red);
}
.timeline li strong { color: var(--red); }
table.facts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 10px;
  margin-bottom: 16px;
}
table.facts-table th {
  background: var(--red);
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.facts-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.facts-table tr:nth-child(even) td { background: var(--bg); }

/* ── CHAPTER QUIZ ── */
.ch-quiz {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  box-shadow: var(--shadow);
}
.ch-quiz h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.quiz-answered-count {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.quiz-q {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.quiz-q:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.qtext {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}
.opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  font-size: 14px;
  text-align: left;
  width: 100%;
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1.35;
}
.opt:hover:not(:disabled) {
  border-color: var(--red);
  background: var(--red-bg);
}
.opt:disabled { cursor: default; }
.opt.sel {
  border-color: var(--red);
  background: var(--red-bg);
}
.opt.correct-ans {
  border-color: #22c55e;
  background: var(--good-bg);
  color: var(--good);
  font-weight: 600;
}
.opt.wrong-ans {
  border-color: #ef4444;
  background: var(--bad-bg);
  color: var(--bad);
}
.ol {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.15s;
}
.opt.sel .ol { background: var(--red); color: #fff; }
.opt.correct-ans .ol { background: #22c55e; color: #fff; }
.opt.wrong-ans .ol { background: #ef4444; color: #fff; }
.qexp {
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 7px;
  font-size: 13.5px;
  line-height: 1.5;
  display: none;
}
.qexp.show { display: block; }
.qexp.c {
  background: var(--good-bg);
  color: var(--good);
  border-left: 3px solid #22c55e;
}
.qexp.w {
  background: var(--bad-bg);
  color: var(--bad);
  border-left: 3px solid #ef4444;
}
.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover:not(:disabled) { background: var(--red-light); }
.btn-primary:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}
.btn-secondary {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.quiz-score-display {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

/* ════════════════════════════════════════════
   MOCK TESTS
════════════════════════════════════════════ */
.mock-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}
.mock-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 8px;
}
.mock-section-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 16px;
}
.mock-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f8f8f8;
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.mock-notice-icon {
  flex-shrink: 0;
  font-style: normal;
  margin-top: 1px;
}

/* ── Set Selection Cards ── */
.mock-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.mock-set-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mock-set-card:hover {
  border-color: var(--red-mid);
  box-shadow: 0 4px 20px rgba(200,16,46,0.12);
}
.mock-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.mock-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
}
.mock-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-not-started { background: #f3f4f6; color: var(--muted); }
.badge-in-progress { background: var(--warn-bg); color: var(--warn); }
.badge-passed { background: var(--good-bg); color: var(--good); }
.badge-failed { background: var(--bad-bg); color: var(--bad); }
.mock-card-dist {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.mock-card-actions {
  display: flex;
  gap: 8px;
}
.mock-card-score {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Pre-test Confirmation ── */
.mock-confirm {
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.mock-confirm h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 20px;
}
.mock-rules {
  list-style: none;
  margin-bottom: 24px;
}
.mock-rules li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
  display: flex;
  gap: 10px;
}
.mock-rules li:last-child { border-bottom: none; }
.mock-rules li::before {
  content: '→';
  color: var(--red);
  font-weight: 700;
  flex-shrink: 0;
}
.confirm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Active Test ── */
.test-sticky-header {
  position: sticky;
  top: var(--tab-h);
  z-index: 80;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.test-header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.test-name {
  font-weight: 700;
  font-size: 15px;
}
.test-timer {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: color 0.3s;
}
.test-timer.urgent { color: var(--red); }
.test-progress {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.test-questions-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 24px 100px;
}
.mock-question {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.mock-q-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.mock-q-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--red-bg);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.mock-topic-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 6px;
}
.mock-qtext {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  flex: 1;
}
.test-submit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  z-index: 80;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.test-submit-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.test-submit-note {
  font-size: 13px;
  color: var(--muted);
}

/* ── Results Screen ── */
.results-wrap {
  max-width: 700px;
  margin: 0 auto;
}
.results-score-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.results-big-score {
  font-family: 'Playfair Display', serif;
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}
.results-verdict {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.results-verdict.passed { color: var(--good); }
.results-verdict.failed { color: var(--bad); }
.results-date { font-size: 13px; color: var(--muted); }
.results-breakdown {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.results-breakdown h3 {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}
.breakdown-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.breakdown-label {
  font-size: 13.5px;
  font-weight: 600;
  width: 140px;
  flex-shrink: 0;
}
.breakdown-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.breakdown-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--red);
  transition: width 0.5s ease;
}
.breakdown-bar.good { background: #22c55e; }
.breakdown-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}
.results-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Review Mode ── */
.review-question {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.review-q-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.review-status {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.review-status.correct { background: var(--good-bg); color: var(--good); }
.review-status.wrong { background: var(--bad-bg); color: var(--bad); }
.review-status.skipped { background: #f3f4f6; color: var(--muted); }

/* ════════════════════════════════════════════
   PROGRESS
════════════════════════════════════════════ */
.progress-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}
.progress-section {
  margin-bottom: 40px;
}
.progress-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.chapter-scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.chapter-score-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.csc-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}
.csc-score {
  font-size: 22px;
  font-weight: 900;
  font-family: 'Playfair Display', serif;
  color: var(--red);
  margin-bottom: 4px;
}
.csc-not-attempted {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 4px;
}
.score-bar-wrap {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0 4px;
}
.score-bar {
  height: 100%;
  border-radius: 3px;
  background: var(--red);
}
.score-bar.good { background: #22c55e; }
.csc-time {
  font-size: 11px;
  color: var(--muted);
}
.mock-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.mock-history-table th {
  background: var(--red);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mock-history-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.mock-history-table tr:last-child td { border-bottom: none; }
.mock-history-table tr:nth-child(even) td { background: var(--bg); }
.readiness-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.readiness-pct {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}
.readiness-pct.red { color: var(--red); }
.readiness-pct.amber { color: #d97706; }
.readiness-pct.green { color: var(--good); }
.readiness-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.readiness-summary {
  font-size: 15px;
  font-weight: 600;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 600px) {
  .study-main, .mock-main, .progress-main {
    padding: 16px 14px 80px;
  }
  .fact-grid {
    grid-template-columns: 1fr;
  }
  .notes { padding: 16px 14px; }
  .ch-quiz { padding: 16px 14px; }
  .tab-btn { padding: 0 10px; font-size: 13px; }
  .tab-btn .tab-icon { display: none; }
  .mock-confirm { padding: 20px 16px; }
  .test-sticky-header { padding: 10px 14px; }
  .test-questions-wrap { padding: 16px 14px 100px; }
  .results-big-score { font-size: 52px; }
  .breakdown-label { width: 100px; font-size: 12px; }
  .chapter-scores-grid { grid-template-columns: repeat(2, 1fr); }
  .mock-set-grid { grid-template-columns: 1fr; }
}
