/* Catholic Sunday School — design system
   Clean, white and modern: the logo's burgundy with warm gold, soft depth,
   frosted surfaces and gentle motion. */

:root {
  color-scheme: light;
  --burgundy: #8c1c33;
  --burgundy-700: #731429;
  --burgundy-900: #420b18;
  --burgundy-50: #fcf1f3;
  --gold: #c48a12;
  --gold-text: #946409;
  --gold-400: #e8b23e;
  --gold-200: #f5dc9c;
  --gold-50: #fff8e8;
  --ivory: #ffffff;
  --parchment: #f6f5f9;
  --white: #ffffff;
  --ink: #17151c;
  --ink-2: #4c4857;
  --ink-3: #87828f;
  --line: #ecebf0;
  --line-2: #dfdde6;
  --marian: #2a5bd7;
  --marian-50: #eef3fe;
  --green: #12805d;
  --green-50: #ebf7f1;
  --success: #12805d;
  --danger: #cc2b3f;

  /* accents */
  --ruby: #d32f4f;
  --amber: #f0a81c;
  --emerald: #14946b;
  --sapphire: #2a5bd7;
  --amethyst: #7444c2;
  --jewels: linear-gradient(90deg, var(--burgundy), #c2415c 55%, var(--gold-400));
  --brand-grad: linear-gradient(135deg, #a32741, var(--burgundy) 55%, var(--burgundy-900));

  --believe: #b0203f;
  --celebrate: #b7790a;
  --live: #12805d;
  --pray: #2a5bd7;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-xs: 0 1px 2px rgba(23, 21, 28, .05);
  --shadow-sm: 0 1px 2px rgba(23, 21, 28, .04), 0 4px 14px -4px rgba(23, 21, 28, .08);
  --shadow: 0 2px 6px rgba(23, 21, 28, .04), 0 18px 40px -18px rgba(23, 21, 28, .18);
  --shadow-lg: 0 4px 12px rgba(23, 21, 28, .05), 0 40px 80px -32px rgba(23, 21, 28, .32);
  --glass: rgba(255, 255, 255, .72);
  --glass-edge: rgba(255, 255, 255, .8);
  --blur: saturate(1.8) blur(18px);


  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 84px;
  --tabbar-h: 66px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html[data-text="sm"] { font-size: 90%; }
html[data-text="lg"] { font-size: 112%; }
html[data-text="xl"] { font-size: 125%; }
html[data-text="xxl"] { font-size: 140%; }
html[data-text="xxxl"] { font-size: 160%; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--burgundy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--burgundy-700); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--sapphire) 55%, white); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--amber) 35%, white); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--ink); font-optical-sizing: auto; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); letter-spacing: -.03em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); text-wrap: balance; }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.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; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; color: #fff; }

/* ------------------------------------------------------------ layout */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 820px; }
.section { position: relative; padding: clamp(64px, 9vw, 120px) 0; }
.section-sm { padding: clamp(36px, 5vw, 60px) 0; }
.section-alt { background: #fbfafc; border-block: 1px solid #f3f2f6; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 60ch; }
.center { text-align: center; }
.center .section-head, .section-head.center { justify-content: center; text-align: center; flex-direction: column; align-items: center; }

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.grid-books { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
@media (max-width: 1080px) { .grid-books { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: .875rem; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.hide { display: none !important; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--burgundy);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--burgundy); box-shadow: 0 0 0 4px var(--burgundy-50); }
.eyebrow.both::after { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--burgundy); box-shadow: 0 0 0 4px var(--burgundy-50); }
.eyebrow { padding: 6px 12px 6px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); max-width: 60ch; }
.serif { font-family: var(--font-display); }
.italic { font-style: italic; }

.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); margin: 20px auto; max-width: 280px; }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.ornament svg { width: 18px; height: 18px; }

/* soft background light */
.glow { position: absolute; pointer-events: none; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: 0; }

/* ------------------------------------------------------------ buttons */
.btn {
  --bg: var(--white); --fg: var(--ink); --bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font-weight: 700; font-size: .95rem; letter-spacing: -.005em; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); color: var(--fg); border-color: color-mix(in srgb, var(--bd) 70%, var(--ink)); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-primary { --bg: var(--burgundy); --fg: #fff; --bd: var(--burgundy); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 10px 24px -12px rgba(140, 28, 51, .8); }
.btn-primary:hover { --bg: var(--burgundy-700); --bd: var(--burgundy-700); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 14px 28px -12px rgba(140, 28, 51, .85); }
.btn-gold { --fg: #3a2604; --bd: transparent; background: linear-gradient(180deg, #ffd36a, var(--amber)); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 10px 22px -12px rgba(196, 138, 18, .9); }
.btn-gold:hover { color: #3a2604; filter: brightness(1.04); }
.btn-ghost { --bg: transparent; --bd: transparent; --fg: var(--burgundy); }
.btn-ghost:hover { --bg: var(--burgundy-50); --bd: transparent; box-shadow: none; }
.btn-outline { --bg: transparent; --bd: currentColor; --fg: var(--burgundy); }
.btn-light { --bg: var(--glass); --fg: var(--ink); --bd: var(--line-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.btn-light:hover { --bg: #fff; color: var(--ink); }
.btn-danger { --bg: var(--white); --fg: var(--danger); --bd: #f3cfd4; }
.btn-danger:hover { --bg: #fdf1f2; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 1.02rem; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .86rem; gap: 7px; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; }
.btn-block { width: 100%; }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.link-arrow i { transition: transform .2s var(--ease); }
.link-arrow:hover i { transform: translateX(4px); }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .78); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--scroll, 0) * 100%); background: var(--jewels); border-radius: 0 2px 2px 0; transition: width .1s linear; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -24px rgba(23, 21, 28, .35); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 62px; width: auto; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav > a, .nav summary {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px;
  font-weight: 600; font-size: .94rem; color: var(--ink-2); text-decoration: none; cursor: pointer; list-style: none;
}
.nav summary::-webkit-details-marker { display: none; }
.nav > a:hover, .nav summary:hover, .nav details[open] summary { background: rgba(23, 21, 28, .05); color: var(--ink); }
.nav > a.active, .nav summary.active { color: var(--burgundy); }
.nav summary i { font-size: .62rem; opacity: .7; transition: transform .2s; }
.nav details[open] summary i { transform: rotate(180deg); }
.nav details { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  min-width: 280px; padding: 8px; background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg); animation: pop .18s var(--ease);
}
.dropdown a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--ink); }
.dropdown a:hover { background: var(--parchment); }
.dropdown a i { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--burgundy-50); color: var(--burgundy); }
.dropdown strong { display: block; font-size: .93rem; font-weight: 700; }
.dropdown span { display: block; font-size: .8rem; color: var(--ink-3); line-height: 1.35; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -6px) scale(.98); } }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.stars-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 11px; border-radius: 999px;
  background: var(--gold-50); border: 1px solid var(--gold-200); color: #6b4a06; font-weight: 700; text-decoration: none; font-size: .9rem;
}
.stars-pill i { color: var(--amber); }
.stars-pill:hover { color: #6b4a06; background: #fff1cf; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--ruby), var(--burgundy)); color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line-2);
}
.avatar:hover { color: #fff; }
.menu-btn { display: none; }

/* mobile drawer: slides in from the right, its header stays put while the links scroll */
.drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; pointer-events: none; transition: visibility 0s linear .32s; }
.drawer.open { visibility: visible; pointer-events: auto; transition: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(23, 21, 28, .38); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s var(--ease); }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 380px); display: flex; flex-direction: column;
  background: #fff; box-shadow: var(--shadow-lg); border-radius: 24px 0 0 24px; overflow: hidden;
  transform: translateX(100%); transition: transform .32s var(--ease);
}
.drawer.open .drawer-panel { transform: none; }
html.drawer-locked, html.drawer-locked body { overflow: hidden; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px 20px; border-bottom: 1px solid var(--line);
}
.drawer-brand img { height: 44px; width: auto; }
.drawer-close { width: 42px; min-height: 42px; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); }
.drawer-body h4 { font-family: var(--font-body); font-weight: 700; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 22px 8px 8px; }
.drawer-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drawer-auth .btn { padding: 0 12px; }
.drawer-me { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--parchment); color: var(--ink); text-decoration: none; }
.drawer-me:hover { color: var(--ink); }
.drawer-me strong { display: block; font-weight: 700; line-height: 1.3; }
.drawer-me small { display: block; color: var(--ink-3); font-size: .8rem; font-weight: 600; }
.drawer-me small .fa-star { color: var(--gold); }
.drawer-me > .fa-chevron-right { margin-left: auto; color: var(--ink-3); font-size: .8rem; }
.drawer-classes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.drawer-classes a {
  --c: var(--burgundy);
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--c) 6%, white); border: 1px solid color-mix(in srgb, var(--c) 14%, white);
}
.drawer-classes a:hover { color: var(--ink); border-color: color-mix(in srgb, var(--c) 35%, white); }
.drawer-classes a.active { border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; }
.drawer-classes i { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--c); color: #fff; font-size: .85rem; }
.drawer-classes span { min-width: 0; }
.drawer-classes strong { display: block; font-size: .84rem; font-weight: 700; line-height: 1.2; }
.drawer-classes small { display: block; font-size: .72rem; font-weight: 600; color: var(--ink-3); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body .dlink {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 46px; padding: 10px 12px; border: 0; border-radius: 12px; background: none;
  color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.drawer-body .dlink:hover { background: var(--parchment); color: var(--ink); }
.drawer-body .dlink.active { background: var(--burgundy-50); color: var(--burgundy); }
.drawer-body .dlink i { width: 22px; text-align: center; color: var(--burgundy); }
@keyframes fade { from { opacity: 0; } }

/* bottom tab bar on phones and small tablets */
.tabbar { display: none; }

/* ------------------------------------------------------------ flash + toasts */
.flash-wrap { position: relative; z-index: 5; }
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; margin: 16px 0 0; font-weight: 600; border: 1px solid; }
.flash i { margin-top: 3px; }
.flash-success { background: var(--green-50); border-color: #cde9dc; color: #0f5c43; }
.flash-error { background: #fdf1f2; border-color: #f3cfd4; color: #9a1b2c; }
.toasts { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: grid; gap: 10px; max-width: min(92vw, 380px); }
.toast {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; background: rgba(23, 21, 28, .92); color: #fff;
  backdrop-filter: var(--blur); box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease); font-weight: 600;
}
.toast .t-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #ffd36a, var(--amber)); color: #3a2604; }
.toast small { display: block; color: #cfcbd6; font-weight: 500; }
.toast.out { animation: toast-out .3s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 112px); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(23, 21, 28, .07) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask: radial-gradient(70% 70% at 70% 30%, #000, transparent 75%); mask: radial-gradient(70% 70% at 70% 30%, #000, transparent 75%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { margin: 22px 0 22px; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--burgundy); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: .02em; height: .14em; border-radius: 99px; z-index: -1;
  background: var(--gold-200); transform-origin: left; animation: underline 1s .4s var(--ease) both;
}
@keyframes underline { from { transform: scaleX(0); } }
.hero .lead { margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .84rem; font-weight: 600; }
.hero-trust span { display: grid; gap: 2px; }
.hero-trust b { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; line-height: 1; color: var(--ink); letter-spacing: -.02em; }

/* animated aurora behind the preview */
.aurora { position: absolute; inset: -12% -16%; z-index: 0; pointer-events: none; filter: blur(50px); opacity: .55; }
.aurora::before, .aurora::after { content: ""; position: absolute; border-radius: 50%; animation: drift 14s ease-in-out infinite alternate; }
.aurora::before { width: 60%; height: 60%; left: 8%; top: 10%; background: color-mix(in srgb, var(--burgundy) 45%, white); }
.aurora::after { width: 55%; height: 55%; right: 4%; bottom: 6%; background: var(--gold-200); animation-delay: -7s; }
@keyframes drift { to { transform: translate(8%, -6%) scale(1.12); } }

.float-card {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px;
  background: rgba(255, 255, 255, .9); border: 1px solid #fff; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow); font-size: .82rem; animation: bob 6s ease-in-out infinite;
}
.float-card strong { display: block; font-weight: 700; line-height: 1.2; }
.float-card small { display: block; color: var(--ink-3); font-size: .72rem; font-weight: 600; }
.float-card > i, .float-card .mini-medal { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.fc-stars { top: 16%; right: -9%; }
.fc-stars > i { background: linear-gradient(180deg, #ffd36a, var(--amber)); color: #5a3c04; }
.fc-badge { bottom: 14%; left: -11%; animation-delay: -2s; }
.fc-badge .mini-medal { border-radius: 50%; background: var(--brand-grad); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--gold-200); }
.fc-streak { bottom: -5%; right: 8%; animation-delay: -4s; }
.fc-streak > i { background: #fff1e6; color: #e2620f; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* continue card */
.continue-card {
  display: none; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 20px; margin-top: 28px; max-width: 520px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink);
}
.continue-card.show { display: flex; }
.continue-card:hover { color: var(--ink); box-shadow: var(--shadow); }
.continue-card .cc-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex-shrink: 0; font-size: 1.15rem; }
.continue-card small { display: block; color: var(--ink-3); font-weight: 700; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.continue-card strong { display: block; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.continue-card .go { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--burgundy); color: #fff; flex-shrink: 0; }

/* ------------------------------------------------------------ cards */
.card {
  position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-xs);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
a.card { color: inherit; text-decoration: none; }
a.card:hover, .card.hoverable:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--parchment); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
a.card:hover .card-media img { transform: scale(1.04); }
.card-media .play {
  position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); color: var(--burgundy); box-shadow: var(--shadow); opacity: 0; transform: scale(.9);
  transition: .25s var(--ease);
}
a.card:hover .play { opacity: 1; transform: scale(1); }
.card-media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 2rem; }
.card-media .tag { position: absolute; left: 12px; top: 12px; }
.card-media .watched { position: absolute; right: 12px; top: 12px; display: none; }
.card-media .watched.show { display: inline-flex; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; margin: 0; color: var(--ink); }
.card-text { color: var(--ink-2); font-size: .92rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 12px; align-items: center; color: var(--ink-3); font-size: .82rem; font-weight: 600; margin-top: auto; padding-top: 8px; }

/* icon card art: a frosted disc on a soft gradient */
.icon-media { display: grid; place-items: center; background: var(--brand-grad); }
.icon-media.gold { background: linear-gradient(135deg, #ffe7a6, var(--gold-400) 60%, var(--gold)); }
.icon-media::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px); background-size: 18px 18px; }
.glass-media { display: grid; place-items: center; }
.glass-media .disc {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 2.1rem; color: var(--burgundy);
  background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 30px -12px rgba(23, 21, 28, .45);
}
.glass-media .disc svg { width: 54px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line);
}
.tag-gold { background: var(--gold-50); color: #7a5306; border-color: var(--gold-200); }
.tag-burgundy { background: var(--burgundy-50); color: var(--burgundy); border-color: #f3d3da; }
.tag-green { background: var(--green-50); color: var(--green); border-color: #cde9dc; }
.tag-dark { background: rgba(23, 21, 28, .6); color: #fff; border-color: transparent; backdrop-filter: blur(6px); }
.pillar { --c: var(--believe); background: color-mix(in srgb, var(--c) 8%, white); color: var(--c); border-color: color-mix(in srgb, var(--c) 20%, white); }
.pillar-believe { --c: var(--believe); } .pillar-celebrate { --c: var(--celebrate); } .pillar-live { --c: var(--live); } .pillar-pray { --c: var(--pray); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink-2); font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .count { font-size: .76rem; opacity: .7; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3.5vw, 36px); box-shadow: var(--shadow-xs); }
.panel-parchment { background: var(--parchment); border-color: transparent; box-shadow: none; }

/* page header (inner pages) */
.page-head { position: relative; padding: clamp(40px, 6vw, 76px) 0 clamp(28px, 4vw, 44px); overflow: hidden; }
.page-head::before { content: ""; position: absolute; right: -8%; top: -70%; width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--burgundy) 9%, transparent), transparent); pointer-events: none; }
.page-head::after { content: ""; position: absolute; right: 16%; top: -40%; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--gold-400) 18%, transparent), transparent); pointer-events: none; }
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { margin: 14px 0 12px; }
.page-head .lead { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .84rem; font-weight: 600; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--burgundy); }
.crumbs i { font-size: .6rem; opacity: .7; }

/* ------------------------------------------------------------ class books */
.book { position: relative; display: block; text-decoration: none; color: var(--ink); }
.book-cover {
  --c: var(--burgundy);
  position: relative; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; isolation: isolate;
  background: color-mix(in srgb, var(--c) 18%, white); box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.book-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, color-mix(in srgb, var(--c) 55%, rgba(0, 0, 0, .35))); pointer-events: none; }
.book:hover .book-cover { transform: translateY(-6px); box-shadow: 0 24px 40px -18px color-mix(in srgb, var(--c) 70%, transparent); }
.book:hover .book-cover img { transform: scale(1.07); }
.book-level {
  position: absolute; z-index: 2; left: 12px; top: 12px; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-weight: 700; font-size: .68rem; letter-spacing: .04em; color: var(--ink);
}
.book-go {
  position: absolute; z-index: 2; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--c); font-size: .8rem; box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(8px) scale(.9); transition: .35s var(--ease);
}
.book:hover .book-go { opacity: 1; transform: none; }
.book-symbol, .book-title { display: none; }
.book-info { margin-top: 14px; color: var(--ink); }
.book-info strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.2; letter-spacing: -.01em; }
.book-info span { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.book-progress { margin-top: 10px; }

.progress { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--burgundy)) 12%, #f1f0f4); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold-400), var(--burgundy)); transition: width .8s var(--ease); }
.progress-label { display: flex; justify-content: space-between; font-size: .76rem; font-weight: 600; color: var(--ink-3); margin-top: 6px; }

/* book detail */
.book-hero { --c: var(--burgundy); position: relative; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, white), #fff); }
.book-hero::before { content: ""; position: absolute; left: -10%; top: -40%; width: 60%; height: 140%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 22%, transparent), transparent); pointer-events: none; }
.book-hero .container { position: relative; display: grid; grid-template-columns: 240px 1fr; gap: clamp(28px, 6vw, 72px); align-items: center; padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(36px, 6vw, 72px); }
.book-hero h1 { margin: 12px 0 12px; }
.book-hero .lead { color: var(--ink-2); }
.book-hero .eyebrow { color: color-mix(in srgb, var(--c) 85%, black); }
.book-hero .book-cover { box-shadow: none; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 22px; font-weight: 600; color: var(--ink-2); font-size: .9rem; }
.hero-stats span { display: inline-flex; align-items: center; gap: 8px; }
.hero-stats i { color: var(--c); }
.book-hero .progress { max-width: 420px; margin-top: 24px; }
.book-hero .progress-label { max-width: 420px; }
.book-hero > .container > .book { max-width: 240px; }
.book-shell { margin-top: 0; }

.lesson-list { display: grid; gap: 12px; }
.lesson-row {
  --c: var(--burgundy);
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.lesson-row:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.lesson-num {
  position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--c) 8%, white); color: var(--c); font-size: 1.1rem;
}
.lesson-num svg.ring { position: absolute; inset: -3px; width: 60px; height: 60px; transform: rotate(-90deg); }
.lesson-num .ring circle { fill: none; stroke-width: 3; }
.lesson-num .ring .track { stroke: color-mix(in srgb, var(--c) 12%, white); }
.lesson-num .ring .bar { stroke: var(--amber); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.lesson-row.done .lesson-num { background: var(--c); color: #fff; }
.lesson-row.done .lesson-num .ring .bar { stroke: var(--amber); }
.lesson-row h3 { font-size: 1.2rem; margin: 0 0 4px; }
.lesson-row p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.lesson-row .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lesson-row .state { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 600; font-size: .82rem; }
.lesson-row .state .go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--parchment); color: var(--ink); transition: .2s; }
.lesson-row:hover .state .go { background: var(--burgundy); color: #fff; }
.lesson-row .done-label { display: none; color: var(--success); }
.lesson-row.done .done-label { display: inline-flex; gap: 6px; align-items: center; }

/* jewel roundel: a small glowing piece of coloured glass holding an icon */
.gem {
  --c: var(--burgundy);
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.15rem; color: #fff; flex-shrink: 0;
  background: radial-gradient(120% 120% at 25% 15%, color-mix(in srgb, var(--c) 45%, white), var(--c) 55%, color-mix(in srgb, var(--c) 75%, black));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -6px 12px rgba(0, 0, 0, .15), 0 10px 22px -10px color-mix(in srgb, var(--c) 80%, transparent);
}

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pillar-card { --c: var(--believe); padding: 26px 24px 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.pillar-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pillar-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 30%, white)); }
.pillar-card i {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; font-size: 1.05rem; margin-bottom: 16px;
  background: radial-gradient(120% 120% at 25% 15%, color-mix(in srgb, var(--c) 45%, white), var(--c) 55%, color-mix(in srgb, var(--c) 75%, black));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 22px -10px color-mix(in srgb, var(--c) 80%, transparent);
}
.pillar-card h3 { font-size: 1.35rem; margin: 0 0 6px; }
.pillar-card p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.pillar-card small { display: block; color: var(--ink-3); font-weight: 600; font-size: .74rem; margin-top: 12px; }

/* steps strip */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: s; }
.step-card { --c: var(--burgundy); position: relative; text-align: center; padding: 30px 16px 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.step-card i {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; color: #fff;
  background: radial-gradient(120% 120% at 25% 15%, color-mix(in srgb, var(--c) 45%, white), var(--c) 55%, color-mix(in srgb, var(--c) 75%, black));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 12px 24px -10px color-mix(in srgb, var(--c) 85%, transparent);
}
.step-card h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; margin: 0 0 4px; }
.step-card p { margin: 0; font-size: .86rem; color: var(--ink-2); }
.step-card::before { counter-increment: s; content: "0" counter(s); position: absolute; top: 14px; left: 16px; font-weight: 700; font-size: .7rem; letter-spacing: .06em; color: var(--ink-3); }

/* verse of the week */
.verse {
  position: relative; text-align: center; padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px); border-radius: var(--radius-lg); overflow: hidden; isolation: isolate;
  background: var(--brand-grad); color: #fff;
}
.verse::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 22px 22px; }
.verse::after { content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -260px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(245, 220, 156, .35), transparent); animation: drift 12s ease-in-out infinite alternate; }
.verse-card { position: relative; max-width: 760px; margin: 0 auto; }
.verse-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 22px; border-radius: 18px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); color: var(--gold-200); font-size: 1.3rem; backdrop-filter: blur(8px); }
.verse blockquote { position: relative; margin: 0 auto; max-width: 22ch; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.1; letter-spacing: -.02em; color: #fff; }
.verse cite { display: inline-block; margin-top: 24px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-style: normal; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; color: var(--gold-200); }

/* feature split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.feature-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list li i { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--gold-50); color: var(--gold); }
.feature-list li:nth-child(2) i { background: var(--burgundy-50); color: var(--ruby); }
.feature-list li:nth-child(3) i { background: var(--parchment); color: var(--ink-2); }
.feature-list strong { display: block; font-weight: 700; }
.feature-list span { color: var(--ink-2); font-size: .93rem; }

/* ------------------------------------------------------------ rewards */
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 22px 18px; }
.medal { text-align: center; }
.medal .disc {
  --c: var(--burgundy);
  position: relative; width: 88px; height: 88px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--c) 40%, white), var(--c) 58%, color-mix(in srgb, var(--c) 70%, black));
  color: #fff; font-size: 1.6rem;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px color-mix(in srgb, var(--c) 30%, var(--gold-200)), 0 16px 28px -12px color-mix(in srgb, var(--c) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -8px 14px rgba(0, 0, 0, .18);
}
.medal .disc::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(140deg, rgba(255, 255, 255, .45), transparent 42%); }
.medal strong { display: block; font-size: .9rem; font-weight: 700; line-height: 1.25; }
.medal span { display: block; font-size: .78rem; color: var(--ink-3); line-height: 1.35; margin-top: 2px; }
.medal.locked .disc { filter: grayscale(1) opacity(.35); }
.medal.locked strong { color: var(--ink-3); }
.medal.new .disc { animation: medal-pop 1s var(--ease); }
@keyframes medal-pop { 0% { transform: scale(.4) rotate(-30deg); } 60% { transform: scale(1.12) rotate(6deg); } }

.level-card { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.level-emblem { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; font-size: 2.2rem; color: #fff; background: radial-gradient(120% 120% at 25% 15%, #ffe39a, var(--amber) 55%, #b9770c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 18px 32px -14px rgba(240, 168, 28, .9); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; line-height: 1; color: var(--ink); }
.stat span { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.stat i { float: right; color: var(--amber); }

/* streak dots */
.week { display: flex; gap: 8px; }
.week span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: var(--ink-3); background: var(--parchment); }
.week span.on { background: linear-gradient(135deg, var(--amber), var(--ruby)); color: #fff; }

/* modal (badge unlocked) */
.modal { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 20px; background: rgba(23, 21, 28, .4); backdrop-filter: blur(6px); animation: fade .2s; }
.modal-card { position: relative; width: min(100%, 420px); text-align: center; padding: 40px 28px 28px; border-radius: 28px; background: #fff; box-shadow: var(--shadow-lg); animation: modal-in .45s var(--ease); overflow: hidden; }
.modal-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--jewels); }
.modal-card h3 { font-size: 2rem; margin: 18px 0 6px; }
.modal-card p { color: var(--ink-2); }
.modal-card .medal .disc { width: 116px; height: 116px; font-size: 2.3rem; }
@keyframes modal-in { from { transform: translateY(20px) scale(.94); opacity: 0; } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 140; }

/* ------------------------------------------------------------ lesson page */
.lesson-top { --c: var(--burgundy); position: relative; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, white), color-mix(in srgb, var(--c) 3%, white)); }
.lesson-top::before { content: ""; position: absolute; right: -6%; top: -60%; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 20%, transparent), transparent); pointer-events: none; }
.lesson-top .container { position: relative; padding-top: clamp(28px, 5vw, 52px); padding-bottom: clamp(72px, 9vw, 108px); }
.lesson-top h1 { margin: 14px 0 10px; max-width: 18ch; }
.lesson-top .big-idea { font-family: var(--font-display); font-style: italic; font-size: clamp(1.2rem, 2vw, 1.5rem); color: color-mix(in srgb, var(--c) 85%, black); max-width: 46ch; margin: 0; }
.lesson-top .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.lesson-top .tag { background: rgba(255, 255, 255, .75); backdrop-filter: blur(8px); }
.lesson-icon {
  position: absolute; right: var(--gutter); bottom: 86px; width: 104px; height: 104px; border-radius: 30px; display: grid; place-items: center; font-size: 2.8rem; color: #fff;
  background: radial-gradient(120% 120% at 25% 15%, color-mix(in srgb, var(--c) 45%, white), var(--c) 55%, color-mix(in srgb, var(--c) 75%, black));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 24px 40px -18px color-mix(in srgb, var(--c) 90%, transparent); transform: rotate(-6deg);
}

.lesson-shell { position: relative; margin-top: -56px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.lesson-main { min-width: 0; }
.stepper {
  position: sticky; top: calc(var(--header-h) + 10px); z-index: 10; display: flex; gap: 6px; padding: 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .82); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: none;
}
.stepper::-webkit-scrollbar { display: none; }
.stepper button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: max-content; height: 44px; padding: 0 16px;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--ink-2);
}
.stepper button .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; background: var(--parchment); color: var(--ink-3); }
.stepper button:hover { color: var(--ink); }
.stepper button.active { background: var(--ink); color: #fff; }
.stepper button.active .dot { background: rgba(255, 255, 255, .18); color: #fff; }
.stepper button.complete .dot { background: var(--amber); color: #fff; }
.lesson-progress { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 14px 20px 0; }
.lesson-progress span { display: block; height: 100%; width: 0; background: var(--jewels); transition: width .5s var(--ease); }

.step { display: none; margin-top: 22px; animation: step-in .45s var(--ease); }
.step.active { display: block; }
@keyframes step-in { from { opacity: 0; transform: translateY(10px); } }
.step-card-lg { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 4.5vw, 48px); box-shadow: var(--shadow-sm); }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.step-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.step-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }

.story { font-size: clamp(1.05rem, 1.5vw, 1.16rem); line-height: 1.8; max-width: 66ch; }
.story p { margin: 0 0 1.05em; }
.story p:first-of-type::first-letter { float: left; font-family: var(--font-display); font-size: 4.2em; line-height: .78; padding: 6px 10px 0 0; color: var(--burgundy); font-weight: 600; }
.story ul, .story ol { margin: 0 0 1.2em; padding: 0; list-style: none; display: grid; gap: 10px; }
.story li { position: relative; padding: 12px 16px 12px 48px; border-radius: 14px; background: var(--parchment); line-height: 1.55; }
.story ul li::before { content: ""; position: absolute; left: 20px; top: 21px; width: 10px; height: 10px; transform: rotate(45deg); background: linear-gradient(135deg, var(--amber), var(--ruby)); border-radius: 2px; }
.story ol { counter-reset: li; }
.story ol li::before { counter-increment: li; content: counter(li); position: absolute; left: 12px; top: 11px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--burgundy); color: #fff; font-weight: 700; font-size: .78rem; }
.story .reading { background: linear-gradient(transparent 55%, var(--gold-200) 55%); border-radius: 2px; }
.sources { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; padding: 14px 18px; border-radius: 14px; background: var(--parchment); font-size: .86rem; color: var(--ink-2); }
.sources b { color: var(--ink); }

.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #0d0c10; box-shadow: var(--shadow); }
.video-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-empty { display: grid; place-items: center; text-align: center; aspect-ratio: 16 / 9; border-radius: 20px; padding: 24px; background: var(--parchment); border: 1px dashed var(--line-2); color: var(--ink-2); }
.video-empty i { font-size: 2.2rem; color: var(--ink-3); margin-bottom: 10px; }
.speed { display: inline-flex; gap: 4px; padding: 4px; background: var(--parchment); border-radius: 999px; }
.speed button { border: 0; background: transparent; padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: .8rem; cursor: pointer; color: var(--ink-2); }
.speed button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); }

/* flashcards */
.flashcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.flashcard { display: block; width: 100%; perspective: 900px; height: 190px; cursor: pointer; border: 0; padding: 0; background: none; text-align: center; font: inherit; color: inherit; }
.flashcard .inner { display: block; position: relative; width: 100%; height: 100%; transition: transform .6s var(--ease); transform-style: preserve-3d; }
.flashcard.flipped .inner { transform: rotateY(180deg); }
.flashcard .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 22px; display: grid; place-items: center; padding: 20px; overflow: hidden; }
.flashcard .front { background: radial-gradient(120% 120% at 20% 0%, #c8344f, var(--burgundy) 55%, var(--burgundy-900)); color: #fff; box-shadow: var(--shadow); }
.flashcard .front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(130deg, rgba(255, 255, 255, .22), transparent 40%); }
.flashcard .front strong { position: relative; font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; line-height: 1.1; }
.flashcard .front small { position: absolute; bottom: 14px; left: 0; right: 0; font-size: .72rem; font-weight: 700; opacity: .75; letter-spacing: .08em; }
.flashcard .back { background: var(--gold-50); border: 1px solid var(--gold-200); color: var(--ink); transform: rotateY(180deg); font-size: .98rem; line-height: 1.45; }
.remember {
  position: relative; margin-top: 26px; padding: clamp(26px, 4vw, 40px); border-radius: 24px; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, var(--gold-50), #fff); border: 1px solid var(--gold-200);
}
.remember::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--jewels); }
.remember small { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; color: var(--gold-text); }
.remember blockquote { margin: 10px auto 0; max-width: 30ch; font-family: var(--font-display); font-weight: 600; font-style: italic; font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.15; color: var(--ink); }
.repeat-dots { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.repeat-dots button { width: 44px; height: 44px; border-radius: 50%; border: 2px dashed var(--gold-400); background: transparent; cursor: pointer; color: var(--gold-text); font-weight: 700; }
.repeat-dots button.on { background: var(--amber); border-style: solid; border-color: var(--amber); color: #fff; }

/* quiz */
.quiz-q { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.45rem, 2.8vw, 1.95rem); line-height: 1.2; margin: 6px 0 20px; }
.quiz-count { font-weight: 700; color: var(--ink-3); font-size: .85rem; }
.quiz-dots { display: flex; gap: 6px; }
.quiz-dots span { width: 28px; height: 6px; border-radius: 999px; background: var(--line); }
.quiz-dots span.ok { background: var(--success); }
.quiz-dots span.no { background: #ec9aa6; }
.quiz-dots span.cur { background: var(--amber); }
.options { display: grid; gap: 12px; }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border-radius: 16px; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line-2); font-weight: 600; font-size: 1.02rem; transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.option .key { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--parchment); color: var(--ink-2); font-weight: 700; font-size: .85rem; }
.option:hover:not([disabled]) { border-color: var(--ink-3); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.option.correct { border-color: var(--success); background: var(--green-50); }
.option.correct .key { background: var(--success); color: #fff; }
.option.wrong { border-color: #ec9aa6; background: #fdf1f2; animation: shake .35s; }
.option.wrong .key { background: var(--danger); color: #fff; }
.option[disabled] { cursor: default; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.feedback { display: none; margin-top: 16px; padding: 16px 18px; border-radius: 16px; font-weight: 600; }
.feedback.show { display: flex; gap: 12px; align-items: flex-start; animation: step-in .3s var(--ease); }
.feedback.ok { background: var(--green-50); color: #0f5c43; }
.feedback.no { background: #fff6e6; color: #7a4a08; }
.quiz-result { text-align: center; padding: 10px 0; }
.quiz-result .score { font-family: var(--font-display); font-size: 4.4rem; line-height: 1; color: var(--ink); font-weight: 600; }
.stars-row { display: flex; justify-content: center; gap: 8px; font-size: 2rem; color: var(--line-2); margin: 10px 0; }
.stars-row .on { color: var(--amber); animation: medal-pop .6s var(--ease) both; }

/* prayer & activity */
.prayer-card {
  position: relative; padding: clamp(32px, 5vw, 56px); border-radius: 26px; text-align: center; color: var(--ink); overflow: hidden;
  background: radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--amber) 12%, transparent), transparent 70%), #fff; border: 1px solid var(--line);
}
.prayer-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--jewels); }
.prayer-card .cross { width: 34px; height: 34px; margin: 0 auto 16px; color: var(--gold); }
.prayer-text { font-family: var(--font-display); font-size: clamp(1.25rem, 2.3vw, 1.6rem); line-height: 1.55; max-width: 40ch; margin: 0 auto; font-weight: 400; white-space: pre-line; }
.do-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.do-card { padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: #fff; }
.do-card h4 { font-family: var(--font-body); font-weight: 700; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; display: flex; gap: 10px; align-items: center; margin-bottom: 10px; color: var(--burgundy); }
.do-card h4 i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--burgundy-50); }
.do-card.family h4 { color: var(--marian); }
.do-card.family h4 i { background: var(--marian-50); }
.do-card p { margin: 0; color: var(--ink-2); }

.complete-banner {
  display: none; position: relative; text-align: center; padding: clamp(36px, 6vw, 56px); border-radius: 28px; margin-top: 22px; overflow: hidden; color: #fff;
  background: var(--brand-grad);
}
.complete-banner > * { position: relative; z-index: 1; }
.complete-banner::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 20px 20px; }
.complete-banner.show { display: block; animation: step-in .5s var(--ease); }
.complete-banner h3 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin: 10px 0 8px; }
.complete-banner p { color: rgba(255, 255, 255, .85); }
.complete-banner .big-star { font-size: 3rem; color: var(--gold-200); }

.lesson-aside { position: sticky; top: calc(var(--header-h) + 10px); display: grid; gap: 16px; }
.aside-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.aside-card h4 { font-family: var(--font-body); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.checklist li i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; background: var(--parchment); color: var(--ink-3); }
.checklist li.ok { color: var(--ink); }
.checklist li.ok i { background: var(--success); color: #fff; }
.mini-lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mini-lessons a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.mini-lessons a:hover { background: var(--parchment); color: var(--ink); }
.mini-lessons a.current { background: var(--burgundy-50); color: var(--burgundy); }
.mini-lessons .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; background: var(--parchment); flex-shrink: 0; }
.mini-lessons a.done .n { background: var(--success); color: #fff; }
.tool-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* text size: A− 100% A+ */
.textsize { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); flex-shrink: 0; }
.textsize button { display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 44px; height: 38px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s, color .15s; }
.textsize button:hover:not(:disabled) { background: var(--burgundy-50); color: var(--burgundy); }
.textsize button:disabled { color: var(--ink-3); opacity: .45; cursor: default; }
.textsize .ts-a { font-family: var(--font-display); line-height: 1; }
.textsize .ts-a-sm { font-size: .82rem; }
.textsize .ts-a-lg { font-size: 1.22rem; }
.textsize .ts-step i { font-size: .6rem; }
.textsize .ts-value { min-width: 58px; font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.textsize .ts-value:disabled { opacity: 1; color: var(--ink-2); }
.textsize .ts-value:not(:disabled) { color: var(--burgundy); text-decoration: underline dotted; text-underline-offset: 3px; }
.textsize-sm button { height: 32px; min-width: 38px; padding: 0 8px; }
.textsize-sm .ts-value { min-width: 50px; }

/* small pop-up menus (reading voice) */
details[data-popover] { position: relative; }
details[data-popover] > summary { list-style: none; cursor: pointer; }
details[data-popover] > summary::-webkit-details-marker { display: none; }
details[data-popover][open] > summary { background: var(--burgundy-50); color: var(--burgundy); border-color: transparent; }
.popover {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: max-content; min-width: 220px; max-width: min(320px, calc(100vw - 32px));
  padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop-in .18s var(--ease);
  display: grid; gap: 10px; text-align: left;
}
.popover h4 { margin: 0; font-family: var(--font-body); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.pop-label { font-weight: 700; font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.pop-note { margin: 0; font-size: .76rem; color: var(--ink-3); line-height: 1.45; }
.select-sm { min-height: 42px; padding: 8px 36px 8px 12px; font-size: .9rem; border-radius: 12px; background-position: right 12px center; }
.voice-menu .popover { width: 290px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--parchment); border-radius: 999px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; border: 0; background: transparent; padding: 0 10px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .8rem; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--burgundy); box-shadow: var(--shadow-xs); }

@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* words being read aloud */
::highlight(speaking) { background-color: #ffd36a; color: var(--ink); }

/* ------------------------------------------------------------ watch page */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.watch-title { margin: 18px 0 8px; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.watch-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 14px 0 18px; }
.playlist { background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.playlist header { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.playlist header h4 { margin: 0; font-family: var(--font-body); font-weight: 700; font-size: .9rem; }
.playlist header small { color: var(--ink-3); font-weight: 600; }
.playlist ol { list-style: none; margin: 0; padding: 8px; max-height: 70vh; overflow-y: auto; }
.playlist a { display: grid; grid-template-columns: 28px 120px 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.playlist a:hover { background: var(--parchment); }
.playlist a.current { background: var(--burgundy-50); }
.playlist .idx { font-size: .78rem; font-weight: 700; color: var(--ink-3); text-align: center; }
.playlist .thumb { aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--parchment); }
.playlist .thumb img { width: 100%; height: 100%; object-fit: cover; }
.playlist .t { font-weight: 600; font-size: .88rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.playlist .seen { color: var(--success); font-size: .75rem; display: none; }
.playlist .seen.show { display: inline; }

/* ------------------------------------------------------------ prayers & library */
.list-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 20px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: .25s var(--ease); }
.list-card:hover { color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.list-card .li-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-50); color: var(--gold); flex-shrink: 0; font-size: 1.1rem; }
.list-card strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; }
.list-card span { display: block; color: var(--ink-3); font-size: .84rem; font-weight: 600; }
.list-card .arrow { margin-left: auto; color: var(--ink-3); }
/* document & prayer cards: the papal keys (or the rosary) on a warm wash of light */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.doc-grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.doc-card {
  position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 128px; padding: 22px 22px 22px 26px; border-radius: var(--radius); overflow: hidden;
  background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.doc-card::before {
  content: ""; position: absolute; inset: 0 0 0 auto; width: 62%; z-index: -1;
  background: linear-gradient(90deg, rgba(255, 248, 232, 0), #fff6dc 60%, #ffeeb8); opacity: .55; transition: opacity .4s var(--ease);
}
.doc-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold-200); }
.doc-card:hover::before { opacity: 1; }
.doc-text { min-width: 0; display: grid; gap: 4px; }
.doc-kind { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); }
.doc-card strong { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; letter-spacing: -.01em; }
.doc-card p { margin: 2px 0 0; color: var(--ink-2); font-size: .9rem; line-height: 1.5; }
.doc-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .84rem; font-weight: 700; color: var(--ink-3); transition: color .2s; }
.doc-go i { font-size: .75rem; transition: transform .3s var(--ease); }
.doc-card:hover .doc-go { color: var(--burgundy); }
.doc-card:hover .doc-go i { transform: translateX(4px); }
.doc-emblem { width: 64px; flex-shrink: 0; filter: drop-shadow(0 8px 12px rgba(150, 100, 10, .22)); transition: transform .45s var(--ease); }
.doc-card:hover .doc-emblem { transform: scale(1.18) rotate(-4deg); }
.doc-card-lg { align-items: flex-start; min-height: 190px; padding: 28px 24px 26px 28px; }
.doc-card-lg strong { font-size: 1.5rem; }
.doc-card-lg .doc-emblem { width: 76px; }
.doc-card-prayer::before { background: linear-gradient(90deg, rgba(252, 241, 243, 0), #fcf1f3 60%, #f8dfe4); }
.doc-card-prayer:hover { border-color: #f3d3da; }
.doc-card-prayer .doc-kind { color: var(--burgundy); }
.doc-card-prayer .doc-emblem { width: 56px; filter: drop-shadow(0 8px 12px rgba(120, 60, 20, .2)); }
.page-head-emblem .container { min-height: 120px; }
.page-emblem { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%) rotate(-6deg); width: clamp(90px, 12vw, 150px); opacity: .95; filter: drop-shadow(0 18px 24px rgba(150, 100, 10, .22)); pointer-events: none; }
.page-head-emblem h1, .page-head-emblem .lead { max-width: min(62ch, calc(100% - 170px)); }
@media (max-width: 640px) {
  .page-emblem { display: none; }
  .page-head-emblem h1, .page-head-emblem .lead { max-width: none; }
  .doc-card { padding: 18px; min-height: 108px; }
  .doc-emblem { width: 52px; }
}

.search { position: relative; max-width: 420px; }
.search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 44px; }
.reader-tools { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

.accordion { display: grid; gap: 12px; }
.accordion details { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: box-shadow .2s; }
.accordion details[open] { box-shadow: var(--shadow-sm); }
.accordion summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; cursor: pointer; font-weight: 700; font-size: 1.03rem; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary i { transition: transform .25s; color: var(--burgundy); }
.accordion details[open] summary i { transform: rotate(45deg); }
.accordion .answer { padding: 0 22px 22px; color: var(--ink-2); white-space: pre-line; }

/* ------------------------------------------------------------ forms */
.form-card { max-width: 520px; margin: 0 auto; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label, .label { font-weight: 700; font-size: .9rem; }
.field .help { font-size: .82rem; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff;
  transition: border-color .15s, box-shadow .15s; font-size: 1rem;
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--sapphire); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sapphire) 16%, transparent); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2387828f' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grade-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grade-picker label { cursor: pointer; }
.grade-picker input { position: absolute; opacity: 0; }
.grade-picker span { display: grid; place-items: center; text-align: center; min-height: 52px; padding: 6px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; font-weight: 700; font-size: .82rem; line-height: 1.2; }
.grade-picker input:checked + span { border-color: var(--burgundy); background: var(--burgundy-50); color: var(--burgundy); }
.grade-picker input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--sapphire) 55%, white); }
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
.auth-art { position: relative; overflow: hidden; color: #fff; padding: clamp(32px, 6vw, 64px); display: flex; flex-direction: column; justify-content: flex-end; background: var(--burgundy-900); }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23, 21, 28, 0) 30%, rgba(23, 21, 28, .85)); }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h2 { color: #fff; max-width: 16ch; }
.auth-art p { color: rgba(255, 255, 255, .85); max-width: 42ch; }
.auth-form { display: grid; place-items: center; padding: clamp(28px, 6vw, 64px) var(--gutter); }
.auth-form .form-card { width: 100%; }

/* ------------------------------------------------------------ discussions */
.topic-row { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; color: var(--ink); transition: .25s var(--ease); }
.topic-row:hover { color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.topic-row h3 { font-size: 1.2rem; margin: 0 0 4px; }
.topic-row p { margin: 0; color: var(--ink-3); font-size: .85rem; font-weight: 600; }
.replies-count { text-align: center; min-width: 64px; }
.replies-count b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; line-height: 1; color: var(--ink); }
.replies-count span { font-size: .7rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.post { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; }
.post .who { font-weight: 700; }
.post .when { color: var(--ink-3); font-size: .8rem; font-weight: 600; margin-left: 8px; }
.post .body { margin-top: 4px; white-space: pre-line; color: var(--ink); overflow-wrap: anywhere; }
.post .tools { margin-top: 6px; }
.post .tools button { border: 0; background: none; color: var(--ink-3); font-size: .78rem; font-weight: 600; cursor: pointer; padding: 0; }
.post .tools button:hover { color: var(--danger); }
.avatar-sm { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--amber), #d6820f); }
.guidelines { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--marian-50); color: #1d3f94; font-size: .88rem; }

/* ------------------------------------------------------------ footer */
.site-footer { position: relative; margin-top: clamp(48px, 8vw, 96px); background: #fbfafc; color: var(--ink-2); border-top: 1px solid var(--line); }
.site-footer .container { position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: clamp(48px, 7vw, 80px) 0 36px; }
.footer-brand img { height: 56px; }
.footer-brand p { margin-top: 16px; color: var(--ink-2); max-width: 34ch; font-size: .93rem; }
.site-footer h5 { font-family: var(--font-body); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 6px 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: var(--burgundy); }
.site-footer .btn-gold, .site-footer .btn-gold:hover { color: #3a2604; }
.footer-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 22px 0 30px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-3); }
.footer-bottom a { font-size: .84rem; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); }

/* misc */
.empty { text-align: center; padding: clamp(36px, 6vw, 64px) 20px; border-radius: var(--radius-lg); background: #fff; border: 1px dashed var(--line-2); color: var(--ink-2); }
.empty i { font-size: 2.2rem; color: var(--ink-3); margin-bottom: 12px; }
.empty h3 { margin-bottom: 6px; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--danger); }
.live-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(204, 43, 63, .5); } 100% { box-shadow: 0 0 0 12px rgba(204, 43, 63, 0); } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ interaction effects */
/* cursor spotlight: app.js sets --mx / --my on hover */
.card, .step-card, .pillar-card, .lesson-row, .list-card, .topic-row, .stat, .panel, .doc-card:not(.doc-card-lg) {
  background-image: radial-gradient(360px circle at var(--mx, -400px) var(--my, -400px), rgba(140, 28, 51, .055), transparent 60%);
}
.step-card, .pillar-card { background-color: #fff; }
/* shine sweep across primary buttons */
.btn-primary, .btn-gold { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after, .btn-gold::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn-primary:hover::after, .btn-gold:hover::after { transform: translateX(120%); }
.btn i { transition: transform .25s var(--ease); }
.btn:hover .fa-arrow-right { transform: translateX(3px); }
/* header gets tighter once you scroll */
.site-header { transition: height .3s var(--ease), border-color .2s, box-shadow .2s; }
.site-header.scrolled { --header-h: 68px; height: 68px; }
.site-header.scrolled .brand img { height: 50px; }
.brand img { transition: height .3s var(--ease); }
/* step icons: brand gradient, lift on hover */
.step-card i { transition: transform .35s var(--ease); }
.step-card:hover i { transform: translateY(-3px) rotate(-6deg); }
.reveal { transition-delay: var(--d, 0s); }

/* ------------------------------------------------------------ children's bible */
.bible-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(16px, 2.4vw, 24px); border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--gold-50), #fff 60%); border: 1px solid var(--gold-200); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.bible-feature:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.bible-feature-pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bible-feature-pics img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; display: block; }
.bible-feature-text { display: grid; gap: 6px; justify-items: start; }
.bible-feature-text strong { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -.02em; }
.bible-feature-text p { margin: 0; color: var(--ink-2); max-width: 46ch; }
.library-sub { margin: clamp(36px, 5vw, 56px) 0 18px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
@media (max-width: 860px) { .bible-feature { grid-template-columns: minmax(0, 1fr); } }
.bible-section { margin-top: clamp(28px, 4vw, 44px); }
.bible-section .section-head { margin-bottom: 20px; }
.bible-card .card-title { font-size: 1.08rem; }
.bible-card .card-meta i { color: var(--gold); }
.bible-credit { display: flex; gap: 12px; align-items: flex-start; margin: 40px 0 0; padding: 16px 18px; border-radius: 14px; background: var(--parchment); font-size: .82rem; color: var(--ink-2); line-height: 1.6; }
.bible-credit i { color: var(--ink-3); font-size: 1.1rem; margin-top: 2px; }
.page-head.bible-head { padding: clamp(20px, 3vw, 36px) 0 clamp(16px, 2vw, 22px); }
.bible-head h1 { margin: 10px 0 6px; font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.bible-head .lead { font-weight: 600; font-size: 1rem; }
.bible-reader { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: clamp(14px, 2.4vw, 28px); }
.bible-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.bible-audio { display: grid; gap: 8px; margin-bottom: 18px; padding: 14px; border-radius: 16px; background: var(--parchment); }
.bible-audio audio { width: 100%; }
.bible-page { margin: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 40px); align-items: center; }
.bible-page + .bible-page { margin-top: 32px; }
.bible-pic { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--parchment); box-shadow: var(--shadow-sm); }
.bible-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bible-num { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); }
.bible-words p { margin: 8px 0 0; font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.7; color: var(--ink); text-wrap: pretty; }
.bible-end { margin-top: 32px; text-align: center; padding: clamp(28px, 5vw, 56px) 16px; }
.bible-end h2 { margin-bottom: 8px; }
.bible-end p { max-width: 52ch; margin: 0 auto 22px; }
.bible-end-star { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: #3a2604; background: linear-gradient(180deg, #ffd36a, var(--amber)); box-shadow: 0 16px 30px -14px rgba(196, 138, 18, .9); }
.bible-book.is-paged > * { display: none; }
.bible-book.is-paged > .bible-page.active { display: grid; margin: 0; animation: page-in .35s var(--ease); }
.bible-book.is-paged > .bible-end.active { display: block; margin: 0; animation: page-in .35s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 28px)); } }
.bible-nav { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 8px; border-radius: 999px; background: rgba(255, 255, 255, .92); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow); }
.bible-nav[hidden] { display: none; }
.bible-progress { flex: 1; min-width: 0; display: grid; gap: 6px; text-align: center; font-weight: 700; color: var(--ink-2); }
.bible-bar { height: 6px; border-radius: 999px; background: var(--parchment); overflow: hidden; }
.bible-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--jewels); transition: width .3s var(--ease); }
.bible-more { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 24px; }
.bible-more .list-card-next { text-align: right; }
.bible-more .list-card-next > div { margin-left: auto; }
@media (max-width: 860px) {
  .bible-page { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bible-nav { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .bible-reader { padding: 12px; border-radius: 22px; }
  .bible-tools { margin-bottom: 12px; gap: 8px; }
  .bible-tools .nav-label { display: none; }
  .bible-pic { border-radius: 14px; }
  .bible-nav .nav-label { display: none; }
  .bible-nav .btn-lg { width: 56px; padding: 0; }
  .bible-more { grid-template-columns: 1fr 1fr; }
  .bible-more .btn-ghost { grid-column: 1 / -1; order: 3; }
  .bible-more .list-card { padding: 14px; gap: 12px; }
  .bible-more .list-card strong { font-size: 1rem; }
  .bible-more .li-icon { width: 38px; height: 38px; }
}
@media print {
  .bible-book > .bible-page { display: grid !important; break-inside: avoid; margin-top: 24px !important; }
  .bible-book > .bible-end { display: none !important; }
  .bible-reader { border: 0; box-shadow: none; padding: 0; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .lesson-shell { grid-template-columns: 1fr; }
  .lesson-aside { position: static; grid-template-columns: 1fr 1fr; }
  .watch { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .brand img { height: 52px; }
  .hero-grid, .split, .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .hero-art { width: min(78%, 360px); margin-top: 8px; }
  .book-hero .container { grid-template-columns: 1fr; }
  .book-hero .book { width: 160px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .do-grid, .field-row { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; }
  .lesson-icon { display: none; }
}
@media (max-width: 860px) {
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, .9); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -22px rgba(23, 21, 28, .35);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 54px;
    text-decoration: none; color: var(--ink-3); -webkit-tap-highlight-color: transparent;
  }
  .tabbar .tab-icon { display: grid; place-items: center; width: 56px; max-width: 100%; height: 30px; border-radius: 999px; font-size: 1.12rem; transition: background .25s var(--ease), color .25s, transform .25s var(--ease); }
  .tabbar .tab-label { font-size: .7rem; font-weight: 700; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a:hover { color: var(--ink); }
  .tabbar a:active .tab-icon { transform: scale(.92); }
  .tabbar a.active { color: var(--burgundy); }
  .tabbar a.active .tab-icon { background: var(--burgundy-50); color: var(--burgundy); }
  .toasts { left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); max-width: none; }
  .footer-bottom { padding-bottom: 22px; }
}
@media (max-width: 640px) {
  .header-actions .btn-signin { display: none; }
  .stars-pill { height: 36px; padding: 0 10px 0 8px; font-size: .85rem; }
  .steps { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .lesson-aside { grid-template-columns: 1fr; }
  .grid-books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 18px; }
  .lesson-row { grid-template-columns: auto 1fr; align-items: start; padding: 14px; gap: 14px; }
  .lesson-row .state { display: none; }
  .lesson-row h3 { font-size: 1.1rem; }
  .lesson-num { width: 46px; height: 46px; }
  .lesson-num svg.ring { width: 52px; height: 52px; }
  .stepper button { padding: 0 12px; font-size: .84rem; }
  .stepper button .label { display: none; }
  .stepper button.active .label { display: inline; }
  .topic-row { grid-template-columns: 1fr auto; }
  .topic-row .avatar-sm { display: none; }
  .playlist a { grid-template-columns: 22px 96px 1fr; }
  .hero { padding-top: 24px; }
  .hero-art { width: min(80%, 300px); }
  .float-card { display: none; }
  .fc-stars { display: flex; right: -4%; top: -6%; }
  .hero h1 { margin-top: 14px; }
  .hero-trust { gap: 8px; }
  .footer-grid { gap: 28px 20px; padding-top: 40px; }
  .verse { padding: 16px; }
  .book-hero .container { gap: 22px; }
  .book-hero .book { width: 136px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-stats { gap: 8px 18px; font-size: .86rem; }
  .section-head { gap: 14px; }
  .aside-card { padding: 18px; }
  .story p:first-of-type::first-letter { font-size: 3.4em; }
  .voice-menu .popover { position: fixed; left: 16px; right: 16px; top: auto; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); width: auto; max-width: none; }
}

@media (max-width: 400px) {
  .captcha-field { overflow: hidden; }
  .g-recaptcha { width: 304px; transform: scale(.8); transform-origin: 0 0; height: 64px; }
  .drawer-classes a { flex-direction: column; align-items: flex-start; gap: 8px; }
  .drawer-classes span { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .tabbar, .site-footer, .stepper, .lesson-aside, .step-foot, .no-print, .toasts, #discussion { display: none !important; }
  body { background: #fff; padding: 0; }
  .lesson-top { background: none !important; color: #000; }
  .lesson-top h1, .lesson-top .big-idea, .lesson-top .crumbs a { color: #000; }
  .lesson-shell { margin-top: 0; display: block; }
  .step { display: block !important; break-inside: avoid; }
  .step-card-lg, .prayer-card, .remember { box-shadow: none; border: 1px solid #ccc; }
  .flashcard { height: auto; } .flashcard .inner { transform: none !important; }
  .flashcard .face { position: static; backface-visibility: visible; transform: none !important; background: #fff; color: #000; border: 1px solid #ccc; margin-bottom: 6px; }
  .quiz-print { display: block !important; }
  .quiz-live { display: none !important; }
}
.quiz-print { display: none; }
.checklist li:not(.ok) i::before { content: ""; }
.checklist li:not(.ok) i { border: 2px solid var(--line-2); background: transparent; }
