:root {
  /* ── Brand Palette ─────────────────────────────── */
  --color-saffron:        #FF6B35;
  --color-saffron-light:  #FF8C5A;
  --color-saffron-dark:   #E5501A;
  --color-indigo:         #3730A3;
  --color-indigo-mid:     #4F46E5;
  --color-indigo-light:   #818CF8;
  --color-green:          #059669;
  --color-green-light:    #34D399;
  --color-amber:          #F59E0B;
  --color-rose:           #E11D48;

  /* ── Neutrals ───────────────────────────────────── */
  --color-bg:             #F8F7FF;
  --color-bg-card:        #FFFFFF;
  --color-surface:        #F1F0FD;
  --color-border:         #E2E0F5;
  --color-text-primary:   #1A1740;
  --color-text-secondary: #4B4880;
  --color-text-muted:     #8B88B0;

  /* ── Gradients ──────────────────────────────────── */
  --gradient-hero:        linear-gradient(135deg, #3730A3 0%, #4F46E5 40%, #7C3AED 100%);
  --gradient-saffron:     linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
  --gradient-card:        linear-gradient(145deg, #FFFFFF 0%, #F8F7FF 100%);
  --gradient-science:     linear-gradient(135deg, #059669 0%, #0EA5E9 100%);
  --gradient-maths:       linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  --gradient-social:      linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  --gradient-english:     linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
  --gradient-hindi:       linear-gradient(135deg, #FF6B35 0%, #F59E0B 100%);
  --gradient-sanskrit:    linear-gradient(135deg, #06B6D4 0%, #3730A3 100%);

  /* ── Shadows ────────────────────────────────────── */
  --shadow-sm:    0 1px 3px rgba(55, 48, 163, 0.08), 0 1px 2px rgba(55, 48, 163, 0.04);
  --shadow-md:    0 4px 16px rgba(55, 48, 163, 0.12), 0 2px 4px rgba(55, 48, 163, 0.06);
  --shadow-lg:    0 8px 32px rgba(55, 48, 163, 0.16), 0 4px 8px rgba(55, 48, 163, 0.08);
  --shadow-xl:    0 20px 64px rgba(55, 48, 163, 0.20), 0 8px 16px rgba(55, 48, 163, 0.10);
  --shadow-glow:  0 0 40px rgba(79, 70, 229, 0.3);
  --shadow-card:  0 2px 12px rgba(55, 48, 163, 0.10), 0 0 1px rgba(55, 48, 163, 0.15);

  /* ── Radius ─────────────────────────────────────── */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* ── Transitions ────────────────────────────────── */
  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Typography ─────────────────────────────────── */
  --font-sans:  'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-display: 'Sora', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* ── Spacing ────────────────────────────────────── */
  --header-height: 72px;
  --sidebar-width: 300px;
  --content-max: 900px;
  --page-max: 1400px;
}

/* ════════════════════════════════════════════════════
   RESET & BASE
════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.25; }

/* ════════════════════════════════════════════════════
   UTILITY CLASSES
════════════════════════════════════════════════════ */
.container      { max-width: var(--page-max); margin-inline: auto; padding-inline: 24px; }
.sr-only        { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.gap-2          { gap: 8px; }
.gap-3          { gap: 12px; }
.gap-4          { gap: 16px; }
.gap-6          { gap: 24px; }
.gap-8          { gap: 32px; }
.grid           { display: grid; }
.text-center    { text-align: center; }
.hidden         { display: none !important; }
.truncate       { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ════════════════════════════════════════════════════
   SITE HEADER
════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-hero);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.logo-icon svg { width: 22px; height: 22px; color: white; }

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo-tagline {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Header Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-indigo);
  background: var(--color-surface);
}

/* Grade selector pills in header */
.grade-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  padding: 6px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

.grade-pill {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.grade-pill:hover { color: var(--color-indigo); background: white; box-shadow: var(--shadow-sm); }
.grade-pill.active {
  background: var(--gradient-hero);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

/* ════════════════════════════════════════════════════
   HERO SECTION (Homepage)
════════════════════════════════════════════════════ */
.hero-section {
  background: var(--gradient-hero);
  padding: 80px 24px 100px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,107,53,0.2) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(124,58,237,0.3) 0%, transparent 50%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: float-particle 6s infinite ease-in-out;
}

@keyframes float-particle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-20px) scale(1.5); opacity: 0.8; }
}

.hero-content {
  position: relative;
  max-width: var(--page-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF6B35;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.4); }
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-title-accent {
  display: block;
  background: linear-gradient(135deg, #FF6B35, #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-bottom: 40px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: white;
  display: block;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: white;
  color: var(--color-indigo);
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transition: all var(--transition-spring);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: rgba(255,255,255,0.15);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
  transition: all var(--transition-spring);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* Hero Lottie / Visual side */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-lottie-wrap {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  position: relative;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,0.3));
}

/* ════════════════════════════════════════════════════
   SUBJECT CARDS GRID (Homepage)
════════════════════════════════════════════════════ */
.subjects-section {
  padding: 80px 24px;
  background: var(--color-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-indigo);
  background: var(--color-surface);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 540px;
  margin-inline: auto;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: var(--page-max);
  margin-inline: auto;
}

.subject-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  padding: 28px;
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}

.subject-card.science::before  { background: var(--gradient-science); }
.subject-card.maths::before    { background: var(--gradient-maths); }
.subject-card.social::before   { background: var(--gradient-social); }
.subject-card.english::before  { background: var(--gradient-english); }
.subject-card.hindi::before    { background: var(--gradient-hindi); }
.subject-card.sanskrit::before { background: var(--gradient-sanskrit); }

.subject-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.subject-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.subject-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.subject-card.science  .subject-icon { background: linear-gradient(135deg,#d1fae5,#a7f3d0); }
.subject-card.maths    .subject-icon { background: linear-gradient(135deg,#ede9fe,#ddd6fe); }
.subject-card.social   .subject-icon { background: linear-gradient(135deg,#fef3c7,#fde68a); }
.subject-card.english  .subject-icon { background: linear-gradient(135deg,#fce7f3,#fbcfe8); }
.subject-card.hindi    .subject-icon { background: linear-gradient(135deg,#fff7ed,#fed7aa); }
.subject-card.sanskrit .subject-icon { background: linear-gradient(135deg,#cffafe,#a5f3fc); }

.chapter-count-badge {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

.subject-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.subject-card-textbook {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: 18px;
}

.chapter-list-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.chapter-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  padding: 5px 0;
}

.chapter-preview-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-indigo-light);
  flex-shrink: 0;
}

.chapter-preview-more {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 4px 0;
}

.subject-card-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.subject-progress-bar {
  flex: 1;
  height: 5px;
  background: var(--color-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-right: 16px;
}

.subject-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.subject-card.science  .subject-progress-fill { background: var(--gradient-science); }
.subject-card.maths    .subject-progress-fill { background: var(--gradient-maths); }
.subject-card.social   .subject-progress-fill { background: var(--gradient-social); }
.subject-card.english  .subject-progress-fill { background: var(--gradient-english); }
.subject-card.hindi    .subject-progress-fill { background: var(--gradient-hindi); }
.subject-card.sanskrit .subject-progress-fill { background: var(--gradient-sanskrit); }

.explore-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-indigo);
  background: var(--color-surface);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.explore-btn:hover { background: var(--color-indigo); color: white; }

/* ════════════════════════════════════════════════════
   CHAPTER PAGE LAYOUT
════════════════════════════════════════════════════ */
.chapter-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr 280px;
  gap: 0;
  min-height: calc(100vh - var(--header-height));
  max-width: var(--page-max);
  margin-inline: auto;
}

/* ── Chapter Sidebar (Left) ── */
.chapter-sidebar {
  border-right: 1px solid var(--color-border);
  padding: 28px 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  background: white;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  padding: 0 20px 8px;
}

.sidebar-chapter-list { padding: 0 12px; }

.sidebar-chapter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}

.sidebar-chapter-item:hover { background: var(--color-surface); color: var(--color-text-primary); }
.sidebar-chapter-item.active { background: var(--color-surface); color: var(--color-indigo); }
.sidebar-chapter-item.completed { color: var(--color-green); }

.sidebar-chapter-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.sidebar-chapter-item.active .sidebar-chapter-num {
  background: var(--color-indigo);
  color: white;
}

.sidebar-chapter-item.completed .sidebar-chapter-num {
  background: var(--color-green);
  color: white;
}

/* ── Chapter Main Content ── */
.chapter-main {
  padding: 0;
  overflow-y: auto;
  min-width: 0;
}

/* Chapter Hero Banner */
.chapter-hero {
  position: relative;
  padding: 52px 48px 40px;
  background: var(--gradient-hero);
  overflow: hidden;
}

.chapter-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-bg);
  clip-path: ellipse(60% 100% at 50% 100%);
}

.chapter-hero-lottie {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  height: 220px;
  opacity: 0.9;
}

.chapter-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  margin-bottom: 16px;
}

.chapter-breadcrumb a { color: rgba(255,255,255,0.75); transition: color var(--transition-fast); }
.chapter-breadcrumb a:hover { color: white; }
.breadcrumb-sep { color: rgba(255,255,255,0.4); }

.chapter-grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.chapter-hero-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  color: white;
  letter-spacing: -0.025em;
  line-height: 1.2;
  max-width: 520px;
  margin-bottom: 16px;
}

.chapter-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.chapter-meta-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.12);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

/* Chapter Content Tabs */
.chapter-tabs {
  display: flex;
  gap: 0;
  padding: 0 48px;
  border-bottom: 2px solid var(--color-border);
  background: white;
  position: sticky;
  top: var(--header-height);
  z-index: 10;
}

.chapter-tab {
  padding: 16px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.chapter-tab:hover { color: var(--color-text-primary); }

.chapter-tab.active {
  color: var(--color-indigo);
  border-bottom-color: var(--color-indigo);
}

/* ── Chapter Study Notes ── */
.study-notes {
  padding: 40px 48px;
  max-width: var(--content-max);
}

/* Summary callout */
.summary-callout {
  background: linear-gradient(135deg, #EEF2FF 0%, #E8E7FF 100%);
  border: 1px solid #C7D2FE;
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 40px;
}

.summary-callout-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-indigo);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-bullets { display: flex; flex-direction: column; gap: 8px; }

.summary-bullet {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  line-height: 1.6;
}

.summary-bullet-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-indigo);
  color: white;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
  font-weight: 800;
}

/* Markdown rendered content */
.chapter-content-body h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 40px 0 16px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chapter-content-body h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--gradient-hero);
  border-radius: 2px;
  flex-shrink: 0;
}

.chapter-content-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-indigo);
  margin: 28px 0 10px;
}

.chapter-content-body p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.85;
  margin-bottom: 14px;
}

.chapter-content-body ul {
  list-style: none;
  margin: 14px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-content-body ul li {
  padding-left: 20px;
  position: relative;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.chapter-content-body ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-indigo-light);
  font-size: 0.8rem;
}

.chapter-content-body ol { counter-reset: item; margin: 14px 0 20px; display: flex; flex-direction: column; gap: 8px; }
.chapter-content-body ol li { counter-increment: item; padding-left: 28px; position: relative; font-size: 0.95rem; color: var(--color-text-secondary); line-height: 1.7; }
.chapter-content-body ol li::before { content: counter(item); position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--color-indigo); color: white; font-size: 0.65rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }

.chapter-content-body blockquote {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
  border-left: 4px solid var(--color-saffron);
  padding: 18px 22px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
}

.chapter-content-body blockquote p { color: #92400E; font-weight: 500; margin: 0; font-style: italic; }

.chapter-content-body strong { font-weight: 700; color: var(--color-text-primary); }

/* Math formula blocks */
.math-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-indigo);
  text-align: center;
  overflow-x: auto;
}

.math-inline {
  font-family: var(--font-mono);
  background: var(--color-surface);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-indigo);
}

/* Concept illustrations */
.concept-image-wrap {
  margin: 32px 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.concept-image-wrap img { width: 100%; display: block; }

.concept-image-caption {
  padding: 12px 18px;
  background: var(--color-surface);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

/* Lottie animation embed */
.lottie-concept-wrap {
  margin: 32px 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: white;
  padding: 24px;
}

.lottie-player {
  width: 100%;
  max-height: 320px;
}

.lottie-caption {
  text-align: center;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Vocabulary Table */
.vocab-section { margin-top: 48px; }

.vocab-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.vocab-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.vocab-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-indigo-light); transform: translateY(-2px); }

.vocab-term {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-indigo);
  margin-bottom: 6px;
}

.vocab-def {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ── QUIZ SECTION ── */
.quiz-section {
  padding: 40px 48px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.quiz-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.quiz-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.quiz-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.quiz-score-badge {
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  text-align: center;
  min-width: 100px;
}

.quiz-score-num { font-size: 1.8rem; font-weight: 900; color: var(--color-indigo); line-height: 1; }
.quiz-score-label { font-size: 0.7rem; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.quiz-questions { display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px; }

.quiz-question-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 28px;
  border: 2px solid var(--color-border);
  transition: border-color var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.quiz-question-card.answered { border-color: var(--color-indigo-light); }
.quiz-question-card.correct  { border-color: var(--color-green); }
.quiz-question-card.wrong    { border-color: var(--color-rose); }

.question-num {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.question-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option-btn {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: white;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.option-label {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  flex-shrink: 0;
}

.option-btn:hover:not(:disabled) { border-color: var(--color-indigo-light); color: var(--color-indigo); background: #EEF2FF; }
.option-btn.selected { border-color: var(--color-indigo); background: #EEF2FF; color: var(--color-indigo); }
.option-btn.correct  { border-color: var(--color-green); background: #D1FAE5; color: #065F46; }
.option-btn.wrong    { border-color: var(--color-rose); background: #FFE4E6; color: #9F1239; }
.option-btn:disabled { cursor: default; }

.explanation-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: #F0FDF4;
  border-radius: var(--radius-md);
  border: 1px solid #BBF7D0;
  font-size: 0.875rem;
  color: #065F46;
  line-height: 1.6;
  animation: slide-in 0.3s ease;
}

.explanation-box.wrong-exp { background: #FFF1F2; border-color: #FECDD3; color: #9F1239; }

@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.quiz-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-submit-quiz {
  padding: 14px 40px;
  background: var(--gradient-hero);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
  transition: all var(--transition-spring);
}

.btn-submit-quiz:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(79, 70, 229, 0.45); }
.btn-submit-quiz:disabled { opacity: 0.5; transform: none; cursor: not-allowed; }

.btn-retry-quiz {
  padding: 14px 28px;
  background: white;
  color: var(--color-indigo);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  border: 2px solid var(--color-border);
  transition: all var(--transition-fast);
}

.btn-retry-quiz:hover { border-color: var(--color-indigo); }

/* Celebration animation */
.quiz-celebration {
  text-align: center;
  padding: 32px;
}

.celebration-lottie { width: 140px; height: 140px; margin-inline: auto; }

/* ── MOCK TEST SECTION ── */
.mocktest-section {
  padding: 40px 48px;
  border-top: 1px solid var(--color-border);
}

.timer-bar {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 20px 28px;
  border: 1px solid var(--color-border);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.timer-display {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-indigo);
  letter-spacing: 0.05em;
}

.timer-display.urgent { color: var(--color-rose); animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.timer-progress-wrap { flex: 1; min-width: 200px; }
.timer-progress-track { height: 8px; background: var(--color-border); border-radius: var(--radius-full); overflow: hidden; }
.timer-progress-fill { height: 100%; border-radius: var(--radius-full); background: var(--gradient-hero); transition: width 1s linear; }

/* ── AI TUTOR CHAT ── */
.tutor-panel {
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  background: white;
}

.tutor-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--gradient-hero);
}

.tutor-avatar-wrap { display: flex; align-items: center; gap: 12px; }

.tutor-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.tutor-name { font-size: 0.95rem; font-weight: 800; color: white; }
.tutor-status { font-size: 0.72rem; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 4px; }
.tutor-status-dot { width: 5px; height: 5px; border-radius: 50%; background: #4ADE80; }

.tutor-chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.chat-bubble {
  max-width: 90%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.83rem;
  line-height: 1.6;
  animation: bubble-in 0.3s ease;
}

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

.chat-bubble.model {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-bubble.user {
  background: var(--gradient-hero);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--color-surface);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: typing-bounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); background: var(--color-indigo); } }

.quick-prompts {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--color-border);
}

.quick-prompts-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quick-prompt-pill {
  padding: 7px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  line-height: 1.4;
}

.quick-prompt-pill:hover { background: var(--color-indigo); color: white; border-color: var(--color-indigo); }

.tutor-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.tutor-input {
  flex: 1;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  resize: none;
  outline: none;
  transition: border-color var(--transition-fast);
  max-height: 120px;
  line-height: 1.5;
}

.tutor-input:focus { border-color: var(--color-indigo); }

.tutor-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-hero);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-spring);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.tutor-send-btn:hover { transform: scale(1.12); box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45); }
.tutor-send-btn:disabled { opacity: 0.5; transform: none; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════
   VISUAL CONCEPT MAP
═══════════════════════════════════════════════════ */
.concept-map-section { padding: 40px 48px; }

.concept-map-canvas {
  position: relative;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: radial-gradient(ellipse at center, #F8F7FF 0%, #EEEEF8 100%);
  min-height: 380px;
}

.concept-node {
  position: absolute;
  transform: translate(-50%, -50%);
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--transition-spring);
  max-width: 140px;
  text-align: center;
  z-index: 2;
}

.concept-node:hover, .concept-node.selected {
  border-color: var(--color-indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2), var(--shadow-lg);
  transform: translate(-50%, -50%) scale(1.06);
  z-index: 3;
}

.concept-node.root {
  background: var(--gradient-hero);
  border-color: transparent;
  padding: 14px 20px;
  max-width: 180px;
}

.node-label { font-size: 0.78rem; font-weight: 800; color: var(--color-text-primary); }
.concept-node.root .node-label { color: white; font-size: 0.88rem; }
.node-desc { font-size: 0.65rem; color: var(--color-text-muted); margin-top: 3px; line-height: 1.4; }

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.site-footer {
  background: var(--color-text-primary);
  color: rgba(255,255,255,0.7);
  padding: 60px 24px 32px;
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--page-max);
  margin-inline: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 32px;
}

.footer-brand { }
.footer-logo-name { font-size: 1.5rem; font-weight: 900; color: white; margin-bottom: 8px; }
.footer-brand-desc { font-size: 0.875rem; line-height: 1.7; max-width: 280px; }

.footer-col-title { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.9); margin-bottom: 16px; }

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color var(--transition-fast); }
.footer-link:hover { color: white; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy { font-size: 0.82rem; }
.footer-free-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: #4ADE80;
}

/* ═══════════════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════════════ */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }

.toast {
  background: white;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
  animation: toast-in 0.4s var(--transition-spring);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
}

.toast.success { border-left: 4px solid var(--color-green); }
.toast.error   { border-left: 4px solid var(--color-rose); }
.toast.info    { border-left: 4px solid var(--color-indigo); }

@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .chapter-layout { grid-template-columns: 260px 1fr; }
  .tutor-panel { display: none; }
}

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .chapter-layout { grid-template-columns: 1fr; }
  .chapter-sidebar { display: none; }
  .chapter-tabs { padding: 0 20px; overflow-x: auto; }
  .study-notes, .quiz-section, .mocktest-section, .concept-map-section { padding: 28px 20px; }
  .chapter-hero { padding: 36px 24px 32px; }
  .chapter-hero-lottie { display: none; }
  .options-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 600px) {
  :root { --header-height: 60px; }
  .header-inner { padding-inline: 16px; }
  .grade-nav { display: none; }
  .hero-section { padding: 48px 16px 64px; }
  .subjects-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .hero-stat-number { font-size: 1.5rem; }
}

/* ═══════════════════════════════════════════════════
   LOADING STATES
═══════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, #F0F0F8 25%, #E8E7F5 50%, #F0F0F8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-indigo);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════
   SCROLL ANIMATIONS (Intersection Observer based)
═══════════════════════════════════════════════════ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
