/* ============================================================================
   ISAT PLATFORM MASTER STYLESHEET (isat_style.css)
   ACER 2026 International Student Admissions Test Prep Engine
   ============================================================================ */

:root {
  --bg-main: #080c14;
  --bg-surface: #0f172a;
  --bg-card: #131e36;
  --bg-card-hover: #192746;
  --bg-input: #17233f;
  --border-subtle: #1e293b;
  --border-accent: #334155;
  --border-highlight: #38bdf8;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-blue: #2563eb;
  --accent-gold: #fbbf24;
  --accent-emerald: #34d399;
  --accent-purple: #a78bfa;
  --accent-rose: #f43f5e;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-display: 'Syne', sans-serif;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.25);
}

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

html, body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #7dd3fc;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.isat-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   LAYOUT CONTAINERS & HERO
   ========================================================================== */
.isat-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.hero-section {
  text-align: center;
  padding: 48px 16px 28px;
  max-width: 900px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: #fff;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto 24px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7dd3fc, #3b82f6);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.45);
  color: #fff;
}

.btn-gold {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
  color: #000;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  color: #fff;
  border-color: var(--border-accent);
  background: rgba(255, 255, 255, 0.04);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: 12px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-cyan {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-gold {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-emerald {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-purple {
  background: rgba(167, 139, 250, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.badge-rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-free {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-weight: 700;
}

.badge-locked {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   EXAM CONSOLE LAYOUT (Split-Screen Stimulus & Questions)
   ========================================================================== */
.exam-header {
  background: #0b1120;
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 62px;
}

.exam-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.exam-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.timer-box {
  background: #17233f;
  border: 1px solid var(--border-accent);
  padding: 6px 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-warning {
  border-color: #ef4444 !important;
  color: #f87171 !important;
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { box-shadow: 0 0 4px rgba(239, 68, 68, 0.4); }
  to { box-shadow: 0 0 14px rgba(239, 68, 68, 0.8); }
}

.exam-section-strip {
  background: #0f172a;
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.82rem;
}

.exam-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  height: calc(100vh - 62px);
  overflow: hidden;
}

.exam-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid var(--border-subtle);
  background: #080c14;
  overflow: hidden;
}

.question-header {
  padding: 10px 24px;
  background: #0d1424;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.question-content {
  flex: 1;
  overflow-y: auto !important;
  padding: 24px 32px;
  background: #080c14;
  scroll-behavior: smooth;
}

.question-content::-webkit-scrollbar,
.palette-container::-webkit-scrollbar,
.stimulus-body::-webkit-scrollbar {
  width: 8px;
}

.question-content::-webkit-scrollbar-track,
.palette-container::-webkit-scrollbar-track,
.stimulus-body::-webkit-scrollbar-track {
  background: #0b1120;
}

.question-content::-webkit-scrollbar-thumb,
.palette-container::-webkit-scrollbar-thumb,
.stimulus-body::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}

.question-content::-webkit-scrollbar-thumb:hover,
.palette-container::-webkit-scrollbar-thumb:hover,
.stimulus-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.question-single-flow {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 24px;
}

.stimulus-context-card {
  background: #0b1325;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stimulus-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stimulus-body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #cbd5e1;
}

.stimulus-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  margin: 12px auto;
  display: block;
}

.stimulus-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.85rem;
  background: #101a2f;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.stimulus-table th, .stimulus-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.stimulus-table th {
  background: #17233f;
  color: var(--accent-cyan);
  font-weight: 600;
}

.q-prompt-box {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.q-number-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.q-prompt {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.55;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.options-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 18px;
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.option-item:hover {
  background: #17233f;
  border-color: var(--accent-cyan);
  transform: translateX(2px);
}

.option-item.selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e293b;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.option-item.selected .option-letter {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 800;
}

.option-text {
  font-size: 0.94rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.question-nav-bar {
  padding: 12px 28px;
  background: #0d1424;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

/* ==========================================================================
   QUESTION PALETTE & SIDEBAR
   ========================================================================== */
.exam-sidebar {
  background: #0b1120;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.candidate-summary {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: #080d1a;
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.legend-badge {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
}

.legend-badge.answered { background: #10b981; color: #000; }
.legend-badge.not-answered { background: #ef4444; color: #fff; }
.legend-badge.not-visited { background: #334155; color: #fff; }
.legend-badge.marked { background: #a855f7; color: #fff; }
.legend-badge.ans-marked { background: #3b82f6; color: #fff; }

.palette-container {
  padding: 14px 16px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  flex-grow: 1;
}

.palette-btn {
  height: 38px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: #17233f;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.palette-btn.current {
  border-color: #fff !important;
  transform: scale(1.06);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.palette-btn.answered { background: #10b981; color: #000; border-color: #059669; }
.palette-btn.not-answered { background: #ef4444; color: #fff; border-color: #dc2626; }
.palette-btn.marked { background: #a855f7; color: #fff; border-color: #9333ea; }
.palette-btn.ans-marked { background: #3b82f6; color: #fff; border-color: #2563eb; }

/* ==========================================================================
   MODALS & FORMS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  padding: 32px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.modal-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   REPORT STYLES & PRINT MEDIA
   ========================================================================== */
.report-header-banner {
  background: linear-gradient(135deg, #0f172a, #131e36);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
}

.stat-box {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .isat-nav, .no-print, .btn {
    display: none !important;
  }
  .card, .report-header-banner, .stat-box {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
  .stat-value, .card-title, .modal-title {
    color: #000 !important;
  }
}

/* ==========================================================================
   MOBILE RESPONSIVE EXAM SCREEN (<= 992px)
   Order: Question & Stimulus at Top -> Options Below -> Question Palette Below
   ========================================================================== */
@media (max-width: 992px) {
  body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
  }

  .exam-header {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .exam-name {
    font-size: 0.95rem;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .timer-box {
    padding: 6px 12px;
    font-size: 0.92rem;
  }

  /* Single Column Stacked Flow */
  .exam-layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  .exam-main {
    height: auto !important;
    overflow: visible !important;
    border-right: none;
    border-bottom: 2px solid var(--border-subtle);
  }

  .question-header {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px;
    position: sticky;
    top: 52px;
    z-index: 90;
    background: #0d1424;
  }

  .q-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }

  .question-content {
    padding: 16px 14px;
    overflow-y: visible !important;
    height: auto !important;
    flex: none;
  }

  .question-single-flow {
    gap: 14px;
    padding-bottom: 8px;
  }

  .stimulus-context-card {
    padding: 14px 16px;
    border-radius: 10px;
  }

  .stimulus-title {
    font-size: 0.95rem;
  }

  .stimulus-body {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .stimulus-body img {
    max-width: 100%;
    height: auto;
    margin: 10px auto;
  }

  .q-prompt-box {
    padding: 14px 16px;
    border-radius: 10px;
  }

  .q-prompt {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .option-item {
    padding: 10px 14px;
    gap: 10px;
    border-radius: 8px;
  }

  .option-letter {
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
  }

  .option-text {
    font-size: 0.88rem;
  }

  .question-nav-bar {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 8px;
    position: sticky;
    bottom: 0;
    z-index: 95;
    background: #0d1424;
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.6);
  }

  .question-nav-bar .btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  /* Question Palette Placed directly Below Navigation */
  .exam-sidebar {
    height: auto !important;
    overflow: visible !important;
    border-top: 2px solid var(--border-accent);
    background: #090e1a;
    padding-bottom: 30px;
  }

  .candidate-summary {
    padding: 12px 16px;
  }

  .legend-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 10px 14px;
  }

  .palette-container {
    padding: 12px 14px;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    max-height: 360px;
    overflow-y: auto;
  }

  .palette-btn {
    height: 34px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .exam-header {
    padding: 8px 12px;
  }
  .exam-name {
    font-size: 0.82rem;
    max-width: 130px;
  }
  .palette-container {
    grid-template-columns: repeat(5, 1fr);
  }
  .question-nav-bar {
    justify-content: space-between;
  }
  .question-nav-bar > div {
    display: flex;
    gap: 6px;
  }
}

