/* Manna: "dawn" design system.
   Layout concept: a quiet parchment home with one bright daily portion; the portion
   itself is a stack of full-screen colour fields, one job per card, ending at a sunrise. */
:root {
  /* core palette (paper section 2.5) */
  --parchment: #FBF6EC;
  --ink: #1F2430;
  --night: #1B1A3A;
  --moonlight: #ECEAF7;
  --dawn: #F2B33D;
  --ember: #C2410C;

  /* card fields: violet, teal and olive lifted one step for AA contrast with ink text */
  --c-hook: #F2B33D;
  --c-watch: #E86F5A;
  --c-read: #E9D8B4;
  --c-learn: #3BAE9F;
  --c-recall: #968BF4;
  --c-practice: #7AAA5C;
  --c-treasure: linear-gradient(160deg, #F2B33D 0%, #EFA77A 45%, #E59BB0 100%);
  --on-card: #1F2430;
  --on-card-soft: rgba(31, 36, 48, 0.72);
  --card-line: rgba(31, 36, 48, 0.16);
  --card-wash: rgba(255, 255, 255, 0.34);

  /* theme surfaces (light) */
  --bg: var(--parchment);
  --fg: var(--ink);
  --muted: #5B6070;
  --line: #E6DCC8;
  --surface: #FFFDF8;
  --surface-2: #F4ECDC;
  --accent: #B7791F;          /* dawn gold, deepened for text and icons on parchment */
  --accent-fill: var(--dawn);
  --good: #3F7D3A;
  --warn: #9A5B00;
  --focus: #7C6CF0;
  --shadow: 0 1px 2px rgba(60, 40, 10, 0.06), 0 8px 24px rgba(60, 40, 10, 0.07);

  /* type */
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;   /* 17px body */
  --t-lg: 1.25rem;     /* 20px scripture */
  --t-xl: 1.625rem;
  --t-2xl: 2.125rem;
  --t-3xl: 2.75rem;

  --radius: 18px;
  --nav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--night);
    --fg: var(--moonlight);
    --muted: #A9A6C9;
    --line: #34325C;
    --surface: #24234A;
    --surface-2: #2C2B56;
    --accent: #F2B33D;
    --good: #8FCB85;
    --warn: #F2B33D;
    --focus: #B9B1FA;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--night);
  --fg: var(--moonlight);
  --muted: #A9A6C9;
  --line: #34325C;
  --surface: #24234A;
  --surface-2: #2C2B56;
  --accent: #F2B33D;
  --good: #8FCB85;
  --warn: #F2B33D;
  --focus: #B9B1FA;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--t-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- app frame ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
.view {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 18px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px));
}
.view-inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 18px 4px;
}
.wordmark { font-family: var(--serif); font-size: var(--t-xl); font-weight: 600; letter-spacing: -0.01em; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.nav button {
  height: var(--nav-h); border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: var(--t-xs); font-weight: 500;
}
.nav button svg { width: 24px; height: 24px; }
.nav button[aria-current="page"] { color: var(--fg); }
.nav button[aria-current="page"] svg { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  border: 0; cursor: pointer; font-weight: 600; font-size: var(--t-md);
  background: var(--fg); color: var(--bg);
  text-decoration: none;
}
.btn.secondary { background: transparent; color: var(--fg); border: 1.5px solid var(--line); }
.btn.on-card { background: var(--on-card); color: #FFFDF8; }
.btn.on-card.ghost { background: var(--card-wash); color: var(--on-card); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--accent); font-weight: 600; cursor: pointer; text-align: left; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- today ---------- */
.dateline { color: var(--muted); font-size: var(--t-sm); }
.greeting { font-size: var(--t-2xl); }

.growth {
  display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center;
}
.growth svg.tree { width: 112px; height: 112px; display: block; }
.rhythm { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rhythm-days { display: flex; gap: 6px; }
.rhythm-day {
  width: 30px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 0.6875rem; color: var(--muted);
}
.rhythm-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line); display: grid; place-items: center;
}
.rhythm-dot.done { background: var(--accent-fill); border-color: var(--accent-fill); }
.rhythm-dot.today { border-color: var(--fg); }
.rhythm-dot.sabbath svg { width: 13px; height: 13px; color: var(--muted); }
.rhythm-text { font-size: var(--t-sm); }
.rhythm-text strong { font-weight: 600; }

.portion-card {
  border-radius: 26px; padding: 26px 22px 22px;
  background: var(--c-hook); color: var(--on-card);
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.portion-card .meta { font-size: var(--t-sm); color: var(--on-card-soft); font-weight: 500; }
.portion-card .q { font-family: var(--serif); font-size: var(--t-xl); line-height: 1.25; font-weight: 600; }
.portion-card .foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.portion-card .foot small { color: var(--on-card-soft); font-size: var(--t-sm); }
.portion-card.night { background: linear-gradient(170deg, #2C2B56, #1B1A3A); color: var(--moonlight); }
.portion-card.night .meta, .portion-card.night .foot small { color: #A9A6C9; }
.portion-card.night .btn.on-card { background: var(--moonlight); color: var(--night); }
.portion-card.rest { background: var(--surface-2); color: var(--fg); }
.portion-card.rest .meta { color: var(--muted); }
.portion-card.done-card { background: var(--surface); color: var(--fg); border: 1px solid var(--line); box-shadow: none; }
.portion-card.done-card .meta { color: var(--muted); }

.enough { font-family: var(--serif); font-size: var(--t-2xl); font-weight: 600; }
.carry {
  border-left: 3px solid var(--accent-fill); padding: 4px 0 4px 16px;
  font-family: var(--serif); font-size: var(--t-lg); line-height: 1.55;
}
.carry cite { display: block; font-family: var(--sans); font-style: normal; font-size: var(--t-sm); color: var(--muted); margin-top: 6px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.panel h2 { font-size: var(--t-lg); }
.panel p { color: var(--muted); }
.pull-hint { text-align: center; font-size: var(--t-xs); color: var(--muted); }
.pull-zone { transition: transform 0.2s ease; }

.checkin .opts { display: flex; gap: 10px; flex-wrap: wrap; }
.chip-btn {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 500;
}
.chip-btn[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- portion player ---------- */
.player {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  background: var(--card-bg, var(--c-hook));
  color: var(--on-card);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: background-color 0.35s ease;
}
.player[data-type="hook"] { --card-bg: var(--c-hook); }
.player[data-type="watch"] { --card-bg: var(--c-watch); }
.player[data-type="learn"] { --card-bg: var(--c-learn); }
.player[data-type="read"] { --card-bg: var(--c-read); }
.player[data-type="recall"] { --card-bg: var(--c-recall); }
.player[data-type="practice"] { --card-bg: var(--c-practice); }
.player[data-type="treasure"] { background: var(--c-treasure); }
.player[data-type="night"] { background: linear-gradient(175deg, #2C2B56, #1B1A3A); color: var(--moonlight); --on-card: var(--moonlight); --on-card-soft: #A9A6C9; --card-line: rgba(236,234,247,.2); --card-wash: rgba(236,234,247,.12); }
.player[data-type="night"] .btn.on-card { background: var(--moonlight); color: var(--night); }
.player[data-type="night"] .btn.on-card.ghost { background: var(--card-wash); color: var(--moonlight); }

.player-top {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 16px 6px;
}
.player-close {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--card-wash); color: var(--on-card); display: grid; place-items: center;
}
.player-close svg { width: 20px; height: 20px; }
.dots { display: flex; gap: 6px; }
.dots span { flex: 1; height: 4px; border-radius: 4px; background: var(--card-line); }
.dots span.on { background: var(--on-card); }
.card-kind { text-align: right; font-size: var(--t-xs); font-weight: 600; color: var(--on-card-soft); white-space: nowrap; }

.card-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 18px 22px 24px;
}
.card {
  max-width: 560px; margin: 0 auto; min-height: 100%;
  display: flex; flex-direction: column; gap: 18px;
}
.card.enter { animation: rise 0.32s ease both; }
.card.enter-back { animation: drop 0.32s ease both; }
@keyframes rise { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drop { from { transform: translateY(-28px); opacity: 0; } to { transform: none; opacity: 1; } }
.card .label { font-size: var(--t-sm); font-weight: 600; color: var(--on-card-soft); }
.card h2 { font-size: var(--t-2xl); line-height: 1.15; }
.card .hook-q { font-family: var(--serif); font-size: clamp(2rem, 8.5vw, var(--t-3xl)); line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; margin-top: auto; text-wrap: balance; }
.card .hook-sub { color: var(--on-card-soft); margin-bottom: auto; }
.card .soft { color: var(--on-card-soft); }
.card ul.points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; counter-reset: pt; }
.card ul.points li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: var(--t-md); line-height: 1.45; }
.card ul.points li::before {
  counter-increment: pt; content: counter(pt);
  width: 26px; height: 26px; border-radius: 50%; background: var(--card-wash);
  display: grid; place-items: center; font-size: var(--t-xs); font-weight: 700;
}
.card .credit { font-size: var(--t-xs); color: var(--on-card-soft); }

.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-width: 100%;
  border-radius: 14px; overflow: hidden; background: rgba(0, 0, 0, 0.18);
}
.video-frame > div, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link {
  display: flex; align-items: center; gap: 16px; padding: 18px;
  border-radius: 16px; background: var(--card-wash); color: var(--on-card); text-decoration: none;
}
.video-link .play {
  flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--on-card); color: #FFFDF8;
  display: grid; place-items: center;
}
.video-link .play svg { width: 22px; height: 22px; margin-left: 3px; }
.video-link strong { display: block; font-size: var(--t-md); }
.video-link span { font-size: var(--t-sm); color: var(--on-card-soft); }
.video-done { padding: 18px; border-radius: 14px; background: var(--card-wash); }

.scripture { font-family: var(--serif); font-size: var(--t-lg); line-height: 1.7; }
.scripture sup { font-family: var(--sans); font-size: 0.6em; font-weight: 700; color: var(--on-card-soft); margin-right: 3px; vertical-align: 0.45em; }
.lookfor { padding: 12px 14px; border-radius: 12px; background: var(--card-wash); font-size: var(--t-sm); }
.lookfor b { font-weight: 600; }

.treasure-kind { font-size: var(--t-sm); font-weight: 600; color: var(--on-card-soft); }
.treasure-title { font-family: var(--serif); font-size: var(--t-3xl); line-height: 1.05; font-weight: 600; }

/* recall */
.recall-step { font-size: var(--t-sm); color: var(--on-card-soft); font-weight: 600; }
.recall-q { font-family: var(--serif); font-size: var(--t-xl); line-height: 1.3; font-weight: 600; }
.recall-review { font-size: var(--t-xs); font-weight: 600; color: var(--on-card-soft); }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  min-height: 52px; padding: 12px 16px; border-radius: 14px; cursor: pointer;
  border: 2px solid transparent; background: var(--card-wash); color: var(--on-card);
  text-align: left; font-weight: 500;
}
.opt[aria-pressed="true"] { border-color: var(--on-card); }
.opt.right { background: #FFFDF8; border-color: #2F6B2A; }
.opt.wrong { background: rgba(255, 253, 248, 0.55); border-color: var(--ember); text-decoration: line-through; }
.opt[disabled] { cursor: default; }
.order-picked { display: flex; flex-direction: column; gap: 8px; min-height: 52px; }
.order-picked .opt { display: flex; gap: 10px; align-items: center; }
.order-picked .opt b { width: 24px; flex: none; }
.order-pool { display: flex; flex-wrap: wrap; gap: 8px; }
.order-pool .opt { min-height: 44px; }
.sure { display: flex; gap: 10px; flex-wrap: wrap; }
.feedback { padding: 14px 16px; border-radius: 14px; background: #FFFDF8; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.feedback .verdict { font-weight: 700; }
.feedback .verdict.ok { color: #2F6B2A; }
.feedback .verdict.no { color: var(--ember); }
.feedback button { align-self: flex-start; }

.journal label { font-size: var(--t-sm); font-weight: 600; color: var(--on-card-soft); }
.journal input {
  width: 100%; min-height: 50px; padding: 0 14px; margin-top: 6px;
  border-radius: 12px; border: 0; background: var(--card-wash); color: var(--on-card);
}
.journal input::placeholder { color: var(--on-card-soft); }

.player-foot {
  padding: 12px 22px 18px;
  display: flex; gap: 10px; justify-content: center;
}
.player-foot .btn { flex: 1; max-width: 516px; }
.swipe-hint { text-align: center; font-size: var(--t-xs); color: var(--on-card-soft); padding-bottom: 6px; }

/* ---------- finish (sunrise) ---------- */
.finish {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background: linear-gradient(180deg, #1B1A3A 0%, #3B2F5C 38%, #C9785A 74%, #F2B33D 100%);
  color: #FFFDF8;
  padding: calc(env(safe-area-inset-top, 0px) + 28px) 22px calc(env(safe-area-inset-bottom, 0px) + 28px);
}
.finish canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.finish-inner { position: relative; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.finish h2 { font-size: var(--t-3xl); line-height: 1.05; }
.finish .answer { font-size: var(--t-md); line-height: 1.6; color: rgba(255, 253, 248, 0.9); }
.finish .carry { border-color: #FFFDF8; }
.finish .carry cite { color: rgba(255, 253, 248, 0.75); }
.finish .tomorrow { background: rgba(27, 26, 58, 0.45); border-radius: 16px; padding: 16px 18px; }
.finish .tomorrow small { display: block; font-size: var(--t-sm); color: rgba(255, 253, 248, 0.75); margin-bottom: 4px; }
.finish .tomorrow p { font-family: var(--serif); font-size: var(--t-lg); }
.finish .btn { background: #FFFDF8; color: var(--night); }
.finish .scripture sup { color: rgba(255, 253, 248, 0.7); }
.player[data-type="night"] .scripture sup { color: #A9A6C9; }

/* ---------- sheets (menu, settings) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 14, 35, 0.45); z-index: 70; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71;
  max-height: 88%; overflow-y: auto;
  background: var(--bg); color: var(--fg);
  border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(env(safe-area-inset-bottom, 0px) + 24px);
  animation: sheet-in 0.25s ease both;
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 14px; }
.sheet-inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.sheet h2 { font-size: var(--t-xl); }
.sheet h3 { font-size: var(--t-md); font-family: var(--sans); }
.sheet .back { align-self: flex-start; }
.menu-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.menu-list li + li { border-top: 1px solid var(--line); }
.menu-list button {
  width: 100%; min-height: 56px; padding: 0 16px; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; font-weight: 500;
}
.menu-list button small { color: var(--muted); font-weight: 400; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lbl { font-size: var(--t-sm); font-weight: 600; }
.field input, .field select {
  min-height: 50px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface);
}
.field .help { font-size: var(--t-sm); color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.notice { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: var(--t-sm); }
.copyline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copyline code { font-family: var(--sans); font-weight: 600; font-size: var(--t-md); user-select: all; }
.confirm { border: 1.5px solid var(--ember); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.prose { display: flex; flex-direction: column; gap: 12px; color: var(--fg); }
.prose p { line-height: 1.6; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); z-index: 90;
  background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: var(--t-sm);
  max-width: calc(100% - 32px);
}

/* ---------- paths ---------- */
.page-title { font-size: var(--t-2xl); padding-top: 18px; }
.page-lead { color: var(--muted); }
.track {
  border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.track.current { border: 2px solid var(--accent-fill); }
.track-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.track h2 { font-size: var(--t-lg); }
.pill { font-size: var(--t-xs); font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--fg); white-space: nowrap; }
.pill.gold { background: var(--accent-fill); color: var(--ink); }
.pill.done { background: var(--good); color: #FFFDF8; }
.track p { color: var(--muted); font-size: var(--t-sm); }
.bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent-fill); border-radius: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.steps li .mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; }
.steps li.done .mark { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--ink); }
.steps li.next .mark { border-color: var(--fg); }
.steps li .mark svg { width: 13px; height: 13px; }
.steps li small { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: var(--t-xl); font-variant-numeric: tabular-nums; }
.stat span { font-size: var(--t-xs); color: var(--muted); }
.cert { border-radius: var(--radius); padding: 22px; background: var(--surface); border: 1.5px solid var(--accent-fill); text-align: center; display: flex; flex-direction: column; gap: 6px; }
.cert h3 { font-size: var(--t-xl); }

/* ---------- deep dive ---------- */
.collection { display: flex; flex-direction: column; gap: 12px; }
.collection > h2 { font-size: var(--t-xl); }
.collection > p { color: var(--muted); font-size: var(--t-sm); }
details.course { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.course summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
details.course summary::-webkit-details-marker { display: none; }
details.course summary b { display: block; font-family: var(--serif); font-size: var(--t-md); font-weight: 600; }
details.course summary small { color: var(--muted); font-size: var(--t-sm); }
details.course[open] summary { border-bottom: 1px solid var(--line); }
.lessons { list-style: none; margin: 0; padding: 4px 18px 12px; }
.lessons li { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lessons li:last-child { border-bottom: 0; }
.lessons .links { display: flex; gap: 14px; font-size: var(--t-sm); }
.heard { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); }
.heard input { width: 22px; height: 22px; accent-color: var(--accent-fill); }
.linklist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.linklist li + li { border-top: 1px solid var(--line); }
.linklist a, .linklist button { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; color: var(--fg); text-decoration: none; width: 100%; border: 0; background: none; cursor: pointer; text-align: left; font-weight: 500; }
.linklist small { color: var(--muted); font-weight: 400; }
.ext { width: 16px; height: 16px; flex: none; color: var(--muted); }

/* ---------- onboarding ---------- */
.onboard {
  position: fixed; inset: 0; z-index: 80; overflow-y: auto;
  background: var(--bg); color: var(--fg);
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.onboard-inner { max-width: 520px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; gap: 22px; }
.onboard .step { font-size: var(--t-sm); color: var(--muted); }
.onboard h1 { font-size: var(--t-3xl); line-height: 1.05; }
.onboard .lede { font-size: var(--t-lg); line-height: 1.5; color: var(--muted); }
.sun { width: 100%; max-width: 360px; aspect-ratio: 2 / 1; }
.choice {
  display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
  padding: 18px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface);
}
.choice[aria-pressed="true"] { border-color: var(--accent-fill); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-fill) 35%, transparent); }
.choice b { font-family: var(--serif); font-size: var(--t-lg); font-weight: 600; }
.choice span { color: var(--muted); font-size: var(--t-sm); }
.choice .swatch { width: 28px; height: 6px; border-radius: 6px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-sm); }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--accent-fill); flex: none; }
.onboard .spacer { flex: 1; }

/* ---------- reader ---------- */
.reader .scripture { color: var(--fg); }
.reader .scripture sup { color: var(--muted); }
.reader .ch-nav { display: flex; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
@media (min-width: 700px) {
  .card .hook-q { font-size: 3.25rem; }
}
