/* GrihLekha website. Premium home redesign (2026-10-29): phone bezels, khata-page backdrops, bento features, FAQ, ink-band finale.
   Legal pages share this file; home-only parts sit under their own section classes. */

:root {
  color-scheme: light;
  --bg: #F7F1DF;
  --surface: #FDFAF1;
  --surface-alt: #EEE6D1;
  --border: #CED0BE;
  --card-edge: #CED0BE;
  --control-outline: #6E8168;
  --text: #072311;
  --text-2: #223C28;
  --muted: #485846;
  --primary: #1F6A19;
  --on-primary: #FAF7EC;
  --primary-text: #186012;
  --primary-soft: #D5E9C7;
  --accent: #1F6A19;
  --accent-text: #186012;
  --focus: #1F6A19;
  --success: #0B5D2A;
  --success-soft: #D0EED5;
  --warning: #8F4D00;
  --warning-soft: #FAE4C7;
  --danger: #A52C18;
  --danger-soft: #FEE0D8;
  --info: #1E5C7B;
  --info-soft: #D8EBF6;

  /* The ink band. */
  --band: #072311;
  --on-band: #F7F1DF;
  --qr-paper: #FDFAF1;
  --chat: #DDEBCB;
  --grain: url("assets/paper-grain.png");
  --shadow: none;
  --shadow-lg: none;

  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: Vollkorn, ui-serif, Georgia, serif;
  --display-weight: 600;
  --tracking-display: -.012em;

  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 16px;
  --r-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Home page only: device frame, lift shadows, ledger-page rules. */
  --frame: #0E1A10;
  --lift: 0 1px 0 rgba(7, 35, 17, .04), 0 18px 40px -18px rgba(7, 35, 17, .28), 0 50px 90px -40px rgba(7, 35, 17, .35);
  --lift-sm: 0 1px 2px rgba(7, 35, 17, .06), 0 10px 24px -12px rgba(7, 35, 17, .22);
  --rule: #E6DDC5;
  --margin-line: #E7B3A6;
  --on-band-danger: #F2998A;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0F1610;
    --surface: #162018;
    --surface-alt: #1F2A20;
    --border: #2F3830;
    --card-edge: #2F3830;
    --control-outline: #748670;
    --text: #F1EBD9;
    --text-2: #CFCBB5;
    --muted: #ABB299;
    --primary: #B2D994;
    --on-primary: #05210E;
    --primary-text: #B2D994;
    --primary-soft: #21371C;
    --accent: #B2D994;
    --accent-text: #B2D994;
    --focus: #B2D994;
    --success: #89DA9B;
    --success-soft: #15301B;
    --warning: #F0BD7D;
    --warning-soft: #3A2710;
    --danger: #F2998A;
    --danger-soft: #3C201B;
    --info: #92C6E5;
    --info-soft: #172C38;

    --band: #21371C;
    --on-band: #F1EBD9;
    --chat: #21371C;

    --frame: #26332A;
    --lift: 0 18px 40px -18px rgba(0, 0, 0, .55), 0 50px 90px -40px rgba(0, 0, 0, .7);
    --lift-sm: 0 10px 24px -12px rgba(0, 0, 0, .5);
    --rule: #1D281E;
    --margin-line: #4A2C25;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  /* Paper with a fine grain, as every screen of the app is printed on. */
  background: var(--bg) var(--grain) repeat;
  background-size: 80px;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
img { display: block; max-width: 100%; }
/* Line icons: a <use>d symbol inherits from the <svg> using it, not from the sprite. */
svg { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.store__logo { stroke: none; fill: currentColor; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-md); }
::selection { background: color-mix(in oklab, var(--primary) 22%, transparent); }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
@media (min-width: 768px) { .wrap { width: min(1160px, 100% - 48px); } }

/* Tones: one class sets a colour pair that chips, pills and tiles read. */
.tone-primary { --tone: var(--primary-text); --tone-soft: var(--primary-soft); }
.tone-success { --tone: var(--success); --tone-soft: var(--success-soft); }
.tone-warning { --tone: var(--warning); --tone-soft: var(--warning-soft); }
.tone-danger  { --tone: var(--danger);  --tone-soft: var(--danger-soft); }
.tone-info    { --tone: var(--info);    --tone-soft: var(--info-soft); }

/* ---------- Type ---------- */

.h1, .h2, .doc h1, .doc h2, .waitlist__done h3, .brand { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); }
.h1 { font-size: clamp(42px, 6vw, 80px); line-height: 1; letter-spacing: -.022em; margin: 18px 0 22px; }
.h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -.018em; margin: 14px 0 16px; }

/* Small label above a section heading. */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--primary-text); }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.band .eyebrow { color: color-mix(in srgb, var(--on-band) 72%, transparent); }

/* A real screen inside a phone bezel. Wraps one .shot or a .shots stack. */
.device { position: relative; z-index: 1; width: fit-content; padding: 9px; border-radius: 46px; background: var(--frame); box-shadow: var(--lift), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.device .shot { border-radius: 37px; outline: 0; }
.band .device { background: color-mix(in srgb, var(--on-band) 12%, var(--band)); }
/* Money in the app's figure face: Vollkorn, lining and tabular so amounts line up. */
.settle__total b, .bars__top b {
  font-family: var(--font-display); font-weight: var(--display-weight); font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0;
}
.lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--text-2); max-width: 58ch; }


/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: var(--r-pill); border: 0; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s;
}
.btn--primary { color: var(--on-primary); background: var(--primary); }
.btn--primary:hover { filter: brightness(1.1); }
.btn--primary:active { transform: translateY(1px); filter: brightness(.95); }

/* The Play button stays hidden until PLAY_URL is set in main.js; until then the waitlist form is the call to action. */
.stores { display: none; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
[data-play="live"] .stores { display: flex; }
[data-play="live"] .waitlist { display: none; }
.store {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 24px 0 16px; border-radius: var(--r-pill);
  background: var(--band); color: var(--on-band); text-decoration: none;
  border: 1px solid var(--border);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.store__logo { width: 26px; height: 26px; }
.store__text { display: flex; flex-direction: column; line-height: 1.12; }
.store__text small { font-size: 12px; font-weight: 500; opacity: .85; }
.store__text b { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.store[href]:hover { transform: translateY(-2px); }
@media (max-width: 440px) {
  .stores { gap: 10px; }
  .store { height: 52px; gap: 9px; padding: 0 16px 0 11px; }
  .store__logo { width: 22px; height: 22px; }
  .store__text small { font-size: 11px; }
  .store__text b { font-size: 16px; }
}
[data-play="live"][data-os="android"] .store--play { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent); }

/* ---------- Waitlist form ---------- */

.waitlist { margin-top: 30px; max-width: 520px; }
.waitlist [hidden] { display: none !important; }
.waitlist__label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.waitlist__row { display: flex; flex-wrap: wrap; gap: 10px; }
.waitlist input[type="email"], .waitlist input[type="text"], .waitlist select {
  height: 48px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--control-outline); background: var(--surface); color: var(--text);
  font: inherit; font-size: 16px;
}
.waitlist input[type="email"] { flex: 1 1 220px; min-width: 0; }
.waitlist .btn { height: 48px; white-space: normal; text-align: center; line-height: 1.2; }
.waitlist .btn[disabled], .doc__form .btn[disabled] { background: var(--surface-alt); color: var(--muted); cursor: progress; }
.waitlist__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.waitlist__status { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--danger); }
.waitlist__micro { margin-top: 12px; font-size: 14px; color: var(--text-2); }
.waitlist__consent { margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.waitlist__consent a { color: var(--primary-text); }
.waitlist__done { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.waitlist__done h3 { margin: 0 0 6px; font-size: 24px; }
.waitlist__done p { color: var(--text-2); overflow-wrap: anywhere; }
.waitlist__extra { display: grid; gap: 6px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.waitlist__extra p { margin-bottom: 8px; font-size: 14px; }
.waitlist__extra label { margin-top: 6px; font-size: 14px; font-weight: 600; }
.waitlist__actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.waitlist__skip { padding: 8px 4px; border: 0; background: none; color: var(--primary-text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.waitlist__thanks { margin-top: 14px; }

/* ---------- Header ---------- */

.header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border-color: var(--border);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: var(--r-lg); }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { white-space: nowrap; padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-size: 15px; font-weight: 500; text-decoration: none; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--surface-alt); }
.nav a:active { background: var(--border); }
.header .btn { margin-left: 8px; }
/* EN | हिं: the page's language. Its Hindi uses the phone's own Devanagari font, so English visitors download none. */
.lang { display: inline-flex; flex: none; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.lang button {
  min-width: 36px; height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-pill); background: none; cursor: pointer;
  font: 600 13px/1 var(--font-body); letter-spacing: .02em; color: var(--text-2); transition: background .2s, color .2s;
}
.lang button[lang="hi"] { font-size: 15px; letter-spacing: 0; }
.lang button:hover { color: var(--text); }
.lang [aria-pressed="true"] { background: var(--primary); color: var(--on-primary); cursor: default; }
html:not(.js) .lang { display: none; }
/* 1000px, not 880: the language switch takes room, and the Hindi links are wider. */
@media (max-width: 1000px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .header .btn { height: 40px; padding: 0 16px; }
}
@media (max-width: 420px) {
  .header__inner { gap: 10px; }
  .header .btn { margin-left: 0; padding: 0 14px; }
  .brand { font-size: 21px; gap: 8px; }
  .lang button { min-width: 32px; padding: 0 8px; }
}

.pill { display: inline-flex; align-items: center; gap: .35em; padding: .25em .7em; border-radius: 2em; font-size: .74em; font-weight: 700; background: var(--tone-soft); color: var(--tone); white-space: nowrap; }
.pill svg { width: 1.2em; height: 1.2em; stroke-width: 2.6; }

/* ---------- Real screens ---------- */
/* Captured from the app by app/test/screens/web_capture_test.dart; web/scripts/screens.py makes the WebP files.
   Light and dark come from the app's own two themes, picked by the visitor's setting. */

.shot {
  --pw: 300px;
  display: block; width: var(--pw); border-radius: 28px; overflow: hidden; background: var(--bg);
  outline: 1px solid color-mix(in srgb, var(--text) 10%, transparent); outline-offset: -1px;
}
@media (max-width: 420px) { .shot { --pw: 262px; } }
.shot img { display: block; width: 100%; height: auto; }

/* Several screens in one place: one shows at a time once the script runs; without it they stack. */
.shots { display: grid; gap: 24px; justify-items: center; }
[data-os] .shots > * { grid-area: 1 / 1; transition: opacity .4s, visibility .4s; }
[data-os] .shots > :not(.is-on) { opacity: 0; visibility: hidden; }


/* ---------- Sections ---------- */

.section { position: relative; padding: clamp(56px, 7.5vw, 96px) 0; }
.section--tint { background: color-mix(in srgb, var(--surface-alt) 60%, transparent); }
.section__head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 60px); text-align: center; }
.section__head .lead { margin-inline: auto; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Email and button in one pill. Generic: the download form can use it too. */
.waitlist__row--pill {
  flex-wrap: nowrap; gap: 6px; padding: 5px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--control-outline); box-shadow: var(--lift-sm);
}
.waitlist .waitlist__row--pill input[type="email"] { height: 48px; padding: 0 8px 0 18px; border: 0; border-radius: var(--r-pill); background: transparent; }
.waitlist__row--pill .btn { flex: none; padding: 0 24px; }
/* The ring moves from the input to the whole pill. Browsers without :has() keep the input's own ring. */
@supports selector(:has(*)) {
  .waitlist__row--pill input:focus-visible { outline: 0; }
  .waitlist__row--pill:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
}
@media (max-width: 340px) {
  .waitlist__row--pill { flex-wrap: wrap; border-radius: 28px; }
  .waitlist__row--pill .btn { flex: 1 1 100%; }
}

/* ---------- Facts strip ---------- */

.facts { padding-bottom: clamp(16px, 3vw, 32px); }
.facts__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid var(--border); }
.facts__list li { display: grid; align-content: start; gap: 8px; padding: 22px 16px; }
.facts__list li:nth-child(odd) { padding-left: 0; }
.facts__list li:nth-child(even) { border-left: 1px solid var(--border); }
.facts__list li:nth-child(n+3) { border-top: 1px solid var(--border); }
@media (min-width: 760px) {
  .facts__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts__list li:nth-child(n) { padding: 30px 28px; border-top: 0; }
  .facts__list li:first-child { padding-left: 0; }
  .facts__list li + li { border-left: 1px solid var(--border); }
}
.facts__fig {
  font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(40px, 4.6vw, 60px);
  line-height: 1; letter-spacing: -.02em; color: var(--primary-text); font-variant-numeric: lining-nums;
}
.facts__fig small { font-size: .4em; letter-spacing: 0; color: var(--text); }
.facts__list span { font-size: 14.5px; line-height: 1.45; color: var(--text-2); }

/* ---------- Sticky bar (phones only) ---------- */
/* Slots in where the old "Sticky bar" block was. */

.sticky {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  box-shadow: var(--lift-sm);
  transform: translateY(calc(100% + 32px)); transition: transform .45s var(--ease);
}
.sticky.is-on { transform: none; }
.sticky img { width: 34px; height: 34px; border-radius: 50%; }
.sticky b { display: block; font-size: 15px; line-height: 1.2; }
.sticky span { min-width: 0; line-height: 1.3; }
.sticky small { color: var(--muted); font-size: 12.5px; }
.sticky .btn { margin-left: auto; height: 42px; }
@media (min-width: 761px) { .sticky { display: none; } }
@media (prefers-reduced-motion: reduce) { .sticky { transition: none; } }

/* Section head, editorial: eyebrow and heading on the left, the lead on the right. */
.split-head { display: grid; gap: 0 56px; margin-bottom: clamp(36px, 5vw, 64px); }
.split-head .h2 { max-width: 15ch; }
@media (min-width: 900px) {
  .split-head { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; }
  .split-head .h2 { margin-bottom: 0; }
  .split-head .lead { padding-bottom: 6px; }
}


/* Features: a bento of six. Wide cards put the words left and the app piece right. */
.bento { display: grid; gap: 18px; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.feature {
  display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--card-edge);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--lift-sm); border-color: color-mix(in srgb, var(--control-outline) 60%, var(--card-edge)); }
.feature__text { padding: clamp(24px, 3vw, 32px); }
.feature h3 { margin: 20px 0 8px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 24px; line-height: 1.2; letter-spacing: var(--tracking-display); }
.feature p { color: var(--text-2); font-size: 15.5px; }
.feature--wide h3 { font-size: clamp(24px, 2.2vw, 28px); }
/* The app piece sits on a dotted stage that runs to the card's edges. */
.feature__stage {
  display: grid; align-content: center; padding: clamp(20px, 3vw, 32px);
  border-top: 1px solid var(--border);
  background: radial-gradient(color-mix(in srgb, var(--text) 10%, transparent) 1px, transparent 1.6px) 0 0 / 18px 18px, color-mix(in srgb, var(--surface-alt) 70%, var(--surface));
}
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature--wide { grid-column: span 2; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); grid-template-rows: none; }
  .feature--wide .feature__text { align-self: center; }
  .feature--wide .feature__stage { border-top: 0; border-left: 1px solid var(--border); padding-inline: clamp(28px, 3.4vw, 48px); }
}

.chip-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--tone-soft); color: var(--tone); }
.chip-icon svg { width: 22px; height: 22px; }

/* Small app pieces shown inside the cards */
.mini, .chat { font-size: 13px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--lift-sm); }
.mini { display: grid; gap: 8px; }
.mini svg { width: 1.3em; height: 1.3em; }

.chat { display: grid; gap: 10px; }
.chat__bubble { position: relative; justify-self: end; max-width: 94%; padding: 10px 12px 6px; border-radius: 16px 4px 16px 16px; background: var(--chat); }
.chat__bubble p { font-size: 13.5px; color: var(--text); }
.chat__link { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; padding: 9px 11px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--primary-text); font-weight: 700; }
.chat__link svg { width: 1.2em; height: 1.2em; }
.chat__bubble small { display: block; text-align: right; color: var(--muted); font-size: 10.5px; }
.chat__status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 12px; background: var(--tone-soft); color: var(--tone); font-size: 13px; font-weight: 600; }
.chat__status svg { width: 1.2em; height: 1.2em; stroke-width: 2.6; }

.auto { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--text); }
.auto li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--lift-sm); }
.auto li:last-child { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.auto svg { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); }
.auto span { font-weight: 600; }
.auto small { margin-left: 8px; font-weight: 400; color: var(--muted); }
.auto b { color: var(--danger); font-family: var(--font-display); font-weight: var(--display-weight); font-size: 16px; font-variant-numeric: lining-nums tabular-nums; }
.auto li:last-child svg { background: var(--surface); }
.auto li:not(:last-child) { opacity: .8; }

.settle { gap: 10px; font-size: 14px; }
.settle div { display: flex; justify-content: space-between; align-items: baseline; }
.settle span { color: var(--muted); }
.settle b { font-variant-numeric: tabular-nums; }
.settle__minus { color: var(--success); }
.settle__total { padding-top: 10px; border-top: 1px dashed var(--control-outline); }
.settle__total span { color: var(--text); font-weight: 700; }
.settle__total b { font-size: 26px; color: var(--danger); }

.sync { gap: 12px; }
.sync__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.sync__arrow { color: var(--muted); }
.sync__cloud { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.sync__cloud svg { color: var(--success); }

.props { list-style: none; margin: 0; gap: 16px; padding: 18px; }
.props li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 8px; }
.props b { font-size: 14px; }
.props small { color: var(--muted); font-size: 12px; }
.props i { grid-column: 1 / -1; position: relative; height: 8px; border-radius: 8px; background: var(--border); overflow: hidden; }
.props i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: var(--primary); }
.props .props__room { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--control-outline); font-weight: 600; font-size: 13.5px; }
.props__room svg { color: var(--info); }
.props__room .pill { margin-left: auto; font-size: 12px; }

.bars { gap: 10px; padding: 18px; }
.bars__top { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); }
.bars__top b { color: var(--text); font-size: 22px; }
.bars__cols { display: flex; align-items: flex-end; gap: 8px; height: 72px; padding-bottom: 1px; border-bottom: 1px solid var(--border); }
.bars__cols i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--primary) 22%, var(--surface)); }
.bars__cols .is-on { background: var(--primary); }
.bars__x { display: flex; gap: 8px; color: var(--muted); font-size: 11px; }
.bars__x span { flex: 1; text-align: center; }
.bars__pdf { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 9px 12px; border-radius: 10px; background: var(--surface-alt); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; }
.bars__pdf svg { color: var(--danger); }
.bars__pdf .bars__share { margin-left: auto; color: var(--primary-text); }

/* Private by design: the trust strip closing the features. */
.trust {
  display: grid; gap: 28px; margin-top: clamp(28px, 4vw, 40px); padding: clamp(26px, 4vw, 44px); border-radius: 22px;
  background: color-mix(in srgb, var(--primary-soft) 40%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--card-edge));
}
@media (min-width: 900px) { .trust { grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 48px; align-items: center; } }
.trust__mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary); color: var(--on-primary); }
.trust__mark svg { width: 24px; height: 24px; }
.trust__title { margin: 18px 0 8px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(26px, 2.6vw, 32px); line-height: 1.1; letter-spacing: var(--tracking-display); }
.trust__head p { color: var(--text-2); }
.trust__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--primary-text); font-weight: 600; text-underline-offset: 3px; }
.trust__link svg { transition: translate .25s var(--ease); }
.trust__link:hover svg { translate: 3px 0; }
.trust__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 560px) { .trust__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.trust__list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px; align-content: start; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--card-edge); }
.trust__icon { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--success-soft); color: var(--success); }
.trust__icon svg { width: 20px; height: 20px; }
.trust__list b { font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.trust__list li > span:last-child { color: var(--text-2); font-size: 14.5px; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .feature:hover { transform: none; }
  .trust__link svg { transition: none; }
}

/* Lekha: the ink band, her three steps across, each a real screen in a phone; on narrower screens they scroll sideways. */
.band { --glow: rgb(178 217 148 / .2); background: var(--band); color: var(--on-band); overflow: hidden; isolation: isolate; }
/* A soft light from the top corner, so the phones sit in a pool of green. */
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 55% at 88% 0%, var(--glow), transparent 70%),
              radial-gradient(45% 40% at 50% 100%, rgb(178 217 148 / .1), transparent 70%);
}
.band .lead, .band p { color: color-mix(in srgb, var(--on-band) 78%, transparent); }
.band :focus-visible { outline-color: var(--on-band); }
.band__head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 60px); }


.lekha { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.lekha li { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; }
.lekha h3 { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 600; }
.lekha p { margin-bottom: 20px; }
.lekha .tour__num { background: color-mix(in srgb, var(--on-band) 10%, transparent); border-color: color-mix(in srgb, var(--on-band) 30%, transparent); color: var(--on-band); }
.lekha .device { width: min(100%, 318px); box-shadow: 0 30px 60px -28px rgb(0 0 0 / .65), inset 0 0 0 1px rgb(255 255 255 / .08); }
.lekha .device .shot { width: 100%; }
@media (min-width: 980px) {
  /* A thin line runs from each step's number to the next. */
  .lekha li:not(:last-child) h3::after { content: ""; flex: 1; height: 1px; margin-right: -20px; background: linear-gradient(to right, color-mix(in srgb, var(--on-band) 30%, transparent), color-mix(in srgb, var(--on-band) 8%, transparent)); }
}
@media (max-width: 979px) {
  /* The row runs to the screen's edges and scrolls on its own; the page never does. */
  .lekha {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(318px, 80vw); overflow-x: auto; scroll-snap-type: x mandatory;
    --gutter: 16px; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 40px; scroll-padding-inline: var(--gutter);
  }
  .lekha li { scroll-snap-align: start; }
}
/* Same gutter as .wrap. */
@media (min-width: 768px) and (max-width: 979px) { .lekha { --gutter: 24px; } }

/* How it works: three steps beside a phone that plays them. Phones put the phone between the
   heading and the steps, and show only the playing step's line. */
.tour { display: grid; gap: 28px; grid-template-areas: "head" "visual" "steps"; }
.tour__head { grid-area: head; text-align: center; }
.tour__head .lead { margin-inline: auto; }
.tour__visual { grid-area: visual; position: relative; isolation: isolate; display: grid; place-items: center; padding: 32px 0; }
/* Behind the phone: a page from the rent book, ruled, with its red margin line, in a soft green light. */
.tour__visual::before, .tour__visual::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.tour__visual::after { inset: -10% -20%; background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 20%, transparent), transparent); }
/* Behind the More phone: a plain green disc. */
#more .tour__visual::before { width: min(440px, 100%); aspect-ratio: 1; border-radius: 50%; background: var(--primary-soft); opacity: .7; }
.tour__steps { grid-area: steps; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; max-width: 520px; justify-self: center; }
@media (min-width: 980px) {
  .tour { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head visual" "steps visual"; column-gap: 72px; row-gap: 20px; }
  .tour__head { align-self: end; text-align: left; }
  .tour__head .lead { margin-inline: 0; }
  .tour__steps { align-self: start; justify-self: start; }
}
.tour__step {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start;
  width: 100%; padding: 18px 20px 20px; border-radius: var(--r-xl); border: 1px solid transparent; background: transparent;
  font: inherit; color: inherit; text-align: left; cursor: pointer; transition: background .3s, border-color .3s, box-shadow .3s;
}
.tour__step:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.tour__step:active { background: var(--surface-alt); }
.tour__step.is-on { background: var(--surface); border-color: var(--card-edge); box-shadow: var(--lift-sm); }
.tour__num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-family: var(--font-display); font-weight: var(--display-weight); font-size: 18px; font-variant-numeric: lining-nums;
  transition: background .3s, color .3s, border-color .3s, box-shadow .3s;
}
.tour__step.is-on .tour__num { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 14%, transparent); }
.tour__text b { display: block; font-size: 17px; font-weight: 600; color: var(--text-2); }
.tour__step.is-on .tour__text b { color: var(--text); }
.tour__text small { display: block; margin-top: 3px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
@media (max-width: 979px) { .tour__step:not(.is-on) small { display: none; } }

/* More: the same steps-beside-a-phone layout as How it works, phone on the left; the open tab carries a green bar on its left edge. */
.tour--flip .tour__step { grid-template-columns: minmax(0, 1fr); padding-left: 24px; }
.tour--flip .tour__step::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); scale: 1 0; transition: scale .35s var(--ease);
}
.tour--flip .tour__step.is-on::before { scale: 1 1; }
@media (min-width: 980px) {
  .tour--flip { grid-template-areas: "visual head" "visual steps"; }
}

@media (prefers-reduced-motion: reduce) {
  .tour__step, .tour__step::before, .tour__num { transition: none; }
}

/* ---------- why ---------- */
/* Why: a before/after wipe. The old rent diary sits on top of the same month in GrihLekha,
   cut off at --x (0% all app, 100% all notebook). script.js moves --x; without it the line rests at 50%. */
.wipe {
  --x: 50%;
  --line: 40px;            /* ruled-line spacing; every diary line of text is one rule tall */
  --gutter: 64px;          /* the double red margin */
  --ink: #213F8F;          /* blue ballpoint */
  --pen: #B3261E;          /* red pen */
  --pencil: #6A6559;
  --paper: #FBF5E2;
  --paper-rule: #CBD5E6;
  --leaf: #B2D994;         /* the app's leaf green, as on its dark card */
  position: relative;
}
@media (prefers-color-scheme: dark) {
  .wipe {
    --ink: #A9BEF2;
    --pen: #F2998A;
    --pencil: #ABA694;
    --paper: #1B221B;
    --paper-rule: #2B3644;
  }
}

.wipe__stage {
  position: relative; display: grid; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--card-edge); box-shadow: var(--lift);
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  touch-action: pan-y; cursor: ew-resize;
}
.wipe__layer { grid-area: 1 / 1; position: relative; display: grid; grid-template-areas: "main" "side"; gap: 28px; align-content: start; }
.diary__main, .ledger__main { grid-area: main; min-width: 0; }
.diary__notes, .ledger__perks { grid-area: side; min-width: 0; }

/* Corner labels ride inside their layer, so the line cuts them too. */
.wipe__tag {
  position: absolute; top: 16px; z-index: 1;
  padding: 5px 12px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.4;
}
.diary .wipe__tag { font-family: var(--font-body); }
.diary .wipe__tag { left: 16px; color: var(--text-2); background: color-mix(in srgb, var(--surface-alt) 92%, transparent); box-shadow: 0 0 0 1px var(--border); }
.ledger .wipe__tag { right: 16px; color: var(--on-primary); background: var(--primary); }

/* ---------- Before: the diary page ---------- */
.diary {
  z-index: 1;
  clip-path: inset(0 calc(100% - var(--x)) 0 0);
  padding: calc(var(--line) * 2) 40px var(--line) calc(var(--gutter) + 24px);
  font-family: Kalam, "Segoe Print", cursive; color: var(--ink);
  background:
    radial-gradient(circle at 86% 16%, transparent 52px, color-mix(in srgb, #8B5A2B 16%, transparent) 53px 56px, transparent 58px),
    radial-gradient(ellipse at 12% 92%, color-mix(in srgb, #8B5A2B 9%, transparent), transparent 30%),
    linear-gradient(to right, transparent calc(var(--gutter) - 5px), var(--margin-line) 0 calc(var(--gutter) - 4px), transparent 0 var(--gutter), var(--margin-line) 0 calc(var(--gutter) + 1px), transparent 0),
    repeating-linear-gradient(transparent 0 calc(var(--line) - 1px), var(--paper-rule) 0 var(--line)) 0 6px,
    var(--paper) var(--grain);
  background-size: auto, auto, auto, auto, 80px;
}
.diary p { line-height: var(--line); rotate: var(--r, 0deg); }
.diary__head { font-size: 26px; font-weight: 700; text-decoration: underline 2px; text-underline-offset: 6px; }
.diary__row { font-size: 22px; }
.diary__amt { white-space: nowrap; }
.diary__room { display: inline-block; min-width: 2.2em; color: var(--pencil); }
.diary__red { color: var(--pen); font-weight: 700; }
.diary__ring { padding: 0 6px; border: 2px solid var(--pen); border-radius: 50% 44% 52% 40%; }
.diary__pencil { color: var(--pencil); }
span.diary__pencil { font-size: .9em; }
.diary__total { font-weight: 700; }
.diary__circle { padding: 2px 10px; border: 2px solid var(--pen); border-radius: 48% 52% 46% 54% / 56% 44% 58% 42%; }
/* A hand-scratched amount: two rough strokes rather than a neat line-through. */
.diary s {
  text-decoration: none; color: var(--pencil);
  background:
    linear-gradient(-6deg, transparent 46%, currentColor 46% 54%, transparent 54%),
    linear-gradient(5deg, transparent 50%, currentColor 50% 56%, transparent 56%);
}
.diary__notes { display: grid; gap: 14px; align-content: start; color: var(--pen); }
.diary__notes p { position: relative; font-size: 20px; font-weight: 700; line-height: 1.3; }
.diary__arrow { display: block; width: 84px; height: 42px; margin: 2px 0 -10px 40%; stroke-width: 3; color: var(--pen); rotate: -50deg; }

/* ---------- After: the same month in GrihLekha ---------- */
.ledger {
  padding: calc(var(--line) * 2) 40px 40px;
  background: var(--bg) var(--grain); background-size: 80px;
}
.ledger__card { padding: 22px 24px; border-radius: var(--r-xl); background: var(--band); color: var(--on-band); }
.ledger__label { font-size: 14.5px; font-weight: 600; color: color-mix(in srgb, var(--on-band) 88%, transparent); }
.ledger__sum { margin: 2px 0 14px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 52px; line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }
.ledger__bar { display: block; height: 8px; margin-bottom: 12px; border-radius: 4px; background: linear-gradient(to right, var(--leaf) 40%, color-mix(in srgb, var(--on-band) 18%, transparent) 0); }
.ledger__list { list-style: none; margin: 16px 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.ledger__list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 16px; }
.ledger__list li + li { border-top: 1px solid var(--border); }
.ledger__list b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.ledger__list small { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.3; }
.ledger__av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-family: var(--font-display); font-weight: var(--display-weight); font-size: 15px; }
.ledger__amt { display: grid; justify-items: end; gap: 3px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 18px; line-height: 1.2; font-variant-numeric: lining-nums tabular-nums; }
.ledger__amt .pill { font-family: var(--font-body); font-style: normal; font-size: 11.5px; }
.ledger__title { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 22px; letter-spacing: var(--tracking-display); }
.ledger__title img { border-radius: 8px; }
.ledger__perks ul { list-style: none; margin: 0; padding: 0; }
.ledger__perks li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 0; font-size: 16px; font-weight: 500; line-height: 1.45; }
.ledger__perks li + li { border-top: 1px solid var(--border); }
.ledger__perks svg { box-sizing: border-box; width: 28px; height: 28px; padding: 6px; border-radius: 50%; stroke-width: 3; color: var(--success); background: var(--success-soft); }

/* ---------- The line and its knob ---------- */
.wipe__handle {
  position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px;
  background: var(--primary); pointer-events: none;
}
.wipe__knob {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary);
  box-shadow: 0 0 0 4px var(--surface), var(--lift-sm);
  transition: scale .2s var(--ease);
}
.wipe__knob svg { width: 22px; height: 22px; stroke-width: 2.6; }
.wipe.is-dragging .wipe__knob { scale: 1.08; }
.wipe:has(.wipe__range:focus-visible) .wipe__knob { outline: 3px solid var(--focus); outline-offset: 5px; }

/* The real control: keyboard and screen readers use it; pointers drag the stage instead. */
.wipe__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }

/* Wide: entries and the tenant list sit left, the margin notes and the GrihLekha list right,
   each pain on the same row as the benefit that replaces it. */
@media (min-width: 760px) {
  .wipe__layer { grid-template-areas: "main side"; }
  /* Same side padding on both layers, so the column gap sits on the 50% mark. */
  .wipe { --gutter: 44px; }
  .wipe__layer { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; padding-inline: 68px; }
  .ledger__title { height: 40px; margin: 0; }
  .ledger__perks li, .diary__notes p { min-height: 72px; align-content: center; }
  .ledger__perks li { align-items: center; }
  .diary__notes { gap: 0; padding-top: 40px; }
  .diary__notes p { display: grid; font-size: 22px; }
  .diary__arrow { position: absolute; right: 100%; top: 4px; width: 64px; height: 34px; margin-right: 4px; scale: -1 1; rotate: 14deg; }
}
@media (max-width: 759px) {
  .wipe { --line: 32px; --gutter: 36px; }
  .diary { padding: calc(var(--line) * 2) 16px var(--line) calc(var(--gutter) + 14px); }
  .ledger { padding: calc(var(--line) * 2) 16px 20px; }
  .diary__head { font-size: 21px; }
  .diary__row { font-size: 18px; }
  .diary__notes { gap: 20px; padding-top: 8px; }
  .diary__arrow { display: none; }
  .diary__notes p { font-size: 17.5px; }
  .ledger__sum { font-size: 42px; }
  .ledger__card { padding: 18px 20px; }
  .ledger__list li { gap: 12px; padding: 11px 14px; }
  .ledger__perks li { font-size: 15px; padding: 10px 0; }
  .wipe__knob { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .wipe__knob { transition: none; } }

/* ---------- how ---------- */
/* How it works: the rent-day simulator. A tear-off calendar turns to the 1st, the visitor taps through the
   app's three screens (built in HTML, matching the real ones), and the receipt lands in a WhatsApp chat with a stamp. */

#how {
  --ink: #2847A0;          /* ballpoint blue: the landlord's own hand on the calendar */
  --stamp: #5A3D9E;        /* office rubber-stamp violet */
  --chat-wall: color-mix(in srgb, var(--surface-alt) 70%, var(--bg));
  --tick: #2E86C1;
}
@media (prefers-color-scheme: dark) {
  #how { --ink: #9DB2F2; --stamp: #C2B0F5; --chat-wall: color-mix(in srgb, var(--surface) 60%, var(--bg)); --tick: #7CC4EE; }
}

#how .rd { display: grid; gap: 28px; }
#how .rd__head { max-width: 720px; margin-inline: auto; text-align: center; }
#how .rd__head .lead { margin-inline: auto; }
#how .rd__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Step indicator ---------- */

#how .rd__steps { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 980px; }
#how .rd__steps li {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 16px 18px; border-radius: var(--r-xl); border: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
#how .rd__steps li[aria-current] { background: var(--surface); border-color: var(--card-edge); box-shadow: var(--lift-sm); }
#how .rd__num {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-family: var(--font-display); font-weight: var(--display-weight); font-size: 17px; font-variant-numeric: lining-nums;
  transition: background .3s, color .3s, border-color .3s, box-shadow .3s;
}
#how .rd__steps li[aria-current] .rd__num { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 14%, transparent); }
#how .rd__steps li.is-done .rd__num { background: var(--primary-soft); border-color: transparent; color: var(--primary-text); }
#how .rd__text b { display: block; font-size: 16px; font-weight: 600; color: var(--text-2); line-height: 1.35; }
#how .rd__steps li[aria-current] .rd__text b { color: var(--text); }
#how .rd__text small { display: block; margin-top: 3px; font-size: 14px; line-height: 1.5; color: var(--muted); }

@media (max-width: 759px) {
  #how .rd__steps { gap: 4px; }
  #how .rd__steps li { grid-template-columns: 1fr; justify-items: center; gap: 8px; padding: 12px 6px; text-align: center; }
  #how .rd__text b { font-size: 13.5px; }
  #how .rd__text small { display: none; }
}

/* ---------- Stage: wall, phone, WhatsApp ---------- */

#how .rd__stage { display: grid; gap: 32px; justify-items: center; align-items: center; }
#how .rd__wall { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; width: 100%; max-width: 560px; }
#how .rd__out { display: grid; justify-items: center; gap: 14px; width: 100%; max-width: 380px; }

@media (min-width: 760px) and (max-width: 1079px) {
  #how .rd__stage { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "wall wall" "phone out"; column-gap: 40px; }
  #how .rd__wall { grid-area: wall; gap: 32px; align-items: center; }
  #how .rd__phone { grid-area: phone; }
  #how .rd__out { grid-area: out; }
}
@media (min-width: 1080px) {
  #how .rd__stage { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 56px; margin-top: 12px; }
  #how .rd__wall { grid-template-columns: 1fr; justify-items: center; gap: 28px; max-width: 340px; }
  #how .rd__out { justify-self: start; }
  #how .rd__wall { justify-self: end; }
}

/* ---------- Tear-off calendar ---------- */

#how .cal { font-size: 15px; width: 12.5em; rotate: -2.5deg; filter: drop-shadow(0 14px 18px rgb(7 35 17 / .16)); }
#how .cal__top {
  position: relative; display: grid; place-items: center; height: 2.4em; border-radius: .45em .45em 0 0;
  background: var(--band); color: var(--on-band); font-size: 1em;
}
#how .cal__top span { font-size: .72em; font-weight: 700; letter-spacing: .3em; opacity: .8; }
#how .cal__top i { position: absolute; top: -.45em; width: .5em; height: 1.1em; border-radius: .3em; background: linear-gradient(90deg, #8d8d84, #e9e7dc 45%, #7c7b72); }
#how .cal__top i:first-child { left: 22%; }
#how .cal__top i:nth-child(2) { right: 22%; }
/* The stubs of torn-off days, a ragged strip under the binding. */
#how .cal__top::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: .35em; background: var(--surface); z-index: 2;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 94% 100%, 88% 30%, 81% 90%, 74% 20%, 66% 80%, 58% 30%, 50% 100%, 42% 40%, 34% 90%, 26% 20%, 18% 80%, 10% 30%, 4% 90%, 0 40%);
  opacity: 0; transition: opacity .3s;
}
#how.is-torn .cal__top::after { opacity: 1; }
#how .cal__pad {
  position: relative; height: 13.5em;
  /* The thickness of the pad: a few page edges under the top sheet. */
  box-shadow: 0 2px 0 -1px var(--surface), 0 2px 0 0 var(--border), 0 4px 0 -1px var(--surface), 0 4px 0 0 var(--border), 0 6px 0 -1px var(--surface), 0 6px 0 0 var(--border);
  border-radius: 0 0 .35em .35em;
}
#how .cal__sheet {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: .6em .8em 1em; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 .35em .35em;
  background: var(--surface) var(--grain); background-size: 80px; transform-origin: 85% 0;
}
#how .cal__month { font-size: .8em; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--danger); }
#how .cal__date { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 6.6em; line-height: .95; letter-spacing: -.03em; color: var(--text); font-variant-numeric: lining-nums; }
#how .cal__day { font-size: .78em; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#how .cal__sheet--day1 .cal__date { color: var(--danger); }
html[lang="hi"] #how .cal__month, html[lang="hi"] #how .cal__day { letter-spacing: 0; font-size: .9em; }
/* The landlord's pen: a ring round the date and a note, drawn once the day arrives. */
#how .cal__ring { position: absolute; left: 22%; top: 22%; width: 56%; height: 52%; overflow: visible; }
#how .cal__ring path { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
#how .cal__note { position: absolute; right: .5em; bottom: .3em; font-family: Kalam, cursive; font-weight: 700; font-size: 1.15em; color: var(--ink); rotate: -6deg; opacity: 0; translate: 0 .3em; }
#how.is-torn .cal__ring path { stroke-dashoffset: 0; transition: stroke-dashoffset .8s ease-out .15s; }
#how.is-torn .cal__note { opacity: 1; translate: none; transition: opacity .4s .7s, translate .4s .7s; }
#how .cal__sheet[hidden] { display: none; }

/* ---------- Dues: the home total ---------- */

#how .dues { width: 100%; padding: 18px 18px 10px; border-radius: var(--r-xl); border: 1px solid var(--card-edge); background: var(--surface); box-shadow: var(--lift-sm); }
#how .dues__label { font-size: 13px; font-weight: 600; color: var(--muted); }
#how .dues__total { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 34px; line-height: 1.15; color: var(--warning); font-variant-numeric: lining-nums tabular-nums; }
#how .dues__note { font-size: 12.5px; color: var(--muted); }
#how .dues__list { list-style: none; margin: 12px 0 0; padding: 0; }
#how .dues__list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--rule); }
#how .dues__av { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-size: 11px; font-weight: 700; }
#how .dues__who b { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#how .dues__who small { display: block; font-size: 12px; color: var(--muted); }
#how .dues__amt { font-size: 14px; font-weight: 700; color: var(--warning); font-variant-numeric: tabular-nums; text-align: right; }
#how .dues__paid { display: none; grid-column: 3; justify-self: end; font-size: 11px; }
#how .dues__list li.is-paid { grid-template-rows: auto auto; row-gap: 2px; }
#how .dues__list li.is-paid .dues__av, #how .dues__list li.is-paid .dues__who { grid-row: span 2; }
#how .dues__list li.is-paid .dues__amt { color: var(--muted); }
#how .dues__list li.is-paid .dues__paid { display: inline-flex; }

@media (max-width: 759px) {
  #how .cal { font-size: 9.4px; margin-top: 10px; }
  #how .dues { padding: 12px 12px 4px; }
  #how .dues__total { font-size: 26px; }
  #how .dues__note { font-size: 11.5px; }
  #how .dues__list { margin-top: 6px; }
  #how .dues__list li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 6px 0; }
  #how .dues__av { display: none; }
  #how .dues__who b { font-size: 13px; }
  #how .dues__who small { font-size: 11px; }
  #how .dues__amt { font-size: 13px; }
  #how .dues__paid { grid-column: 2; }
}

/* ---------- The phone: the app's screens in HTML ---------- */

#how .rd__phone { position: relative; isolation: isolate; }
#how .rd__phone::before { content: ""; position: absolute; inset: -12% -30%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 18%, transparent), transparent); }
#how .app {
  --pw: 300px;
  position: relative; overflow: hidden; width: var(--pw); aspect-ratio: 360 / 768; border-radius: 37px;
  background: var(--bg) var(--grain); background-size: 80px; color: var(--text);
  font-size: 13px; line-height: 1.35;
  outline: 1px solid color-mix(in srgb, var(--text) 10%, transparent); outline-offset: -1px;
}
@media (max-width: 420px) { #how .app { --pw: 262px; font-size: 11.36px; } }

#how .app__scr {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: .85em; padding: 1.5em 1.15em;
  translate: 100% 0; opacity: 0; visibility: hidden;
  transition: translate .45s var(--ease), opacity .3s, visibility 0s .45s;
}
#how .app__scr.is-on { translate: none; opacity: 1; visibility: visible; transition: translate .45s var(--ease), opacity .3s; }
#how .app__scr.is-past { translate: -30% 0; }

#how .app__title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.45em; text-align: center; margin-bottom: .3em; }
#how .app__card { border: 1px solid var(--border); border-radius: .75em; background: var(--surface); }
#how .app__amount b, #how .app__big, #how .app__owe b, #how .app__av, #how .cal__date { font-variant-numeric: lining-nums tabular-nums; }
#how .app__av { display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-family: var(--font-display); font-weight: var(--display-weight); }
#how .app__profile { display: flex; flex-direction: column; align-items: center; gap: .35em; padding: 1.2em 1em 1.1em; text-align: center; }
#how .app__profile .app__av { width: 3.7em; height: 3.7em; font-size: 1.25em; }
#how .app__name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.5em; margin-top: .2em; }
#how .app__sub { font-size: .95em; color: var(--text-2); }
#how .app__active { display: flex; align-items: center; gap: .8em; width: 100%; margin-top: .5em; text-align: left; }
#how .app__active > span { flex: 1; }
#how .app__active b { display: block; color: var(--muted); }
#how .app__active small { display: block; font-size: .85em; color: var(--muted); line-height: 1.3; }
#how .app__active i { flex: none; width: 2.9em; height: 1.7em; border-radius: 1em; background: var(--primary); position: relative; }
#how .app__active i::after { content: ""; position: absolute; right: .25em; top: .25em; width: 1.2em; height: 1.2em; border-radius: 50%; background: var(--on-primary); }
#how .app__duo { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; width: 100%; }
#how .app__profile .app__duo { margin-top: .6em; }
#how .app__ghost, #how .app__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 2.9em; padding: 0 .9em; border-radius: 999px;
  font: inherit; font-size: 1em; font-weight: 600; white-space: nowrap;
}
#how .app__ghost { border: 1px solid var(--control-outline); color: var(--primary-text); }
#how .app__ghost svg, #how .app__btn svg { width: 1.2em; height: 1.2em; }
#how .app__wide { width: 100%; }
#how .app__link { align-self: center; margin-top: .3em; font-weight: 600; color: var(--primary-text); }
#how .app__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; }
#how .app__stats span { display: flex; flex-direction: column; align-items: center; gap: .2em; padding: .7em .2em; border: 1px solid var(--border); border-radius: .6em; text-align: center; }
#how .app__stats small { font-size: .74em; font-weight: 600; color: var(--text-2); }
#how .app__stats b { font-size: 1.05em; font-variant-numeric: tabular-nums; }
#how .app__warn { color: var(--warning); }

#how .app__btn {
  position: relative; border: 0; cursor: pointer; color: var(--on-primary); background: var(--primary);
  transition: transform .15s, filter .2s;
}
#how .app__btn:hover { filter: brightness(1.08); }
#how .app__btn:active, #how .is-tap { transform: scale(.96); }
#how .app__btn:focus-visible, #how .app__mode:focus-visible, #how .rd__again:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
#how .app__btn:focus-visible, #how .rd__again:focus-visible { border-radius: 999px; }
#how .app__mode:focus-visible { border-radius: .55em; }
/* The next thing to tap breathes a soft green ring. */
#how .is-next { animation: rd-pulse 1.8s var(--ease) infinite; }
@keyframes rd-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 50%, transparent); }
  70%, 100% { box-shadow: 0 0 0 .85em color-mix(in srgb, var(--primary) 0%, transparent); }
}

#how .app__who { display: flex; align-items: center; gap: .7em; padding: .9em; }
#how .app__who .app__av { width: 2.8em; height: 2.8em; font-family: var(--font-body); font-weight: 700; }
#how .app__who > span:nth-child(2) { flex: 1; min-width: 0; }
#how .app__who b { display: block; font-size: 1.1em; }
#how .app__who small { display: block; font-size: .85em; color: var(--text-2); }
#how .app__owe { text-align: right; }
#how .app__owe small { font-size: .74em; font-weight: 600; }
#how .app__owe b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.35em; color: var(--danger); }
#how .app__label { font-weight: 600; margin-top: .2em; }
#how .app__amount {
  display: flex; align-items: center; gap: .6em; height: 3.9em; padding: 0 1em; margin-top: -.4em;
  border: 2px solid var(--primary); border-radius: .6em; background: var(--surface); color: var(--primary-text);
}
#how .app__amount span { font-size: 1.4em; }
#how .app__amount b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.3em; letter-spacing: -.01em; }
#how .app__amount i { width: 2px; height: 1.9em; margin-left: -.5em; background: var(--primary); animation: rd-caret 1s steps(1) infinite; }
@keyframes rd-caret { 50% { opacity: 0; } }
#how .app__modes { display: flex; flex-wrap: wrap; gap: .5em; margin-top: -.4em; }
#how .app__mode {
  display: inline-flex; align-items: center; gap: .5em; height: 2.9em; padding: 0 1em; border-radius: .55em; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  transition: background .2s, color .2s, border-color .2s;
}
#how .app__mode svg { width: 1.2em; height: 1.2em; }
#how .app__mode:hover { border-color: var(--control-outline); }
#how .app__mode[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
#how .app__sum { margin: 0; padding: .9em 1.1em; border-radius: .6em; background: var(--surface-alt); display: grid; gap: .45em; }
#how .app__sum div { display: grid; grid-template-columns: 1fr auto; gap: 1em; }
#how .app__sum div:last-child { padding-top: .5em; border-top: 1px solid var(--border); }
#how .app__sum dt { color: var(--text-2); }
#how .app__sum dd, #how .app__receipt dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
#how .app__ok { color: var(--success); }
#how .app__scr[data-scr="2"] .app__btn { margin-top: auto; }

#how .app__receipt { display: flex; flex-direction: column; align-items: center; gap: .25em; padding: 1.2em 1.1em 1em; text-align: center; }
#how .app__tick { display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: 50%; background: var(--success); color: var(--surface); }
#how .app__tick svg { width: 1.5em; height: 1.5em; stroke-width: 3; }
#how .app__got { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.3em; color: var(--success); margin-top: .4em; text-wrap: balance; }
#how .app__big { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.6em; line-height: 1.1; color: var(--primary-text); }
#how .app__no { font-size: .9em; color: var(--text-2); }
#how .app__receipt dl { width: 100%; margin: .8em 0 0; padding-top: .7em; border-top: 1px solid var(--border); display: grid; gap: .45em; text-align: left; }
#how .app__receipt dl div { display: grid; grid-template-columns: 1.15fr 1fr; gap: .6em; }
#how .app__receipt dt { color: var(--text-2); font-size: .92em; }

/* ---------- WhatsApp chat ---------- */

#how .wa { width: 100%; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--card-edge); background: var(--chat-wall) var(--grain); background-size: 80px; box-shadow: var(--lift-sm); }
#how .wa__bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--band); color: var(--on-band); }
#how .wa__bar svg { width: 18px; height: 18px; opacity: .8; }
#how .wa__bar b { font-size: 15px; font-weight: 600; }
#how .wa__av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--on-band) 18%, transparent); font-size: 12px; font-weight: 700; }
#how .wa__body { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 120px; padding: 16px 14px; }
#how .wa__empty { align-self: center; margin: auto 0; padding: 6px 12px; border-radius: 8px; background: color-mix(in srgb, var(--warning-soft) 80%, var(--surface)); color: var(--text-2); font-size: 12.5px; text-align: center; }
#how .wa__msg {
  position: relative; align-self: flex-end; max-width: 92%; padding: 10px 12px 6px; border-radius: 12px 3px 12px 12px;
  background: var(--chat); color: var(--text); box-shadow: 0 1px 1px rgb(7 35 17 / .12);
}
#how .wa__msg[hidden] { display: none; }
#how .wa__text { font-size: 13px; line-height: 1.45; white-space: pre-line; font-variant-numeric: tabular-nums; }
#how .wa__time { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 2px; font-size: 11px; color: var(--muted); }
#how .wa__time svg { width: 16px; height: 16px; color: var(--tick); stroke-width: 2.2; }
#how .wa__stamp {
  position: absolute; right: 6%; top: 44%; padding: 4px 14px; rotate: -14deg;
  border: 4px double var(--stamp); border-radius: 8px; color: var(--stamp);
  font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: .16em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  /* Uneven ink, as a real rubber stamp leaves it. */
  mask: radial-gradient(circle at 30% 40%, #000 50%, rgb(0 0 0 / .65) 80%);
}
html[lang="hi"] #how .wa__stamp { letter-spacing: 0; font-size: 26px; }
#how .wa.is-stamped .wa__stamp { opacity: .9; }
@media (prefers-color-scheme: light) { #how .wa__stamp { mix-blend-mode: multiply; } }
@media (min-width: 1080px) { #how .wa__body { min-height: 400px; } }

#how .rd__again {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--control-outline); background: var(--surface); color: var(--primary-text); font: inherit; font-size: 15px; font-weight: 600;
}
#how .rd__again:hover { background: var(--surface-alt); }
#how .rd__again svg { width: 17px; height: 17px; }
#how[data-step="1"] .rd__again { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  #how .rd__steps li, #how .rd__num, #how .app__scr, #how .app__scr.is-on, #how .app__btn, #how .app__mode { transition: none; }
  #how .app__scr.is-past { translate: 100% 0; }
  #how .is-next { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 40%, transparent); }
  #how .app__amount i { animation: none; }
  #how.is-torn .cal__ring path, #how.is-torn .cal__note, #how .cal__top::after { transition: none; }
}

/* ---------- receipt ---------- */
/* ---------- Receipt: a sample receipt that prints with the visitor's tenant name ---------- */

.rc__grid { display: grid; gap: clamp(40px, 6vw, 72px); align-items: start; }
@media (min-width: 900px) {
  .rc__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 470px); }
  .rc__copy { padding-top: 28px; }
}
.rc .h2 { max-width: 14ch; }
:lang(hi) .rc .h2 { max-width: 19ch; }

/* The form: a card of plain, large fields. */
.rc__form {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 16px;
  margin-top: clamp(28px, 4vw, 40px); max-width: 520px; padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--card-edge); border-radius: var(--r-xl); background: var(--surface);
  box-shadow: var(--lift-sm);
}
.rc__field { display: grid; align-content: start; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.rc__field--wide { grid-column: 1 / -1; }
.rc__field label, .rc__field legend { padding: 0; font-size: 14px; font-weight: 600; color: var(--text-2); }
.rc__field legend { margin-bottom: 7px; }
.rc__form input[type="text"], .rc__form select {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--control-outline); background: var(--bg); color: var(--text);
  font: inherit; font-size: 16px;
}
.rc__form select { padding-right: 8px; }
.rc__money { position: relative; }
.rc__money span { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); font-weight: 600; pointer-events: none; }
.rc__form .rc__money input { padding-left: 30px; font-variant-numeric: tabular-nums; }
.rc__hint { font-size: 12.5px; color: var(--muted); }
.rc__private { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Cash / UPI / Bank: a segmented control over real radios. */
.rc__seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-alt); }
.rc__seg label { position: relative; display: block; cursor: pointer; }
.rc__seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rc__seg span {
  display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 6px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; color: var(--text-2); transition: background .2s, color .2s;
}
.rc__seg input:checked + span { background: var(--primary); color: var(--on-primary); }
.rc__seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* The printer: a dark slot the paper feeds out of. */
.rc__out { min-width: 0; }
.rc__slot {
  position: relative; z-index: 2; height: 18px; margin: 0 -6px; border-radius: 10px;
  background: var(--frame); box-shadow: var(--lift-sm), inset 0 -6px 6px -4px rgba(0, 0, 0, .6);
}
.rc__slot::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 5px; height: 3px; border-radius: 3px; background: #000; opacity: .7; }
/* Clips the paper at the slot only; the shadow still shows at the sides and bottom. */
.rc__feed { position: relative; z-index: 1; margin: -4px 10px 0; padding-bottom: 8px; clip-path: inset(0 -60px -80px -60px); filter: drop-shadow(0 2px 2px rgba(7, 35, 17, .1)) drop-shadow(0 22px 26px rgba(7, 35, 17, .2)); }

/* The paper. Stays paper-coloured in dark mode, like a real slip. */
.rcpt {
  --ink: #072311; --ink-2: #485846; --green: #1F6A19; --line: #DCD3BA;
  position: relative; overflow: hidden; padding: 34px clamp(20px, 5vw, 32px) 22px;
  color: var(--ink);
  /* A faint fold across the middle, under the grain. Backgrounds sit beneath the text, so the crease never greys it. */
  background:
    linear-gradient(180deg, transparent 49%, rgba(7, 35, 17, .025) 51.8%, rgba(255, 255, 255, .3) 52%, transparent 53.5%),
    var(--grain) 0 0 / 80px repeat, #FFFCF3;
  /* Perforated top edge: a row of half-circle bites. */
  -webkit-mask: radial-gradient(circle 6px at 50% 4px, #0000 96%, #000) 50% 0 / 17px 100% repeat-x;
          mask: radial-gradient(circle 6px at 50% 4px, #0000 96%, #000) 50% 0 / 17px 100% repeat-x;
  user-select: none;
}
/* The tear line under the perforation. */
.rcpt::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; border-top: 1.5px dashed var(--line); }

.rcpt__mark {
  position: absolute; z-index: 3; left: 50%; top: 50%; translate: -50% -50%; rotate: -24deg;
  padding: 6px 22px 2px; border: 3px solid currentColor; border-radius: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(46px, 13vw, 66px); line-height: 1.02; letter-spacing: .1em; text-align: center;
  color: rgba(165, 44, 24, .2); pointer-events: none; white-space: nowrap;
}

.rcpt__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.rcpt__brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.rcpt__title { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); text-align: right; }

.rcpt__meta { display: grid; gap: 4px; margin: 14px 0 22px; font-size: 13.5px; }
.rcpt__meta div, .rcpt__rows div { display: flex; justify-content: space-between; gap: 16px; }
.rcpt dt { color: var(--ink-2); }
.rcpt dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.rcpt__label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.rcpt__name {
  min-height: 1.3em; margin-top: 2px; font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 6.4vw, 30px); line-height: 1.2;
  overflow-wrap: anywhere;
}
/* No name yet: a blank to fill, as on a receipt book. */
.rcpt__name:empty::after { content: ""; display: block; width: 70%; height: 1.1em; border-bottom: 2px dotted var(--ink-2); }
.rcpt__amount {
  margin-top: 14px; font-family: var(--font-display); font-weight: 600; font-size: clamp(44px, 12vw, 58px); line-height: 1;
  color: var(--green); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.01em;
}
.rcpt__words { margin-top: 8px; font-size: 15px; font-style: italic; line-height: 1.45; color: var(--ink-2); }

.rcpt__rows { display: grid; gap: 9px; margin: 22px 0 0; padding-top: 16px; border-top: 1.5px dashed var(--line); font-size: 15px; }

.rcpt__sign { display: grid; justify-items: end; margin-top: 20px; font-size: 12.5px; color: var(--ink-2); }
.rcpt__sig {
  padding: 0 6px 2px; border-bottom: 1px solid var(--ink-2);
  font-family: Kalam, cursive; font-size: 30px; line-height: 1.25; color: #1C3D86; rotate: -4deg; translate: 0 4px;
}
.rcpt__sign > span:last-child { margin-top: 8px; }

.rcpt__note { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; text-align: center; color: var(--ink-2); }

.rc__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin: 28px 10px 0; }
.rc__cta p { flex: 1 1 220px; font-size: 15px; color: var(--text-2); }

/* Devanagari breaks apart when letter-spaced, and has no true italic. */
:lang(hi) .rcpt__title, :lang(hi) .rcpt__label { letter-spacing: 0; text-transform: none; font-size: 14px; }
:lang(hi) .rcpt__words { font-style: normal; }

/* Print-out: the paper slides down from the slot in short feeds, once, when it comes into view. */
.rc--feed .rcpt { transform: translateY(-101%); }
.rc--printed .rcpt { transform: none; animation: rc-print 2.1s cubic-bezier(.3, .6, .3, 1) .2s backwards; }
@keyframes rc-print {
  0% { transform: translateY(-101%); }
  28% { transform: translateY(-64%); } 36% { transform: translateY(-63%); }
  62% { transform: translateY(-26%); } 70% { transform: translateY(-25%); }
  100% { transform: none; }
}

/* A sample is never printed. */
@media print { .rc__out { display: none; } }

/* ---------- lekha ---------- */
/* Lekha band: heading beside a live demo (a Hindi question types itself, Lekha answers), her three real screens below.
   The band is dark in both themes, so colours come from --band / --on-band plus the app's two greens. */
#lekha { --lk-lime: #B2D994; --lk-go: #1F6A19; --lk-ink: #072311; }

.lk-top { display: grid; gap: 36px; margin-bottom: clamp(48px, 6vw, 80px); }
.lk-top .band__head { margin-bottom: 0; }
@media (min-width: 980px) {
  .lk-top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
}

/* Without JS the demo stays out; the heading and the real screens tell the story. */
.lk-stage { display: none; }
.js .lk-stage {
  display: block; position: relative; padding: 18px 20px 20px; border-radius: 28px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--on-band) 9%, transparent), color-mix(in srgb, var(--on-band) 4%, transparent));
  border: 1px solid color-mix(in srgb, var(--on-band) 16%, transparent);
  box-shadow: 0 40px 80px -40px rgb(0 0 0 / .65), inset 0 1px 0 color-mix(in srgb, var(--on-band) 10%, transparent);
}
@media (max-width: 479px) { .js .lk-stage { padding: 14px 14px 16px; border-radius: 24px; } }
.lk-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Top bar: her orb, her name and what she is doing. */
.lk-bar { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid color-mix(in srgb, var(--on-band) 12%, transparent); }
.lk-orb {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: #F7F1DF;
  background: radial-gradient(circle at 34% 28%, #5DA548, var(--lk-go) 52%, #0B3A0A);
  box-shadow: 0 0 0 4px rgb(178 217 148 / .16);
}
.lk-orb svg { width: 20px; height: 20px; fill: currentColor; stroke-width: 1.5; }
.lk-who { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.lk-who b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 20px; color: var(--on-band); }
.lk-status { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: color-mix(in srgb, var(--on-band) 64%, transparent); }
.lk-pause {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--on-band) 22%, transparent); background: transparent; color: color-mix(in srgb, var(--on-band) 80%, transparent);
}
.lk-pause[hidden] { display: none; }
.lk-pause:hover { background: color-mix(in srgb, var(--on-band) 8%, transparent); color: var(--on-band); }
.lk-pause svg { width: 15px; height: 15px; }
.lk-pause__go { fill: currentColor; }
.lk-pause__go, .is-paused .lk-pause__stop { display: none; }
.is-paused .lk-pause__go { display: block; }

/* Every question's finished answer sits hidden in the same grid cell as the live one, so the box is
   always as tall as the longest answer and nothing jumps while text types. */
.lk-screen { display: grid; padding: 18px 0 16px; }
.lk-screen > * { grid-area: 1 / 1; min-width: 0; }
.lk-ghost { visibility: hidden; }
.lk-scene { display: grid; gap: 14px; align-content: start; }

/* The landlord's question: a lime bubble on the right, the English under it. */
.lk-q { display: grid; justify-items: end; gap: 6px; max-width: 90%; justify-self: end; text-align: right; }
.lk-ask {
  padding: 10px 16px; border-radius: 20px 20px 6px 20px; background: var(--lk-lime); color: var(--lk-ink);
  font-size: clamp(17px, 1.6vw, 19px); font-weight: 600; line-height: 1.5; text-align: left;
}
.lk-caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 2px; vertical-align: -.2em; border-radius: 1px; background: currentColor; opacity: 0; }
.is-live:not(.is-sent) .lk-caret { opacity: 1; animation: lk-blink 1s steps(1) infinite; }
.is-paused .lk-caret { animation-play-state: paused; }
.lk-en { padding-right: 4px; font-size: 14px; font-style: italic; color: color-mix(in srgb, var(--on-band) 70%, transparent); }

/* Lekha's answer on the left. */
.lk-a { position: relative; display: grid; gap: 10px; justify-items: start; width: min(100%, 470px); }
.lk-text {
  max-width: 94%; padding: 11px 16px; border-radius: 20px 20px 20px 6px;
  background: color-mix(in srgb, var(--on-band) 10%, transparent); color: var(--on-band); font-size: 16px; line-height: 1.5;
}
.lk-card { width: 100%; margin: 0; padding: 0; list-style: none; border-radius: 16px; background: color-mix(in srgb, var(--on-band) 6%, transparent); border: 1px solid color-mix(in srgb, var(--on-band) 13%, transparent); }
.lk-rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.lk-rows li + li { border-top: 1px solid color-mix(in srgb, var(--on-band) 10%, transparent); }
.lk-rows b { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.35; color: var(--on-band); }
.lk-rows small, .lk-month small { display: block; font-size: 13px; line-height: 1.4; color: color-mix(in srgb, var(--on-band) 64%, transparent); }
.lk-rows em { flex: none; font-style: normal; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.lk-owe em { color: var(--on-band-danger); }
.lk-paid em { color: var(--lk-lime); }
em.lk-tag { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--lk-lime); background: rgb(178 217 148 / .14); }
.lk-month { display: grid; gap: 6px; padding: 14px 16px 16px; }
.lk-month b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 32px; line-height: 1.1; color: var(--on-band); font-variant-numeric: lining-nums; }
.lk-five { display: flex; gap: 4px; margin: 4px 0 2px; }
.lk-five i { flex: 1; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--on-band) 14%, transparent); }
.lk-five i.on { background: var(--lk-lime); }

/* Her proposal, on paper like in the app: nothing happens until Confirm. */
.lk-act { display: grid; gap: 10px; width: 100%; padding: 14px 16px; border-radius: 18px; background: var(--on-band); color: var(--lk-ink); box-shadow: 0 18px 36px -20px rgb(0 0 0 / .6); }
.lk-act > div { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.lk-act svg { width: 20px; height: 20px; margin-top: 1px; color: var(--lk-go); }
.lk-act > span { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.lk-no { padding: 8px 14px; font-size: 15px; font-weight: 600; color: var(--lk-go); }
.lk-yes { padding: 9px 22px; border-radius: 999px; font-size: 15px; font-weight: 600; background: var(--lk-go); color: #FAF7EC; }
.is-live .lk-act.is-on .lk-yes { animation: lk-ring 1.8s .6s 2; }

/* Three dots while she reads the rent book. */
.lk-dots { position: absolute; top: 0; left: 0; display: flex; gap: 5px; padding: 15px 18px; border-radius: 20px 20px 20px 6px; background: color-mix(in srgb, var(--on-band) 10%, transparent); opacity: 0; transition: opacity .25s; }
.lk-dots i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--on-band) 70%, transparent); }
.is-thinking .is-live .lk-dots { opacity: 1; }
.is-thinking .lk-dots i { animation: lk-bounce 1s ease-in-out infinite; }
.is-thinking .lk-dots i:nth-child(2) { animation-delay: .15s; }
.is-thinking .lk-dots i:nth-child(3) { animation-delay: .3s; }
.is-thinking .lk-orb { animation: lk-glow 1.2s ease-in-out infinite; }

/* The live answer appears piece by piece; .is-on shows a piece. */
.lk-live { transition: opacity .4s var(--ease); }
.lk-live.is-out { opacity: 0; }
.is-live .lk-in, .is-live .lk-w { opacity: 0; }
.is-live .lk-in { translate: 0 8px; transition: opacity .45s var(--ease), translate .45s var(--ease); }
.is-live .lk-w { transition: opacity .3s ease; }
.is-live .is-on { opacity: 1; translate: none; }

/* Questions she answers; tap one to see it. */
.lk-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--on-band) 12%, transparent); }
.lk-chip {
  min-height: 36px; padding: 6px 11px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.3;
  border: 1px solid color-mix(in srgb, var(--on-band) 22%, transparent); background: transparent; color: color-mix(in srgb, var(--on-band) 84%, transparent);
  transition: background .25s, color .25s, border-color .25s;
}
@media (max-width: 479px) { .lk-chips { gap: 6px; } .lk-chip { padding: 6px 10px; font-size: 12.5px; } }
.lk-chip:hover { background: color-mix(in srgb, var(--on-band) 8%, transparent); }
.lk-chip[aria-pressed="true"] { background: var(--on-band); border-color: var(--on-band); color: var(--band); }

@keyframes lk-blink { 50% { opacity: 0; } }
@keyframes lk-bounce { 0%, 60%, 100% { translate: 0 0; opacity: .5; } 30% { translate: 0 -4px; opacity: 1; } }
@keyframes lk-glow { 50% { box-shadow: 0 0 0 7px rgb(178 217 148 / .28); } }
@keyframes lk-ring { 0% { box-shadow: 0 0 0 0 rgb(31 106 25 / .45); } 100% { box-shadow: 0 0 0 12px rgb(31 106 25 / 0); } }

@media (prefers-reduced-motion: reduce) {
  .lk-live, .lk-chip { transition: none; }
  .is-thinking .lk-orb, .is-live .lk-act.is-on .lk-yes { animation: none; }
}

/* ---------- hero ---------- */
/* ---------- Hero: the khata that turns into the app ----------
   Replaces the old Hero block in styles.css (.hero … .float--b).
   Default (no JS, reduced motion, short screens): a still picture, the diary page beside the phone.
   Motion mode: the stage pins while one number, --p (0 → 1), runs the whole change:
   ink lifts off (.05–.47), the app's rows settle in (.16–.52), the page shrinks into the phone (.38–.62),
   the bezel closes round it (.58–.74), the real screen shows (.72–.85), the two notes pop in (.82–.98).
   Chrome drives --p with a scroll-driven animation; script.js sets it on scroll everywhere else. */

@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
@keyframes hero-p { from { --p: 0; } to { --p: 1; } }

.hero {
  --ink: #2A4A8F;           /* blue ballpoint */
  --hand: Kalam, var(--font-body);
  --leaf: #B2D994;          /* the app's leaf green, as on the home card */
  padding: 0 0 clamp(48px, 6vw, 80px);
}
@media (prefers-color-scheme: dark) { .hero { --ink: #A9C0F2; } }

/* ---- Copy ---- */
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 980px) { .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; } }
.hero__copy { padding-top: clamp(24px, 4vw, 56px); }
.hero .h1 { margin: 20px 0 22px; }
.hero .lead { max-width: 44ch; }
.hero .waitlist { margin-top: 32px; max-width: 500px; }
.hero .waitlist__consent { margin-top: 12px; max-width: 56ch; }
.hero .waitlist__done { padding: 24px; border-radius: var(--r-xl); box-shadow: var(--lift-sm); }

.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.ticks li { display: inline-flex; align-items: center; gap: 8px; }
.ticks svg { box-sizing: content-box; width: 12px; height: 12px; padding: 4px; border-radius: 50%; background: var(--success-soft); color: var(--success); stroke-width: 3.4; }

@media (max-width: 420px) {
  .hero .eyebrow { font-size: 12px; letter-spacing: .1em; }
  .hero .eyebrow::before { display: none; }
}

/* ---- Stage: page and phone share one grid cell ---- */
.hero__stage {
  --sw: 300px;                       /* the phone's screen width */
  --sh: calc(var(--sw) * 2.13333);   /* screens are 360 × 768 */
  --u: calc(var(--sw) / 300);        /* 1px on a 300px screen: the app layer scales with the phone */
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  padding: 28px 0 36px;
}
@media (max-width: 420px) { .hero__stage { --sw: 262px; } }
.hero__stage > .khata, .hero__stage > .device { grid-area: 1 / 1; }
.hero__stage::before {
  content: ""; position: absolute; z-index: -1; inset: 6% -6%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 30%, transparent), transparent);
  filter: blur(24px);
}

/* The bezel is an inset ring, so the page shows through the screen until the real screenshot fades in. */
.hero__device { background: none; box-shadow: var(--lift), inset 0 0 0 9px var(--frame), inset 0 0 0 10px rgb(255 255 255 / .06); }
.hero__device .shot { --pw: var(--sw); }

/* ---- The khata page ---- */
.khata {
  --line: 34px;    /* ruled line pitch */
  --top: 104px;    /* first ruled line */
  --margin: 58px;  /* red margin line */
  --fs: 21px;
  position: relative; overflow: hidden; border-radius: 14px;
  background: var(--bg) var(--grain); background-size: 80px;
  box-shadow: var(--lift-sm), 0 0 0 1px var(--border);
  font-family: var(--hand); color: var(--ink);
  /* Still picture: the page tilted behind the phone. */
  justify-self: start; width: min(420px, 80%); height: calc(var(--sh) * .9); rotate: -4deg;
}
.hero__device { justify-self: end; }
@media (max-width: 560px) {
  .khata { --line: 30px; --top: 92px; --margin: 44px; --fs: 17px; width: 66%; }
  .hero__stage { --sw: 214px; } /* still picture only: motion mode sets its own size */
}

.khata__sheet {
  position: absolute; inset: 0; color: color-mix(in srgb, var(--warning) 26%, transparent);
  background: var(--surface) var(--grain); background-size: 80px;
}
/* Ruled lines, a double red header line, the double red margin, and the shade where the page meets the binding. */
.khata__sheet::before {
  content: ""; position: absolute; inset: 0;
  --blue: color-mix(in srgb, var(--rule) 72%, var(--info));
  background:
    linear-gradient(to right, color-mix(in srgb, var(--text) 9%, transparent), transparent 22px),
    linear-gradient(to right, transparent calc(var(--margin) - 5px), var(--margin-line) 0 calc(var(--margin) - 4px), transparent 0 var(--margin), var(--margin-line) 0 calc(var(--margin) + 1px), transparent 0),
    linear-gradient(to bottom, transparent calc(var(--top) - var(--line) - 6px), var(--margin-line) 0 calc(var(--top) - var(--line) - 5px), transparent 0 calc(var(--top) - var(--line) - 1px), var(--margin-line) 0 calc(var(--top) - var(--line)), transparent 0),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--line) - 1px), var(--blue) 0 var(--line)) 0 calc(var(--top) - var(--line)) / 100% 100% no-repeat;
}
.khata__ring { position: absolute; z-index: 1; width: 170px; height: 170px; right: -34px; bottom: -22px; stroke-width: 2; }
@media (max-width: 560px) { .khata__ring { width: 130px; height: 130px; } }

/* Handwriting */
.khata__ink {
  position: absolute; inset: 0;
  padding: calc(var(--top) - var(--line)) 12px 0 calc(var(--margin) + 12px);
  font-size: var(--fs); line-height: var(--line);
}
.ink__head {
  position: absolute; top: 0; left: calc(var(--margin) + 12px); right: 16px; height: calc(var(--top) - var(--line) - 8px);
  display: flex; align-items: flex-end; gap: 12px; padding-bottom: 2px; line-height: 1.2;
}
.ink__title { white-space: nowrap; font-weight: 700; font-size: 1.3em; text-decoration: underline 2px; text-underline-offset: 5px; rotate: -1.5deg; }
.ink__sub { font-size: .95em; opacity: .85; }
.ink__page { margin-left: auto; align-self: center; display: grid; place-items: center; width: 1.8em; height: 1.8em; border: 1.5px solid currentColor; border-radius: 50%; font-size: .8em; rotate: 8deg; }
.ink__row { position: relative; top: -.22em; height: var(--line); margin: 0; white-space: nowrap; rotate: var(--r, 0deg); transform-origin: 0 50%; }
.ink__m { position: absolute; right: calc(100% + 16px); font-size: .72em; opacity: .8; }
.ink__row s { text-decoration: none; opacity: .75; background: linear-gradient(-12deg, transparent 44%, currentColor 0 54%, transparent 0); }
.ink__row em { font-style: normal; color: var(--danger); font-weight: 700; }
.ink__row u { text-decoration: underline wavy var(--danger) 1.5px; text-underline-offset: 5px; }
.ink__tick { width: 1.05em; height: 1.05em; vertical-align: -.12em; stroke-width: 2.6; }
.ink__circled { position: relative; font-weight: 700; }
.ink__circled svg { position: absolute; left: -12px; top: -2px; width: calc(100% + 24px); height: calc(100% + 6px); color: var(--danger); stroke-width: 2; }
.ink__note { position: absolute; right: 24px; top: calc(var(--top) + var(--line) * 7.4); margin: 0; color: var(--danger); font-size: .9em; rotate: -6deg; }
@media (max-width: 560px) { .ink__note { right: 14px; top: calc(var(--top) + var(--line) * 7.2); } }

/* The app layer: only in motion mode. Laid out to match the real home screen at the phone's size. */
.khata__app { display: none; }

/* ---- Notes beside the phone ---- */
.hero__note {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 10px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--lift-sm);
  font-size: 12.5px; line-height: 1.35; color: var(--muted); white-space: nowrap;
}
.hero__note b { display: block; font-size: 14px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.hero__note small { font-size: inherit; }
.hero__note-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--tone-soft); color: var(--tone); }
.hero__note-icon svg { width: 19px; height: 19px; stroke-width: 2.4; }
.hero__note--a { top: 46%; left: max(0px, calc(50% - var(--sw) / 2 - 90px)); }
.hero__note--b { top: 72%; right: max(0px, calc(50% - var(--sw) / 2 - 70px)); }
@media (max-width: 560px) {
  .hero__note { gap: 9px; padding: 8px 12px 8px 8px; font-size: 11px; }
  .hero__note b { font-size: 12.5px; }
  .hero__note-icon { width: 30px; height: 30px; }
  .hero__note-icon svg { width: 16px; height: 16px; }
}
.hero__cue { display: none; }

/* =================== Motion mode =================== */
@media (prefers-reduced-motion: no-preference) and (min-height: 560px) {
  /* The hero slides under the transparent header so the pinned stage fills the screen. */
  .js .hero { margin-top: -71px; padding-bottom: 0; }
  .js .hero__copy { padding-top: 94px; }

  /* Narrow screens: the run tucks up under the copy so the diary peeks in on the first screen.
     The stage holds nothing to click, so its empty top can never block the form. */
  .js .hero__run {
    margin-top: -56px;
    height: 210svh;
    animation: hero-p linear both;
    animation-timeline: view(block 0px 0px); /* explicit inset: the default would honour html's scroll-padding-top */
    animation-range: contain 0% contain 100%;
  }
  .js .hero__stage {
    --sw: min(262px, (100svh - 150px) * .46875);
    --kw: 100%;
    --kh: min(480px, 100svh - 220px);
    /* Phases, each 0 → 1 */
    --k-clean: clamp(0, (var(--p) - .12) / .25, 1);
    --k-shrink: clamp(0, (var(--p) - .38) / .24, 1);
    --k-phone: clamp(0, (var(--p) - .58) / .16, 1);
    --k-shot: clamp(0, (var(--p) - .72) / .13, 1);
    position: sticky; top: 0; height: 100svh; padding: 78px 0 20px; pointer-events: none;
  }
  .js .hero__stage::before { opacity: calc(.35 + .65 * var(--k-phone)); }

  .js .khata {
    /* At rest the page sits at the top of the stage; it slides to the centre as it becomes the phone. */
    justify-self: center; align-self: start;
    margin-top: calc(var(--k-shrink) * (100svh - 98px - var(--sh)) / 2);
    width: calc(var(--kw) + (var(--sw) - var(--kw)) * var(--k-shrink));
    height: calc(var(--kh) + (var(--sh) - var(--kh)) * var(--k-shrink));
    border-radius: calc(14px + 23px * var(--k-shrink));
    rotate: calc(-1.5deg * (1 - var(--k-shrink)));
  }
  .js .khata__sheet { opacity: calc(1 - var(--k-shrink)); }
  .js .khata__sheet::before, .js .khata__ring { opacity: calc(1 - var(--k-clean)); }

  /* Each line of ink lifts off the page, casts a shadow, and dissolves. */
  .js .khata__ink > * {
    --t: clamp(0, (var(--p) - .05 - .035 * var(--i, 0)) / .16, 1);
    opacity: calc(1 - var(--t) * var(--t));
    translate: 0 calc(var(--t) * -20px);
    scale: calc(1 + var(--t) * .05);
    filter: blur(calc(var(--t) * var(--t) * 4px));
    text-shadow: 0 calc(var(--t) * 12px) calc(var(--t) * 8px) rgb(7 35 17 / calc(var(--t) * .3));
  }
  /* On load the ink writes itself, line by line. */
  .js .khata__ink > * { animation: ink-write .8s var(--ease) both; animation-delay: calc(.45s + var(--i, 0) * .14s); }

  /* The app layer spans the page (so it fits the phone exactly once the page has shrunk) and settles in row by row. */
  .js .khata__app {
    display: block; position: absolute; inset: 0;
    font-family: var(--font-body); color: var(--text);
  }
  .js .khata__app > *, .js .app__row {
    --s: clamp(0, (var(--p) - .16 - .05 * var(--j, 0)) / .18, 1);
    opacity: var(--s);
    translate: 0 calc((1 - var(--s)) * 18px);
  }
  /* The rows step aside as the bezel closes, so only the card is left to meet the real screen. */
  .js .app__rows { opacity: calc(1 - var(--k-phone)); translate: 0 calc(var(--k-phone) * 24px); }

  /* The bezel closes in round the page, then the real screen takes over. */
  .js .hero__device { justify-self: center; opacity: var(--k-phone); scale: calc(1.07 - .07 * var(--k-phone)); }
  .js .hero__device .shot { opacity: var(--k-shot); }

  .js .hero__note { --g: clamp(0, (var(--p) - .82) / .1, 1); opacity: var(--g); translate: 0 calc((1 - var(--g)) * 14px); scale: calc(.92 + .08 * var(--g)); }
  .js .hero__note--b { --g: clamp(0, (var(--p) - .88) / .1, 1); }

  .js .hero__cue {
    display: flex; align-items: center; gap: 6px; position: absolute; left: 0; right: 0; bottom: 10px; justify-content: center;
    margin: 0; font-family: var(--hand); font-size: 16px; color: var(--muted);
    opacity: clamp(0, 1 - var(--p) * 25, 1);
  }
  .js .hero__cue svg { width: 18px; height: 18px; animation: cue-bob 1.8s var(--ease) infinite; }

  /* Wide screens: copy and stage pin side by side for a longer run. */
  @media (min-width: 980px) {
    .js .hero__grid { align-items: start; }
    .js .hero__copy {
      position: sticky; top: 0; min-height: 100svh; padding: 86px 0 32px;
      display: flex; flex-direction: column; justify-content: center;
    }
    .js .hero__run { margin-top: 0; height: 260svh; }
    .js .khata { align-self: center; margin-top: 0; }
    .js .hero__stage {
      --sw: min(300px, (100svh - 160px) * .46875);
      --kw: min(460px, 100%);
      --kh: min(600px, 100svh - 200px);
      padding-bottom: 28px;
    }
  }
}

@keyframes ink-write {
  from { clip-path: inset(-60% calc(100% + 90px) -60% -90px); }
  to   { clip-path: inset(-60% -40px -60% -90px); }
}
@keyframes cue-bob { 50% { translate: 0 4px; } }

/* ---- The app layer, in screen units (u = 1px on a 300px screen) ---- */
.app__top { position: absolute; top: calc(7 * var(--u)); left: calc(17 * var(--u)); display: grid; line-height: 1.15; }
.app__top b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(20.5 * var(--u)); letter-spacing: -.01em; }
.app__top small { font-size: calc(9.4 * var(--u)); font-weight: 600; letter-spacing: .04em; color: var(--text-2); }
.app__card {
  position: absolute; top: calc(53 * var(--u)); left: calc(13 * var(--u)); right: calc(13 * var(--u)); height: calc(181 * var(--u));
  display: flex; flex-direction: column; align-items: flex-start; padding: calc(16 * var(--u)) calc(15 * var(--u));
  border-radius: calc(7 * var(--u)); background: var(--band); color: var(--on-band); line-height: 1.2;
}
.app__card > * { flex: none; }
.app__card small { font-size: calc(11.6 * var(--u)); font-weight: 600; }
.app__card b { margin-top: calc(6 * var(--u)); font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(40 * var(--u)); line-height: 1; font-variant-numeric: lining-nums; letter-spacing: -.01em; }
.app__card i { width: 100%; height: calc(5 * var(--u)); margin-top: calc(18 * var(--u)); border-radius: 9px; background: linear-gradient(var(--leaf) 0 0) 0 0 / 40% 100% no-repeat, color-mix(in srgb, var(--on-band) 18%, transparent); }
.app__card span { margin-top: calc(14 * var(--u)); font-size: calc(11.4 * var(--u)); }
.app__card em { margin-top: calc(12 * var(--u)); padding: calc(11 * var(--u)) calc(14 * var(--u)); border-radius: 99px; background: var(--leaf); color: #072311; font-style: normal; font-weight: 600; font-size: calc(11.6 * var(--u)); }
.app__rows { position: absolute; top: calc(254 * var(--u)); left: calc(13 * var(--u)); right: calc(13 * var(--u)); display: grid; gap: calc(8 * var(--u)); }
.app__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: calc(9 * var(--u));
  height: calc(46 * var(--u)); padding: 0 calc(12 * var(--u)); border-radius: calc(5 * var(--u));
  background: var(--surface); border: 1px solid var(--border); line-height: 1.2;
}
.app__row span { display: grid; min-width: 0; }
.app__row span b { font-size: calc(11.6 * var(--u)); font-weight: 600; }
.app__row small { font-size: calc(9.6 * var(--u)); color: var(--muted); }
.app__row > b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(14 * var(--u)); font-variant-numeric: lining-nums tabular-nums; }
.app__row em { padding: calc(3 * var(--u)) calc(8 * var(--u)); border-radius: 99px; background: var(--tone-soft); color: var(--tone); font-style: normal; font-weight: 700; font-size: calc(9 * var(--u)); }

/* ---------- FAQ: heading on the left (sticky), questions on the right ---------- */

.faq__grid { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .faq__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; }
  .faq__head { position: sticky; top: 112px; align-self: start; }
}
.faq__head .h2 { max-width: 12ch; }
.faq__ask { color: var(--text-2); font-size: 16px; }
.faq__ask a { color: var(--primary-text); font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }

.faq__list { border-bottom: 1px solid var(--border); }
.faq__item { border-top: 1px solid var(--border); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 2px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--tracking-display);
  font-size: clamp(19px, 2vw, 23px); line-height: 1.3; color: var(--text);
  transition: color .2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--primary-text); }
.faq__item summary svg {
  box-sizing: content-box; width: 18px; height: 18px; padding: 8px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--primary-text);
  transition: rotate .3s var(--ease), background .3s, border-color .3s, color .3s;
}
.faq__item summary:hover svg { border-color: var(--control-outline); }
.faq__item[open] summary svg { rotate: 45deg; background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.faq__item p { max-width: 60ch; padding: 0 56px 24px 2px; color: var(--text-2); }
.faq__item p a { color: var(--primary-text); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 560px) { .faq__item p { padding-right: 0; } }

/* ---------- Download: the finale, a ledger page on the ink band ---------- */

.section--cta { padding-top: 0; }
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 6vw, 80px);
  border-radius: 28px; box-shadow: var(--lift);
}
/* Faint ledger rules and a margin line, fading out to the right. */
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to right, transparent clamp(12px, 3vw, 44px), color-mix(in srgb, var(--margin-line) 30%, transparent) 0 calc(clamp(12px, 3vw, 44px) + 1px), transparent 0),
    repeating-linear-gradient(to bottom, transparent 0 35px, color-mix(in srgb, var(--on-band) 6%, transparent) 35px 36px);
  -webkit-mask-image: linear-gradient(100deg, #000 30%, transparent 85%);
  mask-image: linear-gradient(100deg, #000 30%, transparent 85%);
}
/* A soft green glow behind the phone. */
.cta::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  right: -10%; top: -20%; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary-soft) 30%, transparent), transparent);
}
@media (min-width: 900px) { .cta { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; } }

.cta .h2 { margin: 16px 0 16px; max-width: 14ch; color: var(--on-band); }
.cta .lead { color: color-mix(in srgb, var(--on-band) 78%, transparent); }

/* The waitlist on the band. Base .waitlist styles live with the hero; only colours change here. */
.cta .waitlist__label { color: color-mix(in srgb, var(--on-band) 82%, transparent); }
.cta .waitlist__row--pill { background: color-mix(in srgb, var(--on-band) 7%, transparent); border-color: color-mix(in srgb, var(--on-band) 32%, transparent); box-shadow: none; }
.cta .waitlist__row--pill:focus-within { border-color: var(--on-band); }
.cta .waitlist .waitlist__row--pill input[type="email"] { background: transparent; color: var(--on-band); }
.cta .waitlist__row--pill input::placeholder { color: color-mix(in srgb, var(--on-band) 60%, transparent); }
.cta .waitlist__row--pill:has(input:focus-visible) { outline-color: var(--on-band); }
.cta .waitlist__row .btn { background: var(--on-band); color: var(--band); }
.cta .waitlist__row .btn[disabled] { opacity: .7; }
.cta .waitlist__status { color: var(--on-band-danger); }
.cta .waitlist__consent { color: color-mix(in srgb, var(--on-band) 66%, transparent); }
.cta .waitlist__consent a { color: var(--on-band); }

/* The thank-you card keeps its own paper surface, so it sets its own ink. */
.cta .waitlist__done { background: var(--surface); border-color: transparent; color: var(--text); box-shadow: var(--lift-sm); }
.cta .waitlist__done p, .cta .waitlist__done label { color: var(--text-2); }
.cta .waitlist__done b, .cta .waitlist__done h3 { color: var(--text); }
.cta .waitlist__done :focus-visible { outline-color: var(--focus); }
.cta .waitlist__extra input, .cta .waitlist__extra select { width: 100%; min-width: 0; }

/* Launch day: the Play button and the QR, light on the dark band. */
.cta .stores { margin-top: 30px; }
.cta .store { background: var(--on-band); color: var(--band); border-color: transparent; }
.cta .qr { display: none; align-items: center; gap: 14px; width: fit-content; margin-top: 22px; padding: 12px 18px 12px 12px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--on-band) 7%, transparent); border: 1px solid color-mix(in srgb, var(--on-band) 18%, transparent); }
.qr img { width: 88px; height: 88px; padding: 6px; border-radius: var(--r-md); background: var(--qr-paper); }
.qr span { max-width: 18ch; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--on-band); }
[data-play="live"][data-os="desktop"] .cta .qr { display: flex; }

/* Coming next */
.next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--on-band) 16%, transparent); }
.next__label { margin-right: 6px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--on-band) 62%, transparent); }
.next__item { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--on-band) 22%, transparent); color: var(--on-band); font-size: 13.5px; font-weight: 600; }
.next__item svg { width: 15px; height: 15px; opacity: .8; }
.cta .next__note { margin-top: 12px; font-size: 14px; color: color-mix(in srgb, var(--on-band) 62%, transparent); }

/* The receipt, tilted a touch, with its WhatsApp note. */
.cta__visual { position: relative; justify-self: center; padding: 8px 0 8px 24px; }
.cta__visual .device { rotate: 3deg; }
.cta__float {
  position: absolute; z-index: 2; left: -28px; bottom: 16%;
  display: flex; align-items: center; gap: 12px; padding: 11px 18px 11px 11px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--lift-sm), 0 0 0 1px color-mix(in srgb, var(--on-band) 12%, transparent);
  font-size: 12.5px; line-height: 1.35; color: var(--muted); white-space: nowrap;
}
.cta__float b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.cta__float-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.cta__float-icon svg { width: 19px; height: 19px; stroke-width: 2.6; }

/* Phones: the receipt rises from the bottom edge of the card. */
@media (max-width: 899px) {
  .cta { gap: 36px; }
  .cta__visual { height: 330px; padding: 0; margin-bottom: calc(-1 * clamp(40px, 6vw, 80px)); overflow: hidden; }
  .cta__visual .device { rotate: none; border-radius: 46px 46px 0 0; padding-bottom: 0; }
  .cta__visual .device .shot { border-radius: 37px 37px 0 0; }
  .cta__float { left: 50%; translate: -50% 0; bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .faq__item summary svg { transition: none; }
}

/* ---------- Footer ---------- */

.footer { padding: 56px 0 40px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.footer__grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); } }
@media (max-width: 759px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 16px; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .footer__grid > :nth-child(3) { grid-column: 1 / -1; order: 1; }
}
.footer__tag { margin-top: 14px; max-width: 36ch; color: var(--muted); font-size: 15px; }
.footer h4 { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--text); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 15px; text-decoration: none; }
.footer ul a:hover { color: var(--primary-text); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.footer__lang { white-space: nowrap; color: var(--primary-text); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 760px) { .footer { padding-bottom: 104px; } }

/* ---------- Reading pages: privacy/ and terms/ ---------- */

/* No main.js here to tint a sticky header on scroll, so the header stays put. */
.header--static { position: static; }
.wrap.doc { width: min(760px, 100% - 32px); padding: 24px 0 72px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.08; margin: 8px 0 6px; }
.doc__updated { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.doc h2 { font-size: 25px; line-height: 1.25; margin: 40px 0 12px; scroll-margin-top: 16px; }
.doc p, .doc li { color: var(--text-2); }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--primary-text); text-underline-offset: 3px; overflow-wrap: anywhere; }
.doc__summary { margin: 28px 0; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.doc .doc__summary-title { margin: 0 0 8px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 20px; }
.doc__summary ul { margin: 0; }
.doc__toc { margin: 0 0 8px; padding: 16px 24px; border-radius: var(--r-md); background: var(--surface-alt); }
.doc__toc ol { margin: 0; columns: 2 220px; column-gap: 32px; }
.doc__toc li { margin: 4px 0; break-inside: avoid; }
.doc__table { width: 100%; margin: 8px 0 20px; border-collapse: collapse; font-size: 15px; }
.doc__table th, .doc__table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; color: var(--text-2); }
.doc__table th { color: var(--text); font-weight: 600; background: var(--surface-alt); }
.doc__also { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
/* The complaint form on the privacy page. */
.doc__form { display: grid; gap: 6px; max-width: 520px; margin: 8px 0 20px; }
.doc__form [hidden] { display: none !important; }
.doc__form label { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.doc__form input, .doc__form select, .doc__form textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-md);
  border: 1px solid var(--control-outline); background: var(--surface); color: var(--text);
  font: inherit; font-size: 16px;
}
.doc__form textarea { resize: vertical; }
.doc__form .btn { justify-self: start; height: 48px; margin-top: 12px; }
.doc .doc__form-status { margin: 10px 0 0; font-weight: 600; color: var(--text); }
/* A phone shows each row as a card: three columns would leave a word per line. */
@media (max-width: 640px) {
  .doc__table thead { display: none; }
  .doc__table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .doc__table td { display: block; padding: 3px 0; border: 0; }
  .doc__table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
}
/* No sticky download bar on these pages, so the footer needs no room for one. */
@media (max-width: 760px) { .doc-page .footer { padding-bottom: 40px; } }

/* ---------- Scroll reveal ---------- */
/* `translate` rather than `transform`, so a card's hover lift still works after it has revealed. */

.js .reveal {
  opacity: 0; translate: 0 28px;
  transition: opacity .9s var(--ease) calc(var(--d, 0) * 90ms), translate .9s var(--ease) calc(var(--d, 0) * 90ms),
              transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s, background .3s;
}
.js .reveal.is-in { opacity: 1; translate: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .shots > * { transition: none; }
  .btn:active { transform: none; }
}

/* ---------- Hindi ---------- */
/* Inter and Vollkorn have no Devanagari. Latin words (GrihLekha, WhatsApp, ₹ figures) keep them and Hindi falls
   through to Noto Sans Devanagari (the app's own Hindi face) and Tiro Devanagari Hindi for headings.
   Google Fonts serves both with a Devanagari unicode-range, so nothing downloads until a page shows Hindi. */
html:lang(hi) {
  --font-body: Inter, "Noto Sans Devanagari", system-ui, sans-serif;
  --font-display: Vollkorn, "Tiro Devanagari Hindi", "Noto Sans Devanagari", Georgia, serif;
  --tracking-display: 0;
  font-synthesis-weight: none; /* Tiro has one weight; a faux-bold Tiro smudges */
}
html:lang(hi) .home { line-height: 1.75; }
/* Matras sit above and below the line: tight Latin leading clips them, and negative tracking breaks conjuncts. */
html:lang(hi) .h1 { line-height: 1.22; letter-spacing: 0; }
html:lang(hi) .h2 { line-height: 1.28; letter-spacing: 0; }
html:lang(hi) :is(.feature h3, .trust__title, .waitlist__done h3, .faq__item summary) { line-height: 1.4; }
html:lang(hi) :is(.store__text, .facts__fig) { line-height: 1.3; }
/* Tracking pulls a Devanagari word apart (रसीद reads "र सी द"), and uppercase would shout the Latin words in a
   Hindi label. :lang(hi), not html:lang(hi), so a lone lang="hi" word on the English page is covered too. */
:lang(hi), :lang(hi) * { letter-spacing: 0; }
:lang(hi) :is(.eyebrow, .next__label, .ask__text small), :is(.eyebrow, .next__label, .ask__text small):lang(hi) { letter-spacing: 0; text-transform: none; }
html:lang(hi) :is(.eyebrow, .next__label, .ask__text small) { font-size: 14px; }

/* A language switch fades the page body for a moment; a Hindi first visit stays hidden until its words are in. */
main, .footer { transition: opacity .16s ease; }
.is-switching main, .is-switching .footer { opacity: 0; }
.lang-wait body { opacity: 0; }
