/* Ever Near. Light, card-based UI; scripture set in Literata, interface in Figtree. */
:root {
  color-scheme: light;
  --bg: #F3F2EE;
  --surface: #FFFFFF;
  --surface-2: #ECEBE6;
  --ink: #17191F;
  --ink-2: #5E6472;
  --ink-3: #8C919C;
  --line: #E3E2DC;
  --accent: #2F57A4;
  --accent-ink: #FFFFFF;
  --accent-soft: #E7EDF9;
  --gold: #A77B22;
  --gold-soft: #F7EDD5;
  --danger: #B3372B;
  --shadow: 0 1px 2px rgb(23 25 31 / .04), 0 6px 20px rgb(23 25 31 / .06);
  --verse-font: "Literata", Georgia, "Times New Roman", serif;
  --ui-font: "Figtree", "Segoe UI", Roboto, system-ui, sans-serif;
  --radius: 18px;
  --radius-s: 12px;
  --gutter-l: max(18px, env(safe-area-inset-left, 0px));
  --gutter-r: max(18px, env(safe-area-inset-right, 0px));
  --quote-size: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121419; --surface: #1B1E25; --surface-2: #272B34; --ink: #ECEDF1; --ink-2: #A3A9B6; --ink-3: #767D8B; --line: #2C313B;
    --accent: #8CACF0; --accent-ink: #0F1A33; --accent-soft: #202C46; --gold: #DDB660; --gold-soft: #35301F; --danger: #E27B6D;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 6px 20px rgb(0 0 0 / .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121419; --surface: #1B1E25; --surface-2: #272B34; --ink: #ECEDF1; --ink-2: #A3A9B6; --ink-3: #767D8B; --line: #2C313B;
  --accent: #8CACF0; --accent-ink: #0F1A33; --accent-soft: #202C46; --gold: #DDB660; --gold-soft: #35301F; --danger: #E27B6D;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 6px 20px rgb(0 0 0 / .25);
}
:root[data-size="s"] { --quote-size: 18px; }
:root[data-size="l"] { --quote-size: 23px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--ui-font);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, blockquote { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg { flex: none; }

#app { display: flex; flex-direction: column; height: 100%; padding-top: env(safe-area-inset-top, 0px); }
#views { flex: 1; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
#view-read { overflow: hidden; }

/* Tabs */
.tabs {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 4px var(--gutter-r) max(6px, env(safe-area-inset-bottom, 0px)) var(--gutter-l);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 54px; text-decoration: none; color: var(--ink-3); font-size: 12px; font-weight: 600; border-radius: 12px;
}
.tabs a svg { width: 24px; height: 24px; }
.tabs a[aria-current="page"] { color: var(--accent); }
.tabs a[aria-current="page"] svg { stroke-width: 2.4; }

/* Pages and cards */
.page { display: flex; flex-direction: column; gap: 14px; max-width: 36rem; margin-inline: auto; padding: 16px var(--gutter-r) 28px var(--gutter-l); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 2px 2px; }
.page-head h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.sub { color: var(--ink-2); margin-top: 2px; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.streak { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--surface); color: var(--ink-3); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); }
.streak.on { background: var(--gold-soft); color: var(--gold); }
.streak.on svg path { fill: currentColor; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow); }

.card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 22px; line-height: 1.2; font-weight: 700; text-wrap: balance; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.fine { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.quote { font-family: var(--verse-font); font-size: var(--quote-size); line-height: 1.45; text-wrap: pretty; }
.quote.muted { font-family: var(--ui-font); font-size: 15px; }
.cite { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.body { font-size: 16px; line-height: 1.55; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 15px; background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.inline { margin-top: 8px; }
.btn[aria-pressed="true"] svg path { fill: currentColor; }
.btn:disabled { opacity: .6; cursor: default; }
.link { color: var(--accent); font-weight: 600; font-size: 15px; align-self: flex-start; min-height: 36px; text-align: left; }
.link.danger { color: var(--danger); }

.card h3, .sheet-body h3 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.topic { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.callout { display: grid; gap: 4px; background: var(--gold-soft); border-radius: var(--radius-s); padding: 12px 14px; }
.callout h3 { color: var(--gold); margin-top: 0; }
.callout p { font-size: 15px; line-height: 1.5; }
.callout.soft { background: var(--accent-soft); }
.callout.soft h3 { color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter-l) * -1) calc(var(--gutter-r) * -1); padding: 2px var(--gutter-r) 6px var(--gutter-l); }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 14px; border: 1px solid var(--line); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.study .chip, .sheet-body .chip { background: var(--accent-soft); color: var(--accent); border: 0; }

.plan-list { display: grid; gap: 8px; }
.plan-option { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); }
.plan-option b { font-size: 16px; }
.plan-option span { color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.plan-option small { color: var(--accent); font-weight: 600; font-size: 13px; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { display: grid; justify-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); }
.day i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: var(--surface-2); color: var(--accent-ink); }
.day.on i { background: var(--accent); }
.day.today span { color: var(--ink); font-weight: 700; }

.group-title { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.saved-item { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: start; background: var(--surface); border-radius: var(--radius-s); padding: 12px 8px 12px 14px; box-shadow: var(--shadow); }
.saved-item .open { display: grid; gap: 4px; text-align: left; min-width: 0; }
.saved-item .open b { color: var(--accent); font-size: 14px; }
.saved-item .quote { font-size: 17px; }
.saved-item .remove { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: var(--ink-3); }
.empty { align-items: center; text-align: center; padding: 28px 18px; color: var(--ink-2); }
.empty h2 { color: var(--ink); }

/* Reader */
.feed {
  position: absolute; inset: 0;
  overflow-y: scroll; overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-width: none;
  touch-action: pan-y;
}
.feed::-webkit-scrollbar { display: none; }
.feed:focus-visible { outline: none; }
.slide {
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 72px calc(var(--gutter-r) + 58px) 20px calc(var(--gutter-l) + 30px);
  user-select: none;
  -webkit-user-select: none;
}
.pane { height: 100%; max-width: 32rem; margin-inline: auto; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 14px; overflow: hidden; }
.verse { font-family: var(--verse-font); font-weight: 400; line-height: 1.42; text-wrap: pretty; }
.slide .cite { font-size: 15px; color: var(--ink-3); transition: opacity .35s ease; }
.slide.tw-pending .cite { opacity: 0; }
/* Typewriter: the text not typed yet keeps its place, invisible. The caret takes no room, so no line ever moves. */
.tw-off { visibility: hidden; }
.tw-on::after { content: ''; position: absolute; width: 2px; height: 1em; margin: .24em 0 0 1px; border-radius: 1px; background: var(--accent); }
.note { font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.opener { display: grid; gap: 4px; width: 100%; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.opener-kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.opener-title { font-family: var(--verse-font); font-weight: 500; font-size: 30px; line-height: 1.1; }
.opener-meta { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.opener-intro { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-top: 6px; text-wrap: pretty; }

.rail { position: absolute; left: var(--gutter-l); top: 84px; bottom: 44px; width: 28px; pointer-events: none; }
.rail-track { position: absolute; left: 7px; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: var(--line); }
.rail-fill { width: 100%; background: var(--accent); border-radius: 2px; transition: height .25s ease; }
.rail-now { position: absolute; left: -2px; transform: translateY(-50%); min-width: 22px; padding: 1px 5px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; transition: top .25s ease; }
.rail-end { position: absolute; left: -2px; bottom: -4px; transform: translateY(100%); min-width: 22px; text-align: center; font-size: 11px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.rtop { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px var(--gutter-r) 0 var(--gutter-l); pointer-events: none; }
.rtop > * { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; max-width: 62%; padding: 0 10px 0 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: 15px; }
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#r-translation { padding-inline: 14px; font-size: 13px; letter-spacing: .04em; }

.ractions { position: absolute; right: var(--gutter-r); bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.ractions button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 58px; min-height: 58px; color: var(--ink-2); font-size: 11px; font-weight: 600; border-radius: 14px; }
.ractions button svg { width: 26px; height: 26px; }
#r-save[aria-pressed="true"] { color: var(--accent); }
#r-save[aria-pressed="true"] svg path { fill: currentColor; }
.hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 14px; color: var(--ink-3); pointer-events: none; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Sheet and toast */
#scrim { position: fixed; inset: 0; z-index: 20; background: rgb(10 12 18 / .45); }
#sheet {
  position: fixed; z-index: 21; left: 0; right: 0; bottom: 0;
  max-height: 90%;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink);
  border-radius: 22px 22px 0 0;
  padding: 8px var(--gutter-r) max(24px, env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  box-shadow: 0 -8px 40px rgb(0 0 0 / .18);
  animation: rise .22s ease-out;
}
#sheet:focus { outline: none; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; padding: 6px 0 10px; background: var(--surface); }
.sheet-head h2 { grid-column: 2; text-align: center; font-size: 18px; font-weight: 700; }
.sheet-back { grid-column: 1; }
.sheet-close { grid-column: 3; }
.sheet-back, .sheet-close { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.sheet-body { display: flex; flex-direction: column; gap: 12px; max-width: 36rem; margin-inline: auto; }
.settings h3:first-child { margin-top: 0; }

.option-list { display: grid; gap: 8px; }
.option { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--ink); }
.option b { display: block; font-size: 16px; }
.option span { display: block; color: var(--ink-2); font-size: 14px; }
.option[aria-pressed="true"] { outline: 2px solid var(--accent); color: var(--accent); }
.search-wrap { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-3); }
.search { flex: 1; min-width: 0; height: 44px; border: 0; background: none; font: inherit; color: var(--ink); outline: none; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
.book-section { display: grid; }
.book-section .eyebrow { margin: 12px 0 2px; color: var(--accent); font-size: 11px; }
.book-row { display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 8px; min-height: 48px; text-align: left; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.book-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.book-meta { font-size: 13px; }
.book-row.done .book-meta { color: var(--accent); font-weight: 600; }
.book-row.current .book-name { color: var(--accent); }
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.chapter { position: relative; display: grid; place-items: center; height: 56px; border-radius: 12px; background: var(--surface-2); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.chapter.started { box-shadow: inset 0 -3px 0 var(--accent); }
.chapter.done { background: var(--accent-soft); color: var(--accent); }
.chapter.done svg { position: absolute; top: 4px; right: 4px; }
.chapter.current { outline: 2px solid var(--ink); outline-offset: -2px; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.segmented button { min-height: 40px; border-radius: 9px; font-weight: 600; color: var(--ink-2); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; }

#toast {
  position: fixed; z-index: 30; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow);
}

/* Transitions: a loading bar on every navigation, screens and cards that arrive instead of appearing */
#loader { position: fixed; top: 0; left: 0; z-index: 60; height: 3px; width: 0; background: var(--accent); opacity: 0; pointer-events: none; }
#loader.go { animation: load .75s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes load { 0% { width: 0; opacity: 1; } 55% { width: 72%; opacity: 1; } 100% { width: 100%; opacity: 0; } }
.view.enter { animation: viewIn .34s ease .08s both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.view.enter .page > * { animation: cardIn .42s ease both; }
.view.enter .page > :nth-child(1) { animation-delay: .1s; }
.view.enter .page > :nth-child(2) { animation-delay: .17s; }
.view.enter .page > :nth-child(3) { animation-delay: .24s; }
.view.enter .page > :nth-child(4) { animation-delay: .31s; }
.view.enter .page > :nth-child(5) { animation-delay: .38s; }
.view.enter .page > :nth-child(n+6) { animation-delay: .45s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } }
#scrim { animation: fadeIn .22s ease; }
@keyframes fadeIn { from { opacity: 0; } }
#sheet { animation: rise .32s cubic-bezier(.2, .8, .2, 1); }
.btn, .chip, .pill, .ractions button, .tabs a, .plan-option, .topic-card, .chapter, .option, .book-row, .goto-row, .icon-btn, .segmented button {
  transition: transform .12s ease, background-color .18s ease, color .18s ease, opacity .18s ease;
}
.btn:active, .chip:active, .pill:active, .ractions button:active, .plan-option:active, .topic-card:active, .chapter:active, .option:active, .goto-row:active, .icon-btn:active { transform: scale(.96); }
.tabs a:active { transform: scale(.94); }
.btn.big { min-height: 52px; font-size: 16px; width: 100%; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.card.compact { padding: 14px 18px; }

/* Chapter view (running text) */
.chapter-view { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 72px calc(var(--gutter-r) + 58px) 40px var(--gutter-l); }
.chapter-view:focus { outline: none; }
.chapter-inner { max-width: 34rem; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; }
.chapter-inner .opener { text-align: left; border-bottom: 0; padding-bottom: 0; }
.chapter-inner .opener-title { font-size: 34px; }
.chapter-text { font-family: var(--verse-font); font-size: calc(var(--quote-size) + 1px); line-height: 1.62; text-wrap: pretty; }
.v { cursor: pointer; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.v sup { font-family: var(--ui-font); font-size: .6em; font-weight: 700; color: var(--accent); margin-right: .2em; line-height: 0; }
.v.selected { background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.v:focus-visible { outline: 2px solid var(--accent); }
.chapter-nav { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.chapter-nav .btn { flex: 1; }
#r-mode[aria-pressed="true"] { color: var(--accent); }

/* Topics */
.topics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topic-card { display: grid; gap: 3px; text-align: left; padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.topic-card b { font-size: 16px; }
.topic-card span { font-size: 13px; line-height: 1.35; color: var(--ink-3); }
.section-head { display: grid; gap: 2px; padding-top: 10px; }
.section-head h2 { font-size: 20px; font-weight: 700; }
.verse-list { display: grid; }
.verse-item { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.verse-item b { color: var(--accent); font-size: 14px; }
.verse-item .quote { font-size: 18px; }
.chip.more { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }

/* Go to */
.goto-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--accent); color: var(--accent-ink); text-align: left; }
.goto-row b { display: block; font-size: 16px; }
.goto-row small { display: block; font-size: 13px; opacity: .85; }
.chapters.verses .chapter { height: 46px; font-size: 15px; }

/* Address diagram and the guide */
.address { display: flex; align-items: flex-start; justify-content: center; gap: 12px; padding: 16px 12px; border-radius: var(--radius-s); background: var(--surface); box-shadow: var(--shadow); }
.addr-part { display: grid; justify-items: center; gap: 4px; }
.addr-part b { font-family: var(--verse-font); font-size: 30px; line-height: 1; }
.addr-part span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.addr-sep { font-family: var(--verse-font); font-size: 30px; line-height: 1; color: var(--ink-3); }
.how h3 { margin-top: 10px; }
.kinds { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 15px; }
.kinds dt { font-weight: 700; }
.kinds dd { margin: 0; color: var(--ink-2); }

/* Welcome screens */
#onboarding { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); padding-top: env(safe-area-inset-top, 0px); animation: fadeIn .3s ease; }
#onboarding.out { animation: fadeOut .26s ease forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.ob-top { display: flex; justify-content: space-between; align-items: center; padding: 10px var(--gutter-r) 0 var(--gutter-l); min-height: 48px; }
.ob-top b { font-size: 15px; color: var(--ink-2); }
.ob-track { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ob-track::-webkit-scrollbar { display: none; }
.ob-screen { flex: none; width: 100%; height: 100%; overflow-y: auto; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 24px var(--gutter-r) 24px var(--gutter-l); max-width: 36rem; margin-inline: auto; }
.ob-screen h1 { font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.ob-card { display: grid; gap: 8px; padding: 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin-top: 6px; }
.ob-actions { display: grid; gap: 8px; margin-top: 8px; }
.ob-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px var(--gutter-r) max(20px, env(safe-area-inset-bottom, 0px)) var(--gutter-l); }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: background-color .2s, width .2s; }
.ob-dots i.on { width: 22px; background: var(--accent); }

/* The request for a contribution, and what stays dimmed behind it */
.pw { display: grid; gap: 12px; }
.pw-body { font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.pw-plan { display: flex; justify-content: center; width: 100%; text-decoration: none; }
.pw-fine { font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.pw-free { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pw-skip { min-height: 44px; font-size: 15px; font-weight: 600; color: var(--ink-3); }
.view.blurred { filter: blur(7px); opacity: .55; pointer-events: none; }
.locked-preview { display: grid; cursor: pointer; }
.locked-inner { display: grid; gap: inherit; filter: blur(5px); opacity: .55; pointer-events: none; user-select: none; }
.locked-preview, .locked-inner { gap: 14px; }

/* First-visit tips: the rest of the screen dims around the place being explained */
#tips { position: fixed; inset: 0; z-index: 40; overflow: hidden; touch-action: none; animation: tipsIn .28s ease; }
#tips.out { animation: fadeOut .22s ease forwards; pointer-events: none; }
@keyframes tipsIn { from { opacity: 0; } }
.tip-hole {
  position: absolute; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 2px rgb(255 255 255 / .55), 0 0 0 100vmax rgb(10 12 18 / .62);
  transition: left .32s cubic-bezier(.2, .8, .2, 1), top .32s cubic-bezier(.2, .8, .2, 1), width .32s cubic-bezier(.2, .8, .2, 1), height .32s cubic-bezier(.2, .8, .2, 1);
}
.tip {
  position: absolute; width: min(340px, calc(100vw - 24px)); padding: 16px 16px 12px;
  display: grid; gap: 6px; border-radius: var(--radius); background: var(--surface); color: var(--ink);
  box-shadow: 0 10px 34px rgb(0 0 0 / .32);
  transition: opacity .17s ease, transform .17s ease, left .32s cubic-bezier(.2, .8, .2, 1), top .32s cubic-bezier(.2, .8, .2, 1);
}
.tip:focus { outline: none; }
.tip.swap { opacity: 0; transform: translateY(4px); }
.tip h2 { font-size: 18px; line-height: 1.25; font-weight: 700; }
.tip p { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.tip-foot { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.tip-count { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.tip-skip { min-height: 44px; padding: 0 14px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.tip-foot .btn { min-height: 44px; padding-block: 0; }
.tip-arrow { position: absolute; width: 14px; height: 14px; margin-left: -7px; background: var(--surface); transform: rotate(45deg); border-radius: 2px; }
.tip-arrow[data-side="up"] { top: -6px; }
.tip-arrow[data-side="down"] { bottom: -6px; }
.tip-arrow[data-side="none"] { display: none; }

@media (prefers-reduced-motion: reduce) {
  #tips, #tips.out { animation: none; }
  .tip, .tip-hole { transition: none; }
  #sheet, #scrim, .view.enter, .view.enter .page > *, #loader.go, #onboarding, #onboarding.out { animation: none; }
  .hint { animation: none; }
  .rail-fill, .rail-now { transition: none; }
  .btn, .chip, .pill, .ractions button, .tabs a { transition: none; }
}
