/* ============================================================
   BibleSwift — design system
   Palette: deep navy #0A1F44, bright blue #2563EB
   Display type: Poppins (geometric sans — headings, buttons, questions,
     stats, wordmark; matches the Figma design)
   Accent serif: Playfair Display (landing hero accent line; Figma)
   Body/UI: Inter (Figma)
   Fonts load from Google Fonts (display=swap) with system fallbacks,
   so the site still renders fine offline.
   ============================================================ */

:root {
  --navy: #0A1F44;
  --navy-2: #10295c;
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-soft: #EFF4FF;
  --ink: #1E293B;
  --muted: #64748B;
  --line: #E2E8F0;
  --card: #FFFFFF;
  --page: #F6F8FC;
  --green: #16A34A;
  --green-soft: #EAF9F0;
  --amber: #D97706;
  --amber-soft: #FFF7E8;
  --red: #DC2626;
  --red-soft: #FDECEC;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10, 31, 68, 0.10);
  --shadow-sm: 0 4px 14px rgba(10, 31, 68, 0.08);
  --display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Palatino Linotype', 'Book Antiqua', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, .serif { font-family: var(--display); font-weight: 700; line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0 0 0.5em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 0.5em; }
h3 { font-size: 1.2rem; margin: 0 0 0.4em; }
p { margin: 0 0 1em; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.page-wrap { padding: 48px 0 72px; min-height: 60vh; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1120px;
  margin: 0 auto;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark .swift { color: #7FB0FF; }
.main-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  color: #DCE6FA;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}
.main-nav a:hover { background: rgba(255,255,255,0.10); color: #fff; text-decoration: none; }
.main-nav a.active { background: rgba(255,255,255,0.16); color: #fff; }
.main-nav a.nav-plus {
  background: linear-gradient(135deg, #F7C948, #D97706);
  color: #3A2400;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 20px;
  margin-left: 10px;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.40);
  letter-spacing: 0.3px;
}
.main-nav a.nav-plus:hover {
  background: linear-gradient(135deg, #FFD97A, #E8930C);
  color: #3A2400;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.55);
}
.main-nav a.nav-plus.active { outline: 2px solid rgba(255,255,255,0.7); outline-offset: 2px; }
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.18);
  color: #DCE6FA;
  font-size: 0.92rem;
}
.nav-user .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.link-btn {
  background: none; border: none; cursor: pointer;
  color: #DCE6FA; font-size: 0.92rem; padding: 6px 4px;
  font-family: var(--sans);
}
.link-btn:hover { color: #fff; text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #B9C6E4;
  padding: 40px 0 28px;
  margin-top: 40px;
}
.site-footer .cols {
  display: flex; flex-wrap: wrap; gap: 32px;
  justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
}
.site-footer .wordmark { font-size: 1.35rem; }
.site-footer p.tag { font-size: 0.92rem; max-width: 320px; }
.site-footer nav a { display: block; color: #B9C6E4; font-size: 0.92rem; margin-bottom: 8px; }
.site-footer nav a:hover { color: #fff; }
.site-footer .fine {
  max-width: 1120px; margin: 28px auto 0; padding: 18px 20px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem; color: #8FA0C4;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #EAF0FF; color: var(--navy); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-soft); color: var(--blue-dark); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--navy); background: #EEF2F7; }
.btn-block { display: block; width: 100%; }
.btn-lg { font-size: 1.12rem; padding: 16px 34px; }
.btn-sm { font-size: 0.88rem; padding: 9px 16px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Cards & layout helpers ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.section { margin: 56px 0; }
.eyebrow {
  font-family: var(--display);
  text-transform: uppercase; letter-spacing: 2px;
  font-size: 0.78rem; font-weight: 700; color: var(--blue);
  margin-bottom: 10px;
}
.lead { font-size: 1.15rem; color: #3B4A63; max-width: 640px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ---------- Hero (landing) ---------- */
.hero {
  background: radial-gradient(1100px 480px at 70% -10%, #1c3f8f 0%, var(--navy) 55%, #071733 100%);
  color: #fff;
  padding: 84px 0 72px;
  overflow: hidden;
}
.hero h1 { color: #fff; max-width: 640px; }
.hero h1 .accent { color: #8FB4FF; }
/* Figma landing hero: second line is the accent serif (Playfair Display). */
.hero h1 .hero-serif-line { font-family: var(--serif); font-weight: 600; }
.hero p.sub { color: #C9D6F2; font-size: 1.2rem; max-width: 600px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

/* ---------- Hero rotating cards ---------- */
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; position: relative; }
.hero-visual { position: relative; min-height: 360px; }
.rotator { position: relative; height: 360px; max-width: 300px; margin: 0 auto; }
.rot-card {
  position: absolute; inset: 0;
  background: #fff; color: var(--navy);
  border-radius: 18px; padding: 22px;
  box-shadow: 0 24px 60px rgba(3, 12, 38, 0.45);
  opacity: 0; transform: translateY(16px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.rot-card.active { opacity: 1; transform: none; pointer-events: auto; }
.rot-card h3 { margin: 6px 0 10px; font-size: 1.15rem; }
.rot-card .eyebrow { color: var(--blue); }
.rot-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; }
.rot-steps .done { color: var(--blue); }
.rot-steps .now { color: var(--blue); font-size: 0.9rem; }
.rot-steps .line { width: 44px; height: 2px; background: #DCE6FA; border-radius: 2px; }
.rot-video {
  width: 100%; height: 105px; border-radius: 12px; margin-bottom: 14px;
  background: linear-gradient(135deg, #1E3A8A 0%, #7C3AED 60%, #DB2777 100%);
  position: relative; display: flex; align-items: center; justify-content: center;
}
.rot-video .play {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,0.92);
  color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.rot-video .vbar { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.35); }
.rot-video .vbar i { display: block; height: 100%; border-radius: 3px; background: #fff; }
.rot-card .btn { align-self: center; }
.rot-ring { position: relative; width: 104px; height: 104px; margin: 4px 0 8px; }
.rot-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rr-track { fill: none; stroke: #E6ECF9; stroke-width: 12; }
.rr-val { fill: none; stroke: var(--green); stroke-width: 12; stroke-linecap: round; }
.rr-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; }
.rot-pill { background: #E7F6EC; color: #15803D; font-weight: 700; padding: 6px 18px; border-radius: 999px; }
.rot-opts { display: grid; gap: 8px; width: 100%; margin-top: 4px; }
.rot-opts span { border: 2px solid #E2E8F5; border-radius: 10px; padding: 8px 12px; font-size: 0.95rem; text-align: left; color: #33415C; }
.rot-opts span.sel { border-color: var(--blue); background: #EFF4FF; font-weight: 700; color: var(--navy); }
.rot-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
/* F-20: 44px touch targets — the visible dot stays 9px via ::before. */
.rot-dots span { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rot-dots span::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.35); transition: background 0.3s; }
.rot-dots span.on::before { background: #fff; }
.wave-line, .curly-arrow { position: absolute; pointer-events: none; overflow: visible; }
.wave-line { width: 110px; height: 36px; }
.curly-arrow { width: 120px; height: 60px; }
.social-proof {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  color: #C9D6F2; font-size: 0.95rem;
}
.stars { color: #FFC94D; letter-spacing: 3px; font-size: 1.05rem; }
.avatars { display: flex; }
.avatars span {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--navy);
  margin-left: -10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: #fff;
}
.avatars span:first-child { margin-left: 0; }

.feature-card { text-align: left; }
.feature-card .icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 1.5rem; font-weight: 700;
  margin-bottom: 16px;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--muted); margin: 0; font-size: 0.96rem; }

.steps { counter-reset: step; }
.step {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.step .num {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 1.25rem; font-weight: 700;
}
.step p { margin: 4px 0 0; color: var(--muted); }

.quote-card { font-style: italic; color: #3B4A63; }
.quote-card .who { font-style: normal; font-weight: 600; color: var(--navy); margin-top: 12px; font-size: 0.92rem; }

.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, #14306e 100%);
  border-radius: 20px;
  color: #fff;
  padding: 52px 40px;
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #C9D6F2; max-width: 560px; margin: 0 auto 26px; }

/* ---------- Forms ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; color: var(--navy); }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--sans);
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-error {
  background: var(--red-soft); color: #991B1B;
  border: 1px solid #F3B4B4; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 18px; font-size: 0.94rem;
}
.form-note {
  background: var(--blue-soft); color: #1E3A8A;
  border: 1px solid #C9DBFF; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 18px; font-size: 0.94rem;
}
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.88rem; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff;
  font-size: 1rem; font-weight: 600; color: var(--ink); cursor: pointer;
  font-family: var(--sans);
}
.google-btn:hover { background: #F8FAFC; border-color: #CBD5E1; }

/* ---------- Quiz ---------- */
.quiz-shell { max-width: 720px; margin: 0 auto; }
.quiz-progress { margin-bottom: 18px; }
.quiz-progress .label {
  display: flex; justify-content: space-between;
  font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; font-weight: 500;
}
.progress-track { height: 10px; background: #E4EAF5; border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--blue), #60A5FA);
  border-radius: 999px; transition: width 0.35s ease;
}
.quiz-card { padding: 34px; }
.quiz-card .q-meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px; font-size: 0.82rem;
}
.pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--blue-soft); color: #1E3A8A; font-weight: 600; font-size: 0.8rem;
}
.pill.neutral { background: #EEF2F7; color: var(--muted); }
.quiz-card .q-text { font-family: var(--display); font-size: 1.35rem; font-weight: 600; color: var(--navy); margin-bottom: 22px; line-height: 1.45; }
/* Markdown-lite lists inside question text and options. */
.q-text ul, .q-text ol { margin: 12px 0 4px; padding-left: 26px; text-align: left; }
.q-text li { margin-bottom: 6px; font-weight: 400; font-size: 1.1rem; }
.q-text ul { list-style: disc; }
.q-text ol { list-style: decimal; }
.option span ul, .option span ol, .dnd-text ul, .dnd-text ol { margin: 8px 0 2px; padding-left: 22px; }
.option span li, .dnd-text li { margin-bottom: 4px; }
.option span ul, .dnd-text ul { list-style: disc; }
.option span ol, .dnd-text ol { list-style: decimal; }
.options { display: grid; gap: 12px; }
.option {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 16px; cursor: pointer; background: #fff;
  transition: border-color 0.12s ease, background 0.12s ease;
  font-size: 1rem;
}
.option:hover { border-color: #9DB9F5; background: #F8FBFF; }
.option input { margin-top: 4px; accent-color: var(--blue); width: 18px; height: 18px; flex: 0 0 auto; }
.option.selected { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.quiz-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }

.feedback-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700; margin-bottom: 16px;
}
.feedback-icon.good { background: var(--green-soft); color: var(--green); }
.feedback-icon.miss { background: var(--amber-soft); color: var(--amber); }
.feedback-icon.neutral { background: var(--blue-soft); color: var(--blue); }
.feedback-explain {
  background: #F8FAFC; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; margin: 18px 0; font-size: 0.97rem;
}
.feedback-explain .ref { font-weight: 700; color: var(--navy); }

/* ---------- Results ---------- */
.results-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.score-ring-wrap { display: flex; justify-content: center; margin: 8px 0 18px; }
.score-ring { transform: rotate(-90deg); }
.score-ring .track { stroke: #E4EAF5; }
.score-ring .value { stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.score-center { text-anchor: middle; }
.level-badge {
  display: inline-block; background: var(--navy); color: #fff;
  font-family: var(--display); font-size: 1.15rem;
  padding: 10px 26px; border-radius: 999px; margin: 6px 0 12px;
}
.level-num {
  font-family: var(--display); font-size: 2.4rem; color: var(--navy);
  margin: 2px 0 2px; line-height: 1.1;
}
.new-best {
  display: inline-block; margin: 10px 0 4px; background: var(--amber-soft);
  border: 1px solid #F5D9A8; color: #92400E; font-weight: 700;
  padding: 8px 20px; border-radius: 999px;
}
.level-card {
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow); margin: 24px 0;
}
.level-card .eyebrow { color: #93A4C4; }
.level-card h3 { color: #fff; margin: 4px 0 2px; font-size: 1.55rem; }
.level-card p { margin: 0; opacity: 0.88; }
.level-summary { margin: 10px 0 12px !important; font-size: 1.03rem; line-height: 1.6; opacity: 0.95 !important; }
.level-summary strong { color: #fff; }
.progress-chart { width: 100%; height: auto; display: block; margin-top: 4px; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.chart-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.token-award {
  display: inline-flex; align-items: center; gap: 8px; margin: 14px auto 4px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A); border: 1px solid #F5D9A8;
  color: #92400E; font-weight: 700; padding: 10px 22px; border-radius: 999px;
  box-shadow: var(--shadow-sm); animation: token-pop 0.5s ease;
}
@keyframes token-pop { 0% { transform: scale(0.7); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.token-coin { font-size: 1.2rem; }
.token-balance {
  display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.14); font-size: 1.02rem;
}
.token-balance strong { color: #fff; font-size: 1.15rem; }
.token-hint { opacity: 0.65; font-size: 0.82rem; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.share-row .btn-sm { padding: 8px 16px; font-size: 0.88rem; }
.level-card .share-row .btn-outline { border-color: rgba(255,255,255,0.35); color: #fff; }
.level-card .share-row .btn-outline:hover { background: rgba(255,255,255,0.12); }
.level-card .share-row .btn-primary { box-shadow: none; }
/* Growth callouts */
.growth-callout {
  display: inline-flex; align-items: center; gap: 8px; margin: 12px auto 4px;
  font-weight: 700; padding: 9px 20px; border-radius: 999px; font-size: 0.95rem;
}
.growth-callout .g-arrow { font-size: 0.85rem; }
.growth-callout.up { background: var(--green-soft); color: #15803D; border: 1px solid #BBF7D0; }
.growth-callout.down { background: #FEF3C7; color: #92400E; border: 1px solid #F5D9A8; }
.growth-callout.flat { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.growth-callout.baseline { background: var(--blue-soft); color: var(--blue); border: 1px solid #BFDBFE; }
/* Expert badges */
.badge-shelf { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.expert-badge {
  display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border: 1px solid #F5D9A8; border-radius: var(--radius); padding: 12px 18px 12px 14px;
  box-shadow: var(--shadow-sm);
}
.eb-icon { font-size: 1.7rem; }
.eb-name { font-weight: 700; color: var(--navy); }
.eb-sub { font-size: 0.82rem; color: var(--muted); }
/* Milestones */
.milestone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 4px; }
.milestone {
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; background: #fff;
}
.milestone.earned { border-color: #BBF7D0; background: var(--green-soft); }
.milestone.locked { opacity: 0.55; }
.m-icon { font-size: 1.6rem; }
.m-name { font-weight: 700; color: var(--navy); font-size: 0.95rem; }
.m-desc { font-size: 0.8rem; color: var(--muted); }
.m-check {
  margin-left: auto; width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto;
  background: var(--green); color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 0.85rem;
}
/* My Swift Path */
.path-steps { display: grid; gap: 12px; margin-top: 4px; }
.path-step {
  display: flex; align-items: center; gap: 16px; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; background: #fff;
}
.ps-num {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  background: var(--navy); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ps-body { flex: 1; min-width: 0; }
.ps-topic { font-weight: 700; color: var(--navy); }
.ps-sub { font-size: 0.85rem; color: var(--muted); }
.ps-soon {
  font-size: 0.82rem; color: var(--muted); background: #F1F5F9;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}
/* Weekly challenge */
.challenge-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE); border: 1px solid #BFDBFE;
}
.challenge-feedback {
  border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; font-size: 0.95rem;
}
.challenge-feedback.good { background: var(--green-soft); border: 1px solid #BBF7D0; color: #14532D; }
.challenge-feedback.bad { background: var(--red-soft); border: 1px solid #FECACA; color: #7F1D1D; }
.challenge-feedback .ref { color: var(--muted); }
@media (max-width: 640px) {
  .path-step { flex-wrap: wrap; }
  .challenge-banner .btn { width: 100%; text-align: center; }
}
.level-dots { display: flex; gap: 8px; margin: 14px 0 12px; }
.level-dots i { width: 34px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.22); }
.level-dots i.on { background: #60A5FA; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat .num { font-family: var(--display); font-size: 1.9rem; color: var(--navy); }
.stat .lbl { font-size: 0.85rem; color: var(--muted); }

.topic-gauges { display: grid; gap: 14px; }
.topic-gauge {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 16px 18px; cursor: pointer; text-align: left; width: 100%;
  font-family: var(--sans); transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.topic-gauge:hover { border-color: #9DB9F5; box-shadow: var(--shadow-sm); }
.topic-gauge.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.topic-gauge .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.topic-gauge .name { font-weight: 700; color: var(--navy); }
.topic-gauge .pct { font-weight: 700; color: var(--blue); }
.gauge-track { height: 10px; background: #EAF0FA; border-radius: 999px; overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.gauge-fill.strong { background: linear-gradient(90deg, #15803D, #4ADE80); }
.gauge-fill.growing { background: linear-gradient(90deg, #B45309, #FBBF24); }
.gauge-fill.gap { background: linear-gradient(90deg, #B91C1C, #F87171); }
.topic-detail {
  background: var(--blue-soft); border: 1px solid #C9DBFF; border-radius: var(--radius);
  padding: 22px 24px; margin-top: 18px;
}
.topic-detail h3 { margin-bottom: 6px; }
.topic-detail .verdict { font-weight: 600; margin-bottom: 8px; }
.topic-detail .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.recommend {
  background: linear-gradient(120deg, var(--navy), #1a3a80);
  color: #fff; border-radius: var(--radius); padding: 30px; margin: 34px 0;
  box-shadow: var(--shadow);
}
.recommend h3 { color: #fff; }
.recommend p { color: #C9D6F2; }
.recommend .btn-outline { color: #fff; border-color: #8FB4FF; }
.recommend .btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }

.gapmap { display: grid; gap: 10px; margin-top: 18px; }
.gapmap-row { display: flex; align-items: center; gap: 12px; }
.gapmap-row .glabel { flex: 0 0 170px; font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.gapmap-row .cells { display: flex; gap: 6px; flex-wrap: wrap; }
.gcell {
  width: 26px; height: 26px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: #fff;
}
.gcell.ok { background: var(--green); }
.gcell.no { background: var(--red); }
.gapmap-legend { display: flex; gap: 18px; font-size: 0.85rem; color: var(--muted); margin-top: 12px; }
.gapmap-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }

.review-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 8px 0 18px; }
.review-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.review-item .q { font-weight: 700; color: var(--navy); margin-bottom: 10px; font-size: 1.02rem; }
.review-item .ans { font-size: 0.94rem; margin-bottom: 6px; }
.badge {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; margin-right: 8px;
}
.badge.ok { background: var(--green-soft); color: #15803D; }
.badge.no { background: var(--red-soft); color: #B91C1C; }
.review-item .why { background: #F8FAFC; border-left: 3px solid var(--blue); padding: 10px 14px; margin-top: 12px; font-size: 0.93rem; border-radius: 0 8px 8px 0; }
.review-item .why .ref { font-weight: 700; color: var(--navy); }

/* ---------- Dashboard ---------- */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.attempt-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.attempt-table th, .attempt-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.attempt-table th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1px; }
.attempt-table tr:hover td { background: #F8FAFC; }
.topic-progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.topic-progress-row .tlabel { flex: 0 0 180px; font-size: 0.92rem; font-weight: 600; color: var(--navy); }
.topic-progress-row .gauge-track { flex: 1; }
.topic-progress-row .tpct { flex: 0 0 110px; text-align: right; font-size: 0.88rem; color: var(--muted); }

/* ---------- Lessons ---------- */
.lesson-group { margin-bottom: 36px; }
.lesson-group > h3 { margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.lesson-card { display: flex; flex-direction: column; gap: 10px; }
.lesson-card .topic-tag { align-self: flex-start; }
.status {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
}
.status.ready { background: var(--green-soft); color: #15803D; }
.status.prep { background: var(--amber-soft); color: #B45309; }
.media-frame {
  background: var(--navy); border-radius: var(--radius);
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  color: #C9D6F2; text-align: center; padding: 32px; overflow: hidden;
  position: relative;
}
.media-frame video, .media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Scripture memory flashcards */
.mem-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 220px; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 32px 24px; cursor: pointer; user-select: none;
  margin-top: 12px;
}
.mem-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mem-ref { font-family: Georgia, serif; font-size: 1.6rem; color: var(--navy); }
.mem-text { font-family: Georgia, serif; font-size: 1.12rem; line-height: 1.75; color: var(--ink); margin: 0; }
.mem-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.mem-nav .btn[disabled] { opacity: 0.4; cursor: default; }
.media-placeholder .ph-icon {
  width: 70px; height: 70px; border-radius: 50%;
  border: 2px dashed #5B7BC0; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 1.8rem; color: #8FB4FF;
}
.media-placeholder p { max-width: 420px; margin: 0 auto; font-size: 0.97rem; }
.empty-state {
  text-align: center; padding: 70px 24px;
  background: var(--card); border: 1.5px dashed #C4D2EC; border-radius: var(--radius);
}
.empty-state .big { font-family: var(--display); font-size: 3rem; color: #B9C9EE; margin-bottom: 8px; }
.check-quiz { margin-top: 34px; }
.check-quiz .options { margin-top: 6px; }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-tab {
  padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; font-weight: 600; font-size: 0.94rem; color: var(--muted);
  font-family: var(--sans);
}
.admin-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.admin-filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-filters .field { margin: 0; flex: 1 1 160px; }
.q-row td .qtext { max-width: 480px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.85rem; }

/* ---------- Loading / errors ---------- */
.loading { text-align: center; padding: 70px 20px; color: var(--muted); }
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid #D8E4FA; border-top-color: var(--blue);
  margin: 0 auto 18px; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.page-error {
  max-width: 560px; margin: 60px auto; text-align: center;
}
.noscript-note { max-width: 560px; margin: 80px auto; padding: 32px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .site-header .bar { flex-wrap: wrap; }
  .nav-user { border-left: none; padding-left: 0; margin-left: 0; }
  .quiz-card { padding: 24px 20px; }
  .gapmap-row .glabel { flex-basis: 110px; font-size: 0.8rem; }
  .topic-progress-row .tlabel { flex-basis: 110px; }
  .stat-row { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .page-wrap { padding: 32px 0 56px; }
  .hero { padding: 56px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { min-height: 420px; }
  .wave-line, .curly-arrow { display: none; }
  .cta-band { padding: 36px 24px; }
  .attempt-table th:nth-child(4), .attempt-table td:nth-child(4) { display: none; }
}

.results-head .share-row { justify-content: center; }

.level-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 6px; }
.level-top-text { text-align: left; }
.level-top-ring .score-ring-wrap { margin: 0; }
.level-top-ring .score-ring { width: 132px; height: 132px; }
.level-top-ring .score-center { fill: #FFFFFF; }
@media (max-width: 560px) {
  .level-top { flex-direction: column; align-items: center; }
  .level-top-text { text-align: center; }
  .level-top-text .level-dots { justify-content: center; }
}

/* ---------- Fill in the blank ---------- */
.fib-blank {
  display: inline-block; width: 170px; max-width: 55%; margin: 0 6px; padding: 8px 12px;
  font-size: 1rem; font-family: inherit; color: var(--navy);
  border: 2px solid #C7D6F5; border-radius: 10px; background: #fff; vertical-align: baseline;
}
.fib-input {
  width: 100%; max-width: 440px; margin: 2px 0 0; padding: 12px 14px;
  font-size: 1.05rem; font-family: inherit; color: var(--navy);
  border: 2px solid #C7D6F5; border-radius: 12px; background: #fff;
}
.fib-blank:focus, .fib-input:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
/* ---------- Drag and drop (ordering) ---------- */
.dnd-list { display: grid; gap: 10px; }
.dnd-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: #fff; border: 2px solid #E4EAF5; border-radius: 12px;
  cursor: grab; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.dnd-item:active { cursor: grabbing; }
.dnd-item.picked { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.dnd-num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.dnd-text { flex: 1 1 auto; }
.dnd-grip { color: #9DB9F5; letter-spacing: 2px; font-size: 0.9rem; }

/* ---------- Admin: Topics & Themes ---------- */
.tax-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid #EDF1F9;
}
.tax-row:last-of-type { border-bottom: none; }
.tax-add { display: flex; gap: 10px; margin-top: 12px; }
.tax-add input {
  flex: 1 1 auto; padding: 9px 12px; font-size: 0.95rem; font-family: inherit;
  border: 2px solid #E4EAF5; border-radius: 10px; color: var(--navy);
}
.tax-add input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

/* ---------- Locked Pro teasers (freemium) ---------- */
.locked-panel { position: relative; overflow: hidden; }
.locked-blur {
  filter: blur(7px);
  opacity: 0.65;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.locked-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding: 28px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.88));
}
.locked-overlay h3 { margin: 0; }
.locked-overlay p { margin: 0; }
.lock-badge { font-size: 2.1rem; line-height: 1; }
.theme-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 6px 0; }
.theme-chip {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--blue-soft); color: var(--navy);
  font-size: 0.85rem; font-weight: 600; white-space: nowrap;
}
.lock-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.lock-row:last-of-type { border-bottom: none; }
.lock-ico { font-size: 1.25rem; line-height: 1.4; }
.pro-tag {
  margin-left: auto; align-self: center; flex: 0 0 auto;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: var(--blue); border-radius: 999px; padding: 4px 12px;
}

/* ---------- Review workflow ---------- */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: #E7F6EC; color: #15803D; }
.pill-warn { background: #FEF3C7; color: #B45309; }
.pill-muted { background: #EEF2F7; color: #64748B; }
.pill-info { background: #E0ECFF; color: #1D4ED8; }
.rq-card { margin-bottom: 12px; }
.rq-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; align-items: flex-start; }
.rq-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.rq-detail { border-top: 1px solid #EDF1F9; padding-top: 10px; }
.rq-detail textarea { width: 100%; padding: 9px 12px; font-size: 0.95rem; font-family: inherit; border: 2px solid #E4EAF5; border-radius: 10px; color: var(--navy); }
.review-note { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 0.9rem; }

/* ---- Scripture verse popups (app28) ---- */
.verse-ref {
  background: none; border: none; padding: 0; margin: 0;
  color: var(--blue); font: inherit; text-align: inherit;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px;
  cursor: pointer;
}
.verse-ref:hover { color: var(--blue-dark); }
.verse-pop { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.verse-pop-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.verse-pop-card {
  position: relative; background: #fff; width: 100%; max-width: 580px;
  max-height: 82vh; overflow-y: auto; border-radius: 18px 18px 0 0;
  padding: 20px 22px 28px; box-shadow: 0 -8px 40px rgba(0,0,0,0.25);
}
.verse-pop-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.verse-pop-head strong { font-size: 1.15rem; color: var(--navy); margin-right: auto; }
.ver-toggle { display: inline-flex; background: #EEF2F7; border-radius: 999px; padding: 3px; }
.ver-toggle button {
  border: none; background: none; padding: 5px 14px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; cursor: pointer; color: #64748B; font-family: inherit;
}
.ver-toggle button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,0.14); }
#vp-close {
  border: none; background: #EEF2F7; width: 44px; height: 44px; border-radius: 50%;
  font-size: 0.85rem; cursor: pointer; color: var(--navy); flex-shrink: 0;
}
.verse-pop-body .verse-text { font-family: Georgia, 'Times New Roman', serif; font-size: 1.08rem; line-height: 1.8; color: var(--navy); }
.verse-text sup { color: var(--blue); font-size: 0.68em; font-weight: 700; margin-right: 3px; font-family: inherit; }
.verse-text .woc { color: #B03A2E; }
@media (min-width: 640px) {
  .verse-pop { align-items: center; padding: 20px; }
  .verse-pop-card { border-radius: 18px; }
}

/* ---- Topical Scripture search + verse fill-in-the-blank (app29) ---- */
.verse-text { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; line-height: 1.8; color: var(--navy); }
.verse-text.small { font-size: 0.95rem; }
.theme-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  border: 2px solid #E4EAF5; background: #fff; border-radius: 999px; padding: 7px 16px;
  font-size: 0.88rem; font-weight: 600; color: var(--navy); cursor: pointer; font-family: inherit;
}
.chip:hover { border-color: var(--blue); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.scripture-card { margin-bottom: 14px; }
.vfib-verse { background: #F8FAFF; border: 1px solid #E4EAF5; border-radius: 12px; padding: 16px 18px; }
.vfib-n { font-size: .68em; font-weight: 700; color: var(--navy); opacity: .7; margin-left: 1px; }

/* F-06: payment-attention banner on the Plus member view */
.alert-warn { background: #FFF8E6; border: 1px solid #F0D27A; border-radius: 12px; padding: 12px 16px; color: #6B4E00; font-size: .92rem; }

/* F-22: non-blocking admin error toast */
#admin-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #7F1D1D; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 9999; max-width: 90vw; }
#admin-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
