/* Biology Module 1 — Shared Lesson Styles
   Each lesson should define its own :root color variables before importing this file */

body { background: var(--page-bg); font-family: 'DM Sans', sans-serif; color: #1a1a1a; }

/* ── Progress bar ── */
.progress-bar-wrap { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: rgba(0,0,0,0.08); z-index: 200; }
.progress-bar-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.2s; }

/* ── Section nav dots ── */
.section-nav {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 100;
}
.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); }

.page { max-width: 860px; margin: 0 auto; padding: 16px 24px 80px; }

/* ── Hero ── */
.hero {
  background: var(--hero-grad);
  border-radius: 16px; padding: 44px 44px 40px;
  margin-bottom: 20px; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; bottom: -50px; right: -50px;
  width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,0.12);
}
.hero::before {
  content: ''; position: absolute; bottom: 20px; right: 80px;
  width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,0.08);
}
.crumb { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.crumb span { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.crumb .arr { color: rgba(255,255,255,0.25); }
.crumb .cur { color: rgba(255,255,255,0.85); }
.hero h1 {
  font-family: 'Nunito', sans-serif; font-size: 36px; font-weight: 800;
  color: #fff; line-height: 1.15; max-width: 520px; margin-bottom: 11px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.hero-desc { color: rgba(255,255,255,0.78); font-size: 15px; line-height: 1.65; max-width: 480px; }
.hero-pills { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.pill {
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9); font-size: 12px; font-weight: 600;
  padding: 5px 13px; border-radius: 100px;
}

/* ── Think First ── */
.think-first {
  background: var(--tf-bg); border-radius: 12px;
  border-top: 4px solid var(--tf-top);
  padding: 24px 28px; margin-bottom: 18px;
}
.think-first h3 {
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--tf-head); margin-bottom: 9px;
}
.think-first p { font-size: 15px; color: #444; line-height: 1.65; margin-bottom: 13px; }
.think-first textarea {
  width: 100%; border: 1.5px solid var(--tf-border); border-radius: 8px;
  padding: 10px 13px; font-family: 'DM Sans', sans-serif; font-size: 14px;
  color: #333; resize: vertical; min-height: 80px; background: #fff;
}
.tf-note { font-size: 12px; color: var(--tf-head); margin-top: 8px; opacity: 0.75; }

/* ── Intentions grid ── */
.intentions { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; margin-bottom: 18px; }
.ic { border-radius: 12px; padding: 18px 20px; }
.ic h4 {
  font-family: 'Nunito', sans-serif; font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; 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; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 10px;
  margin: 28px 0 14px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--tf-border); }

/* ── Content cards ── */
.card {
  background: #fff; border-radius: 12px; padding: 26px 28px;
  margin-bottom: 14px; box-shadow: 0 1px 5px rgba(0,0,0,0.06);
}
.card h2 {
  font-family: 'Nunito', sans-serif; font-size: 19px; font-weight: 800;
  color: var(--h2-color); margin-bottom: 12px;
}
.card p { font-size: 15px; color: #555; line-height: 1.7; margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

.callout {
  background: var(--callout-bg); border-left: 3px solid var(--callout-border);
  border-radius: 0 8px 8px 0; padding: 13px 16px; margin: 14px 0;
  font-size: 14px; color: var(--callout-text); line-height: 1.65;
}

/* ── Anchor callout (amber) ── */
.anchor-callout {
  background: var(--anchor-bg); border-left: 3px solid var(--anchor-border);
  border-radius: 0 8px 8px 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; }

/* ── Misconceptions box ── */
.misconceptions {
  background: var(--misc-bg); border: 1px solid #fca5a5;
  border-radius: 12px; padding: 20px 24px; margin: 14px 0;
}
.misconceptions h4 {
  font-family: 'Nunito', 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: #555; line-height: 1.55; margin-top: 3px; }

/* ── Timeline (Discovery story spine) ── */
.timeline { margin: 16px 0; }
.tl-item { display: flex; gap: 16px; margin-bottom: 16px; align-items: flex-start; }
.tl-year {
  background: var(--accent); color: #fff; 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: #555; line-height: 1.6; margin: 0; }
.tl-content strong { color: #1a1a1a; font-size: 14px; }

/* ── Copy into your books ── */
.copy-wrap { margin: 14px 0; }
.copy-toggle {
  background: none; border: 1.5px solid var(--tf-border); border-radius: 8px;
  padding: 10px 18px; cursor: pointer; font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700; color: var(--tf-head);
  display: flex; align-items: center; gap: 8px; width: 100%;
  transition: background 0.15s;
}
.copy-toggle:hover { background: var(--tf-bg); }
.copy-toggle .arr { margin-left: auto; transition: transform 0.2s; }
.copy-toggle.open .arr { transform: rotate(90deg); }
.copy-content {
  display: none; background: var(--tf-bg); border-radius: 0 0 10px 10px;
  padding: 18px 20px; border: 1.5px solid var(--tf-border); border-top: none;
}
.copy-content.open { display: block; }
.copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.copy-item h5 {
  font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 800;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--tf-head);
  margin-bottom: 8px;
}
.copy-item p, .copy-item li { font-size: 13px; color: #444; line-height: 1.65; }
.copy-item ul { margin-left: 16px; }

/* ── Activities ── */
.activity {
  background: #fff; border-radius: 12px; padding: 24px 28px;
  margin-bottom: 14px; box-shadow: 0 1px 5px rgba(0,0,0,0.06);
  border-top: 3px solid var(--accent);
}
.activity-badge {
  display: inline-block; background: var(--tf-bg); color: var(--tf-head);
  font-family: 'Nunito', sans-serif; font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px; margin-bottom: 10px;
}
.activity h3 { font-family: 'Nunito', sans-serif; font-size: 17px; font-weight: 800; color: #1a1a1a; margin-bottom: 6px; }
.activity .meta { font-size: 12px; color: #888; margin-bottom: 12px; }
.activity p, .activity li { font-size: 14px; color: #555; line-height: 1.65; }
.activity ol, .activity ul { margin-left: 20px; margin-top: 10px; }
.activity li { margin-bottom: 6px; }
.answer-wrap { margin-top: 14px; }
.answer-wrap p { font-size: 12px; color: #999; margin-bottom: 6px; }
.answer-textarea {
  width: 100%; border: 1.5px solid #e0e0e0; border-radius: 8px;
  padding: 10px 13px; font-family: 'DM Sans', sans-serif; font-size: 14px;
  color: #333; resize: vertical; min-height: 100px; background: #fafafa;
}

/* ── MC questions ── */
.mc-question { margin-bottom: 20px; }
.mc-question p { font-size: 15px; color: #333; line-height: 1.6; margin-bottom: 10px; font-weight: 500; }
.mc-options { display: flex; flex-direction: column; gap: 7px; }
.mc-opt {
  border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 10px 14px;
  cursor: pointer; font-size: 14px; color: #444; transition: all 0.15s;
  display: flex; align-items: flex-start; gap: 10px;
}
.mc-opt:hover { border-color: var(--accent); background: var(--tf-bg); }
.mc-opt.correct { border-color: #16a34a; background: #dcfce7; color: #14532d; }
.mc-opt.incorrect { border-color: #ef4444; background: #fee2e2; color: #7f1d1d; }
.mc-opt .opt-letter { font-family: 'Nunito', sans-serif; font-weight: 800; color: var(--accent); flex-shrink: 0; }
.mc-feedback { font-size: 13px; margin-top: 7px; padding: 8px 12px; border-radius: 6px; display: none; }
.mc-feedback.show { display: block; }
.mc-feedback.correct { background: #dcfce7; color: #14532d; }
.mc-feedback.incorrect { background: #fee2e2; color: #7f1d1d; }

/* ── Short answer ── */
.sa-question { margin-bottom: 20px; }
.sa-question p { font-size: 15px; color: #333; line-height: 1.6; margin-bottom: 8px; font-weight: 500; }
.sa-marks { font-size: 12px; color: #888; margin-bottom: 8px; }

/* ── Answers accordion ── */
.answer-toggle {
  background: var(--tf-bg); border: none; border-radius: 10px;
  padding: 12px 18px; cursor: pointer; font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 800; color: var(--tf-head);
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin-bottom: 4px; transition: background 0.15s;
}
.answer-toggle:hover { background: #b2f5ea; }
.answer-toggle .arr { margin-left: auto; transition: transform 0.2s; }
.answer-toggle.open .arr { transform: rotate(90deg); }
.answer-body {
  display: none; background: #fff; border: 1.5px solid var(--tf-border);
  border-radius: 0 0 10px 10px; padding: 18px 20px; font-size: 14px;
  color: #444; line-height: 1.7;
}
.answer-body.open { display: block; }
.answer-body ul { margin-left: 18px; margin-top: 6px; }
.answer-body li { margin-bottom: 5px; }

/* ── Revisit ── */
.revisit {
  background: var(--tf-bg); border-radius: 12px; border-top: 4px solid var(--accent);
  padding: 24px 28px; margin: 20px 0;
}
.revisit h3 { font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tf-head); margin-bottom: 10px; }
.revisit p { font-size: 15px; color: #444; line-height: 1.65; margin-bottom: 12px; }

/* ── Completion ── */
.completion {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-radius: 12px; padding: 20px 24px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.06); margin: 20px 0;
}
.completion input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
.completion label { font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 700; color: #333; cursor: pointer; }

/* ── Lesson nav ── */
.lesson-nav { display: flex; justify-content: space-between; margin-top: 8px; }
.lesson-nav a {
  background: #fff; border: 1.5px solid var(--tf-border); border-radius: 10px;
  padding: 11px 20px; font-family: 'Nunito', sans-serif; font-size: 13px;
  font-weight: 700; color: var(--tf-head); text-decoration: none;
  display: flex; align-items: center; gap: 8px; transition: background 0.15s;
}
.lesson-nav a:hover { background: var(--tf-bg); }

/* ── Table ── */
.table-wrap { overflow-x: auto; margin: 14px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--tf-bg); color: var(--tf-head); font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; padding: 10px 14px; text-align: left; }
td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; color: #444; vertical-align: top; }
tr:last-child td { border-bottom: none; }

/* Image placeholders */
.img-placeholder { border: 2px dashed var(--tf-border); border-radius: 10px; background: var(--tf-bg); padding: 28px 20px; margin: 14px 0; text-align: center; color: var(--tf-head); }
.img-placeholder .ph-icon { font-size: 28px; margin-bottom: 8px; }
.img-placeholder .ph-label { font-family: "Nunito", sans-serif; font-size: 13px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 4px; }
.img-placeholder .ph-note { font-size: 12px; opacity: 0.65; }

@media (max-width: 640px) {
  .hero { padding: 28px 22px; }
  .hero h1 { font-size: 26px; }
  .intentions { grid-template-columns: 1fr; }
  .copy-grid { grid-template-columns: 1fr; }
  .section-nav { display: none; }
}
