/* JEE Notes — mock-test engine styles (uses v2.css tokens) */
.mock-test-page .topic-hero { margin-bottom: 22px; }
.mt-loading { color: var(--ink-3); padding: 40px 0; text-align: center; }

.mt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; border: none; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font: 600 15px var(--font-body);
  transition: filter .15s, transform .15s;
}
.mt-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.mt-btn.mt-ghost { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.mt-btn.mt-ghost:hover { color: var(--ink); border-color: var(--line-2); }

/* ---------- intro ---------- */
.mt-intro { max-width: 640px; margin: 0 auto; padding: 30px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.mt-intro-title { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin: 0 0 12px; }
.mt-intro-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.mt-intro-meta span { padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.mt-instructions { color: var(--ink-2); line-height: 1.7; margin: 0 0 22px; padding-left: 1.1em; }
.mt-instructions li { margin: .3em 0; }
.mt-start { margin-right: 10px; }

/* ---------- test shell ---------- */
.mt-shell { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.mt-topbar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.mt-subject-tabs { display: flex; gap: 6px; }
.mt-tab { padding: 7px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 600 13.5px var(--font-body); cursor: pointer; }
.mt-tab.is-active { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.mt-timer-wrap { margin-left: auto; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.mt-timer-wrap span { display: inline-block; margin-left: 6px; padding: 4px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-size: 15px; }
.mt-timer-wrap span.mt-danger { background: #ef4444; color: #fff; }
.mt-submit { padding: 8px 16px; }

.mt-body { display: grid; grid-template-columns: minmax(0,1fr) 240px; }
.mt-question { padding: 24px; min-width: 0; }
.mt-q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 13px; }
.mt-q-num { font-weight: 700; color: var(--ink); }
.mt-q-subject, .mt-q-type { padding: 3px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.mt-q-statement { font-size: 1.05rem; line-height: 1.7; margin-bottom: 18px; overflow-x: auto; }

.mt-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mt-option { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; transition: border-color .15s, background .15s; }
.mt-option:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.mt-option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.mt-opt-label { flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.mt-option.is-selected .mt-opt-label { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.mt-int { margin: 6px 0; }
.mt-int label { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.mt-int-input { width: 220px; max-width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 500 16px var(--font-mono); }
.mt-int-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.mt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.mt-actions .mt-save { margin-left: auto; }

/* ---------- palette ---------- */
.mt-palette { border-left: 1px solid var(--line); padding: 18px; background: var(--surface-2); }
.mt-palette-title { font-weight: 700; font-size: 13px; margin-bottom: 12px; color: var(--ink); }
.mt-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; font-size: 11px; color: var(--ink-2); }
.mt-lg { display: inline-flex; align-items: center; gap: 5px; }
.mt-lg::before { content: ""; width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.mt-lg.answered::before { background: #16a34a; }
.mt-lg.notAnswered::before { background: #ef4444; }
.mt-lg.marked::before { background: #8b5cf6; }
.mt-lg.notVisited::before { background: var(--line-2); }
.mt-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.mt-cell { aspect-ratio: 1; border: none; border-radius: 8px; cursor: pointer; font: 600 13px var(--font-body); color: #fff; }
.mt-cell.notVisited { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); }
.mt-cell.notAnswered { background: #ef4444; }
.mt-cell.answered { background: #16a34a; }
.mt-cell.marked { background: #8b5cf6; }
.mt-cell.answeredMarked { background: #8b5cf6; box-shadow: inset 0 -6px 0 -2px #16a34a; }
.mt-cell.is-current { outline: 3px solid var(--accent); outline-offset: 1px; }

/* ---------- result ---------- */
.mt-result { max-width: 820px; margin: 0 auto; }
.mt-scorecard { text-align: center; padding: 30px; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); margin-bottom: 22px; }
.mt-score-big { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }
.mt-score-num { font-size: 3.4rem; color: var(--accent); }
.mt-score-max { font-size: 1.4rem; color: var(--ink-3); margin-left: 6px; }
.mt-score-sub { color: var(--ink-2); margin-top: 8px; font-size: 14.5px; }
.mt-score-table { width: 100%; border-collapse: collapse; margin-bottom: 26px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 14.5px; }
.mt-score-table th { background: var(--surface-2); text-align: left; padding: 10px 14px; font-weight: 700; }
.mt-score-table td { padding: 10px 14px; border-top: 1px solid var(--line); }
.mt-strong { font-weight: 700; color: var(--accent); }

.mt-review-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.mt-review-head h3 { font-family: var(--font-display); margin: 0; }
.mt-review-item { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r); margin-bottom: 10px; background: var(--surface); overflow: hidden; }
.mt-review-item.correct { border-left-color: #16a34a; }
.mt-review-item.wrong { border-left-color: #ef4444; }
.mt-review-item.unattempted { border-left-color: var(--line-2); }
.mt-review-item.dropped { border-left-color: #3b82f6; }
.mt-review-item summary { display: flex; align-items: center; gap: 10px; padding: 12px 15px; cursor: pointer; font-size: 14px; }
.mt-rv-num { font-weight: 700; }
.mt-rv-tag { text-transform: capitalize; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.correct .mt-rv-tag { background: #dcfce7; color: #166534; }
.wrong .mt-rv-tag { background: #fee2e2; color: #991b1b; }
.unattempted .mt-rv-tag { background: var(--surface-2); color: var(--ink-3); }
.dropped .mt-rv-tag { background: #dbeafe; color: #1e40af; }
[data-theme="dark"] .dropped .mt-rv-tag { background: #172554; color: #93c5fd; }
.mt-rv-subj { margin-left: auto; color: var(--ink-3); font-size: 12.5px; }
.mt-rv-body { padding: 4px 16px 16px; }
.mt-rv-statement { line-height: 1.7; margin-bottom: 10px; overflow-x: auto; }
.mt-rv-options { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.mt-rv-options li { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); }
.mt-rv-options li.correct { border-color: #16a34a; background: #f0fdf4; }
.mt-rv-options li.wrong { border-color: #ef4444; background: #fef2f2; }
.mt-rv-ans { font-size: 14px; color: var(--ink-2); margin: 8px 0; }
.mt-rv-solution { margin-top: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); font-size: 14.5px; line-height: 1.7; }
.mt-rv-solution strong { display: block; margin-bottom: 6px; color: var(--accent); }
.mt-rv-nosol { color: var(--ink-3); font-size: 13.5px; }

[data-theme="dark"] .correct .mt-rv-tag { background: #0f2a1a; color: #4ade80; }
[data-theme="dark"] .wrong .mt-rv-tag { background: #2a0f0f; color: #f87171; }
[data-theme="dark"] .mt-rv-options li.correct { background: #0f2a1a; }
[data-theme="dark"] .mt-rv-options li.wrong { background: #2a0f0f; }

@media (max-width: 780px) {
  .mt-body { grid-template-columns: 1fr; }
  .mt-palette { border-left: none; border-top: 1px solid var(--line); }
  .mt-grid { grid-template-columns: repeat(8, 1fr); }
}
