/* ==========================================================================
   GG-Idea Innovations - Civil Servants CBT Practice Stylesheet
   Mobile-First, Accessible, High-Contrast & Production Polished
   ========================================================================== */

/* Top Navigation Tabs for CBT Portal */
.cbt-tabs-nav {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cbt-tab-btn {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted-dark);
  background: var(--bg-light);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.cbt-tab-btn:hover {
  color: var(--primary-600);
  background: var(--primary-50);
  border-color: var(--primary-200);
}

.cbt-tab-btn.active {
  color: white;
  background: var(--brand-gradient);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(109, 40, 217, 0.35);
}

/* Disclaimer Notice Box */
.cbt-disclaimer-box {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  border-left: 5px solid var(--gold-500);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.cbt-disclaimer-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.cbt-disclaimer-title {
  font-weight: 800;
  color: #92400E;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.cbt-disclaimer-text {
  font-size: 0.88rem;
  color: #78350F;
  line-height: 1.55;
  margin: 0;
}

/* Setup Card */
.cbt-setup-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
}

.cbt-form-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  display: block;
}

/* Mode Selection Cards */
.cbt-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.cbt-mode-card {
  background: var(--bg-light);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cbt-mode-card:hover {
  border-color: var(--primary-400);
  transform: translateY(-2px);
}

.cbt-mode-card.selected {
  border-color: var(--primary-600);
  background: var(--primary-50);
  box-shadow: 0 4px 15px rgba(109, 40, 217, 0.15);
}

/* ==========================================================================
   Active Exam Room Layout
   ========================================================================== */
.cbt-exam-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: flex-start;
}

/* Sticky Exam Header Bar */
.cbt-exam-header-bar {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 75px;
  z-index: 100;
}

.cbt-timer-badge {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  background: var(--bg-light);
  border: 2px solid var(--border-subtle);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-dark);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 130px;
  justify-content: center;
}

.cbt-progress-track {
  width: 100%;
  height: 8px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.75rem;
}

.cbt-progress-fill {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
}

/* Question Canvas Card */
.cbt-question-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.cbt-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cbt-question-title {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.6;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2rem;
}

/* Option Tile Styles */
.cbt-options-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cbt-option-tile {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-subtle);
  background: var(--bg-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 56px;
  user-select: none;
}

.cbt-option-tile:hover {
  border-color: var(--primary-400);
  background: #FAF8FF;
  transform: translateX(4px);
}

.cbt-option-tile:focus-visible {
  outline: 2px solid var(--magenta-500);
  outline-offset: 2px;
}

.cbt-option-tile.selected {
  border-color: var(--primary-600);
  background: #F3EBFF;
  box-shadow: 0 4px 18px rgba(109, 40, 217, 0.18);
}

.cbt-option-letter {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-dark);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.cbt-option-tile.selected .cbt-option-letter {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

.cbt-option-text {
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text-dark);
  font-weight: 500;
}

/* Exam Action Toolbar */
.cbt-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.cbt-btn-flag {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FCD34D;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
}

.cbt-btn-flag.active {
  background: #F59E0B;
  color: white;
  border-color: #D97706;
}

/* ==========================================================================
   Question Palette (Desktop Sidebar & Mobile Drawer)
   ========================================================================== */
.cbt-palette-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 75px;
}

.cbt-palette-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.cbt-legend-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cbt-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.cbt-legend-dot.answered { background: var(--emerald-500); }
.cbt-legend-dot.flagged { background: var(--gold-500); }
.cbt-legend-dot.unanswered { background: #E2E8F0; }

.cbt-palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.cbt-palette-tile {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-light);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cbt-palette-tile:hover {
  transform: scale(1.08);
  border-color: var(--primary-500);
}

.cbt-palette-tile.answered {
  background: var(--emerald-500);
  color: white;
  border-color: var(--emerald-500);
}

.cbt-palette-tile.flagged {
  background: var(--gold-500);
  color: white;
  border-color: var(--gold-500);
}

.cbt-palette-tile.current {
  outline: 3px solid var(--primary-600);
  outline-offset: 2px;
}

/* Mobile Toggle Button for Palette */
.cbt-mobile-palette-toggle {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: var(--primary-900);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  font-weight: 800;
  font-size: 0.92rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* ==========================================================================
   Results Dashboard Styles
   ========================================================================== */
.cbt-results-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 3.5rem);
  box-shadow: var(--shadow-xl);
  margin-bottom: 3rem;
}

.cbt-score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 2.5rem;
  text-align: center;
}

.cbt-score-circle {
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 900;
  color: var(--primary-700);
  line-height: 1;
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
}

.cbt-grade-badge {
  display: inline-block;
  padding: 0.4rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1rem;
}

.cbt-grade-badge.distinction {
  background: rgba(16, 185, 129, 0.15);
  color: #065F46;
  border: 1px solid var(--emerald-500);
}

.cbt-grade-badge.pass {
  background: rgba(59, 130, 246, 0.15);
  color: #1E40AF;
  border: 1px solid var(--blue-500);
}

.cbt-grade-badge.fail {
  background: rgba(239, 68, 68, 0.15);
  color: #991B1B;
  border: 1px solid #EF4444;
}

/* Subject Breakdown */
.cbt-breakdown-row {
  margin-bottom: 1.1rem;
}

.cbt-breakdown-track {
  width: 100%;
  height: 10px;
  background: var(--bg-light-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cbt-breakdown-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* Question Review Cards */
.cbt-review-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.cbt-review-card.correct { border-left: 5px solid var(--emerald-500); }
.cbt-review-card.wrong { border-left: 5px solid #EF4444; }
.cbt-review-card.unanswered { border-left: 5px solid var(--text-muted-dark); }

.cbt-review-badge {
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.cbt-review-badge.correct { background: var(--emerald-100); color: #065F46; }
.cbt-review-badge.wrong { background: #FEE2E2; color: #991B1B; }
.cbt-review-badge.unanswered { background: var(--bg-light-alt); color: var(--text-muted-dark); }

.cbt-review-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.cbt-review-option-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-light);
  font-size: 0.95rem;
}

.cbt-review-option-row.is-correct {
  background: #ECFDF5;
  border: 1.5px solid var(--emerald-500);
}

.cbt-review-option-row.is-wrong {
  background: #FEF2F2;
  border: 1.5px solid #EF4444;
}

.cbt-correct-tag {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--emerald-500);
}

.cbt-wrong-tag {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 800;
  color: #EF4444;
}

.cbt-explanation-box {
  background: #F5F3FF;
  border-radius: var(--radius-md);
  padding: 1.15rem;
  border-left: 3px solid var(--primary-500);
}

/* History Tiles */
.cbt-stat-tile {
  background: var(--bg-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.cbt-stat-val {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.cbt-stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted-dark);
  font-weight: 600;
}

.cbt-history-badge {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.cbt-history-badge.pass { background: var(--emerald-100); color: #065F46; }
.cbt-history-badge.fail { background: #FEE2E2; color: #991B1B; }

/* ==========================================================================
   Mobile Responsive Adjustments for CBT
   ========================================================================== */
@media (max-width: 900px) {
  .cbt-exam-wrapper {
    grid-template-columns: 1fr;
  }

  .cbt-palette-card {
    display: none; /* Hide static desktop sidebar; use mobile bottom drawer */
  }

  .cbt-mobile-palette-toggle {
    display: inline-flex;
  }

  .cbt-palette-drawer {
    display: block;
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 2px solid var(--primary-600);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1.5rem 1.25rem 5.5rem;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 80vh;
    overflow-y: auto;
  }

  .cbt-palette-drawer.open {
    bottom: 0;
  }

  .cbt-palette-drawer .cbt-palette-grid {
    grid-template-columns: repeat(6, 1fr);
    max-height: 50vh;
  }
}

@media (max-width: 480px) {
  .cbt-exam-header-bar {
    top: 60px;
    padding: 0.75rem 1rem;
  }

  .cbt-timer-badge {
    font-size: 1.15rem;
    min-width: 100px;
    padding: 0.35rem 0.65rem;
  }

  .cbt-option-tile {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .cbt-option-letter {
    width: 32px;
    height: 32px;
    font-size: 0.92rem;
  }

  .cbt-option-text {
    font-size: 0.95rem;
  }

  .cbt-palette-drawer .cbt-palette-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
  }

  .cbt-action-bar .btn {
    width: 100%;
  }

  .cbt-btn-flag {
    width: 100%;
    justify-content: center;
  }
}
/* ==========================================================================
   Homepage CBT Promo Section Styles
   ========================================================================== */
.section-cbt-promo {
  background: linear-gradient(135deg, #090e1a 0%, #111827 50%, #062326 100%);
  color: white;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 5.5rem 0;
}

.section-cbt-promo::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -100px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.section-cbt-promo::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cbt-promo-header {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 3.5rem;
}

.cbt-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.cbt-promo-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: #F8FAFC;
}

.cbt-promo-title .text-gradient-cbt {
  background: linear-gradient(135deg, #34D399 0%, #38BDF8 50%, #A78BFA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cbt-promo-desc {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #94A3B8;
  margin-bottom: 2rem;
}

.cbt-pill-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.cbt-pill-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E2E8F0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cbt-pill-chip.primary-state {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.5);
  color: #6EE7B7;
  font-weight: 700;
}

.cbt-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.cbt-feature-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
}

.cbt-feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.cbt-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.cbt-feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 0.65rem;
}

.cbt-feature-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #94A3B8;
  margin: 0;
}

.cbt-promo-cta-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cbt-cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cbt-promo-disclaimer {
  max-width: 860px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid #F59E0B;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #94A3B8;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  text-align: left;
}

.cbt-promo-disclaimer svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #F59E0B;
  margin-top: 2px;
}

/* ==========================================================================
   Mobile Question Palette Drawer & Responsive Styles
   ========================================================================== */

/* Mobile Floating Palette Toggle Button (Hidden on Desktop) */
.cbt-mobile-palette-toggle {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--brand-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(109, 40, 217, 0.45);
  cursor: pointer;
  z-index: 990;
  align-items: center;
  gap: 0.5rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cbt-mobile-palette-toggle:active {
  transform: scale(0.96);
}

/* Mobile Slide-Up Bottom-Sheet Drawer */
.cbt-palette-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 75vh;
  background: var(--bg-white);
  border-top: 2px solid var(--border-subtle);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  padding: 1.5rem 1.25rem;
  transform: translateY(105%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.cbt-palette-drawer.open {
  transform: translateY(0);
}

/* Backdrop when drawer is open */
.cbt-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 995;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cbt-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive Breakpoints for CBT Module */

/* Tablets & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .cbt-exam-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Hide desktop sidebar on tablet/mobile */
  .cbt-palette-card {
    display: none;
  }

  /* Show floating mobile toggle */
  .cbt-mobile-palette-toggle {
    display: inline-flex;
  }
}

/* Standard Mobile & Phablets (<= 768px) */
@media (max-width: 768px) {
  .cbt-tabs-nav {
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }

  .cbt-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .cbt-tab-btn {
    padding: 0.5rem 0.95rem;
    font-size: 0.85rem;
  }

  .cbt-disclaimer-box {
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 1.15rem;
  }

  .cbt-setup-card {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
  }

  .cbt-exam-header-bar {
    top: 60px;
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .cbt-exam-header-bar > div:last-child {
    justify-content: space-between;
  }

  .cbt-timer-badge {
    font-size: 1.15rem;
    padding: 0.35rem 0.75rem;
  }

  .cbt-question-card {
    padding: 1.25rem;
  }

  .cbt-question-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .cbt-btn-flag {
    align-self: flex-start;
  }

  .cbt-action-bar {
    flex-direction: column;
    gap: 0.85rem;
  }

  .cbt-action-bar > div,
  .cbt-action-bar button {
    width: 100%;
    justify-content: center;
  }

  .cbt-results-card {
    padding: 1.5rem 1rem;
  }

  .cbt-results-score-circle {
    width: 130px;
    height: 130px;
  }

  .cbt-score-pct {
    font-size: 2.2rem;
  }

  .cbt-review-card {
    padding: 1.15rem;
  }

  .cbt-review-filter-bar {
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
    flex-wrap: nowrap;
  }

  .cbt-review-filter-bar::-webkit-scrollbar {
    display: none;
  }
}

/* Small Screens (<= 480px) */
@media (max-width: 480px) {
  .cbt-tab-btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
  }

  .cbt-tab-btn svg {
    width: 15px;
    height: 15px;
  }

  .cbt-option-tile {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
  }

  .cbt-option-letter {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }

  .cbt-option-text {
    font-size: 0.92rem;
  }

  .cbt-palette-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
  }

  .cbt-palette-tile {
    height: 36px;
    font-size: 0.82rem;
  }
}

