/* ============================================================
   HSCScience — lesson.css
   Single shared stylesheet for all lesson pages.
   Subject colours are overridden by subject theme files:
     chem-theme.css  |  bio-theme.css  |  physics-theme.css
   ============================================================ */

/* ============================================================
   DESIGN TOKENS (Chem defaults — overridden by theme files)
   ============================================================ */
:root {
  /* === STRUCTURAL === */
  --bg:            #f8fafc;
  --surface:       rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2:     #f8fafc;
  --surface-3:     #f1f5f9;
  --border:        rgba(0, 0, 0, 0.08);
  --border-2:      rgba(0, 0, 0, 0.06);
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:        0 2px 10px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-glass:  0 8px 28px rgba(15,23,42,0.08);
  --radius:        16px;
  --radius-sm:     10px;
  --radius-xs:     6px;
  --radius-lg:     20px;
  --max-w:         820px;

  /* === TYPOGRAPHY === */
  --text:          #0f172a;
  --text-muted:    #475569;
  --text-light:    #64748b;

  /* === SEMANTIC TEXT TOKENS (dark — never override with bright colours) === */
  --heading-color:          #1e293b;
  --math-color:             #0f172a;
  --code-color:             #1e293b;
  --table-header-bg:        #1e293b;
  --table-header-text:      #ffffff;
  --section-dot-tooltip-bg: #1e293b;

  /* === SUBJECT COLOURS (defaults — overridden by each theme file) === */
  --primary:       #6366f1;
  --primary-mid:   #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.10);
  --accent:        #8b5cf6;
  --accent-dark:   #7c3aed;
  --accent-light:  rgba(139, 92, 246, 0.10);
  --accent-bg:     rgba(139, 92, 246, 0.06);
  --cyan:          #0891b2;
  --cyan-light:    rgba(8,145,178,0.08);
  --cyan-bg:       #ecfeff;

  /* === GRADIENT MESH (overridden by theme files) === */
  --mesh-1: #e0e7ff;
  --mesh-2: #ede9fe;
  --mesh-3: #f5f3ff;
  --mesh-gradient: radial-gradient(ellipse at 20% 20%, var(--mesh-1) 0%, transparent 55%),
                   radial-gradient(ellipse at 80% 80%, var(--mesh-2) 0%, transparent 55%),
                   radial-gradient(ellipse at 50% 50%, var(--mesh-3) 0%, transparent 70%),
                   #f8fafc;

  /* === GLASS SURFACE === */
  --glass-bg:     rgba(255, 255, 255, 0.58);
  --glass-border: rgba(255, 255, 255, 0.88);
  --glass-blur:   blur(20px);

  /* === STATE COLOURS === */
  --success:          #059669;
  --success-light:    rgba(5, 150, 105, 0.08);
  --success-light-bg: #d1fae5;
  --success-bg:       #dcfce7;
  --danger:           #dc2626;
  --danger-light:     rgba(220, 38, 38, 0.07);
  --danger-bg:        #fef2f2;
  --warning:          #d97706;
  --warning-light:    rgba(217, 119, 6, 0.10);
  --warning-bg:       #fffbeb;
  --shadow-accent:    0 4px 20px var(--accent-light);

  /* === LEGACY ALIASES (keep so existing lesson HTML doesn't break) === */
  --h2-color:      var(--heading-color);
  --tf-bg:         var(--accent-bg);
  --tf-top:        var(--accent);
  --tf-head:       var(--accent-dark);
  --tf-border:     var(--border-2);
  --callout-bg:    var(--accent-bg);
  --callout-border:var(--accent);
  --callout-text:  var(--text-muted);
  --anchor-bg:     var(--warning-bg);
  --anchor-border: var(--warning);
  --anchor-text:   var(--accent-dark);
  --misc-bg:       #fee2e2;
  --ic1-bg: #cffafe; --ic1-h: #164e63;
  --ic2-bg: #d1fae5; --ic2-h: #064e3b;
  --ic3-bg: #ffe4e6; --ic3-h: #881337;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SKIP NAVIGATION
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.progress-bar-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  z-index: 1000;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-mid), var(--accent));
  width: 0%;
  transition: width 0.15s ease;
}

/* ============================================================
   SECTION NAV DOTS (desktop)
   ============================================================ */
.section-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}
.section-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-2);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.section-dot.active {
  background: var(--accent);
  transform: scale(1.5);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.section-dot:hover::after {
  content: attr(data-label);
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--section-dot-tooltip-bg);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  pointer-events: none;
}
/* Bio Mod1 / Y12 style — anchor links in section nav */
.section-nav a {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  display: block;
  transition: all 0.2s;
  text-decoration: none;
}
.section-nav a.active,
.section-nav a:hover { background: var(--accent); transform: scale(1.3); }

/* ============================================================
   LAYOUT
   ============================================================ */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 20px 100px;
}

/* ============================================================
   SCROLL ANIMATION
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   HERO — white card style
   ============================================================ */
.hero {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 52px 44px 44px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 60%, var(--cyan) 100%);
}
.hero::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  pointer-events: none;
}
/* Chem/Physics hero layout */
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.hero-left { flex: 1; }
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.8px;
  color: var(--text);
  margin-bottom: 16px;
}
.hero-hook {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 540px;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  font-style: italic;
}
/* Bio hero elements — desc + breadcrumb + pills */
.hero-desc {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 16px;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
.crumb span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}
.crumb .arr { color: var(--border-2); }
.crumb .cur { color: var(--accent-dark); }
.page-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 20px 0;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.page-breadcrumbs a,
.page-breadcrumbs span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.page-breadcrumbs a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.15s;
}
.page-breadcrumbs a:hover {
  color: var(--primary);
}
.page-breadcrumbs .sep {
  color: var(--border-2);
  font-size: 13px;
  font-weight: 400;
  padding: 0 2px;
}
.page-breadcrumbs .current {
  color: var(--text);
  font-weight: 700;
}
.hero-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.pill {
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
}
.hero-emoji {
  font-size: 88px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.9;
  margin-top: -8px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.badge-navy    { background: var(--primary); color: white; }
.badge-amber   { background: var(--accent); color: white; }
.badge-cyan    { background: var(--cyan); color: white; }
.badge-blue    { background: var(--primary-mid); color: white; }
.badge-green   { background: var(--success); color: white; }
.badge-teal    { background: var(--cyan); color: white; }
.badge-purple  { background: #7c3aed; color: white; }
.badge-outline {
  background: transparent;
  border: 1.5px solid var(--border-2);
  color: var(--text-muted);
}

/* ============================================================
   FORMULA REFERENCE PANEL
   ============================================================ */
.formula-panel {
  background: var(--accent-bg);
  border: 1.5px solid var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-accent);
}
.formula-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.formula-panel-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}
.formula-panel-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-dark);
}
.formula-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--accent-light);
}
.formula-row:last-child { border-bottom: none; padding-bottom: 0; }
.formula-eq {
  font-family: 'DM Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  color: var(--math-color);
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}
.formula-panel-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--accent-light);
}
.formula-panel-row:last-child { border-bottom: none; }
.formula-vars-list { display: flex; flex-direction: column; gap: 4px; }
.formula-details { font-size: 13px; color: var(--text-muted); }
.formula-vars { display: flex; flex-wrap: wrap; gap: 16px; }
.formula-var {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.formula-var strong {
  font-family: 'DM Mono', monospace;
  color: var(--accent-dark);
  font-weight: 500;
}
.formula-rearrange {
  margin-top: 14px;
  padding: 10px 16px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.formula-rearrange span { color: var(--accent-dark); font-weight: 500; }
/* Collapsible formula reference (Physics style) */
.formula-ref-wrap { margin-bottom: 24px; }
.formula-ref-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-bg);
  border: 1.5px solid var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 24px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.formula-ref-trigger:hover { background: var(--surface-3); }
.formula-ref-trigger h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.frt-icon {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.formula-ref-trigger.open .collapsible-arrow { transform: rotate(180deg); }
.formula-ref-body {
  display: none;
  background: var(--accent-bg);
  border: 1.5px solid var(--accent-light);
  border-left: 4px solid var(--accent);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 20px 24px;
}
.formula-ref-body.open { display: block; }
/* Smaller eq text inside the collapsible reference card */
.formula-ref-body .formula-eq { font-size: 14px; white-space: normal; align-self: start; padding-top: 2px; }
.formula-ref-body .formula-row { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; }
.formula-name {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.formula-when { font-size: 12px; color: var(--success); margin-bottom: 4px; }
.formula-trap  { font-size: 12px; color: var(--danger); }
.formula-trap strong, .formula-when strong { font-weight: 600; }

/* ============================================================
   INTENTIONS GRID
   ============================================================ */
/* Chem/Physics style */
.intentions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.intention-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
  border-top: 3px solid var(--primary-mid);
}
.intention-card.amber { border-top-color: var(--accent); }
.intention-card.cyan  { border-top-color: var(--cyan); }
.intention-card.know        { border-top-color: #f43f5e; }
.intention-card.understand  { border-top-color: var(--success); }
.intention-card.cando       { border-top-color: var(--accent); }
.intention-card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 10px;
}
.intention-card h3, .intention-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.intention-card.know h3      { color: #f43f5e; }
.intention-card.understand h3 { color: var(--success); }
.intention-card.cando h3     { color: var(--accent-dark); }
.intention-card ul { list-style: none; }
.intention-card li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0 4px 14px;
  position: relative;
  line-height: 1.45;
  border-bottom: 1px solid var(--border);
}
.intention-card li:last-child { border-bottom: none; }
.intention-card li::before {
  content: '›';
  position: absolute;
  left: 0;
  font-weight: 800;
  color: var(--primary-mid);
}
.intention-card.amber li::before { color: var(--accent); }
.intention-card.cyan  li::before { color: var(--cyan); }
/* Bio style — .intentions + .ic */
.intentions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-bottom: 20px;
}
.ic {
  border-radius: var(--radius);
  padding: 18px 20px;
}
.ic h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 11px;
}
.ic ul { list-style: none; }
.ic li {
  font-size: 13px;
  color: #555;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  line-height: 1.4;
}
.ic li:last-child { border-bottom: none; }

/* ============================================================
   SECTION LABEL
   ============================================================ */
.section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-light);
  margin: 44px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
p.section-label { color: var(--accent); }
p.section-label::after { background: var(--accent-light); }

/* ============================================================
   CONTENT CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-icon {
  width: 40px; height: 40px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.card-icon.amber { background: var(--accent-light); }
.card-num {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.card-num.blue   { background: var(--primary-mid); }
.card-num.green  { background: var(--success); }
.card-num.amber  { background: var(--accent); }
.card-num.slate  { background: #64748b; }
.card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--h2-color);
  letter-spacing: -0.3px;
}
.card-subtitle { color: var(--text-light); font-size: 12.5px; margin-top: 3px; }
.card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 10px;
}
.card p {
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.75;
  font-size: 15px;
}
.card p:last-child { margin-bottom: 0; }
.card ul { margin-left: 20px; margin-top: 8px; }
.card li { font-size: 15px; color: var(--text-muted); line-height: 1.8; }
/* Conceptual-first card intro */
.conceptual-first {
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.8;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin-bottom: 20px;
  font-style: italic;
}

/* ============================================================
   CALLOUT BOXES
   ============================================================ */
.callout {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.65;
}
.callout-amber {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}
.callout-cyan {
  background: var(--cyan-bg);
  border-left: 3px solid var(--cyan);
  color: var(--text-muted);
}
.callout-blue {
  background: var(--primary-light);
  border-left: 3px solid var(--primary-mid);
  color: var(--text-muted);
}
.callout-green {
  background: var(--success-light);
  border-left: 3px solid var(--success);
  color: var(--text-muted);
}
.callout-purple {
  background: rgba(124,58,237,0.07);
  border-left: 3px solid #7c3aed;
  color: var(--text-muted);
}
.callout-tag {
  font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 3px 7px; border-radius: 4px;
  white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.callout-amber  .callout-tag { background: var(--accent);    color: white; }
.callout-cyan   .callout-tag { background: var(--cyan);      color: white; }
.callout-blue   .callout-tag { background: var(--primary-mid); color: white; }
.callout-green  .callout-tag { background: var(--success);   color: white; }
.callout strong { color: var(--text); }
/* Bio callout (uses legacy tokens) */
.callout:not([class*="callout-"]) {
  background: var(--callout-bg);
  border-left: 3px solid var(--callout-border);
  color: var(--callout-text);
}
/* ============================================================
   DEFINITIONS PANEL
   ============================================================ */
.definitions-panel { background: var(--accent-light); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 28px; }
.definitions-panel-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.definitions-panel-header h3 { font-family: var(--font-display, 'Outfit', sans-serif); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent); }
.def-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.def-item { background: rgba(255,255,255,0.7); border-radius: var(--radius-sm); padding: 12px 16px; border: 1px solid var(--border); }
.def-item .def-term { font-family: var(--font-mono, monospace); font-size: 12.5px; font-weight: 500; color: var(--heading-color); margin-bottom: 4px; display: block; }
.def-item .def-meaning { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
@media (max-width: 600px) { .def-grid { grid-template-columns: 1fr; } }

/* Anchor callout (amber real-world hook) */
.anchor-callout {
  background: var(--anchor-bg);
  border-left: 3px solid var(--anchor-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 13px 16px;
  margin: 14px 0;
  font-size: 14px;
  color: var(--anchor-text);
  line-height: 1.65;
}
.anchor-callout strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* Scenario box */
.scenario-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fff8e1 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: 20px 22px; margin: 18px 0;
}
.scenario-box .scenario-label {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent); margin-bottom: 8px;
}
.scenario-box p { color: #78350f; font-size: 14px; margin: 0; line-height: 1.7; }
.scenario-box strong { color: #92400e; }

/* ============================================================
   FORMULA TRIANGLE
   ============================================================ */
.formula-triangle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
}
.triangle-graphic {
  background: var(--surface-3);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  padding: 28px 40px;
  text-align: center;
  font-family: 'DM Mono', monospace;
}
.triangle-top {
  font-size: 28px;
  font-weight: 500;
  color: var(--heading-color);
  border-bottom: 2px solid var(--border-2);
  padding-bottom: 12px;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.triangle-bottom { display: flex; gap: 32px; justify-content: center; }
.triangle-cell {
  font-size: 20px;
  font-weight: 500;
  color: var(--accent-dark);
  padding: 0 16px;
}
.triangle-cell:first-child {
  border-right: 2px solid var(--border-2);
  padding-right: 32px;
}
.triangle-label {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 16px;
  font-family: 'DM Sans', sans-serif;
}

/* ============================================================
   WORKED EXAMPLES
   ============================================================ */
.worked-example {
  background: var(--surface);
  border: 1.5px solid var(--accent-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.worked-example-header {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.worked-example-header h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.worked-example-header .ex-badge {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.worked-example-body { padding: 24px 28px; }
.ex-problem {
  background: var(--accent-bg);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 15px;
  color: var(--text);
  font-style: italic;
  line-height: 1.6;
}
.ex-steps { list-style: none; }
.ex-step {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.ex-step:last-child { border-bottom: none; }
.step-num {
  width: 28px; height: 28px;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  flex-shrink: 0;
  margin-top: 1px;
}
.step-content { flex: 1; }
.step-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  margin-bottom: 4px;
}
.step-text {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.step-math {
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  color: var(--math-color);
  margin-top: 4px;
}
.ex-answer {
  margin-top: 16px;
  padding: 14px 20px;
  background: var(--surface-3);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}
.ex-answer-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-dark);
  white-space: nowrap;
}
.ex-answer-val {
  font-family: 'DM Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  color: var(--math-color);
}

/* ============================================================
   COMMON MISTAKES BOX
   ============================================================ */
.mistake-box {
  background: var(--danger-bg);
  border: 1.5px solid rgba(220,38,38,0.2);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.mistake-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.mistake-box-header h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.mistake-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(220,38,38,0.1);
}
.mistake-item:last-child { border-bottom: none; padding-bottom: 0; }
.mistake-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.mistake-detail { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }
.mistake-fix { font-size: 13px; color: var(--success); margin-top: 4px; font-weight: 500; }
/* Bio misconceptions box */
.misconceptions {
  background: var(--misc-bg);
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 14px 0;
}
.misconceptions h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b91c1c;
  margin-bottom: 14px;
}
.misc-item { margin-bottom: 12px; }
.misc-item:last-child { margin-bottom: 0; }
.misc-wrong { font-weight: 600; color: #7f1d1d; font-size: 14px; }
.misc-right { font-size: 14px; color: var(--text-muted); line-height: 1.55; margin-top: 3px; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { margin: 16px 0; }
.tl-item { display: flex; gap: 16px; margin-bottom: 16px; align-items: flex-start; }
.tl-year {
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  white-space: nowrap;
  margin-top: 1px;
  flex-shrink: 0;
}
.tl-content p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.tl-content strong { color: var(--text); font-size: 14px; }

/* ============================================================
   HIERARCHY LADDER
   ============================================================ */
.hierarchy { display: flex; flex-direction: column; gap: 0; margin: 18px 0; }
.hierarchy-step {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--surface);
  transition: background 0.15s;
}
.hierarchy-step:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.hierarchy-step:last-child  { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.hierarchy-step:hover { background: var(--primary-light); }
.hierarchy-level {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--primary-light); color: var(--heading-color);
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
}
.hierarchy-name { font-weight: 600; font-size: 15px; color: var(--text); min-width: 120px; }
.hierarchy-eg   { font-size: 14px; color: var(--text-muted); }
.hierarchy-arrow { font-size: 18px; color: var(--primary); flex-shrink: 0; margin-left: auto; opacity: 0.4; }

/* ============================================================
   FLOWCHART
   ============================================================ */
.flowchart {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 16px 0;
  border: 1px solid var(--border);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1.9;
  color: var(--text-muted);
  overflow-x: auto;
}

/* ============================================================
   COLLAPSIBLE — COPY INTO YOUR BOOKS
   ============================================================ */
.collapsible-wrap { margin: 28px 0; }
.collapsible-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.collapsible-trigger:hover { background: var(--surface-2); }
.collapsible-trigger.open {
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom-color: transparent;
}
.collapsible-trigger h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.collapsible-arrow {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.collapsible-trigger.open .collapsible-arrow { transform: rotate(180deg); }
.collapsible-body {
  display: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 24px;
}
.collapsible-body.open { display: block; }
/* Bio copy-wrap (collapsible books section) */
.copy-wrap { margin: 14px 0; }
.copy-toggle {
  background: none;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  transition: background 0.15s;
}
.copy-toggle:hover { background: var(--accent-bg); }
.copy-toggle .arr { margin-left: auto; transition: transform 0.2s; }
.copy-toggle.open .arr { transform: rotate(90deg); }
.copy-content {
  display: none;
  background: var(--accent-bg);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 18px 20px;
  border: 1.5px solid var(--border-2);
  border-top: none;
}
.copy-content.open { display: block; }
.copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.copy-item {
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  border: 1px solid var(--border);
}
.copy-item h4, .copy-item h5 {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--primary-mid);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.copy-item ul { list-style: none; }
.copy-item li {
  color: var(--text-muted);
  font-size: 13px;
  padding: 4px 0 4px 14px;
  position: relative;
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}
.copy-item li:last-child { border-bottom: none; }
.copy-item li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.copy-item p { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* ============================================================
   ACTIVITIES
   ============================================================ */
.activity {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-bottom: 20px;
  border: 1.5px solid var(--border);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}
.activity h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.activity-meta, .activity .meta {
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 20px;
  font-style: italic;
}
.activity p, .activity li { font-size: 14px; color: var(--text-muted); line-height: 1.65; }
.activity ol, .activity ul { margin-left: 20px; margin-top: 10px; }
.activity li { margin-bottom: 6px; }
/* Classify activity (maths lessons) */
.classify-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.classify-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.classify-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.classify-content { flex: 1; }
.classify-content p { margin: 0 0 8px; font-size: 14px; color: var(--text); }
/* Drill problems */
.drill-list { list-style: none; }
.drill-item {
  background: var(--surface-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.drill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  margin-right: 10px;
  flex-shrink: 0;
}
.drill-question {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 12px;
}
.drill-show-btn {
  background: none;
  border: 1.5px solid var(--accent);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  padding: 5px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
}
.drill-show-btn:hover { background: var(--accent); color: white; }
.drill-answer {
  display: none;
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--success-light);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.drill-answer.visible { display: block; }
.drill-answer .ans-math {
  font-family: 'DM Mono', monospace;
  color: var(--math-color);
  font-size: 14px;
  margin-top: 4px;
}

/* ============================================================
   PATHOGEN / CONTENT GRID
   ============================================================ */
.pathogen-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 14px 0; }
.pathogen-card { border-radius: var(--radius-sm); padding: 16px 18px; }
.pathogen-card h5 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}
.pathogen-card p { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin-bottom: 5px; }
.pathogen-card ul { margin-left: 14px; margin-top: 4px; }
.pathogen-card li { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap, .data-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  margin: 16px 0;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1.5;
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-3); }
td.mono { font-family: 'DM Mono', monospace; color: var(--code-color); }
td.blank {
  background: var(--accent-light);
  border: 1.5px dashed rgba(217,119,6,0.3);
  color: var(--text-light);
  font-style: italic;
  text-align: center;
}
td strong { color: var(--text); }

/* ============================================================
   ANSWER TEXTAREAS & MODE SYSTEM
   ============================================================ */
.answer-wrap { margin: 12px 0; }
.answer-note  { font-size: 12px; color: var(--text-light); margin-bottom: 6px; font-style: italic; }
.answer-instruction {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 6px;
  font-style: italic;
  display: none;
}
body.digital-mode .answer-instruction.digital { display: block; }
body.book-mode    .answer-instruction.book    { display: block; }
.answer-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  min-height: 80px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s, background 0.2s;
  display: none;
}
.answer-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}
.answer-textarea::placeholder { color: var(--text-light); }
body.digital-mode .answer-textarea { display: block; }
/* Simple textarea (Bio Mod1 — not mode-aware) */
.think-first textarea,
.answer-wrap > textarea {
  width: 100%;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  resize: vertical;
  min-height: 80px;
  background: white;
  display: block;
}
.answer-book-placeholder {
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  min-height: 80px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 13px;
  font-style: italic;
  text-align: center;
}
body.book-mode .answer-book-placeholder { display: flex; }
.autosave-indicator {
  font-size: 11px;
  color: var(--success);
  margin-top: 4px;
  min-height: 16px;
}
/* Answer area (older style) */
.answer-area {
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  min-height: 80px;
  font-family: 'DM Mono', monospace;
  color: var(--text-light);
  font-size: 13px;
  margin: 12px 0;
  transition: border-color 0.2s;
}
.answer-area:hover { border-color: var(--accent); }

/* ============================================================
   MODE BANNER
   ============================================================ */
.mode-banner {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.mode-banner p { color: var(--text-muted); font-size: 13.5px; margin: 0; }
.mode-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.mode-btn {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: none;
  background: var(--surface-2);
  color: var(--text-muted);
  transition: all 0.15s;
}
.mode-btn.active { background: var(--primary); color: white; }

/* ============================================================
   MULTIPLE CHOICE — Chem/Physics style
   ============================================================ */
.mc-section { padding: 0; }
.mc-question { margin: 24px 0; }
.mc-question > p {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.mc-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  margin: 7px 0;
  background: var(--surface-2);
  font: inherit;
  text-align: left;
  appearance: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.mc-option:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  transform: translateX(3px);
}
.mc-option.correct { background: var(--success-light); border-color: var(--success); }
.mc-option.incorrect { background: var(--danger-light); border-color: var(--danger); }
.mc-option.disabled { cursor: default; pointer-events: none; }
.mc-letter {
  width: 30px; height: 30px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  flex-shrink: 0;
  transition: all 0.15s;
}
.mc-option:hover .mc-letter { background: var(--accent); color: white; border-color: var(--accent); }
.mc-option.correct .mc-letter { background: var(--success); color: white; border-color: var(--success); }
.mc-option.incorrect .mc-letter { background: var(--danger); color: white; border-color: var(--danger); }
.mc-text { color: var(--text-muted); font-size: 14.5px; }
.mc-feedback {
  margin-top: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  display: none;
}
.mc-feedback.correct-msg { background: var(--success-light); color: var(--success); display: block; }
.mc-feedback.incorrect-msg { background: var(--danger-light); color: var(--danger); display: block; }
/* Bio style MC — .mc-opt + .opt-letter */
.mc-options { display: flex; flex-direction: column; gap: 7px; }
.mc-opt {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.mc-opt:hover { border-color: var(--accent); background: var(--accent-bg); }
.mc-opt.correct { border-color: var(--success); background: var(--success-light); color: #14532d; }
.mc-opt.incorrect { border-color: var(--danger); background: var(--danger-bg); color: #7f1d1d; }
.mc-opt .opt-letter {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}
.mc-feedback.show { display: block; }
.mc-feedback.correct  { background: var(--success-light); color: #14532d; }
.mc-feedback.incorrect { background: var(--danger-bg); color: #7f1d1d; }

.question-bank-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13.5px;
}

.question-bank-note strong {
  color: var(--accent-dark);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.confidence-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.confidence-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
}

.confidence-chip {
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.confidence-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-bg);
}

.confidence-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.next-task-panel {
  margin: 20px 0 24px;
  padding: 20px 22px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.next-task-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.next-task-title {
  margin: 0 0 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  color: var(--text);
}

.next-task-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.next-task-meta {
  margin-top: 12px;
  color: var(--text-light);
  font-size: 12.5px;
  font-weight: 600;
}

.next-task-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.next-task-btn,
.next-task-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.next-task-btn {
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.next-task-link {
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
}

.next-task-link-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ============================================================
   SHORT ANSWER
   ============================================================ */
.marks {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: white;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  float: right;
  margin-top: 2px;
}
.question-item {
  padding: 18px 20px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary-mid);
  margin: 18px 0;
}
.question-item p {
  font-weight: 500;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 12px;
  line-height: 1.55;
}

/* Biology question surfaces: stronger separation and contrast */
body[data-subject="biology"] .mc-question {
  margin: 28px 0;
  padding: 24px 24px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248,255,252,0.9) 100%);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

body[data-subject="biology"] .mc-question > p {
  margin-bottom: 16px;
  color: #16324f;
  font-size: 16px;
  font-weight: 700;
}

body[data-subject="biology"] .mc-option {
  margin: 10px 0;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

body[data-subject="biology"] .mc-option:hover {
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.98) 0%, rgba(220, 252, 231, 0.98) 100%);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 16px 28px rgba(8, 145, 178, 0.12);
  transform: translateX(4px);
}

body[data-subject="biology"] .mc-letter {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #ecfeff 100%);
  border-color: rgba(6, 182, 212, 0.22);
  color: #155e75;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.5);
}

body[data-subject="biology"] .mc-text {
  color: #334e68;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.65;
}

body[data-subject="biology"] .mc-feedback {
  margin-top: 12px;
  border-radius: 16px;
  font-size: 14px;
}

body[data-subject="biology"] .question-item {
  padding: 24px 24px 22px;
  margin: 22px 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(240,253,250,0.92) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-left: 5px solid var(--primary-mid);
  border-radius: 22px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}

body[data-subject="biology"] .question-item p {
  color: #16324f;
  font-size: 15.5px;
  line-height: 1.7;
}

body[data-subject="biology"] .question-meta {
  gap: 8px;
  margin-bottom: 12px;
}

body[data-subject="biology"] .confidence-label {
  color: #486581;
}

body[data-subject="biology"] .confidence-chip {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(148, 163, 184, 0.28);
  color: #334e68;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

body[data-subject="biology"] .confidence-chip:hover {
  border-color: rgba(6, 182, 212, 0.45);
  color: #0f4c5c;
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.98) 0%, rgba(220, 252, 231, 0.98) 100%);
}
/* Bio short answer */
.sa-question { margin-bottom: 20px; }
.sa-question p { font-size: 15px; color: var(--text); line-height: 1.6; margin-bottom: 8px; font-weight: 500; }
.sa-marks { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }

/* ============================================================
   ANSWERS SECTION (collapsible)
   ============================================================ */
.answers-section { margin-top: 48px; }
.answers-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 2px solid var(--success);
  border-radius: var(--radius);
  padding: 20px 28px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.answers-trigger.open { border-radius: var(--radius) var(--radius) 0 0; }
.answers-trigger:hover { background: var(--success-light); }
.answers-trigger h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.answers-trigger .arrow { font-size: 20px; color: var(--success); transition: transform 0.2s; }
.answers-trigger.open .arrow { transform: rotate(180deg); }
.answers-body {
  display: none;
  background: var(--surface);
  border: 2px solid var(--success);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 28px;
}
.answers-body.open { display: block; }
.answer-item {
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 14px;
  border-left: 3px solid var(--success);
}
.answer-item h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--success);
  margin-bottom: 10px;
}
.answer-item p, .answer-item li {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 6px;
}
.answer-item ol, .answer-item ul { margin-left: 18px; margin-top: 6px; }
.answer-item .ans-math {
  font-family: 'DM Mono', monospace;
  color: var(--math-color);
  font-size: 14px;
  display: block;
  margin: 4px 0;
}
.answer-item strong { color: var(--text); }
/* Bio answer accordion */
.answer-toggle {
  background: var(--accent-bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 4px;
  transition: background 0.15s;
}
.answer-toggle:hover { background: var(--accent-light); filter: brightness(0.97); }
.answer-toggle .arr { margin-left: auto; transition: transform 0.2s; }
.answer-toggle.open .arr { transform: rotate(90deg); }
.answer-body {
  display: none;
  background: white;
  border: 1.5px solid var(--border-2);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 18px 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.answer-body.open { display: block; }
.answer-body ul { margin-left: 18px; margin-top: 6px; }
.answer-body li { margin-bottom: 5px; }

/* ============================================================
   COMPLETION
   ============================================================ */
.completion-wrap {
  margin-top: 48px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.completion-wrap:hover { border-color: var(--success); }
.completion-wrap.done { border-color: var(--success); background: var(--success-light); }
.completion-checkbox {
  width: 36px; height: 36px;
  border: 2.5px solid var(--border-2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.2s;
  color: transparent;
}
.completion-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
}
.completion-text h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.completion-text p { font-size: 13px; color: var(--text-muted); margin: 0; }
/* Bio completion (checkbox style) */
.completion {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  margin: 20px 0;
  border: 1.5px solid var(--border);
}
.completion input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
.completion label {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

/* ============================================================
   SHAREABLE FLAGSHIP LESSON BLOCK
   ============================================================ */
.share-lesson {
  margin-top: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.share-lesson-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.share-lesson-header h3 {
  margin: 0 0 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.share-lesson-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 560px;
}
.share-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.share-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.share-item {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.share-item strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
  margin-bottom: 6px;
}
.share-item span {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
}
.share-btn.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: white;
}
.share-btn.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
.share-btn.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.share-btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-bg);
}

/* ============================================================
   LESSON NAV
   ============================================================ */
.lesson-nav {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.lesson-nav a {
  min-height: 88px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lesson-nav a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent-light);
  background: rgba(255, 255, 255, 0.94);
}
.lesson-nav a.next {
  margin-left: 0;
  justify-content: flex-end;
  text-align: right;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: white;
}
.lesson-nav a.next:hover {
  background: linear-gradient(135deg, var(--primary-mid), var(--accent-dark));
  border-color: transparent;
}
.lesson-meta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px !important;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lesson-meta-links::before {
  content: 'Continue With';
  display: block;
  width: 100%;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 2px;
}
.lesson-meta-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.lesson-meta-links a:hover {
  background: var(--accent-bg);
  color: var(--accent-dark);
  border-color: var(--accent-light);
  transform: translateY(-1px);
}

/* ============================================================
   THINK FIRST & REVISIT
   ============================================================ */
.think-first {
  background: var(--accent-bg);
  border-radius: var(--radius);
  border-top: 4px solid var(--accent);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.tf-label,
.think-first h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tf-label::before,
.think-first h3::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}
.think-first p { font-size: 15px; color: var(--text); font-weight: 500; line-height: 1.6; margin-bottom: 14px; }
.tf-note { font-size: 12px; color: var(--accent-dark); margin-top: 8px; opacity: 0.75; font-style: italic; }
.revisit {
  background: var(--surface);
  border-radius: var(--radius);
  border-top: 4px solid var(--cyan);
  padding: 28px 32px;
  margin-top: 40px;
  box-shadow: var(--shadow-sm);
}
.revisit-label,
.revisit h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cyan);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.revisit-label::before,
.revisit h3::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--cyan);
  flex-shrink: 0;
}
.revisit p { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; }
.revisit strong { color: var(--text); }

/* ============================================================
   BLOOM'S TAXONOMY & BAND BADGES
   ============================================================ */
.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.bloom-badge, .band-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
}
.bloom-remember   { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.bloom-understand { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.bloom-apply      { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.bloom-analyse    { background: #ecfeff; color: #0891b2; border: 1px solid #67e8f9; }
.bloom-evaluate   { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }
.bloom-create     { background: #ede9fe; color: #6d28d9; border: 1px solid #c4b5fd; }
.band-1 { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.band-2 { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.band-3 { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.band-4 { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }
.band-5 { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.band-6 { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* ============================================================
   SVG DIAGRAMS & IMAGE PLACEHOLDERS
   ============================================================ */
.svg-diagram { margin: 20px 0; }
.svg-caption {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
  opacity: 0.75;
}
.img-placeholder {
  background: var(--surface-2);
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-sm);
  padding: 40px 24px;
  text-align: center;
  margin: 20px 0;
  color: var(--text-light);
}
.img-placeholder .ph-icon, .img-placeholder .img-icon { font-size: 32px; margin-bottom: 8px; }
.img-placeholder p { font-size: 13px; margin: 0; color: var(--text-light); }
.img-placeholder strong { color: var(--text-muted); font-size: 14px; display: block; margin-bottom: 4px; }
.img-placeholder .ph-label {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--text-muted);
}
.img-placeholder .ph-note { font-size: 12px; opacity: 0.65; }
.img-label {
  display: inline-block;
  background: var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}
/* Diagram embed (Bio Mod1) */
.diagram-embed { border-radius: var(--radius-sm); overflow: hidden; margin: 14px 0; border: 1px solid var(--border-2); }
.diagram-embed iframe { width: 100%; height: 440px; display: block; border: none; }
.diagram-caption {
  font-size: 11px;
  color: var(--accent-dark);
  padding: 8px 14px;
  background: var(--accent-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.diagram-caption a {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: var(--accent-dark);
  text-decoration: none;
}
.diagram-caption a:hover { text-decoration: underline; }

/* ============================================================
   HSC EXAM RELEVANCE (Bio Mod 2)
   ============================================================ */
.hsc-relevance {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 28px 32px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}
.hsc-relevance-header { margin-bottom: 20px; }
.hsc-relevance-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-dark);
  margin-bottom: 6px;
}
.hsc-relevance-header p { font-size: 14px; color: var(--text-muted); margin: 0; }
.hsc-relevance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.hsc-item {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  border-left-width: 4px;
  padding: 16px 18px;
}
.hsc-high  { border-left-color: var(--danger); }
.hsc-medium { border-left-color: var(--accent); }
.hsc-item-priority {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.hsc-high   .hsc-item-priority { color: var(--danger); }
.hsc-medium .hsc-item-priority { color: var(--accent-dark); }
.hsc-item-content { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

/* ============================================================
   HIDE PRICING LINKS (legacy)
   ============================================================ */
a[href*="pricing.html"] { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .section-nav { display: none; }
  .hero { padding: 36px 24px 28px; }
  .hero h1 { font-size: 28px; }
  .hero-emoji { font-size: 64px; }
  .intentions-grid { grid-template-columns: 1fr; }
  .intentions { grid-template-columns: 1fr; }
  .copy-grid { grid-template-columns: 1fr; }
  .share-grid { grid-template-columns: 1fr; }
  .share-lesson { padding: 20px; }
  .share-lesson-header { flex-direction: column; }
  .card { padding: 24px 20px; }
  .formula-panel { padding: 22px 20px; }
  .formula-eq { font-size: 18px; }
  .formula-rearrange { font-size: 12px; }
  .worked-example-body { padding: 20px; }
  .triangle-graphic { padding: 20px 24px; }
  .triangle-top { font-size: 22px; }
  .triangle-cell { font-size: 16px; }
  .page { padding: 24px 16px 80px; }
  .pathogen-grid { grid-template-columns: 1fr; }
  .hsc-relevance-grid { grid-template-columns: 1fr; }
  .hsc-relevance { padding: 22px 20px; }
}
@media (max-width: 480px) {
  .hero-top { flex-direction: column-reverse; }
  .hero-emoji { font-size: 52px; }
  .lesson-nav {
    grid-template-columns: 1fr;
  }
  .lesson-nav a {
    min-height: 74px;
    font-size: 13px;
  }
  .lesson-nav a.next {
    justify-content: flex-start;
    text-align: left;
  }
  .page-breadcrumbs {
    gap: 6px;
    padding: 9px 12px;
    margin-bottom: 14px;
  }
  .page-breadcrumbs a,
  .page-breadcrumbs span {
    font-size: 10px;
  }
}

/* ============================================================
   LESSON TOP BAR (injected by lesson-nav.js)
   ============================================================ */
.lesson-top-bar {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--border-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 200;
}
.ltb-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
}
.ltb-back {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s;
  flex-shrink: 0;
}
.ltb-back:hover { color: var(--primary); }
.ltb-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
  overflow: hidden;
}
.ltb-subj {
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.2px;
}
.ltb-divider {
  color: var(--border-2);
  font-weight: 300;
}
.ltb-mod {
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: -0.2px;
}
.ltb-menu {
  background: none;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.ltb-menu:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-light);
}

/* ── Phase system ─────────────────────────────────────────── */

.phase { display: none; }
.phase.active { display: block; }

.phase-strip {
  display: flex;
  align-items: center;
  margin: 0 0 28px 0;
  padding: 14px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.phase-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.phase-step:hover { background: var(--surface-2); }

.ps-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.phase-step.active .ps-num {
  background: var(--accent);
  color: white;
}

.ps-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s;
}

.phase-step.active .ps-label { color: var(--accent-dark); }

.ps-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 24px;
}

.phase-back-row {
  margin-bottom: 20px;
}

.phase-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.phase-next-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s, transform 0.1s;
}

.phase-next-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.phase-back-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}

.phase-back-btn:hover { background: var(--surface-2); }

.phase-retry-btn {
  background: #fef9c3;
  border: 1px solid #fde047;
  color: #713f12;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}

.phase-retry-btn:hover { background: #fef08a; }

.mc-score-banner {
  margin: 24px 0 4px;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}

.mc-score-banner.pass {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

.mc-score-banner.fail {
  background: #fef9c3;
  border: 1px solid #fde047;
  color: #713f12;
}

.mc-gate-btns {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0 24px;
}

.game-placeholder {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 2px dashed #bae6fd;
  border-radius: var(--radius);
  padding: 56px 32px;
  text-align: center;
  margin: 24px 0 32px;
}

.game-placeholder-icon {
  font-size: 52px;
  margin-bottom: 16px;
  line-height: 1;
}

.game-placeholder h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  color: var(--heading-color);
  margin-bottom: 8px;
}

.game-placeholder p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
}

.game-coming-soon {
  margin-top: 12px !important;
  font-size: 13px !important;
  color: #94a3b8 !important;
  font-style: italic;
}

.game-launch-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 50%, #f8fafc 100%);
  border: 2px solid rgba(99, 102, 241, 0.24);
  border-radius: var(--radius, 18px);
  padding: 44px 36px;
  margin: 24px 0 28px;
}

.game-launch-card.asteroid-launch-card {
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.2), transparent 48%),
              linear-gradient(145deg, #0f172a 0%, #111827 56%, #020617 100%);
  border-color: rgba(129, 140, 248, 0.42);
  color: #e2e8f0;
}

.game-launch-icon {
  font-size: 58px;
  line-height: 1;
  filter: drop-shadow(0 4px 14px rgba(99, 102, 241, 0.32));
}

.game-launch-tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.14);
  color: #4338ca;
  border: 1.5px solid rgba(99, 102, 241, 0.28);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.asteroid-launch-card .game-launch-tag {
  background: rgba(129, 140, 248, 0.18);
  color: #c7d2fe;
  border-color: rgba(199, 210, 254, 0.3);
}

.game-launch-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--heading-color, #1e293b);
  margin: 0;
  line-height: 1.25;
}

.asteroid-launch-card .game-launch-title {
  color: #f8fafc;
}

.game-launch-desc {
  font-size: 16px;
  color: var(--text-muted, #475569);
  max-width: 560px;
  line-height: 1.65;
  margin: 0;
}

.asteroid-launch-card .game-launch-desc {
  color: #cbd5e1;
}

.game-launch-btn {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  padding: 15px 32px;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 8px 26px rgba(79, 70, 229, 0.32);
  transition: transform 0.15s, box-shadow 0.15s;
}

.game-launch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.42);
}

.game-launch-alt {
  margin-top: -8px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  font-weight: 700;
}

/* Game placeholder — make the coming-soon state feel intentional, not broken */
.game-placeholder {
  text-align: center;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 48px 32px;
  margin: 24px 0 32px;
}
.game-placeholder h2 {
  color: #64748b;
}
.game-placeholder-icon {
  filter: grayscale(0.4);
}

@media (max-width: 768px) {
  .phase-strip { padding: 10px 12px; }
  .ps-label { display: none; }
  .ps-connector { min-width: 12px; }
  .ltb-title {
    font-size: 13px;
    gap: 8px;
  }
  .ltb-mod { display: none; }
  .ltb-divider { display: none; }
}

/* ============================================================
   PHASE F — COMPONENT LIBRARY
   ============================================================ */

/* --- Mesh background utility --- */
.mesh-bg {
  background: var(--mesh-gradient);
  min-height: 100vh;
}

/* --- Glass card --- */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  padding: 1.5rem;
}

/* --- Solid card --- */
.card-solid {
  background: var(--surface-solid);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

/* --- Tinted card (subject-coloured bg) --- */
.card-tinted {
  background: var(--primary-light);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* --- Button: Primary (gradient) --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.625rem 1.25rem;
  font: 600 0.9375rem/1 'DM Sans', sans-serif;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary.sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; border-radius: var(--radius-xs); }
.btn-primary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* --- Button: Ghost --- */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 1rem;
  font: 500 0.9375rem/1 'DM Sans', sans-serif;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.18s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.85); }
.btn-ghost.sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; border-radius: var(--radius-xs); }
.btn-ghost:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* --- Lesson worksheet download card --- */
.worksheet-download-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border, #d7e6ea);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,255,255,0.84)),
    linear-gradient(135deg, var(--primary-light, #e0f2fe), var(--accent-light, #dbeafe));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.worksheet-download-copy {
  min-width: 0;
}

.worksheet-download-eyebrow {
  display: inline-flex;
  margin-bottom: 0.35rem;
  color: var(--primary, #0f766e);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.worksheet-download-card h2,
.worksheet-download-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  line-height: 1.2;
}

.worksheet-download-card p {
  margin: 0;
  color: var(--text-muted, #475569);
  font-size: 0.92rem;
  line-height: 1.55;
}

.worksheet-download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-shrink: 0;
}

.worksheet-download-actions a {
  text-decoration: none;
}

@media (max-width: 720px) {
  .worksheet-download-card {
    align-items: stretch;
    flex-direction: column;
  }

  .worksheet-download-actions {
    justify-content: flex-start;
  }
}

/* --- Button: Danger --- */
.btn-danger {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(252,165,165,0.5);
  font: 600 0.8125rem/1 'DM Sans', sans-serif;
  cursor: pointer;
  background: var(--danger-bg);
  color: #991b1b;
}

/* --- Badge variants --- */
.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.75em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-pill.primary { background: var(--primary-light); color: var(--accent-dark); }
.badge-pill.accent  { background: var(--accent-light);  color: var(--accent-dark); }
.badge-pill.success { background: var(--success-light); color: var(--success); }
.badge-pill.danger  { background: var(--danger-light);  color: var(--danger); }

/* --- Progress track (updated) --- */
.progress-track {
  flex: 1; height: 8px; background: rgba(0,0,0,0.08);
  border-radius: 4px; overflow: hidden;
}
.progress-fill {
  height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s ease;
}

/* --- Focus visible: global + element-specific matching hover states --- */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* MC options — match hover background so keyboard users see selection clearly */
.mc-option:focus-visible {
  background: var(--accent-bg);
  border-color: var(--accent);
  outline: 3px solid var(--accent);
}
.mc-option:focus-visible .mc-letter { background: var(--accent); color: white; border-color: var(--accent); }
.mc-opt:focus-visible { border-color: var(--accent); background: var(--accent-bg); outline: 3px solid var(--accent); }

/* Lesson nav — match hover colours */
.lesson-nav a:focus-visible { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-bg); outline: 3px solid var(--accent); }
.lesson-nav a.next:focus-visible { background: var(--accent); border-color: var(--accent); color: white; }

/* Collapsibles / accordions */
.collapsible-trigger:focus-visible { background: var(--surface-2); }
.answers-trigger:focus-visible { background: var(--success-light); }
.answer-toggle:focus-visible { background: var(--accent-light); }
.copy-toggle:focus-visible { background: var(--accent-bg); }

/* Drill reveal button */
.drill-show-btn:focus-visible { background: var(--accent); color: white; outline: 3px solid var(--accent-dark); }

/* Section nav dots */
.section-nav a:focus-visible { background: var(--accent); transform: scale(1.3); outline: 3px solid var(--accent-dark); }

/* Phase game buttons */
.phase-next-btn:focus-visible { opacity: 0.88; outline: 3px solid var(--accent-dark); }
.phase-back-btn:focus-visible { background: var(--surface-2); }
.phase-retry-btn:focus-visible { background: #fef08a; }

/* ============================================================
   INTERACTIVE EMBED WRAPPER
   ============================================================ */
.interactive-embed {
  border: 2px solid var(--primary);
  border-radius: 16px;
  overflow: hidden;
  margin: 28px auto;
  max-width: var(--max-w);
}
.interactive-label {
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.3px;
}
.interactive-embed iframe {
  display: block;
  width: 100%;
  height: 520px;
  border: none;
}

/* ============================================================
   FORMULA PANEL — fp-* shorthand (L11+)
   ============================================================ */
.fp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.fp-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}
.fp-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-dark);
  margin: 0;
}
.fp-body {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  color: var(--text);
  line-height: 1.85;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--accent-light);
  margin-bottom: 12px;
}
.fp-note {
  font-size: 13.5px;
  color: var(--text-muted);
  padding: 10px 14px;
  background: rgba(220, 38, 38, 0.05);
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--primary);
  line-height: 1.6;
}

/* ============================================================
   CONDITIONS GRID — STP / RTP cards (L15)
   ============================================================ */
.conditions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0 24px;
}
.condition-card {
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.condition-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: white;
  line-height: 1.3;
}
.condition-card ul {
  text-align: left;
  margin: 10px 0 0 0;
  padding-left: 16px;
}
.condition-card li {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255,255,255,0.88);
}
.condition-card.stp {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  border: 1.5px solid rgba(30,64,175,0.4);
}
.condition-card.rtp {
  background: linear-gradient(135deg, #065f46 0%, #0891b2 100%);
  border: 1.5px solid rgba(8,145,178,0.4);
}
.big-val {
  font-family: 'DM Mono', monospace;
  font-size: 30px;
  font-weight: 700;
  color: #67e8f9;
  margin: 6px 0 8px;
  line-height: 1.1;
  display: block;
}
@media (max-width: 600px) {
  .conditions-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ERROR ANALYSIS — error cards + scenario table (L18)
   ============================================================ */
.error-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0;
}
.error-card {
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  border: 1.5px solid var(--border-2);
}
.error-card.random {
  background: rgba(234,179,8,0.08);
  border-color: rgba(234,179,8,0.35);
}
.error-card.systematic {
  background: rgba(220,38,38,0.06);
  border-color: rgba(220,38,38,0.3);
}
.error-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--heading-color);
}
.error-card.random h4 { color: #92400e; }
.error-card.systematic h4 { color: #991b1b; }
.error-card li {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
}
@media (max-width: 600px) {
  .error-compare { grid-template-columns: 1fr; }
}

/* Scenario rows (error analysis table rows) */
.scenario-row {
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
}
.scenario-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border-2);
}
.scenario-type {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.scenario-type.random {
  background: rgba(234,179,8,0.15);
  color: #92400e;
  border: 1px solid rgba(234,179,8,0.4);
}
.scenario-type.systematic {
  background: rgba(220,38,38,0.10);
  color: #991b1b;
  border: 1px solid rgba(220,38,38,0.3);
}
.scenario-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--heading-color);
}
.scenario-body {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}
.scenario-field { font-size: 13.5px; line-height: 1.65; color: var(--text-muted); }
.scenario-field strong { color: var(--text); display: block; margin-bottom: 3px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
@media (max-width: 600px) {
  .scenario-body { grid-template-columns: 1fr; }
}

/* Equipment table */
.equip-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
}
.equip-table th {
  background: var(--primary-mid);
  color: white;
  padding: 9px 12px;
  text-align: left;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
}
.equip-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-2);
  color: var(--text-muted);
}
.equip-table tr:last-child td { border-bottom: none; }
.equip-table tr:nth-child(even) td { background: var(--surface-3); }

/* ─── IQ TRACKER — consolidation lesson module progress (L05) ─────── */
.iq-tracker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 28px;
}
.iq-tracker .iq-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}
.iq-tracker .iq-card.active {
  border-top-color: var(--accent);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   GOLD-STANDARD CLASSES (Chemistry M5 parity)
   ============================================================ */

/* ── Callout red ── */
.callout-red {
  background: rgba(220, 38, 38, 0.06);
  border-left: 3px solid #dc2626;
  color: var(--text-muted);
}
.callout-red .callout-tag { background: #dc2626; color: white; }

/* ── Card num purple ── */
.card-num.purple { background: #7c3aed; }

/* ── Hero badge row (Chemistry-style) ── */
.hero-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hbadge {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.hbadge-red {
  background: rgba(255, 255, 255, 0.22);
  color: white;
}
.hbadge-blue {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}
.hbadge-outline {
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
}

/* ── Chemistry-style worked step ── */
.worked-step {
  display: flex;
  gap: 14px;
  margin: 14px 0;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-mid);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-body { flex: 1; }
.step-body p {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}
.we-answer {
  background: var(--primary-light);
  border-left: 3px solid var(--primary-mid);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin-top: 14px;
}
.we-answer strong { color: var(--text); }
.we-answer p { color: var(--text-muted); font-size: 15px; margin: 0; line-height: 1.65; }

/* ── Diagram wrap ── */
.diagram-wrap {
  margin: 24px 0;
  text-align: center;
}
.diagram-caption {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 8px;
  opacity: 0.75;
}

.iq-card-num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.iq-card-num.amber { color: #92400e; }
.iq-tracker .iq-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.35;
}
.iq-tracker .iq-card ul { list-style: none; margin: 0; padding: 0; }
.iq-tracker .iq-card li {
  position: relative;
  padding: 6px 0 6px 14px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}
.iq-tracker .iq-card li:last-child { border-bottom: none; }
.iq-tracker .iq-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-mid);
  font-weight: 800;
}
.iq-tracker .iq-card.active li::before { color: var(--accent); }
.iq-tracker .iq-card li.coming { opacity: 0.5; font-style: italic; }

/* ─── FORMULA SHEET TABLE — 4-column reference (L05) ───────────────── */
.formula-sheet {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 0 0 24px;
}
.formula-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent-light));
  border-bottom: 1px solid var(--border);
}
.formula-sheet-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.fs-badge {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.formula-sheet-body { padding: 0; }
.formula-row-header,
.formula-sheet-body .formula-row {
  display: grid;
  grid-template-columns: 52px 1fr 1.4fr 1.6fr;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  padding: 0;
  flex-wrap: unset;
  gap: 0;
}
.formula-sheet-body .formula-row:last-child { border-bottom: none; }
.fr-cell {
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
}
.fr-cell:last-child { border-right: none; }
.fr-cell.header {
  background: var(--surface-3);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 9px 14px;
}
.fr-cell.lesson {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 6px;
}
.fr-cell.formula {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
}
@media (max-width: 680px) {
  .iq-tracker { grid-template-columns: 1fr; }
  .formula-row-header,
  .formula-sheet-body .formula-row { grid-template-columns: 44px 1fr; }
  .fr-cell.vars, .fr-cell.conditions { display: none; }
}
