/* ============================================================
   HSCScience — lesson-components.css
   Universal component layer for ALL subject lessons.
   Load AFTER lesson.css and the subject theme file.
   Each subject defines its own --primary / --accent palette
   in its theme file; this file generates semantic tints.
   ============================================================ */

/* ── Semantic tint tokens (auto-adapt to subject palette) ── */
:root {
  --lc-hero-start: var(--primary-mid, #0d7377);
  --lc-hero-end:   var(--accent-dark, #14a9b8);
  --lc-hero-grad:  linear-gradient(135deg, var(--lc-hero-start) 0%, var(--lc-hero-end) 100%);

  --lc-mint:       color-mix(in srgb, var(--primary, #34d399) 8%, white);
  --lc-mint-border:color-mix(in srgb, var(--primary, #34d399) 35%, white);
  --lc-sky:        color-mix(in srgb, var(--accent, #06b6d4) 8%, white);
  --lc-sky-border: color-mix(in srgb, var(--accent, #06b6d4) 35%, white);
  --lc-peach:      color-mix(in srgb, var(--warning, #d97706) 8%, white);
  --lc-peach-border:color-mix(in srgb, var(--warning, #d97706) 35%, white);

  --lc-teal:       var(--primary-mid, #0d7377);
  --lc-teal-mid:   var(--accent, #14a9b8);
  --lc-teal-light: color-mix(in srgb, var(--primary-mid, #0d7377) 8%, transparent);

  --lc-coral:      var(--danger, #e85d3a);
  --lc-amber:      var(--warning, #d97706);

  --lc-purple:     #6d4c9f;
  --lc-purple-light: rgba(109,76,159,.07);

  --lc-bg:         var(--bg, #f7fdfb);
  --lc-surface:    var(--surface-solid, #ffffff);
  --lc-text:       var(--text, #0d2b2c);
  --lc-text-muted: var(--text-muted, #3d6b6e);
  --lc-text-light: var(--text-light, #7aadaf);
  --lc-border:     var(--border-2, #cce8ea);

  --lc-radius:     var(--radius, 14px);
  --lc-radius-sm:  var(--radius-sm, 8px);
}

/* ── Font stack standardisation ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--lc-bg);
  color: var(--lc-text);
  line-height: 1.65;
}
h1, h2, h3, h4 { font-family: 'Nunito', sans-serif; }
.mono, code { font-family: 'DM Mono', monospace; }

/* ── Page ── */
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(140deg,
    color-mix(in srgb, var(--primary, #38bdf8) 18%, white) 0%,
    color-mix(in srgb, var(--primary, #38bdf8) 32%, white) 80%);
  border-radius: var(--lc-radius);
  padding: 40px 44px;
  margin-bottom: 28px;
  color: var(--text, #0f172a);
}
.hero-top {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  justify-content: space-between;
}
.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: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.hbadge-teal {
  background: rgba(255,255,255,.55);
  color: var(--text, #0f172a);
}
.hbadge-outline {
  border: 1.5px solid rgba(0,0,0,.18);
  background: rgba(255,255,255,.35);
  color: var(--text, #0f172a);
}
.hero h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -.3px;
  color: var(--text, #0f172a);
}
.hero-desc,
.hero-hook {
  font-size: 16px;
  max-width: 700px;
  line-height: 1.65;
  opacity: .82;
  color: var(--text, #0f172a);
}
.hero-hook {
  border-left: 3px solid rgba(0,0,0,.2);
  padding-left: 16px;
  font-style: italic;
}
.hero-emoji {
  font-size: 64px;
  line-height: 1;
  flex-shrink: 0;
  opacity: .8;
}

/* ── Mode banner ── */
.mode-banner {
  background: white;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius-sm);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.mode-banner p { font-size: 14px; color: var(--lc-text-muted); }
.mode-toggle { display: flex; gap: 8px; }
.mode-btn {
  padding: 7px 16px;
  border-radius: 6px;
  border: 1.5px solid var(--lc-border);
  background: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--lc-text-muted);
  transition: all .2s;
}
.mode-btn.active {
  background: var(--lc-teal);
  color: white;
  border-color: var(--lc-teal);
}

/* ── Think First ── */
.think-first {
  background: linear-gradient(135deg, #0d2b2c 0%, var(--lc-teal) 100%);
  border-radius: var(--lc-radius);
  padding: 32px;
  margin-bottom: 24px;
}
.tf-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: rgba(255,255,255,.18);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
  color: white;
  font-family: 'DM Sans', sans-serif;
}
.think-first h3 {
  font-family: 'Nunito', sans-serif;
  color: white;
  font-size: 17px;
  margin-bottom: 12px;
  font-weight: 800;
}
.think-first p {
  color: rgba(255,255,255,.9);
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.7;
}
.think-first strong { color: white; }
.think-first .answer-textarea {
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.3);
  color: white;
  font-size: 14px;
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  resize: vertical;
  min-height: 80px;
  font-family: 'DM Sans', sans-serif;
}
.think-first .answer-textarea::placeholder { color: rgba(255,255,255,.45); }
.think-first .autosave-indicator {
  color: rgba(255,255,255,.6);
  font-size: 12px;
  margin-top: 6px;
  display: block;
}

/* ── Learning intentions ── */
.intentions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.intention-card {
  background: white;
  border: 1.5px solid var(--lc-border);
  border-radius: var(--lc-radius-sm);
  padding: 20px;
}
.intention-card.mint { border-top: 3px solid var(--lc-mint-border); background: var(--lc-mint); }
.intention-card.sky { border-top: 3px solid var(--lc-sky-border); background: var(--lc-sky); }
.intention-card.peach { border-top: 3px solid var(--lc-peach-border); background: var(--lc-peach); }
.intention-card h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--lc-text);
}
.intention-card ul {
  padding-left: 16px;
  color: var(--lc-text-muted);
  font-size: 13.5px;
  line-height: 1.75;
}

/* ── Section label ── */
.section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--lc-text-light);
  margin: 32px 0 14px;
  display: block;
}

/* ── Key terms panel ── */
.key-terms-panel {
  background: var(--lc-sky);
  border: 1.5px solid var(--lc-sky-border);
  border-radius: var(--lc-radius);
  padding: 24px 28px;
  margin-bottom: 24px;
}
.kt-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--lc-teal);
  display: block;
  margin-bottom: 14px;
}
.kt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.kt-item {
  background: white;
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid var(--lc-sky-border);
}
.kt-term {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--lc-teal);
  display: block;
  margin-bottom: 4px;
}
.kt-def {
  font-size: 13px;
  color: var(--lc-text-muted);
  line-height: 1.55;
}

/* ── Content Card ── */
.card {
  background: white;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius);
  padding: 30px 34px;
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.card-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  color: white;
  background: var(--lc-teal);
  font-family: 'Nunito', sans-serif;
}
.card h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: var(--lc-text);
  margin-bottom: 4px;
}
.card-subtitle {
  font-size: 13px;
  color: var(--lc-text-light);
}
.card p {
  color: var(--lc-text-muted);
  font-size: 15px;
  line-height: 1.72;
  margin-bottom: 14px;
}
.card p:last-child { margin-bottom: 0; }
.card h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--lc-text);
  margin: 20px 0 9px;
}
.card ul, .card ol {
  padding-left: 20px;
  color: var(--lc-text-muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 14px;
}

/* ── Conceptual opener ── */
.conceptual-first {
  font-size: 16px;
  color: var(--lc-teal);
  font-style: italic;
  line-height: 1.65;
  margin-bottom: 18px;
  padding-left: 16px;
  border-left: 3px solid var(--lc-teal);
}

/* ── Feedback loop diagram ── */
.feedback-diagram {
  background: linear-gradient(135deg, var(--lc-mint) 0%, var(--lc-sky) 100%);
  border: 1.5px solid var(--lc-mint-border);
  border-radius: var(--lc-radius);
  padding: 24px 20px;
  margin: 18px 0;
}
.fd-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--lc-teal);
  display: block;
  margin-bottom: 16px;
  text-align: center;
}
.fd-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  row-gap: 10px;
}
.fd-step {
  background: white;
  border: 1.5px solid var(--lc-sky-border);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 100px;
  flex-shrink: 0;
}
.fd-step-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--lc-text-light);
  display: block;
  margin-bottom: 3px;
}
.fd-step-name {
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--lc-teal);
}
.fd-step-example {
  font-size: 11px;
  color: var(--lc-text-muted);
  margin-top: 2px;
}
.fd-arrow {
  font-size: 22px;
  color: var(--lc-teal-mid);
  flex-shrink: 0;
  padding: 0 4px;
  display: flex;
  align-items: center;
}
.fd-loop-arrow {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--lc-teal-mid);
  margin-top: 10px;
  font-weight: 700;
}

/* ── Comparison panel ── */
.compare-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}
.compare-box {
  border-radius: 10px;
  padding: 18px 20px;
}
.compare-box.neg { background: var(--lc-mint); border: 1.5px solid var(--lc-mint-border); }
.compare-box.pos { background: var(--lc-peach); border: 1.5px solid var(--lc-peach-border); }
.compare-box h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}
.compare-box.neg h4 { color: color-mix(in srgb, var(--primary-mid, #0d7377) 60%, black); }
.compare-box.pos h4 { color: color-mix(in srgb, var(--warning, #d97706) 60%, black); }
.compare-box ul {
  padding-left: 14px;
  font-size: 13.5px;
  color: var(--lc-text-muted);
  line-height: 1.75;
}

/* ── Data table ── */
.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--lc-radius-sm);
  border: 1px solid var(--lc-border);
  margin: 16px 0;
}
.data-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table-wrap th {
  background: var(--lc-sky);
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  color: var(--lc-text);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1.5px solid var(--lc-sky-border);
}
.data-table-wrap td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--lc-border);
  color: var(--lc-text-muted);
  vertical-align: top;
}
.data-table-wrap tr:last-child td { border-bottom: none; }
.data-table-wrap tr:nth-child(even) td { background: var(--lc-bg); }

/* ── Callouts ── */
.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-mint, .callout-coral, .callout-sky, .callout-peach {
  padding: 14px 18px;
  border-radius: var(--lc-radius-sm);
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.65;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.callout-mint {
  background: var(--lc-mint);
  border-left: 3px solid var(--lc-mint-border);
  color: var(--lc-text-muted);
}
.callout-mint .callout-tag { background: color-mix(in srgb, var(--primary-mid, #0d7377) 70%, black); color: white; }
.callout-coral {
  background: color-mix(in srgb, var(--danger, #e85d3a) 6%, white);
  border-left: 3px solid var(--lc-coral);
  color: var(--lc-text-muted);
}
.callout-coral .callout-tag { background: var(--lc-coral); color: white; }
.callout-sky {
  background: var(--lc-sky);
  border-left: 3px solid var(--lc-sky-border);
  color: var(--lc-text-muted);
}
.callout-sky .callout-tag { background: var(--lc-teal-mid); color: white; }
.callout-peach {
  background: var(--lc-peach);
  border-left: 3px solid var(--lc-peach-border);
  color: var(--lc-text-muted);
}
.callout-peach .callout-tag { background: color-mix(in srgb, var(--warning, #d97706) 70%, black); color: white; }

/* ── Misconceptions ── */
.misconceptions-box {
  background: var(--lc-purple-light);
  border: 1.5px solid var(--lc-purple);
  border-radius: var(--lc-radius);
  padding: 24px 28px;
  margin: 24px 0;
}
.misconceptions-box h3 {
  font-family: 'Nunito', sans-serif;
  color: var(--lc-purple);
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 14px;
}
.misconception-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: flex-start;
}
.misconception-item:last-child { margin-bottom: 0; }
.misconception-x {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lc-purple);
  color: white;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.misconception-item p {
  font-size: 14px;
  color: color-mix(in srgb, var(--lc-purple) 50%, black);
  line-height: 1.65;
  margin: 0;
}

/* ── Anchor callout ── */
.anchor-callout {
  background: linear-gradient(135deg, color-mix(in srgb, var(--warning, #d97706) 10%, transparent) 0%, color-mix(in srgb, var(--warning, #d97706) 5%, transparent) 100%);
  border: 1.5px solid var(--lc-amber);
  border-radius: var(--lc-radius);
  padding: 24px 28px;
  margin: 24px 0;
}
.anchor-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--lc-amber);
  display: block;
  margin-bottom: 10px;
}
.anchor-callout h3 {
  font-family: 'Nunito', sans-serif;
  color: color-mix(in srgb, var(--warning, #d97706) 60%, black);
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 10px;
}
.anchor-callout p {
  color: color-mix(in srgb, var(--warning, #d97706) 50%, black);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 8px;
}
.anchor-callout p:last-child { margin-bottom: 0; }

/* ── Image placeholder ── */
.img-placeholder {
  background: color-mix(in srgb, var(--primary, #34d399) 5%, white);
  border: 2px dashed var(--lc-mint-border);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  margin: 20px 0;
  color: var(--lc-text-light);
}
.img-placeholder .img-icon { font-size: 32px; margin-bottom: 8px; }
.img-placeholder p { font-size: 13px; margin: 0; line-height: 1.5; }

/* ── Copy into books ── */
.collapsible-wrap {
  background: white;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.collapsible-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
}
.collapsible-trigger h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--lc-text);
  margin: 0;
}
.collapsible-arrow {
  font-size: 14px;
  color: var(--lc-text-light);
  transition: transform .3s;
}
.collapsible-trigger.open .collapsible-arrow { transform: rotate(180deg); }
.collapsible-body { display: none; padding: 0 24px 24px; }
.collapsible-body.open { display: block; }
.copy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.copy-item {
  background: var(--lc-mint);
  border: 1px solid var(--lc-mint-border);
  border-radius: var(--lc-radius-sm);
  padding: 15px;
}
.copy-item h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--lc-text);
  margin-bottom: 8px;
}
.copy-item ul {
  padding-left: 14px;
  font-size: 13px;
  color: var(--lc-text-muted);
  line-height: 1.75;
}

/* ── Activities ── */
.activity {
  background: white;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius);
  padding: 26px 30px;
  margin-bottom: 20px;
}
.activity-badge {
  display: inline-block;
  background: var(--lc-teal);
  color: white;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.activity h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--lc-text);
  margin-bottom: 8px;
}
.activity-meta {
  font-size: 13px;
  color: var(--lc-text-light);
  margin-bottom: 18px;
}
.drill-item {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--lc-border);
}
.drill-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.drill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lc-teal);
  color: white;
  font-size: 11px;
  font-weight: 800;
  margin-right: 6px;
  font-family: 'Nunito', sans-serif;
}

/* ── Answer wrap ── */
.answer-wrap { margin-top: 10px; }
.answer-textarea {
  width: 100%;
  border: 1.5px solid var(--lc-border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--lc-text);
  resize: vertical;
  min-height: 70px;
  background: white;
  transition: border-color .2s;
}
.answer-textarea:focus { outline: none; border-color: var(--lc-teal); }
.autosave-indicator {
  font-size: 11px;
  color: var(--lc-text-light);
  margin-top: 4px;
  display: block;
  height: 14px;
}
.answer-book-placeholder {
  display: none;
  background: var(--lc-mint);
  border: 1.5px dashed var(--lc-mint-border);
  border-radius: 8px;
  padding: 14px;
  font-size: 13.5px;
  color: var(--lc-text-muted);
  text-align: center;
}

/* ── MC ── */
.mc-question {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--lc-border);
}
.mc-question:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.mc-question p {
  font-size: 15px;
  color: var(--lc-text);
  margin-bottom: 12px;
  font-weight: 600;
}
.mc-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--lc-border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .2s;
}
.mc-option:hover { border-color: var(--lc-teal); background: var(--lc-teal-light); }
.mc-option.correct { border-color: var(--success, #1e8449); background: color-mix(in srgb, var(--success, #1e8449) 8%, white); }
.mc-option.incorrect { border-color: var(--lc-coral); background: color-mix(in srgb, var(--danger, #e85d3a) 6%, white); }
.mc-option.disabled { cursor: default; pointer-events: none; }
.mc-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lc-sky);
  color: var(--lc-text-muted);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-family: 'Nunito', sans-serif;
}
.mc-option.correct .mc-letter { background: var(--success, #1e8449); color: white; }
.mc-option.incorrect .mc-letter { background: var(--lc-coral); color: white; }
.mc-text { font-size: 14px; color: var(--lc-text-muted); line-height: 1.55; padding-top: 3px; }
.mc-feedback { font-size: 13px; margin-top: 8px; padding: 8px 12px; border-radius: 6px; display: none; }
.mc-feedback.correct-msg { display: block; background: color-mix(in srgb, var(--success, #1e8449) 10%, white); color: color-mix(in srgb, var(--success, #1e8449) 40%, black); }
.mc-feedback.incorrect-msg { display: block; background: color-mix(in srgb, var(--danger, #e85d3a) 8%, white); color: color-mix(in srgb, var(--danger, #e85d3a) 40%, black); }

/* ── Short answer ── */
.question-item {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--lc-border);
}
.question-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.question-item p { font-size: 15px; color: var(--lc-text); margin-bottom: 10px; }
.marks {
  font-size: 11px;
  font-weight: 800;
  color: var(--lc-teal);
  background: var(--lc-teal-light);
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 6px;
}
.question-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.bloom-badge, .band-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.bloom-understand { background: #dbeafe; color: #1d4ed8; }
.bloom-apply { background: var(--lc-mint); color: color-mix(in srgb, var(--primary-mid, #0d7377) 50%, black); }
.bloom-analyse { background: #ede9fe; color: #5b21b6; }
.bloom-evaluate { background: var(--lc-peach); color: color-mix(in srgb, var(--warning, #d97706) 60%, black); }
.band-3 { background: var(--lc-sky); color: color-mix(in srgb, var(--accent, #06b6d4) 50%, black); }
.band-4 { background: var(--lc-mint); color: color-mix(in srgb, var(--primary-mid, #0d7377) 50%, black); }
.band-5 { background: #ede9fe; color: #5b21b6; }
.band-6 { background: var(--lc-peach); color: color-mix(in srgb, var(--warning, #d97706) 60%, black); }

/* ── Answers ── */
.answers-section {
  background: white;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius);
  margin: 24px 0;
  overflow: hidden;
}
.answers-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  cursor: pointer;
  user-select: none;
}
.answers-trigger h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--lc-text);
  margin: 0;
}
.answers-trigger .arrow {
  font-size: 14px;
  color: var(--lc-text-light);
  transition: transform .3s;
}
.answers-trigger.open .arrow { transform: rotate(180deg); }
.answers-body { display: none; padding: 0 28px 28px; }
.answers-body.open { display: block; }
.answer-item {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--lc-border);
}
.answer-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.answer-item h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--lc-teal);
  margin-bottom: 10px;
}
.answer-item p {
  font-size: 14px;
  color: var(--lc-text-muted);
  line-height: 1.72;
  margin-bottom: 8px;
}
.answer-item p:last-child { margin-bottom: 0; }

/* ── Revisit ── */
.revisit-box {
  background: linear-gradient(135deg, #0d2b2c 0%, var(--lc-teal) 100%);
  border-radius: var(--lc-radius);
  padding: 28px 32px;
  margin: 24px 0;
}
.revisit-box h3 {
  font-family: 'Nunito', sans-serif;
  color: white;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 12px;
}
.revisit-box p, .revisit-box ul {
  color: rgba(255,255,255,.88);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 10px;
}
.revisit-box ul { padding-left: 18px; }
.revisit-box .answer-textarea {
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.3);
  color: white;
}
.revisit-box .answer-textarea::placeholder { color: rgba(255,255,255,.45); }
.revisit-box .autosave-indicator { color: rgba(255,255,255,.6); }

/* ── Completion ── */
.completion-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border: 1.5px solid var(--lc-border);
  border-radius: var(--lc-radius);
  padding: 20px 24px;
  margin-top: 24px;
  cursor: pointer;
  transition: border-color .2s;
}
.completion-wrap.done {
  border-color: var(--success, #1e8449);
  background: color-mix(in srgb, var(--success, #1e8449) 4%, white);
}
.completion-checkbox {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--lc-border);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--success, #1e8449);
  flex-shrink: 0;
  transition: all .2s;
}
.completion-wrap.done .completion-checkbox {
  background: var(--success, #1e8449);
  color: white;
  border-color: var(--success, #1e8449);
}
.completion-text h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--lc-text);
  margin-bottom: 2px;
}
.completion-text p { font-size: 13px; color: var(--lc-text-light); margin: 0; }

/* ── Lesson nav ── */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.lesson-nav a {
  padding: 12px 20px;
  border-radius: 8px;
  border: 1.5px solid var(--lc-border);
  font-size: 14px;
  font-weight: 700;
  color: var(--lc-text-muted);
  text-decoration: none;
  transition: all .2s;
}
.lesson-nav a:hover { border-color: var(--lc-teal); color: var(--lc-teal); }
.lesson-nav a.next {
  background: var(--lc-teal);
  color: white;
  border-color: var(--lc-teal);
}
.lesson-nav a.next:hover { background: color-mix(in srgb, var(--lc-teal) 80%, black); }

/* ── Share lesson ── */
.share-lesson {
  margin-top: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #fff 0%, var(--lc-mint) 100%);
  border: 1.5px solid var(--lc-border);
  border-left: 4px solid var(--lc-teal);
  border-radius: var(--lc-radius);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--lc-teal) 6%, transparent);
}
.share-lesson-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.share-lesson-header h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--lc-text);
  margin: 0 0 8px;
}
.share-lesson-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--lc-text-muted);
  max-width: 560px;
}
.share-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--lc-sky);
  color: var(--lc-teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .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: #fff;
  border: 1px solid var(--lc-border);
  border-radius: 8px;
}

/* ── Mode behaviour ── */
body.digital-mode .answer-book-placeholder { display: none; }
body.book-mode .answer-textarea { display: none; }
body.book-mode .answer-book-placeholder { display: block; }

/* ── Fade-up ── */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* ── Phase overrides (bridge to lesson.css) ── */
:root {
  --accent: var(--lc-teal);
  --accent-dark: var(--lc-hero-start, #0a5c60);
  --surface-2: var(--lc-mint, #e8f8f5);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero { padding: 26px 20px; }
  .hero h1 { font-size: 24px; }
  .card { padding: 20px 18px; }
  .hero-top { flex-direction: column; }
  .hero-emoji { display: none; }
  .page { padding: 24px 14px 60px; }
  .compare-panel { grid-template-columns: 1fr; }
  .fd-steps { flex-direction: column; align-items: center; }
  .fd-arrow { transform: rotate(90deg); }
  .share-grid { grid-template-columns: 1fr; }
}
