/* ==========================================================================
   Mocks Page + Exam Overlay Styles
   ========================================================================== */

/* ---- Page Layout ---- */
.mocks-page .dash-top-nav {
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}
.mocks-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 40px 48px;
  position: relative;
  z-index: 1;
}
.mocks-container::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(212, 163, 115, 0.03) 0%, transparent 70%),
              radial-gradient(ellipse 60% 50% at 80% 100%, rgba(212, 163, 115, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.mocks-view {
  position: relative;
  z-index: 1;
  animation: dashFadeIn 0.6s var(--easing) forwards;
}

/* ---- Section Selector ---- */
.section-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
}
.section-btn {
  padding: 12px 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--duration) var(--easing);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-btn:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
  background: var(--bg-elevated);
}
.section-btn.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #090807;
}
.section-btn .section-icon-sm {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.7rem;
  font-family: var(--font-body);
}
.section-btn.active .section-icon-sm {
  background: rgba(0,0,0,0.1);
}
.section-icon-sm.qa { background: rgba(212,163,115,0.15); color: var(--accent-gold); }
.section-icon-sm.dilr { background: rgba(90,143,168,0.15); color: var(--accent-sky); }
.section-icon-sm.varc { background: rgba(196,84,90,0.15); color: var(--accent-coral); }

/* ---- Config Card ---- */
.mock-config-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
}
.mock-config-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* ---- Filter Bar ---- */
.mock-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.mock-filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 12px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.mock-filter-option {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--easing);
  font-family: var(--font-body);
}
.mock-filter-option:hover:not(.disabled) {
  border-color: var(--border-light);
  color: var(--text-primary);
  background: var(--bg-elevated-hover);
}
.mock-filter-option.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #090807;
}
.mock-filter-option.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.mock-filter-login-note {
  font-size: 0.7rem;
  color: var(--accent-gold);
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 4px 14px;
  background: var(--accent-gold-glow);
  border: 1px solid rgba(212,163,115,0.2);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-body);
}

/* ---- Topic Grid ---- */
.mock-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.topic-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration) var(--easing);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-body);
}
.topic-checkbox-item:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--border-light);
}
.topic-checkbox-item.checked {
  border-color: var(--accent-gold);
  background: var(--accent-gold-glow);
  color: var(--text-primary);
}
.checkbox-circle {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--easing);
}
.topic-checkbox-item.checked .checkbox-circle {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
}
.topic-checkbox-item.checked .checkbox-circle::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #090807;
  border-radius: 50%;
}

.mock-start-btn {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--accent-gold);
  color: #090807;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--duration) var(--easing);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.mock-start-btn:hover {
  background: var(--accent-gold-light);
  box-shadow: 0 0 30px rgba(212,163,115,0.2);
}
.mock-start-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- Mock Insights ---- */
.mock-insights-section {
  margin-top: 48px;
}
.mock-insights-section h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 20px;
}
.mock-insight-card h4 {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mock-insight-info-icon {
  cursor: help;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
  font-size: 14px;
  line-height: 1;
  color: var(--text-muted);
}
.mock-insight-info-icon:hover {
  opacity: 1;
}
.mock-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.mock-insight-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.mock-insight-card h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.mock-insight-topic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.mock-insight-topic-row:last-child {
  border-bottom: none;
}
.mock-insight-topic-name {
  font-weight: 500;
  color: var(--text-primary);
}
.mock-insight-topic-stat {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mock-insight-topic-stat .label {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.mock-insight-topic-stat .value {
  font-weight: 600;
}
.mock-insight-bar-wrap {
  margin-top: 4px;
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
}
.mock-insight-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.mock-insight-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
}
.mock-insight-badge.green {
  background: rgba(20, 184, 166, 0.15);
  color: #14b8a6;
}
.mock-insight-badge.amber {
  background: rgba(212, 163, 115, 0.15);
  color: var(--accent-gold);
}
.mock-insight-badge.red {
  background: rgba(196, 84, 90, 0.15);
  color: var(--accent-coral);
}
.mock-insight-focus-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.mock-insight-focus-item:last-child {
  border-bottom: none;
}
.mock-insight-focus-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.mock-insight-focus-icon.danger {
  background: rgba(196, 84, 90, 0.15);
  color: var(--accent-coral);
}
.mock-insight-focus-icon.warn {
  background: rgba(212, 163, 115, 0.15);
  color: var(--accent-gold);
}
.mock-insight-focus-text {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-primary);
}
.mock-insight-focus-text small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.mock-insights-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.mock-insights-empty p {
  margin-bottom: 6px;
}

/* ---- Past Mocks ---- */
.past-mocks-section {
  margin-top: 48px;
}
.past-mocks-section h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.past-mocks-section h2 .count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-gold-glow);
  color: var(--accent-gold);
  font-family: var(--font-body);
}
.past-mocks-table-wrap {
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
}
.past-mocks-table {
  width: 100%;
  border-collapse: collapse;
}
.past-mocks-table th {
  padding: 14px 18px;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
}
.past-mocks-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.past-mocks-table tbody tr:hover {
  background: var(--bg-elevated);
}
.past-mocks-table .score-val {
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-heading);
}
.past-mocks-table .stat-correct { color: var(--accent-emerald); font-weight: 600; }
.past-mocks-table .stat-incorrect { color: var(--accent-coral); font-weight: 600; }
.past-mocks-table .stat-unattempted { color: var(--text-muted); font-weight: 600; }
.past-mocks-table .section-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
}
.past-mocks-table .section-badge.qa { background: rgba(212,163,115,0.12); color: var(--accent-gold); }
.past-mocks-table .section-badge.dilr { background: rgba(90,143,168,0.12); color: var(--accent-sky); }
.past-mocks-table .section-badge.varc { background: rgba(196,84,90,0.12); color: var(--accent-coral); }
.past-mocks-table .mock-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.past-mocks-table .mock-empty p { margin-bottom: 8px; }

/* ==========================================================================
   Fullscreen Exam Overlay
   ========================================================================== */
.exam-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #1c1b1f;
  color: #e6e1e5;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  display: none;
  overflow: hidden;
}
.exam-overlay.open {
  display: block;
}

.exam-shell {
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-rows: 44px 56px minmax(0, 1fr) 60px;
  overflow: hidden;
}

/* Topbar */
.exam-topbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #2a292e;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  z-index: 10;
}
.exam-topbar .exam-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.exam-topbar .exam-close-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.exam-topbar .exam-close-btn:hover {
  background: rgba(255,255,255,0.15);
}
.exam-topbar .exam-title-text {
  color: #d0bcff;
  font-weight: 700;
  font-size: 15px;
}
.exam-topbar .exam-timer-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #8b7beb;
  min-width: 120px;
  text-align: right;
}
.exam-topbar .exam-timer-display.warning {
  color: #ef4444;
  animation: timerPulse 1s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Header Strip */
.exam-header-strip {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: #242328;
  border-bottom: 1px solid #3b3a3f;
}
.exam-header-strip .exam-section-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: #e6e1e5;
}
.exam-header-strip .exam-section-name .section-tag {
  padding: 4px 12px;
  border-radius: 4px;
  background: #6a5acd;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.exam-header-strip .exam-marks-info {
  color: #cac4d0;
  font-size: 13px;
}
.exam-header-strip .exam-marks-info .positive { color: #10b981; }
.exam-header-strip .exam-marks-info .negative { color: #ef4444; }

/* Main Area */
.exam-main-area {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  overflow: hidden;
}

.exam-question-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  border-right: 1px solid #3b3a3f;
  overflow: hidden;
}

.exam-question-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 55% 45%;
  overflow: hidden;
}
.exam-question-layout.no-passage {
  grid-template-columns: 1fr;
}

.exam-instructions-pane {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  font-size: 14px;
  line-height: 1.7;
  color: #cac4d0;
  border-right: 1px solid #3b3a3f;
  overscroll-behavior: contain;
}
.exam-instructions-pane img { max-width: 100%; }
.exam-instructions-pane p { margin-bottom: 14px; }
.exam-instructions-pane::-webkit-scrollbar { width: 6px; }
.exam-instructions-pane::-webkit-scrollbar-thumb { background: #3b3a3f; border-radius: 3px; }

.exam-question-pane {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.exam-question-head {
  padding: 10px 20px;
  border-bottom: 1px solid #3b3a3f;
  font-size: 14px;
  font-weight: 700;
  color: #e6e1e5;
  background: #1e1d24;
  position: sticky;
  top: 0;
  z-index: 2;
}

.exam-question-body {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 32px;
  font-size: 14px;
  line-height: 1.6;
}
.exam-question-body::-webkit-scrollbar { width: 6px; }
.exam-question-body::-webkit-scrollbar-thumb { background: #3b3a3f; border-radius: 3px; }

.exam-question-text {
  margin-bottom: 24px;
  color: #e6e1e5;
}
.exam-question-text p { margin-bottom: 14px; }
.exam-question-text img { max-width: 100%; }

.exam-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: #1e1d24;
  border: 1px solid #3b3a3f;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.exam-option:hover {
  border-color: #6a5acd;
  background: rgba(106,90,205,0.08);
}
.exam-option.selected {
  border-color: #6a5acd;
  background: rgba(106,90,205,0.12);
}
.exam-option .option-marker {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: #2a292e;
  border: 1px solid #3b3a3f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #cac4d0;
  transition: all 0.15s ease;
}
.exam-option.selected .option-marker {
  background: #6a5acd;
  border-color: #6a5acd;
  color: #fff;
}
.exam-option .option-text {
  flex: 1;
  min-width: 0;
  color: #e6e1e5;
  font-size: 14px;
  line-height: 1.5;
}
.exam-option .option-text p { margin-bottom: 8px; }
.exam-option .option-text img { max-width: 100%; }

/* TITA */
.exam-tita-area {
  margin-top: 16px;
}
.exam-tita-input {
  width: min(300px, 100%);
  height: 44px;
  padding: 8px 14px;
  border: 2px solid #3b3a3f;
  background: #1e1d24;
  color: #e6e1e5;
  font-size: 18px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
}
.exam-tita-input:focus {
  border-color: #6a5acd;
}
.exam-tita-keypad {
  display: grid;
  grid-template-columns: repeat(4, 56px);
  gap: 6px;
  margin-top: 10px;
}
.exam-tita-keypad button {
  height: 36px;
  border: 1px solid #3b3a3f;
  background: #2a292e;
  color: #e6e1e5;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.exam-tita-keypad button:hover {
  background: #3b3a3f;
}
.exam-tita-keypad button.clear-key {
  color: #ef4444;
}
.exam-tita-keypad button.enter-key {
  background: #6a5acd;
  color: #fff;
  border-color: #6a5acd;
}

/* Side Panel */
.exam-side-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 36px minmax(0, 1fr);
  background: #1e1d24;
  overflow: hidden;
}

.exam-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  padding: 8px 12px;
  background: #242328;
  border-bottom: 1px solid #3b3a3f;
  font-size: 11px;
}
.exam-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cac4d0;
}
.exam-legend-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 20px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.exam-legend-badge.answered {
  background: linear-gradient(#a5e900, #49ad00);
  border-radius: 4px 4px 6px 6px;
}
.exam-legend-badge.not-answered {
  background: linear-gradient(#ff8a00, #e03909);
  clip-path: polygon(0 0, 100% 0, 100% 66%, 50% 100%, 0 66%);
}
.exam-legend-badge.not-visited {
  color: #111;
  background: linear-gradient(#fff, #d4d4d4);
  border-radius: 2px;
}
.exam-legend-badge.review {
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 35% 25%, #a77bc5, #693489 62%);
  border-radius: 50%;
}

.exam-palette-title {
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  color: #cac4d0;
  background: #1e1d24;
  border-bottom: 1px solid #3b3a3f;
}

.exam-palette-grid {
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: repeat(5, 44px);
  gap: 8px;
  justify-content: center;
  align-content: start;
}
.exam-palette-grid::-webkit-scrollbar { width: 4px; }
.exam-palette-grid::-webkit-scrollbar-thumb { background: #3b3a3f; border-radius: 2px; }

.palette-btn {
  width: 44px;
  height: 40px;
  border: 1px solid #3b3a3f;
  border-radius: 4px;
  background: linear-gradient(#2a292e, #1e1d24);
  color: #cac4d0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}
.palette-btn.current {
  outline: 2px solid #8b7beb;
  outline-offset: 1px;
}
.palette-btn.answered {
  color: #fff;
  background: linear-gradient(#a5e900, #49ad00);
  border-color: #5aa800;
  border-radius: 4px 4px 8px 8px;
}
.palette-btn.not-answered {
  color: #fff;
  background: linear-gradient(#ff8a00, #e03909);
  border-color: #bd3700;
  clip-path: polygon(0 0, 100% 0, 100% 66%, 50% 100%, 0 66%);
}
.palette-btn.review,
.palette-btn.review-answered {
  width: 40px;
  height: 40px;
  justify-self: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #a77bc5, #693489 62%);
  border-color: #693489;
  color: #fff;
}
.palette-btn.review-answered::after {
  content: '';
  position: absolute;
  right: 1px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  background: #8bd832;
  border-radius: 2px;
  border: 1px solid #62a800;
}

/* Footer */
.exam-footer-bar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: #242328;
  border-top: 1px solid #3b3a3f;
  gap: 12px;
}
.exam-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.exam-footer-left button {
  min-width: 130px;
  height: 36px;
  border-radius: 4px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.exam-mark-review-btn {
  background: #2a292e;
  border: 1px solid #3b3a3f;
  color: #cac4d0;
}
.exam-mark-review-btn:hover {
  background: #3b3a3f;
  color: #e6e1e5;
}
.exam-clear-btn {
  background: transparent;
  border: 1px solid #3b3a3f;
  color: #cac4d0;
}
.exam-clear-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.exam-footer-center {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cac4d0;
  font-size: 12px;
}
.exam-footer-center .q-status-badge {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.exam-footer-center .q-status-badge.not-answered {
  background: rgba(255,138,0,0.15);
  color: #ff8a00;
}
.exam-footer-center .q-status-badge.answered {
  background: rgba(165,233,0,0.15);
  color: #a5e900;
}
.exam-footer-center .q-status-badge.review {
  background: rgba(167,123,197,0.15);
  color: #a77bc5;
}

.exam-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.exam-footer-right button {
  min-width: 120px;
  height: 36px;
  border-radius: 4px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.exam-save-next-btn {
  background: #6a5acd;
  border: 1px solid #6a5acd;
  color: #fff;
}
.exam-save-next-btn:hover {
  background: #8b7beb;
}
.exam-submit-btn {
  background: #ef4444;
  border: 1px solid #ef4444;
  color: #fff;
}
.exam-submit-btn:hover {
  background: #dc2626;
}

/* Scrollbar for exam */
.exam-overlay ::-webkit-scrollbar { width: 6px; }
.exam-overlay ::-webkit-scrollbar-track { background: transparent; }
.exam-overlay ::-webkit-scrollbar-thumb { background: #3b3a3f; border-radius: 3px; }

/* KaTeX overrides for dark exam overlay */
.exam-overlay .katex { color: #e6e1e5; }
.exam-overlay .katex .mathnormal { color: #e6e1e5; }
.exam-overlay .katex .mord { color: #e6e1e5; }
.exam-overlay .katex .mbin { color: #8b7beb; }
.exam-overlay .katex .mrel { color: #8b7beb; }
.exam-overlay .katex .mspace { color: #e6e1e5; }
.exam-overlay .katex .mtext { color: #cac4d0; }
.exam-overlay .katex .mop { color: #d0bcff; }
.exam-overlay .katex .vlist-t { color: #e6e1e5; }
.exam-overlay .katex .rule { color: #e6e1e5; }
.exam-overlay .katex .sqrt .root { color: #d0bcff; }
.exam-overlay .katex .mfrac { color: #e6e1e5; }
.exam-overlay .katex .msup { color: #e6e1e5; }
.exam-overlay .katex .msub { color: #e6e1e5; }
.exam-overlay .exam-instructions-pane .katex { color: #cac4d0; }
.exam-overlay .option-text .katex { color: #e6e1e5; }

/* ==========================================================================
   Exam Results (shown inside overlay)
   ========================================================================== */
.exam-results-view {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.exam-results-header {
  padding: 16px 24px;
  background: #2a292e;
  border-bottom: 1px solid #3b3a3f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.exam-results-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #d0bcff;
}
.exam-results-header .close-results-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  transition: background 0.2s;
}
.exam-results-header .close-results-btn:hover {
  background: rgba(255,255,255,0.15);
}

.exam-results-body {
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
}

.exam-results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.exam-result-stat {
  background: linear-gradient(135deg, #242328 0%, #222128 100%);
  border: 1px solid #3b3a3f;
  border-radius: 10px;
  padding: 18px 20px 16px;
  text-align: center;
}
.exam-result-stat .stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 4px;
}
.exam-result-stat .stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a09ba8;
}
.exam-result-stat.total .stat-value { color: #8b7beb; }
.exam-result-stat.correct .stat-value { color: #2dd4a0; }
.exam-result-stat.incorrect .stat-value { color: #fb6f7a; }
.exam-result-stat.unattempted .stat-value { color: #a09ba8; }
.exam-result-stat.accuracy .stat-value { color: #d0bcff; }

.exam-results-questions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.exam-result-qwrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.exam-result-qwrap::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.exam-result-qwrap:hover::before,
.exam-result-qwrap.expanded::before {
  opacity: 1;
}
.exam-result-qwrap::before {
  background: linear-gradient(180deg, #6a5acd 0%, #8b7beb 100%);
}

.exam-result-qitem {
  display: grid;
  grid-template-columns: 60px 80px 1fr 80px 80px;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  background: #242328;
  border: 1px solid #3b3a3f;
  border-radius: 8px;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.exam-result-qitem.has-detail {
  grid-template-columns: 50px 70px 45px 65px 60px 28px;
  gap: 8px;
  padding: 11px 14px 11px 16px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, background 0.2s ease, border-radius 0.2s ease, box-shadow 0.2s ease;
}
.exam-result-qitem.has-detail:hover {
  border-color: #7c6ad9;
  background: linear-gradient(135deg, #25242a 0%, #2a292e 100%);
  box-shadow: 0 1px 8px rgba(106,90,205,0.08);
}
.exam-result-qwrap.expanded .exam-result-qitem.has-detail {
  border-radius: 8px 8px 0 0;
  border-bottom-color: transparent;
  background: linear-gradient(180deg, #25242a 0%, #222128 100%);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}
.exam-result-qitem .qnum {
  font-weight: 700;
  color: #e6e1e5;
  transition: color 0.2s;
}
.exam-result-qwrap.expanded .qnum {
  color: #d0bcff;
}
.exam-result-qitem .qstatus {
  font-weight: 600;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.exam-result-qitem .qstatus.correct {
  color: #2dd4a0;
  background: rgba(45,212,160,0.1);
  border: 1px solid rgba(45,212,160,0.15);
}
.exam-result-qitem .qstatus.wrong {
  color: #fb6f7a;
  background: rgba(251,111,122,0.1);
  border: 1px solid rgba(251,111,122,0.15);
}
.exam-result-qitem .qstatus.skipped {
  color: #a09ba8;
  background: rgba(160,155,168,0.08);
  border: 1px solid rgba(160,155,168,0.1);
}
.exam-result-qitem .qtype {
  font-size: 10px;
  font-weight: 700;
  color: #8b7beb;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: 'JetBrains Mono', monospace;
}
.exam-result-qitem .qtime {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #a09ba8;
  text-align: right;
}
.exam-result-qitem .qanswer-preview {
  font-size: 12px;
  font-weight: 600;
  color: #cac4d0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  padding: 2px 6px;
}
.exam-result-qitem .expand-icon {
  font-size: 8px;
  color: #8b7beb;
  text-align: center;
  transition: transform 0.25s ease, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exam-result-qwrap.expanded .expand-icon {
  color: #d0bcff;
}
.exam-result-qitem .qsection {
  font-size: 11px;
  color: #cac4d0;
}

/* Expanded question detail panel */
.exam-result-qitem-expanded {
  display: none;
  padding: 18px 20px 22px;
  margin-top: -1px;
  background: linear-gradient(180deg, #222128 0%, #1e1d24 100%);
  border: 1px solid #3b3a3f;
  border-top: none;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  line-height: 1.7;
  color: #e6e1e5;
  position: relative;
}
.exam-result-qitem-expanded::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #6a5acd 0%, #8b7beb 100%);
  border-radius: 0 0 0 3px;
}
.exam-result-qitem-expanded.open {
  display: block;
  animation: expandSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes expandSlideIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Expanded content elements */
.exam-exp-error {
  color: #fb6f7a;
  font-size: 13px;
}
.exam-exp-error .exam-exp-qid {
  color: #cac4d0;
  font-family: 'JetBrains Mono', monospace;
}
.exam-exp-section {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(106,90,205,0.04);
  border: 1px solid rgba(106,90,205,0.12);
  border-radius: 6px;
  border-left: 3px solid #6a5acd;
}
.exam-exp-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #8b7beb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.exam-exp-passage {
  font-size: 14px;
  line-height: 1.7;
  color: #cac4d0;
}
.exam-exp-passage p { margin-bottom: 10px; }
.exam-exp-stem {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #f0edf2;
  padding: 0 2px;
}
.exam-exp-stem p { margin-bottom: 10px; }
.exam-exp-instr {
  margin-bottom: 14px;
  font-size: 13px;
  color: #a09ba8;
  font-style: italic;
  padding-left: 12px;
  border-left: 2px solid #3b3a3f;
}
.exam-exp-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 12px;
}
.exam-exp-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  background: #242328;
  border: 1px solid #3b3a3f;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}
.exam-exp-option.selected {
  border-color: rgba(106,90,205,0.35);
  background: rgba(106,90,205,0.07);
  box-shadow: 0 0 0 1px rgba(106,90,205,0.1);
}
.exam-exp-option.correct {
  border-color: rgba(45,212,160,0.3);
  background: rgba(45,212,160,0.04);
}
.exam-exp-option.selected.correct {
  border-color: rgba(45,212,160,0.4);
  background: rgba(45,212,160,0.08);
}
.exam-exp-option .exp-opt-letter {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: #2a292e;
  border: 1.5px solid #3b3a3f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #a09ba8;
  transition: all 0.2s ease;
}
.exam-exp-option.selected .exp-opt-letter {
  background: linear-gradient(135deg, #6a5acd, #8b7beb);
  border-color: #6a5acd;
  color: #fff;
  box-shadow: 0 2px 8px rgba(106,90,205,0.3);
}
.exam-exp-option.correct .exp-opt-letter {
  background: linear-gradient(135deg, #0ea571, #2dd4a0);
  border-color: #0ea571;
  color: #fff;
  box-shadow: 0 2px 8px rgba(45,212,160,0.25);
}
.exam-exp-option.selected.correct .exp-opt-letter {
  box-shadow: 0 2px 12px rgba(45,212,160,0.35);
}
.exam-exp-option .exp-opt-text {
  flex: 1;
  min-width: 0;
  padding-top: 3px;
}
.exam-exp-option .exp-opt-text p { margin-bottom: 8px; }
.exam-exp-option .exp-opt-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  margin-left: auto;
  margin-top: 2px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.exam-exp-option .exp-opt-badge.correct-badge {
  background: rgba(45,212,160,0.1);
  color: #2dd4a0;
  border: 1px solid rgba(45,212,160,0.15);
}
.exam-exp-option .exp-opt-badge.wrong-badge {
  background: rgba(251,111,122,0.1);
  color: #fb6f7a;
  border: 1px solid rgba(251,111,122,0.15);
}
.exam-exp-tita {
  margin-bottom: 12px;
  padding: 14px 16px;
  background: rgba(106,90,205,0.03);
  border: 1px solid rgba(106,90,205,0.08);
  border-radius: 8px;
}
.exam-exp-answer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 14px;
}
.exp-answer-label {
  color: #a09ba8;
  font-weight: 600;
  min-width: 120px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.exp-answer-value {
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  padding: 4px 14px;
  border-radius: 6px;
}
.exp-answer-value.correct {
  color: #2dd4a0;
  background: rgba(45,212,160,0.08);
  border: 1px solid rgba(45,212,160,0.15);
}
.exp-answer-value.wrong {
  color: #fb6f7a;
  background: rgba(251,111,122,0.08);
  border: 1px solid rgba(251,111,122,0.15);
}
.exp-answer-value.skipped {
  color: #a09ba8;
  background: rgba(160,155,168,0.06);
  border: 1px solid rgba(160,155,168,0.1);
}
.exam-exp-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.exam-exp-status.correct {
  color: #2dd4a0;
  background: rgba(45,212,160,0.08);
  border: 1px solid rgba(45,212,160,0.12);
}
.exam-exp-status.wrong {
  color: #fb6f7a;
  background: rgba(251,111,122,0.08);
  border: 1px solid rgba(251,111,122,0.12);
}
.exam-exp-status.skipped {
  color: #a09ba8;
  background: rgba(160,155,168,0.06);
  border: 1px solid rgba(160,155,168,0.1);
}
.exam-exp-time {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #3b3a3f;
  font-size: 12px;
  color: #a09ba8;
  font-family: 'JetBrains Mono', monospace;
}

.exam-exp-sol-btn {
  margin-top: 14px;
  padding: 8px 16px;
  background: #4a4458;
  color: #e0b0ff;
  border: 1px solid #635e70;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: background .2s, border-color .2s;
}
.exam-exp-sol-btn:hover {
  background: #5d576b;
  border-color: #e0b0ff;
}
.exam-exp-sol {
  margin-top: 12px;
  padding: 16px;
  background: #1c1b1f;
  border: 1px solid #3b3a3f;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #e6e1e5;
}
.exam-exp-sol-text p {
  margin-bottom: 10px;
}
.exam-exp-sol-text .katex-display {
  margin: 10px 0;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Responsive override for expanded items */
@media (max-width: 768px) {
  .exam-result-qitem { grid-template-columns: 40px 60px 1fr 60px; font-size: 12px; }
  .exam-result-qitem.has-detail { grid-template-columns: 36px 55px 38px 50px 40px 24px; gap: 4px; padding: 8px 10px; font-size: 12px; }
  .exam-result-qitem .qtime { font-size: 10px; }
  .exam-result-qitem .qtype { font-size: 9px; }
  .exam-result-qitem .qanswer-preview { font-size: 11px; }
  .exam-result-qitem-expanded { padding: 14px 14px 18px; font-size: 13px; }
}

/* ==========================================================================
   Confirm Modal
   ========================================================================== */
.exam-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}
.exam-modal {
  background: #242328;
  border: 1px solid #3b3a3f;
  border-radius: 12px;
  padding: 28px 32px;
  width: min(420px, 90%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.exam-modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #e6e1e5;
}
.exam-modal p {
  color: #cac4d0;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.exam-modal .exam-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.exam-modal .exam-modal-actions button {
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  border: none;
}
.exam-modal .exam-modal-actions .btn-cancel {
  background: #2a292e;
  border: 1px solid #3b3a3f;
  color: #cac4d0;
}
.exam-modal .exam-modal-actions .btn-confirm {
  background: #ef4444;
  color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .mocks-container { padding: 24px 24px 40px; }
  .exam-main-area { grid-template-columns: minmax(0, 1fr) 220px; }
  .exam-palette-grid { grid-template-columns: repeat(4, 40px); }
  .exam-question-layout { grid-template-columns: 1fr; }
  .exam-question-layout.no-passage { grid-template-columns: 1fr; }
  .exam-instructions-pane { max-height: 35vh; border-right: none; border-bottom: 1px solid #3b3a3f; }
}
@media (max-width: 768px) {
  .mocks-container { padding: 16px; }
  .section-btn { padding: 10px 20px; font-size: 0.9rem; }
  .mock-topic-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .exam-main-area { grid-template-columns: 1fr; }
  .exam-side-panel { display: none; }
  .exam-shell { grid-template-rows: 44px 56px minmax(0, 1fr) 60px; }
  .exam-footer-bar { padding: 0 10px; gap: 6px; }
  .exam-footer-left button { min-width: 90px; font-size: 11px; padding: 0 8px; }
  .exam-footer-right button { min-width: 80px; font-size: 11px; padding: 0 10px; }
  .exam-result-qitem { grid-template-columns: 40px 60px 1fr 60px; }
}

/* ==========================================================================
   External Mock Analysis (Chrome Extension integration)
   ========================================================================== */
.external-mocks-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.external-mocks-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 4px;
}
.external-mocks-header h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-gold);
}
.external-mocks-header h2 svg { color: var(--accent-gold); }
.external-mocks-header h2 .count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-gold-glow);
  color: var(--accent-gold);
  font-family: var(--font-body);
}
.external-mocks-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.ext-mock-info-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.ext-mock-info-link:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  text-decoration: none;
}
.external-mocks-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.platform-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(106,90,205,0.1);
  color: var(--primary-light);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── External Mock Detail Overlay ─────────────────────────────────── */
.ext-analysis-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 20px;
}
.ext-analysis-overlay.open { opacity: 1; }
.ext-analysis-modal {
  width: min(900px, 100%);
  max-height: 85vh;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: extSlideUp 0.3s ease;
}
@keyframes extSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.ext-analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.ext-analysis-header h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.ext-analysis-header .ext-analysis-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ext-analysis-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  flex-shrink: 0;
}
.ext-analysis-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.ext-analysis-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
  min-height: 0;
}

/* Summary Cards */
.ext-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.ext-summary-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-align: center;
}
.ext-summary-card .ext-summary-val {
  display: block;
  font-size: 24px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 2px;
}
.ext-summary-card .ext-summary-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.ext-summary-card.total .ext-summary-val { color: var(--primary-light); }
.ext-summary-card.correct .ext-summary-val { color: var(--accent-emerald); }
.ext-summary-card.incorrect .ext-summary-val { color: var(--accent-coral); }
.ext-summary-card.skipped .ext-summary-val { color: var(--text-muted); }
.ext-summary-card.accuracy .ext-summary-val { color: var(--accent-gold); }
.ext-summary-card .ext-summary-lbl { color: var(--text-muted); }

/* Sections */
.ext-sections-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ext-section-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 3px solid var(--accent-gold);
  background: var(--bg-elevated);
}
.ext-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.ext-section-name {
  font-weight: 700;
  font-size: 0.85rem;
}
.ext-section-stats {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.ext-section-stats .stat-na { color: var(--text-muted); }

/* Question rows */
.ext-section-questions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ext-q-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  transition: background 0.15s;
  flex-wrap: wrap;
}
.ext-q-row:hover { background: var(--bg-hover); }
.ext-q-num {
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}
.ext-q-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 20px;
  min-width: 60px;
  text-align: center;
}
.ext-q-status.correct {
  color: var(--accent-emerald);
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.15);
}
.ext-q-status.wrong {
  color: var(--accent-coral);
  background: rgba(196,84,90,0.1);
  border: 1px solid rgba(196,84,90,0.15);
}
.ext-q-status.skipped {
  color: var(--text-muted);
  background: rgba(160,155,168,0.08);
  border: 1px solid rgba(160,155,168,0.1);
}
.ext-q-status.na {
  color: var(--text-muted);
  background: rgba(160,155,168,0.05);
  border: 1px dashed rgba(160,155,168,0.15);
}
.ext-q-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 45px;
}
.ext-q-details {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}
.ext-q-detail-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 20px;
  background: rgba(106,90,205,0.08);
  color: var(--primary-light);
  border: 1px solid rgba(106,90,205,0.12);
}
.ext-q-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 8px;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .ext-analysis-modal { max-height: 90vh; }
  .ext-analysis-header { padding: 14px 16px; flex-direction: column; gap: 8px; }
  .ext-analysis-body { padding: 14px 16px; }
  .ext-summary-cards { grid-template-columns: repeat(3, 1fr); }
  .ext-q-row { font-size: 0.75rem; }
  .ext-q-details { width: 100%; margin-top: 2px; }
}
