/* ==========================================================================
   STUDY WORLD - DESIGN SYSTEM & STYLESHEET
   Aesthetics: Deep Space Slate Dark Mode, Glassmorphism, Micro-animations,
               Curated Emerald/Cyan/Amber Accents, Modern Typography,
               Scratchpad Canvas, Unicode Clean Math Notation & Knowledge Check.
   ========================================================================== */

/* --- CSS VARIABLES & TOKENS --- */
:root {
  /* Color Palette - Backgrounds */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-strong: rgba(255, 255, 255, 0.08);

  /* Color Palette - Accents */
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-600: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.25);

  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --cyan-glow: rgba(6, 182, 212, 0.25);

  --indigo-500: #6366f1;
  --indigo-400: #818cf8;
  --indigo-glow: rgba(99, 102, 241, 0.25);

  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-glow: rgba(245, 158, 11, 0.2);

  --rose-500: #f43f5e;
  --rose-400: #fb7185;

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #090d16;

  /* Borders & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(52, 211, 153, 0.4);
  --border-glass: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 40px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow-emerald: 0 0 25px rgba(16, 185, 129, 0.35);
  --shadow-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.35);

  /* Radius & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body.dark-theme {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar Custom */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Ambient Glow Orbs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  animation: floatAmbient 12s ease-in-out infinite alternate;
}
.glow-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--emerald-500), transparent 70%);
  top: -100px;
  right: -50px;
}
.glow-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--indigo-500), transparent 70%);
  bottom: 5%;
  left: -120px;
  animation-delay: -5s;
}
.glow-3 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, var(--cyan-500), transparent 70%);
  top: 40%;
  right: 15%;
  animation-delay: -8s;
  opacity: 0.25;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.08); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ==========================================================================
   CLEAN UNICODE MATHEMATICAL STYLING
   ========================================================================== */
.formula-display {
  font-family: var(--font-display);
  font-size: 1.15em;
  color: var(--cyan-400);
  line-height: 1.5;
  text-align: center;
  margin: 0.75rem 0;
  letter-spacing: 0.02em;
}
.concept-callout p {
  margin: 0.5rem 0;
  line-height: 1.6;
}
.system-equations-box {
  display: inline-flex;
  flex-direction: column;
  border-left: 3px solid var(--cyan-400);
  border-radius: 2px;
  padding: 0.4rem 0.8rem;
  margin: 0.6rem 0;
  background: rgba(6, 182, 212, 0.06);
  font-family: var(--font-display);
  text-align: left;
  gap: 0.35rem;
}
.system-eq-line {
  line-height: 1.5;
  font-size: 1.05em;
  color: #f8fafc;
}
.math-image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem 0;
}
.math-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 13, 22, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
}

.header-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  outline: none;
}
.logo-icon {
  position: relative;
  font-size: 1.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-sparkle {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 0.9rem;
  animation: pulseSparkle 2.5s infinite ease-in-out;
}
@keyframes pulseSparkle {
  0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.7; }
  50% { transform: scale(1.2) rotate(15deg); opacity: 1; }
}

.logo-text {
  display: flex;
  flex-direction: column;
}
.logo-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}
.logo-title .highlight {
  background: linear-gradient(135deg, var(--emerald-400), var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-tagline {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: -3px;
}

/* Nav Menu */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.4);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}
.nav-btn:hover {
  color: var(--text-main);
  background: var(--bg-glass-strong);
}
.nav-btn.active {
  color: var(--text-main);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid var(--border-active);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.curriculum-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-400);
  box-shadow: 0 0 8px var(--emerald-400);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass);
  transform: rotate(20deg);
}

/* ==========================================================================
   APP VIEWS & GENERAL BUTTONS
   ========================================================================== */
.app-main {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  min-height: calc(100vh - 80px);
}

.view-section {
  display: none;
  animation: fadeInView 0.35s ease-out forwards;
}
.view-section.active {
  display: block;
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* General Buttons */
button {
  font-family: var(--font-body);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--emerald-glow);
  transition: var(--transition-normal);
  text-decoration: none;
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--emerald-400), var(--emerald-500));
  box-shadow: var(--shadow-glow-emerald);
  transform: translateY(-2px);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-ghost:hover {
  color: var(--text-main);
  background: var(--bg-glass-strong);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-400);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(244, 63, 94, 0.3);
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-danger:hover {
  background: var(--rose-500);
  color: #fff;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--emerald-400);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0.2rem 0.4rem;
}
.btn-link:hover {
  color: var(--cyan-400);
  text-decoration: underline;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.08rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

.btn-accent-glow {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--amber-glow);
  transition: var(--transition-normal);
}
.btn-accent-glow:hover {
  box-shadow: 0 0 25px var(--amber-glow);
  transform: translateY(-2px);
}

.gradient-text {
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   VIEW 1: HERO / LANDING PAGE
   ========================================================================== */
.hero-wrapper {
  max-width: 980px;
  margin: 2.5rem auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--emerald-400);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: pulseGlow 3s infinite ease-in-out;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.1); }
  50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.3); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.hero-subtitle strong {
  color: var(--emerald-400);
  font-weight: 600;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3.5rem;
}

.hero-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  width: 100%;
  margin-bottom: 3rem;
  text-align: left;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--emerald-400), transparent);
  opacity: 0;
  transition: var(--transition-fast);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}
.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.85rem;
}
.feature-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}
.feature-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-curriculum-strip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  background: rgba(30, 41, 59, 0.35);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}
.strip-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 600;
}
.strip-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tag-pill {
  font-size: 0.78rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.tag-pill.active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--emerald-400);
}
.tag-pill.upcoming {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}

/* ==========================================================================
   VIEW 2: ONBOARDING WIZARD
   ========================================================================== */
.onboarding-container {
  max-width: 860px;
  margin: 1.5rem auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
}

.wizard-header {
  margin-bottom: 2.5rem;
}
.wizard-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 680px;
  margin: 0 auto;
}
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-subtle);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}
.step-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: var(--transition-fast);
}
.wizard-step.active .step-circle {
  background: var(--emerald-500);
  border-color: var(--emerald-400);
  color: #fff;
  box-shadow: 0 0 12px var(--emerald-glow);
}
.wizard-step.active .step-name {
  color: var(--emerald-400);
}
.wizard-step.completed .step-circle {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-400);
  color: var(--emerald-400);
}
.step-divider {
  flex: 1;
  height: 2px;
  background: var(--border-subtle);
  margin: 0 0.5rem -1.2rem;
}

.wizard-step-content {
  display: none;
  animation: fadeInStep 0.3s ease-out forwards;
}
.wizard-step-content.active {
  display: block;
}
@keyframes fadeInStep {
  from { opacity: 0; transform: translateX(15px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-prompt {
  text-align: center;
  margin-bottom: 2rem;
}
.prompt-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-400);
  margin-bottom: 0.5rem;
}
.prompt-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.prompt-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}
.prompt-desc em {
  color: var(--cyan-400);
  font-style: normal;
  font-weight: 600;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}
.selection-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.selection-grid-topics {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.select-card {
  background: rgba(30, 41, 59, 0.4);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}
.select-card:hover:not(.disabled) {
  border-color: var(--border-glass);
  background: rgba(30, 41, 59, 0.75);
  transform: translateY(-3px);
}
.select-card.selected {
  border-color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}
.select-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-style: dashed;
}

/* Starting Point Topic Card in Onboarding */
.starting-topic-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: rgba(30, 41, 59, 0.5);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-fast);
}
.starting-topic-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: var(--border-glass);
  transform: translateX(4px);
}
.starting-topic-card.selected {
  border-color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}
.starting-topic-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.starting-topic-info h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.starting-topic-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.starting-prereq-note {
  font-size: 0.76rem;
  color: var(--cyan-400);
  font-weight: 600;
  margin-top: 0.25rem;
}
.starting-topic-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}
.starting-topic-card.selected .starting-topic-badge {
  background: var(--emerald-500);
  color: #fff;
}

.select-icon {
  font-size: 2.2rem;
}
.select-info h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.select-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.card-status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}
.card-status-pill.ready {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.card-status-pill.upcoming {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   VIEW 3: DASHBOARD
   ========================================================================== */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
}

.dashboard-greeting-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}
.greeting-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--emerald-400);
  margin-bottom: 0.4rem;
}
.greeting-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.greeting-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 580px;
}

.greeting-stats-quick {
  display: flex;
  gap: 1.5rem;
}
.quick-stat-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  text-align: center;
  min-width: 120px;
}
.quick-stat-item .stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--emerald-400);
  line-height: 1.1;
}
.quick-stat-item .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.75rem;
}

.dash-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.dash-card-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}
.dash-card-badge.mission-badge {
  color: var(--amber-400);
}
.dash-card-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-400);
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.current-topic-body {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.current-topic-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.current-topic-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.current-topic-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.topic-progress-wrapper {
  margin-bottom: 1.5rem;
}
.progress-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}
.progress-label {
  color: var(--text-muted);
}
.progress-percent {
  font-weight: 700;
  color: var(--emerald-400);
}
.progress-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald-500), var(--cyan-400));
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--emerald-glow);
}

.current-topic-actions {
  display: flex;
  gap: 0.85rem;
}

/* Mission Card */
.mission-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(245, 158, 11, 0.05));
  border-color: rgba(245, 158, 11, 0.25);
}
.mission-duration {
  font-size: 0.75rem;
  color: var(--amber-400);
  font-weight: 600;
}
.mission-body {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.mission-icon {
  font-size: 1.8rem;
}
.mission-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.mission-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Right Column Cards */
.garden-preview-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}
.garden-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.mini-plant-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  text-align: center;
  transition: var(--transition-fast);
}
.mini-plant-card:hover {
  background: var(--bg-glass-strong);
  border-color: var(--border-glass);
}
.mini-plant-icon {
  font-size: 1.75rem;
  margin-bottom: 0.3rem;
  display: block;
}
.mini-plant-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.mini-plant-mastery {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--emerald-400);
}

.path-mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.path-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.path-mini-item:hover {
  background: var(--bg-glass-strong);
  border-color: var(--border-glass);
}
.path-mini-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.status-pill-mini {
  font-size: 0.7rem;
  font-weight: 700;
}

/* ==========================================================================
   VIEW 4: LEARNING PATH
   ========================================================================== */
.learning-path-container {
  max-width: 1080px;
  margin: 0 auto;
}

.path-hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem 2.5rem;
  margin-bottom: 2.5rem;
}
.path-hero-badge {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-400);
  margin-bottom: 0.4rem;
  display: inline-block;
}
.path-hero-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.path-hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.path-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.status-not-started { background: #94a3b8; }
.status-in-progress { background: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.5); }
.status-almost-mastered { background: #a3e635; }
.status-mastered { background: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.6); }
.status-school-skipped { background: #64748b; }
.status-needs-review { background: #f59e0b; }

/* Topic Cards Roadmap */
.topics-roadmap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.topic-path-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  transition: var(--transition-normal);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.topic-path-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--border-subtle);
  transition: var(--transition-fast);
}
.topic-path-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glass);
  box-shadow: var(--shadow-md);
}

.topic-path-card.mastered {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.04);
}
.topic-path-card.mastered::before {
  background: var(--emerald-400);
}
.topic-path-card.in-progress {
  border-color: rgba(6, 182, 212, 0.35);
}
.topic-path-card.in-progress::before {
  background: var(--cyan-400);
}
.topic-path-card.needs-review {
  border-color: rgba(245, 158, 11, 0.35);
}
.topic-path-card.needs-review::before {
  background: var(--amber-400);
}

.topic-number-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-muted);
}
.topic-path-card.mastered .topic-number-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border-color: rgba(52, 211, 153, 0.3);
}

.topic-main-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.topic-header-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.topic-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.topic-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}
.topic-status-tag.tag-mastered {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.topic-status-tag.tag-almost {
  background: rgba(163, 230, 53, 0.15);
  color: #bef264;
  border: 1px solid rgba(163, 230, 53, 0.3);
}
.topic-status-tag.tag-inprogress {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-400);
  border: 1px solid rgba(34, 211, 238, 0.3);
}
.topic-status-tag.tag-notstarted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}
.topic-status-tag.tag-skipped {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px dashed rgba(148, 163, 184, 0.4);
}
.topic-status-tag.tag-needsreview {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-400);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.topic-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.topic-prereq-badge {
  font-size: 0.76rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}
.topic-prereq-badge.has-prereq-warning {
  color: var(--amber-400);
}
.topic-prereq-badge.prereq-met {
  color: var(--emerald-400);
}

.topic-actions-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  min-width: 180px;
}
.topic-mastery-score-pill {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--emerald-400);
}

/* ==========================================================================
   VIEW 5: LESSON / LEARNING ROOM
   ========================================================================== */
.lesson-layout-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}

.lesson-sidebar {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
}
.lesson-sidebar-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.btn-back-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0.65rem;
  display: block;
}
.btn-back-link:hover {
  color: var(--emerald-400);
}
.sidebar-topic-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.sidebar-topic-badge {
  font-size: 0.75rem;
  color: var(--emerald-400);
  font-weight: 600;
}

.sublessons-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.sublesson-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.84rem;
  color: var(--text-muted);
  text-align: left;
}
.sublesson-nav-item:hover {
  background: var(--bg-glass-strong);
  color: var(--text-main);
}
.sublesson-nav-item.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--border-active);
  color: var(--text-main);
  font-weight: 700;
}
.sublesson-nav-item.completed .nav-check {
  color: var(--emerald-400);
}

.sidebar-action-box {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Lesson Content Area */
.lesson-content-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.sublesson-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}
.sublesson-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.sublesson-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--emerald-400);
  line-height: 1;
}
.sublesson-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}
.sublesson-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sublesson-time-pill {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

/* Lesson Content Formatting */
.lesson-body-render {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-main);
  margin-bottom: 3rem;
}
.lesson-body-render h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: #fff;
}
.lesson-body-render p {
  margin-bottom: 1.25rem;
  color: #cbd5e1;
}

.concept-callout {
  background: rgba(16, 185, 129, 0.08);
  border-left: 4px solid var(--emerald-400);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.concept-callout-title {
  font-weight: 700;
  color: var(--emerald-400);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.formula-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin: 1.5rem 0;
  overflow-x: auto;
}
.formula-display {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25rem 0;
}
.formula-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Responsive Math Image Fallback for Highly Complex Formulas/Diagrams */
.math-image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 0;
  text-align: center;
}
.math-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.5rem auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.5rem;
  border: 1px solid var(--border-subtle);
}
.math-image-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Human-Readable System of Equations Box */
.system-equations-box {
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 1.25rem 0.75rem 1.5rem;
  margin: 0.75rem 0;
  background: rgba(15, 23, 42, 0.65);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--emerald-400);
  font-family: var(--font-display), var(--font-body), sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: #f8fafc;
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.system-eq-line {
  display: block;
  letter-spacing: 0.02em;
  color: #f1f5f9;
  line-height: 1.4;
}

.example-box {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.example-header {
  font-weight: 700;
  color: var(--amber-400);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.step-toggle-btn {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--cyan-400);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.step-toggle-btn:hover {
  text-decoration: underline;
}
.example-steps {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.92rem;
  color: #94a3b8;
}

.sublesson-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   VIEW 6: PRACTICE, QUIZ & SCRATCHPAD
   ========================================================================== */
.quiz-container {
  max-width: 860px;
  margin: 0 auto;
}

.quiz-box-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.quiz-topic-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.quiz-mode-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.quiz-counter-pill {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan-400);
  background: var(--bg-tertiary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.quiz-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 2rem;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald-500), var(--cyan-400));
  transition: width 0.4s ease;
}

.question-main-card {
  margin-bottom: 1.5rem;
}
.question-difficulty-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.diff-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.diff-basic { background: #10b981; }
.diff-intermediate { background: #f59e0b; }
.diff-application { background: #f43f5e; }

.question-text {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1.75rem;
  color: #fff;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.quiz-opt-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.4);
  border: 2px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
}
.quiz-opt-btn:hover:not(.locked) {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-glass);
  transform: translateX(4px);
}
.quiz-opt-btn.selected {
  border-color: var(--cyan-400);
  background: rgba(6, 182, 212, 0.12);
}
.quiz-opt-btn.correct {
  border-color: var(--emerald-400) !important;
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399;
}
.quiz-opt-btn.incorrect {
  border-color: var(--rose-400) !important;
  background: rgba(244, 63, 94, 0.18) !important;
  color: #fb7185;
}

.opt-prefix {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.quiz-opt-btn.selected .opt-prefix {
  background: var(--cyan-500);
  color: #fff;
  border-color: var(--cyan-400);
}
.quiz-opt-btn.correct .opt-prefix {
  background: var(--emerald-500);
  color: #fff;
  border-color: var(--emerald-400);
}
.quiz-opt-btn.incorrect .opt-prefix {
  background: var(--rose-500);
  color: #fff;
  border-color: var(--rose-400);
}

.quiz-explanation-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  animation: fadeInStep 0.3s ease-out;
}
.explanation-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.explanation-status.correct { color: var(--emerald-400); }
.explanation-status.incorrect { color: var(--rose-400); }
.explanation-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   SCRATCHPAD (KERTAS CORET-CORET CANVAS)
   ========================================================================== */
.scratchpad-wrapper {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}
.scratchpad-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid var(--border-subtle);
}
.scratchpad-title-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}
.scratchpad-badge {
  font-size: 0.7rem;
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-400);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.btn-scratchpad-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-scratchpad-toggle:hover {
  color: var(--emerald-400);
}

.scratchpad-body {
  padding: 0.85rem 1.25rem 1.25rem;
  transition: all 0.3s ease;
}
.scratchpad-body.collapsed {
  display: none;
}

.scratchpad-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
}
.tool-group {
  display: flex;
  gap: 0.35rem;
}
.tool-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}
.tool-btn.active {
  background: var(--emerald-500);
  border-color: var(--emerald-400);
  color: #fff;
  box-shadow: 0 0 10px var(--emerald-glow);
}
.tool-divider {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
}

.tool-colors {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}
.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.color-swatch:hover {
  transform: scale(1.15);
}
.color-swatch.active {
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  transform: scale(1.15);
}

.tool-sizes {
  display: flex;
  gap: 0.3rem;
}
.size-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.size-btn.active {
  background: var(--bg-glass-strong);
  border-color: var(--cyan-400);
  color: var(--cyan-400);
}

.tool-actions-right {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
}
.tool-btn-action {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}
.tool-btn-action:hover {
  background: var(--bg-glass-strong);
  color: var(--text-main);
}
.btn-clear-canvas:hover {
  background: rgba(244, 63, 94, 0.2);
  color: var(--rose-400);
  border-color: rgba(244, 63, 94, 0.4);
}

.canvas-container {
  position: relative;
  width: 100%;
  height: 240px;
  background-color: #0c1220;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.scratchpad-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}
.canvas-watermark {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.18);
  pointer-events: none;
  font-weight: 600;
}

.quiz-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}
.btn-ai-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: var(--indigo-400);
  font-weight: 600;
  font-size: 0.84rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-ai-hint:hover {
  background: rgba(99, 102, 241, 0.25);
  box-shadow: 0 0 15px var(--indigo-glow);
}
.quiz-nav-actions {
  display: flex;
  gap: 0.75rem;
}

/* Quiz Result Card */
.quiz-result-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  animation: fadeInView 0.4s ease-out;
}
.result-celebration-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}
.result-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--emerald-400);
  text-transform: uppercase;
}
.result-topic-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.mastery-score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.score-circular-badge {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2), rgba(15, 23, 42, 0.8));
  border: 3px solid var(--emerald-400);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-emerald);
}
.score-huge-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.score-label {
  font-size: 0.72rem;
  color: var(--emerald-400);
  font-weight: 700;
  text-transform: uppercase;
}

.mastery-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--emerald-400);
}

.result-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.res-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}
.res-stat-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}
.res-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.result-feedback-message {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 2.25rem;
  line-height: 1.5;
}
.result-actions-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ==========================================================================
   VIEW 7: KNOWLEDGE GARDEN
   ========================================================================== */
.garden-container {
  max-width: 1140px;
  margin: 0 auto;
}

.garden-hero-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
}
.garden-hero-badge {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-400);
  display: inline-block;
  margin-bottom: 0.4rem;
}
.garden-hero-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.garden-hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 580px;
}

.garden-hero-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.garden-stat-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  text-align: center;
  min-width: 130px;
}
.g-stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--emerald-400);
  display: block;
}
.g-stat-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.garden-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.garden-filter-tabs {
  display: flex;
  gap: 0.4rem;
  background: var(--bg-card);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}
.filter-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}
.filter-tab.active {
  background: var(--emerald-500);
  color: #fff;
  box-shadow: 0 0 10px var(--emerald-glow);
}

.garden-growth-legend {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.garden-plants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.plant-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  text-align: center;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.plant-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glass);
  box-shadow: var(--shadow-md);
}

.plant-stage-visual {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  margin-bottom: 1rem;
  transition: var(--transition-bounce);
}
.plant-card:hover .plant-stage-visual {
  transform: scale(1.1) rotate(5deg);
}

.plant-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.plant-status-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.plant-mastery-meter {
  width: 100%;
  margin-bottom: 1.5rem;
}
.plant-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}
.plant-meter-percent {
  font-weight: 700;
  color: var(--emerald-400);
}

.plant-actions {
  display: flex;
  gap: 0.65rem;
  width: 100%;
}
.plant-actions button {
  flex: 1;
}

/* ==========================================================================
   VIEW 8: PROGRESS & ANALYTICS
   ========================================================================== */
.progress-view-container {
  max-width: 1080px;
  margin: 0 auto;
}
.progress-header-card {
  margin-bottom: 2rem;
}
.progress-header-card h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.progress-header-card p {
  color: var(--text-muted);
}

.analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.metric-icon {
  font-size: 2.2rem;
}
.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}
.metric-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.analytics-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
}
.analytics-table-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.table-responsive {
  overflow-x: auto;
}
.progress-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}
.progress-table th {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
}
.progress-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.progress-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.data-manage-card {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.data-manage-text h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.data-manage-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 580px;
}
.data-manage-btns {
  display: flex;
  gap: 0.75rem;
}

/* ==========================================================================
   MODALS & CUMULATIVE KNOWLEDGE CHECK
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(9, 13, 22, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeInOverlay 0.25s ease-out;
  overflow-y: auto;
}
.modal-overlay.active {
  display: flex;
}
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-card-large {
  max-width: 740px;
}

@keyframes modalScaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.modal-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.prereq-highlight-card {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.prereq-icon {
  font-size: 1.75rem;
}
.prereq-details h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--amber-400);
}
.prereq-details p {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.modal-question {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.prereq-options-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}
.prereq-opt-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
}
.prereq-opt-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--border-glass);
  transform: translateX(4px);
}
.opt-mastered:hover {
  border-color: var(--emerald-400);
}
.opt-btn-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.opt-btn-text {
  flex: 1;
}
.opt-btn-text strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}
.opt-btn-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.opt-btn-arrow {
  color: var(--text-dim);
  font-weight: 700;
}

.modal-footer-close {
  text-align: center;
}

/* ==========================================================================
   CUMULATIVE KNOWLEDGE CHECK SPECIFIC STYLES
   ========================================================================== */
.ckc-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.ckc-topics-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}
.ckc-topic-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.ckc-card-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.ckc-topic-icon {
  font-size: 1.5rem;
}
.ckc-topic-name {
  font-weight: 700;
  font-size: 0.95rem;
}
.ckc-q-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan-400);
  background: rgba(6, 182, 212, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.ckc-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ckc-current-topic-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-400);
  background: rgba(6, 182, 212, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.35rem;
}

/* Breakdown Results */
.ckc-result-header {
  text-align: center;
  margin-bottom: 2rem;
}
.ckc-result-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}
.ckc-results-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}
.ckc-breakdown-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.ckc-breakdown-card.mastered {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}
.ckc-breakdown-card.needs-review {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.ckc-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.ckc-breakdown-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.ckc-breakdown-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}
.ckc-breakdown-badge.mastered {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
}
.ckc-breakdown-badge.needs-review {
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber-400);
}

.ckc-result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ==========================================================================
   AI LEARNING ASSISTANT (FLOATING DRAWER & FAB)
   ========================================================================== */
.ai-assistant-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
}

.ai-fab-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--indigo-500), #4f46e5);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 25px var(--indigo-glow);
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
}
.ai-fab-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
}
.ai-fab-icon {
  font-size: 1.3rem;
}
.ai-fab-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
}
.ai-fab-pulse {
  position: absolute;
  inset: -3px;
  border-radius: var(--radius-full);
  border: 2px solid var(--indigo-400);
  animation: pulseFab 2.5s infinite;
  pointer-events: none;
}
@keyframes pulseFab {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.ai-drawer-card {
  position: fixed;
  bottom: 85px;
  right: 24px;
  width: 380px;
  max-height: 580px;
  height: 80vh;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpDrawer 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ai-drawer-card.active {
  display: flex;
}
@keyframes slideUpDrawer {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.ai-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}
.ai-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--indigo-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.ai-header-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}
.ai-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.ai-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-400);
}
.btn-close-ai {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.btn-close-ai:hover {
  color: var(--text-main);
}

.ai-quick-actions {
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}
.quick-action-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.35rem;
}
.quick-action-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}
.quick-pill {
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}
.quick-pill:hover {
  background: var(--indigo-500);
  color: #fff;
  border-color: var(--indigo-400);
}

.ai-messages-container {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.ai-msg {
  display: flex;
  flex-direction: column;
}
.ai-msg.ai-msg-bot .msg-bubble {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px;
  align-self: flex-start;
}
.ai-msg.ai-msg-user .msg-bubble {
  background: var(--indigo-600, #4f46e5);
  color: #ffffff;
  border-radius: var(--radius-md) var(--radius-md) 4px var(--radius-md);
  align-self: flex-end;
}
.msg-bubble {
  padding: 0.75rem 1rem;
  font-size: 0.86rem;
  line-height: 1.5;
  max-width: 88%;
}

.ai-input-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(30, 41, 59, 0.7);
  border-top: 1px solid var(--border-subtle);
}
.ai-input-bar input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.55rem 1rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
}
.ai-input-bar input:focus {
  border-color: var(--indigo-400);
}
.btn-ai-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--indigo-500);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-ai-send:hover {
  background: var(--indigo-400);
  transform: scale(1.05);
}

/* ==========================================================================
   SETTINGS MODAL & TOAST
   ========================================================================== */
.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}
.settings-group {
  margin-bottom: 1.25rem;
}
.settings-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.input-text {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}
.input-text:focus {
  border-color: var(--emerald-400);
}
.settings-hint {
  display: block;
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}
.settings-info-box {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
}
.settings-danger-zone {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(244, 63, 94, 0.25);
}
.settings-reset-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.btn-danger {
  background: linear-gradient(135deg, var(--rose-500), #e11d48);
  color: #fff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.btn-danger:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}
.btn-danger:active {
  transform: translateY(0);
}

.modal-card-confirm {
  max-width: 440px;
  text-align: center;
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.modal-confirm-icon {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  animation: pulseWarn 1.5s infinite alternate;
}
@keyframes pulseWarn {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}
.modal-confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}
.modal-confirm-actions button {
  flex: 1;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 300;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
  opacity: 0;
  pointer-events: none;
}
.toast-notification.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE DESIGN (320px - 1440px)
   ========================================================================== */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .lesson-layout-container {
    grid-template-columns: 1fr;
  }
  .lesson-sidebar {
    position: static;
  }
  .hero-title {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem 1rem;
  }
  .main-nav .nav-label {
    display: none;
  }
  .curriculum-badge {
    display: none;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .topic-path-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .topic-actions-side {
    align-items: stretch;
  }
  .sublesson-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-greeting-card {
    padding: 1.5rem;
  }
  .garden-hero-card {
    padding: 1.5rem;
  }
  .ai-drawer-card {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 80px;
  }
  .modal-card {
    padding: 1.5rem;
  }
  .canvas-container {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-large {
    width: 100%;
  }
  .greeting-stats-quick {
    width: 100%;
    justify-content: space-between;
  }
  .quiz-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .quiz-nav-actions {
    flex-direction: column;
  }
  .result-stats-row {
    grid-template-columns: 1fr;
  }
  .scratchpad-toolbar {
    gap: 0.4rem;
  }
  .tool-actions-right {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================================
   ENHANCED LEARNING MATERIAL DESIGN SYSTEM
   Structured Sections: Definition, Terms, Properties, Formulas,
   Step-by-Step Examples, Misconceptions, and Summaries.
   ========================================================================== */
.lesson-section-block {
  margin: 2rem 0;
}
.lesson-section-title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--emerald-400);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}
.lesson-section-title.accent-cyan { color: var(--cyan-400); }
.lesson-section-title.accent-amber { color: var(--amber-400); }
.lesson-section-title.accent-rose { color: var(--rose-400); }
.lesson-section-title.accent-indigo { color: var(--indigo-400); }

/* Definition & Core Concept Card */
.definition-card {
  background: rgba(6, 182, 212, 0.06);
  border-left: 4px solid var(--cyan-400);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}
.definition-card p {
  margin-bottom: 0.6rem;
  color: #e2e8f0;
}
.definition-card p:last-child {
  margin-bottom: 0;
}

/* Terms & Glossary Grid */
.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.term-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.term-symbol {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cyan-400);
  font-size: 1.05rem;
}
.term-name {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.term-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Properties & Rules List */
.properties-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.25rem 0;
}
.property-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  transition: var(--transition-fast);
}
.property-card:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}
.property-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.property-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}
.property-formula {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.property-explanation {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.property-why {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  margin-top: 0.5rem;
  border-left: 2px solid var(--emerald-500);
}
.property-example {
  font-size: 0.88rem;
  color: var(--cyan-300);
  margin-top: 0.4rem;
  font-family: var(--font-mono);
}

/* Formula & Usage Block */
.formula-detail-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.formula-main-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cyan-400);
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(6, 182, 212, 0.08);
  border-radius: var(--radius-md);
  border: 1px dashed rgba(6, 182, 212, 0.3);
}
.formula-conditions {
  font-size: 0.88rem;
  color: var(--amber-400);
  margin-top: 0.5rem;
}
.usage-box {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--amber-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.85rem 1.1rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: #fde68a;
}
.usage-title {
  font-weight: 700;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Step-by-Step Problem Breakdown */
.step-item {
  margin: 0.6rem 0;
  padding-left: 0.5rem;
  line-height: 1.6;
}
.step-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.5rem;
  text-transform: uppercase;
}
.step-badge-diketahui { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.step-badge-ditanya { background: rgba(245, 158, 11, 0.2); color: #fde047; }
.step-badge-langkah { background: rgba(16, 185, 129, 0.2); color: #86efac; }
.step-badge-jawaban { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; }

/* Misconception / Common Mistake Warning Card */
.misconception-card {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-left: 4px solid var(--rose-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.misconception-header {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--rose-400);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.misconception-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.misconception-item {
  font-size: 0.9rem;
  color: #fecdd3;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.misconception-item strong {
  color: #fff;
}

/* Summary Card */
.summary-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 1rem;
}
.summary-header {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--indigo-400);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.summary-item {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.6;
  position: relative;
  padding-left: 1.25rem;
}
.summary-item::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--emerald-400);
  font-weight: 700;
}

/* Clean Math Table */
.math-table-container {
  width: 100%;
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.math-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: center;
}
.math-table th {
  background: var(--bg-tertiary);
  color: var(--cyan-400);
  padding: 0.75rem 1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}
.math-table th:last-child {
  border-right: none;
}
.math-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  color: #f1f5f9;
}
.math-table td:last-child {
  border-right: none;
}
.math-table tr:last-child td {
  border-bottom: none;
}
.math-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Prior Knowledge Assessment Modal Custom Styles */
.pka-selected-topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  margin: 0.75rem auto 0;
  color: var(--cyan-400);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}
.pka-pill-icon {
  font-size: 1.35rem;
}
.pka-decision-group {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-top: 1.5rem;
}
.pka-decision-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.15rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(30, 41, 59, 0.45);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-normal);
  width: 100%;
}
.pka-decision-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.pka-decision-card.opt-learned {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}
.pka-decision-card.opt-learned:hover {
  border-color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.14);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}
.pka-decision-card.opt-partial {
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.06);
}
.pka-decision-card.opt-partial:hover {
  border-color: var(--cyan-400);
  background: rgba(6, 182, 212, 0.14);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}
.pka-decision-card.opt-direct {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.06);
}
.pka-decision-card.opt-direct:hover {
  border-color: var(--indigo-400);
  background: rgba(139, 92, 246, 0.14);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}
.pka-decision-icon {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}
.opt-learned .pka-decision-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  font-weight: 800;
}
.opt-partial .pka-decision-icon {
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan-400);
}
.opt-direct .pka-decision-icon {
  background: rgba(139, 92, 246, 0.2);
  color: var(--indigo-400);
}
.pka-decision-text {
  flex: 1;
}
.pka-decision-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: #fff;
}
.pka-decision-text span {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: block;
}
.pka-decision-arrow {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dim);
  transition: var(--transition-fast);
}
.pka-decision-card:hover .pka-decision-arrow {
  color: #fff;
  transform: translateX(4px);
}

/* Granular Prior Material Checklist */
.ckc-granular-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin: 1.5rem 0 2rem;
}
.granular-topic-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(30, 41, 59, 0.5);
  transition: var(--transition-normal);
}
.granular-topic-card.status-learned {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.05);
}
.granular-topic-card.status-unlearned {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.4);
}
.granular-topic-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.granular-topic-icon {
  font-size: 1.5rem;
}
.granular-topic-title {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.15rem;
}
.granular-topic-status-label {
  font-size: 0.8rem;
  font-weight: 600;
}
.status-learned .granular-topic-status-label {
  color: var(--emerald-400);
}
.status-unlearned .granular-topic-status-label {
  color: var(--text-muted);
}
.granular-topic-controls {
  display: flex;
  gap: 0.5rem;
}
.granular-choice-btn {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.granular-choice-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.granular-choice-btn.active.btn-choice-learned {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-400);
  color: var(--emerald-400);
}
.granular-choice-btn.active.btn-choice-unlearned {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--amber-400);
  color: var(--amber-400);
}

/* All Skipped Notice */
.all-skipped-box {
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(30, 41, 59, 0.45);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.75rem;
}
.all-skipped-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}
.all-skipped-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.all-skipped-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ==========================================================================
   VERTICAL MATH FRACTIONS & HIGH-DEFINITION MATH NOTATION
   ========================================================================== */
.math-fraction {
  display: inline-flex;
  flex-direction: column;
  vertical-align: -0.45em;
  text-align: center;
  padding: 0 0.2em;
  font-size: 0.94em;
  line-height: 1;
  margin: 0 0.15em;
  font-family: inherit;
  user-select: text;
}
.math-fraction .math-numerator {
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 0.12em;
  margin-bottom: 0.12em;
  display: block;
  text-align: center;
  font-size: 0.88em;
}
.math-fraction .math-denominator {
  padding-top: 0.12em;
  display: block;
  text-align: center;
  font-size: 0.88em;
}

/* Superscripts & Exponents */
.math-sup, sup {
  font-size: 0.78em;
  vertical-align: super;
  line-height: 0;
  position: relative;
  top: -0.42em;
  font-weight: 600;
  margin-left: 0.04em;
}
.math-sub, sub {
  font-size: 0.78em;
  vertical-align: sub;
  line-height: 0;
  position: relative;
  bottom: -0.22em;
  font-weight: 600;
  margin-left: 0.04em;
}

/* Exponent nested fraction */
.math-sup .math-fraction {
  font-size: 0.75em;
  vertical-align: middle;
  margin: 0 0.1em;
}

/* Roots / Radicals */
.math-root {
  display: inline-flex;
  align-items: baseline;
  margin: 0 0.1em;
}
.math-root-symbol {
  font-size: 1.1em;
  margin-right: 0.05em;
  font-weight: 700;
}




