/* Christian Walk — shared styles for the landing, guide and privacy pages.
   Palette and fonts come from the app itself (lib/features/shared/theme):
   Manrope for UI, Literata for reading, one colour per section. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --bg-2: #eaeef4;
  --surface: #ffffff;
  --ink: #1e293b;
  --muted: #475569;
  --faint: #56657a;
  --line: rgba(15, 23, 42, 0.09);
  --line-strong: rgba(15, 23, 42, 0.16);
  --btn: #1e293b;
  --btn-ink: #ffffff;
  --frame: #0f172a;
  --frame-edge: #334155;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px -12px rgba(15, 23, 42, 0.22);
  --shadow-phone: 0 2px 4px rgba(15, 23, 42, 0.08), 0 30px 60px -24px rgba(15, 23, 42, 0.45);
  --focus: #1e56c4;
  --shot-filter: none;

  /* Section colours: primary / soft background / tint (container) / ink on tint */
  --bible: #b4530f;  --bible-soft: #fef7ee;  --bible-tint: #fbebd6;  --bible-ink: #7a360a;
  --prayer: #1e56c4; --prayer-soft: #f1f5fd; --prayer-tint: #dce7fb; --prayer-ink: #153e8f;
  --rev: #7141c9;    --rev-soft: #f7f3fd;    --rev-tint: #e9dffa;    --rev-ink: #4e2a93;
  --study: #0e7c6b;  --study-soft: #f0f8f6;  --study-tint: #d5efe8;  --study-ink: #0a5a4e;
  --slate: #475569;  --slate-soft: #f8fafc;  --slate-tint: #e2e8f0;  --slate-ink: #1e293b;

  --c: var(--slate); --c-soft: var(--slate-soft); --c-tint: var(--slate-tint); --c-ink: var(--slate-ink);

  --font-ui: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-read: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --gutter: clamp(16px, 4.5vw, 44px);
  --max: 1200px;
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --nav-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1216;
    --bg-2: #151a20;
    --surface: #191d23;
    --ink: #e2e8f0;
    --muted: #a5b4cb;
    --faint: #8d9ab0;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --btn: #e2e8f0;
    --btn-ink: #111418;
    --frame: #05070a;
    --frame-edge: #2b3544;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 36px -14px rgba(0, 0, 0, 0.7);
    --shadow-phone: 0 2px 6px rgba(0, 0, 0, 0.5), 0 34px 70px -26px rgba(0, 0, 0, 0.9);
    --focus: #8db4f2;
    --shot-filter: brightness(0.94);

    --bible: #f0a868;  --bible-soft: #1a1511;  --bible-tint: #3a2a1a;  --bible-ink: #ffd9b0;
    --prayer: #8db4f2; --prayer-soft: #11161f; --prayer-tint: #1c2b45; --prayer-ink: #d6e4ff;
    --rev: #bfa0f0;    --rev-soft: #15111c;    --rev-tint: #2e2245;    --rev-ink: #e8dcff;
    --study: #6fd3c0;  --study-soft: #0f1816;  --study-tint: #173833;  --study-ink: #c8f2e9;
    --slate: #a5b4cb;  --slate-soft: #111418;  --slate-tint: #273244;  --slate-ink: #e2e8f0;
  }
}

.m-bible  { --c: var(--bible);  --c-soft: var(--bible-soft);  --c-tint: var(--bible-tint);  --c-ink: var(--bible-ink); }
.m-prayer { --c: var(--prayer); --c-soft: var(--prayer-soft); --c-tint: var(--prayer-tint); --c-ink: var(--prayer-ink); }
.m-rev    { --c: var(--rev);    --c-soft: var(--rev-soft);    --c-tint: var(--rev-tint);    --c-ink: var(--rev-ink); }
.m-study  { --c: var(--study);  --c-soft: var(--study-soft);  --c-tint: var(--study-tint);  --c-ink: var(--study-ink); }
.m-slate  { --c: var(--slate);  --c-soft: var(--slate-soft);  --c-tint: var(--slate-tint);  --c-ink: var(--slate-ink); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.025em; font-weight: 800; text-wrap: balance; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--prayer-tint); color: var(--ink); }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--btn); color: var(--btn-ink); padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* The four-colour mark, taken from the app's four tabs */
.stripe { display: inline-flex; gap: 3px; vertical-align: middle; }
.stripe i { display: block; width: 14px; height: 4px; border-radius: 2px; }
.stripe i:nth-child(1) { background: var(--bible); }
.stripe i:nth-child(2) { background: var(--prayer); }
.stripe i:nth-child(3) { background: var(--rev); }
.stripe i:nth-child(4) { background: var(--study); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 700 1rem/1.2 var(--font-ui); letter-spacing: -0.005em; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--btn); color: var(--btn-ink); box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.6); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn-primary:hover { box-shadow: 0 14px 26px -12px rgba(15, 23, 42, 0.65); }
}
.btn:active { transform: translateY(0) scale(0.98); }

.link {
  color: var(--c); font-weight: 700; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.3s var(--ease);
  padding-bottom: 2px;
}
.link:hover, .link:focus-visible { background-size: 100% 2px; }
.link .arr { display: inline-block; transition: transform 0.3s var(--ease); }
.link:hover .arr { transform: translateX(4px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--line-strong); opacity: 0; transition: opacity 0.3s;
}
.site-header.scrolled::after { opacity: 1; }
.nav { display: flex; align-items: center; gap: 12px; height: var(--nav-h); }
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand .stripe { margin-left: 2px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a, .lang a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px;
  text-decoration: none; font-weight: 600; font-size: 0.97rem; color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover, .lang a:hover { color: var(--ink); background: var(--bg-2); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.lang { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 2px; }
.lang a {
  min-height: 36px; min-width: 40px; justify-content: center; padding: 0 10px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em;
}
.lang a[aria-current="true"] { background: var(--btn); color: var(--btn-ink); }
.lang a[aria-current="true"]:hover { background: var(--btn); color: var(--btn-ink); }
.nav .btn { min-height: 42px; padding: 8px 18px; font-size: 0.95rem; }
.menu-btn {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink);
  font: 700 0.95rem var(--font-ui); cursor: pointer;
}
.menu-btn .bars { position: relative; width: 16px; height: 10px; }
.menu-btn .bars::before, .menu-btn .bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.3s var(--ease);
}
.menu-btn .bars::before { top: 0; }
.menu-btn .bars::after { bottom: 0; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 760px) {
  .js .menu-btn { display: inline-flex; }
  .js .nav-panel {
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    background: var(--bg); border-bottom: 1px solid var(--line-strong);
    padding: 8px var(--gutter) 20px;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .js .nav-panel.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .js .nav-panel .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .js .nav-panel .nav-links a { font-size: 1.05rem; min-height: 48px; }
  .js .nav-panel .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
  html:not(.js) .nav { flex-wrap: wrap; height: auto; padding: 10px 0; }
  html:not(.js) .nav-panel { width: 100%; }
  html:not(.js) .nav-links { flex-wrap: wrap; }
}
@media (min-width: 761px) {
  .nav-panel { display: flex; align-items: center; gap: 12px; }
  .nav-row { display: flex; align-items: center; gap: 12px; }
}
@media (max-width: 760px) { html:not(.js) .nav-row { display: flex; gap: 12px; align-items: center; margin-top: 6px; } }

/* ---------- Phone frame ---------- */
.phone {
  --w: 280px;
  position: relative; width: var(--w); max-width: 100%;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.14);
  background: var(--frame);
  box-shadow: inset 0 0 0 1.5px var(--frame-edge), var(--shadow-phone);
}
.phone::before, .phone::after { /* side buttons */
  content: ""; position: absolute; right: -2.5px; width: 3px; border-radius: 0 3px 3px 0; background: var(--frame-edge);
}
.phone::before { top: 22%; height: 9%; }
.phone::after { top: 34%; height: 5%; }
.phone .screen {
  position: relative; overflow: hidden;
  border-radius: calc(var(--w) * 0.11);
  aspect-ratio: 640 / 1421;
  background: var(--surface);
}
.phone .screen picture { display: block; width: 100%; height: 100%; }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; filter: var(--shot-filter); }

/* ---------- Hero (landing) ---------- */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(40px, 7vw, 96px); position: relative; overflow-x: clip; }
.hero-grid { display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.hero h1 {
  font-size: clamp(2.45rem, 1.35rem + 4.6vw, 4.7rem);
  letter-spacing: -0.042em; line-height: 1.0;
  margin: 18px 0 22px;
}
.hero h1 .soft { color: var(--muted); }
.hero .lede { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.3rem); color: var(--muted); max-width: 34ch; line-height: 1.55; }
.hero .lede strong { color: var(--ink); font-weight: 700; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta-meta { margin-top: 16px; font-size: 0.9rem; color: var(--faint); }

.hero-stage { position: relative; height: clamp(460px, 118vw, 640px); max-width: 560px; margin: 0 auto; width: 100%; }
@media (min-width: 960px) { .hero-stage { height: 660px; } }
.hero-stage .phone { position: absolute; }
.hero-stage .p1 { --w: clamp(190px, 50vw, 270px); left: 50%; top: 2%; margin-left: calc(var(--w) / -2); z-index: 3; }
.hero-stage .p2 { --w: clamp(150px, 40vw, 220px); left: 0; top: 16%; z-index: 2; --r: -7deg; transform: rotate(-7deg); }
.hero-stage .p3 { --w: clamp(150px, 40vw, 220px); right: 0; top: 20%; z-index: 1; --r: 6deg; transform: rotate(6deg); }
@media (min-width: 560px) { .hero-stage .p2 { left: 2%; } .hero-stage .p3 { right: 2%; } }

@keyframes phone-in {
  from { opacity: 0; transform: translateY(70px) rotate(calc(var(--r, 0deg) * 2)) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) rotate(var(--r, 0deg)) scale(1); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-stage .p1 { animation: phone-in 1.1s var(--ease) 0.15s both; }
  .hero-stage .p2 { animation: phone-in 1.1s var(--ease) 0.35s both; }
  .hero-stage .p3 { animation: phone-in 1.1s var(--ease) 0.5s both; }
  .hero-copy > * { animation: fade-up 0.8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.14s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.22s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.28s; }
}
/* After the entrance, the side phones drift as the page scrolls */
@keyframes drift-l { to { transform: translateY(-60px) rotate(-10deg); } }
@keyframes drift-r { to { transform: translateY(-90px) rotate(9deg); } }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 960px) {
    .hero-stage .drift-l { animation: drift-l linear both; animation-timeline: scroll(root); animation-range: 0 700px; }
    .hero-stage .drift-r { animation: drift-r linear both; animation-timeline: scroll(root); animation-range: 0 700px; }
  }
}
.hero-stage .drift-l, .hero-stage .drift-r { position: absolute; inset: 0; pointer-events: none; }
.hero-stage .drift-l .phone, .hero-stage .drift-r .phone { pointer-events: auto; }

/* The four sections, drawn like the app's tab bar */
.tabbar {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  margin-top: clamp(20px, 4vw, 40px);
}
@media (min-width: 760px) { .tabbar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tabbar a {
  display: block; padding: 20px 20px 22px; background: var(--surface); text-decoration: none;
  position: relative; transition: background-color 0.3s;
}
.tabbar a::before {
  content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--c); transform: scaleX(0.25); transform-origin: left; transition: transform 0.4s var(--ease);
}
.tabbar a:hover { background: var(--c-soft); }
.tabbar a:hover::before, .tabbar a:focus-visible::before { transform: scaleX(1); }
.tabbar .t-name { display: block; font-weight: 800; font-size: 1.1rem; color: var(--c); letter-spacing: -0.02em; }
.tabbar .t-desc { display: block; color: var(--muted); font-size: 0.94rem; line-height: 1.45; margin-top: 4px; }

/* ---------- Section headings ---------- */
.section { padding: clamp(64px, 10vw, 128px) 0; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c);
}
.kicker::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.h2 { font-size: clamp(2rem, 1.2rem + 2.9vw, 3.3rem); letter-spacing: -0.035em; margin-top: 14px; }
.section-intro { max-width: 60ch; color: var(--muted); font-size: 1.12rem; margin-top: 18px; }

/* ---------- Walkthrough ---------- */
.walk { position: relative; }
.walk-head { margin-bottom: clamp(24px, 5vw, 56px); }
.walk-grid { display: grid; gap: 0; }
.step { padding: clamp(40px, 7vw, 64px) 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step h3 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.35rem); letter-spacing: -0.03em; margin: 12px 0 16px; max-width: 18ch; }
.step p { color: var(--muted); max-width: 46ch; font-size: 1.08rem; }
.step p strong { color: var(--ink); font-weight: 700; }
.step .facts { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.step .facts li {
  font-size: 0.88rem; font-weight: 700; color: var(--c-ink); background: var(--c-tint);
  padding: 6px 12px; border-radius: 999px;
}
.step-shot {
  margin-top: 28px; padding: 28px 0 32px; border-radius: var(--radius);
  background: var(--c-soft); display: flex; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--line);
}
.step-shot .phone { --w: min(64vw, 260px); }

.walk-stage { display: none; }
@media (min-width: 960px) {
  .js .walk-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); column-gap: clamp(32px, 5vw, 80px); }
  .js .step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; border-top: 0; padding: 40px 0; }
  .js .step-shot { display: none; }
  .js .walk-stage { display: block; grid-column: 2; grid-row: 1; }
  .js .walk-steps { grid-column: 1; grid-row: 1; }
  .js .step .step-body { position: relative; }
  .js .step .step-body::before {
    content: ""; position: absolute; left: calc(-1 * clamp(16px, 2.4vw, 32px)); top: 4px; bottom: 4px; width: 3px; border-radius: 3px;
    background: var(--c); transform: scaleY(0); transform-origin: top; transition: transform 0.6s var(--ease);
  }
  .js .step.active .step-body::before { transform: scaleY(1); }
}
.stage-sticky {
  position: sticky; top: calc(var(--nav-h) + 3vh);
  height: calc(100vh - var(--nav-h) - 6vh);
  min-height: 560px; max-height: 820px;
  display: flex; align-items: center; justify-content: center;
}
.stage-panel {
  position: absolute; inset: 0; border-radius: 32px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
.stage-panel .tint { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s var(--ease); background: var(--c-soft); }
.stage-panel .tint::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; margin: -280px 0 0 -280px;
  border-radius: 50%; background: var(--c-tint); opacity: 0.7;
}
.stage-panel .tint.on { opacity: 1; }
.stage-phone { position: relative; --w: min(300px, calc((100vh - var(--nav-h) - 6vh - 80px) * 0.45)); }
.stage-phone .screen > * { position: absolute; inset: 0; }
.stage-phone .screen img {
  position: absolute; inset: 0; opacity: 0; transform: scale(1.035);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}
.stage-phone .screen img.on { opacity: 1; transform: none; }
.stage-dots {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0;
}
.stage-dots li { width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: 0.35; transition: transform 0.4s var(--ease), opacity 0.4s; }
.stage-dots li.on { opacity: 1; transform: scale(1.6); }
.stage-label {
  position: absolute; left: 24px; top: 22px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- Privacy band (landing) ---------- */
.privacy-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.privacy-grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: start; }
@media (min-width: 960px) { .privacy-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.privacy-copy p { color: var(--muted); font-size: 1.1rem; max-width: 58ch; }
.privacy-copy p strong { color: var(--ink); }
.ledger { margin: 34px 0 30px; border-top: 1.5px solid var(--ink); }
.ledger-row {
  display: grid; grid-template-columns: 1fr; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line-strong);
}
@media (min-width: 620px) { .ledger-row { grid-template-columns: 11rem minmax(0, 1fr); } }
.ledger-row dt { font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ledger-row dt small { font-weight: 700; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c); }
.ledger-row dd { margin: 0; color: var(--muted); }
.privacy-aside { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.privacy-aside .phone { --w: min(66vw, 270px); }
.privacy-aside figcaption { font-size: 0.92rem; color: var(--muted); text-align: center; max-width: 34ch; }

/* ---------- Details list ---------- */
.details { display: grid; gap: 0; border-top: 1px solid var(--line-strong); margin-top: 40px; }
@media (min-width: 700px) { .details { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; } }
@media (min-width: 1040px) { .details { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.details > div { padding: 22px 0; border-bottom: 1px solid var(--line-strong); }
.details dt { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.015em; }
.details dd { margin: 6px 0 0; color: var(--muted); font-size: 0.99rem; }

/* ---------- Download ---------- */
.download { padding: clamp(64px, 10vw, 120px) 0; }
.download-card {
  position: relative; overflow: hidden;
  border-radius: 32px; background: var(--btn); color: var(--btn-ink);
  padding: clamp(32px, 6vw, 72px);
  display: grid; gap: 36px;
}
@media (min-width: 900px) { .download-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; } }
.download-card .stripe { position: absolute; left: clamp(32px, 6vw, 72px); top: 0; }
.download-card .stripe i { height: 6px; width: 40px; border-radius: 0 0 3px 3px; }
.download-card h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); letter-spacing: -0.04em; }
.download-card p { opacity: 0.8; max-width: 44ch; margin-top: 16px; }
.download-card .btn-primary { background: var(--btn-ink); color: var(--btn); box-shadow: none; }
.download-card .btn-ghost { color: var(--btn-ink); border-color: color-mix(in srgb, var(--btn-ink) 30%, transparent); }
.download-card .btn-ghost:hover { background: color-mix(in srgb, var(--btn-ink) 10%, transparent); }
.install-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.install-steps li {
  counter-increment: s; position: relative; padding: 14px 0 14px 46px;
  border-top: 1px solid color-mix(in srgb, var(--btn-ink) 16%, transparent); font-size: 1rem;
}
.install-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 13px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 0.85rem;
  border: 1.5px solid color-mix(in srgb, var(--btn-ink) 35%, transparent);
}
.install-steps small { display: block; opacity: 0.7; font-size: 0.9rem; margin-top: 2px; }
/* File details under the main download button: small, monospace, selectable */
.apk-meta {
  display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 22px 0 0; max-width: 46ch;
  font: 500 0.8rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.apk-meta div { display: flex; gap: 8px; min-width: 0; }
.apk-meta dt { opacity: 0.65; }
.apk-meta dd { margin: 0; }
.apk-meta .sha { flex-basis: 100%; flex-direction: column; gap: 2px; }
.apk-meta code { font: inherit; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); } }
.footer-verse { font-family: var(--font-read); font-style: italic; font-size: 1.2rem; line-height: 1.5; color: var(--ink); max-width: 30ch; margin: 18px 0 6px; }
.footer-verse-ref { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; }
.site-footer h2 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding: 5px 0; text-decoration: none; color: var(--ink); font-weight: 600; }
.site-footer li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 0.88rem; }

/* ---------- Document pages (guide, privacy) ---------- */
.doc-hero { padding: clamp(36px, 7vw, 88px) 0 clamp(28px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.doc-hero h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.2rem); letter-spacing: -0.042em; margin: 14px 0 18px; }
.doc-hero .lede { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem); color: var(--muted); max-width: 56ch; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; font-size: 0.92rem; color: var(--faint); font-weight: 600; }

.doc { display: grid; gap: 0 clamp(32px, 5vw, 72px); padding-top: clamp(24px, 4vw, 48px); padding-bottom: 40px; }
@media (min-width: 1000px) { .doc { grid-template-columns: 250px minmax(0, 1fr); } }

.toc { position: relative; }
@media (max-width: 999.98px) { html.js:has(.toc) { scroll-padding-top: calc(var(--nav-h) + 80px); } }
/* On phones the contents bar sticks under the header, but only when site.js
   is there to collapse it; without JS it is a plain list at the top. */
@media (max-width: 999.98px) {
  .toc { margin-bottom: 20px; }
  .js .toc { position: sticky; top: calc(var(--nav-h) + 8px); z-index: 20; }
  .js .toc details { box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.5); }
  .js .toc details[open] ol { max-height: min(62vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
}
@media (min-width: 1000px) {
  .toc { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; max-height: calc(100vh - var(--nav-h) - 40px); overflow: auto; padding-bottom: 20px; }
}
.toc details { border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); }
.toc summary {
  list-style: none; cursor: pointer; padding: 14px 18px; font-weight: 800; display: flex; align-items: center; justify-content: space-between;
  min-height: 48px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform 0.3s var(--ease);
}
.toc details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
@media (min-width: 1000px) {
  .toc details { border: 0; background: transparent; }
  .toc summary { padding: 0 0 12px 14px; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); cursor: default; pointer-events: none; min-height: 0; }
  .toc summary::after { display: none; }
}
.toc ol { list-style: none; margin: 0; padding: 0 8px 12px; }
@media (min-width: 1000px) { .toc ol { padding: 0; border-left: 2px solid var(--line); } }
.toc li a {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 12px; text-decoration: none;
  color: var(--muted); font-weight: 600; font-size: 0.95rem; border-radius: 10px; position: relative;
  transition: color 0.2s, background-color 0.2s;
}
.toc li a::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c); flex: none; align-self: flex-start; margin-top: 0.62em; }
.toc li a:hover { color: var(--ink); background: var(--bg-2); }
@media (min-width: 1000px) {
  .toc li a { border-radius: 0 10px 10px 0; margin-left: -2px; border-left: 2px solid transparent; }
  .toc li a.active { color: var(--ink); border-left-color: var(--c); background: var(--c-soft); }
}

.article { min-width: 0; max-width: 740px; }
.g-sec { padding: clamp(40px, 6vw, 64px) 0; border-top: 1px solid var(--line); }
.g-sec:first-child { border-top: 0; padding-top: 12px; }
.g-sec h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); letter-spacing: -0.032em; margin: 12px 0 18px; }
.g-sec h3 { font-size: 1.22rem; letter-spacing: -0.02em; margin: 34px 0 12px; }
.article p, .article li { font-family: var(--font-read); font-size: 1.06rem; line-height: 1.72; }
.article p { margin-bottom: 1.05em; }
.article .intro { font-size: 1.16rem; color: var(--ink); }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.article li { margin: 0.35em 0; padding-left: 0.2em; }
.article ol.steps { list-style: none; counter-reset: st; padding-left: 0; }
.article ol.steps > li { counter-increment: st; position: relative; padding-left: 44px; margin: 0.7em 0; }
.article ol.steps > li::before {
  content: counter(st); position: absolute; left: 0; top: 0.12em; width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center; font: 800 0.85rem var(--font-ui); color: var(--c-ink); background: var(--c-tint);
}
.article li::marker { color: var(--c); }
.article strong { font-weight: 600; }
.article a:not(.btn) { color: var(--c); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.article a:not(.btn):hover { text-decoration-thickness: 2.5px; }
.ui {
  font-family: var(--font-ui); font-weight: 700; font-size: 0.86em; letter-spacing: -0.005em;
  color: var(--c-ink); background: var(--c-tint); padding: 0.12em 0.5em; border-radius: 7px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.note {
  margin: 1.6em 0; padding: 18px 20px 16px; border-radius: 16px; background: var(--c-soft);
  box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px var(--line);
}
.note .note-t { display: block; font: 800 0.76rem var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); margin-bottom: 6px; }
.note p:last-child { margin-bottom: 0; }
.article .note p { font-size: 1rem; }

.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.article table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
.article th, .article td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.article th { font-weight: 800; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); background: var(--bg-2); }
.article td { color: var(--muted); }
.article td:first-child { color: var(--ink); font-weight: 700; white-space: nowrap; }
.article tr:last-child td { border-bottom: 0; }
@media (max-width: 520px) { .article td:first-child { white-space: normal; } }

.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; margin: 30px 0 34px; padding: 26px clamp(14px, 3vw, 28px); border-radius: var(--radius); background: var(--c-soft); box-shadow: inset 0 0 0 1px var(--line); }
@media (min-width: 640px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } .shots.two { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; gap: 24px 40px; } }
.shots.one { grid-template-columns: minmax(0, 230px); justify-content: center; }
@media (max-width: 639.98px) { .shots .shot:last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; width: calc(50% - 8px); justify-self: center; } }
.shot { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.shot .phone { --w: 100%; width: 100%; max-width: 230px; transition: transform 0.4s var(--ease); }
.shot .phone { padding: 3.2%; border-radius: 14%/6.3%; }
.shot .phone .screen { border-radius: 11%/5%; }
@media (hover: hover) { .shot:hover .phone { transform: translateY(-4px); } }
.shot figcaption { font-size: 0.86rem; color: var(--muted); text-align: center; line-height: 1.4; max-width: 24ch; }

.sec-tag { display: inline-flex; align-items: center; gap: 8px; font: 800 0.78rem var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); }
.sec-tag::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.anchor-alias { display: block; height: 0; visibility: hidden; }

.back-top { display: inline-flex; margin-top: 12px; }

/* Privacy document specifics */
.policy .g-sec h2 { font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2rem); }
.policy dl { margin: 0 0 1.2em; }
.policy dt { font-weight: 800; margin-top: 14px; }
.policy dd { margin: 4px 0 0; font-family: var(--font-read); color: var(--muted); line-height: 1.7; }

/* ---------- Scroll reveals ---------- */
/* Content is never hidden by CSS alone. Once the reader starts scrolling,
   site.js marks the .reveal blocks still below the screen as .pending and
   clears each one as it scrolls into view. A page that is never scrolled
   keeps everything visible, and printing shows everything at once. */
.io-reveal .reveal { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.io-reveal .reveal.pending { opacity: 0; transform: translateY(32px); transition: none; }
.io-reveal.reveal-all .reveal { transition: none; }

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

/* ---------- Print ---------- */
@media print {
  .site-header, .toc, .site-footer, .download { display: none; }
  body { background: #fff; color: #000; }
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
}
