:root {
  --blue: #1e3a5f;
  --blue-dark: #142a47;
  --gold: #d4a942;
  --gold-dark: #b8902f;
  --cream: #faf6ee;
  --card: #ffffff;
  --ink: #2b2b2b;
  --muted: #7a7466;
  --green: #3f9d58;
  --green-bg: #e6f5ea;
  --red: #c94f4f;
  --red-bg: #fbeaea;
  --locked: #d8d2c4;
  --radius: 16px;
  --shadow: 0 2px 8px rgba(30, 58, 95, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Nunito", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
}

#topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow);
}
.brand { font-weight: 900; font-size: 1.05rem; letter-spacing: 0.02em; }
.stats { display: flex; gap: 12px; font-size: 0.9rem; }
.stat b { font-weight: 800; }

.screen {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}
.hidden { display: none !important; }

.site-tagline {
  text-align: center;
  color: var(--blue);
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.tagline {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* ---------- Course tabs & CFM banner ---------- */
#course-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.course-tab {
  border: 2px solid #e5ddca;
  background: var(--card);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
}
.course-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.cfm-banner {
  display: block;
  width: 100%;
  border: 2px solid var(--gold);
  background: #fdf6e3;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.cfm-banner b { color: var(--blue); }
.cfm-banner .cfm-go {
  display: block;
  margin-top: 4px;
  font-weight: 800;
  color: var(--gold-dark);
}

.unit-header { position: relative; }
.unit-header.this-week { outline: 3px solid var(--gold); outline-offset: 2px; }
.week-badge {
  display: inline-block;
  margin-top: 8px;
  background: var(--gold);
  color: var(--blue-dark);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 900;
}
.lock-badge {
  display: inline-block;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: #8b8574;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 900;
}

.ghost-btn {
  width: 100%;
  padding: 13px;
  margin-bottom: 12px;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  background: none;
  color: var(--blue);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
.ghost-btn:hover { background: #eef3fa; }

/* ---------- Path ---------- */
.unit {
  margin-bottom: 28px;
  scroll-margin-top: 70px; /* keep unit titles clear of the sticky topbar on banner jumps */
}
.unit-header {
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
}
.unit-header h2 { font-size: 1.05rem; font-weight: 800; }
.unit-header p { font-size: 0.85rem; opacity: 0.85; margin-top: 2px; }
.unit.locked .unit-header { background: var(--locked); color: #8b8574; box-shadow: none; }

.lessons {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 18px 0 0;
}
.lesson-node {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  box-shadow: 0 4px 0 var(--gold-dark);
  transition: transform 0.08s;
  position: relative;
}
.lesson-node:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-dark); }
.lesson-node.done { background: var(--green); box-shadow: 0 4px 0 #2f7a43; }
.lesson-node.locked {
  background: var(--locked);
  box-shadow: 0 4px 0 #c2bbaa;
  cursor: default;
}
.lesson-node.current {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.lesson-node .label {
  position: absolute;
  bottom: -20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Lesson ---------- */
.lesson-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.quit {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
}
.progress-track {
  flex: 1;
  height: 14px;
  background: #e8e1d1;
  border-radius: 7px;
  overflow: hidden;
}
#progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  border-radius: 7px;
  transition: width 0.3s;
}
.hearts { font-size: 1rem; letter-spacing: 2px; min-width: 66px; text-align: right; }

.q-prompt {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 22px;
  min-height: 60px;
}
.q-prompt .blank {
  display: inline-block;
  min-width: 90px;
  border-bottom: 2px solid var(--blue);
  text-align: center;
  font-style: italic;
  color: var(--blue);
}
.q-prompt .quote {
  font-family: "Lora", Georgia, serif;
  font-style: italic;
}

.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  background: var(--card);
  border: 2px solid #e5ddca;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s;
}
.choice:hover { border-color: var(--gold); }
.choice.selected { border-color: var(--blue); background: #eef3fa; }
.choice.correct { border-color: var(--green); background: var(--green-bg); }
.choice.wrong { border-color: var(--red); background: var(--red-bg); }
.choice:disabled { cursor: default; }

.feedback {
  margin-top: 18px;
  border-radius: var(--radius);
  padding: 14px 16px;
}
.feedback.good { background: var(--green-bg); border: 2px solid var(--green); }
.feedback.bad { background: var(--red-bg); border: 2px solid var(--red); }
.feedback-title { font-weight: 900; margin-bottom: 4px; }
.feedback.good .feedback-title { color: var(--green); }
.feedback.bad .feedback-title { color: var(--red); }
.feedback-text { font-size: 0.95rem; line-height: 1.45; }
.feedback-ref {
  margin-top: 6px;
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
}

.lesson-bottom { margin-top: 24px; }
.big-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--radius);
  background: var(--gold);
  box-shadow: 0 4px 0 var(--gold-dark);
  color: var(--blue-dark);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.08s;
}
.big-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-dark); }
.big-btn:disabled {
  background: #e8e1d1;
  box-shadow: 0 4px 0 #d5cdb9;
  color: #a9a290;
  cursor: default;
}

/* ---------- Done ---------- */
.done-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 24px;
  text-align: center;
  margin-top: 30px;
}
.done-emoji { font-size: 3rem; }
.done-card h2 { color: var(--blue); margin: 10px 0 22px; }
.done-stats {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 22px;
}
.done-stat {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 12px 16px;
  min-width: 90px;
}
.done-stat span { display: block; font-size: 1.3rem; font-weight: 900; color: var(--blue); }
.done-stat label { font-size: 0.75rem; color: var(--muted); font-weight: 700; }
.done-verse {
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
  padding: 0 8px;
}

@media (max-width: 420px) {
  .stats { gap: 8px; font-size: 0.8rem; }
  .lessons { gap: 18px; }
}
