/* QuickStart Exams — CDL Exam Prep */
/* Colors: Navy #1E3A5F | Amber #F59E0B | BG #F9FAFB */

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

:root {
  --navy: #1E3A5F;
  --navy-dark: #152C47;
  --navy-light: #2A4F7C;
  --amber: #F59E0B;
  --amber-dark: #D97706;
  --bg: #F9FAFB;
  --white: #FFFFFF;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-600: #4B5563;
  --gray-800: #1F2937;
  --green: #10B981;
  --red: #EF4444;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
}

html, body { overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--gray-800);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-dark); }

img { max-width: 100%; }

/* ── CONTAINER ─────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── BUTTONS ────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--amber);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  background: var(--amber-dark);
  color: var(--navy-dark);
  transform: translateY(-1px);
}
.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  color: var(--white);
}

/* ── NAV ────────────────────────────────────── */
nav {
  background: var(--navy-dark);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--amber); }
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links .btn-primary { padding: 8px 18px; font-size: 0.9rem; }

/* ── HERO ───────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 80px 0 70px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(245,158,11,0.2);
  color: var(--amber);
  border: 1px solid var(--amber);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.hero h1 .highlight { color: var(--amber); }
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 52px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── SECTION HEADERS ────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-tag {
  display: inline-block;
  color: var(--amber-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.section-header p {
  color: var(--gray-600);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
}

/* ── STAKE SECTION ──────────────────────────── */
.stakes {
  padding: 72px 0;
  background: var(--white);
}
.stakes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.stake-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--bg);
}
.stake-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.stake-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.stake-card p { color: var(--gray-600); font-size: 0.95rem; }
.stake-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--red);
  margin-bottom: 8px;
  line-height: 1;
}

/* ── COMPARISON TABLE ───────────────────────── */
.compare {
  padding: 72px 0;
  background: var(--bg);
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
}
.compare-card {
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 2px solid var(--gray-200);
  background: var(--white);
}
.compare-card.featured {
  border-color: var(--amber);
  background: var(--navy);
  color: var(--white);
  position: relative;
}
.compare-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: var(--navy-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
}
.compare-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.compare-card .price {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--amber);
  margin-bottom: 20px;
  line-height: 1;
}
.compare-card .price span { font-size: 1rem; font-weight: 400; color: inherit; opacity: 0.7; }
.compare-card ul { list-style: none; padding: 0; }
.compare-card ul li {
  padding: 7px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.compare-card:not(.featured) ul li { border-bottom-color: var(--gray-200); color: var(--gray-600); }
.compare-card ul li:last-child { border-bottom: none; }
.check { color: var(--green); font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.cross { color: var(--red); font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.compare-card .cta-wrap { margin-top: 24px; text-align: center; }

/* ── HOW IT WORKS ───────────────────────────── */
.how {
  padding: 72px 0;
  background: var(--white);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: calc(16.66% + 24px);
  right: calc(16.66% + 24px);
  height: 2px;
  background: var(--gray-200);
}
.step { text-align: center; position: relative; }
.step-num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  position: relative;
  z-index: 1;
}
.step h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.step p { color: var(--gray-600); font-size: 0.92rem; }

/* ── GUARANTEE ──────────────────────────────── */
.guarantee {
  padding: 72px 0;
  background: var(--bg);
}
.guarantee-box {
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.guarantee-icon { font-size: 3rem; margin-bottom: 16px; }
.guarantee-box h2 { font-size: 1.7rem; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.guarantee-box p { color: var(--gray-600); font-size: 1rem; max-width: 500px; margin: 0 auto 28px; }

/* ── CHECKOUT / CTA SECTION ─────────────────── */
.checkout {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-light) 100%);
  color: var(--white);
  text-align: center;
}
.checkout h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.checkout p { color: rgba(255,255,255,0.8); margin-bottom: 32px; font-size: 1.05rem; }
.checkout-price {
  display: inline-block;
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 6px;
}
.checkout-sub { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-bottom: 32px; }

/* ── FOOTER ─────────────────────────────────── */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.6);
  padding: 32px 0;
  text-align: center;
  font-size: 0.875rem;
}
footer a { color: rgba(255,255,255,0.6); }
footer a:hover { color: var(--white); }
.footer-logo { color: var(--white); font-weight: 800; font-size: 1.1rem; margin-bottom: 8px; }
.footer-logo span { color: var(--amber); }
.footer-links { display: flex; gap: 20px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }

/* ── QUIZ PAGE ──────────────────────────────── */
.quiz-header {
  background: var(--navy-dark);
  padding: 20px 0;
  color: var(--white);
}
.quiz-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.quiz-title { font-size: 1.15rem; font-weight: 700; }
.timer-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 8px 16px;
}
.timer-label { font-size: 0.8rem; opacity: 0.7; }
#timer {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  min-width: 80px;
  text-align: center;
}
#timer.warning { color: #FCA5A5; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

.quiz-progress {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.progress-bar-wrap { background: var(--gray-200); border-radius: 100px; height: 8px; margin-top: 10px; }
.progress-bar { background: var(--amber); border-radius: 100px; height: 100%; transition: width 0.4s; }
.progress-text { font-size: 0.85rem; color: var(--gray-600); display: flex; justify-content: space-between; }

.quiz-body { padding: 40px 0 80px; }
.question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}
.question-domain {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 24px;
  line-height: 1.5;
}
.choices { display: flex; flex-direction: column; gap: 12px; }
.choice-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-size: 0.97rem;
  color: var(--gray-800);
  font-family: var(--font);
  width: 100%;
}
.choice-btn:hover:not(:disabled) {
  border-color: var(--navy-light);
  background: var(--white);
}
.choice-btn.selected { border-color: var(--navy); background: #EFF6FF; }
.choice-btn.correct { border-color: var(--green); background: #D1FAE5; color: #065F46; }
.choice-btn.wrong { border-color: var(--red); background: #FEE2E2; color: #991B1B; }
.choice-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.choice-btn.correct .choice-letter { background: var(--green); color: white; }
.choice-btn.wrong .choice-letter { background: var(--red); color: white; }

.explanation {
  margin-top: 18px;
  padding: 16px;
  background: #EFF6FF;
  border-left: 4px solid var(--navy-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
  color: var(--navy);
  display: none;
}
.explanation.show { display: block; }

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}
.btn-nav {
  padding: 10px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.btn-nav:hover { background: var(--navy); color: var(--white); }
.btn-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-nav.primary { background: var(--navy); color: var(--white); }
.btn-nav.primary:hover { background: var(--navy-dark); }

/* Paywall overlay */
.paywall {
  background: var(--white);
  border: 2px solid var(--amber);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: none;
}
.paywall.show { display: block; }
.paywall h2 { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.paywall p { color: var(--gray-600); margin-bottom: 24px; }

/* Score screen */
.score-screen {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: none;
}
.score-screen.show { display: block; }
.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.score-pct { font-size: 2.2rem; font-weight: 900; color: var(--amber); line-height: 1; }
.score-label { font-size: 0.75rem; opacity: 0.7; }
.score-screen h2 { font-size: 1.8rem; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.score-screen p { color: var(--gray-600); margin-bottom: 24px; }
.score-meta {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.score-meta-item { text-align: center; }
.score-meta-num { font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.score-meta-label { font-size: 0.8rem; color: var(--gray-600); }

/* ── STUDY GUIDE ────────────────────────────── */
.study-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-light) 100%);
  padding: 60px 0 50px;
  color: var(--white);
  text-align: center;
}
.study-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; margin-bottom: 12px; }
.study-hero p { font-size: 1.1rem; color: rgba(255,255,255,0.8); }

.study-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.study-nav .container { display: flex; gap: 16px; flex-wrap: wrap; }
.study-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--gray-200);
  white-space: nowrap;
}
.study-nav a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.study-body { padding: 48px 0 80px; }
.study-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}
.study-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-200);
  position: sticky;
  top: 80px;
}
.study-sidebar h4 { font-size: 0.8rem; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.study-sidebar ul { list-style: none; }
.study-sidebar ul li a {
  display: block;
  padding: 7px 10px;
  font-size: 0.9rem;
  color: var(--gray-600);
  border-radius: var(--radius);
}
.study-sidebar ul li a:hover { background: var(--gray-100); color: var(--navy); }

.study-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--gray-200);
  margin-bottom: 28px;
  scroll-margin-top: 100px;
}
.study-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 10px;
}
.study-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-light);
  margin: 20px 0 10px;
}
.study-section p { color: var(--gray-600); margin-bottom: 12px; line-height: 1.7; }
.study-section ul { padding-left: 20px; color: var(--gray-600); margin-bottom: 14px; }
.study-section ul li { margin-bottom: 6px; line-height: 1.6; }

.key-facts {
  background: #EFF6FF;
  border-left: 4px solid var(--navy-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 16px 0;
}
.key-facts h4 { font-size: 0.85rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.key-facts ul { margin: 0; padding-left: 18px; }
.key-facts ul li { color: var(--navy-dark); font-size: 0.93rem; margin-bottom: 4px; font-weight: 500; }

.number-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.92rem;
}
.number-table th {
  background: var(--navy);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.number-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-800);
}
.number-table tr:nth-child(even) td { background: var(--gray-100); }
.number-table td:first-child { font-weight: 600; color: var(--navy); }
.number-table td.val { font-weight: 700; color: var(--amber-dark); }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 768px) {
  .compare-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .nav-links { display: none; }
  .study-layout { grid-template-columns: 1fr; }
  .study-sidebar { display: none; }
  .guarantee-box { padding: 28px 20px; }
  .question-card { padding: 22px; }
  .score-screen { padding: 28px 20px; }
  .hero-stats { gap: 28px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 50px 0 44px; }
  .compare-grid { gap: 48px; }
  .compare-badge { font-size: 0.68rem; }
}

/* ── MOBILE FIXES (390px / iPhone 14 audit) ─────────────────────────────── */

/* Issue 1: Focus card category name — cap font size on mobile */
@media (max-width: 480px) {
  #focus-category-name {
    font-size: 1.2rem !important;
    line-height: 1.3 !important;
  }
}

/* Issue 2: Focus card layout — stack vertically on mobile */
@media (max-width: 480px) {
  #focus-has-plan {
    padding: 1rem !important;
  }
  #focus-has-plan > div {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  #focus-has-plan > div > div:last-child {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
  }
  #focus-no-plan {
    padding: 1rem !important;
  }
  #focus-no-plan > div {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

/* Issue 3: Study guide tables — scrollable on mobile */
@media (max-width: 600px) {
  .study-wrap table,
  .topic-card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.78rem;
  }
  .study-wrap td,
  .study-wrap th,
  .topic-card td,
  .topic-card th {
    min-width: 80px;
    padding: 0.35rem 0.5rem !important;
  }
}

/* Issue 4: Cram sheet / number-table — scrollable on mobile */
@media (max-width: 600px) {
  .cram-wrap table,
  .cram-card table,
  .number-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.75rem;
  }
  .number-table td,
  .number-table th {
    min-width: 70px;
    padding: 0.3rem 0.4rem !important;
    white-space: nowrap;
  }
}

/* Issue 5: Dashboard subtext exam date — wrap properly on mobile */
@media (max-width: 480px) {
  #dashboard-subtext {
    font-size: 0.78rem !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  #progress-exam-label {
    white-space: normal !important;
    word-break: break-word !important;
  }
}

/* Issue 6: Pricing cards — stack vertically on mobile (390px)
   The grid container uses inline style (no class), so target via #compare */
@media (max-width: 640px) {
  #compare .container > div[style] {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
  }
  .compare-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* AI feature cards — stack 2x2 on mobile instead of horizontal scroll */
@media (max-width: 640px) {
  .ai-feature-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    overflow-x: visible !important;
  }
  .ai-feature-cards > div {
    min-height: 160px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 380px) {
  .ai-feature-cards {
    grid-template-columns: 1fr !important;
  }
}
/* ============================================================
   AI Study Page — Mobile Compact Header (ai-study.html)
   Target: 390px viewport — bring question above the fold
   ============================================================ */
@media (max-width: 640px) {

  /* 1 — Compact study header */
  .study-header {
    padding: 0.5rem 0.75rem !important;
  }
  .study-header h1 {
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
  }
  /* Hide subtitle "Adaptive · Untimed · Personalized…" on mobile */
  .study-header .sub {
    display: none !important;
  }

  /* 2 — Compact readiness/stats bar — one single row */
  .readiness-bar {
    padding: 0.4rem 0.75rem !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
  }
  .r-stat {
    flex: 1 !important;
    min-width: 0 !important;
    justify-content: center !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 0.2rem 0.15rem !important;
  }
  .r-stat .val {
    font-size: 0.85rem !important;
  }
  .r-stat .lbl {
    font-size: 0.6rem !important;
    opacity: 0.65 !important;
  }
  /* Keep dividers but make them shorter */
  .r-divider {
    height: 1.2rem !important;
    width: 1px !important;
    flex-shrink: 0 !important;
  }
  /* Hide the Stable/trend pill on mobile */
  .trend-pill {
    display: none !important;
  }
  /* Hide loading text shrinks row too */
  .r-loading {
    font-size: 0.72rem !important;
  }

  /* 3 — Compact Today's Goal progress bar */
  #session-progress-wrap {
    padding: 0.25rem 0.75rem !important;
  }

  /* 4 — Collapse focus banner into a compact pill */
  .focus-banner {
    padding: 0.4rem 0.75rem !important;
    border-radius: 8px !important;
    margin-bottom: 0.5rem !important;
  }
  .focus-banner-inner {
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    align-items: center !important;
  }
  /* Hide the large emoji icon */
  .focus-icon {
    display: none !important;
  }
  /* Hide "Today's Study Focus" label */
  .focus-label {
    display: none !important;
  }
  /* Hide the subtitle description */
  .focus-subtitle {
    display: none !important;
  }
  /* Compact the title */
  .focus-title {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }
  /* Shrink the AI Mode badge */
  .focus-badge {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.4rem !important;
    flex-shrink: 0 !important;
  }
}
