:root {
  --navy: #0b2b52;
  --navy-dark: #071c36;
  --navy-light: #163d6f;
  --blue: #1565c9;
  --blue-light: #eaf2fd;
  --blue-border: #9ec5fe;
  --red: #e0202d;
  --red-dark: #b5121d;
  --red-light: #fdecee;
  --surface: #ffffff;
  --card-bg: #ffffff;
  --text: #0f172a;
  --muted: #5d708c;
  --line: #e2e8f0;
  --line-dark: #cbd5e1;
  --correct-bg: #dcfce7;
  --correct-border: #22c55e;
  --correct-text: #15803d;
  --wrong-bg: #fee2e2;
  --wrong-border: #ef4444;
  --wrong-text: #b91c1c;
  --highlight-bg: #fef08a;
  --highlight-border: #eab308;
  --highlight-text: #854d0e;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #ffffff;
  color: var(--text);
  line-height: 1.6;
  padding-top: 66px;
  padding-bottom: 84px;
  -webkit-font-smoothing: antialiased;
}

/* TOP NAVBAR */
/* TOP NAVBAR (Clean White Style Matching Reading Test) */
.cl-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  height: 64px;
  background: #ffffff;
  color: var(--text);
  border-bottom: 1.5px solid var(--line);
  box-shadow: 0 2px 10px rgba(11, 43, 82, 0.05);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.cl-nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.cl-brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

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

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

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

.cl-test-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cl-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;
}

.cl-test-title-text {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* NAVBAR CENTER: AUDIO PLAYER */
.cl-nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* AUDIO PLAYER CONTROLLER (Clean Pill on White Navbar) */
.cl-audio-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  padding: 5px 16px 5px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(11, 43, 82, 0.04);
}

.cl-audio-btn {
  background: transparent;
  border: none;
  color: var(--navy);
  font-size: 16px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cl-audio-btn:hover {
  background: var(--blue-light);
  color: var(--blue);
  transform: scale(1.05);
}

.cl-audio-btn-primary {
  background: var(--red) !important;
  color: #fff !important;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(224, 32, 45, 0.35);
}

.cl-audio-btn-primary:hover {
  background: var(--red-dark) !important;
}

.cl-audio-slider {
  width: 140px;
  height: 4px;
  accent-color: var(--blue);
  cursor: pointer;
}

.cl-audio-time {
  font-family: 'Inter', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-width: 80px;
  text-align: center;
}

/* NAVBAR RIGHT */
.cl-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* TIMER (Matching Reading Test) */
.cl-timer-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  padding: 5px 12px;
  border-radius: 8px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy);
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cl-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: all 0.2s;
  box-shadow: 0 2px 8px rgba(224, 32, 45, 0.25);
}

.cl-btn-finish:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(224, 32, 45, 0.35);
}

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

.cl-icon-btn:hover {
  border-color: var(--navy);
  background: var(--surface);
}

.cl-icon-btn:hover {
  background: var(--blue-light);
  color: var(--blue);
}

/* NAVBAR RESPONSIVE STYLES (Keep Finish Test Button & Timer Always Visible) */
@media (max-width: 1100px) {
  .cl-navbar {
    padding: 0 14px;
    gap: 8px;
  }
  .cl-audio-slider {
    width: 90px;
  }
  .cl-test-title-text {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 860px) {
  .cl-navbar {
    padding: 0 10px;
    height: 60px;
  }
  .cl-nav-divider,
  .cl-test-identity {
    display: none;
  }
  .cl-audio-bar {
    padding: 4px 10px 4px 6px;
    gap: 6px;
  }
  .cl-audio-slider {
    width: 70px;
  }
  .cl-audio-time {
    font-size: 11px;
    min-width: 65px;
  }
  .cl-timer-pill {
    padding: 4px 8px;
    font-size: 0.80rem;
  }
  .cl-btn-finish {
    padding: 6px 12px;
    font-size: 0.80rem;
    white-space: nowrap;
  }
  .cl-icon-btn {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 580px) {
  .cl-navbar {
    padding: 0 8px !important;
    gap: 4px !important;
    height: 52px !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .cl-nav-left {
    gap: 0 !important;
    flex: 0 0 auto !important;
  }
  .cl-nav-divider,
  .cl-test-identity {
    display: none !important;
  }
  .cl-brand-badge {
    padding: 0 !important;
    display: flex !important;
  }
  .cl-brand-img {
    height: 20px !important;
    max-width: 60px !important;
  }
  .cl-nav-center {
    flex: 0 0 auto !important;
    margin: 0 !important;
  }
  .cl-audio-bar {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    gap: 0 !important;
  }
  #audioRewindBtn,
  #audioForwardBtn,
  .cl-audio-slider,
  .cl-audio-time {
    display: none !important;
  }
  .cl-audio-btn-primary {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
  }
  .cl-nav-right {
    gap: 4px !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
  }
  .cl-timer-pill {
    padding: 2px 5px !important;
    font-size: 0.68rem !important;
    gap: 2px !important;
  }
  .cl-timer-pill .bi-clock {
    display: none !important;
  }
  .cl-review-mode .cl-timer-pill {
    display: none !important;
  }
  #fullscreenBtn, 
  #notesBtn {
    display: none !important;
  }
  .cl-btn-finish {
    padding: 4px 8px !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
  }
  .cl-review-mode .cl-main-wrap,
  .cl-main-wrap {
    padding: 12px 8px 100px 8px !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
}

/* FULL-WIDTH SCREEN CONTAINER (MATCHING CD IELTS REAL EXAM) */
.cl-main-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 20px 48px 120px 48px;
}

.cl-part-container {
  display: none;
  width: 100%;
  animation: fadeIn 0.2s ease-out;
}

.cl-part-container.active {
  display: block;
}

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

/* PART HEADER (LIKE REAL CD IELTS EXAM PICS) */
.cl-part-header {
  background: #f8fafc;
  border: 1.5px solid var(--line-dark);
  border-radius: 6px;
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cl-part-header h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #0f172a;
  margin-bottom: 2px;
}

.cl-part-header p {
  color: #475569;
  font-size: 14.5px;
}

/* SEAMLESS QUESTIONS CANVAS (NO BOXED CARD WRAPPER) */
.cl-group-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 6px 0 28px 0;
  margin-bottom: 28px;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}

.cl-group-card:last-child {
  border-bottom: none;
}

.cl-group-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.cl-group-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #0f172a;
}

.cl-section-pill {
  font-size: 11.5px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.cl-section-pill:hover {
  background: var(--blue-light);
  color: var(--blue);
  border-color: var(--blue-border);
}

.cl-section-pill.active-mode {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
  pointer-events: none;
}

.cl-group-instruction {
  font-weight: 600;
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 4px;
}

.cl-group-limit {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 16px;
}

.cl-group-heading {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #0f172a;
  margin: 14px 0 8px;
}

.cl-group-subheading {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  margin: 14px 0 8px;
}

/* SQUARE QUESTION BADGE (EXACT SAMPLE PIC REPLICA) */
.cl-q-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 4px;
  border: 1.5px solid #0f172a;
  border-radius: 3px;
  background: #ffffff;
  color: #0f172a;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 13px;
  user-select: none;
  vertical-align: middle;
  margin: 0 4px;
}

/* INLINE INPUT FIELD */
.cl-text-input {
  display: inline-block;
  min-width: 150px;
  max-width: 260px;
  height: 30px;
  padding: 3px 8px;
  border: 1.5px solid #64748b;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  vertical-align: middle;
  margin: 0 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cl-text-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(21, 101, 201, 0.2);
}

/* NOTE COMPLETION LIST */
.cl-note-list {
  list-style: none;
  padding-left: 0;
  margin: 10px 0;
}

.cl-note-item {
  position: relative;
  padding-left: 20px;
  margin-bottom: 14px;
  font-size: 15px;
  color: #0f172a;
  line-height: 2.1;
}

.cl-note-item::before {
  content: "•";
  position: absolute;
  left: 4px;
  font-size: 18px;
  color: #334155;
  line-height: 1.8;
}

/* TABLE COMPLETION */
.cl-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 18px 0;
}

.cl-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1.5px solid #cbd5e1;
}

.cl-table th {
  background: #f8fafc;
  color: #0f172a;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  text-align: left;
}

.cl-table td {
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  font-size: 14.5px;
  color: #0f172a;
  vertical-align: middle;
  line-height: 2;
}

/* MCQ ONE CHOICE */
.cl-mcq-group {
  margin: 16px 0;
}

.cl-mcq-item {
  margin-bottom: 20px;
  padding-bottom: 16px;
}

.cl-mcq-prompt-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.cl-mcq-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 36px;
}

.cl-option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 14.5px;
}

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

.cl-option-letter {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  min-width: 18px;
}

.cl-option-input {
  accent-color: var(--blue);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.cl-option-text {
  color: #0f172a;
}

/* TWO CHOICE CHECKBOX */
.cl-two-choice-box {
  margin: 18px 0;
}

/* MATCHING DRAG & DROP / CLICK SELECT (SPLIT VIEW) */
.cl-matching-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: start;
  margin-top: 14px;
}

.cl-matching-items-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cl-matching-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px dashed var(--line);
}

.cl-matching-item-label {
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
  flex: 1;
}

.cl-dropzone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  padding: 6px 12px;
  border: 1.5px dashed #64748b;
  border-radius: 4px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.cl-dropzone.has-val {
  border-style: solid;
  border-color: #0f172a;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

.cl-dropzone.active-target {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-light);
}

.cl-matching-options-col {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
}

.cl-options-col-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 4px;
}

.cl-options-hint {
  font-size: 12.5px;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 12px;
}

.cl-draggable-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  cursor: grab;
  user-select: none;
  transition: all 0.15s ease;
}

.cl-draggable-card:hover {
  border-color: var(--blue);
  transform: translateX(3px);
}

.cl-draggable-card:active {
  cursor: grabbing;
}

/* FLOW CHART WITH DOWN ARROWS */
.cl-flowchart-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}

.cl-flowchart-card {
  width: 100%;
  max-width: 800px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 14.5px;
  color: #0f172a;
  line-height: 1.9;
}

.cl-flowchart-card .cl-text-input {
  min-width: 220px;
  max-width: calc(100% - 38px);
  height: 34px;
  font-size: 14px;
}

.cl-flowchart-arrow {
  font-size: 22px;
  color: #64748b;
  font-weight: 800;
  user-select: none;
}

/* MAP LABELLING RADIO MATRIX */
.cl-map-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .cl-map-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.cl-map-image-box {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(11,43,82,0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.cl-map-image-box img {
  max-width: 100%;
  max-height: 380px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  margin: 0 auto;
  display: block;
}

.cl-matrix-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1.5px solid #cbd5e1;
}

.cl-matrix-table th {
  background: #f1f5f9;
  color: #0f172a;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 8px;
  text-align: center;
  border: 1px solid #cbd5e1;
}

.cl-matrix-table td {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  font-size: 13.5px;
  text-align: center;
}

.cl-matrix-table td:first-child {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

/* BOTTOM FIXED NAVIGATION BAR (WIDE & ALIGNED WITH CONTENT) */
.cl-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 {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.cl-part-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 {
  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 {
  background: #ffffff;
  border-color: #1e3a8a;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.12);
}

.cl-part-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 {
  color: #1e3a8a;
}

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

.cl-q-btn {
  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 {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

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

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

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

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

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

.cl-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;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.35);
  transition: all 0.15s ease;
}

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

.cl-arrow-nav-btn:active {
  transform: scale(0.93);
}

/* Question scroll pulse */
@keyframes clPulseBorder {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.25); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}
.cl-q-pulse {
  animation: clPulseBorder 1.2s ease-out;
  border-color: #2563eb !important;
}

@media (max-width: 1024px) {
  .cl-part-cards-row {
    justify-content: flex-start;
    padding-right: 80px;
  }
}

/* ========================================================
 * POST-SUBMIT REVIEW & AUDIO SCRIPT SPLIT-SCREEN LAYOUT
 * (SCRIPT ON THE LEFT, QUESTIONS ON THE RIGHT)
 * ======================================================== */
.cl-review-mode .cl-main-wrap,
body.has-script-open .cl-main-wrap {
  width: 100%;
  max-width: 100%;
  padding: 16px 36px 120px 36px;
}

.cl-review-mode .cl-bottom-bar,
body.has-script-open .cl-bottom-bar {
  padding: 8px 36px;
}

.cl-review-mode .cl-part-content-grid,
.cl-part-content-grid.cl-script-open {
  display: flex !important;
  align-items: stretch;
  width: 100%;
  position: relative;
  gap: 0;
}

/* LEFT COLUMN: AUDIO TRANSCRIPT */
.cl-review-mode .cl-transcript-col,
.cl-part-content-grid.cl-script-open .cl-transcript-col {
  display: block !important;
  width: calc(50% - 10px);
  flex: none;
  min-width: 20%;
  max-width: 80%;
  position: sticky;
  top: 76px;
  height: calc(100vh - 160px);
  overflow-y: auto;
  background: #ffffff;
  border: 1.5px solid var(--line-dark);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(11, 43, 82, 0.06);
  padding: 22px 26px;
}

/* DRAGGABLE VERTICAL SPLIT RESIZER */
.cl-split-resizer {
  display: none;
  width: 20px;
  cursor: col-resize;
  user-select: none;
  position: relative;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 50;
  margin: 0 2px;
}

.cl-review-mode .cl-split-resizer,
.cl-part-content-grid.cl-script-open .cl-split-resizer {
  display: flex !important;
}

.cl-resizer-line {
  width: 4px;
  height: 100%;
  background: #cbd5e1;
  border-radius: 2px;
  transition: background 0.15s ease, width 0.15s ease;
}

.cl-resizer-pill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 42px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  color: #64748b;
  font-size: 13px;
  transition: all 0.15s ease;
}

.cl-split-resizer:hover .cl-resizer-line,
.cl-split-resizer.active .cl-resizer-line {
  background: #2563eb;
  width: 5px;
}

.cl-split-resizer:hover .cl-resizer-pill,
.cl-split-resizer.active .cl-resizer-pill {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
  transform: translateY(-50%) scale(1.1);
}

body.cl-is-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}

body.cl-is-resizing * {
  user-select: none !important;
}

/* RIGHT COLUMN: QUESTIONS WITH ANSWERS & EXPLANATIONS */
.cl-review-mode .cl-questions-col,
.cl-part-content-grid.cl-script-open .cl-questions-col {
  width: calc(50% - 10px);
  flex: none;
  min-width: 20%;
  max-width: 80%;
  position: sticky;
  top: 76px;
  height: calc(100vh - 160px);
  overflow-y: auto;
  background: #ffffff;
  border: 1.5px solid var(--line-dark);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(11, 43, 82, 0.06);
  padding: 22px 26px;
}

.cl-transcript-header {
  position: sticky;
  top: -22px;
  background: #ffffff;
  z-index: 10;
  padding: 10px 0 14px 0;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cl-transcript-header h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cl-transcript-body {
  font-size: 15px;
  line-height: 2.2;
  color: #1e293b;
  white-space: pre-wrap;
}

/* HIGHLIGHTED EVIDENCE PHRASES IN SCRIPT */
.cl-evidence-highlight {
  background-color: #fef08a;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  border-bottom: 2px solid #ca8a04;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cl-evidence-highlight:hover {
  background-color: #fde047;
}

.cl-evidence-q-tag {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: 1px;
}

/* GROUP CARDS IN REVIEW MODE */
.cl-review-mode .cl-group-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* REVIEW INPUT STATES */
.input-correct {
  border-color: var(--correct-border) !important;
  background-color: var(--correct-bg) !important;
  color: var(--correct-text) !important;
}

.input-wrong {
  border-color: var(--wrong-border) !important;
  background-color: var(--wrong-bg) !important;
  color: var(--wrong-text) !important;
}

.cl-correct-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--correct-border);
  color: #fff;
  font-family: 'Open Sans', 'Sora', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 4px 10px;
  border-radius: 4px;
  margin-left: 6px;
  margin-top: 4px;
  vertical-align: middle;
  max-width: 100%;
  word-break: break-word;
  white-space: normal;
}

/* EXPLANATION & TRAP BOXES - SLEEK COMPACT ("CHAPTA") DESIGN */
.cl-expl-box {
  margin: 6px 0 4px 0;
  padding: 6px 12px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid var(--blue);
  font-size: 12.5px;
  line-height: 1.45;
}

.cl-expl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.cl-expl-title {
  color: var(--navy);
  font-weight: 700;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cl-expl-text {
  margin: 3px 0 0 0;
  color: #334155;
  font-size: 12.5px;
  line-height: 1.4;
}

.cl-trap-alert {
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 3px solid #f59e0b;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cl-expl-tr td {
  padding: 4px 10px !important;
  background: #f8fafc !important;
  border-top: none !important;
}

/* TWO CHOICE CHECKBOX REVIEW STYLES */
.cl-two-choice-ans-banner {
  margin-top: 6px;
  margin-bottom: 8px;
}

.cl-badge-correct-ans {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
}

.cl-option-label.input-correct {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
  color: #15803d !important;
}

.cl-option-label.input-wrong {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
}

/* USER TEXT HIGHLIGHTING (IELTS ON COMPUTER EXPERIENCE) */
.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;
}

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

.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;
}

.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;
}

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

/* MODAL OVERLAYS */
.cl-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: 20px;
}

.cl-result-modal {
  background: #fff;
  border-radius: 20px;
  width: min(92vw, 540px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 34px 28px;
  text-align: center;
  box-shadow: inset 0 5px 0 var(--red), 0 25px 60px rgba(11, 43, 82, 0.35);
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* CUSTOM SCROLLBARS FOR REVIEW PANELS */
.cl-transcript-col::-webkit-scrollbar,
.cl-questions-col::-webkit-scrollbar {
  width: 8px;
}

.cl-transcript-col::-webkit-scrollbar-thumb,
.cl-questions-col::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.cl-transcript-col::-webkit-scrollbar-thumb:hover,
.cl-questions-col::-webkit-scrollbar-thumb:hover {
  background: var(--blue);
}

@media (max-width: 960px) {
  .cl-main-wrap {
    padding: 16px 14px 120px 14px;
    overflow-x: hidden;
  }
  .cl-main-wrap table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
  .cl-main-wrap img {
    max-width: 100%;
    height: auto;
  }
  .cl-bottom-bar {
    padding: 8px 12px;
  }
  .cl-review-mode .cl-part-content-grid {
    flex-direction: column !important;
    display: flex !important;
  }
  .cl-review-mode .cl-split-resizer {
    display: none !important;
  }
  .cl-review-mode .cl-transcript-col,
  .cl-review-mode .cl-questions-col {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
  }
}


/* === 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 {
    min-height: auto !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .cl-bottom-nav-container {
    gap: 8px !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  .cl-part-cards-row {
    gap: 8px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 2px 0 !important;
    -webkit-overflow-scrolling: touch;
  }
  .cl-part-card {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    padding: 5px 8px !important;
  }
  .cl-part-card-title {
    font-size: 11px !important;
    margin-bottom: 4px !important;
    text-align: left !important;
    white-space: nowrap !important;
  }
  .cl-part-card-nums {
    gap: 3px !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
  }
  .cl-q-btn {
    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 listening inputs */
  .cl-text-input,
  .cl-inline-input,
  select.cl-select {
    font-size: 16px !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Accessible touch targets for Listening MCQ & Checkbox options */
  .cl-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;
    margin-bottom: 6px !important;
    transition: background 0.15s, border-color 0.15s;
  }

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

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

  .cl-option-input {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
  }

  /* Flowchart on mobile */
  .cl-flowchart-card {
    padding: 12px 14px !important;
  }
  .cl-flowchart-card .cl-text-input {
    min-width: 120px !important;
    max-width: 100% !important;
    font-size: 16px !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;
  }
}

