/* ===== DESIGN TOKENS ===== */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem;
  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
  --radius-xl: 1rem; --radius-full: 9999px;
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
}

/* ===== DARK MODE (DEFAULT): warm graphite + terracotta ===== */
:root, [data-theme="dark"] {
  --color-bg: #161412; --color-surface: #1f1c19; --color-surface-2: #26221e;
  --color-surface-offset: #1a1816; --color-surface-offset-2: #2c2723;
  --color-surface-dynamic: #353029; --color-divider: #38322b;
  --color-border: #4a4238;
  --color-text: #efe9e1; --color-text-muted: #a89f94; --color-text-faint: #7a7166;
  --color-text-inverse: #161412;
  --color-on-primary: #1a110b;
  --color-primary: #e2703a; --color-primary-hover: #f08650;
  --color-primary-active: #c95a27; --color-primary-highlight: rgba(226,112,58,0.13);
  --color-sage: #93b08d; --color-sage-highlight: rgba(147,176,141,0.14);
  --color-gold: #e0b04a; --color-gold-hover: #c99a38;
  --color-gold-highlight: rgba(224,176,74,0.13);
  --color-error: #f0788a; --color-error-hover: #e0526e;
  --color-error-highlight: rgba(240,120,138,0.12);
  --color-success: #6fcf8f; --color-success-hover: #58bb7a;
  --color-success-highlight: rgba(111,207,143,0.12);
  --color-warning: #e8b84a; --color-blue: #7fa8d8;
  --color-purple: #b39ad8; --color-orange: #e8913f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3); --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

/* ===== LIGHT MODE: warm paper ===== */
[data-theme="light"] {
  --color-bg: #f6f1e9; --color-surface: #fffdf9; --color-surface-2: #faf6ee;
  --color-surface-offset: #efe8dc; --color-surface-offset-2: #e8dfd0;
  --color-surface-dynamic: #ddd3c2; --color-divider: #ddd2c0;
  --color-border: #c9bca6;
  --color-text: #2a2420; --color-text-muted: #6a5f54; --color-text-faint: #8f8374;
  --color-text-inverse: #ffffff;
  --color-on-primary: #ffffff;
  --color-primary: #b8431a; --color-primary-hover: #9c3714;
  --color-primary-active: #832d10; --color-primary-highlight: rgba(184,67,26,0.09);
  --color-sage: #55744f; --color-sage-highlight: rgba(85,116,79,0.12);
  --color-gold: #a67c00; --color-gold-hover: #8a6700;
  --color-gold-highlight: rgba(166,124,0,0.1);
  --color-error: #c8234f; --color-error-hover: #a81a40;
  --color-error-highlight: rgba(200,35,79,0.08);
  --color-success: #1d7a3e; --color-success-hover: #166a34;
  --color-success-highlight: rgba(29,122,62,0.09);
  --color-warning: #a56a00; --color-blue: #2a5fa8;
  --color-purple: #6b3fb5; --color-orange: #b85a0c;
  --shadow-sm: 0 1px 2px rgba(60,40,20,0.08); --shadow-md: 0 4px 12px rgba(60,40,20,0.10);
  --shadow-lg: 0 12px 32px rgba(60,40,20,0.14);
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; height: 100%; }
body { height: 100%; font-family: var(--font-body); font-size: var(--text-sm);
  color: var(--color-text); background: var(--color-bg); line-height: 1.6; }
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.2; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }
::selection { background: rgba(226,112,58,0.25); }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

/* ===== APP SHELL ===== */
.app-shell { display: grid; grid-template-columns: 1fr;
  grid-template-rows: 1fr; height: 100dvh; overflow: hidden; position: fixed; top:0; left:0; right:0; bottom:0; }

/* Desktop: sidebar is fixed left, app-shell gets left margin */
@media (min-width: 769px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-width); z-index: 100; }
  .app-shell { margin-left: var(--sidebar-width); }
}

/* ===== SIDEBAR ===== */
.sidebar { grid-row: 1/-1; background: var(--color-surface); border-right: 1px solid var(--color-divider);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  transition: width var(--transition-interactive); z-index: 50; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--space-4); }
.logo-wrap { display: flex; align-items: center; gap: var(--space-2); }
.logo-icon { flex-shrink: 0; }
.logo-text { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; }
.sidebar-collapse-btn { width: 36px; height: 36px; display: flex; align-items: center;
  justify-content: center; border-radius: var(--radius-md); color: var(--color-text-muted);
  transition: all var(--transition-interactive); }
.sidebar-collapse-btn:hover { background: var(--color-surface-dynamic); color: var(--color-text); }

.sidebar-user { display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); margin: 0 var(--space-2);
  border-radius: var(--radius-lg); background: var(--color-surface-offset); }
.user-avatar { width: 40px; height: 40px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), var(--color-sage));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--text-sm); color: var(--color-on-primary); flex-shrink: 0; }
.user-info { overflow: hidden; }
.user-name { font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.user-level { font-size: var(--text-xs); color: var(--color-text-muted); }

.sidebar-xp { padding: var(--space-3) var(--space-4); margin: var(--space-2) var(--space-2) 0; }
.xp-label { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-1);
  display: flex; justify-content: space-between; }
.xp-bar { height: 6px; background: var(--color-surface-dynamic); border-radius: var(--radius-full);
  overflow: hidden; }
.xp-fill { height: 100%; background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
  border-radius: var(--radius-full); transition: width 0.6s cubic-bezier(0.16,1,0.3,1); }

.sidebar-nav { list-style: none; padding: var(--space-4) var(--space-2); flex: 1; }
/* Items gated by role start hidden, then JS (updateSidebar) shows them based
   on the user's role. Prevents a flash of items the user shouldn't see. */
.sidebar-nav li[data-roles] { display: none; }
.nav-item { display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg);
  font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted);
  transition: all var(--transition-interactive); min-height: 44px; }
.nav-item:hover { background: var(--color-surface-dynamic); color: var(--color-text); }
.nav-item.active { background: var(--color-primary-highlight); color: var(--color-primary); font-weight: 600; }
.nav-item svg { flex-shrink: 0; }

.sidebar-footer { padding: var(--space-4); border-top: 1px solid var(--color-divider);
  display: flex; align-items: center; justify-content: space-between; }
.streak-badge { display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1) var(--space-3); background: var(--color-gold-highlight);
  border: 1px solid rgba(240,192,64,0.2); border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 700; color: var(--color-gold); }
.streak-icon { color: var(--color-gold); flex-shrink: 0; }
.theme-toggle-btn { width: 40px; height: 40px; display: flex; align-items: center;
  justify-content: center; border-radius: var(--radius-full);
  color: var(--color-text-muted); transition: all var(--transition-interactive); }
.theme-toggle-btn:hover { background: var(--color-surface-dynamic); color: var(--color-text); }

/* ===== MAIN CONTENT ===== */
.main-content { overflow-y: auto; overscroll-behavior: contain;
  padding: var(--space-6) var(--space-8); }

/* ===== MOBILE NAV ===== */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--color-surface); border-top: 1px solid var(--color-divider);
  z-index: 100; padding: var(--space-2) 0 max(var(--space-2), env(safe-area-inset-bottom)); }
.mobile-nav { display: none; grid-template-columns: repeat(5,1fr); }
.mobile-nav-item { display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: var(--space-1); font-size: 10px; color: var(--color-text-faint);
  transition: color var(--transition-interactive); min-height: 44px; justify-content: center; }
.mobile-nav-item.active { color: var(--color-primary); }

/* ===== AUTH SCREEN ===== */
.auth-screen { min-height: 100dvh; display: flex; align-items: center;
  justify-content: center; padding: var(--space-6); background: var(--color-bg); overflow-y: auto;
  position: relative; z-index: 200; }
.auth-view { width: 100%; max-width: 440px; animation: fadeIn 0.4s ease; }
.auth-card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-8); box-shadow: var(--shadow-lg); }
.auth-card.assessment-card { max-width: 680px; width: 100%; }
#assessment-view { max-width: 680px; }
#assessment-view:has(.assessment-wide) { max-width: 820px; }
.auth-logo { display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-2); }
.auth-logo h1 { font-size: var(--text-xl); font-weight: 800; }
.auth-subtitle { color: var(--color-text-muted); font-size: var(--text-sm);
  margin-bottom: var(--space-6); }
.auth-switch { text-align: center; font-size: var(--text-sm);
  color: var(--color-text-muted); margin-top: var(--space-5); }
.auth-error { color: var(--color-error); font-size: var(--text-xs);
  margin-top: var(--space-3); text-align: center; min-height: 20px; }

.form-group { margin-bottom: var(--space-4); }
.form-group label { display: block; font-size: var(--text-xs); font-weight: 600;
  color: var(--color-text-muted); margin-bottom: var(--space-1);
  text-transform: uppercase; letter-spacing: 0.04em; }
.form-group input, .form-group select { width: 100%; padding: var(--space-3);
  background: var(--color-surface-offset); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); font-size: var(--text-sm); min-height: 44px;
  transition: border-color var(--transition-interactive); }
.form-group input:focus, .form-group select:focus { border-color: var(--color-primary);
  outline: 2px solid var(--color-primary-highlight); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2); padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600;
  transition: all var(--transition-interactive); min-height: 44px; white-space: nowrap; }
.btn-primary { background: var(--color-primary); color: var(--color-text-inverse); }
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--color-surface-dynamic); color: var(--color-text);
  border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-surface-offset-2); }
.btn-ghost { background: transparent; color: var(--color-primary); }
.btn-ghost:hover { background: var(--color-primary-highlight); }
.btn-danger { background: var(--color-error); color: #fff; }
.btn-gold { background: var(--color-gold); color: #1a1410; font-weight: 700; }
.btn-full { width: 100%; }
.btn-sm { padding: var(--space-1) var(--space-3); min-height: 32px; font-size: var(--text-xs); }

/* ===== ASSESSMENT ===== */
.assessment-choice { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4);
  margin-top: var(--space-4); }
.choice-card { background: var(--color-surface-offset); border: 2px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6); text-align: center;
  transition: all var(--transition-interactive); cursor: pointer; }
.choice-card:hover { border-color: var(--color-primary); background: var(--color-primary-highlight); }
.choice-icon { font-size: 2rem; margin-bottom: var(--space-3); }
.choice-card h3 { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--space-2); }
.choice-card p { font-size: var(--text-xs); color: var(--color-text-muted); }

/* Assessment slider items */
.assess-item { display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4); background: var(--color-surface-offset);
  border-radius: var(--radius-md); margin-bottom: var(--space-2); }
.assess-item label { font-size: var(--text-sm); font-weight: 500; flex: 1; }
.assess-slider-wrap { display: flex; align-items: center; gap: var(--space-3); min-width: 220px; }
.assess-slider { -webkit-appearance: none; appearance: none; width: 140px; height: 6px;
  border-radius: var(--radius-full); background: var(--color-surface-dynamic); outline: none; cursor: pointer; }
.assess-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: var(--radius-full);
  background: var(--color-primary); cursor: pointer; border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 3px var(--color-primary-highlight); }
.assess-slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: var(--radius-full);
  background: var(--color-primary); cursor: pointer; border: 2px solid var(--color-bg); }
.assess-slider-value { font-size: var(--text-sm); font-weight: 700; color: var(--color-primary);
  width: 28px; text-align: center; }

.assess-rating { display: flex; gap: var(--space-1); }
.assess-rating button { width: 36px; height: 36px; border-radius: var(--radius-md);
  font-size: var(--text-xs); font-weight: 700; background: var(--color-surface-dynamic);
  color: var(--color-text-muted); transition: all var(--transition-interactive); }
.assess-rating button.selected { background: var(--color-primary); color: var(--color-text-inverse); }
.assess-rating button:hover { background: var(--color-primary-highlight); color: var(--color-primary); }

/* Learning path cards */
.path-item { display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4); background: var(--color-surface-offset);
  border-radius: var(--radius-lg); margin-bottom: var(--space-3);
  border-left: 4px solid var(--color-primary);
  transition: all var(--transition-interactive);
  cursor: grab; animation: slideUp 0.3s ease both; }
.path-item:hover { transform: translateX(4px); background: var(--color-surface-dynamic); }
.path-item .path-num { width: 32px; height: 32px; border-radius: var(--radius-full);
  background: var(--color-primary); color: var(--color-text-inverse);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700; flex-shrink: 0; }
.path-item .path-info { flex: 1; }
.path-item .path-title { font-size: var(--text-sm); font-weight: 600; }
.path-item .path-desc { font-size: var(--text-xs); color: var(--color-text-muted); }
.path-item .path-priority { font-size: 11px; font-weight: 700; padding: 2px var(--space-2);
  border-radius: var(--radius-full); flex-shrink: 0; }
.path-item .path-priority.high { background: var(--color-error-highlight); color: var(--color-error); border-left-color: var(--color-error); }
.path-item .path-priority.medium { background: var(--color-gold-highlight); color: var(--color-gold); border-left-color: var(--color-warning); }
.path-item .path-priority.low { background: var(--color-success-highlight); color: var(--color-success); border-left-color: var(--color-success); }
.path-item.priority-high { border-left-color: var(--color-error); }
.path-item.priority-medium { border-left-color: var(--color-warning); }
.path-item.priority-low { border-left-color: var(--color-success); }
.path-actions { display: flex; gap: var(--space-3); margin-top: var(--space-6); justify-content: center; }

/* ===== PAGE HEADER ===== */
.page-header { margin-bottom: var(--space-8); }
.page-title { font-size: var(--text-xl); font-weight: 800; margin-bottom: var(--space-1); }
.page-subtitle { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ===== KPI CARDS ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4); margin-bottom: var(--space-8); }
.kpi-card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-5);
  transition: all var(--transition-interactive); }
.kpi-card:hover { border-color: var(--color-primary); transform: translateY(-2px);
  box-shadow: var(--shadow-md); }
.kpi-label { font-size: var(--text-xs); color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--space-1); }
.kpi-value { font-family: var(--font-display); font-size: var(--text-xl);
  font-weight: 800; font-variant-numeric: tabular-nums lining-nums; }
.kpi-delta { font-size: var(--text-xs); font-weight: 600; margin-top: var(--space-1); }
.kpi-delta.positive { color: var(--color-success); }
.kpi-delta.negative { color: var(--color-error); }
.kpi-delta.neutral { color: var(--color-text-muted); }

/* ===== CHARTS ===== */
.chart-section { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6);
  margin-bottom: var(--space-8); }
.chart-card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6); }
.chart-title { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--space-4);
  font-family: var(--font-display); }
.chart-container { position: relative; width: 100%; }

/* ===== STRENGTHS TABLE ===== */
.strengths-table { width: 100%; border-collapse: collapse; }
.strengths-table th { text-align: left; font-size: var(--text-xs);
  color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em;
  padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-divider); }
.strengths-table td { padding: var(--space-3); font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-divider); }
.strength-bar { height: 6px; border-radius: var(--radius-full);
  background: var(--color-surface-dynamic); overflow: hidden; min-width: 80px; }
.strength-fill { height: 100%; border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1); }
.strength-strong { background: var(--color-success); }
.strength-developing { background: var(--color-warning); }
.strength-weak { background: var(--color-error); }
.status-badge { display: inline-flex; padding: 2px var(--space-2);
  border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }
.status-strong { background: var(--color-success-highlight); color: var(--color-success); }
.status-developing { background: var(--color-gold-highlight); color: var(--color-gold); }
.status-weak { background: var(--color-error-highlight); color: var(--color-error); }

/* ===== ACTIVITY FEED ===== */
.activity-feed { margin-bottom: var(--space-8); }
.activity-item { display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  transition: background var(--transition-interactive); }
.activity-item:hover { background: var(--color-surface-offset); }
.activity-icon { width: 32px; height: 32px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; }
.activity-text { flex: 1; font-size: var(--text-sm); }
.activity-time { font-size: var(--text-xs); color: var(--color-text-faint); }
.activity-xp { font-size: var(--text-xs); font-weight: 700; color: var(--color-primary); }

/* ===== HEATMAP ===== */
.heatmap-container { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6); margin-bottom: var(--space-8); }
.heatmap-grid { display: flex; gap: 3px; overflow-x: auto; padding-bottom: var(--space-2); }
.heatmap-week { display: flex; flex-direction: column; gap: 3px; }
.heatmap-cell { width: 14px; height: 14px; border-radius: 3px;
  background: var(--color-surface-dynamic); transition: all var(--transition-interactive); }
.heatmap-cell[data-level="1"] { background: rgba(226,112,58,0.2); }
.heatmap-cell[data-level="2"] { background: rgba(226,112,58,0.4); }
.heatmap-cell[data-level="3"] { background: rgba(226,112,58,0.65); }
.heatmap-cell[data-level="4"] { background: var(--color-primary); }

/* ===== RECOMMENDATION CARDS ===== */
.reco-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4); margin-bottom: var(--space-8); }
.reco-card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-5);
  border-left: 3px solid var(--color-warning); }
.reco-card h4 { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--space-2); }
.reco-card p { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; }

/* ===== COURSES PAGE ===== */
.courses-grid { display: flex; flex-direction: column; gap: var(--space-8); }
.section-block { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); overflow: hidden; }
.section-header { padding: var(--space-5) var(--space-6); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: background var(--transition-interactive); }
.section-header:hover { background: var(--color-surface-offset); }
.section-header h3 { font-size: var(--text-lg); font-weight: 700;
  display: flex; align-items: center; gap: var(--space-3); }
.section-icon { width: 40px; height: 40px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.section-icon.quant { background: var(--color-primary-highlight); }
.section-icon.verbal { background: rgba(167,139,250,0.12); }
.section-progress { display: flex; align-items: center; gap: var(--space-3); }
.section-progress-bar { width: 120px; height: 6px; background: var(--color-surface-dynamic);
  border-radius: var(--radius-full); overflow: hidden; }
.section-progress-fill { height: 100%; border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16,1,0.3,1); }
.section-progress-text { font-size: var(--text-xs); color: var(--color-text-muted);
  font-weight: 600; min-width: 36px; }
.section-chevron { color: var(--color-text-faint); transition: transform var(--transition-interactive); }
.section-header.open .section-chevron { transform: rotate(180deg); }

.subsections { padding: 0 var(--space-6) var(--space-6); display: none; }
.subsections.open { display: block; }
.subsection-card { display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface-offset); margin-bottom: var(--space-2);
  cursor: pointer; transition: all var(--transition-interactive); }
.subsection-card:hover { background: var(--color-surface-dynamic); transform: translateX(4px); }
.subsection-num { width: 28px; height: 28px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700; flex-shrink: 0; }
.subsection-info { flex: 1; }
.subsection-title { font-size: var(--text-sm); font-weight: 600; }
.subsection-topics { font-size: var(--text-xs); color: var(--color-text-muted); }
.subsection-badge { font-size: var(--text-xs); font-weight: 600;
  padding: 2px var(--space-2); border-radius: var(--radius-full); }

/* ===== LESSON VIEW ===== */
.lesson-container { max-width: 800px; margin: 0 auto; }
.lesson-header { margin-bottom: var(--space-8); }
.lesson-breadcrumb { font-size: var(--text-xs); color: var(--color-text-muted);
  margin-bottom: var(--space-3); }
.lesson-breadcrumb a { color: var(--color-primary); }

/* Lesson progress bar at top */
.lesson-progress-bar { position: sticky; top: 0; z-index: 10; height: 4px;
  background: var(--color-surface-dynamic); margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-8)) var(--space-6);
  overflow: hidden; }
.lesson-progress-fill { height: 100%; background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
  transition: width 0.4s cubic-bezier(0.16,1,0.3,1); }

.lesson-content { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-8); margin-bottom: var(--space-6); }
.lesson-content h2 { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-4);
  color: var(--color-primary); }
.lesson-content h3 { font-size: var(--text-base); font-weight: 700; margin: var(--space-6) 0 var(--space-3); }
.lesson-content p { font-size: var(--text-sm); color: var(--color-text); line-height: 1.7;
  margin-bottom: var(--space-4); max-width: 72ch; }
.lesson-content ul, .lesson-content ol { margin: var(--space-2) 0 var(--space-4) var(--space-6);
  font-size: var(--text-sm); line-height: 1.8; }

/* Lesson section nav */
.lesson-section-nav { display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-4) var(--space-5); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  margin-bottom: var(--space-4); }
.lesson-section-nav .section-dots { display: flex; gap: var(--space-2); }
.lesson-section-nav .section-dot { width: 8px; height: 8px; border-radius: var(--radius-full);
  background: var(--color-surface-dynamic); transition: all var(--transition-interactive); cursor: pointer; }
.lesson-section-nav .section-dot.active { background: var(--color-primary); width: 24px; }
.lesson-section-nav .section-dot.completed { background: var(--color-success); }
.lesson-est-time { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ===== FORMULA BOX with animation ===== */
.formula-box { background: var(--color-surface-offset); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5);
  margin: var(--space-4) 0; font-family: 'Inter', monospace; font-size: var(--text-sm);
  border-left: 3px solid var(--color-primary);
  animation: slideInLeft 0.5s cubic-bezier(0.16,1,0.3,1) both;
  position: relative; overflow: hidden; }
.formula-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(226,112,58,0.05), transparent);
  pointer-events: none; }

/* ===== EXAMPLE BOX with fade-in ===== */
.example-box { background: var(--color-primary-highlight); border: 1px solid rgba(226,112,58,0.2);
  border-radius: var(--radius-lg); padding: var(--space-5); margin: var(--space-4) 0;
  animation: fadeInUp 0.4s ease both; animation-delay: 0.1s; }
.example-box .example-label { font-size: var(--text-xs); font-weight: 700;
  color: var(--color-primary); text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: var(--space-2); }

/* ===== TIP BOX ===== */
.tip-box { background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.2);
  border-radius: var(--radius-lg); padding: var(--space-5); margin: var(--space-4) 0;
  border-left: 3px solid var(--color-blue);
  animation: slideInLeft 0.5s cubic-bezier(0.16,1,0.3,1) both; animation-delay: 0.15s; }
.tip-box::before { content: 'GRE TIP'; display: block; font-size: var(--text-xs);
  font-weight: 700; color: var(--color-blue); text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: var(--space-2); }

/* ===== WARNING BOX ===== */
.warning-box { background: var(--color-error-highlight); border: 1px solid rgba(255,107,138,0.2);
  border-radius: var(--radius-lg); padding: var(--space-5); margin: var(--space-4) 0;
  border-left: 3px solid var(--color-error);
  animation: slideInLeft 0.5s cubic-bezier(0.16,1,0.3,1) both; animation-delay: 0.2s; }
.warning-box::before { content: 'COMMON MISTAKE'; display: block; font-size: var(--text-xs);
  font-weight: 700; color: var(--color-error); text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: var(--space-2); }

/* ===== PASSAGE BOX (for reading comp) ===== */
.passage-box { background: var(--color-surface-offset); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6); margin-bottom: var(--space-6);
  max-height: 400px; overflow-y: auto; font-size: var(--text-sm); line-height: 1.8;
  border-left: 3px solid var(--color-purple); position: relative; }
.passage-box::before { content: 'PASSAGE'; display: block; font-size: var(--text-xs);
  font-weight: 700; color: var(--color-purple); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: var(--space-3); position: sticky; top: 0;
  background: var(--color-surface-offset); padding-bottom: var(--space-2); }

/* ===== TABLE RENDERED (from TABLE: data) ===== */
.table-rendered {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.table-rendered th {
  background: var(--color-surface-offset);
  color: var(--color-text);
  font-weight: 600;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
.table-rendered td {
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.table-rendered tr:last-child td {
  border-bottom: none;
}
.table-rendered tr:hover {
  background: var(--color-surface-offset);
}

/* ===== CHART CONTAINER (for chart.js in questions) ===== */
.question-chart-container { background: var(--color-surface-offset); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-4);
  max-height: 300px; position: relative; }

/* ===== PRACTICE PAGE ===== */
.practice-config { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-8); }
.practice-config h3 { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-6); }

.config-section { margin-bottom: var(--space-6); }
.config-label { font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--space-3); }
.question-count-info { font-size: var(--text-xs); color: var(--color-primary); font-weight: 600;
  margin-top: var(--space-2); }

.chip-group { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
  border: 1px solid var(--color-border); font-size: var(--text-xs); font-weight: 600;
  cursor: pointer; transition: all var(--transition-interactive); color: var(--color-text-muted); }
.chip.selected { background: var(--color-primary); color: var(--color-text-inverse);
  border-color: var(--color-primary); }
.chip:hover:not(.selected) { border-color: var(--color-primary); color: var(--color-primary); }

/* Reasoning focus card */
.reasoning-focus-card { background: linear-gradient(135deg, rgba(240,192,64,0.08), rgba(167,139,250,0.08));
  border: 1px solid rgba(240,192,64,0.25); }
.reasoning-focus-card h3 { color: var(--color-gold); }

/* ===== QUIZ / QUESTION VIEW ===== */
.quiz-container { max-width: 800px; margin: 0 auto; }
.quiz-container:has(.has-passage) { max-width: 1200px; }
.quiz-container.passage-mode { max-width: 1200px; }
.quiz-header { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-6); padding: var(--space-4) var(--space-5);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); }
.quiz-progress-text { font-size: var(--text-sm); font-weight: 600; }
.quiz-timer { font-size: var(--text-sm); font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--color-primary);
  padding: var(--space-1) var(--space-3); background: var(--color-primary-highlight);
  border-radius: var(--radius-md); transition: all 0.3s ease; }
.quiz-timer.warning { color: var(--color-error); background: var(--color-error-highlight);
  animation: pulse 1s infinite; }

.question-card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-8); margin-bottom: var(--space-4); }
.question-meta { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); flex-wrap: wrap; }
.question-tag { font-size: 11px; font-weight: 600; padding: 2px var(--space-2);
  border-radius: var(--radius-full); }
.question-text { font-size: var(--text-base); line-height: 1.7; margin-bottom: var(--space-6);
  white-space: pre-wrap; }

.choices-list { display: flex; flex-direction: column; gap: var(--space-3); }
.choice-btn { display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-4); border: 2px solid var(--color-border);
  border-radius: var(--radius-lg); cursor: pointer;
  transition: all var(--transition-interactive); text-align: left; width: 100%; }
.choice-btn:hover { border-color: var(--color-primary); background: var(--color-primary-highlight); }
.choice-btn.selected { border-color: var(--color-primary); background: var(--color-primary-highlight); }
.choice-btn.correct { border-color: var(--color-success); background: var(--color-success-highlight); }
.choice-btn.incorrect { border-color: var(--color-error); background: var(--color-error-highlight); }
.choice-letter { width: 28px; height: 28px; border-radius: var(--radius-full);
  background: var(--color-surface-dynamic); display: flex; align-items: center;
  justify-content: center; font-size: var(--text-xs); font-weight: 700; flex-shrink: 0; }
.choice-btn.selected .choice-letter { background: var(--color-primary); color: var(--color-text-inverse); }
.choice-btn.correct .choice-letter { background: var(--color-success); color: #fff; }
.choice-btn.incorrect .choice-letter { background: var(--color-error); color: #fff; }
.choice-text { font-size: var(--text-sm); line-height: 1.5; padding-top: 3px; }

.explanation-box { background: var(--color-surface-offset); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-5); margin-top: var(--space-4);
  border-left: 3px solid var(--color-primary); animation: slideDown 0.3s ease; }
.explanation-box h4 { font-size: var(--text-sm); font-weight: 700;
  color: var(--color-primary); margin-bottom: var(--space-2); }
.explanation-box p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }

.quiz-actions { display: flex; gap: var(--space-3); justify-content: center;
  margin-top: var(--space-6); }

/* ===== RESULTS PAGE ===== */
.results-container { max-width: 800px; margin: 0 auto; }
.results-hero { text-align: center; padding: var(--space-12); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-xl);
  margin-bottom: var(--space-6); }
.results-score { font-family: var(--font-display); font-size: var(--text-2xl);
  font-weight: 800; color: var(--color-primary); margin-bottom: var(--space-2); }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4); margin-bottom: var(--space-6); }
.results-section { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-5); text-align: center; }
.results-section h4 { font-size: var(--text-xs); color: var(--color-text-muted);
  text-transform: uppercase; margin-bottom: var(--space-1); }
.results-section .score { font-family: var(--font-display); font-size: var(--text-xl);
  font-weight: 800; }

/* Results analytics */
.results-analytics { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4);
  margin-top: var(--space-6); margin-bottom: var(--space-6); }
.analytics-card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-5); }
.analytics-card h4 { font-size: var(--text-xs); color: var(--color-text-muted);
  text-transform: uppercase; margin-bottom: var(--space-3); }

/* ===== SIMULATION ===== */
.sim-start { text-align: center; max-width: 600px; margin: 0 auto; }
.sim-info-grid { display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4); margin: var(--space-8) 0; }
.sim-info-card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-5); }
.sim-info-card h4 { font-size: var(--text-xs); color: var(--color-text-muted);
  text-transform: uppercase; margin-bottom: var(--space-1); }
.sim-info-card .info-value { font-family: var(--font-display);
  font-size: var(--text-lg); font-weight: 800; }

.sim-section-header { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6); margin-bottom: var(--space-6);
  text-align: center; }

/* ===== PROFILE PAGE ===== */
.profile-header { display: flex; align-items: center; gap: var(--space-6);
  margin-bottom: var(--space-8); padding: var(--space-8); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-xl); }
.profile-avatar { width: 80px; height: 80px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), var(--color-sage));
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xl); font-weight: 800; color: var(--color-on-primary); flex-shrink: 0; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4); }
.profile-stat { text-align: center; }
.profile-stat .stat-value { font-family: var(--font-display);
  font-size: var(--text-lg); font-weight: 800; }
.profile-stat .stat-label { font-size: var(--text-xs); color: var(--color-text-muted); }

.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-4); margin-bottom: var(--space-8); }
.badge-card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-5); text-align: center;
  transition: all var(--transition-interactive); }
.badge-card.earned { border-color: var(--color-gold); }
.badge-card:not(.earned) { opacity: 0.4; filter: grayscale(1); }
.badge-icon { font-size: 2rem; margin-bottom: var(--space-2); }
.badge-name { font-size: var(--text-xs); font-weight: 700; }
.badge-desc { font-size: 11px; color: var(--color-text-muted); margin-top: var(--space-1); }

/* ===== LEADERBOARD ===== */
.leaderboard-card { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); overflow: hidden; }
.leaderboard-row { display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--color-divider);
  transition: background var(--transition-interactive); }
.leaderboard-row:hover { background: var(--color-surface-offset); }
.leaderboard-row.current-user { background: var(--color-primary-highlight); }
.lb-rank { width: 32px; font-size: var(--text-sm); font-weight: 800;
  font-variant-numeric: tabular-nums; text-align: center; }
.lb-rank.gold { color: var(--color-gold); }
.lb-rank.silver { color: #c0c0c0; }
.lb-rank.bronze { color: #cd7f32; }
.lb-name { flex: 1; font-size: var(--text-sm); font-weight: 600; }
.lb-xp { font-size: var(--text-xs); font-weight: 700; color: var(--color-primary);
  font-variant-numeric: tabular-nums; }
.lb-level { font-size: var(--text-xs); color: var(--color-text-muted); min-width: 60px; text-align: right; }

/* ===== TOAST ===== */
.toast-container { position: fixed; top: var(--space-4); right: var(--space-4);
  z-index: 10000; display: flex; flex-direction: column; gap: var(--space-2); }
.toast { padding: var(--space-3) var(--space-5); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); font-size: var(--text-sm); font-weight: 500;
  animation: slideIn 0.3s ease; display: flex; align-items: center; gap: var(--space-2); }
.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-error); }
.toast.xp { border-left: 3px solid var(--color-primary); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); } }
@keyframes slideDown { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 500px; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 5px rgba(226,112,58,0.2); }
  50% { box-shadow: 0 0 20px rgba(226,112,58,0.4); } }
@keyframes drawLine { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.fade-in { animation: fadeIn 0.4s ease; }
/* Once the user has been navigating for a while, the page-level fade-in
   becomes more disruptive than helpful (every refresh blanks the screen).
   Disable it on the body once `data-first-render` is unset by app.js. */
body:not([data-first-render="1"]) .fade-in { animation: none; }
.slide-up { animation: slideUp 0.4s cubic-bezier(0.16,1,0.3,1); }

/* Scroll reveal animations */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Glow effect for key concepts */
.key-concept { display: inline-block; padding: 1px var(--space-2); border-radius: var(--radius-sm);
  background: var(--color-primary-highlight); color: var(--color-primary); font-weight: 600; }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, var(--color-surface-dynamic) 25%,
  var(--color-surface-offset-2) 50%, var(--color-surface-dynamic) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md); }

/* SVG geometry diagrams */
.geo-diagram { display: flex; justify-content: center; margin: var(--space-4) 0; }
.geo-diagram svg { max-width: 300px; width: 100%; }
.geo-diagram .draw-line { stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: drawLine 1.5s ease forwards; }

/* Lesson complete */
.lesson-complete { text-align: center; padding: var(--space-12); }
.lesson-complete .check-icon { width: 64px; height: 64px; margin: 0 auto var(--space-4);
  border-radius: var(--radius-full); background: var(--color-success-highlight);
  display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.lesson-complete h2 { margin-bottom: var(--space-2); }
.lesson-complete .xp-earned { font-size: var(--text-lg); font-weight: 800;
  color: var(--color-primary); margin-bottom: var(--space-6); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .chart-section { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .sim-info-grid { grid-template-columns: 1fr; }
  .results-analytics { grid-template-columns: 1fr; }
}

/* Mobile hamburger - hidden by default on desktop */
.mobile-menu-btn { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 768px) {
  /* --- LAYOUT --- */
  .app-shell { 
    grid-template-columns: 1fr; 
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
  }
  .sidebar { 
    display: flex; /* Keep flex layout for sidebar content */
    position: fixed; left: -280px; top: 0; bottom: 0; 
    width: 280px; z-index: 10010; 
    transition: left 0.3s ease; 
    background: var(--color-surface); 
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10005; }
  .sidebar-overlay.active { display: block; }
  .mobile-menu-btn { 
    display: block; position: fixed; top: 10px; left: 10px; z-index: 10002; 
    background: var(--color-surface); border: 1px solid var(--color-border); 
    border-radius: 8px; padding: 6px 10px; color: var(--color-text); 
    font-size: 1.1rem; cursor: pointer; 
  }
  .mobile-nav { display: none; } /* Use hamburger menu instead of bottom nav */
  
  /* --- MAIN CONTENT SCROLLING --- */
  .main-content { 
    padding: 52px 12px 24px 12px; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
    overscroll-behavior-y: contain;
    height: 100%;
  }
  
  /* --- TYPOGRAPHY --- */
  .page-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .page-title { font-size: 1.2rem; }
  .page-subtitle { font-size: 0.75rem; }
  
  /* --- DASHBOARD --- */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-card { padding: 12px; }
  .kpi-value { font-size: 1.3rem; }
  .chart-section { grid-template-columns: 1fr; gap: 12px; }
  .chart-card { padding: 12px; }
  .sim-evo-grid { grid-template-columns: 1fr; }
  .sim-evo-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .reco-grid { grid-template-columns: 1fr; }
  .strengths-table { font-size: 0.75rem; }
  .heatmap-grid { overflow-x: auto; }
  
  /* --- QUESTIONS & SIMULATION --- */
  .question-card { padding: 12px; }
  .question-text { font-size: 0.875rem; line-height: 1.6; }
  .question-passage-layout { flex-direction: column; gap: 12px; }
  .rc-passage-panel { width: 100%; max-width: 100%; max-height: 250px; overflow-y: auto; font-size: 0.8rem; }
  .question-main-col { width: 100%; }
  .choice-btn { padding: 10px 12px; font-size: 0.8rem; }
  .choice-letter { width: 24px; height: 24px; font-size: 0.7rem; min-width: 24px; }
  .quiz-header { flex-wrap: wrap; gap: 8px; padding: 8px; }
  .quiz-timer { font-size: 0.9rem; }
  .quiz-actions { flex-wrap: wrap; gap: 8px; }
  .quiz-actions .btn { flex: 1; min-width: 100px; }
  .sim-info-grid { grid-template-columns: 1fr; gap: 8px; }
  .sim-review-grid { grid-template-columns: repeat(5, 1fr); }
  
  /* --- PRACTICE --- */
  .practice-config { padding: 12px; }
  .config-section { margin-bottom: 10px; }
  .chip-group { flex-wrap: wrap; gap: 4px; }
  .chip { font-size: 0.7rem; padding: 4px 8px; }
  
  /* --- TABLES --- */
  .table-rendered { font-size: 0.7rem; }
  .table-rendered th, .table-rendered td { padding: 4px 6px; }
  .admin-tabs { flex-wrap: wrap; gap: 4px; }
  .admin-tab { font-size: 0.7rem; padding: 6px 8px; }
  
  /* --- PROFILE & AUTH --- */
  .profile-header { flex-direction: column; text-align: center; gap: 12px; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .profile-tab { font-size: 0.75rem; padding: 6px 10px; }
  .auth-card { width: 95%; max-width: 95%; margin: 12px; }
  .auth-card.assessment-card { width: auto; max-width: 100%; }
  .assess-item { flex-direction: column; gap: var(--space-2); align-items: flex-start; }
  .assess-slider-wrap { width: 100%; }
  
  /* --- COURSES & LESSONS --- */
  .lesson-content { padding: 12px; }
  .subsection-card { padding: 10px; }
  .example-box { padding: 10px; font-size: 0.8rem; }
  blockquote { padding: 8px 12px; font-size: 0.8rem; }
  
  /* --- BOOTCAMPS --- */
  .bootcamp-grid { grid-template-columns: 1fr; }
  .bootcamp-card { padding: 12px; }
  
  /* --- FLASHCARDS --- */
  .flashcard { min-height: 180px; padding: 16px; }
  
  /* --- MODALS --- */
  .modal { width: 94%; max-width: 94%; margin: 12px auto; max-height: 85vh; overflow-y: auto; }
  .modal-overlay { padding: 12px; align-items: flex-start; }
  
  /* --- HELP --- */
  .help-sidebar { display: none; }
  .help-content { width: 100%; padding: 12px; }
  
  /* --- MISC --- */
  .btn { font-size: 0.8rem; padding: 8px 14px; }
  .explanation-content { font-size: 0.8rem; padding: 10px; }
  .study-activity-grid { grid-template-columns: 1fr; }
  .pricing-cards { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .main-content { padding: 50px 8px 20px 8px; }
  .sim-review-grid { grid-template-columns: repeat(4, 1fr); }
  .sim-evo-cards { grid-template-columns: 1fr 1fr; }
  .quiz-actions { flex-direction: column; }
  .quiz-actions .btn { width: 100%; }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .choice-btn { gap: 6px; }
  .page-title { font-size: 1.05rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========== RC PASSAGE PANEL ========== */
.rc-passage-panel {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  max-height: 400px;
  overflow-y: auto;
}
.rc-passage-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  font-weight: 600;
}
.rc-passage-text {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--color-text);
}
.rc-passage-text p {
  margin: 0 0 var(--space-4) 0;
}
.rc-passage-text p:last-child {
  margin-bottom: 0;
}

/* Question card with passage, layout handled by .question-passage-layout inside */
.question-card.has-passage {
  display: block;
  max-width: none;
  overflow: visible;
}

/* Better chart container */
.question-chart-container {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  max-height: 350px;
}
.question-chart-container canvas { max-height: 300px; }

/* ========== LEARNING PATH PAGE ========== */
.path-grid { display: flex; flex-direction: column; gap: var(--space-2); }
.path-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 180ms ease;
}
.path-card:hover { border-color: var(--color-primary); transform: translateX(4px); }
.path-card .path-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
}
.path-card.priority-high .path-num { background: var(--color-error); color: white; }
.path-card.priority-medium .path-num { background: var(--color-gold); color: #1a1410; }
.path-card.priority-low .path-num { background: var(--color-primary); color: #1a1410; }
.path-card .path-info { flex: 1; min-width: 0; }
.path-card .path-title { font-weight: 600; color: var(--color-text); font-size: var(--text-sm); }
.path-card .path-desc { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }

/* ===== NEW FEATURES CSS ===== */

/* Requirement 3: Per-option explanation breakdown */
.options-breakdown {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.options-breakdown h5 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.option-breakdown-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.option-breakdown-item.option-correct {
  background: rgba(226,112,58,0.08);
  border-left: 3px solid var(--color-primary);
}
.option-breakdown-item.option-incorrect {
  background: rgba(255, 107, 138, 0.08);
  border-left: 3px solid var(--color-error);
}
.option-breakdown-item.option-neutral {
  background: transparent;
  border-left: 3px solid var(--color-divider);
  opacity: 0.7;
}
.option-breakdown-letter {
  font-weight: 700;
  font-size: var(--text-xs);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-surface-dynamic);
}
.option-correct .option-breakdown-letter { background: var(--color-primary); color: var(--color-text-inverse); }
.option-incorrect .option-breakdown-letter { background: var(--color-error); color: #fff; }
.option-breakdown-text { flex: 1; color: var(--color-text-muted); }
.option-breakdown-status { font-size: var(--text-xs); font-weight: 600; flex-shrink: 0; white-space: nowrap; }
.option-correct .option-breakdown-status { color: var(--color-primary); }
.option-incorrect .option-breakdown-status { color: var(--color-error); }

/* RC passage layout, passage takes most of the width, questions on right */
.question-passage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  margin-left: calc(-1 * var(--space-4));
  margin-right: calc(-1 * var(--space-4));
  padding: 0 var(--space-2);
  width: calc(100% + var(--space-8));
}
.question-passage-layout .rc-passage-panel {
  max-height: 72vh;
  overflow-y: auto;
  padding: var(--space-4) var(--space-4);
  position: sticky;
  top: 0;
  margin-bottom: 0;
  font-size: var(--text-sm);
  line-height: 1.8;
}
.question-main-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-top: var(--space-1);
}
/* When in passage layout, expand the card to full width */
.question-card.has-passage {
  max-width: none;
  padding: var(--space-4);
}
@media (min-width: 1200px) {
  .question-passage-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}
@media (max-width: 768px) {
  .question-passage-layout {
    grid-template-columns: 1fr;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    width: 100%;
  }
  .question-passage-layout .rc-passage-panel {
    max-height: 300px;
    position: static;
  }
}
.passage-counter {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-2);
  padding: var(--space-1) var(--space-2);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-sm);
  display: inline-block;
}
.reasoning-note {
  font-size: var(--text-xs);
  color: var(--color-gold);
  font-style: italic;
  padding: var(--space-2) var(--space-3);
  background: rgba(240, 192, 64, 0.08);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  border-left: 3px solid var(--color-gold);
}

/* Requirement 7: Practice history table */
.practice-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.practice-history-table th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-border);
}
.practice-history-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

/* Requirement 8: Learning path progress */
.lp-progress-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}
.lp-overall-bar {
  height: 12px;
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-3) 0;
}
.lp-overall-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary), #f08650);
  transition: width 0.5s ease;
}
.lp-priority-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.lp-priority-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.lp-priority-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lp-priority-bar {
  height: 6px;
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.lp-priority-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}
.lp-priority-fill.high { background: var(--color-error); }
.lp-priority-fill.medium { background: var(--color-gold); }
.lp-priority-fill.low { background: var(--color-primary); }

/* Topic mastery badge */
.mastered-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Path card progress bar */
.path-card-progress {
  margin-top: var(--space-2);
}
.path-card-progress-bar {
  height: 4px;
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.path-card-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  transition: width 0.3s ease;
}
.path-card-stats {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Auth error messages */
.auth-error {
  color: var(--color-error);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
  text-align: center;
}
.auth-error:empty { display: none; }

/* Loading state */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-8);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--color-divider);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== HEATMAP LEGEND ===== */
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.heatmap-legend .heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}
.legend-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ===== COURSE TIER TABS ===== */
.tier-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  padding: var(--space-1);
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  width: fit-content;
}
.tier-tab {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-interactive);
}
.tier-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-dynamic);
}
.tier-tab.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.tier-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tier-badge.beginner { background: var(--color-success-highlight); color: var(--color-success); }
.tier-badge.intermediate { background: var(--color-gold-highlight); color: var(--color-gold); }
.tier-badge.advanced { background: var(--color-error-highlight); color: var(--color-error); }

/* ===== REASONING FOCUS DASHBOARD CARD ===== */
.reasoning-dashboard-card {
  background: var(--color-surface);
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}
.reasoning-dashboard-card .chart-title {
  color: var(--color-gold);
}


/* ===== ROUND 6 FIXES ===== */

/* Compact question meta tags (RC fix) */
.question-meta-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-3);
  font-size: 11px;
  color: var(--color-text-muted);
}
.qtag-section {
  text-transform: capitalize;
  font-weight: 600;
  color: var(--color-primary);
}
.qtag-sep { color: var(--color-text-faint); }
.qtag-diff { font-weight: 500; text-transform: capitalize; }
.qtag-reasoning { font-weight: 600; color: var(--color-gold); }



/* Source Block Formatting (Multi-Source Reasoning) */
.source-block {
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
}
.source-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.source-content {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--color-text);
}

/* Per-Option Rationale (replaces All Options) */
.per-option-rationales {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.option-rationale {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--color-divider);
  background: var(--color-surface);
  transition: all 0.2s ease;
}
.option-rationale-correct {
  border-left-color: var(--color-primary);
  background: rgba(226,112,58,0.06);
}
.option-rationale-selected-wrong {
  border-left-color: var(--color-error);
  background: rgba(255, 107, 138, 0.06);
}
.option-rationale-wrong {
  border-left-color: var(--color-divider);
  opacity: 0.8;
}
.option-rationale-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.option-rationale-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--color-surface-dynamic);
  flex-shrink: 0;
}
.option-rationale-correct .option-rationale-letter {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.option-rationale-selected-wrong .option-rationale-letter {
  background: var(--color-error);
  color: #fff;
}
.option-rationale-choice {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  min-width: 0;
}
.option-rationale-status {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.option-rationale-correct .option-rationale-status { color: var(--color-primary); }
.option-rationale-selected-wrong .option-rationale-status { color: var(--color-error); }
.option-rationale-wrong .option-rationale-status { color: var(--color-text-faint); }
.option-rationale-text {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* Simulation Evolution Dashboard Section */
.sim-evolution-section { }
.sim-evo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 768px) {
  .sim-evo-grid { grid-template-columns: 1fr; }
}
.sim-evo-chart-wrap {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.sim-evo-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
@media (max-width: 768px) {
  .sim-evo-cards { grid-template-columns: repeat(2, 1fr); }
}
.sim-evo-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  text-align: center;
}
.sim-evo-card-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}
.sim-evo-card-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
}

/* Flashcard Module */
.flashcard-filters {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.fc-filter-btn {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: capitalize;
  background: transparent;
  color: var(--color-text-muted);
}
.fc-filter-btn:hover, .fc-filter-btn.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}
.flashcard-sub-filters {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.fc-sub-btn {
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  text-transform: capitalize;
  background: transparent;
  color: var(--color-text-muted);
  transition: all 0.2s ease;
}
.fc-sub-btn:hover, .fc-sub-btn.active {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.flashcard-count {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.flashcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}
.flashcard-wrapper {
  perspective: 800px;
  cursor: pointer;
  height: 220px;
}
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}
.flashcard-wrapper.flipped .flashcard-inner {
  transform: rotateY(180deg);
}
.flashcard-front, .flashcard-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.flashcard-front {
  background: linear-gradient(135deg, var(--color-surface), var(--color-surface-card));
  justify-content: center;
  align-items: center;
  text-align: center;
}
.flashcard-back {
  background: var(--color-surface-offset);
  transform: rotateY(180deg);
  justify-content: space-between;
  overflow-y: auto;
}
.fc-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.fc-concept {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
}
.fc-flip-hint {
  font-size: 10px;
  color: var(--color-text-faint);
  margin-top: var(--space-3);
}
.fc-explanation {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text);
  flex: 1;
}
.fc-tip {
  font-size: var(--text-xs);
  color: var(--color-gold);
  padding: var(--space-2) var(--space-3);
  background: rgba(240, 192, 64, 0.08);
  border-radius: var(--radius-sm);
  margin-top: var(--space-2);
  line-height: 1.5;
}

/* Improved table rendering */
.table-rendered {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-3) 0;
  font-size: var(--text-sm);
  background: var(--color-surface-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.table-rendered th {
  background: var(--color-surface-dynamic);
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  border-bottom: 2px solid var(--color-border);
}
.table-rendered td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
}
.table-rendered tr:last-child td { border-bottom: none; }
.table-rendered tr:hover { background: rgba(255,255,255,0.02); }

/* Worked Examples in Courses */
.worked-example {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
}
.worked-example + .worked-example {
  margin-top: var(--space-3);
}
.worked-example-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.worked-example-problem {
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
}
.worked-example-steps {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--color-text);
}
.worked-example-steps p {
  margin-bottom: var(--space-2);
}
.worked-example-steps strong {
  color: var(--color-primary);
}

/* ===== CASE STUDY STYLES (Verbal Courses) ===== */
.case-study {
  background: linear-gradient(135deg, rgba(226,112,58,0.06) 0%, rgba(240,192,64,0.04) 100%);
  border: 1px solid rgba(226,112,58,0.2);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin: var(--space-5) 0;
  position: relative;
}
.case-study::before {
  content: '📋';
  position: absolute;
  top: -12px;
  right: 16px;
  font-size: 1.5rem;
  background: var(--color-bg);
  padding: 0 var(--space-2);
}
.case-study-label {
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.case-study-label::before {
  content: '⚖';
  font-size: 1rem;
}
.case-study-problem {
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  line-height: 1.7;
  font-size: var(--text-sm);
  border: 1px solid rgba(255,255,255,0.05);
}
.case-study-steps {
  padding-left: var(--space-4);
  border-left: 2px solid rgba(226,112,58,0.3);
}
.case-study-steps p {
  margin-bottom: var(--space-2);
}
.case-study-steps strong {
  color: var(--color-primary);
}

/* ===== SECTION INTRO BOX ===== */
.section-intro-box {
  background: linear-gradient(135deg, rgba(226,112,58,0.08) 0%, rgba(59,130,246,0.06) 100%);
  border: 1px solid rgba(226,112,58,0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-5) 0;
  position: relative;
  overflow: hidden;
}
.section-intro-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), rgba(59,130,246,0.6));
}
.section-intro-welcome {
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}
.section-intro-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.section-intro-item {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
  align-items: flex-start;
}
.section-intro-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 2px;
}
.section-intro-item strong {
  color: var(--color-text);
  white-space: nowrap;
  margin-right: var(--space-1);
}

/* ===== LEARNING OBJECTIVE BOX ===== */
.lesson-objective-box {
  background: rgba(226,112,58,0.08);
  border: 1px solid rgba(226,112,58,0.15);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.lesson-objective-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
}
.lesson-objective-box strong {
  color: var(--color-text);
  white-space: nowrap;
}
.lesson-objective-box em {
  color: var(--color-primary);
  font-style: normal;
  font-weight: 500;
}


/* ===== CLICKABLE LEARNING PATH ===== */
.path-item-clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.path-item-clickable:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(226,112,58,0.15);
  border-color: var(--color-primary) !important;
}
.path-item-clickable:hover .path-title {
  color: var(--color-primary);
}
.path-item-clickable:active {
  transform: translateX(2px);
}

/* ===== STANDALONE COURSE INTRO PAGE ===== */
.course-intro-standalone {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-4) 0;
}
.course-intro-hero {
  text-align: center;
  margin-bottom: var(--space-6);
}
.course-intro-icon {
  font-size: 3rem;
  margin-bottom: var(--space-3);
}
.course-intro-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}
.course-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.course-intro-card {
  background: var(--color-surface-dynamic);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}
.course-intro-card-icon {
  font-size: 1.3rem;
  margin-bottom: var(--space-2);
}
.course-intro-card-label {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}
.course-intro-card p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
  margin: 0;
}
.course-intro-meta {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin: var(--space-5) 0;
  padding: var(--space-4) 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.course-intro-meta-item {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.course-intro-meta-item strong {
  display: block;
  font-size: var(--text-lg);
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 2px;
}
.course-intro-outline {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.course-intro-outline-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  transition: background 0.15s;
}
.course-intro-outline-item:hover {
  background: rgba(226,112,58,0.06);
}
.course-intro-outline-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(226,112,58,0.1);
  color: var(--color-primary);
  font-weight: 700;
  font-size: var(--text-xs);
  flex-shrink: 0;
}
.course-intro-outline-title {
  flex: 1;
  color: var(--color-text);
  font-weight: 500;
}
.course-intro-outline-time {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  flex-shrink: 0;
}

/* ===== STRUCTURED RECAP ===== */
.lesson-recap-box {
  background: rgba(240,192,64,0.04);
  border: 1px solid rgba(240,192,64,0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-5);
  margin-top: var(--space-6);
  display: block;
}
.recap-structured {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
}
.recap-heading {
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-gold);
  margin-bottom: var(--space-2);
  margin-top: var(--space-3);
}
.recap-heading:first-child {
  margin-top: 0;
}
.recap-summary {
  margin: 0 0 var(--space-2) 0;
}
.recap-concepts {
  margin: 0 0 var(--space-2) 0;
  padding-left: var(--space-5);
  list-style: none;
}
.recap-concepts li {
  position: relative;
  padding: 2px 0;
}
.recap-concepts li::before {
  content: '✓';
  position: absolute;
  left: -20px;
  color: var(--color-primary);
  font-weight: 700;
}
.recap-next {
  margin: 0;
}
.recap-next strong {
  color: var(--color-text);
}

/* Lesson intro context - rich GRE-contextualized introduction */
.lesson-intro-context {
  background: linear-gradient(135deg, rgba(226,112,58,0.06) 0%, rgba(226,112,58,0.02) 100%);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 12px 12px 0;
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-6);
  position: relative;
}
.lesson-intro-context::before {
  content: '\f05a';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-size: 1.2rem;
  color: var(--color-primary);
  opacity: 0.3;
}
.lesson-intro-context p {
  font-size: var(--text-base);
  line-height: 1.8;
  color: rgba(255,255,255,0.92);
  margin-bottom: var(--space-4);
  text-align: justify;
}
.lesson-intro-context p:last-child {
  margin-bottom: 0;
}
.lesson-intro-context p:first-child {
  font-size: calc(var(--text-base) + 0.5px);
  font-weight: 500;
  color: rgba(255,255,255,0.96);
}

/* Learning Path Time Dimension */
.lp-time-banner {
  background: linear-gradient(135deg, rgba(226,112,58,0.08) 0%, rgba(240,192,64,0.05) 100%);
  border: 1px solid rgba(226,112,58,0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-6);
}
.lp-time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.lp-time-card {
  text-align: center;
  padding: var(--space-3);
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
}
.lp-time-value {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
}
.lp-time-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-1);
}
.lp-time-sub {
  font-size: 11px;
  color: var(--color-text-faint);
  margin-top: 2px;
}
.lp-time-progress {
  margin-bottom: var(--space-4);
}
.lp-time-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.lp-time-bar {
  width: 100%;
  height: 8px;
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-full);
  position: relative;
  overflow: visible;
}
.lp-time-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.lp-time-bar-marker {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  background: var(--color-primary);
  border: 2px solid var(--color-bg);
  border-radius: 50%;
  transform: translateX(-50%);
}
.lp-time-tip {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
}
.lp-time-tip strong {
  color: var(--color-text);
}
@media (max-width: 768px) {
  .lp-time-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Help Page */
.help-container { max-width: 900px; margin: 0 auto; }
.help-hero {
  text-align: center;
  padding: var(--space-8) 0 var(--space-6);
}
.help-hero h1 {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.help-hero p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}
.help-section {
  margin-bottom: var(--space-8);
}
.help-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.help-step {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-5);
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s;
}
.help-step:hover {
  border-color: rgba(226,112,58,0.2);
}
.help-step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--text-base);
}
.help-step-content h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.help-step-content p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.help-step-content p:last-child { margin-bottom: 0; }
.help-step-content ul {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0;
}
.help-step-content ul li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: 4px 0 4px 20px;
  position: relative;
}
.help-step-content ul li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}
.help-tip-box {
  background: linear-gradient(135deg, rgba(226,112,58,0.08) 0%, rgba(226,112,58,0.03) 100%);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-3) 0;
}
.help-tip-box strong { color: var(--color-primary); }
.help-faq {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.help-faq-q {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.help-faq-q:hover { background: rgba(255,255,255,0.04); }
.help-faq-a {
  padding: 0 var(--space-4) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  display: none;
}
.help-faq.open .help-faq-a { display: block; }
.help-faq.open .help-faq-q { color: var(--color-primary); }
.help-journey {
  position: relative;
  padding-left: var(--space-8);
}
.help-journey::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-gold), var(--color-primary));
}
.help-journey-step {
  position: relative;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  border: 1px solid rgba(255,255,255,0.06);
  animation: helpSlideIn 0.4s ease-out both;
}
.help-journey-step::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-8) + 12px);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-bg);
}
.help-journey-step:nth-child(even)::before {
  background: var(--color-gold);
}
@keyframes helpSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
.help-journey-step:nth-child(1) { animation-delay: 0.1s; }
.help-journey-step:nth-child(2) { animation-delay: 0.2s; }
.help-journey-step:nth-child(3) { animation-delay: 0.3s; }
.help-journey-step:nth-child(4) { animation-delay: 0.4s; }
.help-journey-step:nth-child(5) { animation-delay: 0.5s; }
.help-journey-step:nth-child(6) { animation-delay: 0.6s; }
.help-journey-step:nth-child(7) { animation-delay: 0.7s; }
.help-journey-step:nth-child(8) { animation-delay: 0.8s; }
.help-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}
.help-video-card {
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.help-video-card:hover {
  border-color: rgba(226,112,58,0.3);
  transform: translateY(-2px);
}
.help-video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(226,112,58,0.15), rgba(240,192,64,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.help-video-play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.help-video-play::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 14px solid #000;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 3px;
}
.help-video-info {
  padding: var(--space-3) var(--space-4);
}
.help-video-info h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}
.help-video-info p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.help-video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Help page additional classes */
.help-journey-icon {
  font-size: 28px;
  margin-bottom: 4px;
}
.help-journey-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
}
.help-journey-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}
.help-video-dur {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-left: 8px;
  opacity: 0.7;
}
.help-video-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 10;
  border-radius: var(--radius-lg);
}
.help-video-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
.help-video-card {
  position: relative;
}

/* Subsection enrichment blocks */
.subsection-concept,
.subsection-apply,
.subsection-qtypes,
.subsection-traps {
  background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
}
.subsection-concept > h3,
.subsection-apply > h3,
.subsection-qtypes > h3,
.subsection-traps > h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.subsection-concept > h3 { color: var(--color-primary); }
.subsection-concept > h3::before { content: '💡'; }
.subsection-apply > h3 { color: #60a5fa; }
.subsection-apply > h3::before { content: '🔧'; }
.subsection-apply { border-left-color: #60a5fa; }
.subsection-qtypes > h3 { color: var(--color-gold); }
.subsection-qtypes > h3::before { content: '📋'; }
.subsection-qtypes { border-left-color: var(--color-gold); }
.subsection-traps > h3 { color: #f87171; }
.subsection-traps > h3::before { content: '⚠️'; }
.subsection-traps { border-left-color: #f87171; }
.subsection-concept p,
.subsection-apply p,
.subsection-qtypes p,
.subsection-traps p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-2);
}
.subsection-concept ul,
.subsection-apply ul,
.subsection-apply ol,
.subsection-qtypes ul,
.subsection-traps ul {
  padding-left: var(--space-5);
  margin: var(--space-2) 0;
}
.subsection-concept li,
.subsection-apply li,
.subsection-apply ol li,
.subsection-qtypes li,
.subsection-traps li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}
.subsection-qtypes li strong,
.subsection-traps li strong {
  color: var(--color-text);
}

/* Go to Course link on wrong answers */
.go-to-course-link {
  margin: var(--space-3) 0 var(--space-4) 0;
}
.go-to-course-link .btn-accent {
  background: linear-gradient(135deg, rgba(226,112,58,0.15), rgba(96,165,250,0.15));
  border: 1px solid rgba(226,112,58,0.3);
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.go-to-course-link .btn-accent:hover {
  background: linear-gradient(135deg, rgba(226,112,58,0.25), rgba(96,165,250,0.25));
  border-color: rgba(226,112,58,0.5);
  transform: translateY(-1px);
}

/* Filter hint text */
.filter-hint {
  font-size: 11px;
  color: var(--color-text-faint);
  margin-top: 4px;
}

/* Help page tabs */
.help-tab {
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.help-tab:hover { color: var(--color-text); }
.help-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Help demo boxes */
.help-demo-box {
  background: rgba(226,112,58,0.05);
  border: 1px solid rgba(226,112,58,0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-3);
}
.help-demo-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.help-demo-mockup {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.help-demo-field {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.help-demo-btn {
  background: var(--color-primary);
  color: #000;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  margin-top: 4px;
}

/* Help video player */
.help-video-player {
  padding: var(--space-4);
}
.help-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.help-player-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.help-player-step {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  opacity: 0.5;
  transition: all 0.3s ease;
}
.help-player-step.active {
  opacity: 1;
  background: rgba(226,112,58,0.08);
  border-color: rgba(226,112,58,0.25);
  transform: scale(1.01);
}
.help-player-step.completed {
  opacity: 0.7;
}
.help-player-step.completed .help-player-step-num {
  background: var(--color-primary);
  color: #000;
}
.help-player-step-num {
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.help-player-step.active .help-player-step-num {
  background: var(--color-primary);
  color: #000;
}
.help-player-step-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}
.help-player-step-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.45;
}
.help-player-controls {
  margin-top: var(--space-3);
}
.help-player-progress {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.help-player-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

/* ===== HELP SCREENSHOT MOCKUPS ===== */
.help-screenshot {
  margin-top: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.help-screenshot-label {
  background: rgba(226,112,58,0.08);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.help-screenshot-frame {
  padding: 16px;
  background: linear-gradient(135deg, rgba(13,13,26,0.95), rgba(20,20,40,0.95));
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 0 0 11px 11px;
  position: relative;
}
.help-screenshot-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226,112,58,0.2), transparent);
}
.help-screenshot-caption {
  padding: 10px 16px;
  font-size: 11px;
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.04);
  line-height: 1.5;
}
.help-mock-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 10px 12px;
}
.help-mock-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  color: #888;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.help-mock-chip.active {
  background: rgba(226,112,58,0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
}
.help-mock-btn {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.08);
  color: #ccc;
  cursor: default;
}

/* ===== COMPLETED COURSE HIGHLIGHTING ===== */
.subsection-card.completed-course {
  border-color: rgba(226,112,58,0.3);
  background: linear-gradient(135deg, rgba(226,112,58,0.06), rgba(226,112,58,0.02));
  position: relative;
}
.subsection-card.completed-course::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px 0 0 4px;
}
.subsection-card.completed-course .subsection-num {
  position: relative;
}

/* ===== LESSON BOTTOM NAV ===== */
.lesson-bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== ROUND 15: MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  animation: fadeIn 0.2s ease;
}
.modal-content {
  background: var(--color-surface-1, #1a1410);
  border: 1px solid var(--color-border, rgba(255,255,255,0.1));
  border-radius: 12px;
  padding: var(--space-5, 20px);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== REPORT BUTTON & OPTIONS ===== */
.report-option {
  transition: background 0.15s, border-color 0.15s;
}
.report-option:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--color-primary, #e2703a);
}
.report-option input[type="radio"]:checked + span {
  color: var(--color-primary, #e2703a);
  font-weight: 600;
}
.btn-xs {
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 6px;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-border, rgba(255,255,255,0.1));
  color: var(--color-text-muted, #888);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  color: var(--color-text, #fff);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  z-index: 10001;
  animation: toastSlideIn 0.3s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: opacity 0.3s;
}
.toast-success { background: #e2703a; }
.toast-error { background: #ff6b6b; }
.toast-info { background: #4a9eff; }
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== PRICING CARDS ===== */
.pricing-section .card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-section .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* ===== ADMIN TABLES ===== */
#admin-tab-content table th {
  color: var(--color-text-muted, #888);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#admin-tab-content table td {
  color: var(--color-text, #e0e0e0);
}
#admin-tab-content table tr:hover {
  background: rgba(255,255,255,0.03);
}

/* Admin tabs */
.admin-tab {
  background: transparent;
  color: var(--color-text-muted, #888);
  border: none;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.admin-tab:hover {
  background: rgba(255,255,255,0.06);
  color: var(--color-text, #fff);
}
.admin-tab.active {
  background: var(--color-primary, #e2703a);
  color: #000;
  font-weight: 600;
}

/* ===== TUTORING FORM ===== */
.form-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border, rgba(255,255,255,0.1));
  background: var(--color-surface-2, #1e1e35);
  color: var(--color-text, #e0e0e0);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary, #e2703a);
}
select.form-input {
  appearance: auto;
  -webkit-appearance: auto;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 640px) {
  .modal-content {
    width: 95%;
    padding: var(--space-4, 16px);
    max-height: 85vh;
  }
  .pricing-section > div > div {
    grid-template-columns: 1fr !important;
  }
  #admin-tab-content table {
    font-size: 12px;
  }
}

/* ===== TOGGLE SWITCH (Tutor online status) ===== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 26px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: #888;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(226,112,58,0.2);
  border-color: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  background: var(--color-primary);
  transform: translateX(22px);
}

/* ===== LOCKED COURSE CARD ===== */
.subsection-card.locked-course {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}

.subsection-card.locked-course:hover {
  transform: none;
  border-color: var(--color-border);
}

/* ===== TIER RESTRICTION BANNER ===== */
.tier-restriction-banner {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ===== BOOTCAMP STYLES ===== */

.bootcamp-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--color-border);
}

.bootcamp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--color-primary);
}

.bootcamp-topic-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bootcamp-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 600;
}

.bootcamp-status-published {
  background: rgba(74, 158, 255, 0.15);
  color: #4a9eff;
}

.bootcamp-status-active {
  background: rgba(226,112,58,0.15);
  color: #e2703a;
}

.bootcamp-status-draft {
  background: rgba(136, 136, 136, 0.15);
  color: #888;
}

.bootcamp-status-completed {
  background: rgba(240, 192, 64, 0.15);
  color: #f0c040;
}

.bootcamp-session-list {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
}

.bootcamp-session-item:last-child {
  border-bottom: none;
}

.bootcamp-session-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.bootcamp-detail {
  animation: fadeIn 0.3s ease;
}

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

.bootcamp-pricing-panel {
  background: linear-gradient(135deg, rgba(226,112,58,0.05), rgba(74, 158, 255, 0.05));
  border: 1px solid rgba(226,112,58,0.2);
}

.bootcamp-enroll-btn {
  font-weight: 700;
  transition: all 0.2s ease;
}

.bootcamp-enroll-btn:hover {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .bootcamp-detail > div > div:first-child > div[style*="grid-template-columns:1fr 340px"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .bootcamp-detail div[style*="grid-template-columns:1fr 340px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ===== ADMIN DASHBOARD STATS ===== */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.admin-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}

.admin-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.admin-stat-value {
  font-size: var(--text-2xl);
  font-weight: 800;
}

/* DAU Chart */
.dau-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding-top: var(--space-2);
}

.dau-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.dau-bar-value {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.dau-bar {
  width: 100%;
  max-width: 40px;
  background: linear-gradient(to top, #e2703a, #e2703a88);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.3s ease;
}

.dau-bar-label {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ===== ADMIN USERS CONTROLS ===== */
.admin-users-controls {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

/* ===== ADMIN ACTION DROPDOWN ===== */
.admin-action-dropdown {
  position: relative;
  display: inline-block;
}

.admin-action-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 100;
  min-width: 160px;
  overflow: hidden;
}

.admin-action-dropdown.open .admin-action-menu {
  display: block;
}

.admin-action-menu button {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: var(--text-xs);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.admin-action-menu button:hover {
  background: var(--color-surface-dynamic);
}

/* ===== CONTENT MANAGEMENT ===== */
.content-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
}

.content-section-card {
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

/* ===== SETTINGS TOGGLES ===== */
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-4);
}

.settings-label {
  font-size: var(--text-sm);
  font-weight: 600;
}

.settings-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #555;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #e2703a;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* ===== STUDY ACTIVITY ===== */
.study-activity-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.study-progress-bar {
  height: 8px;
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.study-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.study-reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-2);
}

.study-reco-card {
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-users-controls {
    flex-direction: column;
  }
  .settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}




/* ==========================================================
   GRE On-Screen Calculator (Quantitative only)
   ========================================================== */
.gre-calc {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 280px;
  background: var(--color-surface, #1c1b19);
  border: 1px solid var(--color-border, #393836);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  z-index: 9000;
  font-family: 'Inter', -apple-system, sans-serif;
  user-select: none;
  color: var(--color-text, #cdccca);
}
.gre-calc--min .gre-calc__body { display: none; }
.gre-calc--min { width: 200px; }

.gre-calc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--color-surface-alt, #201f1d);
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid var(--color-border, #393836);
}
.gre-calc__title {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text, #cdccca);
}
.gre-calc__header-btns { display: flex; gap: 4px; }
.gre-calc__header-btns button {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--color-text-muted, #797876);
  font-size: 14px;
  line-height: 1;
}
.gre-calc__header-btns button:hover {
  background: var(--color-bg, #171614);
  color: var(--color-text, #cdccca);
}

.gre-calc__body { padding: 12px; }
.gre-calc__display {
  background: var(--color-bg, #0c0c0a);
  border: 1px solid var(--color-border, #393836);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 22px;
  font-weight: 600;
  text-align: right;
  color: var(--color-text, #f4f3f0);
  min-height: 32px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
}
.gre-calc__expr {
  font-size: 11px;
  text-align: right;
  color: var(--color-text-muted, #797876);
  height: 14px;
  margin: 4px 4px 8px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gre-calc__keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.gre-calc__keys button {
  background: var(--color-surface-alt, #28251d);
  border: 1px solid var(--color-border, #393836);
  border-radius: 6px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text, #cdccca);
  transition: background 0.1s;
}
.gre-calc__keys button:hover {
  background: var(--color-border, #4a4845);
}
.gre-calc__keys button:active {
  background: var(--color-primary, #e2703a);
  color: var(--color-bg, #0c0c0a);
}
.gre-calc__keys button.k-op {
  background: var(--color-surface-alt, #2a2725);
  color: var(--color-primary, #4f98a3);
}
.gre-calc__keys button.k-mem {
  background: transparent;
  font-size: 11px;
  color: var(--color-text-muted, #797876);
}
.gre-calc__keys button.k-clr {
  background: var(--color-bg, #1f1d1a);
  color: var(--color-warning, #bb653b);
}
.gre-calc__keys button.k-eq {
  background: var(--color-primary, #e2703a);
  color: #0c0c0a;
  font-weight: 700;
}

/* Toolbar toggle button */
.gre-calc-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--color-surface-alt, #201f1d);
  border: 1px solid var(--color-border, #393836);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text, #cdccca);
  margin-right: 8px;
}
.gre-calc-toggle-btn:hover {
  background: var(--color-bg, #171614);
  border-color: var(--color-primary, #e2703a);
  color: var(--color-primary, #e2703a);
}

/* Mobile: smaller calculator */
@media (max-width: 640px) {
  .gre-calc {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 12px;
  }
  .gre-calc--min { width: 180px; }
  .gre-calc__display { font-size: 18px; }
  .gre-calc__keys button { padding: 10px 0; font-size: 15px; }
}

/* ================================================================
   META COURSE, Test Mastery Series
   Distinctive purple/gold theme, separate from regular courses.
   ================================================================ */
:root {
  --meta-primary: #8b5cf6;
  --meta-primary-soft: rgba(139, 92, 246, 0.12);
  --meta-primary-glow: rgba(139, 92, 246, 0.3);
  --meta-accent: #f5b942;
  --meta-accent-soft: rgba(245, 185, 66, 0.18);
  --meta-deep: #2d1b4e;
  --meta-deep-2: #1a0f2e;
  --meta-text: #f0e9ff;
  --meta-text-muted: #b9a8d8;
}

/* ----- Banner on Courses page ----- */
.meta-course-banner {
  position: relative;
  margin-bottom: var(--space-6);
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--meta-deep) 0%, var(--meta-deep-2) 100%);
  border: 1px solid var(--meta-primary);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.12);
}
.meta-course-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.25);
}
.meta-course-banner::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--meta-primary-glow) 0%, transparent 70%);
  pointer-events: none;
}
.meta-banner-left { display: flex; align-items: center; gap: 18px; flex: 1; min-width: 0; position: relative; z-index: 1; }
.meta-banner-badge {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--meta-accent) 0%, #e89827 100%);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 185, 66, 0.35);
}
.meta-banner-eyebrow { color: var(--meta-accent); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 4px; }
.meta-banner-title { color: var(--meta-text); font-size: 20px; font-weight: 700; line-height: 1.2; margin-bottom: 4px; }
.meta-banner-sub { color: var(--meta-text-muted); font-size: 12px; }
.meta-banner-right { display: flex; gap: 24px; position: relative; z-index: 1; }
.meta-stat { text-align: center; }
.meta-stat-num { display: block; color: var(--meta-text); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.meta-stat-label { display: block; color: var(--meta-text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; }
.meta-banner-progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(139, 92, 246, 0.18);
}
.meta-banner-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--meta-primary) 0%, var(--meta-accent) 100%);
  transition: width 0.4s ease;
}

/* ----- Hub page ----- */
.meta-shell {
  background: linear-gradient(180deg, var(--meta-deep-2) 0%, #0d0820 100%);
  margin: -24px -24px -24px -24px;
  padding: 32px;
  min-height: calc(100vh - var(--space-12));
  border-radius: 0;
}
.meta-hub-header { max-width: 900px; margin: 0 auto 32px; text-align: center; padding: 32px 0; }
.meta-hub-eyebrow {
  color: var(--meta-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.meta-hub-title {
  color: var(--meta-text);
  font-size: 36px;
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 12px 0;
  background: linear-gradient(135deg, #fff 0%, var(--meta-text) 60%, var(--meta-accent) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.meta-hub-sub { color: var(--meta-text-muted); font-size: 15px; line-height: 1.55; max-width: 720px; margin: 0 auto 28px; }
.meta-hub-stats { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.meta-hub-stat {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 120px;
}
.meta-hub-stat-num {
  color: var(--meta-text);
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.meta-hub-stat-sep { color: var(--meta-text-muted); font-weight: 400; }
.meta-hub-stat-label { color: var(--meta-text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }
.meta-hub-progress { max-width: 600px; margin: 0 auto; height: 6px; background: rgba(139, 92, 246, 0.18); border-radius: 3px; overflow: hidden; }
.meta-hub-progress-fill { height: 100%; background: linear-gradient(90deg, var(--meta-primary), var(--meta-accent)); transition: width 0.4s; }

.meta-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
}
.meta-course-card {
  position: relative;
  background: rgba(45, 27, 78, 0.55);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  display: flex;
  gap: 16px;
  transition: all 0.18s ease;
  overflow: hidden;
}
.meta-course-card:hover {
  border-color: var(--meta-primary);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.2);
  background: rgba(45, 27, 78, 0.85);
}
.meta-course-card--done {
  border-color: var(--meta-accent);
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.08) 0%, rgba(45, 27, 78, 0.7) 60%);
}
.meta-course-card-num {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--meta-primary), #6d3fc2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--meta-text);
  font-weight: 700;
  font-size: 18px;
}
.meta-course-card--done .meta-course-card-num {
  background: linear-gradient(135deg, var(--meta-accent), #d99422);
  color: #1a0f2e;
}
.meta-course-card-body { flex: 1; min-width: 0; }
.meta-course-card-title { color: var(--meta-text); font-weight: 700; font-size: 15px; line-height: 1.3; margin-bottom: 6px; }
.meta-course-card-goal { color: var(--meta-text-muted); font-size: 12px; line-height: 1.5; margin-bottom: 12px; }
.meta-course-card-meta { display: flex; gap: 6px; align-items: center; color: var(--meta-text-muted); font-size: 11px; margin-bottom: 12px; flex-wrap: wrap; }
.meta-course-card-badge {
  margin-left: auto;
  background: var(--meta-accent-soft);
  color: var(--meta-accent);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.meta-course-card-progress { display: flex; align-items: center; gap: 10px; }
.meta-course-card-progress-bar { flex: 1; height: 4px; background: rgba(139, 92, 246, 0.18); border-radius: 2px; overflow: hidden; }
.meta-course-card-progress-fill { height: 100%; background: linear-gradient(90deg, var(--meta-primary), var(--meta-accent)); transition: width 0.4s; }
.meta-course-card-progress-text { color: var(--meta-text-muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ----- Lesson view ----- */
.meta-lesson-shell { padding: 24px 32px 80px; }
.meta-lesson-topbar { max-width: 900px; margin: 0 auto 16px; }
.meta-back-btn {
  background: transparent;
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--meta-text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 14px;
  transition: all 0.15s;
}
.meta-back-btn:hover { background: var(--meta-primary-soft); color: var(--meta-text); }
.meta-lesson-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.meta-lesson-eyebrow { color: var(--meta-accent); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.meta-lesson-progress-pill {
  background: var(--meta-primary-soft);
  color: var(--meta-text);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.meta-lesson-progress-bar { height: 4px; background: rgba(139, 92, 246, 0.18); border-radius: 2px; overflow: hidden; }
.meta-lesson-progress-fill { height: 100%; background: linear-gradient(90deg, var(--meta-primary), var(--meta-accent)); transition: width 0.4s; }

.meta-lesson-nav-rail {
  display: flex; gap: 6px; flex-wrap: wrap;
  max-width: 900px; margin: 0 auto 24px;
}
.meta-nav-pill {
  width: 32px; height: 32px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--meta-text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: all 0.15s;
}
.meta-nav-pill:hover { background: var(--meta-primary-soft); color: var(--meta-text); border-color: var(--meta-primary); }
.meta-nav-pill--active { background: var(--meta-primary); color: var(--meta-text); border-color: var(--meta-primary); width: auto; padding: 0 10px; }
.meta-nav-pill--done { color: var(--meta-accent); border-color: var(--meta-accent); }
.meta-nav-pill--active.meta-nav-pill--done { background: var(--meta-accent); color: var(--meta-deep-2); }

.meta-lesson-body {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(45, 27, 78, 0.4);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 16px;
  padding: 36px 44px;
  color: var(--meta-text);
  line-height: 1.65;
}
.meta-lesson-h1 {
  color: var(--meta-text);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 24px 0;
  background: linear-gradient(135deg, var(--meta-text) 0%, var(--meta-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.meta-lesson-content h3 {
  color: var(--meta-accent);
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 10px 0;
  letter-spacing: -0.2px;
}
.meta-lesson-content h4 {
  color: var(--meta-primary);
  font-size: 14px;
  font-weight: 700;
  margin: 22px 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.meta-lesson-content p { color: var(--meta-text); font-size: 15px; line-height: 1.7; margin: 0 0 14px 0; }
.meta-lesson-content ul, .meta-lesson-content ol { padding-left: 22px; margin: 0 0 16px 0; color: var(--meta-text); }
.meta-lesson-content li { line-height: 1.65; margin-bottom: 6px; font-size: 14.5px; }
.meta-lesson-content strong { color: var(--meta-text); font-weight: 700; }
.meta-lesson-content em { color: var(--meta-text-muted); font-style: italic; }
.meta-lesson-content .meta-lead { color: var(--meta-text-muted); font-size: 16px; line-height: 1.6; font-style: italic; padding-left: 14px; border-left: 3px solid var(--meta-accent); margin: 0 0 22px; }
.meta-lesson-content .meta-callout {
  background: linear-gradient(135deg, var(--meta-primary-soft) 0%, transparent 100%);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 18px 0;
}
.meta-lesson-content .meta-callout h4 { color: var(--meta-accent); margin-top: 0; }
.meta-lesson-content .meta-takeaway {
  background: var(--meta-accent-soft);
  border-left: 4px solid var(--meta-accent);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--meta-text);
  margin: 18px 0;
  font-size: 14.5px;
}
.meta-lesson-content .meta-framework, .meta-lesson-content .meta-tool, .meta-lesson-content .meta-mistake {
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 14px 0;
}
.meta-lesson-content .meta-anchor {
  font-size: 17px;
  font-style: italic;
  color: var(--meta-accent);
  text-align: center;
  padding: 16px;
  border-top: 1px solid rgba(245, 185, 66, 0.3);
  border-bottom: 1px solid rgba(245, 185, 66, 0.3);
  margin: 24px 0;
  font-weight: 500;
}

.meta-xp-toast {
  margin-top: 20px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--meta-accent) 0%, #e89827 100%);
  color: #1a0f2e;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  animation: metaToastPop 0.5s ease-out;
}
@keyframes metaToastPop {
  0% { transform: scale(0.92); opacity: 0; }
  60% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.meta-badge-banner {
  margin-top: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.18) 0%, rgba(139, 92, 246, 0.18) 100%);
  border: 1px solid var(--meta-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.meta-badge-icon { font-size: 36px; }
.meta-badge-title { color: var(--meta-text); font-weight: 700; font-size: 15px; }
.meta-badge-sub { color: var(--meta-text-muted); font-size: 12px; margin-top: 2px; }

.meta-lesson-footer-nav {
  max-width: 760px;
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.meta-nav-btn {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--meta-text);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  max-width: 320px;
  text-align: left;
  line-height: 1.4;
  transition: all 0.15s;
}
.meta-nav-btn:hover { background: var(--meta-primary); border-color: var(--meta-primary); }
.meta-nav-btn--next, .meta-nav-btn--finish { text-align: right; }
.meta-nav-btn--finish {
  background: linear-gradient(135deg, var(--meta-accent) 0%, #e89827 100%);
  color: #1a0f2e;
  border-color: var(--meta-accent);
  font-weight: 700;
}
.meta-nav-btn--finish:hover { filter: brightness(1.08); }

/* Mobile */
@media (max-width: 720px) {
  .meta-shell { padding: 16px; margin: -16px; }
  .meta-course-banner { flex-direction: column; align-items: stretch; padding: 18px; }
  .meta-banner-right { justify-content: space-around; gap: 8px; }
  .meta-hub-title { font-size: 26px; }
  .meta-hub-stat { min-width: 100px; padding: 10px 14px; }
  .meta-hub-stat-num { font-size: 22px; }
  .meta-courses-grid { grid-template-columns: 1fr; }
  .meta-lesson-body { padding: 22px 18px; }
  .meta-lesson-footer-nav { flex-direction: column; }
  .meta-nav-btn { max-width: 100%; }
}

/* ================================================================
   BATCHES 1 + 2, IMPROVEMENT STYLES
   ================================================================ */

/* --- Lesson metadata bar (top of each course section) --- */
.lesson-meta-bar {
  background: var(--color-surface-alt, #1c1b19);
  border: 1px solid var(--color-border, #393836);
  border-left: 3px solid var(--color-primary, #e2703a);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: var(--space-4, 16px);
}
.lmb-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.lmb-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}
.lmb-stars { color: #f5b942; font-size: 14px; letter-spacing: 1px; }
.lmb-num { color: var(--color-text); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.lmb-text { color: var(--color-text); font-weight: 600; font-size: 13px; }
.lmb-label { color: var(--color-text-muted, #797876); font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; }
.lmb-impact {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border, #393836);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted, #b9b9b9);
}
.lmb-impact-label { color: var(--color-primary, #e2703a); font-weight: 700; margin-right: 6px; }

/* --- Skills & Errors analytics card --- */
.skills-tabs-card { padding: 20px; }
.skill-tabs-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.skill-tabs-nav { display: flex; gap: 4px; background: var(--color-bg, #171614); padding: 3px; border-radius: 8px; }
.skill-tab {
  background: transparent; border: none; color: var(--color-text-muted);
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600; transition: all 0.15s;
}
.skill-tab:hover { color: var(--color-text); }
.skill-tab--active { background: var(--color-primary); color: #000; }
.skill-tabs-body { min-height: 100px; }
.skill-overview-teaser { color: var(--color-text-muted); font-size: 13px; line-height: 1.6; padding: 12px 0; }

.skill-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.analytics-card {
  background: var(--color-bg, #171614);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
}
.analytics-card h3 { font-size: 13px; color: var(--color-text); margin: 0 0 12px 0; font-weight: 700; }
.analytics-empty { color: var(--color-text-muted); font-size: 12px; line-height: 1.5; margin: 0; }
.skill-list, .error-list { display: flex; flex-direction: column; gap: 10px; }
.skill-row, .error-row { display: flex; flex-direction: column; gap: 4px; }
.skill-bar, .error-bar {
  height: 6px; background: var(--color-surface-alt); border-radius: 3px; overflow: hidden;
}
.skill-bar-fill, .error-bar-fill {
  height: 100%; background: var(--color-primary); border-radius: 3px;
}
.error-bar-fill { background: #dc4c4c; }
.skill-meta, .error-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.skill-name, .error-name {
  font-size: 11.5px; color: var(--color-text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skill-stat, .error-stat {
  font-size: 11px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.timing-list { display: flex; flex-direction: column; gap: 12px; }
.timing-row { display: flex; flex-direction: column; gap: 2px; padding: 10px; background: var(--color-surface-alt); border-radius: 8px; }
.timing-name { font-weight: 700; color: var(--color-text); font-size: 12px; text-transform: capitalize; }
.timing-vals { font-size: 11px; color: var(--color-text-muted); }
.timing-delta { font-size: 11px; font-weight: 600; margin-top: 4px; }

.timing-list-large { display: flex; flex-direction: column; gap: 16px; }
.pacing-row {
  background: var(--color-bg, #171614);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
}
.pacing-section { font-weight: 700; color: var(--color-text); font-size: 13px; margin-bottom: 8px; }
.pacing-bar {
  position: relative; height: 10px;
  background: var(--color-surface-alt); border-radius: 5px;
  overflow: hidden; margin-bottom: 10px;
}
.pacing-bar-track { position: absolute; inset: 0; }
.pacing-bar-target { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,0.4); z-index: 2; }
.pacing-bar-actual { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 5px; transition: width 0.4s; }
.pacing-stats {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--color-text-muted);
}
.pacing-stats strong { color: var(--color-text); }

/* --- Reasoning Focus metacognitive filter --- */
.rf-meta-filter {
  margin: 12px 0;
  padding: 12px;
  background: rgba(240, 192, 64, 0.06);
  border: 1px solid rgba(240, 192, 64, 0.2);
  border-radius: 10px;
}
.rf-meta-filter-label { font-size: 11px; color: var(--color-gold, #f5b942); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; }
.rf-meta-filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.rf-pill {
  background: var(--color-surface-alt); border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.rf-pill:hover { color: var(--color-text); border-color: var(--color-gold, #f5b942); }
.rf-pill--active { background: var(--color-gold, #f5b942); color: #000; border-color: var(--color-gold, #f5b942); }

/* --- Flashcard category filter --- */
.fc-category-filter {
  display: flex; gap: 6px; align-items: center;
  margin: 12px 0;
  flex-wrap: wrap;
}
.fc-cat-label { font-size: 11px; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; margin-right: 4px; }
.fc-cat-btn {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.fc-cat-btn:hover { color: var(--color-text); border-color: var(--color-primary); }
.fc-cat-btn--active { background: var(--color-primary); color: #000; border-color: var(--color-primary); }
.fc-cat-count {
  font-size: 10px;
  background: rgba(0,0,0,0.18);
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fc-cat-btn--active .fc-cat-count { background: rgba(0,0,0,0.25); }

/* --- Self-Assessment weakness block (used when SA flow ships) --- */
.sa-weakness-block { margin-top: 16px; }
.sa-weakness-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px;
}
.sa-weakness-card {
  padding: 12px 14px; background: var(--color-surface-alt);
  border-radius: 8px; border-left: 3px solid var(--color-primary);
}
.sa-weakness-pct { font-size: 22px; font-weight: 800; color: var(--color-text); font-variant-numeric: tabular-nums; }
.sa-weakness-label { font-size: 12.5px; color: var(--color-text); margin-top: 2px; }
.sa-weakness-sub { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.sa-error-list { padding-left: 18px; color: var(--color-text); font-size: 13px; line-height: 1.7; }

/* Mobile */
@media (max-width: 720px) {
  .lmb-row { gap: 14px; }
  .lmb-item { min-width: 64px; }
  .skill-analytics-grid { grid-template-columns: 1fr; }
  .skill-tabs-header { flex-direction: column; align-items: flex-start; }
  .pacing-stats { flex-direction: column; gap: 4px; }
}

/* ================================================================
   BATCH 3 STYLES
   ================================================================ */

/* --- Diagnostic flow --- */
.diag-shell {
  max-width: 720px;
  margin: 0 auto;
}
.diag-progress { margin-bottom: 18px; }
.diag-progress-text {
  font-size: 12px; color: var(--color-text-muted, #797876);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600;
}
.diag-section { color: var(--color-primary, #e2703a); }
.diag-progress-bar {
  height: 4px; background: var(--color-surface-alt, #1c1b19);
  border-radius: 2px; overflow: hidden;
}
.diag-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--color-primary, #e2703a), #f5b942);
  transition: width 0.3s;
}
.diag-q-meta { font-size: 11px; color: var(--color-text-muted); margin-bottom: 8px; }
.diag-q-topic {
  background: rgba(226,112,58,0.08);
  color: var(--color-primary, #e2703a);
  padding: 3px 9px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.3px;
}
.diag-q-stem {
  background: var(--color-surface, #1c1b19);
  border: 1px solid var(--color-border, #393836);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 15px; line-height: 1.6;
  color: var(--color-text, #f4f3f0);
  margin-bottom: 16px;
}
.diag-choices { display: flex; flex-direction: column; gap: 8px; }
.diag-choice {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--color-surface-alt, #1f1d1a);
  border: 1px solid var(--color-border, #393836);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
  transition: all 0.12s;
}
.diag-choice:hover {
  border-color: var(--color-primary, #e2703a);
  background: rgba(226,112,58,0.06);
  transform: translateY(-1px);
}
.diag-choice-letter {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-bg, #171614); color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.diag-choice-text { flex: 1; line-height: 1.55; }
.diag-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; gap: 12px;
}
.diag-hint { font-size: 11.5px; color: var(--color-text-muted); }

/* --- Diagnostic results --- */
.diag-results { max-width: 760px; margin: 0 auto; }
.diag-results-header { text-align: center; margin-bottom: 24px; }
.diag-results-eyebrow {
  color: var(--color-primary, #e2703a);
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px;
}
.diag-results-title { font-size: 28px; color: var(--color-text); margin: 0 0 8px; font-weight: 800; }
.diag-results-sub { color: var(--color-text-muted); font-size: 13px; }

.diag-overall-card {
  background: var(--color-surface, #1c1b19);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.diag-overall-pct { font-size: 56px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.diag-overall-label { color: var(--color-text-muted); font-size: 13px; margin-top: 4px; }
.diag-overall-time { color: var(--color-text-muted); font-size: 11px; margin-top: 10px; opacity: 0.7; }

.diag-section-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px;
  margin-bottom: 24px;
}
.diag-result-section {
  background: var(--color-surface-alt, #201f1d);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.diag-result-section-name { font-size: 12px; color: var(--color-text); font-weight: 600; margin-bottom: 6px; }
.diag-result-section-pct { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.diag-result-section-sub { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }

.diag-h3 { font-size: 14px; color: var(--color-text); font-weight: 700; margin: 24px 0 10px; }
.diag-weakness-list { display: flex; flex-direction: column; gap: 8px; }
.diag-weakness-row {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center;
  background: var(--color-surface-alt); border: 1px solid var(--color-border);
  border-radius: 8px; padding: 10px 14px;
}
.diag-weakness-name { font-size: 12.5px; color: var(--color-text); font-weight: 600; }
.diag-weakness-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.diag-weakness-bar-fill { height: 100%; transition: width 0.4s; }
.diag-weakness-stat { font-size: 11px; color: var(--color-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.diag-error-list { padding-left: 18px; color: var(--color-text); font-size: 13px; line-height: 1.7; }

.diag-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

/* --- Learning Path summary banner --- */
.lp-summary {
  background: rgba(226,112,58,0.08);
  border: 1px solid rgba(226,112,58,0.25);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--color-text);
  margin-bottom: var(--space-3, 12px);
}
.lp-summary strong { color: var(--color-primary, #e2703a); }
.lp-summary-warn { background: rgba(245, 185, 66, 0.1); border-color: rgba(245, 185, 66, 0.4); }
.lp-summary-warn strong { color: #f5b942; }
.lp-list { display: flex; flex-direction: column; gap: 8px; }
.lp-source {
  margin-top: 16px; font-size: 12px; color: var(--color-text-muted);
  text-align: center; padding-top: 12px; border-top: 1px solid var(--color-border);
}
.lp-milestone {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, rgba(245,185,66,0.1) 0%, rgba(245,185,66,0.04) 100%);
  border: 1px solid rgba(245,185,66,0.3);
  border-left: 3px solid #f5b942;
  border-radius: 10px;
  padding: 14px 16px;
}
.lp-milestone-icon { font-size: 24px; }
.lp-milestone-body { flex: 1; }
.lp-milestone-title { color: var(--color-text); font-weight: 700; font-size: 14px; }
.lp-milestone-date { color: var(--color-text-muted); font-size: 12px; margin-top: 2px; }

/* --- Knowledge Check widget --- */
.kc-widget {
  background: var(--color-surface, #1c1b19);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary, #e2703a);
  border-radius: 10px;
  padding: 16px;
  margin: 14px 0 22px;
}
.kc-intro { font-size: 13px; color: var(--color-text-muted); margin-bottom: 14px; }
.kc-intro strong { color: var(--color-text); }
.kc-questions { display: flex; flex-direction: column; gap: 18px; margin-bottom: 14px; }
.kc-q { padding: 12px; background: var(--color-bg, #171614); border-radius: 8px; }
.kc-q-stem { font-size: 14px; color: var(--color-text); margin-bottom: 10px; line-height: 1.55; }
.kc-q-options { display: flex; flex-direction: column; gap: 6px; }
.kc-opt {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text);
  transition: all 0.12s;
}
.kc-opt:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: rgba(226,112,58,0.05);
}
.kc-opt:disabled { cursor: default; }
.kc-opt--selected {
  border-color: var(--color-primary, #e2703a);
  background: rgba(226,112,58,0.08);
}
.kc-opt--correct {
  border-color: #e2703a !important;
  background: rgba(226,112,58,0.15) !important;
}
.kc-opt--correct-unselected {
  border: 1px dashed #e2703a !important;
  opacity: 0.7;
}
.kc-opt--wrong {
  border-color: #dc4c4c !important;
  background: rgba(220, 76, 76, 0.12) !important;
}
.kc-opt-letter {
  flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-bg); color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.kc-opt-text { flex: 1; line-height: 1.5; }
.kc-actions { display: flex; gap: 10px; }

.kc-feedback {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid;
}
.kc-feedback--pass {
  background: rgba(226,112,58,0.08);
  border-color: rgba(226,112,58,0.4);
}
.kc-feedback--fail {
  background: rgba(245, 185, 66, 0.08);
  border-color: rgba(245, 185, 66, 0.4);
}
.kc-feedback-pct { font-size: 22px; font-weight: 800; color: var(--color-text); }
.kc-feedback-msg { font-size: 13px; color: var(--color-text); margin-top: 6px; }
.kc-feedback-explanations {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}
.kc-fb-q { font-size: 12.5px; line-height: 1.6; color: var(--color-text); }
.kc-feedback-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* --- Adaptive practice card --- */
.adaptive-practice-card { border-left: 3px solid #f5b942; }
.adaptive-practice-card h3 { display: flex; align-items: center; gap: 10px; }
.badge-new {
  background: linear-gradient(135deg, #f5b942, #e89827);
  color: #000;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .diag-q-stem, .kc-q-stem { font-size: 14px; }
  .diag-results-title { font-size: 22px; }
  .diag-overall-pct { font-size: 44px; }
  .diag-weakness-row { grid-template-columns: 1fr; gap: 6px; }
}/* ============================================================================
 * SIMULATION ENGINE V2 STYLES
 * SSO grid, color-coded timer, review/edit table, sortable table,
 * results cards.
 * ========================================================================== */
/* SSO (Section Selection Order) grid */


/* Sim quiz header tweaks */
.sim-quiz-header { flex-wrap: wrap; gap: var(--space-3); }
.sim-quiz-header .sim-section-label {
  display: inline-block;
  padding: 2px 8px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: var(--space-2);
}
.sim-quiz-header .sim-progress-num {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: var(--text-sm);
}

/* Sim color-coded timer */
.sim-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: var(--text-base);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  transition: all 0.3s ease;
  min-width: 72px; text-align: center;
}
.sim-timer-green {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}
.sim-timer-yellow {
  color: #ca8a04;
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.4);
}
.sim-timer-orange {
  color: #ea580c;
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.4);
}
.sim-timer-red {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  animation: simTimerPulse 1.5s ease-in-out infinite;
}
@keyframes simTimerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.04); }
}

/* Sortable table (Table Analysis) */
.sim-table th {
  user-select: none;
  background: var(--color-surface);
  position: relative;
  transition: background 0.15s;
}
.sim-table th:hover { background: var(--color-bg, var(--color-surface)); }

/* Section review / edit screen */
.sim-review-header {
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: linear-gradient(135deg, rgba(124,92,255,0.06), rgba(226,112,58,0.04));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.sim-review-table {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sim-review-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px 50px 110px;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
.sim-review-row:last-child { border-bottom: 0; }
.sim-review-row.sim-review-head {
  background: var(--color-bg, var(--color-surface));
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.sim-review-row.flagged {
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid #f59e0b;
}
.sim-review-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.sim-review-letter {
  display: inline-block;
  padding: 4px 10px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sim-review-blank {
  color: var(--color-error, #dc2626);
  font-style: italic;
}
.sim-review-flag { font-size: var(--text-base); color: #f59e0b; }
.sim-review-type {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Sim results screen */
.sim-results-container { max-width: 1100px; margin: 0 auto; }
.sim-results-hero {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  background: linear-gradient(135deg, rgba(124,92,255,0.08), rgba(226,112,58,0.06));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}
.sim-total-score {
  font-family: var(--font-display, var(--font-body));
  font-weight: 900;
  font-size: 5.5rem;
  line-height: 1;
  margin: var(--space-3) 0 var(--space-1) 0;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.sim-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.sim-result-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.sim-result-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-3);
}
.sim-result-card-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sim-result-card-score {
  font-family: var(--font-display, var(--font-body));
  font-weight: 800;
  font-size: var(--text-3xl);
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.sim-result-scale {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  font-weight: 500;
}
.sim-result-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  font-size: var(--text-xs);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.sim-result-card-stats .muted {
  color: var(--color-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sim-result-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.sim-result-topic-row {
  display: grid;
  grid-template-columns: 2fr 3fr 50px;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
}
.sim-result-topic-sec {
  display: inline-block;
  padding: 1px 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  margin-right: var(--space-1);
  color: var(--color-text-muted);
}
.sim-result-topic-bar {
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}
.sim-result-topic-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-error, #dc2626), var(--color-warning, #f59e0b), var(--color-success, #10b981));
  background-size: 200% 100%;
  background-position: right;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.sim-result-topic-pct {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--color-text-muted);
}
.sim-result-error-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
.sim-result-error-row:last-child { border-bottom: 0; }
.sim-result-error-count {
  font-weight: 700;
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error, #dc2626);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
}

/* Mobile */
@media (max-width: 768px) {
  .sim-total-score { font-size: 3.5rem; }
  .sim-result-2col { grid-template-columns: 1fr; }
  .sim-review-row { grid-template-columns: 40px 1fr 80px 30px 90px; gap: 4px; padding: var(--space-2) var(--space-3); }
  .sim-review-row .sim-review-type { display: none; }
}

/* ============================================================================
 * REVIEW MISTAKES, list of clickable summary rows + modal overlay
 * Replaces the old stacked card layout that dumped raw question content.
 * ========================================================================== */
.review-mistakes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3);
}
.review-mistake-row {
  appearance: none;
  text-align: left;
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  font-family: inherit;
  color: var(--color-text);
}
.review-mistake-row:hover {
  background: rgba(124, 92, 255, 0.05);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.review-mistake-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.review-mistake-section { font-weight: 600; color: var(--color-primary); text-transform: capitalize; }
.review-mistake-diff { text-transform: capitalize; }
.review-mistake-result { color: var(--color-error); margin-left: auto; }
.review-mistake-result .x-mark { margin-right: 4px; font-weight: 700; }
.review-mistake-sep { color: var(--color-text-muted); opacity: 0.5; }
.review-mistake-preview {
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text);
}
.review-mistake-cta {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
}

/* Modal overlay shown when a mistake card is clicked. */
.review-mistake-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  overflow-y: auto;
  backdrop-filter: blur(4px);
}
.review-mistake-modal {
  position: relative;
  background: var(--color-bg, var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  padding: var(--space-6);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  color: var(--color-text);
  margin: auto;
}
.review-mistake-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.review-mistake-close:hover { background: var(--color-surface-dynamic); }
.review-mistake-modal-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: capitalize;
  margin-bottom: var(--space-3);
  letter-spacing: 0.04em;
}
.review-mistake-modal-question {
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
  line-height: 1.7;
}
.review-mistake-modal-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-4);
}
.review-choice {
  padding: 10px var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}
.review-choice.correct {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.5);
  color: #10b981;
  font-weight: 600;
}
.review-choice.wrong {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  font-weight: 600;
}
.review-choice-letter { font-weight: 700; min-width: 28px; }
.review-choice-mark { margin-left: auto; font-weight: 700; }

/* ============================================================================
 * CHART DESCRIPTION TOGGLE
 * Sits directly below a chart and reveals the original prose description
 * (the GRAPH: text) on click. Lets users compare the rendered chart against
 * the source description when troubleshooting.
 * ========================================================================== */
.chart-desc-wrap {
  margin: 4px 0 var(--space-3) 0;
  text-align: right;
}
.chart-desc-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.chart-desc-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(124, 92, 255, 0.06);
}
.chart-desc-body {
  margin-top: 8px;
  padding: var(--space-3);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-dynamic, rgba(124, 92, 255, 0.03));
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: 1.6;
  text-align: left;
  font-style: italic;
}
@media (max-width: 600px) {
}/* Column-header strip aligned to the radio columns below.
   Use minmax so columns grow when titles are long ("primary unintended
   consequence most likely to result from POLICY 1") but never shrink
   below 150px. The value column gets whatever's left. */
/* Visual divider between the two header columns and the spacer column. */
/* The instructions strip is shown as a thin caption directly below the headers,
   not as an empty body block. */




/* Question text \u2014 ensure paragraph breaks render as gaps */
.question-text p { margin: 0 0 var(--space-3) 0; line-height: 1.7; }
.question-text p:last-child { margin-bottom: 0; }
.question-text ul, .question-text ol { margin: var(--space-2) 0; padding-left: var(--space-5); line-height: 1.7; }

/* Rationale split layout */
.rationale-block { margin: var(--space-3) 0; padding: var(--space-4); border-radius: var(--radius-lg); }
.rationale-correct {
  background: rgba(16, 185, 129, 0.06);
  border-left: 4px solid #10b981;
}
.rationale-incorrect {
  background: rgba(239, 68, 68, 0.05);
  border-left: 4px solid #ef4444;
}
.rationale-block-title {
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.rationale-correct .rationale-block-title { color: #059669; }
.rationale-incorrect .rationale-block-title { color: #dc2626; }
.rationale-correct .rationale-block-title::before { content: "\2713"; font-size: 16px; }
.rationale-incorrect .rationale-block-title::before { content: "\2715"; font-size: 16px; }
.rationale-choice-row {
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.rationale-choice-row:last-child { border-bottom: 0; }
.rationale-choice-row p { margin: 4px 0; line-height: 1.6; }
.rationale-choice-row p:last-child { margin-bottom: 0; }
.rationale-choice-letter {
  display: inline-block;
  font-weight: 800;
  color: var(--color-text);
  margin-right: var(--space-2);
  min-width: 20px;
}
.rationale-incorrect .rationale-choice-letter { color: #dc2626; }
.rationale-correct .rationale-choice-letter { color: #059669; }
.rationale-misconception {
  margin: 4px 0 6px 0;
  color: var(--color-text);
}
.rationale-remediation {
  margin-top: 4px;
  padding: 6px var(--space-3);
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.rationale-remediation strong { color: var(--color-primary); }

@media (max-width: 768px) {/* On narrow screens, drop the radio columns to a fixed minmax so the value
     column still reads. Header stays aligned with the rows. */

}

/* Source N blocks, improved layout (already partially styled by .source-block) */
.source-block {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  margin: var(--space-3) 0;
  overflow: hidden;
  background: var(--color-surface);
}
.source-block .source-label {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.10), rgba(226,112,58,0.06));
  padding: var(--space-2) var(--space-4);
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-border);
}
.source-block .source-sub {
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--text-sm);
}
.source-block .source-content {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text);
}
.source-block .source-content p { margin: 0 0 var(--space-2) 0; }
.source-block .source-content p:last-child { margin: 0; }

/* Question chart container */
.question-chart-container {
  width: 100%;
  max-width: 720px;
  height: 380px;
  margin: var(--space-3) auto;
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.question-chart-container canvas {
  max-height: 100%;
}

@media (max-width: 768px) {
  .question-chart-container { height: 280px; padding: var(--space-2); }
}

/* ============================================================
   COURSE LESSON LAYOUT (May 2026 redesign)
   Section titles, exam-relevance grid, tips/traps blocks, etc.
   ============================================================ */

/* Highlighted section titles, colour-coded by kind */
.lesson-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-7) 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-text);
  background: rgba(96,165,250,0.08);
  border-left: 4px solid var(--color-primary);
}
.lesson-section-title:first-child { margin-top: 0; }
.lesson-section-title .lst-icon { font-size: 1.05em; line-height: 1; }
.lesson-section-title .lst-label { font-size: 1em; }

.section-title-objectives { background: rgba(226,112,58,0.10); border-left-color: #e2703a; }
.section-title-relevance  { background: rgba(96,165,250,0.10); border-left-color: #60a5fa; }
.section-title-prereq     { background: rgba(168,139,250,0.10); border-left-color: #a88bfa; }
.section-title-concepts   { background: rgba(168,139,250,0.10); border-left-color: #a88bfa; }
.section-title-concept    { background: rgba(232,152,39,0.10); border-left-color: #e89827; }
.section-title-howto      { background: rgba(226,112,58,0.10); border-left-color: #e2703a; }
.section-title-tips       { background: rgba(96,165,250,0.10); border-left-color: #60a5fa; }
.section-title-traps      { background: rgba(220,76,76,0.10); border-left-color: #dc4c4c; }
.section-title-check      { background: rgba(232,152,39,0.10); border-left-color: #e89827; }
.section-title-practice   { background: rgba(226,112,58,0.10); border-left-color: #e2703a; }
.section-title-summary    { background: rgba(168,139,250,0.10); border-left-color: #a88bfa; }

/* Exam Relevance grid
   ----------------------------------------------------------------
   Three-card metric strip rendered inside every lesson page after
   the "Exam Relevance" section title. Cards: Frequency (1–5 stars),
   Difficulty range (e.g. 66–75), Time Budget (e.g. 2.0 min/q).
   The Frequency card gets a special yellow accent so the stars
   read as a rating rather than as text. */
.exam-relevance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
}
.er-cell {
  position: relative;
  background: linear-gradient(180deg, var(--color-surface-dynamic) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.er-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(96,165,250,0.45);
}
.er-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 8px;
}
.er-value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: 0.02em;
}
/* First cell is Frequency, stars get the yellow/gold treatment so they
   visually read as a rating rather than as plain text. We also bump the
   font-size slightly and add a soft text-shadow for depth. */
.exam-relevance .er-cell:first-child {
  background: linear-gradient(180deg, rgba(245,196,77,0.08) 0%, rgba(245,196,77,0.02) 100%);
  border-color: rgba(245,196,77,0.30);
}
.exam-relevance .er-cell:first-child .er-value {
  color: #f5c44d;
  font-size: 1.4rem;
  letter-spacing: 0.10em;
  text-shadow: 0 0 12px rgba(245,196,77,0.35);
}
/* Difficulty card, subtle blue accent to visually echo the section title */
.exam-relevance .er-cell:nth-child(2) {
  background: linear-gradient(180deg, rgba(96,165,250,0.06) 0%, rgba(96,165,250,0.01) 100%);
  border-color: rgba(96,165,250,0.25);
}
.exam-relevance .er-cell:nth-child(2) .er-value {
  color: #93c5fd;
}
/* Time Budget card, mint accent to match brand primary */
.exam-relevance .er-cell:nth-child(3) {
  background: linear-gradient(180deg, rgba(226,112,58,0.06) 0%, rgba(226,112,58,0.01) 100%);
  border-color: rgba(226,112,58,0.25);
}
.exam-relevance .er-cell:nth-child(3) .er-value {
  color: #e2703a;
}
.exam-relevance-impact {
  background: linear-gradient(135deg, rgba(96,165,250,0.10) 0%, rgba(96,165,250,0.04) 100%);
  border: 1px solid rgba(96,165,250,0.22);
  border-left: 3px solid #60a5fa;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.65;
}
.er-impact-label {
  font-weight: 700;
  color: #60a5fa;
  margin-right: 6px;
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
}

/* Prerequisites with friendly names */
.prereq-list { list-style: none; padding: 0; margin: 0; }
.prereq-list li {
  background: var(--color-surface-dynamic);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.prereq-list li::before { content: '→'; color: var(--color-primary); font-weight: 700; }
.prereq-code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-left: auto;
  padding: 2px 6px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
}

/* Definition box */
.definition-box {
  background: rgba(232,152,39,0.06);
  border: 1px solid rgba(232,152,39,0.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.def-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: #e89827;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.def-body { font-size: var(--text-sm); line-height: 1.7; color: var(--color-text); }

/* Concept chunks (sub-sections of Core Concept) */
.concept-chunk {
  background: var(--color-surface-dynamic);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}
.concept-chunk-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 var(--space-2);
  text-transform: none;
  letter-spacing: 0;
}
.concept-chunk p { margin: 0 0 var(--space-2); }
.concept-chunk p:last-child { margin-bottom: 0; }

/* Inline list rendered from "(1) ... (2) ... (3) ..." prose */
.course-inline-list {
  list-style: decimal;
  margin: var(--space-2) 0 var(--space-3) var(--space-6);
  padding: 0;
}
.course-inline-list li {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

/* Inline tables (worked example tables) */
.course-inline-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-2) 0 var(--space-3);
  font-size: var(--text-sm);
}
.course-inline-table th, .course-inline-table td {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  text-align: left;
}
.course-inline-table thead {
  background: var(--color-surface-dynamic);
  font-weight: 700;
}

/* Worked example tabs */
.we-tabs {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--space-3) 0;
  background: var(--color-surface-dynamic);
}
.we-tabs-strip {
  display: flex;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--color-border);
}
.we-tab {
  padding: 8px 14px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  border: none;
  border-right: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.we-tab:hover { color: var(--color-text); background: rgba(96,165,250,0.06); }
.we-tab--active {
  background: var(--color-surface-dynamic);
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}
.we-tab-body {
  padding: var(--space-3) var(--space-4);
  display: none;
}
.we-tab-body--active { display: block; }
.we-tab-body-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

/* Worked example answer choices */
.we-options { list-style: none; padding: 0; margin: var(--space-2) 0 var(--space-3); }
.we-options li {
  display: flex;
  gap: var(--space-2);
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  font-size: var(--text-sm);
  background: var(--color-surface-dynamic);
}
.we-opt-letter {
  font-weight: 700;
  color: var(--color-primary);
  min-width: 22px;
}

.we-steps-label {
  font-size: var(--text-sm);
  font-weight: 700;
  margin: var(--space-3) 0 var(--space-2);
  color: var(--color-text);
}

.key-insight {
  background: rgba(226,112,58,0.08);
  border: 1px solid rgba(226,112,58,0.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.ki-label {
  display: inline-block;
  font-weight: 700;
  color: #e2703a;
  margin-right: 6px;
}

/* Recap of Key Steps (formerly "How to Apply") */
.howto-title { color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: var(--space-2); }
.howto-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.howto-steps .howto-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-dynamic);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.howto-step-tag {
  flex-shrink: 0;
  background: var(--color-primary);
  color: #000;
  font-weight: 700;
  font-size: var(--text-xs);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.howto-step-body { flex: 1; color: var(--color-text); }

/* GRE Tips block */
.tips-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.tip-card {
  background: rgba(96,165,250,0.06);
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.tip-card-header {
  display: inline-block;
  background: var(--color-primary);
  color: #000;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-2);
}
.tip-card-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}
.tip-card-body {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.65;
  margin-bottom: var(--space-2);
}
.tip-card-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-top: 4px;
}
.tip-meta-label { font-weight: 700; margin-right: 4px; font-style: normal; }
.tip-use { color: #e2703a; }
.tip-avoid { color: #dc4c4c; }

/* Traps & Mistakes tables */
.traps-mistakes-section { margin-bottom: var(--space-4); }
.tm-table-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.traps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.traps-table thead {
  background: rgba(220,76,76,0.10);
}
.traps-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 700;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.traps-table td {
  padding: 10px 12px;
  vertical-align: top;
  border: 1px solid var(--color-border);
  line-height: 1.55;
}
.traps-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.12); }
.traps-table tbody tr:hover { background: rgba(96,165,250,0.04); }

/* Knowledge Check threshold note */
.kc-threshold {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

/* Summary of Key Concepts */
.summary-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3);
}
.summary-list li {
  background: rgba(168,139,250,0.06);
  border: 1px solid rgba(168,139,250,0.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.summary-key {
  display: inline-block;
  font-weight: 700;
  color: #a88bfa;
  margin-right: 4px;
}
.summary-anchor {
  background: rgba(226,112,58,0.08);
  border-left: 3px solid #e2703a;
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  border-radius: var(--radius-sm);
}

/* ============================================================
   KNOWLEDGE CHECK MINI TEST ENGINE, animated
   ============================================================ */
.kc-widget {
  background: var(--color-surface-dynamic);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-3) 0 var(--space-5);
  animation: kcFadeIn 0.4s ease;
}
@keyframes kcFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.kc-intro {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.kc-q {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.kc-q:last-child { border-bottom: none; padding-bottom: 0; }
.kc-q-stem {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
  line-height: 1.55;
}
.kc-q-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kc-opt {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.kc-opt:hover:not(:disabled) {
  background: rgba(96,165,250,0.08);
  border-color: rgba(96,165,250,0.4);
  transform: translateY(-1px);
}
.kc-opt-letter {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-surface-dynamic);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
}
.kc-opt--selected {
  background: rgba(96,165,250,0.12);
  border-color: var(--color-primary);
}
.kc-opt--selected .kc-opt-letter {
  background: var(--color-primary);
  color: #000;
  border-color: var(--color-primary);
}
.kc-opt--correct {
  background: rgba(226,112,58,0.18);
  border-color: #e2703a;
  animation: kcCorrectPulse 0.6s ease;
}
.kc-opt--correct .kc-opt-letter { background: #e2703a; color: #000; border-color: #e2703a; }
.kc-opt--wrong {
  background: rgba(220,76,76,0.18);
  border-color: #dc4c4c;
  animation: kcShake 0.4s ease;
}
.kc-opt--wrong .kc-opt-letter { background: #dc4c4c; color: #fff; border-color: #dc4c4c; }
.kc-opt--correct-unselected {
  background: rgba(226,112,58,0.08);
  border-color: rgba(226,112,58,0.4);
  border-style: dashed;
}
@keyframes kcCorrectPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226,112,58,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(226,112,58,0); }
}
@keyframes kcShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
.kc-actions { margin-top: var(--space-3); }
.kc-feedback {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  text-align: center;
  animation: kcFadeIn 0.5s ease;
}
.kc-feedback--pass { background: rgba(226,112,58,0.12); border: 1px solid #e2703a; }
.kc-feedback--fail { background: rgba(220,76,76,0.12); border: 1px solid #dc4c4c; }
.kc-feedback-emoji {
  font-size: 64px;
  display: inline-block;
  animation: kcEmojiPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  margin-bottom: var(--space-2);
}
.kc-feedback--pass .kc-feedback-emoji { animation-name: kcEmojiBounce; color: #e2703a; }
.kc-feedback--fail .kc-feedback-emoji { color: #dc4c4c; }
@keyframes kcEmojiPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes kcEmojiBounce {
  0% { transform: scale(0); opacity: 0; }
  40% { transform: scale(1.25); opacity: 1; }
  60% { transform: scale(0.95); }
  80% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.kc-feedback-pct {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  margin: var(--space-1) 0;
}
.kc-feedback-msg {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}
.kc-feedback-explanations {
  text-align: left;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.kc-fb-q {
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  line-height: 1.55;
  color: var(--color-text);
}
.kc-fb-q-stem { font-weight: 600; margin-bottom: 2px; }
.kc-fb-q-correct { color: #e2703a; font-weight: 600; }
.kc-fb-q-explain { color: var(--color-text-muted); }
.kc-feedback-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

/* Performance Insights, Overview tab */
.insight-overview { display: flex; flex-direction: column; gap: var(--space-4); }
.insight-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-3); }
.insight-stat {
  background: var(--color-surface-dynamic);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
}
.insight-stat-num {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}
.insight-stat-lbl {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.insight-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.insight-row {
  display: grid;
  grid-template-columns: 180px 1fr 60px 70px;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.insight-row:last-child { border-bottom: none; }
.insight-row-label { font-size: var(--text-sm); font-weight: 600; }
.insight-row-bar { height: 8px; background: var(--color-surface-dynamic); border-radius: var(--radius-full); overflow: hidden; }
.insight-row-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.3s ease; }
.insight-row-stat { font-size: var(--text-sm); font-weight: 700; text-align: right; }
.insight-row-meta { font-size: var(--text-xs); color: var(--color-text-muted); text-align: right; }
.insight-callouts { display: flex; flex-direction: column; gap: var(--space-2); }
.insight-callout {
  background: rgba(96,165,250,0.06);
  border-left: 3px solid var(--color-primary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}
.insight-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
}
@media (max-width: 640px) {
  .insight-row { grid-template-columns: 1fr 60px; gap: var(--space-2); }
  .insight-row-bar, .insight-row-meta { display: none; }
}

/* ============================================================
   WORKED-EXAMPLE SHAPE-SPECIFIC RENDERERS
   ============================================================ */

/* (removed) */
.we-twopart-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-2) 0 var(--space-3);
  font-size: var(--text-sm);
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.we-twopart-table thead th {
  background: rgba(96,165,250,0.10);
  color: var(--color-primary);
  font-weight: 700;
  text-align: center;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.we-twopart-table tbody td {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  vertical-align: middle;
}
.we-twopart-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.10); }
.we-twopart-table tbody td:first-child,
.we-twopart-table tbody td:nth-child(2) {
  text-align: center;
  width: 100px;
}
.we-twopart-radio {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
}

/* Table-Analysis statements */
.we-statements-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-2) 0 var(--space-3);
  font-size: var(--text-sm);
}
.we-statements-table th {
  background: rgba(168,139,250,0.10);
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.we-statements-table td {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  vertical-align: top;
  line-height: 1.55;
}
.we-statements-table td:first-child { width: 50px; text-align: center; }
.we-statements-table td:last-child { width: 100px; text-align: center; font-weight: 700; }
.we-stmt-ans-true { color: #e2703a; }
.we-stmt-ans-false { color: #dc4c4c; }

.we-table-desc {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin: var(--space-2) 0;
}
.we-task {
  font-size: var(--text-sm);
  margin: var(--space-3) 0 var(--space-2);
}

/* Graphics-Interpretation chart */
.we-chart {
  margin: var(--space-3) 0;
  background: #0f1419;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}
.we-chart svg {
  width: 100%;
  height: auto;
  display: block;
}
.we-scenario {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin: var(--space-2) 0;
}

/* Correct-answer block (handles dict/list/scalar) */
.we-correct-answer {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(226,112,58,0.08);
  border-left: 3px solid #e2703a;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.we-answer-grid {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 14px;
}
.we-answer-grid li {
  background: rgba(226,112,58,0.06);
  border: 1px solid rgba(226,112,58,0.2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.we-answer-value {
  display: inline-block;
  font-weight: 700;
  color: #e2703a;
  margin-left: 4px;
}

/* ============================================================
   SIMULATION QUESTION RENDERER (May 2026 overhaul)
   ============================================================ */

/* Simulation pipe-table conversion */
.sim-table-rendered {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-3) 0;
  font-size: var(--text-sm);
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sim-table-rendered thead {
  background: rgba(96,165,250,0.10);
}
.sim-table-rendered th, .sim-table-rendered td {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}
.sim-table-rendered th {
  font-weight: 700;
  color: var(--color-text);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sim-table-rendered tbody tr:nth-child(even) { background: rgba(0,0,0,0.10); }
.sim-table-rendered tbody tr:hover { background: rgba(96,165,250,0.04); }
.sim-table-sortable th { user-select: none; }

/* Composite (multi-panel) charts in simulations */
.sim-composite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-4);
  margin: var(--space-4) 0;
}
.sim-composite-grid .sim-composite-panel {
  margin: 0;
}
.sim-composite-grid .sim-composite-panel canvas {
  max-height: 260px;
}

/* GI Dual-Dropdown questions */
.sim-gi-context {
  margin-bottom: var(--space-4);
  color: var(--color-text);
  line-height: 1.7;
}
.sim-gi-instruction {
  margin: var(--space-4) 0 var(--space-3) 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-elevated, rgba(255,255,255,0.04));
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
}
.sim-gi-dd-statements {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.sim-gi-dd-statement {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--color-text);
}
.sim-gi-dd-select {
  display: inline-block;
  margin: 0 var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  min-width: 140px;
  max-width: 100%;
}
.sim-gi-dd-select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.sim-gi-dd-select option {
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-2);
}/* Post-submit colour cues for GI dual-dropdown selects */

.sim-gi-dd-select:disabled {
  opacity: 0.95;
  cursor: not-allowed;
}

/* ===== Email preference toggle switch =====
 * Pure-CSS iOS-style switch used on the Manage notifications panel.
 * Hidden checkbox provides accessibility; the visual track + knob are
 * rendered by the adjacent <span>.
 */
.email-pref-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.email-pref-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.email-pref-switch span {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--color-border, #2d2d44);
  border-radius: 24px;
  transition: background 0.2s ease;
}
.email-pref-switch span::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.email-pref-switch input:checked + span {
  background: #e2703a;
}
.email-pref-switch input:checked + span::before {
  transform: translateX(20px);
}
.email-pref-switch input:disabled + span {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Promotions UI \u2014 utility chips and stat-card. Minimal additions to keep
   the admin promotions dashboard consistent with the rest of admin views. */
.stat-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.badge-green  { background: rgba(34,197,94,0.15);  color: #4ade80; }
.badge-yellow { background: rgba(250,204,21,0.15); color: #facc15; }
.badge-red    { background: rgba(239,68,68,0.15);  color: #f87171; }
.badge-grey   { background: rgba(148,163,184,0.15);color: #cbd5e1; }
.btn-xs {
  font-size: 11px;
  padding: 4px 10px;
}

/* Chart sizing (Nov 2026): charts fill a fixed-height container instead of
   a fixed aspect ratio, so they keep their proportions on narrow screens. */
.question-chart-container { position: relative; height: 380px; max-height: none; box-sizing: border-box; }
.question-chart-container canvas { max-height: none; }
.sim-composite-grid .sim-composite-panel { height: 340px; margin: 0; }
.sim-composite-grid .sim-composite-panel canvas { max-height: none; }
@media (max-width: 768px) {
  .question-chart-container { height: 300px; }
  .sim-composite-grid { grid-template-columns: 1fr; }
  .sim-composite-grid .sim-composite-panel { height: 300px; }
}

/* =============================================================
   LESSON COPY BLOCKS (lc-*): formula lines, inline examples,
   "Watch out" callouts, statement lists. Used inside concept
   chunks, tip cards, insights and Test Mastery modules.
   ============================================================= */
.lc-formula {
  display: block;
  margin: var(--space-2) 0 var(--space-3);
  padding: 8px 14px;
  background: rgba(0,0,0,0.22);
  border: 1px dashed rgba(226,112,58,0.35);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.lc-formula + .lc-formula { margin-top: calc(-1 * var(--space-2)); border-top-style: none; border-top-left-radius: 0; border-top-right-radius: 0; }
.lc-example {
  position: relative;
  margin: var(--space-3) 0;
  padding: 12px 14px 10px 16px;
  background: rgba(96,165,250,0.05);
  border-left: 2px solid rgba(96,165,250,0.55);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--text-sm);
  line-height: 1.65;
}
.lc-example-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-blue, #60a5fa);
}
.lesson-content .lc-example p, .lc-example p { margin: 0 0 6px; max-width: none; }
.lesson-content .lc-steps, .lc-steps {
  list-style: none;
  margin: 4px 0 2px;
  padding: 0;
  counter-reset: lcstep;
  line-height: 1.6;
}
.lc-steps li {
  position: relative;
  padding: 3px 0 3px 26px;
  counter-increment: lcstep;
}
.lc-steps li::before {
  content: counter(lcstep);
  position: absolute;
  left: 0; top: 5px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: rgba(96,165,250,0.16);
  color: var(--color-blue, #60a5fa);
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.lc-steps li + li { border-top: 1px solid rgba(255,255,255,0.04); }
.lc-watch {
  margin: var(--space-3) 0 var(--space-1);
  padding: 10px 14px;
  background: rgba(251,191,36,0.07);
  border: 1px solid rgba(251,191,36,0.28);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.lc-watch-label {
  display: inline-block;
  margin-right: 6px;
  font-weight: 700;
  color: var(--color-warning, #fbbf24);
}
.lc-watch p { margin: 4px 0 0; max-width: none; }
.lesson-content .lc-statements, .lc-statements {
  list-style: none;
  margin: var(--space-2) 0 var(--space-3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.16);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.lc-statements li { padding: 2px 0; }
.lc-stmt-num { display: inline-block; min-width: 30px; font-weight: 700; color: var(--color-primary); }

/* Lists inside lesson boxes: tighter than page-level lists */
.concept-chunk ul:not(.course-inline-list):not(.lc-steps):not(.lc-statements),
.concept-chunk ol:not(.course-inline-list):not(.lc-steps),
.tip-card-body ul, .tip-card-body ol, .def-body ul, .def-body ol, .key-insight ul, .key-insight ol {
  margin: 4px 0 var(--space-2) 20px;
  padding: 0;
  line-height: 1.6;
}
.concept-chunk li, .tip-card-body li, .def-body li, .key-insight li { margin-bottom: 4px; }
.concept-chunk li::marker, .tip-card-body li::marker, .key-insight li::marker { color: var(--color-primary); }
.tip-card-body p, .def-body p, .key-insight p { margin: 0 0 6px; max-width: none; }
.tip-card-body p:last-child, .def-body p:last-child, .key-insight p:last-child, .lc-example > :last-child { margin-bottom: 0; }
.key-insight > p:first-of-type { display: inline; }
.concept-chunk > p { max-width: 72ch; }

/* Worked-example problem statements: keep DS statements and choices readable */
.worked-example .we-options li { align-items: baseline; }

/* Test Mastery (meta) theme variants */
.meta-lesson-content .lc-formula { border-color: rgba(139,92,246,0.45); color: var(--meta-text); }
.meta-lesson-content .lc-example { background: rgba(245,185,66,0.06); border-left-color: var(--meta-accent); color: var(--meta-text); }
.meta-lesson-content .lc-example-label { color: var(--meta-accent); }
.meta-lesson-content .lc-steps li::before { background: var(--meta-accent-soft); color: var(--meta-accent); }
.meta-lesson-content .lc-watch { color: var(--meta-text); }
.meta-lesson-content .lc-example p, .meta-lesson-content .lc-watch p { font-size: 14.5px; margin-bottom: 6px; }

@media (max-width: 600px) {
  .lc-formula { padding: 7px 10px; font-size: 13px; }
  .lc-example { padding: 10px 10px 8px 12px; }
  .lc-steps li { padding-left: 24px; }
  .lc-watch { padding: 9px 11px; }
}

/* ===== Privacy & consent (Nov 2026) ===== */
.consent-group { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; }
.consent-check { display: flex; align-items: flex-start; gap: 8px; font-size: var(--text-xs);
  line-height: 1.45; color: var(--color-text-muted); cursor: pointer; text-align: left; }
.consent-check input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; margin: 2px 0 0;
  accent-color: var(--color-primary); cursor: pointer; }
.consent-check a, .auth-privacy-note a { color: var(--color-primary); text-decoration: underline; }
.auth-privacy-note { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.45;
  margin: 10px 0 0; text-align: center; }
.privacy-card { display: flex; flex-direction: column; gap: 10px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: 12px; }
.privacy-card h4 { margin: 0; font-size: var(--text-base); }
.privacy-card p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.5; }
.privacy-card ul { margin: 0; padding-left: 18px; font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.privacy-danger { border: 1px solid var(--color-error) !important; }
.privacy-danger h4 { color: var(--color-error); }
.btn-danger-solid { background: var(--color-error); color: #fff; border: none; }
.btn-danger-solid:disabled { opacity: .5; cursor: not-allowed; }
.consent-history { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.consent-history th, .consent-history td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--color-border); }
.consent-history th { color: var(--color-text-muted); font-weight: 600; }
@media (max-width: 600px) {
  .privacy-actions .btn { width: 100%; }
  .consent-history th:nth-child(3), .consent-history td:nth-child(3) { display: none; }
}

.rec-consent{display:flex;gap:8px;align-items:flex-start;margin-top:10px;font-size:12.5px;line-height:1.5;color:var(--color-text-muted);cursor:pointer}
.rec-consent input{margin-top:3px;flex:0 0 auto;accent-color:#e2703a}
.rec-consent a{color:#e2703a}
.rec-consent-missing{color:#ff6b6b}


/* =====================================================================
   GRE MASTERY: question renderers, learning path, lessons, simulations
   ===================================================================== */

/* ---- generic helpers ---- */
.btn-lg { padding: var(--space-3) var(--space-6); min-height: 48px; font-size: var(--text-base); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.page-empty { text-align: center; padding: var(--space-10) var(--space-4); color: var(--color-text-muted); }
.page-empty p { margin-bottom: var(--space-4); }
.gre-table-wrap { overflow-x: auto; margin: var(--space-3) 0; max-width: 100%; }
.gre-data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.gre-data-table caption { text-align: left; font-weight: 700; padding-bottom: var(--space-2); color: var(--color-text); }
.chart-notes { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-2); line-height: 1.5; }
.gre-chart { margin-bottom: var(--space-4); }

/* ---- question body ---- */
.gre-q { display: block; }
.gre-q.gre-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.gre-q.gre-split .gre-passage { position: sticky; top: var(--space-4); max-height: calc(100vh - 160px); overflow-y: auto;
  background: var(--color-surface-offset); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4); }
.gre-q.gre-split .gre-passage:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.gre-q-main { min-width: 0; }
.gre-instruction { font-size: var(--text-xs); color: var(--color-text-muted); margin: 0 0 var(--space-3); line-height: 1.5; }
.question-text p + p { margin-top: var(--space-3); }
.question-text sup { font-size: .7em; line-height: 0; }
.rad { white-space: nowrap; }
.rad-in { border-top: 1.5px solid currentColor; padding: 0 2px; margin-left: 1px; }

/* quantitative comparison */
.qc-given { font-size: var(--text-sm); background: var(--color-surface-offset); border-left: 3px solid var(--color-primary);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); margin-bottom: var(--space-4); }
.qc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-bottom: var(--space-5); }
.qc-box { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-2); padding: var(--space-4); text-align: center; }
.qc-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--space-2); }
.qc-val { font-size: var(--text-base); font-weight: 600; overflow-wrap: anywhere; }

/* choices */
.gre-choice.kind, .gre-choice { width: 100%; text-align: left; }
.gre-choice[role="checkbox"] .choice-letter { border-radius: var(--radius-sm); }
.gre-choice.missed { border: 2px dashed var(--color-success); background: transparent; }
.gre-choice.missed .choice-letter { background: var(--color-success); color: #fff; }
.gre-choice.correct .choice-letter, .gre-choice.incorrect .choice-letter { color: #fff; }
.gre-choice:focus-visible, .ne-input:focus-visible, .sim-aw-text:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* text completion and sentence equivalence */
.tc-stem { line-height: 2; }
.tc-blank { display: inline-flex; align-items: baseline; gap: 4px; min-width: 7.5em; border-bottom: 2px solid var(--color-primary);
  background: var(--color-primary-highlight); padding: 0 6px; margin: 0 3px; border-radius: 4px 4px 0 0; }
.tc-blank.filled { background: transparent; font-weight: 600; }
.tc-blank-tag { font-size: .7em; font-weight: 700; color: var(--color-primary); }
.tc-blank-fill { min-width: 4.5em; }
.tc-cols { display: grid; gap: var(--space-4); margin-top: var(--space-3); }
.tc-cols-1 { grid-template-columns: minmax(0, 1fr); }
.tc-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tc-col { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.tc-col-head { font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted); }
.tc-col .choice-btn { padding: var(--space-2) var(--space-3); }

/* numeric entry */
.ne-wrap { margin-top: var(--space-2); }
.ne-single { display: flex; align-items: center; gap: var(--space-3); }
.ne-input { width: 9rem; padding: var(--space-3); font-size: var(--text-base); text-align: center; font-variant-numeric: tabular-nums;
  background: var(--color-surface); color: var(--color-text); border: 2px solid var(--color-border); border-radius: var(--radius-md); }
.ne-input:focus { border-color: var(--color-primary); outline: none; }
.ne-input.correct { border-color: var(--color-success); background: var(--color-success-highlight); }
.ne-input.incorrect { border-color: var(--color-error); background: var(--color-error-highlight); }
.ne-frac { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.ne-frac .ne-input { width: 7rem; }
.ne-bar { width: 7rem; height: 2px; background: var(--color-text); border-radius: 1px; }
.ne-unit { color: var(--color-text-muted); font-size: var(--text-sm); }

/* feedback */
.gre-feedback:empty { display: none; }
.gre-explain { margin-top: var(--space-5); padding: var(--space-4); border-left: 4px solid var(--color-border); }
.gre-explain.is-correct { border-left-color: var(--color-success); }
.gre-explain.is-wrong { border-left-color: var(--color-error); }
.gre-explain-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.gre-verdict { font-family: var(--font-display); font-weight: 800; font-size: var(--text-base); }
.is-correct .gre-verdict { color: var(--color-success); }
.is-wrong .gre-verdict { color: var(--color-error); }
.gre-answer-row { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--text-sm); margin-bottom: var(--space-1); }
.gre-answer-label { font-weight: 700; color: var(--color-text-muted); min-width: 8.5em; }
.gre-explain-body { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; }
.gre-explain-body p + p { margin-top: var(--space-2); }
.gre-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.gre-tag { font-size: var(--text-xs); padding: 2px 10px; border-radius: var(--radius-full); background: var(--color-surface-dynamic); color: var(--color-text); }
.gre-tag-trap { background: var(--color-gold-highlight); color: var(--color-gold); }

/* practice quiz bits */
.quiz-progress-track { height: 6px; background: var(--color-surface-dynamic); border-radius: 3px; overflow: hidden; margin-bottom: var(--space-4); }
.quiz-progress-fill { height: 100%; background: var(--color-primary); transition: width .25s ease; }
.qtag-topic, .qtag-type { font-size: var(--text-xs); color: var(--color-text-muted); }
.res-row { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--color-divider); font-size: var(--text-sm); }
.res-row:last-child { border-bottom: none; }
.review-mistakes-card { margin-top: var(--space-5); }
.gre-calc-toggle-btn { padding: var(--space-1) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface-2); color: var(--color-text); font-size: var(--text-xs); font-weight: 600; min-height: 32px; }
.gre-calc-toggle-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.gre-calc__btn-min, .gre-calc__btn-close { background: transparent; border: none; width: 24px; height: 24px; border-radius: 4px; color: var(--color-text-muted); font-size: 14px; line-height: 1; }
.gre-calc__btn-min:hover, .gre-calc__btn-close:hover { background: var(--color-surface-dynamic); color: var(--color-text); }

/* ---- assessment, diagnostic, learning path ---- */
.auth-card.assessment-wide { max-width: 820px; }
.assess-heading { margin: var(--space-5) 0 var(--space-2); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); }
.diag-actions-row { display: flex; gap: var(--space-2); align-items: center; }
.lp-group-title { margin: var(--space-6) 0 var(--space-3); font-size: var(--text-base); }
.lp-hint { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.lp-list { display: flex; flex-direction: column; gap: var(--space-3); }
.path-right { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.path-go { font-size: var(--text-xs); font-weight: 700; color: var(--color-primary); }
.path-actions-row { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
.lp-milestone { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg); background: var(--color-surface-offset); }
.lp-milestone-icon { width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--color-primary-highlight); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; letter-spacing: .04em; flex-shrink: 0; }
.lp-milestone-body { flex: 1; min-width: 0; }
.lp-milestone-title { font-weight: 600; font-size: var(--text-sm); }
.lp-milestone-date { font-size: var(--text-xs); color: var(--color-text-muted); }
.section-progress-label { font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.section-icon { display: flex; align-items: center; justify-content: center; font-weight: 800; }
.section-icon.strategy, .section-icon.aw { background: var(--color-gold-highlight); color: var(--color-gold); }

/* ---- lessons ---- */
.lesson-crumbs { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.lesson-topic, .lesson-page { max-width: 820px; margin: 0 auto; }
.lesson-list { display: flex; flex-direction: column; gap: var(--space-2); }
.lesson-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-text); transition: border-color var(--transition-interactive), transform var(--transition-interactive); }
.lesson-row:hover { border-color: var(--color-primary); transform: translateX(3px); color: var(--color-text); }
.lesson-row.is-locked { opacity: .75; }
.lesson-row-num { width: 28px; height: 28px; border-radius: 50%; background: var(--color-primary-highlight); color: var(--color-primary); font-weight: 700; font-size: var(--text-xs); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lesson-row-title { flex: 1; font-weight: 600; }
.lesson-row-meta { font-size: var(--text-xs); color: var(--color-text-muted); }
.lesson-body { line-height: 1.75; font-size: var(--text-sm); }
.lesson-body p { margin: 0 0 var(--space-3); }
.lesson-body h3, .lesson-body h4 { margin: var(--space-5) 0 var(--space-2); }
.lesson-body ul, .lesson-body ol { margin: 0 0 var(--space-3) var(--space-5); }
.lesson-body li { margin-bottom: var(--space-1); }
.lesson-body table { border-collapse: collapse; margin: var(--space-3) 0; }
.lesson-body th, .lesson-body td { border: 1px solid var(--color-border); padding: 6px 10px; text-align: left; }
.lesson-body code { background: var(--color-surface-dynamic); padding: 1px 5px; border-radius: 4px; }
.lesson-h { margin: var(--space-6) 0 var(--space-3); }
.lesson-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-8); flex-wrap: wrap; }
.lesson-footer-mid { flex: 1; text-align: center; font-size: var(--text-xs); color: var(--color-text-muted); }
.lesson-preview { position: relative; padding: var(--space-4); color: var(--color-text-muted); border-left: 3px solid var(--color-border); margin-bottom: var(--space-4); }
.lesson-lock { padding: var(--space-5); text-align: center; }
.lesson-lock p { color: var(--color-text-muted); margin: var(--space-2) 0 var(--space-4); }
.lesson-lock-actions { display: flex; justify-content: center; gap: var(--space-3); }
.worked-example-solution { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--color-border); line-height: 1.65; }
.worked-example-solution[hidden], .kc-expl[hidden] { display: none; }
.kc-block { margin-bottom: var(--space-4); padding: var(--space-3); background: var(--color-surface-offset); border-radius: var(--radius-lg); }
.kc-block .kc-q { padding: 0 0 var(--space-2); background: transparent; }
.kc-block .kc-opt { width: 100%; margin-bottom: 6px; }
.kc-opt.correct { border-color: var(--color-success); background: var(--color-success-highlight); }
.kc-opt.wrong { border-color: var(--color-error); background: var(--color-error-highlight); }
.kc-expl { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }
.kc-summary { font-weight: 700; margin-top: var(--space-3); }

/* ---- simulations ---- */
.sim-hub, .sim-report { max-width: 980px; margin: 0 auto; }
.sim-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-4); }
.sim-card h2, .sim-card h3 { margin-bottom: var(--space-3); }
.sim-card h4 { margin: var(--space-4) 0 var(--space-2); }
.sim-list { margin: 0 0 var(--space-3) var(--space-5); line-height: 1.7; color: var(--color-text-muted); }
.sim-fine { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.55; }
.sim-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.sim-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.sim-pick { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.sim-pick.is-locked { background: var(--color-surface-offset); }
.sim-pick-num { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; }
.sim-pick-meta { font-size: var(--text-xs); color: var(--color-text-muted); }
.sim-pick-note { font-size: var(--text-xs); color: var(--color-text-muted); flex: 1; }
.sim-past-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-divider); flex-wrap: wrap; }
.sim-past-row:last-child { border-bottom: none; }
.sim-past-scores { font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.sim-step { font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary); margin-bottom: var(--space-2); }
.sim-intro { max-width: 720px; margin: var(--space-8) auto; }

.sim-run { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 120px); }
.sim-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin-bottom: var(--space-4); }
.sim-title { font-family: var(--font-display); font-weight: 800; font-size: var(--text-base); display: flex; flex-direction: column; }
.sim-sub { font-family: var(--font-body); font-weight: 500; font-size: var(--text-xs); color: var(--color-text-muted); }
.sim-topright { display: flex; align-items: center; gap: var(--space-3); }
.sim-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: var(--text-base); padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md); background: var(--color-surface-dynamic); min-width: 5.5em; text-align: center; }
.sim-timer.warning { color: var(--color-warning); background: var(--color-gold-highlight); }
.sim-timer.danger { color: var(--color-error); background: var(--color-error-highlight); }
.sim-qwrap { flex: 1; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); }
.sim-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); flex-wrap: wrap; }
.sim-footer-left, .sim-footer-right { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.sim-run .btn.is-marked { border-color: var(--color-gold); color: var(--color-gold); background: var(--color-gold-highlight); }

.sim-aw-body { flex: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-4); }
.sim-aw-prompt, .sim-aw-edit { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); }
.sim-aw-claim { font-size: var(--text-base); line-height: 1.7; font-weight: 600; padding: var(--space-3) var(--space-4); border-left: 3px solid var(--color-primary);
  background: var(--color-surface-offset); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: var(--space-2) 0 var(--space-3); }
.sim-aw-instr { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }
.sim-aw-edit { display: flex; }
.sim-aw-text { width: 100%; min-height: 380px; flex: 1; resize: vertical; padding: var(--space-4); font: inherit; line-height: 1.7; font-size: var(--text-sm);
  background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.sim-aw-text:focus { border-color: var(--color-primary); outline: none; }
.sim-aw-rate { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin: var(--space-4) 0; }
.sim-aw-rate select { width: auto; min-width: 11rem; }

.sim-review-body { flex: 1; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); }
.sim-review-table { width: 100%; }
.sim-review-link { color: var(--color-primary); font-weight: 600; text-decoration: underline; padding: 2px 0; }
.rv-ans { color: var(--color-success); font-weight: 600; }
.rv-part { color: var(--color-warning); font-weight: 600; }
.rv-none { color: var(--color-error); font-weight: 600; }
.rv-mark { color: var(--color-gold); font-weight: 600; }

.sim-modal-overlay { position: fixed; inset: 0; background: rgba(10,8,6,.66); display: flex; align-items: center; justify-content: center; z-index: 9500; padding: var(--space-4); }
.sim-modal { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-6); max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); }
.sim-modal p { color: var(--color-text-muted); margin-bottom: var(--space-2); line-height: 1.6; }

.sim-disclaimer { border: 1px solid var(--color-gold); background: var(--color-gold-highlight); color: var(--color-text); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); font-size: var(--text-sm); line-height: 1.55; }
.sim-score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-3); }
.sim-score-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); text-align: center; }
.sim-score-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted); }
.sim-score-num { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800; color: var(--color-primary); line-height: 1.1; margin: var(--space-2) 0; }
.sim-score-scale { font-size: var(--text-xs); color: var(--color-text-muted); }
.sim-score-detail { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-2); line-height: 1.5; }
.sim-essay { background: var(--color-surface-offset); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4);
  max-height: 320px; overflow-y: auto; line-height: 1.7; font-size: var(--text-sm); margin-bottom: var(--space-3); }
.sim-rubric { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.sim-rubric-row { display: flex; gap: var(--space-3); padding: var(--space-3); background: var(--color-surface-offset); border-radius: var(--radius-md); font-size: var(--text-sm); line-height: 1.55; }
.sim-rubric-score { width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary-highlight); color: var(--color-primary); font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sim-checklist { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.sim-check { display: flex; align-items: flex-start; gap: var(--space-3); font-size: var(--text-sm); cursor: pointer; line-height: 1.5; }
.sim-check input { margin-top: 3px; accent-color: var(--color-primary); width: 16px; height: 16px; }
.sim-outline { margin-top: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.sim-outline summary { cursor: pointer; font-weight: 600; }
.sim-outline > div { margin-top: var(--space-3); color: var(--color-text-muted); line-height: 1.65; font-size: var(--text-sm); }
.sim-tutor { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-offset); font-size: var(--text-sm); }
.sim-rev-list { display: flex; flex-direction: column; gap: var(--space-2); }
.sim-rev-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.sim-rev-toggle { display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left; padding: var(--space-3) var(--space-4); background: var(--color-surface); }
.sim-rev-toggle:hover { background: var(--color-surface-offset); }
.sim-rev-toggle.ok .sim-rev-res { color: var(--color-success); }
.sim-rev-toggle.bad .sim-rev-res { color: var(--color-error); }
.sim-rev-n { width: 26px; height: 26px; border-radius: 50%; background: var(--color-surface-dynamic); font-size: var(--text-xs); font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sim-rev-q { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.sim-rev-res { font-size: var(--text-xs); font-weight: 700; flex-shrink: 0; }
.sim-rev-detail { padding: 0; }
.sim-rev-detail:not(:empty) { padding: var(--space-4); border-top: 1px solid var(--color-border); background: var(--color-surface-2); }

/* plan nudge and misc */
.plan-nudge { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-primary); background: var(--color-primary-highlight); border-radius: var(--radius-lg); margin-bottom: var(--space-4); }
.plan-nudge-actions { display: flex; gap: var(--space-2); }
.activity-icon { font-size: 11px; font-weight: 800; letter-spacing: .03em; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .gre-q.gre-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .gre-q.gre-split .gre-passage { position: static; max-height: 280px; }
  .sim-aw-body { grid-template-columns: minmax(0, 1fr); }
  .sim-aw-text { min-height: 280px; }
  .tc-cols-3, .tc-cols-2 { grid-template-columns: minmax(0, 1fr); }
  .sim-qwrap { padding: var(--space-3); }
  .sim-footer { position: sticky; bottom: 0; background: var(--color-bg); padding: var(--space-2) 0; }
}
@media (max-width: 480px) {
  .qc-grid { grid-template-columns: 1fr; }
  .path-item { flex-wrap: wrap; }
  .path-right, .path-actions-row { align-items: flex-start; justify-content: flex-start; }
  .gre-answer-label { min-width: 0; width: 100%; }
}

:root, [data-theme] { --color-surface-alt: var(--color-surface-2); --color-surface-1: var(--color-surface-2); }
.diag-q-meta .diag-q-topic { display: inline-block; }
.diag-progress { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.diag-progress-text { margin-bottom: 0; }
.diag-progress-bar { flex: 0 0 100%; background: var(--color-surface-dynamic); }
.quiz-progress-track { flex: 1; margin-bottom: 0; }
