/* ============================================================
   Canonical Shared Components — assets/css/core/components.css
   ============================================================
   Union of identical rules across all 9 module forks, plus
   canonical variants of the 10 true conflict selectors.

   Module-specific unique rules remain in each fork's own
   components.css file. Override variants are in:
     assets/css/themes/{subject}-y{year}-m{module}-components-overrides.css

   See qa/components-analysis.md and qa/components-conflicts.md
   for full classification details.
   ============================================================ */


/* ── HERO BREADCRUMB ──────────────────────────────────────── */
/* canonical: see qa/components-analysis.md for overrides */
.hero-breadcrumb {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif;
}

/* canonical: see qa/components-analysis.md for overrides */
.hero-breadcrumb span {
  color: var(--text-light);
  margin: 0 6px;
}


/* ── HERO DESCRIPTION ─────────────────────────────────────── */
/* IDENTICAL: Maths M2 + Chem M1 */
.hero-desc {
  color: var(--text-muted);
  font-size: 15.5px;
  max-width: 540px;
  line-height: 1.6;
}


/* ── INTENTIONS GRID ──────────────────────────────────────── */
/* IDENTICAL: Maths M2 + Chem M1 */
.intentions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.intention-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--primary);
}
.intention-card h3 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.intention-card ul {
  list-style: none;
}
.intention-card li {
  color: var(--text-muted);
  font-size: 13.5px;
  padding: 5px 0 5px 16px;
  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: 700;
  color: var(--primary);
}


/* ── WORKED EXAMPLE — we-* ────────────────────────────────── */

/* canonical: see qa/components-analysis.md for overrides */
/* Canonical = surface-2 version (Phys M2 / Phys M3 / Maths M2) */
.we-header {
  background: var(--surface-2);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

/* IDENTICAL: Phys M2 + Phys M3 + Maths M2 */
.we-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

/* canonical: see qa/components-analysis.md for overrides */
/* Canonical = --cyan version (Phys M2 / Phys M3) */
.pt-badge {
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--cyan-bg);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* IDENTICAL: Phys M2 + Phys M3 + Maths M2 (setup section bg/border) */
.we-setup {
  background: var(--primary-light);
  padding: 18px 24px;
  border-bottom: 1px solid rgba(29, 78, 216, 0.15);
}

/* canonical: see qa/components-analysis.md for overrides */
/* Canonical = var(--primary) (Phys M2 + Maths M2) */
.we-setup h4 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary);
  margin-bottom: 10px;
}

/* IDENTICAL: Phys M2 + Phys M3 */
.we-setup p {
  color: var(--text);
  font-size: 14px;
  margin-bottom: 6px;
}

/* IDENTICAL: Phys M2 + Phys M3 + Maths M2 */
.we-setup ul {
  list-style: none;
  padding: 0;
}

/* IDENTICAL: Phys M2 + Phys M3 + Maths M2 */
.we-setup li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 3px 0 3px 14px;
  position: relative;
}

/* canonical: see qa/components-analysis.md for overrides */
/* Canonical = var(--primary) (Phys M2 + Maths M2) */
.we-setup li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* IDENTICAL: Phys M3 + Maths M2 */
.we-solution {
  background: white;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

/* IDENTICAL: Phys M3 + Maths M2 */
.we-solution h4 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* canonical: see qa/components-analysis.md for overrides */
/* Canonical = grid version (Phys M2 / Phys M3 / Maths M2) */
.we-step {
  display: grid;
  grid-template-columns: 28px 1fr 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

/* IDENTICAL: Phys M2 + Phys M3 + Maths M2 */
.we-step:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* canonical: see qa/components-analysis.md for overrides */
/* Canonical = circle/primary (Phys M2 / Phys M3 / Maths M2) */
.we-step-num {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  font-family: var(--font-display);
}

/* IDENTICAL: Phys M2 + Phys M3 + Maths M2 */
.we-step-eq {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
}

/* IDENTICAL: Phys M2 + Phys M3 + Maths M2 */
.we-step-why {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

/* IDENTICAL: Phys M2 + Phys M3 */
.we-variation {
  background: var(--accent-light);
  padding: 18px 24px;
}

/* IDENTICAL: Phys M2 + Phys M3 */
.we-variation p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* IDENTICAL: Maths M2 + Chem M1 */
.we-step.revealed {
  animation: revealStep 0.35s ease both;
}

/* IDENTICAL: Maths M2 + Chem M1 */
@keyframes revealStep {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── STEP-REVEAL BUTTON ───────────────────────────────────── */
/* canonical: see qa/components-analysis.md for overrides */
/* Canonical = var(--primary) (Maths M2) */
.reveal-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

/* canonical: see qa/components-analysis.md for overrides */
.reveal-btn:hover {
  background: var(--primary-dark);
}


/* ── MARKS BADGE ──────────────────────────────────────────── */
/* IDENTICAL: Maths M2 + Chem M1 */
.marks {
  display: inline-flex;
  align-items: center;
  background: var(--secondary);
  color: white;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  float: right;
  margin-top: 2px;
}


/* ── ANSWERS SECTION ──────────────────────────────────────── */
/* IDENTICAL: Maths M2 + Chem M1 */
.answers-trigger {
  border: 2px solid var(--secondary);
}
.answers-trigger:hover {
  background: var(--secondary-light);
}
.answers-trigger .arrow {
  color: var(--secondary);
}
.answers-body {
  border: 2px solid var(--secondary);
  border-top: none;
}
.answer-item {
  border-left: 3px solid var(--secondary);
}
.answer-item h4 {
  color: var(--secondary);
}


/* ── COMPLETION ───────────────────────────────────────────── */
/* IDENTICAL: Maths M2 + Chem M1 */
.completion-checkbox.checked {
  background: var(--secondary);
  border-color: var(--secondary);
}
.completion-wrap.done {
  border-color: var(--secondary);
  background: var(--secondary-light);
}


/* ── LESSON CTA ───────────────────────────────────────────── */
.lcta {
  margin: 40px 0 16px;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(168,85,247,0.06) 100%);
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: 'DM Sans', sans-serif;
}
.lcta-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}
.lcta-body {
  flex: 1;
  min-width: 0;
}
.lcta-body strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #1e293b);
  margin-bottom: 3px;
}
.lcta-body p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
}
.lcta-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 18px;
  background: var(--primary, #6366f1);
  color: #fff !important;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.lcta-btn:hover {
  opacity: 0.88;
}
@media (max-width: 500px) {
  .lcta { flex-direction: column; align-items: flex-start; gap: 12px; }
}
