/*
 * ═══════════════════════════════════════════════════════════════════════
 *  ExamSpark — new-saas.css  v2  (Global SaaS Design System)
 *  Usage  : <link rel="stylesheet" href="/new-saas.css" />
 *
 *  Dark / Light Mode Architecture
 *  ─────────────────────────────────────────────────────────────────────
 *  footer.js toggles dark mode by ADDING  "dark-mode"  class to <body>
 *  and stores preference in localStorage("examspark_darkmode").
 *
 *  Strategy used here (zero breaking change to existing dark look):
 *    :root              → dark tokens  (default look, unchanged)
 *    body.dark-mode     → explicitly re-declare dark tokens (belt & braces)
 *    body:not(.dark-mode) → light theme token overrides
 *
 *  All components use CSS custom properties → they automatically
 *  respond to the class change on <body>. No JS needed in pages.
 * ═══════════════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────────────────────
   1.  DARK TOKENS  (default — :root + body.dark-mode)
   ───────────────────────────────────────────────────────────── */
:root,
body.dark-mode {
  /* Brand */
  --brand-primary:    #6C63FF;
  --brand-secondary:  #48D1CC;
  --brand-accent:     #FF6B6B;
  --brand-gold:       #FFD700;

  /* Backgrounds */
  --bg-dark:          #0D0F1A;
  --bg-card:          #131625;
  --bg-glass:         rgba(255,255,255,0.04);
  --bg-glass-hover:   rgba(255,255,255,0.08);

  /* Borders */
  --border-subtle:    rgba(255,255,255,0.08);
  --border-highlight: rgba(108,99,255,0.4);

  /* Text */
  --text-primary:     #F0F2FF;
  --text-secondary:   #A0A8C8;
  --text-muted:       #6B7280;

  /* Gradients */
  --gradient-brand:   linear-gradient(135deg, #6C63FF 0%, #48D1CC 100%);
  --gradient-warm:    linear-gradient(135deg, #FF6B6B 0%, #FFD700 100%);

  /* Shadows */
  --shadow-glow:      0 0 40px rgba(108,99,255,0.3);
  --shadow-card:      0 8px 32px rgba(0,0,0,0.4);

  /* Radii */
  --radius-card:      16px;
  --radius-pill:      999px;

  /* Motion */
  --transition:       0.3s cubic-bezier(0.4,0,0.2,1);

  /* Semantic surface tokens */
  --body-bg:          #0D0F1A;
  --body-color:       #F0F2FF;
  --navbar-bg:        rgba(13,15,26,0.85);
  --navbar-border:    rgba(255,255,255,0.08);
  --breadcrumb-bg:    rgba(255,255,255,0.02);
  --table-row-hover:  rgba(255,255,255,0.04);
  --footer-bg:        rgba(255,255,255,0.02);
  --footer-border:    rgba(255,255,255,0.08);
  --alert-warn-bg:    rgba(255,107,107,0.07);
  --alert-tip-bg:     rgba(72,209,204,0.07);
  --alert-info-bg:    rgba(108,99,255,0.07);
  --mcq-bg:           #131625;
  --mcq-option-bg:    rgba(255,255,255,0.03);
  --mcq-reveal-bg:    rgba(72,209,204,0.08);
  --highlight-bg:     rgba(108,99,255,0.08);
  --scrollbar-thumb:  #6C63FF;
  --scrollbar-track:  #0D0F1A;
  --hero-h1-gradient: linear-gradient(135deg, #fff 0%, rgba(108,99,255,0.9) 100%);
}

/* ─────────────────────────────────────────────────────────────
   2.  LIGHT TOKENS  (body:not(.dark-mode) — footer.js removed class)
   ───────────────────────────────────────────────────────────── */
body:not(.dark-mode) {
  --bg-dark:          #F4F6FF;
  --bg-card:          #FFFFFF;
  --bg-glass:         rgba(0,0,0,0.03);
  --bg-glass-hover:   rgba(0,0,0,0.06);
  --border-subtle:    rgba(0,0,0,0.08);
  --border-highlight: rgba(108,99,255,0.30);
  --text-primary:     #1A1D2E;
  --text-secondary:   #4A5080;
  --text-muted:       #8B92B0;
  --shadow-card:      0 8px 32px rgba(108,99,255,0.10);
  --body-bg:          #F4F6FF;
  --body-color:       #1A1D2E;
  --navbar-bg:        rgba(244,246,255,0.92);
  --navbar-border:    rgba(0,0,0,0.08);
  --breadcrumb-bg:    rgba(0,0,0,0.02);
  --table-row-hover:  rgba(108,99,255,0.04);
  --footer-bg:        rgba(0,0,0,0.03);
  --footer-border:    rgba(0,0,0,0.08);
  --alert-warn-bg:    rgba(255,107,107,0.05);
  --alert-tip-bg:     rgba(72,209,204,0.06);
  --alert-info-bg:    rgba(108,99,255,0.05);
  --mcq-bg:           #FFFFFF;
  --mcq-option-bg:    rgba(0,0,0,0.02);
  --mcq-reveal-bg:    rgba(72,209,204,0.07);
  --highlight-bg:     rgba(108,99,255,0.06);
  --scrollbar-thumb:  #6C63FF;
  --scrollbar-track:  #E8ECFF;
  --hero-h1-gradient: linear-gradient(135deg, #1A1D2E 0%, #6C63FF 100%);
}

/* ─────────────────────────────────────────────────────────────
   3.  RESET & BASE
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--body-bg);
  color: var(--body-color);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(108,99,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(72,209,204,0.06) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
  transition: opacity 0.35s ease;
}

body:not(.dark-mode)::before { opacity: 0.4; }

::-webkit-scrollbar          { width: 6px; }
::-webkit-scrollbar-track    { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb    { background: var(--scrollbar-thumb); border-radius: 3px; }
::selection                  { background: rgba(108,99,255,0.35); color: #fff; }

/* ─────────────────────────────────────────────────────────────
   4.  NAVBAR
   ───────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--navbar-border);
  padding: 0 clamp(1rem,5vw,3rem);
  transition: background 0.35s ease, border-color 0.35s ease;
}
.navbar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem;
}
.nav-logo {
  font-family: 'Outfit', 'Inter', sans-serif; font-size: 1.4rem; font-weight: 800;
  background: var(--gradient-brand); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  text-decoration: none; letter-spacing: -0.5px;
}
.nav-badge {
  background: rgba(108,99,255,0.15); border: 1px solid var(--border-highlight);
  color: var(--brand-primary); font-size: 0.7rem; font-weight: 700;
  padding: 2px 10px; border-radius: var(--radius-pill); letter-spacing: 0.5px; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 0.5rem; list-style: none; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; font-weight: 500;
  padding: 6px 14px; border-radius: 8px; transition: var(--transition);
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-glass-hover); }
.btn-nav-cta {
  background: var(--gradient-brand) !important; color: #fff !important; font-weight: 600 !important;
  padding: 8px 18px !important; border-radius: 10px !important;
  box-shadow: 0 0 20px rgba(108,99,255,0.3); transition: var(--transition) !important;
}
.btn-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(108,99,255,0.5) !important; }

/* ─────────────────────────────────────────────────────────────
   5.  DARK/LIGHT TOGGLE BUTTON  (#nav-theme-toggle via footer.js)
   ───────────────────────────────────────────────────────────── */
#nav-theme-toggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 5px 14px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; color: var(--text-secondary) !important;
  transition: var(--transition); white-space: nowrap;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
#nav-theme-toggle:hover {
  background: rgba(108,99,255,0.15);
  border-color: var(--border-highlight);
  color: var(--brand-primary) !important;
}
body:not(.dark-mode) #nav-theme-toggle {
  background: rgba(108,99,255,0.08);
  border-color: rgba(108,99,255,0.2);
  color: var(--brand-primary) !important;
}

/* ─────────────────────────────────────────────────────────────
   6.  BREADCRUMB
   ───────────────────────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--breadcrumb-bg); border-bottom: 1px solid var(--border-subtle);
  padding: 10px clamp(1rem,5vw,3rem); transition: background 0.35s ease;
}
.breadcrumb-inner { max-width: 1280px; margin: 0 auto; }
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  list-style: none; font-size: 0.78rem; color: var(--text-muted);
}
.breadcrumb li + li::before { content: '›'; margin-right: 4px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--brand-secondary); }
.breadcrumb li:last-child { color: var(--brand-primary); font-weight: 500; }

/* ─────────────────────────────────────────────────────────────
   7.  MAIN LAYOUT
   ───────────────────────────────────────────────────────────── */
.main-wrapper {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(1.5rem,4vw,3rem) clamp(1rem,5vw,2rem);
  display: grid; grid-template-columns: 1fr 300px; gap: 2rem;
  align-items: start; position: relative; z-index: 1;
}
@media (max-width: 1024px) { .main-wrapper { grid-template-columns: 1fr; } }

/* ─────────────────────────────────────────────────────────────
   8.  HERO SECTION
   ───────────────────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, rgba(108,99,255,0.12) 0%, rgba(72,209,204,0.08) 100%);
  border: 1px solid var(--border-highlight); border-radius: 20px;
  padding: clamp(1.5rem,4vw,2.5rem); margin-bottom: 2rem;
  position: relative; overflow: hidden;
  transition: background 0.35s ease;
}
.hero-section::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-label {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(108,99,255,0.15); border: 1px solid var(--border-highlight);
  color: var(--brand-primary); font-size: 0.72rem; font-weight: 700;
  padding: 4px 12px; border-radius: var(--radius-pill);
  letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 1rem;
}
.hero-label .dot {
  width: 6px; height: 6px; background: var(--brand-primary); border-radius: 50%;
  animation: saas-pulse 2s infinite;
}
@keyframes saas-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(1.3)} }

.hero-section h1 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 800; line-height: 1.25;
  letter-spacing: -0.5px; margin-bottom: 1rem;
  background: var(--hero-h1-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.2rem; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-glass); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); font-size: 0.78rem; font-weight: 500;
  padding: 4px 12px; border-radius: var(--radius-pill); transition: var(--transition);
}
.hero-tag svg { width: 12px; height: 12px; }
.hero-desc { color: var(--text-secondary); font-size: 0.975rem; line-height: 1.7; max-width: 700px; }

/* ─────────────────────────────────────────────────────────────
   9.  CARD / OVERVIEW TABLE
   ───────────────────────────────────────────────────────────── */
.overview-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); overflow: hidden; margin-bottom: 2rem;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.card-header {
  background: linear-gradient(135deg, rgba(108,99,255,0.2) 0%, rgba(72,209,204,0.1) 100%);
  border-bottom: 1px solid var(--border-subtle); padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 10px;
}
.card-header-icon {
  width: 32px; height: 32px; background: var(--gradient-brand); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.card-header h2, .card-header h3 {
  font-family: 'Outfit', 'Inter', sans-serif; font-size: 1.05rem; font-weight: 700;
  color: var(--text-primary);
}
.overview-table { width: 100%; border-collapse: collapse; }
.overview-table tr { border-bottom: 1px solid var(--border-subtle); }
.overview-table tr:last-child { border-bottom: none; }
.overview-table tr:hover td { background: var(--table-row-hover); }
.overview-table td { padding: 0.85rem 1.5rem; font-size: 0.875rem; vertical-align: top; transition: background 0.2s; }
.overview-table td:first-child {
  color: var(--text-muted); font-weight: 600; width: 40%;
  text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px;
}
.overview-table td:last-child { color: var(--text-primary); font-weight: 500; }

.badge-diff {
  display: inline-block; background: rgba(72,209,204,0.15); border: 1px solid rgba(72,209,204,0.3);
  color: var(--brand-secondary); font-size: 0.72rem; font-weight: 700;
  padding: 2px 10px; border-radius: var(--radius-pill);
}
.badge-marks {
  display: inline-block; background: rgba(255,215,0,0.10); border: 1px solid rgba(255,215,0,0.3);
  color: var(--brand-gold); font-size: 0.72rem; font-weight: 700;
  padding: 2px 10px; border-radius: var(--radius-pill);
}

/* ─────────────────────────────────────────────────────────────
   10. STAT / KEY-FACT CARDS
   ───────────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); padding: 1.25rem 1.25rem 1rem;
  transition: var(--transition); cursor: default; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient-brand); transform: scaleX(0);
  transition: transform var(--transition); transform-origin: left;
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover { border-color: var(--border-highlight); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 0.5rem; }
.stat-value { font-family: 'Outfit', 'Inter', sans-serif; font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.stat-emoji { font-size: 1.4rem; margin-bottom: 0.5rem; display: block; }

/* ─────────────────────────────────────────────────────────────
   11. SECTION TITLE
   ───────────────────────────────────────────────────────────── */
.section-title {
  font-family: 'Outfit', 'Inter', sans-serif; font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 800;
  color: var(--text-primary); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, var(--border-highlight), transparent); }
.section-icon {
  width: 36px; height: 36px; background: var(--gradient-brand); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   12. LEARNING OBJECTIVES
   ───────────────────────────────────────────────────────────── */
.objectives-list {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); overflow: hidden; margin-bottom: 2rem;
  transition: background 0.35s ease;
}
.objective-item {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle); transition: background var(--transition);
}
.objective-item:last-child { border-bottom: none; }
.objective-item:hover { background: var(--bg-glass-hover); }
.obj-num {
  width: 28px; height: 28px; background: var(--gradient-brand); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: #fff; flex-shrink: 0; margin-top: 2px;
}
.obj-text { font-size: 0.9rem; color: var(--text-secondary); }

/* ─────────────────────────────────────────────────────────────
   13. CONCEPT CARDS
   ───────────────────────────────────────────────────────────── */
.concepts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.concept-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); padding: 1.25rem; transition: var(--transition);
}
.concept-card:hover { border-color: var(--border-highlight); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.concept-term {
  font-family: 'Outfit', 'Inter', sans-serif; font-size: 0.95rem; font-weight: 700;
  color: var(--brand-secondary); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 8px;
}
.concept-term::before { content: '◆'; font-size: 0.5rem; color: var(--brand-primary); }
.concept-def { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.concept-highlight {
  display: inline-block; background: rgba(108,99,255,0.15); border: 1px solid rgba(108,99,255,0.3);
  color: var(--brand-primary); font-size: 0.78rem; font-weight: 700;
  padding: 2px 8px; border-radius: 6px; margin-top: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────
   14. ACCORDION QUESTION BLOCKS
   ───────────────────────────────────────────────────────────── */
.question-block {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); overflow: hidden; margin-bottom: 1rem; transition: var(--transition);
}
.question-block:hover { border-color: var(--border-highlight); }
.question-head {
  padding: 1rem 1.5rem; cursor: pointer; display: flex; align-items: flex-start; gap: 1rem;
  background: rgba(108,99,255,0.04); user-select: none; transition: background var(--transition);
}
.question-head:hover { background: rgba(108,99,255,0.08); }
.q-badge {
  background: var(--gradient-brand); color: #fff; font-size: 0.7rem; font-weight: 800;
  padding: 3px 10px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.q-text { font-size: 0.92rem; color: var(--text-primary); font-weight: 500; flex: 1; }
.q-arrow { font-size: 1rem; color: var(--brand-primary); transition: transform var(--transition); flex-shrink: 0; margin-top: 2px; }
.question-block.open .q-arrow { transform: rotate(180deg); }
.answer-body {
  padding: 1.25rem 1.5rem; border-top: 1px solid var(--border-subtle); display: none;
  font-size: 0.88rem; color: var(--text-secondary); line-height: 1.8;
}
.question-block.open .answer-body { display: block; }
.answer-label {
  display: inline-block; background: rgba(72,209,204,0.12); border: 1px solid rgba(72,209,204,0.3);
  color: var(--brand-secondary); font-size: 0.72rem; font-weight: 700;
  padding: 2px 10px; border-radius: 6px; margin-bottom: 0.75rem; letter-spacing: 0.5px; text-transform: uppercase;
}
.answer-body ul, .answer-body ol { padding-left: 1.4rem; margin-top: 0.5rem; }
.answer-body li { margin-bottom: 0.4rem; }
.answer-body strong { color: var(--text-primary); }
.highlight-box {
  background: var(--highlight-bg); border-left: 3px solid var(--brand-primary);
  border-radius: 0 8px 8px 0; padding: 0.75rem 1rem; margin-top: 0.75rem; font-size: 0.85rem;
}
.q-group-label {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.25); border-radius: 8px;
  padding: 6px 14px; font-size: 0.8rem; font-weight: 700; color: var(--brand-primary);
  margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.5px;
}

/* ─────────────────────────────────────────────────────────────
   15. MCQ CARDS
   ───────────────────────────────────────────────────────────── */
.mcq-card {
  background: var(--mcq-bg); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); padding: 1.25rem 1.5rem; margin-bottom: 1rem; transition: var(--transition);
}
.mcq-card:hover { border-color: var(--border-highlight); }
.mcq-q { font-size: 0.92rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.75rem; }
.mcq-q span.qnum { color: var(--brand-primary); font-family: 'Outfit', 'Inter', sans-serif; font-weight: 800; }
.mcq-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.75rem; }
@media (max-width: 600px) { .mcq-options { grid-template-columns: 1fr; } }
.mcq-option {
  background: var(--mcq-option-bg); border: 1px solid var(--border-subtle);
  border-radius: 8px; padding: 0.5rem 0.85rem; font-size: 0.83rem; color: var(--text-secondary);
  cursor: pointer; transition: var(--transition); text-align: left; font-family: inherit;
}
.mcq-option:hover { background: rgba(108,99,255,0.1); border-color: var(--border-highlight); color: var(--text-primary); }
.mcq-option.correct { background: rgba(72,209,204,0.12); border-color: rgba(72,209,204,0.5); color: var(--brand-secondary); }
.mcq-option.wrong   { background: rgba(255,107,107,0.1);  border-color: rgba(255,107,107,0.4); color: var(--brand-accent); }
.mcq-answer-reveal {
  background: var(--mcq-reveal-bg); border: 1px solid rgba(72,209,204,0.2);
  border-radius: 8px; padding: 0.6rem 1rem; font-size: 0.8rem; color: var(--text-secondary); display: none;
}
.mcq-answer-reveal.show { display: block; }
.mcq-answer-reveal .ans-val { color: var(--brand-secondary); font-weight: 700; }
.mcq-diff { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem; }
.diff-easy { color: #4ade80; } .diff-medium { color: var(--brand-gold); } .diff-hard { color: var(--brand-accent); }

/* ─────────────────────────────────────────────────────────────
   16. DATA TABLE
   ───────────────────────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; border-radius: var(--radius-card); border: 1px solid var(--border-subtle); margin: 1rem 0 2rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table thead tr { background: linear-gradient(135deg, rgba(108,99,255,0.2), rgba(72,209,204,0.1)); border-bottom: 2px solid var(--border-highlight); }
.data-table th { padding: 0.85rem 1.25rem; text-align: left; font-weight: 700; color: var(--text-primary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.data-table td { padding: 0.75rem 1.25rem; color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-glass-hover); color: var(--text-primary); }

/* ─────────────────────────────────────────────────────────────
   17. ALERT BOXES
   ───────────────────────────────────────────────────────────── */
.alert { border-radius: var(--radius-card); padding: 1.25rem 1.5rem; margin-bottom: 1rem; border-left: 4px solid; display: flex; gap: 1rem; align-items: flex-start; }
.alert-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.alert-content { flex: 1; }
.alert-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.35rem; }
.alert-body { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.alert-warn { background: var(--alert-warn-bg); border-color: var(--brand-accent); }
.alert-warn .alert-title { color: var(--brand-accent); }
.alert-tip  { background: var(--alert-tip-bg);  border-color: var(--brand-secondary); }
.alert-tip .alert-title  { color: var(--brand-secondary); }
.alert-info { background: var(--alert-info-bg); border-color: var(--brand-primary); }
.alert-info .alert-title { color: var(--brand-primary); }

/* ─────────────────────────────────────────────────────────────
   18. FAQ ACCORDION
   ───────────────────────────────────────────────────────────── */
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); overflow: hidden; margin-bottom: 0.75rem; transition: var(--transition);
}
.faq-item:hover { border-color: var(--border-highlight); }
.faq-q {
  padding: 1rem 1.5rem; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem; user-select: none; font-size: 0.92rem; font-weight: 600;
  color: var(--text-primary); transition: background var(--transition);
}
.faq-q:hover { background: var(--bg-glass-hover); }
.faq-q .faq-arrow { color: var(--brand-primary); transition: transform var(--transition); flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { padding: 0 1.5rem 1rem; font-size: 0.87rem; color: var(--text-secondary); line-height: 1.7; display: none; }
.faq-item.open .faq-a { display: block; }

/* ─────────────────────────────────────────────────────────────
   19. TIP CARDS
   ───────────────────────────────────────────────────────────── */
.tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.tip-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); padding: 1.25rem; transition: var(--transition); position: relative; overflow: hidden;
}
.tip-card:hover { border-color: var(--border-highlight); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.tip-num {
  font-family: 'Outfit', 'Inter', sans-serif; font-size: 2rem; font-weight: 900;
  background: var(--gradient-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; opacity: 0.3; position: absolute; top: 0.5rem; right: 1rem;
}
.tip-icon  { font-size: 1.5rem; margin-bottom: 0.5rem; }
.tip-title { font-family: 'Outfit','Inter',sans-serif; font-weight: 700; color: var(--text-primary); margin-bottom: 0.4rem; font-size: 0.95rem; }
.tip-body  { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }

/* ─────────────────────────────────────────────────────────────
   20. STATE PILLS
   ───────────────────────────────────────────────────────────── */
.states-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 1.5rem; }
.state-pill {
  background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.25);
  color: var(--brand-primary); font-size: 0.82rem; font-weight: 600;
  padding: 5px 14px; border-radius: var(--radius-pill); transition: var(--transition);
}
.state-pill:hover { background: rgba(108,99,255,0.2); transform: translateY(-1px); }

/* ─────────────────────────────────────────────────────────────
   21. MNEMONIC BOX
   ───────────────────────────────────────────────────────────── */
.mnemonic-box {
  background: linear-gradient(135deg, rgba(255,215,0,0.06), rgba(108,99,255,0.08));
  border: 1px solid rgba(255,215,0,0.2); border-radius: var(--radius-card); padding: 1.25rem 1.5rem; margin: 1rem 0;
}
.mnemonic-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--brand-gold); font-weight: 700; margin-bottom: 0.5rem; }
.mnemonic-text  { font-family: 'Outfit','Inter',sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); letter-spacing: 1px; }
.mnemonic-expand { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ─────────────────────────────────────────────────────────────
   22. SUB-HEADING
   ───────────────────────────────────────────────────────────── */
.sub-heading {
  font-family: 'Outfit','Inter',sans-serif; font-size: 1.05rem; font-weight: 700;
  color: var(--text-primary); margin: 1.5rem 0 0.75rem;
  padding-left: 0.75rem; border-left: 3px solid var(--brand-primary);
}

/* ─────────────────────────────────────────────────────────────
   23. STICKY SIDEBAR
   ───────────────────────────────────────────────────────────── */
.sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); padding: 1.25rem; margin-bottom: 1.25rem;
  transition: background 0.35s ease;
}
.sidebar-title {
  font-family: 'Outfit','Inter',sans-serif; font-size: 0.88rem; font-weight: 700;
  color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 0.75rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border-subtle);
}
.toc-list { list-style: none; }
.toc-list a {
  display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.82rem;
  color: var(--text-muted); text-decoration: none; border-radius: 6px; transition: color var(--transition);
}
.toc-list a::before { content: '›'; color: var(--brand-primary); font-weight: bold; }
.toc-list a:hover   { color: var(--brand-secondary); }
.quick-fact-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); font-size: 0.8rem; }
.quick-fact-row:last-child { border-bottom: none; }
.qf-label { color: var(--text-muted); }
.qf-val   { color: var(--brand-secondary); font-weight: 700; }
.progress-bar-wrap { background: var(--bg-glass-hover); border-radius: 100px; height: 6px; overflow: hidden; margin: 4px 0; }
.progress-bar { height: 100%; border-radius: 100px; background: var(--gradient-brand); transition: width 1s ease; }
.next-btn, .prev-btn {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(108,99,255,0.15), rgba(72,209,204,0.08));
  border: 1px solid var(--border-highlight); border-radius: 12px; padding: 0.85rem 1rem;
  text-decoration: none; color: var(--text-primary); transition: var(--transition);
}
.next-btn:hover { background: linear-gradient(135deg, rgba(108,99,255,0.25), rgba(72,209,204,0.15)); transform: translateX(3px); }
.prev-btn:hover { background: linear-gradient(135deg, rgba(108,99,255,0.25), rgba(72,209,204,0.15)); transform: translateX(-3px); }
.next-btn-sub, .prev-btn-sub   { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 2px; }
.next-btn-title, .prev-btn-title { font-size: 0.85rem; font-weight: 600; }
.next-btn-arrow, .prev-btn-arrow { font-size: 1.2rem; color: var(--brand-primary); }

/* ─────────────────────────────────────────────────────────────
   24. CONCLUSION CARD
   ───────────────────────────────────────────────────────────── */
.conclusion-card {
  background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(72,209,204,0.08));
  border: 1px solid var(--border-highlight); border-radius: 20px;
  padding: clamp(1.5rem,4vw,2.5rem); text-align: center; margin-bottom: 2rem;
}
.conclusion-card h2 { font-family: 'Outfit','Inter',sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--text-primary); margin-bottom: 1rem; }
.conclusion-card p  { color: var(--text-secondary); font-size: 0.93rem; max-width: 600px; margin: 0 auto 1.25rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; background: var(--gradient-brand);
  color: #fff; font-weight: 700; font-size: 0.9rem; padding: 12px 28px; border-radius: 12px;
  text-decoration: none; transition: var(--transition); box-shadow: 0 4px 20px rgba(108,99,255,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,0.5); }

/* ─────────────────────────────────────────────────────────────
   25. SAAS PAGE FOOTER (inline, NOT footer.js injected)
   ───────────────────────────────────────────────────────────── */
.saas-footer {
  background: var(--footer-bg); border-top: 1px solid var(--footer-border);
  padding: 2rem clamp(1rem,5vw,3rem); position: relative; z-index: 1;
  transition: background 0.35s ease;
}
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-logo { font-family: 'Outfit','Inter',sans-serif; font-weight: 800; font-size: 1.2rem; background: var(--gradient-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-text { font-size: 0.78rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.78rem; color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: var(--brand-secondary); }

/* ─────────────────────────────────────────────────────────────
   26. TYPOGRAPHY HELPER
   ───────────────────────────────────────────────────────────── */
.saas-gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ─────────────────────────────────────────────────────────────
   27. ANIMATIONS
   ───────────────────────────────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeInUp 0.5s ease both; }
.delay-1    { animation-delay: 0.1s; }
.delay-2    { animation-delay: 0.2s; }
.delay-3    { animation-delay: 0.3s; }

/* ─────────────────────────────────────────────────────────────
   28. RESPONSIVE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .concepts-grid { grid-template-columns: 1fr; }
  .stat-grid     { grid-template-columns: 1fr 1fr; }
}

/* ─────────────────────────────────────────────────────────────
   29. PRINT
   ───────────────────────────────────────────────────────────── */
@media print {
  .navbar, .sidebar, .saas-footer, footer { display: none; }
  .main-wrapper  { grid-template-columns: 1fr; }
  .answer-body, .faq-a { display: block !important; }
  body { background: #fff !important; color: #000 !important; }
}