/* ============================================================
   SCRIPTUREREF — Design System
   Mobile-first. Production-ready. Premium ministry aesthetic.
   ============================================================ */

:root {
  /* Color palette */
  --ink: #0f172a;          /* Deep midnight navy */
  --ink-2: #1e293b;        /* Slate */
  --ink-3: #334155;        /* Mid slate */
  --paper: #fffaf0;        /* Warm cream */
  --paper-2: #fef9ee;      /* Slightly cooler cream */
  --paper-3: #fff;         /* Pure white */
  --gold: #f59e0b;         /* Warm gold accent */
  --gold-2: #fbbf24;       /* Brighter gold */
  --gold-3: #fde68a;       /* Soft gold tint */
  --indigo: #4f46e5;       /* Indigo for interactive */
  --indigo-2: #6366f1;
  --teal: #0d9488;
  --emerald: #10b981;
  --rose: #f43f5e;
  --slate: #64748b;
  --slate-2: #94a3b8;
  --slate-3: #cbd5e1;
  --line: #e2e8f0;

  /* Typography */
  --font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --container: 1120px;

  /* Radii / shadows */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 1px rgba(15,23,42,.04);
  --shadow-md: 0 6px 16px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 18px 50px rgba(15,23,42,.12), 0 4px 12px rgba(15,23,42,.06);
  --shadow-xl: 0 28px 80px rgba(15,23,42,.18);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }

/* Utility */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.visually-hidden { @extend .sr-only; }

/* Typography */
h1, h2, h3, h4, h5 { font-family: var(--font-serif); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
h4 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--slate); margin-bottom: 1rem; }
p { margin: 0 0 1em; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* ============================================================
   HEADER + NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fffaf0;             /* fully opaque cream */
  border-bottom: 1px solid var(--line);
  padding-top: max(0px, env(safe-area-inset-top));
  box-shadow: 0 2px 8px rgba(15,23,42,0.05);
  overflow: visible;
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px;
  gap: 12px;
  line-height: 1;
}
@media (min-width: 880px) { .nav-row { min-height: 78px; } }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  flex: 0 1 auto;
  min-width: 0;
  line-height: 1;
}
.brand-mark {
  display: inline-flex;
  flex: 0 0 40px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  line-height: 0;
}
.brand-mark svg { display: block; width: 36px; height: 36px; }
.brand-name {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
  display: inline-block;
  padding: 2px 0;                 /* anti-clip safety */
}
@media (min-width: 420px) { .brand-name { font-size: 1.02rem; } }
@media (min-width: 880px) { .brand-name { font-size: 1.05rem; } }
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border-radius: 12px;
  margin-right: -8px;
  flex: 0 0 44px;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  position: fixed;
  top: calc(72px + max(0px, env(safe-area-inset-top)));
  left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 4px;
  /* When closed: fully hidden, no pointer events, can't peek into viewport */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: transform .25s ease, opacity .2s ease, visibility 0s linear .25s;
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - 72px - env(safe-area-inset-top));
  overflow-y: auto;
}
.nav-menu[data-open="true"] {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: transform .25s ease, opacity .2s ease, visibility 0s linear 0s;
}
.nav-link {
  display: block;
  padding: 14px 12px;
  font-weight: 500;
  border-radius: 10px;
  color: var(--ink-2);
}
.nav-link:hover { background: rgba(245,158,11,.1); color: var(--ink); }
.nav-link.nav-cta {
  background: var(--ink); color: var(--paper);
  text-align: center;
  margin-top: 8px;
  padding: 12px 14px;
}
.nav-link.nav-cta:hover { background: var(--ink-2); }

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static; transform: none; padding: 0;
    flex-direction: row; align-items: center; gap: 6px;
    background: transparent; border: 0; box-shadow: none;
  }
  .nav-link { padding: 8px 14px; }
  .nav-link.nav-cta { margin: 0 0 0 8px; padding: 10px 18px; border-radius: 999px; }
}

/* ============================================================
   CONTINUE BANNER — floating card (no longer flush with header)
   ============================================================ */
.continue-banner {
  background: transparent;
  color: var(--ink);
  padding: 16px 0 4px;
}
.continue-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #1e293b, #0f172a);
  color: var(--paper);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15,23,42,.18);
  flex-wrap: nowrap;
  min-height: 56px;
}
.continue-text {
  font-size: .9rem;
  min-width: 0;
  flex: 1;
  display: flex; flex-direction: row; align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.35;
}
.continue-text strong { color: var(--gold-2); white-space: nowrap; }
.continue-text span {
  min-width: 0;
  opacity: .92;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.continue-banner .btn { flex-shrink: 0; }
@media (min-width: 768px) {
  .continue-row { padding: 14px 22px; border-radius: 16px; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: .01em;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-align: center;
  white-space: nowrap;
  border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.btn:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 8px 24px rgba(245,158,11,.35); }
.btn-gold:hover { background: var(--gold-2); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(15,23,42,.05); }
.btn-light { background: var(--paper-3); color: var(--ink); border: 1px solid var(--line); }
.btn-light:hover { border-color: var(--ink-3); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }

/* ============================================================
   HOMEPAGE — HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 40px 0 48px;
  background:
    radial-gradient(circle at 80% -20%, rgba(245,158,11,.18), transparent 55%),
    radial-gradient(circle at 0% 110%, rgba(79,70,229,.16), transparent 55%),
    var(--paper);
  overflow: hidden;
}
.hero-eyebrow { color: var(--indigo); }
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 760px;
}
.hero h1 .accent { color: var(--gold); font-style: italic; }
.hero p.lead {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: var(--ink-3);
  max-width: 620px;
  margin-bottom: 1.6em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { flex: 1 1 auto; min-width: 0; }
@media (min-width: 480px) { .hero-actions .btn { flex: 0 0 auto; } }

.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 36px;
  align-items: center;
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
  .hero { padding: 96px 0 120px; }
}

/* Hero preview card (sample lesson/quiz) */
.hero-preview {
  position: relative;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  transform: rotate(0deg);
  transition: transform .4s ease;
}
@media (min-width: 980px) {
  .hero-preview { padding: 24px; transform: rotate(-1deg); border-radius: var(--r-xl); }
  .hero-preview:hover { transform: rotate(0deg) translateY(-4px); }
}
.hero-preview .pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  color: white;
  padding: 6px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 600;
  margin-bottom: 14px;
}
.hero-preview h3 { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 8px; }
.hero-preview .qtext { color: var(--ink-3); margin-bottom: 18px; }
.hero-preview .choices { display: grid; gap: 10px; }
.choice-pill {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 14px;
  font-size: .95rem;
  display: flex; align-items: center; gap: 12px;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
  cursor: pointer;
  text-align: left;
}
.choice-pill .letter {
  width: 26px; height: 26px; flex: 0 0 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .85rem; color: var(--slate);
  background: white;
}
.choice-pill:hover { border-color: var(--ink-3); }
.choice-pill.is-correct { border-color: var(--emerald); background: rgba(16,185,129,.08); }
.choice-pill.is-correct .letter { background: var(--emerald); color: white; border-color: var(--emerald); }
.choice-pill.is-wrong { border-color: var(--rose); background: rgba(244,63,94,.08); }
.choice-pill.is-wrong .letter { background: var(--rose); color: white; border-color: var(--rose); }
.choice-pill[disabled] { cursor: default; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 48px 0; }
.section-tight { padding: 32px 0; }
@media (min-width: 768px) { .section { padding: 96px 0; } }
.section-header { max-width: 720px; margin: 0 auto 36px; text-align: center; }
@media (min-width: 768px) { .section-header { margin-bottom: 48px; } }

.section-header.left { margin: 0 0 28px; text-align: left; }
.section-header p { color: var(--ink-3); font-size: 1.02rem; }

.surface-ink {
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 100%);
  color: var(--paper);
}
.surface-ink p, .surface-ink h2, .surface-ink h3 { color: var(--paper); }
.surface-ink .eyebrow { color: var(--gold-2); }

.surface-cream { background: var(--paper-2); }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .how-grid { grid-template-columns: repeat(4, 1fr); } }
.how-card {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.how-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold-3); }
.how-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--ink);
  border-radius: 14px;
  font-family: var(--font-serif); font-weight: 800; font-size: 1.2rem;
  margin-bottom: 16px;
}
.how-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.how-card p { color: var(--ink-3); font-size: .95rem; margin: 0; }

/* ============================================================
   SERIES OVERVIEW (cards)
   ============================================================ */
.volume-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 600px) { .volume-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .volume-grid { grid-template-columns: repeat(4, 1fr); } }

.volume-card {
  display: flex; flex-direction: column;
  background: var(--paper-3);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease;
}
.volume-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.volume-cover {
  aspect-ratio: 16 / 10;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 18px 20px;
  color: white;
  position: relative;
  background: linear-gradient(135deg, var(--start, #1e3a8a), var(--end, #3b82f6));
}
@media (min-width: 600px) { .volume-cover { aspect-ratio: 5 / 4; padding: 20px 22px; } }
.volume-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.18), transparent 60%);
  pointer-events: none;
}
.volume-cover .vol-num {
  font-family: var(--font-serif); font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
}
.volume-cover .vol-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: -.01em;
  position: relative; z-index: 1;
}
.volume-body {
  padding: 18px 22px 22px;
  display: flex; flex-direction: column; gap: 12px; flex: 1;
}
.volume-body p { color: var(--ink-3); font-size: .95rem; margin: 0; flex: 1; }
.vol-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem;
  color: var(--slate);
  margin-top: 8px;
}
.progress-bar {
  height: 6px; background: var(--line); border-radius: 999px; overflow: hidden;
  width: 100%;
}
.progress-bar .fill { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.vol-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}
.vol-cta::after { content: "→"; transition: transform .2s ease; }
.volume-card:hover .vol-cta::after { transform: translateX(4px); }

/* ============================================================
   QUIZ PROMOTION SECTION
   ============================================================ */
.cta-band {
  border-radius: var(--r-lg);
  padding: 36px 22px;
  text-align: center;
  background:
    radial-gradient(circle at 70% 0%, rgba(245,158,11,.25), transparent 60%),
    linear-gradient(135deg, #1e1b4b, #0f172a);
  color: white;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 768px) { .cta-band { padding: 48px 28px; border-radius: var(--r-xl); } }
.cta-band h2 { color: white; margin-bottom: .35em; }
.cta-band p { color: rgba(255,255,255,.84); max-width: 540px; margin: 0 auto 1.4em; }

/* ============================================================
   NEWSLETTER + DONATE
   ============================================================ */
.dual-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 880px) { .dual-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

.feature-card {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) { .feature-card { padding: 32px 28px; } }
.feature-card h2 { font-size: 1.6rem; }
.newsletter-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
@media (min-width: 540px) {
  .newsletter-form { flex-direction: row; }
  .newsletter-form input { flex: 1; }
}
.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 16px; /* prevent iOS zoom on focus */
  min-height: 48px;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus { outline: 0; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(79,70,229,.18); }
@media (min-width: 880px) { .input { font-size: 1rem; } }
label.field { display: block; font-weight: 600; margin-bottom: 8px; font-size: .92rem; color: var(--ink-2); }
.tiny { font-size: .8rem; color: var(--slate); }

/* Donate */
.donate-card { background: linear-gradient(160deg, #fff, #fef3c7); }
.donate-amounts { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 18px; }
.amount-pill {
  padding: 10px 16px; border-radius: 999px;
  background: white; border: 1px solid var(--line);
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, transform .1s ease;
}
.amount-pill[aria-pressed="true"] { border-color: var(--gold); background: var(--gold); color: var(--ink); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.78);
  padding: 56px 0 24px;
  margin-top: 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h4 { color: white; font-family: var(--font-sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: rgba(255,255,255,.78); transition: color .15s ease; }
.site-footer a:hover { color: var(--gold-2); }
.site-footer .brand-name { color: white; }
.footer-tag { color: rgba(255,255,255,.66); margin-top: 14px; max-width: 320px; font-size: .92rem; }
.footer-bottom { padding-top: 22px; font-size: .8rem; color: rgba(255,255,255,.5); }

/* ============================================================
   PAGE: SERIES, VOLUME, LIBRARY
   ============================================================ */
.page-hero {
  padding: 36px 0 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245,158,11,.14), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(79,70,229,.10), transparent 50%),
    var(--paper);
}
@media (min-width: 768px) { .page-hero { padding: 56px 0 32px; } }
.page-hero .eyebrow { color: var(--indigo); }
.page-hero h1 { max-width: 760px; }
.page-hero p { max-width: 640px; color: var(--ink-3); font-size: 1.02rem; }
@media (min-width: 768px) { .page-hero p { font-size: 1.1rem; } }

.crumbs {
  font-size: .85rem; color: var(--slate);
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.crumbs a { color: var(--slate); }
.crumbs a:hover { color: var(--ink); }

/* Volume detail page */
.book-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .book-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .book-grid { grid-template-columns: repeat(3, 1fr); } }

.book-card {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold-3); }
.book-card .book-num {
  font-family: var(--font-sans); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--slate);
}
.book-card .book-title { font-family: var(--font-serif); font-size: 1.4rem; margin: 0; }
.book-card .book-meta { font-size: .85rem; color: var(--slate); }
.book-card .book-cta {
  margin-top: 8px;
  display: inline-flex; gap: 8px; align-items: center;
  font-weight: 600;
}
.book-card .book-cta::after { content: "→"; transition: transform .2s ease; }
.book-card:hover .book-cta::after { transform: translateX(3px); }

.book-card .badge-progress {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(16,185,129,.12); color: var(--emerald);
  padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
}

/* ============================================================
   LESSON READER
   ============================================================ */
.reader {
  max-width: 760px; margin: 0 auto;
}
.reader .lesson-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: .85rem; color: var(--slate);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.lesson-meta .dot { width: 4px; height: 4px; background: var(--slate-3); border-radius: 50%; }
.reader h1 { font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.reader .lesson-intro {
  font-size: 1.15rem; color: var(--ink-3);
  border-left: 4px solid var(--gold);
  padding: 10px 0 10px 18px;
  margin: 16px 0 28px;
}
.reader .chapter-block {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 600px) { .reader .chapter-block { padding: 22px 24px; margin-bottom: 14px; } }
.reader .chapter-block h3 {
  font-family: var(--font-sans); font-size: .85rem;
  text-transform: uppercase; letter-spacing: .14em; color: var(--gold);
  margin-bottom: 8px;
}
.reader .chapter-block .chapter-title {
  font-family: var(--font-serif); font-size: 1.25rem; margin-bottom: 12px;
}
.reader .chapter-block p {
  font-size: 1.04rem; line-height: 1.75; color: var(--ink-2); margin: 0;
}
.reader-callout {
  margin: 24px 0;
  padding: 20px 20px;
  background: linear-gradient(135deg, #fff, #fef3c7);
  border: 1px solid var(--gold-3);
  border-radius: var(--r-lg);
}
@media (min-width: 600px) { .reader-callout { padding: 24px 26px; margin: 28px 0; } }
.reader-callout h4 { color: var(--gold); margin-bottom: 8px; }
.reader-callout .verse { font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.5; color: var(--ink); font-style: italic; }
.reader-callout .verse-ref { font-weight: 600; color: var(--ink); margin-top: 8px; }

.reader-actions {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 36px;
}
@media (min-width: 540px) { .reader-actions { flex-direction: row; justify-content: space-between; } }
.reader-actions .left, .reader-actions .right { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   QUIZ
   ============================================================ */
.quiz-shell {
  max-width: 720px; margin: 0 auto;
}
.quiz-progress {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 18px;
  font-size: .85rem;
  color: var(--slate);
}
.quiz-progress > .qbar-row { display: flex; align-items: center; gap: 10px; }
.quiz-progress .qbar { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.quiz-progress .qbar .fill { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .3s ease; }
@media (min-width: 540px) {
  .quiz-progress { grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; font-size: .9rem; margin-bottom: 20px; }
  .quiz-progress > .qbar-row { display: contents; }
}

.quiz-card {
  background: var(--paper-3);
  border-radius: var(--r-lg);
  padding: 22px 18px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
@media (min-width: 480px) { .quiz-card { padding: 26px 22px; border-radius: var(--r-xl); } }
@media (min-width: 700px) { .quiz-card { padding: 36px 40px; } }
.quiz-q {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  line-height: 1.3;
  margin-bottom: 22px;
}
.quiz-choices { display: grid; gap: 12px; }
.quiz-choice {
  background: var(--paper);
  border: 2px solid var(--line);
  padding: 14px 16px;
  min-height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}
@media (min-width: 480px) { .quiz-choice { padding: 16px 18px; gap: 14px; font-size: 1rem; } }
.quiz-choice:hover { border-color: var(--ink-3); background: var(--paper-3); }
.quiz-choice .letter {
  width: 32px; height: 32px; flex: 0 0 32px;
  border: 1px solid var(--slate-3);
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  color: var(--slate);
  background: white;
}
.quiz-choice.is-correct {
  border-color: var(--emerald);
  background: rgba(16,185,129,.08);
}
.quiz-choice.is-correct .letter { background: var(--emerald); color: white; border-color: var(--emerald); }
.quiz-choice.is-wrong {
  border-color: var(--rose);
  background: rgba(244,63,94,.08);
}
.quiz-choice.is-wrong .letter { background: var(--rose); color: white; border-color: var(--rose); }
.quiz-choice[disabled] { cursor: default; }

.quiz-feedback {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.quiz-feedback.is-correct { background: rgba(16,185,129,.12); color: #065f46; }
.quiz-feedback.is-wrong { background: rgba(244,63,94,.12); color: #9f1239; }

.quiz-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 22px;
  gap: 12px;
  flex-wrap: wrap;
}
.quiz-footer .btn-gold { flex: 1; }
@media (min-width: 480px) { .quiz-footer .btn-gold { flex: 0 0 auto; } }

/* Quiz score screen */
.score-card {
  text-align: center;
  background: var(--paper-3);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  padding: 36px 22px;
  box-shadow: var(--shadow-md);
  max-width: 640px; margin: 0 auto;
}
@media (min-width: 600px) { .score-card { padding: 48px 28px; border-radius: var(--r-xl); } }
.score-ring {
  width: 160px; height: 160px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p, 0) * 1%), var(--line) 0);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.score-ring::after {
  content: "";
  position: absolute; inset: 14px;
  background: var(--paper-3);
  border-radius: 50%;
}
.score-ring .pct {
  position: relative; z-index: 1;
  font-family: var(--font-serif);
  font-size: 2.4rem; font-weight: 700;
}
.score-tier {
  display: inline-block;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(245,158,11,.15); color: var(--ink);
  font-weight: 600; font-size: .9rem;
  margin-bottom: 16px;
}

/* ============================================================
   AUTH / FORM PAGES
   ============================================================ */
.form-page {
  max-width: 460px; margin: 56px auto;
  background: var(--paper-3);
  padding: 36px 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.form-page h1 { font-size: 1.8rem; }
.form-page .form-row { margin-bottom: 16px; }
.form-page .form-actions { margin-top: 20px; }
.form-tabs { display: flex; gap: 6px; background: var(--paper); padding: 4px; border-radius: 999px; margin-bottom: 22px; }
.form-tabs button { flex: 1; padding: 10px 14px; border-radius: 999px; font-weight: 600; color: var(--slate); }
.form-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* About / Contact / FAQ / Legal */
.prose { max-width: 740px; margin: 0 auto; }
.prose p { font-size: 1.05rem; color: var(--ink-2); }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 22px; list-style: disc; margin: 1em 0; }
.prose ul li { margin-bottom: .4em; }

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq-item summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
}
.faq-item summary::after { content: "+"; font-family: var(--font-sans); font-size: 1.3rem; color: var(--gold); transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .answer { padding-top: 12px; color: var(--ink-3); }

/* Empty states */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  background: var(--paper-3);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty-state .icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gold-3), var(--gold));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--ink);
  margin-bottom: 16px;
}
.empty-state h3 { font-family: var(--font-serif); font-size: 1.4rem; }
.empty-state p { color: var(--ink-3); max-width: 420px; margin: 6px auto 18px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: var(--paper);
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  z-index: 1000;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
  max-width: 90%;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp .35s ease both; }

/* Print/accessibility tweaks */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
