/**
 * styles-reading-v2.css
 * Cambridge IELTS Reading Practice Engine V2 - IELTS Mockpoint
 * Matches Exam Split-Screen Layout + Detailed Question View Sample Designs
 */

:root {
  --blue: #1565c9;
  --blue-dark: #0d47a1;
  --blue-light: #eff6ff;
  --red: #e0202d;
  --red-dark: #b5121d;
  --navy: #0b2b52;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg: #f8fafc;
  --green: #10b981;
  --green-dark: #059669;
  --gold: #f59e0b;
  --header-height: 56px;
  --bottom-bar-height: 72px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  user-select: text;
}

/* ==========================================================================
   1. FIXED TOP NAVBAR
   ========================================================================== */
.cr-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1.5px solid var(--line);
  box-shadow: 0 2px 10px rgba(11, 43, 82, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 1000;
}

.cr-nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 38%;
  z-index: 2;
}

.cr-brand-badge {
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: 2px 6px;
  border-radius: 6px;
}

.cr-brand-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.cr-nav-divider {
  width: 1.5px;
  height: 24px;
  background: #cbd5e1;
}

.cr-test-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.cr-test-book-pill {
  background: var(--navy);
  color: #ffffff;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.80rem;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cr-test-title-text {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.cr-nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: auto;
  z-index: 3;
}

.cr-reading-badge {
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid rgba(21, 101, 201, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(11, 43, 82, 0.04);
}

.cr-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
  z-index: 2;
}

@media (max-width: 992px) {
  .cr-nav-center,
  .cr-reading-badge {
    display: none !important;
  }
}

.cr-timer-pill {
  background: #ffffff;
  border: 1.5px solid var(--line);
  color: var(--navy);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cr-icon-btn {
  background: #ffffff;
  border: 1.5px solid var(--line);
  color: var(--navy);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.cr-icon-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.cr-btn-finish {
  background: var(--red);
  color: #ffffff;
  border: none;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 7px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.cr-btn-finish:hover {
  background: var(--red-dark);
}

/* ==========================================================================
   2. MAIN SPLIT SCREEN WORKSPACE
   ========================================================================== */
.cr-main-wrap {
  position: fixed;
  top: var(--header-height);
  bottom: var(--bottom-bar-height);
  left: 0;
  right: 0;
  display: flex;
  background: #f8fafc;
  overflow: hidden;
}

/* Left Column: Passage */
.cr-passage-col {
  width: 50%;
  min-width: 280px;
  height: 100%;
  overflow-y: auto;
  padding: 26px 36px 80px;
  background: #ffffff;
  border-right: 1px solid var(--line);
  line-height: 1.72;
  font-size: 1.02rem;
  color: #1e293b;
}

.cr-passage-notice {
  font-style: italic;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.cr-passage-title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--navy);
  margin-bottom: 18px;
  line-height: 1.35;
}

.cr-passage-body p {
  margin-bottom: 18px;
  text-align: left;
  line-height: 1.72;
}

.cr-para-letter {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  color: var(--navy);
  margin-right: 6px;
}

/* Heading Dropzone above Paragraph (for Heading matching) */
.cr-heading-dropzone {
  border: 2px dashed #94a3b8;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  min-height: 44px;
}

.cr-heading-dropzone.dragover {
  border-color: var(--blue);
  background: #eff6ff;
  transform: scale(1.01);
}

.cr-heading-dropzone.filled {
  border: 1.5px solid var(--blue);
  background: #f0f7ff;
  color: var(--navy);
  font-weight: 600;
}

.cr-heading-zone-badge {
  background: var(--navy);
  color: #ffffff;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 2px 7px;
  border-radius: 4px;
}

/* Draggable Split Resizer */
.cr-split-resizer {
  width: 10px;
  background: #f1f5f9;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  user-select: none;
  flex: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  z-index: 50;
}

.cr-split-resizer:hover, .cr-split-resizer.active {
  background: #cbd5e1;
}

.cr-split-handle {
  width: 22px;
  height: 28px;
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #475569;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

/* Right Column: Questions */
.cr-questions-col {
  flex: 1;
  min-width: 320px;
  height: 100%;
  overflow-y: auto;
  padding: 24px 32px 80px;
  background: #ffffff;
}

/* Question Group Card */
.cr-group-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(11, 43, 82, 0.03);
}

.cr-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.cr-group-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
}

.cr-section-practice-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.cr-section-practice-badge {
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: 12px;
}

.cr-section-practice-badge:hover {
  background: var(--blue);
  color: #ffffff;
}

.cr-section-practice-badge.active-mode {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
  pointer-events: none;
}

@media (max-width: 640px) {
  .cr-group-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .cr-section-practice-badge {
    margin-left: 0;
  }
}

.cr-group-instruction {
  font-size: 0.92rem;
  color: #334155;
  margin-bottom: 18px;
  line-height: 1.6;
}

.cr-group-instruction strong {
  color: var(--navy);
}

/* Question Items */
.cr-q-item {
  margin-bottom: 16px;
  padding: 8px 0;
  border-bottom: none;
}

.cr-q-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cr-q-prompt-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.cr-qnum-badge {
  background: #ffffff;
  border: 1.5px solid #0f172a;
  color: #0f172a;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 13px;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex: none;
}

.cr-q-text {
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.55;
  flex: 1;
}

/* Radio / Checkbox Options Column */
.cr-options-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-left: 36px;
}

.cr-option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.92rem;
  color: #334155;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.cr-option-label:hover {
  background: #f1f5f9;
}

.cr-opt-letter {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--navy);
  min-width: 16px;
}

.cr-option-label input[type="radio"],
.cr-option-label input[type="checkbox"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Note / Sentence / Table Input Blanks */
.cr-input-blank {
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  min-width: 130px;
  max-width: 220px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #ffffff;
  color: var(--navy);
  font-weight: 600;
}

.cr-input-blank:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 101, 201, 0.12);
}

/* Matching Matrix Table (e.g. Information matching / People statement) */
.cr-matrix-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  margin-top: 14px;
}

.cr-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.90rem;
}

.cr-matrix-table th, .cr-matrix-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 6px;
  text-align: center;
}

.cr-matrix-table th {
  background: #f1f5f9;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.82rem;
}

.cr-matrix-table td.cr-statement-cell {
  text-align: left;
  min-width: 155px;
  padding: 8px 10px;
  line-height: 1.45;
}

.cr-matrix-table input[type="radio"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Word Bank for Summary with List of Words */
.cr-word-bank-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 14px;
}

.cr-word-bank-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cr-word-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cr-word-chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  cursor: grab;
  user-select: none;
  transition: all 0.15s;
}

.cr-word-chip:hover {
  border-color: var(--blue);
  background: #eff6ff;
  color: var(--blue);
  transform: translateY(-1px);
}

.cr-word-chip.selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

/* Drop Blank Box in Summary (Authentic CD-IELTS Inline Slot) */
.cr-drop-blank {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  height: 27px;
  background: #f8fafc;
  border: 1.5px dashed #3b82f6;
  border-radius: 5px;
  margin: 1px 3px;
  padding: 0;
  box-sizing: border-box;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  font-size: 0.86rem;
  overflow: hidden;
}

.cr-drop-blank:hover {
  border-color: #1d4ed8;
  background: #eff6ff;
}

.cr-drop-blank.dragover {
  border-color: #2563eb;
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
  transform: scale(1.02);
}

.cr-drop-badge,
.cr-drop-blank .cr-qnum-badge {
  background: #eff6ff;
  color: #2563eb;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 11px;
  padding: 0 6px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px dashed #93c5fd;
  border-top-left-radius: 3.5px;
  border-bottom-left-radius: 3.5px;
  user-select: none;
  flex: none;
}

.cr-drop-slot,
.cr-drop-blank .cr-blank-text {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

.cr-drop-placeholder {
  color: #64748b;
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 500;
  user-select: none;
}

.cr-drop-blank.filled {
  border-style: solid;
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

.cr-drop-blank.filled .cr-drop-badge,
.cr-drop-blank.filled .cr-qnum-badge {
  background: #2563eb;
  color: #ffffff;
  border-right-style: solid;
  border-right-color: #1d4ed8;
}

.cr-drop-letter {
  color: #1d4ed8;
  margin-right: 3px;
  font-weight: 800;
}

.cr-drop-val {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cr-clear-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  padding: 0 5px;
  height: 100%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.cr-clear-btn:hover {
  color: #ef4444;
}

/* ==========================================================================
   3. BOTTOM PASSAGE & QUESTION NAVIGATION BAR (EXACT LISTENING STYLE)
   ========================================================================== */
.cl-bottom-bar,
.cr-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 72px;
  background: #f8fafc;
  border-top: 1.5px solid #0f2b4c;
  box-shadow: 0 -4px 16px rgba(11, 43, 82, 0.08);
  z-index: 999;
  display: flex;
  align-items: center;
  padding: 8px 48px;
}

.cl-bottom-nav-container,
.cr-bottom-nav-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.cl-part-cards-row,
.cr-passage-cards-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: stretch;
  flex: 1;
  width: 100%;
  overflow-x: auto;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}

.cl-part-card,
.cr-passage-card {
  flex: 1;
  min-width: 180px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 8px 6px 8px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.cl-part-card.active,
.cr-passage-card.active {
  background: #ffffff;
  border-color: #1e3a8a;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.12);
}

.cl-part-card-title,
.cr-passage-card-title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: #0b2b52;
  text-align: center;
  margin-bottom: 5px;
  cursor: pointer;
  user-select: none;
  transition: color 0.12s ease;
}

.cl-part-card.active .cl-part-card-title,
.cr-passage-card.active .cr-passage-card-title {
  color: #1e3a8a;
}

.cl-part-card-nums,
.cr-passage-card-nums {
  display: flex;
  gap: 3px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.cl-q-btn,
.cr-q-dot {
  flex: 1;
  height: 26px;
  max-width: 36px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  padding: 0;
}

.cl-q-btn:hover,
.cr-q-dot:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

.cl-q-btn.answered,
.cr-q-dot.answered {
  background: #0b2b52 !important;
  border-color: #0b2b52 !important;
  color: #ffffff !important;
  font-weight: 700;
}

.cl-q-btn.current-focus,
.cr-q-dot.active {
  outline: 2.5px solid #2563eb;
  outline-offset: 1px;
  font-weight: 800;
}

.cl-q-btn.correct,
.cr-q-dot.correct {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #15803d !important;
  font-weight: 700;
}

.cl-q-btn.wrong,
.cr-q-dot.incorrect {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
  color: #b91c1c !important;
  font-weight: 700;
}

/* RED NAVIGATION ARROWS SAFELY DOCKED INSIDE THE BAR */
.cl-nav-arrows,
.cr-nav-arrows {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  position: static;
  margin-left: 6px;
}

.cl-arrow-nav-btn,
.cr-arrow-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #dc2626;
  color: #ffffff;
  border: none;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cl-arrow-nav-btn:hover,
.cr-arrow-nav-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* ==========================================================================
   4. REVIEW MODE (AFTER SUBMISSION)
   ========================================================================== */
/* Evidence Highlights in Passage (Warm Gold Matching Listening Test) */
.cr-evidence-hl {
  background-color: #fef08a !important;
  color: #854d0e !important;
  border-bottom: 2px solid #ca8a04 !important;
  border-radius: 4px;
  padding: 2px 5px;
  font-weight: 600;
  position: relative;
  transition: background-color 0.15s ease;
}

.cr-evidence-hl:hover {
  background-color: #fde047 !important;
}

.cr-ev-tag {
  background: var(--navy);
  color: #ffffff;
  font-family: 'Sora', sans-serif;
  font-size: 0.70rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 4px;
  vertical-align: middle;
  cursor: pointer;
  display: inline-block;
}

/* Answer Review Badges in Questions */
.cr-review-status-badge {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  margin-right: 6px;
  color: #ffffff;
}

.cr-review-status-badge.correct {
  background: var(--green);
}

.cr-review-status-badge.incorrect {
  background: var(--red);
}

.cr-ans-display-row {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cr-ans-display-row b {
  color: var(--navy);
}

.cr-ans-display-row .cr-ans-correct-val {
  color: var(--green-dark);
  font-weight: 700;
}

.cr-ans-display-row .cr-ans-user-val {
  color: var(--red-dark);
  font-weight: 700;
}

/* Review Box, Status Row & Tags */
.cr-q-review-box {
  margin-top: 10px;
  width: 100%;
}

.cr-review-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.cr-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cr-status-tag.correct {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.cr-status-tag.wrong {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.cr-official-ans {
  color: #15803d;
  font-size: 0.86rem;
}

.cr-user-ans {
  color: #b91c1c;
  font-size: 0.86rem;
}

/* Review Action Buttons: Explain More & Trap */
.cr-review-btn-group {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.cr-explain-btn {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: var(--blue);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.cr-explain-btn:hover {
  background: var(--blue);
  color: #ffffff;
}

.cr-trap-btn {
  background: #fef3c7;
  border: 1.5px solid #fde68a;
  color: #92400e;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.cr-trap-btn:hover {
  background: var(--gold);
  color: #ffffff;
}

.cr-locate-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.cr-locate-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* Explanation & Trap Box Expanders */
.cr-expand-box {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
  display: none;
}

.cr-expand-box.open {
  display: block;
  animation: crFadeIn 0.2s ease;
}

.cr-explain-box {
  background: #f0f7ff;
  border-left: 4px solid var(--blue);
  color: #1e3a8a;
}

.cr-trap-box {
  background: #fffbeb;
  border-left: 4px solid var(--gold);
  color: #78350f;
}

@keyframes crFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   5. FLOATING TEXT HIGHLIGHT TOOLTIP (MATCHING LISTENING EXACTLY)
   ========================================================================== */
.cr-user-hl,
.cr-user-highlight,
.cl-user-highlight {
  background-color: #fef08a !important;
  color: #0f172a !important;
  border-radius: 3px;
  padding: 1px 3px;
  cursor: pointer;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  border-bottom: 2px solid #eab308;
  transition: all 0.15s ease;
}

.cr-user-hl:hover,
.cr-user-highlight:hover,
.cl-user-highlight:hover {
  background-color: #fde047 !important;
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.4);
}

.cr-hl-tooltip,
.cl-hl-tooltip {
  position: fixed;
  z-index: 10005;
  background: #0b2b52;
  color: #ffffff;
  padding: 4px 6px;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(11, 43, 82, 0.35);
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 700;
  user-select: none;
  animation: crFadeIn 0.15s ease;
}

.cr-hl-tooltip-btn,
.cl-hl-tooltip-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s ease;
}

.cr-hl-tooltip-btn:hover,
.cl-hl-tooltip-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   6. RESULT SCORECARD MODAL
   ========================================================================== */
.cr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 43, 82, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cr-result-modal {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(11, 43, 82, 0.3);
  text-align: center;
}

.cr-score-badge-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(21, 101, 201, 0.35);
}

.cr-score-band-num {
  font-family: 'Sora', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.cr-score-band-lbl {
  font-size: 0.70rem;
  font-weight: 600;
  opacity: 0.85;
}

/* Responsive adjustments */
/* Mobile View Switcher (Hidden on Desktop) */
.cr-mobile-view-tabs {
  display: none;
}

@media (max-width: 992px) {
  .cr-passage-col {
    padding: 22px 24px 80px 24px;
  }
  .cr-questions-col {
    padding: 22px 24px 80px 24px;
  }
}

@media (max-width: 860px) {
  :root {
    --bottom-bar-height: 94px;
  }

  .cr-navbar {
    padding: 0 12px;
  }
  .cr-brand-img {
    height: 32px;
  }
  .cr-test-title-text {
    font-size: 0.85rem;
  }
  .cr-nav-center {
    display: none;
  }

  /* Mobile View Segmented Switcher */
  .cr-mobile-view-tabs {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: 42px;
    background: #ffffff;
    border-bottom: 1.5px solid #e2e8f0;
    z-index: 99;
    padding: 5px 12px;
    gap: 8px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  }

  .cr-mobile-tab-btn {
    flex: 1;
    max-width: 140px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.15s ease;
  }

  .cr-mobile-tab-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(37,99,235,0.25);
  }

  /* Main container sits between mobile tabs bar and bottom footer */
  .cr-main-wrap {
    top: calc(var(--header-height) + 42px) !important;
    bottom: var(--bottom-bar-height) !important;
    height: auto !important;
    flex-direction: column;
  }

  .cr-passage-col table,
  .cr-questions-col table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
  .cr-passage-col img,
  .cr-questions-col img {
    max-width: 100%;
    height: auto;
  }

  .cr-split-resizer {
    display: none !important;
  }

  /* Default / Split Mode */
  .cr-passage-col {
    width: 100% !important;
    height: 46%;
    border-right: none;
    border-bottom: 2px solid var(--line);
    padding: 14px 16px 30px 16px;
  }
  .cr-questions-col {
    width: 100% !important;
    height: 54%;
    padding: 14px 16px 60px 16px;
  }

  /* Mobile Full Passage Mode */
  .cr-main-wrap.mobile-view-passage .cr-passage-col {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-bottom: none;
    padding: 16px 18px 60px 18px;
  }
  .cr-main-wrap.mobile-view-passage .cr-questions-col {
    display: none !important;
  }

  /* Mobile Full Questions Mode */
  .cr-main-wrap.mobile-view-questions .cr-passage-col {
    display: none !important;
  }
  .cr-main-wrap.mobile-view-questions .cr-questions-col {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    padding: 16px 18px 80px 18px;
  }

  /* Mobile Split Mode */
  .cr-main-wrap.mobile-view-split .cr-passage-col {
    display: block !important;
    width: 100% !important;
    height: 46% !important;
    border-bottom: 2px solid var(--line);
    padding: 12px 14px 30px 14px;
  }
  .cr-main-wrap.mobile-view-split .cr-questions-col {
    display: block !important;
    width: 100% !important;
    height: 54% !important;
    padding: 12px 14px 60px 14px;
  }

  .cl-bottom-nav-container {
    padding: 4px 8px;
  }
  .cl-part-cards-row {
    gap: 8px;
    overflow-x: auto;
    padding: 4px 6px !important;
    scroll-padding: 8px !important;
    -webkit-overflow-scrolling: touch;
  }
  .cl-part-card {
    min-width: 160px;
    padding: 5px 8px;
    border-radius: 8px;
  }
  .cl-q-btn {
    height: 24px;
    font-size: 10px;
  }
}

@media (max-width: 540px) {
  .cr-nav-divider,
  .cr-test-identity {
    display: none;
  }
  .cr-timer-pill {
    padding: 4px 8px;
    font-size: 0.80rem;
  }
  .cr-btn-finish {
    padding: 6px 14px;
    font-size: 0.80rem;
  }
  .cr-icon-btn {
    width: 32px;
    height: 32px;
  }
  .cl-part-card {
    min-width: 140px;
  }
}

/* -------------------------------------------------------------
 * V2 Additional Question Components (Headings Drag-Drop, Tables, Flowcharts, Inputs)
 * ------------------------------------------------------------- */
.cr-inline-q {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  height: 27px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  margin: 1px 3px;
  padding: 0;
  box-sizing: border-box;
  white-space: nowrap;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.cr-inline-q:focus-within {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.cr-inline-badge,
.cr-inline-q .cr-qnum-badge {
  background: #f1f5f9;
  color: #334155;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 11px;
  padding: 0 6px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #cbd5e1;
  border-top-left-radius: 3.5px;
  border-bottom-left-radius: 3.5px;
  user-select: none;
  flex: none;
  transition: all 0.15s ease;
}

.cr-inline-q:focus-within .cr-inline-badge,
.cr-inline-q:focus-within .cr-qnum-badge {
  background: #eff6ff;
  color: #2563eb;
  border-right-color: #bfdbfe;
}

/* Standalone Question Input (Short Answer Q1-7, etc.) */
.cr-standalone-input-wrap {
  margin-top: 10px;
}

.cr-standalone-input,
.cr-q-item input.cr-standalone-input {
  display: block;
  width: 100% !important;
  max-width: 340px !important;
  min-width: 200px !important;
  height: 42px !important;
  padding: 8px 14px !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
}

.cr-standalone-input:focus,
.cr-q-item input.cr-standalone-input:focus {
  border-color: #2563eb !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), 0 1px 2px rgba(0,0,0,0.05) !important;
}

.cr-standalone-input::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  font-size: 0.88rem !important;
}

/* Inline Fill-in-the-Blank Input (inside .cr-inline-q badge) */
.cr-inline-q .cr-blank-input,
.cr-inline-q .cr-input-blank {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  height: 100% !important;
  padding: 0 6px !important;
  font-family: inherit;
  font-size: 0.88rem !important;
  font-weight: 600;
  color: #0f172a !important;
  width: 90px !important;
  min-width: 60px !important;
  max-width: 130px !important;
  border-top-right-radius: 3.5px;
  border-bottom-right-radius: 3.5px;
  margin: 0 !important;
}

/* Post-submission Highlight States */
.cr-inline-q.rv-correct,
.cr-drop-blank.rv-correct {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
}
.cr-inline-q.rv-correct .cr-inline-badge,
.cr-inline-q.rv-correct .cr-qnum-badge,
.cr-drop-blank.rv-correct .cr-drop-badge,
.cr-drop-blank.rv-correct .cr-qnum-badge {
  background: #16a34a !important;
  color: #ffffff !important;
  border-right-color: #15803d !important;
}

.cr-inline-q.rv-wrong,
.cr-drop-blank.rv-wrong {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
}
.cr-inline-q.rv-wrong .cr-inline-badge,
.cr-inline-q.rv-wrong .cr-qnum-badge,
.cr-drop-blank.rv-wrong .cr-drop-badge,
.cr-drop-blank.rv-wrong .cr-qnum-badge {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-right-color: #b91c1c !important;
}

/* Dedicated Group Review Deck below passage summaries / notes / tables */
.cr-group-review-deck {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cr-review-q-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cr-review-q-pill {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  background: #0f172a;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Summary & Notes typography and line heights */
.cr-summary-wrap,
.cr-notes-wrap {
  line-height: 2.3 !important;
  font-size: 0.95rem;
}

.cr-summary-wrap p {
  line-height: 2.3 !important;
  margin-bottom: 14px;
}

/* Heading Drag & Drop in Left Passage Column */
.cr-heading-dropzone {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #f8fafc;
  border: 1.5px dashed #94a3b8;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 14px;
  margin-bottom: 12px;
  min-height: 44px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.cr-heading-dropzone .cr-q-review-box {
  width: 100%;
}

.cr-heading-dropzone:hover {
  background: #f1f5f9;
  border-color: var(--blue);
}

.cr-heading-dropzone.dragover {
  border-color: #2563eb;
  background: #eff6ff;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cr-heading-dropzone.filled {
  background: #ffffff;
  border: 1.5px solid #2563eb;
}

.cr-heading-drop-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  flex: 1;
}

.cr-heading-dropzone.filled .cr-heading-drop-text {
  color: #0b2b52;
  font-weight: 700;
}

.cr-heading-remove-btn {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #ef4444;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: all 0.15s ease;
}

.cr-heading-remove-btn:hover {
  background: #fecaca;
  color: #b91c1c;
}

/* Heading Drag & Drop in Right Questions Column */
.cr-headings-group-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.cr-headings-overview-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
}

.cr-heading-overview-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #1e293b;
  line-height: 1.5;
  padding: 3px 0;
}

.cr-heading-roman {
  color: var(--blue);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  min-width: 28px;
}

.cr-heading-title {
  color: #334155;
  font-weight: 500;
}

.cr-heading-drag-instruction {
  font-size: 13px;
  font-style: italic;
  color: #64748b;
  margin-top: 4px;
}

.cr-headings-draggable-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cr-heading-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: grab;
  user-select: none;
  transition: all 0.18s ease;
  font-size: 14px;
}

.cr-heading-card:hover {
  border-color: #2563eb;
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.cr-heading-card.dragging {
  opacity: 0.5;
}

.cr-heading-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.25);
}

.cr-heading-card.used {
  opacity: 0.6;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.cr-heading-card-roman {
  font-weight: 700;
  color: var(--blue);
  min-width: 24px;
  font-family: 'Sora', sans-serif;
}

.cr-heading-card-text {
  font-weight: 500;
  color: #1e293b;
}

/* Table Completion Styling */
.cr-table-completion-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0;
}

.cr-table-caption {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  color: var(--navy);
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-size: 14px;
}

/* Flowchart Completion Styling */
.cr-flowchart-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}

.cr-flowchart-step {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 16px;
}

/* Section Mode Paragraph Filter Bar */
.cr-section-para-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f0f7ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 11px 16px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: #1e3a8a;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.cr-section-para-info-text {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  line-height: 1.4;
}

.cr-section-para-info-text strong {
  color: #1d4ed8;
  font-weight: 700;
}

.cr-section-para-info-text svg {
  flex-shrink: 0;
  color: #2563eb;
}

.cr-toggle-paras-btn {
  background: #fff;
  border: 1.5px solid #93c5fd;
  color: #1d4ed8;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cr-toggle-paras-btn:hover {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
}





/* === Test Page Unlock Modal & Locked Section Pill Styles === */
.cl-section-pill.locked,
.cr-section-practice-badge.locked {
  background: #fdecee !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
}
.cl-section-pill.locked:hover,
.cr-section-practice-badge.locked:hover {
  background: #fee2e2 !important;
  color: #e0202d !important;
  border-color: #f87171 !important;
  box-shadow: 0 4px 12px rgba(224, 32, 45, 0.25) !important;
  transform: translateY(-1px) !important;
}
.ps-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 43, 82, 0.65);
  backdrop-filter: blur(4px);
  z-index: 250000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.ps-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.ps-modal-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 24px 50px rgba(11, 43, 82, 0.25);
  width: 100%;
  max-width: 440px;
  text-align: center;
  padding: 32px 28px;
  position: relative;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ps-modal-overlay.open .ps-modal-card {
  transform: none;
}
.ps-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.ps-close-btn:hover {
  background: #fee2e2;
  color: #e0202d;
}



/* Mobile Bottom Question Number Bar Fix (max-width: 768px) */
@media (max-width: 768px) {
  .cl-bottom-bar,
  .cr-bottom-bar {
    min-height: auto !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .cl-bottom-nav-container,
  .cr-bottom-nav-container {
    gap: 8px !important;
  }
  .cl-part-cards-row,
  .cr-passage-cards-row {
    gap: 8px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    padding: 2px 0 !important;
    -webkit-overflow-scrolling: touch;
  }
  .cl-part-card,
  .cr-passage-card {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    padding: 5px 8px !important;
  }
  .cl-part-card-title,
  .cr-passage-card-title {
    font-size: 11px !important;
    margin-bottom: 4px !important;
    text-align: left !important;
    white-space: nowrap !important;
  }
  .cl-part-card-nums,
  .cr-passage-card-nums {
    gap: 3px !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
  }
  .cl-q-btn,
  .cr-q-dot {
    flex: 0 0 auto !important;
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
    padding: 0 !important;
    touch-action: manipulation;
  }

  /* Prevent iOS unwanted auto-zoom on test inputs */
  .cr-inline-q .cr-blank-input,
  .cr-inline-q .cr-input-blank,
  .cr-input-blank,
  .cr-q-item input.cr-standalone-input,
  select.cr-select,
  .cr-dropzone,
  .cr-heading-dropzone {
    font-size: 16px !important;
    max-width: 100% !important;
  }

  .cr-inline-q {
    height: 30px !important;
    margin: 2px 2px !important;
  }

  /* Accessible touch targets for MCQ, TFNG, YNNG */
  .cr-options-col {
    margin-left: 0 !important;
    margin-top: 10px !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .cr-option-label {
    padding: 8px 12px !important;
    min-height: 42px !important;
    border-radius: 8px !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    touch-action: manipulation;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: background 0.15s, border-color 0.15s;
  }

  .cr-option-label:hover {
    background: #f1f5f9;
  }

  .cr-option-label:has(input:checked) {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12) !important;
  }

  .cr-option-label input[type="radio"],
  .cr-option-label input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
  }

  /* Heading & Word Chips touch targets */
  .cr-word-chip {
    padding: 8px 14px !important;
    font-size: 0.88rem !important;
    touch-action: manipulation;
  }

  .cr-heading-card {
    padding: 10px 14px !important;
    font-size: 0.88rem !important;
    touch-action: manipulation;
  }

  .cr-heading-dropzone {
    padding: 10px 14px !important;
    min-height: 44px !important;
    touch-action: manipulation;
  }

  /* Question groups & cards mobile spacing */
  .cr-group-card {
    padding: 14px 12px !important;
    border-radius: 10px !important;
    margin-bottom: 16px !important;
  }

  .cr-questions-col {
    min-width: 0 !important;
    padding: 14px 12px 90px 12px !important;
  }

  .cr-passage-col {
    padding: 14px 12px 60px 12px !important;
  }
}

@media (max-width: 480px) {
  #fullscreenBtn,
  #notesBtn {
    display: none !important;
  }
  .cr-navbar {
    padding: 0 8px !important;
  }
  .cr-brand-img {
    height: 26px !important;
  }
  .cr-timer-pill {
    padding: 4px 7px !important;
    font-size: 0.76rem !important;
  }
  .cr-btn-finish {
    padding: 5px 11px !important;
    font-size: 0.78rem !important;
  }
}



/* ==========================================================================
   ADVANCED IELTS SCORECARD MODAL (ENGNOVATE STYLE - ZERO 3RD PARTY ICONS)
   ========================================================================== */
.mp-advanced-scorecard-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(11, 43, 82, 0.80) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 999999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

.mp-advanced-scorecard-overlay.active {
  display: flex !important;
  animation: mpFadeIn 0.25s ease-out;
}

@keyframes mpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mpScorecardPop {
  0% { opacity: 0; transform: scale(0.96) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.mp-scorecard-modal {
  background: #ffffff !important;
  border-radius: 20px !important;
  width: 100% !important;
  max-width: 900px !important;
  max-height: 92vh !important;
  max-height: 92dvh !important;
  margin: 0 auto !important;
  box-shadow: 0 25px 70px rgba(11, 43, 82, 0.45) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid #e3e9f3 !important;
  box-sizing: border-box !important;
  animation: mpScorecardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mp-scorecard-bar {
  height: 5px;
  background: linear-gradient(90deg, #1565c9, #e0202d);
  flex-shrink: 0;
}

.mp-scorecard-header {
  padding: 14px 22px 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #e3e9f3;
  background: #ffffff;
  flex-shrink: 0;
}

.mp-scorecard-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eaf2fd;
  color: #1565c9;
  font-size: 0.70rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.mp-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1565c9;
}

.mp-scorecard-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0b2b52;
  margin: 0 0 2px 0;
  line-height: 1.25;
}

.mp-scorecard-subtitle {
  font-size: 0.80rem;
  color: #5d708c;
  margin: 0;
}

.mp-scorecard-close {
  background: #f4f7fb;
  border: 1px solid #e3e9f3;
  color: #5d708c;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.30rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mp-scorecard-close:hover {
  background: #e0202d;
  color: #ffffff;
  border-color: #e0202d;
  transform: rotate(90deg);
}

/* Hero Section (5 Balanced Cards on Desktop) */
.mp-scorecard-hero {
  padding: 12px 22px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-bottom: 1px solid #e3e9f3;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr 1.1fr;
  gap: 10px;
  align-items: stretch;
  flex-shrink: 0;
}

.mp-scorecard-band-box {
  background: #ffffff;
  border: 1.5px solid #cfe2fe;
  border-radius: 12px;
  padding: 8px 14px 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(21, 101, 201, 0.08);
  box-sizing: border-box;
}

.mp-scorecard-band-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1565c9 0%, #0b2b52 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 1.40rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 10px rgba(21, 101, 201, 0.32);
  flex-shrink: 0;
}

.mp-band-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  overflow: hidden;
}

.mp-band-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #1565c9;
  line-height: 1.1;
  margin-bottom: 2px;
}

.mp-band-desc {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 0.90rem;
  font-weight: 700;
  color: #0b2b52;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-scorecard-stats-grid {
  display: contents; /* Allows child cards to be direct children of the 5-column grid! */
}

.mp-stat-card {
  background: #ffffff;
  border: 1px solid #e3e9f3;
  border-radius: 12px;
  padding: 8px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.15s ease;
  box-sizing: border-box;
}

.mp-stat-card:hover {
  transform: translateY(-2px);
  border-color: #cfe2fe;
}

.mp-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #5d708c;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mp-stat-val {
  font-family: 'Sora', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0b2b52;
  line-height: 1.1;
}

.mp-stat-val small {
  font-size: 0.78rem;
  color: #5d708c;
  font-weight: 600;
}

.mp-stat-sub {
  font-size: 0.68rem;
  color: #5d708c;
  margin-top: 2px;
  font-weight: 600;
}

.mp-stat-card-green {
  border-left: 3px solid #16a34a;
}

.mp-stat-card-red {
  border-left: 3px solid #dc2626;
}

.text-green { color: #16a34a !important; }
.text-red { color: #dc2626 !important; }

/* Filter & Tab Toolbar */
.mp-scorecard-toolbar {
  padding: 8px 22px;
  background: #ffffff;
  border-bottom: 1px solid #eef2f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.mp-filter-pills,
.mp-status-pills {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.mp-pill-btn,
.mp-status-btn {
  background: #f4f7fb;
  border: 1px solid #e3e9f3;
  color: #5d708c;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mp-pill-btn:hover,
.mp-status-btn:hover {
  background: #eaf2fd;
  color: #1565c9;
  border-color: #bfdbfe;
}

.mp-pill-btn.active,
.mp-status-btn.active {
  background: #1565c9;
  color: #ffffff;
  border-color: #1565c9;
}

.mp-status-btn.status-wrong.active {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.mp-status-btn.status-correct.active {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
}

/* Scrollable Table Area */
.mp-scorecard-table-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 0 22px;
  min-height: 180px;
  max-height: 44vh;
}

.mp-scorecard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.86rem;
}

.mp-scorecard-table thead th {
  position: sticky;
  top: 0;
  background: #ffffff;
  color: #5d708c;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 8px;
  border-bottom: 2px solid #e3e9f3;
  z-index: 2;
}

.mp-scorecard-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.mp-scorecard-table tbody tr:hover {
  background: #f8fbff;
}

.mp-scorecard-table tbody td {
  padding: 9px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f6;
}

.mp-q-num-pill {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #0b2b52;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 0.80rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.mp-user-ans {
  font-weight: 600;
  font-size: 0.86rem;
}

.mp-user-ans.correct {
  color: #15803d;
}

.mp-user-ans.incorrect {
  color: #dc2626;
  text-decoration: line-through;
}

.mp-user-ans.empty {
  color: #94a3b8;
  font-style: italic;
}

.mp-correct-ans-pill {
  display: inline-block;
  background: #eaf2fd;
  color: #0b2b52;
  border: 1px solid #d0e1fd;
  border-radius: 6px;
  padding: 3px 9px;
  font-weight: 700;
  font-size: 0.82rem;
}

.mp-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.mp-status-tag.correct {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.mp-status-tag.incorrect {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.mp-status-tag.unanswered {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Footer Controls */
.mp-scorecard-footer {
  padding: 12px 22px;
  border-top: 1px solid #e3e9f3;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
  z-index: 5;
}

.mp-footer-hint {
  font-size: 0.78rem;
  color: #5d708c;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-footer-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mp-btn-secondary {
  background: #ffffff;
  color: #0b2b52;
  border: 1.5px solid #e3e9f3;
  border-radius: 10px;
  padding: 9px 18px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mp-btn-secondary:hover {
  background: #f4f7fb;
  border-color: #cbd5e1;
}

.mp-btn-primary {
  background: #1565c9;
  color: #ffffff;
  border: 1.5px solid #1565c9;
  border-radius: 10px;
  padding: 9px 22px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(21, 101, 201, 0.28);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mp-btn-primary:hover {
  background: #0b2b52;
  border-color: #0b2b52;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(11, 43, 82, 0.32);
}

/* Tablet & Mobile Breakpoints */
@media (max-width: 860px) {
  .mp-scorecard-modal {
    max-width: 96% !important;
    max-height: 94vh !important;
    border-radius: 16px !important;
  }
  .mp-scorecard-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 16px !important;
  }
  .mp-scorecard-band-box {
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
  }
  .mp-scorecard-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .mp-scorecard-header {
    padding: 12px 16px 10px !important;
  }
  .mp-scorecard-toolbar {
    padding: 8px 16px !important;
  }
  .mp-scorecard-table-wrap {
    padding: 0 16px !important;
  }
  .mp-scorecard-footer {
    padding: 10px 16px !important;
  }
}

@media (max-width: 540px) {
  .mp-scorecard-modal {
    max-width: 98% !important;
    max-height: 96vh !important;
    border-radius: 14px !important;
  }
  .mp-scorecard-title {
    font-size: 1.10rem !important;
  }
  .mp-scorecard-stats-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  .mp-stat-card {
    padding: 6px 10px !important;
  }
  .mp-stat-val {
    font-size: 1.02rem !important;
  }
  .mp-scorecard-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }
  .mp-filter-pills,
  .mp-status-pills {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 2px !important;
  }
  .mp-filter-pills::-webkit-scrollbar,
  .mp-status-pills::-webkit-scrollbar {
    display: none !important;
  }
  .mp-pill-btn,
  .mp-status-btn {
    white-space: nowrap !important;
    font-size: 0.72rem !important;
    padding: 4px 9px !important;
    flex-shrink: 0 !important;
  }
  .mp-scorecard-table th,
  .mp-scorecard-table td {
    padding: 8px 5px !important;
    font-size: 0.80rem !important;
  }
  .mp-scorecard-footer {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
  }
  .mp-footer-hint {
    font-size: 0.72rem !important;
  }
  .mp-footer-buttons {
    width: 100% !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  .mp-btn-primary,
  .mp-btn-secondary {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 14px !important;
    font-size: 0.82rem !important;
  }
}


/* ============================================================
 * Topbar Test Completed Score & Band Pills (Reading & Listening)
 * ============================================================ */
.cr-completed-badges,
.cl-completed-badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: mpBadgePop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mpBadgePop {
  0% {
    opacity: 0;
    transform: translateY(-4px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cr-score-pill,
.cl-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
  padding: 5px 12px;
  border-radius: 8px;
  font-family: 'Sora', -apple-system, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.14);
  white-space: nowrap;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.cr-score-pill:hover,
.cl-score-pill:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.22);
}

.cr-score-pill i,
.cl-score-pill i {
  color: #10b981;
  font-size: 0.96rem;
  display: inline-flex;
}

.cr-score-pill strong,
.cl-score-pill strong {
  color: #047857;
  font-weight: 800;
}

.cr-band-pill,
.cl-band-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1e40af;
  border: 1.5px solid #bfdbfe;
  padding: 5px 12px;
  border-radius: 8px;
  font-family: 'Sora', -apple-system, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.14);
  white-space: nowrap;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.cr-band-pill:hover,
.cl-band-pill:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.22);
}

.cr-band-pill i,
.cl-band-pill i {
  color: #2563eb;
  font-size: 0.96rem;
  display: inline-flex;
}

.cr-band-pill strong,
.cl-band-pill strong {
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.88rem;
}

/* Mobile & Tablet Optimizations */
@media (max-width: 860px) {
  .cr-score-pill,
  .cl-score-pill,
  .cr-band-pill,
  .cl-band-pill {
    padding: 4px 9px;
    font-size: 0.78rem;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  .cr-pill-label,
  .cl-pill-label {
    display: none;
  }
}

@media (max-width: 540px) {
  .cr-completed-badges,
  .cl-completed-badges {
    gap: 4px;
  }
  .cr-score-pill,
  .cl-score-pill,
  .cr-band-pill,
  .cl-band-pill {
    padding: 3px 6px;
    font-size: 0.74rem;
    border-radius: 6px;
  }
  .cr-review-active #fullscreenBtn,
  .cr-review-active #notesBtn,
  .cl-review-active #fullscreenBtn,
  .cl-review-active #notesBtn {
    display: none !important;
  }
}

