/*
  Emerald, for money. Your cards bring their own colours: every card face is drawn in the card's
  real colours, and the interface around them stays calm and green. Always light.
*/
:root {
  --paper: #f2f6f4;
  --paper-2: #e6eeea;
  --surface: #ffffff;
  --surface-2: #f5f9f7;
  --ink: #0e1a15;
  --ink-2: #22302a;
  --muted: #5a6b63;
  --faint: #a3b2ab;
  --line: #e1eae5;
  --field: #8a9a92;
  --accent: #007a4e;          /* emerald, safe for text and fills */
  --accent-ink: #ffffff;
  --accent-text: #007a4e;
  --accent-soft: #e2f6ee;
  --bright: #00a86b;           /* bright emerald: earned money, ticks */
  --solid: #007a4e;            /* main buttons and the active tab */
  --on-solid: #ffffff;
  --money: #007a4e;            /* the "you earned" block */
  --on-money: #ffffff;
  --scrim: rgba(8, 20, 14, 0.42);
  --good: #007a4e;
  --good-bg: #e2f6ee;
  --warn: #8a5200;
  --warn-bg: #fcefd6;
  --hot: #e8890c;
  --bad: #b8232b;
  --bad-bg: #fde6e6;
  --band-poor: #d64545;        /* credit score bands: red, amber, green, emerald */
  --band-fair: #e8890c;
  --band-fair-text: #b86e08; /* the same amber, dark enough for text (3.9:1 on white) */
  --band-good: #3fb27f;
  --band-excellent: #007a4e;
  --focus: #00a86b;
  --shadow-sm: 0 1px 2px rgba(14, 26, 21, 0.06), 0 4px 12px -6px rgba(14, 26, 21, 0.12);
  --shadow: 0 2px 6px rgba(14, 26, 21, 0.05), 0 18px 40px -22px rgba(6, 40, 26, 0.35);
  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.08), 0 14px 30px -14px rgba(6, 30, 20, 0.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  --nav-h: 64px;
  --nav-gap: calc(max(env(safe-area-inset-bottom) - 18px, 0px) + 8px); /* how far the floating bar sits above the screen's end: low, close to the Home bar */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.16, 1, .3, 1); /* decelerates into place, no overshoot */
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); overscroll-behavior: none; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }

#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; padding: calc(env(safe-area-inset-top) + 12px) 18px calc(var(--nav-h) + var(--nav-gap) + 40px); }
#app.bare { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }

h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 650; letter-spacing: -0.022em; }
h1 { font-size: clamp(1.75rem, 7.6vw, 2.15rem); }
h2 { font-size: 1.18rem; margin-bottom: 10px; letter-spacing: -0.015em; }
h3 { font-size: 1rem; font-weight: 620; letter-spacing: -0.01em; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.section { margin-top: 30px; }
.hidden { display: none !important; }
.num { font-weight: 600; letter-spacing: -0.02em; }

 /* money missed: amber, never green */

/* Money, set like a bank statement: rupees bold and large, paise light and grey. */
.money { font-weight: 720; letter-spacing: -0.04em; line-height: 1; color: var(--ink); white-space: nowrap; }
.money .p { color: var(--faint); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 46px; margin-bottom: 14px; }
.brand { min-height: 34px; font-weight: 680; font-size: 1.05rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 4px; text-decoration: none; }
.logo { height: 28px; width: auto; flex: none; display: block; } /* public/logo.svg: the bare 3D wheel, flush left (its box hugs the wheel) */
.iconbtn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--surface); text-decoration: none; box-shadow: var(--shadow-sm); }

.iconbtn svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn[aria-current="page"] { background: var(--solid); color: var(--on-solid); }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pagehead p { margin: 4px 0 0; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); font-weight: 620; text-decoration: none; text-align: center;
  transition: transform 160ms var(--ease), background 160ms, box-shadow 160ms;
}
.btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.primary { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.btn.dark { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.block { display: flex; width: 100%; }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 0.9rem; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.link { border-color: transparent; background: transparent; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn:active:not([disabled]) { transform: scale(0.97); }

.field { display: block; }
.field > span { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 5px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--field);
  background: var(--surface); font-size: 1rem; transition: border-color 160ms, box-shadow 160ms;
}
textarea.input { padding: 12px 14px; min-height: 220px; font: 0.82rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.amount-wrap { position: relative; }
.amount-wrap::before { content: "₹"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; font-size: 1.2rem; }
.amount-wrap .input { padding-left: 36px; font-size: 1.35rem; font-weight: 500; letter-spacing: -0.02em; }

.seg { display: inline-grid; grid-auto-flow: column; background: var(--paper-2); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 620; color: var(--muted); transition: background 200ms var(--ease), color 200ms; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 6px; scrollbar-width: none; scroll-padding-left: 18px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrapped { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none; border: 0; background: var(--surface); border-radius: 999px; min-height: 44px; padding: 0 16px; font-weight: 560; scroll-snap-align: start;
  box-shadow: var(--shadow-sm); transition: background 180ms, color 180ms, transform 160ms var(--ease);
}
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--solid); color: var(--on-solid); }
.chip.more { background: transparent; box-shadow: inset 0 0 0 1.5px var(--field); color: var(--muted); }

.tag { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); color: var(--muted); vertical-align: middle; }
.tag.good { background: var(--good-bg); color: var(--good); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.accent { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- the ask bar ---------- */
.ask { display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 999px; padding: 5px 5px 5px 20px; box-shadow: var(--shadow); transition: box-shadow 200ms; }
.ask:focus-within { box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.ask input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.02rem; min-height: 50px; outline: none; border-radius: 14px; padding: 0 8px; margin-left: -8px; }
.ask input::placeholder { color: var(--muted); }
.ask .ib { width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; background: transparent; transition: transform 160ms var(--ease); }
.ask .ib:active { transform: scale(0.92); }
.ask .ib svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ask .ib.go { background: var(--accent); color: var(--accent-ink); }
.ask .ib[disabled] { opacity: 0.5; }
.heard { margin-top: 12px; }

/* ---------- Pick: greeting, live line, place chips, loading outline ---------- */
.liveline { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 16px; text-decoration: none; font-size: 0.9rem; font-weight: 550; color: var(--ink-2); }
.liveline .mini { width: 34px; height: 22px; border-radius: 5px; }
.liveline .mini::after { left: 4px; top: 7px; width: 8px; height: 6px; }
.chips { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); scroll-snap-type: x mandatory; }
.chips.scrolled { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 36px), transparent); }
.chips.wrapped { -webkit-mask-image: none; mask-image: none; }
.skel .sk-card { aspect-ratio: 1.586 / 1; border-radius: 20px 20px 0 0; }
.skel .sk-sheet { position: relative; padding: 20px 20px 18px; border-radius: 0 0 22px 22px; background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 12px; }
.skel .sk-sheet i { display: block; height: 14px; border-radius: 8px; }
.skel .sk-card, .skel .sk-sheet i { background: linear-gradient(90deg, var(--paper-2) 0%, var(--surface-2) 50%, var(--paper-2) 100%) 0 0 / 200% 100%; animation: skel 1.1s linear infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- card faces, drawn in each card's own colours ---------- */
.face { --c1: #222; --c2: #444; --ink-card: #fff; --acc: rgba(255,255,255,.5); position: relative; overflow: hidden; isolation: isolate; border-radius: 18px; aspect-ratio: 1.586 / 1; padding: 16px 18px; background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%); color: var(--ink-card); display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); }
.face > * { position: relative; z-index: 2; }
.face::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.face::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.face.pat-waves::before { background: repeating-radial-gradient(circle at 120% 130%, transparent 0 9px, rgba(255,255,255,0.06) 9px 10px); }
.face.pat-lines::before { background: repeating-linear-gradient(120deg, transparent 0 7px, rgba(255,255,255,0.045) 7px 8px); }
.face.pat-swoosh::before { background: radial-gradient(130% 90% at 105% 110%, var(--acc) 0 34%, transparent 34.5%), radial-gradient(90% 70% at 110% 120%, color-mix(in srgb, var(--acc) 50%, transparent) 0 46%, transparent 46.5%); opacity: 0.85; }
.face .f-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 0.78rem; font-weight: 600; opacity: 0.92; }
.face .f-mid { display: flex; align-items: center; gap: 12px; }
.face .chipmark { width: 40px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #f7e2a1, #c9a24a 55%, #f1d78a); position: relative; flex: none; }
.face .chipmark::after { content: ""; position: absolute; inset: 7px 10px; border: 1px solid rgba(0,0,0,.22); border-radius: 3px; }
.face .chipmark.silver { background: linear-gradient(135deg, #f2f2f4, #a9abb3 55%, #e4e5e9); }
.face .wave { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; opacity: 0.8; }
.face .f-name { font-size: clamp(1.05rem, 5.2vw, 1.3rem); font-weight: 650; letter-spacing: 0.02em; }
.face .f-bot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.face .f-type { font-size: 0.72rem; font-weight: 600; opacity: 0.8; }
.face .f-net { font-size: 0.9rem; font-weight: 750; font-style: italic; letter-spacing: -0.01em; opacity: 0.95; }
.face.sm { border-radius: 14px; padding: 12px 14px; }
.face.sm .chipmark { width: 30px; height: 22px; }
.face.sm .f-name { font-size: 0.95rem; }

.mini { width: 54px; height: 34px; border-radius: 7px; background: linear-gradient(135deg, var(--c1), var(--c2)); flex: none; position: relative; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.mini::after { content: ""; position: absolute; left: 7px; top: 11px; width: 11px; height: 8px; border-radius: 2px; background: linear-gradient(135deg, #f7e2a1, #c9a24a); opacity: 0.9; }

.ghost { border-radius: 22px; border: 2px dashed var(--field); display: grid; place-items: center; text-align: center; padding: 28px 22px; color: var(--muted); }
.ghost b { font-size: 1.1rem; font-weight: 650; color: var(--ink); display: block; margin-bottom: 4px; }

/* ---------- the answer as a ticket: card face, tear line, stub ---------- */
/* The tear line: a dashed perforation with a half-circle notch bitten out of each edge. */
.meter.left > i { background: var(--good); }
.meter.left.hot > i { background: var(--hot); }
/* Reveal: the card slides up into place, then the stub unrolls down from the tear line (~300 ms). */
@keyframes cardup { from { transform: translateY(22px); opacity: 0; } }
@keyframes unroll { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
/* The stamp: a tilted "Logged" mark that lands on the stub once the payment is saved. */
.btn[data-state="busy"] { opacity: 0.75; }
.btn[data-state="done"] { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }

/* ---------- surfaces ---------- */
.panel { border-radius: 22px; padding: 18px; }
.list { border-radius: 22px; overflow: hidden; }
/* One material for every box of information, in both themes: lit from the top by a wash of the box's own hue
   (--tint; without one, emerald in light and a plain light in dark), a light top edge, a hairline in the same hue
   and a soft lift (dark mode: a light rim and a deep shadow). A box sets --tint for its hue and --box-mark for a
   stripe of its own; nothing else repeats the gradient. Boxes that sit inside another box stay flat. */
:root { --box-tint: var(--accent); --box-wash: 12%; --box-hi: #fff; --box-lo: #f7faf8; }
:root[data-theme="dark"] { --box-tint: #6a6a72; --box-wash: 7%; --box-hi: #1b1b1e; --box-lo: #121214; }
:where(.panel, .list, .tile, .pm-tiles > div, .pm-tile, .rep-card, .cu-list, .ul-list, .monthcard, .hs-card, .pm-wallet, .an-card, .pt-box, .shop-tile,
  .made-you.mk, .pr-proof, .pr-price > div, .sc2, .pkx, .dyk, .pan-strip, .ch, .cxh-row, .nwx, .imp-t, .pu-box, .uw-hero, .uw-block, .uw-steps, .uw-tip, .cp-sec, .tb-sum, .tb-tier, .tb-sec, .liveline, .zero-note, .pw-group, .pw-facts, .tp-form, .act-tile) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint, var(--box-tint)) var(--box-wash), var(--box-hi)), var(--surface) 62%, var(--box-lo));
  box-shadow: var(--box-mark, 0 0 #0000), var(--rim), inset 0 0 0 1px color-mix(in srgb, var(--tint, var(--box-tint)) 14%, var(--lift-line)), var(--lift); }
/* A box inside another box (Cards > card by card, a list inside a panel) lies flat in it */
.lp-card .cp-sec, .lp-card .tile, .panel .list, .sc2 .list, .an-card .list { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
/* Small tiles sit close together: a shorter shadow, so it does not pool between them */
:where(.tile, .pm-tiles > div, .pm-tile, .pr-price > div, .act-tile) { --lift: var(--lift-sm); }
.list > .item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; text-align: left; background: transparent; border: 0; color: inherit; min-height: 60px; transition: background 140ms; }
.list > button.item:active, .list > a.item:active { background: var(--surface-2); }
.list > .item + .item { border-top: 1px solid var(--line); }
.item .t { font-weight: 600; }
.item .amt { font-weight: 600; font-size: 1.05rem; white-space: nowrap; letter-spacing: -0.02em; }
.item .amt.good { color: var(--good); }
.item .amt.zero { color: var(--muted); font-weight: 500; }

.facts { margin: 0; padding: 0; list-style: none; }
.facts li { position: relative; padding-left: 16px; margin-top: 6px; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.notice { border-radius: 16px; padding: 12px 14px; background: var(--warn-bg); color: var(--warn); font-weight: 500; }
.notice.good { background: var(--good-bg); color: var(--good); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.accent { background: var(--accent-soft); color: var(--accent-text); }
.notice a { font-weight: 650; }

.meter { overflow: hidden; }
.meter > i { display: block; height: 100%; min-width: 4px; transform-origin: left center; transition: width 500ms var(--ease); }

/* Limits */

.stat .n { font-size: clamp(1.3rem, 6.4vw, 1.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.stat .l { font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.cardhead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cardblock { margin-top: 26px; }
.cardblock .panel + .panel { margin-top: 10px; }
.perk + .perk { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
details > summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; margin-top: 4px; min-height: 44px; display: flex; align-items: center; }
details p { margin-top: 6px; }

/* Spends */
.date-head { display: flex; justify-content: space-between; font-weight: 620; color: var(--muted); font-size: 0.875rem; margin: 22px 6px 8px; }

/* Next card ranking */
.rank { font-size: 2.2rem; font-weight: 300; line-height: 0.9; color: var(--accent-text); width: 30px; flex: none; letter-spacing: -0.04em; }

/* Score */
.gauge { display: block; width: 100%; max-width: 340px; margin: 0 auto; }
.gauge text { font-family: var(--font); font-variant-numeric: tabular-nums; }
.band-key { display: flex; justify-content: center; gap: 14px; font-size: 0.78rem; font-weight: 650; margin-top: -4px; }
.band-key .b-poor, .band-chip.b-poor { color: #b0262b; }
.band-key .b-fair, .band-chip.b-fair { color: #8a5200; }
.band-key .b-good, .band-chip.b-good { color: #16754a; }
.band-key .b-excellent, .band-chip.b-excellent { color: #005a39; }
.band-row { text-align: center; min-height: 30px; }
.band-chip { display: inline-block; font-size: 0.82rem; font-weight: 650; padding: 5px 12px; border-radius: 99px; background: var(--paper); color: var(--muted); transition: background 260ms var(--ease), color 260ms var(--ease); }
.band-chip.b-poor { background: #fde6e6; }
.band-chip.b-fair { background: #fcefd6; }
.band-chip.b-good { background: #e2f6ee; }
.band-chip.b-excellent { background: #d5f1e4; }
.band-chip.b-off { background: var(--bad-bg); color: var(--bad); }
.bureau-hero { background: var(--solid); color: var(--on-solid); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-sm); }
.bh-t { font-size: 1.05rem; font-weight: 700; }
.bh-s { font-size: 0.85rem; opacity: 0.88; margin-top: 3px; line-height: 1.45; }
.bh-steps { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.bh-steps span { font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, 0.22); }
.bh-go { display: flex; align-items: center; justify-content: center; min-height: 46px; margin-top: 10px; border-radius: 14px; background: #fff; color: var(--accent-text); font-weight: 700; text-decoration: none; transition: transform 140ms var(--ease); }
.bh-go:active { transform: scale(0.97); }
.bureau-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 0.88rem; font-weight: 560; text-decoration: none; }
.chip-link:active { background: var(--accent-soft); }
.score-sheet .gauge { max-width: 260px; }
.score-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.score-meta .input { min-height: 42px; font-size: 0.9rem; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad-key { min-height: 50px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px rgba(14, 26, 21, 0.08); color: var(--ink); font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; transition: transform 110ms var(--ease), background 110ms; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pad-key:active { transform: scale(0.93); background: var(--accent-soft); }
.btn.wait { opacity: 0.55; }
.spark { width: 100%; height: 90px; display: block; }
.fact-state { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.fact-state.good { background: var(--good); }
.fact-state.ok { background: var(--hot); }
.fact-state.bad { background: var(--bad); }
.opts { display: grid; gap: 8px; }
.opts.three { grid-template-columns: repeat(3, 1fr); }
.opts button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; min-height: 48px; padding: 6px 8px; font-weight: 560; transition: background 160ms, color 160ms; }
.opts button[aria-pressed="true"] { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }

/* ---------- home ---------- */
.hello { margin: 4px 0 16px; }
.hello p { margin: 4px 0 0; }
.deck { display: flex; gap: 14px; overflow-x: auto; margin: 0 -18px; padding: 6px 18px 18px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.deck::-webkit-scrollbar { display: none; }
.deck > button { flex: 0 0 82%; border: 0; padding: 0; background: none; scroll-snap-align: center; text-align: left; transition: transform 420ms var(--ease), opacity 420ms; }
.deck > button:not(.on) { transform: scale(0.92); opacity: 0.7; }
.deck-dots { display: flex; justify-content: center; gap: 6px; margin-top: -6px; }
.deck-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--faint); transition: width 300ms var(--ease), background 300ms; }
.deck-dots i.on { width: 18px; background: var(--ink); }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick a { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none; font-weight: 620; transition: transform 160ms var(--ease); }
.quick a:active { transform: scale(0.97); }
.quick a svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.quick a span { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

/* ---------- nav: a floating bar ----------
   Icons only, except the active tab, which shows its label beside the icon on a dark pill that
   slides to it. It floats above the iPhone home indicator; pages leave room below so it never
   covers the last item. Frosted glass: one small blur on the bar itself (16px, the bar's size only), and under it a plain fade
   into the page colour (no blur), so what scrolls below the bar melts away instead of showing through. Where the phone has no
   backdrop blur the bar stays nearly opaque. */
nav.tabs { position: fixed; left: 0; right: 0; bottom: var(--nav-gap); z-index: 20; padding: 0 14px; pointer-events: none; }
nav.tabs::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--nav-gap)); height: calc(var(--nav-h) + var(--nav-gap) + 34px); pointer-events: none;
  background: linear-gradient(to top, var(--paper) calc(var(--nav-gap) + 18px), color-mix(in srgb, var(--paper) 72%, transparent) calc(var(--nav-gap) + var(--nav-h) * .6), transparent); }
nav.tabs .in {
  max-width: 492px; margin: 0 auto; display: flex; align-items: stretch; justify-content: space-between; gap: 2px; height: var(--nav-h); padding: 6px;
  --bar: 255, 255, 255; background: rgba(var(--bar), 0.97);
  border-radius: 999px; pointer-events: auto; position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px var(--line), 0 1px 2px rgba(6, 30, 20, .08), 0 8px 18px -8px rgba(6, 30, 20, .22), 0 22px 40px -18px rgba(6, 30, 20, .34);
}
/* Behind the iPhone clock: once the page scrolls, a thin frosted strip (the status bar's height, soft at its lower edge) keeps
   titles from running under the clock. Green while the sky is under it, the page colour after. Only the app's own pages have it
   (shell() adds it), so sign-in, setup and the opening screens keep their sky full bleed. Zero tall where there is no notch. */
.sb-veil { position: fixed; top: 0; left: 0; right: 0; z-index: 19; height: calc(env(safe-area-inset-top) * 1.3); pointer-events: none; opacity: 0; transition: opacity 180ms;
  background: color-mix(in srgb, var(--paper) 80%, transparent); -webkit-mask-image: linear-gradient(#000 76%, transparent); mask-image: linear-gradient(#000 76%, transparent); }
html.page-scrolled .sb-veil { opacity: 1; }
html.over-sky .sb-veil { background: rgba(15, 46, 35, .84); }
html:is(.in-signin, .in-setup) .sb-veil { display: none; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sb-veil { background: color-mix(in srgb, var(--paper) 66%, transparent); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
  html.over-sky .sb-veil { background: rgba(15, 46, 35, .62); }
  nav.tabs .in { background: rgba(var(--bar), 0.74); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); }
}
nav.tabs .pill { position: absolute; top: 6px; bottom: 6px; left: 0; width: 52px; border-radius: 999px; background: var(--solid); z-index: 0; will-change: transform, width; }
/* Glides in step with the tab widening beside it (same time and curve as nav.tabs a). */
nav.tabs .pill.glide { transition: transform 280ms var(--ease), width 280ms var(--ease); }
nav.tabs a {
  position: relative; z-index: 1; flex: 1 1 0; min-width: 48px; display: flex; align-items: center; justify-content: center; gap: 0;
  text-decoration: none; color: var(--muted); font-size: 0.86rem; font-weight: 640; border-radius: 999px;
  transition: flex-grow 280ms var(--ease), color 200ms, gap 280ms var(--ease);
}
nav.tabs a svg { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform 140ms var(--ease); }
/* The label stays in the accessibility tree; it is only folded away visually when the tab is not active. */
nav.tabs a .lbl { display: inline-block; max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; transition: max-width 280ms var(--ease), opacity 200ms; }
nav.tabs a[aria-current="page"] { color: var(--on-solid); flex-grow: 2.1; gap: 7px; }
nav.tabs a[aria-current="page"] .lbl { max-width: 80px; opacity: 1; transition-delay: 0ms, 80ms; }
nav.tabs a:active svg { transform: scale(0.86); }

/* ---------- sheet + toast ---------- */
.backdrop { will-change: opacity; position: fixed; inset: 0; background: var(--scrim); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade 380ms ease-out; }
.backdrop.closing { animation: fadeout 340ms ease-in forwards; }
.sheet {
  width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto; background: var(--paper); border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(env(safe-area-inset-bottom) + 24px); animation: up 780ms var(--spring) 140ms backwards; touch-action: pan-y; will-change: transform; overscroll-behavior: contain;
}
.sheet.dragging { transition: none; }
.sheet.settle { transition: transform 360ms var(--ease); }
.sheet .grab { width: 100%; height: 44px; margin-top: -10px; display: grid; place-items: center; cursor: grab; touch-action: none; }
/* A visible close button that stays at the top while the sheet scrolls. */
.sheet-x { position: sticky; top: 0; float: right; z-index: 3; width: 36px; height: 36px; margin: -38px -6px 0 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 1.5rem; line-height: 1; box-shadow: var(--shadow-sm); cursor: pointer; }
.sheet-x:active { transform: scale(0.94); }
/* Card screen: key facts, progress bars, and rows that each open a small screen inside the sheet. */
.sheet .cd-bars, .sheet .tiles, .sheet .cd-meter, .sheet .rowlist, .sheet .rate-row, .sheet .cd-hero, .sheet .cd-id, .sheet .upd-foot { flex: none; } /* never squashed inside a stack */
.cd-bars { display: grid; gap: 10px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { border-radius: 14px; padding: 10px 12px; }
.tile span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 2px; }
.tile b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .95rem; font-weight: 640; line-height: 1.25; }
.tile b span { display: inline; margin: 0; font-size: inherit; color: inherit; } /* a figure inside the value (₹1,000 + GST) stays on its line */
.cd-meter { background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-sm); font-size: .9rem; }
.cd-track { height: 8px; border-radius: 4px; background: var(--line); margin-top: 8px; overflow: hidden; }
.cd-track i { display: block; height: 100%; border-radius: 4px; }
.cd-meter .small { margin-top: 6px; }
.rowlist { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.rowitem { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.rowitem + .rowitem { border-top: 1px solid var(--line); }
.rowitem:active { background: var(--paper-2); }
.rowitem svg { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rowitem b { display: block; font-weight: 620; }
.rowitem small { display: block; color: var(--muted); font-size: .82rem; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rowitem .grow { min-width: 0; }
.rowitem .chev { color: var(--muted); font-size: 1.3rem; }
.sub-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sheet-back { border: 0; background: transparent; color: var(--accent-text, #0a6b46); font: inherit; font-weight: 600; min-height: 36px; padding: 0; cursor: pointer; }
.rate-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-sm); }
.rate { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; min-width: 62px; }
/* No double-tap zoom anywhere; buttons and links react at once. */
html { touch-action: manipulation; }
.sheet .grab::before { content: ""; width: 42px; height: 5px; border-radius: 4px; background: var(--faint); }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
/* Speaking: emerald bars rise and fall while the phone listens; your words appear large below them. */
.listening { text-align: center; }
.mic-orb { position: relative; width: 84px; height: 84px; margin: 6px auto; border-radius: 50%; background: var(--solid); display: grid; place-items: center; color: #fff; }
.mic-orb svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 2; }
.mic-orb i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--solid); opacity: 0; animation: orbring 2.2s ease-out infinite; }
.mic-orb i + i { animation-delay: 1.1s; }
.mic-orb.heard i { animation-duration: 1.2s; }
.mic-orb.heard { box-shadow: 0 0 0 6px color-mix(in srgb, var(--solid) 22%, transparent); }
.mic-orb.busy { opacity: 0.55; }
.mic-orb.busy i { animation: none; }
@keyframes orbring { from { transform: scale(1); opacity: 0.55; } to { transform: scale(1.9); opacity: 0; } }

.said-interim { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .mic-orb i { animation: none; }}
.listening .lis { margin: 0; color: var(--accent-text); font-weight: 600; font-size: 0.9rem; }
.listening .bars { display: flex; justify-content: center; align-items: center; gap: 6px; height: 52px; }
.listening .bars i { width: 6px; height: 12px; border-radius: 3px; background: var(--bright); animation: wave 1s ease-in-out infinite; }
.listening .bars i:nth-child(2), .listening .bars i:nth-child(8) { animation-delay: 120ms; }
.listening .bars i:nth-child(3), .listening .bars i:nth-child(7) { animation-delay: 240ms; }
.listening .bars i:nth-child(4), .listening .bars i:nth-child(6) { animation-delay: 360ms; }
.listening .bars i:nth-child(5) { animation-delay: 480ms; }
@keyframes wave { 50% { height: 44px; } }
.listening .said { margin: 0; min-height: 2.7em; font-size: 1.4rem; font-weight: 650; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.listening .said:empty { display: none; }
.listening .row { gap: 10px; }
.listening .row > .btn { flex: 1; }
@media (prefers-reduced-motion: reduce) {
  .listening .bars i { animation: none; height: 22px; }
  .listening .bars i:nth-child(odd) { height: 32px; }}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--nav-gap) + 16px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { color: var(--surface); max-width: 480px; box-shadow: var(--shadow); animation: toast 420ms var(--spring); }
.toast.bad { background: var(--bad); }
.toast.has-action { pointer-events: auto; display: flex; align-items: center; }
.toast-btn { border: 0; }
.toast-btn:active { transform: scale(0.96); }
/* Spends: a new row slides down into the list; a deleted one folds away. */
.list > .item.new { animation: rowin 280ms var(--ease) both; }
@keyframes rowin { from { transform: translateY(-10px); opacity: 0; } }
.toast.out { animation: fadeout 240ms ease-in forwards; }
@keyframes toast { from { transform: translateY(16px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- landing + sign in ---------- */
.landing { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.landing .brand { margin-top: 4px; }
@keyframes deal { from { transform: translate(0, 60px) rotate(0deg) scale(0.9); opacity: 0; } }
@keyframes sheen { 0%, 55% { background-position: 120% 0; } 100% { background-position: -40% 0; } }
.landing h1 { font-size: clamp(2.1rem, 10vw, 2.7rem); letter-spacing: -0.035em; animation: rise 700ms 420ms var(--ease) both; }
.landing .lede { color: var(--muted); margin-top: 10px; animation: rise 700ms 520ms var(--ease) both; }

@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.codebox { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.codebox input { width: 100%; min-width: 0; height: 60px; border-radius: 16px; border: 1.5px solid var(--field); background: var(--surface); text-align: center; font-size: 1.6rem; font-weight: 500; transition: border-color 160ms, transform 200ms var(--spring), box-shadow 160ms; }
.codebox input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.codebox input.filled { border-color: var(--ink); transform: translateY(-2px); }
.codebox.shake { animation: shake 420ms; }
.signin-code { padding: 16px; border-radius: 16px; background: var(--good-bg); color: var(--ink); text-align: center; font-size: 2.1rem; font-weight: 500; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- animation keyframes shared by the sign-in and welcome screens ---------- */
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateX(1.5px) rotate(3deg); } }

/* ---------- sign in: an emerald welcome edge to edge (what the app does, a wallet of cards),
   then the buttons on the emerald, or a form on a white sheet that rises from the bottom ---------- */
.signin {
  position: fixed; inset: 0; z-index: 1; overflow: hidden; display: flex; flex-direction: column;
  background: var(--solid); color: #fff; padding-top: calc(env(safe-area-inset-top) + 10px);
}
/* The green stays put behind the sign-in page: the page under it is green too (html.in-signin), and the sheet never
   rubber-bands, so scrolling or a bounce never shows a light strip or drags the green along. */
html.in-signin, html.in-signin body { background: var(--solid); }
.signin { overscroll-behavior: none; overflow-x: hidden; } /* the fanned cards' corners never make the page slide sideways */
.signin .brand { padding: 0 22px; color: #fff; }
.signin .art { flex: 1; display: flex; flex-direction: column; padding: 14px 22px 0; }
.hero { flex: 1; display: flex; flex-direction: column; }
.hero-title { margin: 0; max-width: 14ch; font-size: clamp(1.95rem, 8.8vw, 2.5rem); line-height: 1.1; font-weight: 720; letter-spacing: -0.035em; animation: rise 600ms 120ms var(--ease) both; }
.perks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; color: #d9f5e9; font-size: 0.96rem; animation: rise 600ms 220ms var(--ease) both; }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks svg { width: 19px; height: 19px; flex: none; stroke: #9fe0c2; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-height: 600px) { .cf-slot { display: none; } .signin .art { flex: 0 0 auto; padding: 6px 22px 8px; }} /* only very short screens lose the wallet */
@media (max-height: 740px) {
  .hero-title { font-size: 1.7rem; max-width: 18ch; }
  .perks { margin-top: 10px; gap: 6px; font-size: 0.9rem; }
  .sheet-in.clear { padding-top: 4px; padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }}
/* A long sheet (the first-sign-in notice) needs the room, so the welcome steps aside. */
.signin.long .art { display: none; }
.signin.long .sheet-in { flex: 1; margin-top: 14px; }
/* The long notice scrolls inside its white sheet: the green and the name above it stay where they are. */
.signin.long { overflow: hidden; }
.signin.long .sheet-in { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
/* Sign-in and setup are one fixed screen, like an app: the page under them never scrolls or bounces (on an iPhone it
   otherwise drags everything, green and cards too, and shows a light strip). Only a white sheet with more in it than
   fits scrolls, inside itself. Dragging on the green or the cards does nothing. */
html:has(#app > .signin), html:has(#app > .ob) { height: 100%; overflow: hidden; overscroll-behavior: none; }
html:has(#app > .signin) body, html:has(#app > .ob) body { position: fixed; inset: 0; overflow: hidden; overscroll-behavior: none; }
.ob-sky, .signin .brand, .signin .art { touch-action: none; }
/* Any sign-in sheet taller than the room left (a code step on a small phone) scrolls inside itself, like the long one. */
.signin .sheet-in { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
/* The wallet shrinks to the room left between the words and the sheet, so the whole sign-in fits on one screen on
   every phone; only where there is no real room for it does it step aside. */
@supports (container-type: size) {
  .signin .art { flex: 1 1 0%; }
  .signin .cf-slot { display: flex; min-height: 0; container-type: size; }
  .signin .cf-slot .cf { --cw: min(60vw, 250px, calc((100cqh - 40px) * 1.15)); }
  @container (max-height: 130px) { .signin .cf-slot .cf { display: none; }}}
.sheet-in { color: var(--ink); background: var(--surface); border-radius: 30px 30px 0 0; padding: 26px 22px calc(env(safe-area-inset-bottom) + 28px); box-shadow: 0 -12px 40px -24px rgba(6, 30, 20, 0.35); animation: sheetup 380ms 80ms cubic-bezier(.16, 1, .3, 1) both; }
.sheet-in.clear { color: #fff; background: transparent; box-shadow: none; padding-top: 10px; margin-top: auto; }
.sheet-in.clear .private, .sheet-in.clear .muted, .sheet-in.clear a { color: #d9f5e9; }
.sheet-in.clear .private { margin: 2px 0 0; text-align: center; }
/* "I agree" tick box above the buttons. Tapping a button before ticking gives it a small shake. */
.agree { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; line-height: 1.45; cursor: pointer; }
.agree input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--ink); }
.sheet-in.clear .agree a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.agree.nudge { animation: nudge 360ms ease-in-out; }
@keyframes nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
/* The three ways in, each with its own mark. Apple and mobile number are not open yet. */
.brand-btn { justify-content: flex-start; gap: 12px; padding: 0 20px; }
.brand-btn svg.bi { width: 20px; height: 20px; stroke: none; }
.brand-btn .soon { margin-left: auto; font-size: 0.75rem; font-weight: 600; opacity: 0.7; }
.brand-btn.google { background: #fff; color: var(--ink); border-color: #fff; }
/* Sign in with Apple: Apple's black button, the same size as Google's (Apple's rules). */
.brand-btn.apple { background: #000; color: #fff; border-color: #000; }
.brand-btn.apple svg.bi { width: 20px; height: 20px; margin-top: -2px; }
.sheet-in:not(.clear) .brand-btn.apple { background: #000; color: #fff; border-color: #000; }
/* On a dark screen Apple's white style, so the button does not vanish into the sheet. */
:root[data-theme="dark"] .brand-btn.apple, :root[data-theme="dark"] .sheet-in:not(.clear) .brand-btn.apple { background: #fff; color: #000; border-color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes sheetup { from { transform: translateY(70%); opacity: 0.4; } }
.sheet-in h1 { font-size: clamp(1.7rem, 7.6vw, 2rem); }
.sheet-in .swap { animation: fade 200ms ease-out both; }
.codebox input.pop { animation: pop-in 160ms ease-out; }
@keyframes pop-in { 50% { transform: translateY(-2px) scale(1.08); } }
.codebox { position: relative; }
.codebox.ok input { border-color: var(--good); background: var(--good-bg); color: var(--good); }
.codebox .okmark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.codebox .okmark span { width: 46px; height: 46px; border-radius: 50%; background: var(--solid); display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgba(0, 122, 78, 0.6); animation: tick 220ms cubic-bezier(.16, 1, .3, 1) both; }
.codebox .okmark svg { width: 24px; height: 24px; stroke: var(--on-solid); fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
@keyframes tick { from { transform: scale(0.4); opacity: 0; } }
.resend { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.resend .count { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }

/* ---------- "Signing you in" and the shared loader: a small card gliding along a dotted curve ---------- */
#app.dimmed > * { opacity: 0.25; transition: opacity 260ms ease-out; pointer-events: none; }
.signing { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; text-align: center; padding: 24px; animation: fade 200ms ease-out both; }
.signing.out { animation: fadeout 450ms ease forwards; }
.signing h2, .signing p { transition: opacity 250ms ease; }
.loader.done .lc { transform: scale(1.25); transition: transform 350ms cubic-bezier(.3,1.6,.5,1); }
.loader.done .lc::after { content: "\2713"; left: 0; top: 0; width: 100%; height: 100%; background: none; color: #fff; font-size: 15px; line-height: 22px; text-align: center; }
#app.rise > * { animation: rise 500ms cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) { #app.rise > * { animation: none; } .signing.out { animation-duration: 1ms; }}
.signing h2 { margin: 18px 0 4px; font-size: 1.3rem; }
.loader { position: relative; width: 200px; height: 72px; margin: 0 auto; }
.loader svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.loader path { fill: none; stroke: var(--faint); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 0.1 9; }
.loader .lc { position: absolute; left: 0; top: 0; width: 34px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #007a4e, #00c27a); box-shadow: 0 6px 14px -6px rgba(0, 122, 78, 0.7);
  offset-path: path("M 12 62 C 60 -8, 140 -8, 188 62"); offset-rotate: auto; offset-anchor: center; offset-distance: 0%; }
.loader .lc::after { content: ""; position: absolute; left: 5px; top: 7px; width: 8px; height: 6px; border-radius: 2px; background: linear-gradient(135deg, #f7e2a1, #c9a24a); }
.loader.small { transform: scale(0.62); transform-origin: top center; height: 46px; }
/* The tail behind the big loader's card: paler copies that follow it */
.loader .lc.g { background: rgba(255, 255, 255, .5); box-shadow: none; transition: opacity 150ms; }
.loader .lc.g.g2 { background: rgba(255, 255, 255, .28); }
.loader .lc.g::after, .loader.done .lc.g::after { display: none; }
/* "Signing you in" sits on the opening's emerald, so its words, dots and card are white: dark words were lost on it */
.signing { background: #0f2e23 radial-gradient(120% 70% at 50% 40%, #17573f 0%, #0f2e23 55%, #0b241b 100%) no-repeat; }
.signing h2 { color: #fff; }
.signing p { color: rgba(255, 255, 255, .75); }
.signing .loader path { stroke: rgba(255, 255, 255, .6); }
.signing .loader .lc:not(.g) { box-shadow: 0 0 0 1px rgba(255, 255, 255, .28), 0 10px 22px -8px rgba(0, 0, 0, .6), 0 0 16px rgba(255, 255, 255, .2); }

/* ---------- setup ---------- */
.setup { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.progress { display: flex; gap: 6px; margin: 6px 0 26px; }
.progress i { flex: 1; height: 4px; border-radius: 3px; background: var(--paper-2); overflow: hidden; position: relative; }
.progress i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 500ms var(--ease); }
.progress i.done::after { transform: none; }
.step { animation: stepin 460ms var(--ease) both; }
.step.back { animation-name: stepback; }
@keyframes stepin { from { transform: translateX(28px); opacity: 0; } }
@keyframes stepback { from { transform: translateX(-28px); opacity: 0; } }
.step h1 { margin-bottom: 8px; }
.step .lede { color: var(--muted); margin-bottom: 20px; }
.setup .foot { margin-top: auto; padding-top: 24px; display: flex; gap: 10px; }

@keyframes pop { from { transform: scale(0.6); opacity: 0; } }

/* ---------- Claude: advisor note and research review ---------- */
.advisor-note { margin-top: 12px; padding: 14px 16px; border-radius: 18px; background: var(--accent-soft); color: var(--ink-2); animation: rise 260ms var(--ease) both; }
.advisor-note p { margin: 6px 0 0; line-height: 1.5; }
.advisor-note .who { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--accent-text); }
.advisor-note .who svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.advisor-note.pending { background: var(--surface); }
.advisor-note.pending .sk-line { margin-top: 10px; }
.advisor-note .ai-text.typing { padding-top: 2px; }
.advisor-note .ai-text.typing .sk-line { margin-top: 10px; }
.research { border-top: 1px solid var(--line); padding-top: 14px; }
.research h3 { margin: 0; }
.finds { display: grid; gap: 8px; }
.find { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; }
.find input[type="checkbox"] { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--ink); }
.find .quote { color: var(--ink-2); font-style: italic; margin-top: 4px; }
.find .src { display: inline-block; margin-top: 4px; font-weight: 600; color: var(--accent-text); text-decoration: none; min-height: 24px; }

/* ---------- profile ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--solid); color: var(--on-solid); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em; }
.avatar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.35rem; box-shadow: 0 0 0 4px var(--surface), var(--shadow-sm); }
.avatar.lg svg { width: 30px; height: 30px; }
img.avatar { display: block; object-fit: cover; background: var(--paper-2); }
.iconbtn.me { padding: 0; }
.iconbtn.me[aria-current="page"] { background: var(--surface); box-shadow: 0 0 0 2px var(--ink); }
.pm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.pm-tiles > div { border-radius: 14px; padding: 10px 14px; }
.pulse { animation: pulse 1.4s var(--ease) 1; border-radius: 16px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.deck > button.on .face.sm { width: 100%; }

/* page change: the old page fades out on top while the new one settles in (driven from app.js) */
#main { position: relative; }
#main > .leaving { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  /* The waking-server line is a message, not motion: it still waits 4 seconds before appearing. */
  .wake-note { animation-delay: 4s !important; }}

/* ---------- Adding spends: the hub, "To check", statement review and the automation guide ---------- */
.list > .item.hub { cursor: pointer; font: inherit; }
.hub-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.hub-ic svg, .item .chev { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.item .chev { width: 18px; height: 18px; color: var(--faint); flex: none; }
.list > .item.inbox-item{ flex-direction: column; align-items: stretch; gap: 10px; }
.inbox-item .row{ gap: 12px; }
.mini.blank { background: var(--paper-2); box-shadow: inset 0 0 0 1.5px var(--field); }
.mini.blank::after { display: none; }
nav.tabs a .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; line-height: 1; pointer-events: none; }
nav.tabs a[aria-current="page"] .badge { left: auto; right: 8px; }
/* ---------- The Automatic tracking setup wizard: one short step per screen ---------- */
.wiz-bar { display: flex; gap: 4px; }
.wiz-bar i { flex: 1; height: 5px; border-radius: 3px; background: var(--paper-2); }
.wiz-bar i.on { background: var(--bright); }
.wiz-t { margin: 4px 0 0; font-size: 1.3rem; line-height: 1.25; }
.wiz-p { margin: 0; color: var(--ink-2); font-size: 1rem; }
.wiz-shot { background: #1c1c1e; border-radius: 16px; padding: 12px; }
.wiz-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #2c2c2e; color: #f2f2f7; border-radius: 10px; padding: 9px 11px; margin-bottom: 6px; font-size: .9rem; }
.wiz-row:last-child { margin-bottom: 0; }
.wiz-r { color: #9a9aa0; }
.wiz-row.hl { outline: 2px solid var(--bright); outline-offset: 2px; position: relative; }
.wiz-row.hl::after { content: ''; position: absolute; right: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bright); }
.wiz-row.hl .wiz-r { color: #f2f2f7; }

/* ---------- Skeleton loading: the page's own shape, with a soft light passing over it ---------- */
.sk { position: relative; overflow: hidden; background: var(--paper-2); border-radius: 14px; }
.sk::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: sk-sweep 1.3s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes sk-sweep { to { transform: translateX(100%); } }
.sk-line { height: 13px; border-radius: 7px; }
.sk-line.title { height: 26px; border-radius: 9px; }
.sk-line.thin { height: 10px; }
.sk-line.gap { margin: 26px 6px 10px; }
.skeleton { animation: fade 220ms ease-out both; }
.skeleton > * + * { margin-top: 16px; }
.sk-head { padding-top: 6px; }
.sk-head > * + * { margin-top: 10px; }
.sk-list .item { gap: 12px; }
.sk-list .item .grow > * + * { margin-top: 8px; }
.sk-list .sk { background: var(--surface-2); }
.sk-mini { width: 54px; height: 34px; border-radius: 7px; flex: none; }
.sk-card { border-radius: 22px; }
.sk-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sk-pill { border-radius: 999px; }
.sk-chips { display: flex; gap: 8px; overflow: hidden; }
.sk-chip { width: 84px; flex: none; border-radius: 999px; }
.sk-panel { border-radius: 22px; }
.sk-prof { display: flex; align-items: center; gap: 14px; }
.sk-prof .grow > * + * { margin-top: 10px; }
.sk-avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.sk-dot { display: block; width: 44px; height: 44px; border-radius: 50%; }
.wake-note { text-align: center; margin: 22px 0 0; animation: fade 400ms 4s ease-out both; }

/* ---------- Motion: things give a little under your finger, and rows leave gently ---------- */
.list > .item.hub, .list > button.item, .list > a.item { transition: background 140ms, transform 160ms var(--ease); }
.list > .item.hub:active, .list > button.item:active, .list > a.item:active { transform: scale(0.985); }
.iconbtn { transition: transform 160ms var(--ease); }
.iconbtn:active { transform: scale(0.92); }
.item.leaving { transition: opacity 200ms ease, transform 220ms var(--ease); opacity: 0; transform: translateX(24px); }
@media (prefers-reduced-motion: reduce) {
  .sk::after { animation: none; }}

/* Setup: each card ticked off as its latest benefits are checked */
.checks { list-style: none; margin: 20px auto 0; padding: 0; max-width: 340px; text-align: left; }

.chk-dot { display: grid; place-items: center; }
.chk-dot.done { background: var(--paper-2); color: var(--muted); animation: pop 320ms var(--spring); }

.chk-dot svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Compare cards: one row per fact, one column per card ---------- */
.cmp { background: var(--surface); border-radius: 22px; padding: 14px 14px 6px; }
.cmp-head, .cmp-vals { display: grid; gap: 10px; }
.cmp-head { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 4px 0 12px; border-bottom: 1px solid var(--line, #e7e5ee); }
.cmp-card { all: unset; cursor: pointer; display: grid; gap: 4px; justify-items: start; min-width: 0; }
.cmp-card .mini { width: 46px; height: 30px; }
.cmp-card .t { font-weight: 600; overflow-wrap: anywhere; }
.cmp-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.cmp-row { padding: 12px 0; border-bottom: 1px solid var(--line, #e7e5ee); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.cmp-val { font-size: 0.9rem; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.cmp-val.best { color: var(--ink); }
.cmp-val .tag { display: table; margin-top: 4px; }
.cmp-pick { margin: 4px 0 0; }
.cmp-pick summary { cursor: pointer; font-weight: 600; }
.cmp-pick .chips { margin-top: 8px; }
.cmp-list { margin: 0; padding-left: 16px; display: grid; gap: 4px; }

/* ---------- Home: ask first, your cards, answers for your shops, the month in money ---------- */
.home .hello { margin: 2px 0 14px; }
.home .hello .greet { margin: 0 0 2px; color: var(--muted); font-weight: 600; }
.ask-cta {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 5px 5px 5px 18px; margin-bottom: 18px;
  border: 0; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 1.02rem; text-align: left;
  box-shadow: var(--shadow); transition: transform 140ms var(--ease);
}
.ask-cta:active { transform: scale(0.985); }
.ask-cta > svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ask-cta > span:not(.go) { flex: 1; }
.ask-cta .go { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--solid); color: var(--on-solid); flex: none; }
.ask-cta .go svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The one bold thing: the month in money, on emerald. */

.textlink { color: var(--accent-text); font-weight: 650; text-decoration: none; }

/* ---------- Pick: example questions for the AI, and where your money goes ---------- */
.ask-examples { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; scrollbar-width: none; }
.ask-examples::-webkit-scrollbar { display: none; }
.ask-examples .chip-link { flex: none; white-space: nowrap; }
.share-bar { display: flex; gap: 3px; height: 8px; margin: 10px 0 4px; }
.share-bar i { border-radius: 4px; background: var(--accent-text); }

/* ---------- Pick: the AI conversation about one payment ---------- */
.ai-thread { display: flex; flex-direction: column; }
.you-said { align-self: flex-end; max-width: 82%; margin-top: 12px; padding: 8px 12px; border-radius: 16px 16px 4px 16px; background: var(--ink); color: var(--surface); font-size: 0.92rem; }
/* Where Pick scrolls an answer to: clear of the strip behind the clock (.sb-veil, 1.3 x the safe area) with a little room */
.pick .you-said, .pick .heard > .notice, .pick .pick-answer { scroll-margin-top: calc(env(safe-area-inset-top) * 1.3 + 16px); }
.pick .heard:not(:empty) + div > .pick-answer { margin-top: 12px; }
.followups { margin-top: 6px; }
.followups .ask-examples { margin-top: 4px; }
.small-ask { margin: 8px 0 4px; }

/* ---------- Welcome when opening the app: cards float up and fan out, then your greeting ---------- */
.welcome { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: var(--paper); transition: opacity 450ms ease, transform 550ms cubic-bezier(.2,.8,.2,1); }
.welcome { will-change: opacity, transform; }
.welcome.out { opacity: 0; transform: translateY(-30px) scale(.97); pointer-events: none; }
.wc-greet { margin: 26px 0 2px; color: var(--muted); animation: rise 500ms 450ms cubic-bezier(.2,.8,.2,1) both; }
.wc-name { margin: 0; font-size: 1.9rem; min-height: 1.2em; animation: rise 550ms 650ms cubic-bezier(.2,.8,.2,1) both; }
.wc-name.late { animation: fade 400ms ease-out both; }
@media (prefers-reduced-motion: reduce) { .wc-greet, .wc-name { animation: none; } .welcome { transition: none; }}

/* ---------- Spends: the month report ---------- */
.report { margin-bottom: 18px; }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.report-head .section { margin: 0; }
.mo-switch { position: relative; display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: var(--paper-2); }
.mo-switch button { all: unset; position: relative; z-index: 1; padding: 5px 13px; border-radius: 99px; font-size: 0.82rem; color: var(--muted); cursor: pointer; transition: color 250ms; }
.mo-switch button[aria-pressed="true"] { color: var(--paper); } /* the pill is ink: white in light, dark in dark */
.mo-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mo-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 99px; background: var(--ink); transition: left 350ms cubic-bezier(.3,1.3,.5,1), width 350ms; }
.rep-card { margin-top: 12px; padding: 16px; border-radius: 20px; animation: rise 420ms var(--ease) both; }
.rep-card + .rep-card { animation-delay: 80ms; }
.rep-card + .rep-card + .rep-card { animation-delay: 160ms; }

.mini.rep-chip { width: 22px; height: 14px; border-radius: 3px; }
.rep-gain { white-space: nowrap; font-weight: 650; font-size: 0.85rem; color: var(--band-excellent); background: color-mix(in srgb, var(--band-excellent) 12%, transparent); border-radius: 9px; padding: 2px 8px; }
@keyframes rep-slide { from { opacity: 0; transform: translateX(-10px); } }
.rep-where { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.rep-donut-wrap { position: relative; flex: none; width: 116px; height: 116px; }
.rep-donut { width: 116px; height: 116px; }
.rep-donut circle { cursor: pointer; transition: opacity 250ms, stroke-width 250ms; }
.rep-donut circle.dim { opacity: .28; }
.rep-donut circle.on { stroke-width: 19; }
.rep-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; padding: 0 22px; }
.rep-mid b { font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.rep-mid span { font-size: 0.7rem; line-height: 1.2; }
.rep-types { flex: 1; min-width: 0; }
.rep-type { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 10px 1fr auto; gap: 3px 8px; align-items: center; padding: 5px 6px; border-radius: 10px; cursor: pointer; font-size: 0.86rem; transition: opacity 200ms, background 200ms; }
.rep-type > i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.rep-type .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-type .num { font-variant-numeric: tabular-nums; font-size: 0.8rem; }
.rep-tbar { grid-column: 2 / 4; height: 5px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.rep-tbar b { display: block; height: 100%; width: var(--w); border-radius: 3px; background: var(--c); }
.rep-types.picked .rep-type { opacity: .35; }
.rep-types.picked .rep-type.on { opacity: 1; background: var(--paper); }
.rep-type:focus-visible { outline: 2px solid var(--accent); }
@media (prefers-reduced-motion: reduce) { .rep-card { animation: none; } .mo-pill { transition: none; }}
.best-hint { padding: 12px; border-radius: 14px; background: var(--paper); animation: rise 300ms var(--ease) both; }
.best-bar { display: flex; justify-content: space-between; margin-top: 6px; padding: 9px 12px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
.say-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.say-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Points screen ---------- */

button.textlink { all: unset; color: var(--accent-text); font-weight: 650; cursor: pointer; font-size: 0.85rem; }
button.textlink:focus-visible { outline: 2px solid var(--accent); }
.pts-line { border-top: 1px solid var(--line); font-size: 0.9rem; animation: rep-slide 320ms var(--d) var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .pts-line { animation: none; }}

/* ---------- Check for updates: steps while the AI researches a card ---------- */
.chk-steps { display: grid; gap: 4px; padding: 6px 0; }
.chk-step { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 0.9rem; opacity: .4; transition: opacity 300ms; }
.chk-step.on, .chk-step.done { opacity: 1; }
.chk-dot { position: relative; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); }
.chk-step.on .chk-dot { border-color: var(--accent); border-top-color: transparent; animation: chk-spin 800ms linear infinite; }
.chk-step.done .chk-dot { background: var(--accent); border-color: var(--accent); }
.chk-step.done .chk-dot::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes chk-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .chk-step.on .chk-dot { animation: none; border-top-color: var(--accent); }}

/* Tap targets of at least 24 × 24 (WCAG 2.5.8): small text links and tick boxes. */
a.small, a.textlink, button.textlink { display: inline-flex; align-items: center; min-height: 24px; }
input[type="checkbox"] { min-width: 24px; min-height: 24px; }

/* A folded section: its heading is the tap target, with a chevron that turns when open. */
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; }
details.fold > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 200ms; margin-right: 6px; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold[open] > summary { margin-bottom: 10px; }

/* ---------- Analysis tab ---------- */

.rep-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rep-kpis > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rep-kpis > div { min-width: 0; container-type: inline-size; padding: 8px 10px; border-radius: 12px; background: var(--paper); display: flex; flex-direction: column; gap: 2px; }
.rep-kpis b { font-size: clamp(.62rem, calc(100cqw / (var(--n, 8) * .7)), 1.1rem); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rep-trend { display: flex; align-items: flex-end; gap: 8px; height: 84px; margin: 14px 0 6px; }
.rt { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.rt-bar { width: 70%; height: var(--h); min-height: 0; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--accent) 22%, var(--paper-2)); }
.rt.on .rt-bar { background: var(--accent); }
.rt-m { font-size: 0.7rem; color: var(--muted); }
.rt.on .rt-m { color: var(--ink); font-weight: 650; }

.rep-card details > summary { cursor: pointer; padding: 8px 0 2px; color: var(--accent-text); font-weight: 650; }
.rep-card.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rep-card.fold > summary::-webkit-details-marker { display: none; }
.rep-card.fold > summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 200ms; margin-left: 6px; }
.rep-card.fold[open] > summary::after { transform: rotate(-135deg); }
.rep-card.fold > summary > span { margin-left: auto; }
.rep-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.rep-card.fold[open] > summary + .rep-row { margin-top: 8px; }
.rep-hit { white-space: nowrap; font-size: 0.75rem; font-weight: 650; padding: 2px 8px; border-radius: 9px; margin-left: 6px; }
.rep-hit.good { color: var(--band-excellent); background: color-mix(in srgb, var(--band-excellent) 12%, transparent); }
.rep-hit.warn { color: var(--band-fair-text); background: color-mix(in srgb, var(--band-fair) 14%, transparent); }
.rep-hit.bad { color: var(--band-poor); background: color-mix(in srgb, var(--band-poor) 12%, transparent); }
.rep-hit.muted-tag { color: var(--muted); background: var(--paper-2); }
.rep-detail { margin-top: 10px; min-height: 22px; }

.rep-row.top { align-items: flex-start; }
.rep-row.top .rep-chip { margin-top: 3px; }

/* ---------- Points tab (redesign) ---------- */
.pts input[type="range"] { width: 100%; margin: 10px 0 4px; accent-color: var(--accent); }

.pts-ic { flex: none; width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.pts-ic.bad { background: color-mix(in srgb, var(--band-poor) 14%, transparent); }
.pts-ic.warn { background: color-mix(in srgb, var(--band-fair) 18%, transparent); }
.pts-ic.good { background: color-mix(in srgb, var(--band-excellent) 13%, transparent); }
.pts-ic.blue { background: #e7efff; }

/* ---------- Home: bigger cards, the compact month card, the card strip ---------- */
.home .deck > button { flex-basis: 90%; }
.monthcard { display: block; margin-top: 12px; padding: 10px 14px 8px; border-radius: 22px; color: var(--ink); text-decoration: none; }
.mc-top { display: flex; align-items: center; gap: 12px; }
.mc-big { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--accent-text); }
.mc-big .money .p { color: color-mix(in srgb, var(--accent-text) 60%, transparent); }
.mc-miss { color: var(--band-poor); font-weight: 650; }
.mc-ok { color: var(--band-excellent); font-weight: 650; }
.mc-score { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mc-ring { position: absolute; inset: 0; }
.mc-ring .mc-arc { animation: mc-draw 2000ms var(--ease) both; }
@keyframes mc-draw { from { stroke-dasharray: 0 163.4; } }
.mc-score b { position: relative; line-height: 1; }
.mc-score span { position: relative; color: var(--muted); }
.mc-foot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); color: var(--ink-2, var(--ink)); }
.mc-foot .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-foot .more { flex: none; color: var(--accent-text); font-weight: 650; }
.hs-strip { display: flex; gap: 10px; overflow-x: auto; padding: 10px 18px 6px; margin: 0 -18px; scroll-padding-left: 18px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hs-strip::-webkit-scrollbar { display: none; }
.hs-card { position: relative; flex: none; width: 132px; padding: 10px 11px 12px; border-radius: 18px; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 3px; scroll-snap-align: start; }
.hs-face { display: block; height: 6px; border-radius: 3px; margin-bottom: 6px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.hs-ring { width: 46px; height: 46px; }
.hs-card .small { line-height: 1.3; }
.hs-badge { position: absolute; top: 14px; right: 9px; padding: 1px 7px; border-radius: 9px; font-size: 0.68rem; font-weight: 700; background: #fde68a; color: #7a4b00; }
/* Long shop names wrap instead of running into the amount. */
.item > .grow { min-width: 0; }
.item .t { overflow-wrap: anywhere; }
.item .amt, .item > div[style*="text-align:right"] { flex: none; }

/* ---------- Cards > Limits & perks ---------- */

.lp-hero { padding: 16px; border-radius: 22px; color: #fff; background: linear-gradient(155deg, #0d2a4a, #1e4f8f 55%, #3b82f6); box-shadow: 0 14px 30px -18px rgba(13, 42, 74, .7); }
.lp-hero .o80 { color: rgba(255, 255, 255, .8); }
.lp-big { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.lp-kpis > div { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .13); display: flex; flex-direction: column; }
.lp-kpis b { font-size: 1rem; }
.lp-line { padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.lp-card .row:first-child + .lp-line { margin-top: 8px; }
.lp-line .meter { margin: 6px 0 4px; }

.bad-text { color: var(--band-poor); }
@media (prefers-reduced-motion: reduce) { .mc-ring .mc-arc { animation: none; }}

/* "N more" opens the rest; the button then sits below them as "Show less", with an arrow. */
.more-btn { all: unset; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-top: 4px; color: var(--accent-text); font-weight: 650; font-size: 0.85rem; cursor: pointer; }
.more-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 200ms; }
.more-btn[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }
.more-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.more-rest:not([hidden]) > * { animation: rise 260ms var(--ease) both; }
/* Points: real card faces, and the chosen card's details under them. */
.pts-cards { margin-top: 10px; }
.pts-cards > button { flex-basis: 84%; }
.hs-card .small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Home: reminder pop-up, quick links; Refer and earn ---------- */
.due-list { display: flex; flex-direction: column; }
.due-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.due-item:first-child { border-top: 0; }
.due-item .btn { margin-top: 8px; }

/* Points card faces: this month's spend in the middle */
.face .f-stat { align-items: flex-end; }
.face .f-amt { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.face .f-sub { font-size: 0.78rem; opacity: 0.85; margin-top: 2px; }
.face .f-top > span + span { background: rgba(0,0,0,.22); padding: 2px 8px; border-radius: 999px; }
.due-steps { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--paper-2); }

/* Points: money you can take out today */
.redeem-ok { margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--band-good) 14%, transparent); }
.warn-text { color: var(--warn); }

/* Support: the reply under a message */
.support-reply { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--good-bg); color: var(--good); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Home: Coming up as a short dated list */
.cu-list { margin-top: 10px; border-radius: 18px; padding: 2px 14px; }
.cu-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.cu-row + .cu-row, .cu-more { border-top: 1px solid var(--line); }
.cu-date { flex: none; width: 42px; padding: 5px 0; border-radius: 12px; background: var(--paper-2); text-align: center; line-height: 1.1; }
.cu-date b { display: block; font-size: 1.05rem; }
.cu-date span { font-size: .7rem; color: var(--muted); }
.cu-date.hot { background: var(--bad-bg); color: var(--bad); }
.cu-date.hot span { color: var(--bad); }
.cu-more { width: 100%; padding: 10px 0; border-width: 1px 0 0; background: none; font: inherit; color: var(--muted); font-size: .85rem; cursor: pointer; }
/* Pick: sale check */

/* Home: money made, and Card Coins */
.coins-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 9px; min-height: 30px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: .8rem; color: var(--ink); cursor: pointer; white-space: nowrap; }
/* Top bar: logo, streak, coins and picture are about the same height, all on one line. */
.topbar { flex-wrap: nowrap; }
.topbar .row { flex-wrap: nowrap; align-items: center; gap: 6px !important; }
.topbar .iconbtn.me { width: 34px; height: 34px; }
.topbar .avatar { width: 34px; height: 34px; font-size: 0.78rem; }
.good-text { color: var(--good); }

/* Card Coins: a drawn gold coin (the emoji looks grey on some phones) */
.coin { width: 16px; height: 16px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 35%, #ffe8a3, #e0a514 60%, #b07d05); box-shadow: inset 0 0 0 1.5px #c48c08; }
/* Profile: numbered setup steps */
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* ---------- Profile › Set up automation: the two helpers, each with a small example ---------- */
.helper { background: var(--surface); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 6px 18px -14px rgba(0, 0, 0, .3); }
.helper h3 { font-size: 1.05rem; line-height: 1.25; }

.wiz-list { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; font-size: 1rem; }
.wiz-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wiz-apps button { font: inherit; text-align: left; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.wiz-apps button[aria-pressed="true"] { border: 2px solid var(--accent); padding: 10px 11px; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }

/* ---------- Points: rows you tap to see how to use or move the points ---------- */
.tap { cursor: pointer; border-radius: 10px; transition: background 140ms; }
.tap:hover, .tap:focus-visible { background: var(--surface-2); outline: none; }
.tap:active { background: var(--paper-2); }

/* ---------- Home's sky: dark green satin folds behind the top of Home (homeSky in app.js) ----------
   From the top of the screen to just above "Your cards right now", fading into the page there. */
.sky { position: absolute; top: 0; left: 0; width: 100%; z-index: -1; pointer-events: none; display: none; }
/* The canvas and its sheet sit in a box as tall as the canvas (--sky-h) that clips them, so the page never scrolls past its content. */
.sky-box { position: absolute; top: 0; left: 0; width: 100%; height: var(--sky-h, 0px); overflow: hidden; z-index: -1; pointer-events: none; display: none; }
.sky-box > .sky, .sky-box > .sky-cut { display: block; }
.sky.flat { background: linear-gradient(180deg, #0f2e23, #0b241b 80%, rgba(11, 36, 27, 0)); }
body.on-sky { background: transparent; }
/* iPhone paints the strip behind the clock with the page colour: dark green at the top, light below the sky. */
html.on-sky { background-color: #0f2e23; background-image: linear-gradient(180deg, transparent 0, transparent var(--sky-h, 0px), var(--paper) var(--sky-h, 0px)); }
body.on-sky [data-sky-end] { margin-top: 12px; }
body.on-sky .topbar .brand, body.on-home .home .hello h1 { color: #eef6f2; }
body.on-home .home .hello .greet { color: rgba(238, 246, 242, .72); }
body.on-sky .deck-dots i { background: rgba(238, 246, 242, .35); }
body.on-sky .deck-dots i.on { background: #eef6f2; }
/* Pick: the greeting, question and the Amount / Pay by labels sit on the green. */
/* Analysis: the page title and the month heading sit on the green. */
body.on-sky .analysis .pagehead h1, body.on-sky .analysis .report-head h2 { color: #eef6f2; }
body.on-sky .analysis .pagehead p { color: rgba(238, 246, 242, .72); }
/* Points and Cards: the page title sits on the green. */
body.on-sky .pts .pagehead h1 { color: #eef6f2; }
body.on-sky .pts .pagehead p { color: rgba(238, 246, 242, .72); }
/* Cards: the page title sits on the green. */
body.on-sky .cards-tab .pagehead h1 { color: #eef6f2; }
body.on-sky .cards-tab .pagehead p { color: rgba(238, 246, 242, .72); }
/* A heading on the green is light; it turns dark when the page scrolls it onto the light part (see size() in makeSky). */
.hd-green:not(.on-white) { color: #eef6f2; }
/* Pick: the line under the ask box, on the green. */
.pick-hint { margin: 10px 4px 0; font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 280ms; }
/* Best card as you pay: the explanation page. */
.ct { display: grid; gap: 14px; }
.ct-lead { margin: 0; font-size: 1.02rem; line-height: 1.45; color: var(--ink); }
.ct-hero { background: linear-gradient(160deg, #134034, #0b241b); border-radius: 22px; padding: 16px; color: #eef6f2; }
.ct-flow { display: grid; gap: 14px; position: relative; }
.ct-row { display: flex; gap: 12px; align-items: flex-start; position: relative; }
.ct-row:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 40px; bottom: -14px; border-left: 2px dashed rgba(238, 246, 242, .28); }
.ct-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(238, 246, 242, .14); font-size: 1.1rem; }
.ct-row b { font-weight: 650; }
.ct-row .small { color: rgba(238, 246, 242, .75); }
.ct-note { position: relative; margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .5); }
.ct-note .muted { color: var(--muted); }
.ct-note b { display: block; }
.ct-note .small { color: var(--ink); }
.ct-eg { position: absolute; top: 8px; right: 10px; font-size: .7rem; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); padding: 2px 8px; border-radius: 99px; }
.ct-cta { display: grid; gap: 8px; justify-items: stretch; }
.ct-cta .tag { justify-self: start; }
.ct-h { margin: 6px 0 -4px; }
.ct-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ct-benefit { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.ct-benefit span { font-size: 1.3rem; }
.ct-benefit b { font-weight: 650; font-size: .95rem; }
.ct-benefit small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.ct-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: ct; }
.ct-steps li { counter-increment: ct; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.ct-steps li::before { content: counter(ct); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: .9rem; }
.ct-apps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ct-apps span { padding: 6px 12px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: .85rem; font-weight: 560; }
.ct-apps .more { background: transparent; box-shadow: none; color: var(--muted); }
.ct-faqs { display: grid; gap: 8px; }
.ct-faq { border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); padding: 0 14px; }
.ct-faq summary { margin: 0; min-height: 48px; color: var(--ink); font-weight: 600; font-size: .95rem; }
.ct-faq p { margin: 0 0 12px; }
/* Profile: the green sky wraps your details, with a clean rounded edge (data-sky-crisp). */
body.on-sky [data-sky-end][data-sky-crisp] { margin-top: 20px; }
.pm-hero { display: flex; align-items: center; gap: 14px; padding: 4px 0 22px; text-decoration: none; color: #eef6f2; }
.pm-hero h1 { color: #eef6f2; font-size: 1.7rem; overflow-wrap: anywhere; }
.pm-sub { margin-top: 4px; color: rgba(238, 246, 242, .75); font-size: .9rem; overflow-wrap: anywhere; }
.pm-edit { margin-top: 8px; font-size: .85rem; font-weight: 600; color: #bfe9d4; }
.pm-ph { position: relative; flex: none; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; }
.pm-ph::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(238, 246, 242, .55); animation: ring-spin 18s linear infinite; pointer-events: none; } /* the dotted ring turns slowly around the picture */
@keyframes ring-spin { to { transform: rotate(360deg); } }
.pm-ph b { position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .68rem; font-weight: 700; letter-spacing: .02em; background: #0f2e23; color: #eef6f2; padding: 2px 8px; border-radius: 99px; }
.pm-wallet { position: relative; display: block; padding: 14px 44px 14px 16px; border-radius: 20px; --tint: var(--accent); --box-wash: 20%; color: var(--ink); text-decoration: none; }
.pm-wallet .pm-big { margin: 4px 0 2px; font-size: 1.25rem; font-weight: 680; letter-spacing: -0.02em; color: var(--accent-text); }
.pm-wallet .chev { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; stroke: var(--muted); fill: none; stroke-width: 2; }
.pm-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.pm-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; min-height: 92px; border: 0; border-radius: 16px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.pm-tile:active { transform: scale(0.985); }
.pm-tile svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pm-tile span { font-size: .8rem; line-height: 1.2; }
.pm-tile b { font-size: .82rem; font-weight: 650; color: var(--accent-text); }
.made-you { margin: 18px 4px 0; font-size: .9rem; }
/* The required star and the short notice on the sign-in page (light type on the green). */
.req { color: #ffb4a8; font-weight: 700; }
.row .req { color: var(--bad, #c0392b); }
.agree-note { margin: -4px 4px 4px; font-size: .78rem; line-height: 1.35; color: rgba(255, 255, 255, .82); }
.agree-note a { color: #fff; text-decoration: underline; }
/* Tips about the app: a sliding row of tiles on Home and Pick. */
.chips .chip-link { flex: none; white-space: nowrap; }
/* Pick: Sale on? Two tiles, one for each shop. */
/* The iPhone status bar is see-through (black-translucent, white clock), so Home's sky reaches the top
   edge. Other screens show their own light colour up there too; the white clock is faint on them (chosen). */
/* Pick: logging a spend by saying it ("log 500 at Swiggy"), then picking the card. */
.log-say { margin-top: 10px; }
.log-cards { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Sign-in: one line under the headline; the tick box and the three ways in on a white sheet ---------- */
.hero-sub { margin: 12px 0 0; max-width: 24ch; color: #d9f5e9; font-size: 1.05rem; line-height: 1.4; animation: rise 600ms 220ms var(--ease) both; }
.sheet-in:not(.clear) .brand-btn { justify-content: center; }
.sheet-in:not(.clear) .brand-btn.google { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.sheet-in:not(.clear) .brand-btn.google svg.bi { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: #fff; }
.sheet-in:not(.clear) .agree-note { margin: 0; text-align: center; font-size: 0.78rem; color: var(--muted); }

/* ---------- Setup: one scene. Your wallet on the green sky, one question on the white sheet ---------- */
.ob { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; color: #fff; padding-top: calc(env(safe-area-inset-top) + 14px); overflow: hidden; }
.ob .brand { color: #fff; padding: 0; }
.ob-sky { padding: 0 22px; flex: 0 0 auto; min-height: 168px; display: flex; flex-direction: column; }
.ob-step { font-size: 0.86rem; font-weight: 600; color: #d9f5e9; }
.ob-skip { color: #fff !important; padding: 0 !important; min-height: 0 !important; }
.ob-bar { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); margin: 8px 0 0; overflow: hidden; flex: none; }
.ob-bar i { display: block; height: 100%; border-radius: 3px; background: #fff; width: var(--to); animation: obgrow 600ms var(--ease) both; }
@keyframes obgrow { from { width: var(--from); } }
.ob-hi { margin: 30px 0 0; font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.08; font-weight: 720; letter-spacing: -0.035em; color: #fff; overflow-wrap: anywhere; animation: rise 500ms var(--ease) both; }
.ob-sub { margin: 8px 0 0; color: #d9f5e9; font-size: 1rem; }
.ob-wallet { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ob-hint { margin: 0; padding: 30px 0; text-align: center; color: #d9f5e9; }
/* Your picked cards, fanned: each face has --k (its place from the middle) and the fan --d (how many gaps), so up to five
   spread as wide as the screen allows without leaving it. The newest lands on top. */
.ob-fan { position: relative; height: 132px; margin: 12px 0 6px; --step: min(72px, calc((100vw - 208px) / var(--d, 1))); }
.ob-fan .face { --x: calc(var(--k, 0) * var(--step)); --r: calc(var(--k, 0) * 5deg); position: absolute; left: 50%; top: 12px; width: 164px; margin-left: -82px; transform: translateX(var(--x)) rotate(var(--r)); transition: transform 320ms var(--spring); }
.ob-fan .face:last-of-type { animation: obland 420ms var(--spring) both; }
@keyframes obland { from { opacity: 0; transform: translate(var(--x), 70px) rotate(0deg) scale(0.8); } }
.ob-fan-more { position: absolute; right: 6px; top: 0; z-index: 2; padding: 3px 10px; border-radius: 999px; background: #fff; color: #0f2e23; font-size: .8rem; font-weight: 750; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
/* A card face at tile size: the same face, smaller type. */
.ob-fan .face, .pickcard .face{ border-radius: 14px; padding: 10px 12px; }
.ob-fan .face .f-top, .pickcard .face .f-top{ font-size: 0.66rem; }
.ob-fan .face .f-name, .pickcard .face .f-name{ font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-fan .face .f-bot > div:first-child, .pickcard .face .f-bot > div:first-child{ min-width: 0; }
.ob-fan .face .f-type, .pickcard .face .f-type{ font-size: 0.62rem; }
.ob-fan .face .f-net, .pickcard .face .f-net{ font-size: 0.68rem; white-space: nowrap; }
.ob-fan .face .chipmark, .pickcard .face .chipmark{ width: 24px; height: 18px; border-radius: 4px; }
.ob-fan .face .chipmark::after, .pickcard .face .chipmark::after{ inset: 4px 6px; }
.ob-fan .face .wave, .pickcard .face .wave{ width: 15px; height: 15px; }

.ob-sheet { flex: 1; min-height: 0; overflow-y: auto; margin-top: 14px; color: var(--ink); background: var(--surface); border-radius: 30px 30px 0 0; padding: 24px 22px calc(env(safe-area-inset-bottom) + 18px); box-shadow: 0 -12px 40px -24px rgba(6, 30, 20, 0.35); animation: sheetup 420ms var(--ease) both; }
.ob-sheet h1 { font-size: clamp(1.45rem, 6.4vw, 1.75rem); line-height: 1.15; margin: 0; }
.ob-sheet h1 .tag { margin-left: 2px; letter-spacing: 0; }
.ob-sheet .lede { margin: 0; color: var(--muted); }
/* Back / Next stay pinned to the bottom on a solid backing (cards scrolling under it never show through); the sheet keeps no
   padding below it, so the bar sits on the screen's edge, above the home bar. In the flow, so the list never hides behind it. */
.ob-sheet { padding-bottom: 0; overscroll-behavior: contain; }
.ob-sheet .foot { margin: auto -22px 0; padding: 12px 22px calc(env(safe-area-inset-bottom) + 14px); display: flex; gap: 10px; position: sticky; bottom: 0; z-index: 3; background: var(--surface); box-shadow: 0 -10px 18px -14px rgba(6, 30, 20, .35); }
.ob-sheet .foot:empty { display: none; }

.pickgrid { display: grid; gap: 12px; }
.pickcard { position: relative; border: 0; padding: 0; background: none; border-radius: 16px; text-align: left; cursor: pointer; font: inherit; transition: transform 160ms var(--ease); }
.pickcard:active { transform: scale(0.96); }
.pickcard .face { width: 100%; }
.pickcard .tick { position: absolute; right: 8px; top: 8px; z-index: 3; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--solid); display: grid; place-items: center; transform: scale(0); transition: transform 220ms var(--spring); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.pickcard .tick svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.pickcard[aria-pressed="true"] .tick { transform: none; }
.pickcard[aria-pressed="true"] .face { outline: 3px solid var(--solid); outline-offset: 2px; }
.pickcard:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Setting up your dashboard: one bar, and your cards, each softly ticked when done (no names, no status lines). */
.rd-bar { height: 6px; margin: 0; background: var(--line); }
.rd-bar i { background: var(--solid); transition: width 600ms var(--ease); }
.rd-grid { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rd-c { position: relative; opacity: .55; transition: opacity 400ms var(--ease); animation: rdpulse 1.6s ease-in-out infinite; }
.rd-c.done { opacity: 1; animation: none; }
@keyframes rdpulse { 50% { opacity: .35; } }
.rd-k { position: absolute; right: -4px; top: -6px; z-index: 3; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--good); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transform: scale(0); transition: transform 260ms var(--spring); }
.rd-k svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rd-c.done .rd-k { transform: none; }
.foot .btn[disabled] { background: var(--line); border-color: var(--line); color: var(--muted); opacity: 1; }

/* The welcome sits above everything, then lifts away to show Home. */
.ob.ob-done { z-index: 60; transition: transform 700ms var(--ease), opacity 700ms var(--ease); }
.ob.ob-done.lift { transform: translateY(-100%); opacity: 0.6; }
.wl-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 22px 12vh; }
.wl-mid h1 { color: #fff; margin: 0; font-size: clamp(2.1rem, 9.5vw, 2.8rem); overflow-wrap: anywhere; animation: rise 600ms 500ms var(--ease) both; }
.wl-mid .ob-sub { animation: rise 600ms 650ms var(--ease) both; }
.wl-coins { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 8px 16px; border-radius: 999px; background: rgba(0, 0, 0, 0.22); color: #fff; font-weight: 600; animation: pop 420ms 1000ms var(--spring) both; }
.wl-coins svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) {
  .ob-bar i, .ob-fan .face:last-of-type, .ob-sheet, .ob-hi, .rd-c, .wl-mid h1, .wl-mid .ob-sub, .wl-coins { animation: none; }
  .ob.ob-done { transition: none; }}
.sheet-in:not(.clear) .agree-note a { color: var(--ink); }
.ob-sheet { display: flex; flex-direction: column; }

/* Setup and sign-in fit the screen exactly: the sheet scrolls up and down, never sideways, and a card never pushes past the edge. */
.ob, .signin { max-width: 100vw; } /* no fixed height: iPhones report it wrongly when the app first opens, and inset: 0 already fills the screen */
.ob-sheet { overflow-x: hidden; }
.pickgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pickcard { min-width: 0; }
.pickcard .face, .ob-fan .face{ min-width: 0; }

/* A page with nothing logged yet keeps its layout at zero, with one line saying why. */
.zero-note { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 16px; font-size: 0.9rem; color: var(--muted); }
.pts-line { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--paper); }
.pts-line b { display: block; font-size: 1.15rem; }
.pts-line .meter { width: 76px; flex: none; }

/* What is inside a sheet arrives a beat after the sheet, one part after another, so opening feels like an unfolding, not a pop. */
.sheet > :not(.grab):not(.sheet-x) { animation: sheetin 520ms var(--spring) both; }
.sheet > :nth-child(3) { animation-delay: 330ms; }
.sheet > :nth-child(4) { animation-delay: 390ms; }
.sheet > :nth-child(5) { animation-delay: 450ms; }
.sheet > :nth-child(n+6) { animation-delay: 510ms; }
@keyframes sheetin { from { opacity: 0; transform: translateY(16px); } }
/* Everything you can tap gives a little under the finger and lets go slowly. */
.btn, .pickcard, .item[role="button"], .tile, nav.tabs a { transition: transform 260ms var(--spring), box-shadow 260ms var(--ease), background-color 260ms var(--ease); }
.btn:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { .sheet > * { animation: none !important; }}

/* Pages that slide get their own layer, so the phone moves a picture of them instead of redrawing them every frame. */
#main > *, #main > .leaving { will-change: transform, opacity; backface-visibility: hidden; }
.sheet > :not(.grab):not(.sheet-x) { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) { html { transition: none; }}

/* ---------- Profile pages: green top, then cards ---------- */
.sub-hero { padding: 2px 0 22px; color: #eef6f2; }
.sub-hero h1 { margin: 14px 0 4px; color: #eef6f2; font-size: 1.75rem; line-height: 1.12; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.sub-hero p { margin: 0; max-width: 32ch; color: #cfeadd; font-size: 0.95rem; line-height: 1.45; }
.sub-back { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; }
.sub-back svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sub-first { margin-top: 18px !important; }
.subpage > * + * { margin-top: 12px; }
.subpage > .sub-hero + * { margin-top: 18px; }

.subpage .panel:nth-of-type(2) { animation-delay: 70ms; } .subpage .panel:nth-of-type(3) { animation-delay: 140ms; }
.ticket { position: relative; border-radius: 22px; padding: 18px; text-align: center; color: #fff; background: linear-gradient(135deg, #0f3d2d, #007a4e); overflow: hidden; }
.ticket:before, .ticket:after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); transform: translateY(-50%); }
.ticket:before { left: -11px; } .ticket:after { right: -11px; }
.ticket .code { display: block; width: 100%; margin: 6px 0 2px; border: 0; background: none; color: #fff; font: inherit; font-size: 2rem; font-weight: 700; letter-spacing: 0.22em; font-variant-numeric: tabular-nums; cursor: pointer; }
.steps { position: relative; }
.step { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.step i { width: 26px; height: 26px; border-radius: 50%; background: var(--solid); color: #fff; font-style: normal; font-size: 0.8rem; font-weight: 700; display: grid; place-items: center; flex: none; position: relative; z-index: 1; }
.step:not(:last-child):after { content: ""; position: absolute; left: 12px; top: 32px; bottom: -6px; width: 2px; background: var(--line); }
.chips2 { display: flex; flex-wrap: wrap; gap: 7px; }
.chip2 { border: 1.5px solid var(--field); background: var(--surface); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 0.86rem; color: var(--ink); cursor: pointer; }
.chip2.on { background: var(--solid); border-color: var(--solid); color: #fff; }
.thread { display: flex; flex-direction: column; gap: 8px; }
.bubble { border-radius: 16px; padding: 10px 12px; font-size: 0.92rem; line-height: 1.45; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .small { margin-top: 4px; }
.bubble.me { background: var(--good-bg); margin-left: auto; border-bottom-right-radius: 5px; }
.bubble.them { background: var(--paper-2); border-bottom-left-radius: 5px; }
@media (prefers-reduced-motion: reduce) { .subpage .panel { animation: none; }}

/* ---------- Dark mode: the palette (the rules that use it are under "Dark mode, one system" at the end) ---------- */
/* Surfaces in three levels (surface, surface-2, surface-3) on near-black paper, hairline borders; heroes are graphite (--hero). */
:root[data-theme="dark"] {
  --paper: #0b0b0b; --paper-2: #1a1a1d; --surface: #141416; --surface-2: #1c1c1f; --surface-3: #25252a;
  --hairline: rgba(255, 255, 255, .07); --hero: linear-gradient(180deg, #1f1f23, #161619); --hero-sub: #a3a3a3;
  --ink: #ececec; --ink-2: #d2d2d2; --muted: #a3a3a3; --faint: #6b6b6b; --line: #2a2a2f; --field: #5c5c5c;
  --accent-text: #4fd6a2; --accent-soft: #12281e; --bright: #2fcf93; --focus: #2fcf93;
  --scrim: rgba(0, 0, 0, 0.65);
  --good: #4fd6a2; --good-bg: #12281e; --warn: #f0b35a; --warn-bg: #33260f; --bad: #ff8d8d; --bad-bg: #371a1c;
  --band-fair-text: #f0a64a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 12px -6px rgba(0, 0, 0, 0.6);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.45), 0 18px 40px -22px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}
:root[data-theme="dark"] .band-chip.b-poor { background: #371a1c; }
:root[data-theme="dark"] .band-chip.b-fair { background: #33260f; }
:root[data-theme="dark"] .band-chip.b-good, :root[data-theme="dark"] .band-chip.b-excellent { background: #12281e; }
:root[data-theme="dark"] .band-key .b-good, :root[data-theme="dark"] .band-chip.b-good,
:root[data-theme="dark"] .band-key .b-excellent, :root[data-theme="dark"] .band-chip.b-excellent { color: #4fd6a2; }

:root[data-theme="dark"] .pts-ic.blue { background: #16253d; }

:root[data-theme="dark"] .ct-note { background: var(--surface); }
:root[data-theme="dark"] .sw:after { background: #e8f1ed; }

/* ---------- Profile pages: switches, wallet, score ring ---------- */
.set-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-line:first-child { border-top: 0; padding-top: 0; }
.set-line:last-child { padding-bottom: 0; }
.set-line b { display: block; font-weight: 600; }
.sw { position: relative; width: 50px; height: 30px; border-radius: 999px; border: 0; padding: 0; flex: none; background: var(--field); transition: background 260ms var(--ease); }
.sw:after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 300ms var(--spring); }
.sw.on { background: var(--solid); }
.sw.on:after { transform: translateX(20px); }
.wallet { position: relative; height: 128px; margin: 2px 0 8px; }
.wallet .wf { position: absolute; left: 50%; top: 12px; width: 160px; height: 100px; margin-left: -80px; border-radius: 14px; padding: 10px 12px; color: #fff; font-size: 0.78rem; font-weight: 600; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 10px 18px -10px rgba(0, 0, 0, 0.6); transform: translateX(var(--x)) rotate(var(--r)); animation: wpop 620ms var(--spring) backwards; }
@keyframes wpop { from { opacity: 0; transform: translateX(0) rotate(0deg) scale(0.7); } }
.score-ring { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.score-ring svg { width: 150px; height: 150px; }
.score-ring .sr-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-ring .sr-mid b { font-size: 2.1rem; line-height: 1; letter-spacing: -0.03em; }
.score-ring .sr-mid span { font-size: 0.8rem; color: var(--muted); }
.ring-arc { animation: ringin 900ms var(--ease) backwards; }
@keyframes ringin { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wallet .wf, .ring-arc { animation: none; } .sw, .sw:after { transition: none; }}
:root[data-theme="dark"] nav.tabs .in { --bar: 24, 24, 27; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 1px 2px rgba(0, 0, 0, .5), 0 10px 24px -8px rgba(0, 0, 0, .7), 0 24px 44px -18px rgba(0, 0, 0, .8); }
:root[data-theme="dark"] .wallet .wf, :root[data-theme="dark"] .list .mini { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 10px 18px -10px rgba(0, 0, 0, 0.8); }

/* ---------- Streak and Card Coins pages ---------- */
.st-days { display: flex; justify-content: space-between; }
.st-d { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--muted); }
.st-d i { width: 34px; height: 34px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-style: normal; font-size: 0.95rem; }
.st-d.on i { background: var(--solid); color: #fff; animation: stpop 460ms var(--spring) backwards; }
.st-d.now i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--solid) 30%, transparent); }
@keyframes stpop { from { transform: scale(0.5); opacity: 0; } }
.st-why { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.st-why:first-of-type { border-top: 0; }
.st-why b, .st-way b { display: block; font-weight: 620; }
.st-ic { font-size: 1.15rem; flex: none; }
.st-ladder { position: relative; }
.st-rung { display: flex; align-items: center; gap: 12px; padding: 8px 0; position: relative; }
.st-rung i { width: 34px; height: 26px; border-radius: 13px; background: var(--paper-2); display: grid; place-items: center; font-style: normal; font-size: 0.7rem; font-weight: 700; color: var(--muted); flex: none; position: relative; z-index: 1; }
.st-rung.done i { background: var(--solid); color: #fff; }
.st-rung:not(:last-child):after { content: ""; position: absolute; left: 16px; top: 32px; bottom: -8px; width: 2px; background: var(--line); }
.st-fold { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.st-fold summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.st-fold summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.st-fold[open] summary::after { content: "\2013"; }
.st-fold p { margin: 8px 0 0; }
.st-way { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.st-way:first-of-type { border-top: 0; }
.st-way .chev { width: 18px; height: 18px; color: var(--faint); flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.st-tier { display: flex; gap: 8px; }
.st-tier div { flex: 1; border-radius: 14px; padding: 12px; text-align: center; background: var(--good-bg); color: var(--good); }
.st-tier b { display: block; font-size: 1.3rem; letter-spacing: -0.02em; }
.st-tier span { font-size: 0.78rem; }
.st-invite { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 20px; padding: 16px; text-align: left; color: #fff; background: linear-gradient(135deg, #0f3d2d, #007a4e); transition: transform 160ms var(--ease); }
.st-invite:active { transform: scale(0.98); }
.st-invite b { display: block; font-size: 1rem; }
.st-invite span span { font-size: 0.85rem; color: #cfeadd; }
.st-gift { font-size: 1.7rem; }
.st-invite .chev { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (prefers-reduced-motion: reduce) { .st-d.on i { animation: none; }}
.st-way span.small, .st-why span.small { display: block; }

/* ---------- Analysis: insight, ring, wallet comparison, pace ---------- */
/* Analysis: the frosted summary in the green */
.an-summary { margin: 14px 0 0; padding: 16px; border-radius: 22px; color: #fff; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.an-summary .money, .an-summary .money .p { color: inherit; }
.an-summary .small { font-size: 0.78rem; opacity: 0.82; }
.an-big { font-size: clamp(1.7rem, 8.5vw, 2.1rem); line-height: 1.05; white-space: nowrap; font-weight: 780; letter-spacing: -0.04em; color: #7fe3b4; }
.an-big .money { font-size: inherit; }
.an-pill { display: flex; gap: 8px; align-items: flex-start; border-radius: 12px; padding: 9px 12px; font-size: 0.85rem; line-height: 1.35; background: rgba(255, 184, 76, 0.18); color: #ffd9a0; }
.an-pill .money { font-weight: 700; color: #ffe6bd; }
.rep-ring-row { display: flex; align-items: center; gap: 16px; margin: 8px 0 14px; }
.rep-ringbox { position: relative; width: 104px; height: 104px; flex: none; }
.rep-ringbox svg { width: 104px; height: 104px; }
.rep-ringbox b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.4rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rep-ring-arc { transition: stroke-dasharray 1900ms cubic-bezier(.2, .8, .2, 1); }
.kp-move { font-style: normal; font-size: 0.7rem; font-weight: 650; color: var(--muted); }
.kp-move.up { color: var(--good); } .kp-move.dn { color: var(--bad); }
.rep-bar2 { position: relative; height: 9px; border-radius: 5px; background: var(--paper-2); margin: 7px 0 5px; overflow: hidden; }
.rep-bar2 i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.rep-bar2 .could { width: 100%; background: color-mix(in srgb, var(--solid) 24%, var(--paper-2)); }
.rep-bar2 .got { background: var(--solid); }
.rep-cmp { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.rep-cmp b { display: block; }
.rep-cmp-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--good-bg); display: grid; place-items: center; font-size: 1.2rem; flex: none; }
.rep-cmp .chev { width: 18px; height: 18px; color: var(--faint); flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rep-pace { width: 100%; height: auto; display: block; }
.rep-legend { display: flex; gap: 14px; margin-top: 6px; font-size: 0.75rem; color: var(--muted); }
.rep-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
@media (prefers-reduced-motion: reduce) { .rep-ring-arc { transition: none; }}

.rep-flat { height: 64px; border-bottom: 3px solid var(--accent); opacity: 0.5; border-radius: 2px; }

.ask .lang-btn { font-size: 0.78rem; font-weight: 700; min-width: 40px; }

/* Like an app, not a web page: pressing and holding does not select text, show the blue highlight or the
   copy/share callout. Fields (and anything marked .selectable) still let you select and paste. */
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable], .copyable { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg, a { -webkit-user-drag: none; }

/* Analysis: each card waits (animations paused, nothing drawn yet) until it scrolls into view; the page then adds .seen. */
.wait:not(.seen), .wait:not(.seen) * { animation-play-state: paused !important; }

/* Rings and cards that draw themselves, slowly enough to be watched */
.hs-arc { animation: hs-draw 2200ms var(--ease) both; animation-delay: calc(var(--i, 0) * 180ms); }
@keyframes hs-draw { from { stroke-dasharray: 0 107; } }
.hs-card { animation: rise 800ms var(--spring) backwards; animation-delay: calc(var(--i, 0) * 120ms); }
.pts-cards > button { animation: rise 900ms var(--spring) backwards; animation-delay: calc(var(--i, 0) * 140ms); }
@media (prefers-reduced-motion: reduce) { .hs-arc, .hs-card, .pts-cards > button { animation: none; }}

/* Compare: "Change cards" is a clear button, not plain text */
.cmp-pick summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 16px; border: 1.5px solid var(--field); border-radius: 14px; background: var(--surface); list-style: none; }
.cmp-pick summary::-webkit-details-marker { display: none; }
.cmp-pick summary::after { content: "\25BE"; margin-left: 8px; color: var(--muted); transition: transform 200ms var(--ease); }
.cmp-pick[open] summary::after { transform: rotate(180deg); }
.cmp-pick summary span:first-child { flex: 1; }

/* Limits and spend-target bars draw themselves from empty when their card is scrolled to */
.meter > i.gro { transform-origin: left; animation: bar-in 2000ms var(--ease) both; }
@keyframes bar-in { from { transform: scaleX(0); } }
.chip.add-more { border-style: dashed; color: var(--accent-text); font-weight: 650; }
@media (prefers-reduced-motion: reduce) { .meter > i.gro { animation: none; }}

/* Boxes and their text are simply there when you scroll; only the graphics inside them (rings, bars, lines, numbers) move. */
.rep-card, .hs-card, .pts-cards > button, .subpage .panel, .more-rest:not([hidden]) > * { animation: none !important; }
/* Cashback room (and the other figures on the blue card): all white, no half black, half grey */
.lp-hero .money, .lp-hero .money .p { color: #fff; }
.lp-hero .money .p { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .pm-ph::before { animation: none; }}
body.on-sky .cards-tab > .section[data-sky-end] > h2 { color: #eef6f2; } /* "In your wallet" sits on the green: light, not black */
/* The white sign-in panel always sits at the bottom of the screen, on short screens too (a phone browser with its toolbars is one). */
.signin .sheet-in { margin-top: auto; }

/* ---------- Edit profile: the green top carries you, then tidy rows; each opens a small sheet for one answer ---------- */
.pd-hero { color: #eef6f2; padding: 2px 0 22px; }
.pd-who { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.pd-av { position: relative; flex: none; width: 74px; height: 74px; display: grid; place-items: center; }
.pd-av .avatar.lg { width: 70px; height: 70px; box-shadow: none; }
.pd-av:before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px dashed rgba(238, 246, 242, .55); animation: ring-spin 18s linear infinite; pointer-events: none; }
.pd-cam { position: absolute; right: -6px; bottom: -4px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #0f3d2d; background: #fff; color: #0f3d2d; font-size: .78rem; display: grid; place-items: center; padding: 0; }
.pd-who h1 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; color: #eef6f2; overflow-wrap: anywhere; }
.pd-who p { margin: 2px 0 0; color: #cfeadd; font-size: .85rem; overflow-wrap: anywhere; }
.pd-seg { display: flex; gap: 4px; margin-top: 16px; }
.pd-seg i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); transition: background 400ms; }
.pd-seg i.on { background: #7fe3b4; }
.pd-segt { display: flex; justify-content: space-between; font-size: .78rem; color: #cfeadd; margin-top: 7px; }
.pd-next { display: flex; gap: 12px; align-items: center; border-radius: 20px; padding: 14px 16px; background: linear-gradient(135deg, #0f3d2d, #007a4e); color: #fff; margin-bottom: 4px; }
.pd-next b { display: block; font-size: .95rem; }
.pd-next span { font-size: .8rem; color: #cfeadd; line-height: 1.35; }
.pd-next button { flex: none; border: 0; border-radius: 12px; padding: 9px 16px; font-weight: 700; font-size: .85rem; background: #fff; color: #0f3d2d; min-height: 40px; }
.pd-gh { margin: 22px 4px 8px; font-size: .78rem; font-weight: 700; letter-spacing: .03em; color: var(--muted); }
.pd-next + .pd-gh { margin-top: 18px; }
.pd-card { background: var(--surface); border-radius: 20px; padding: 4px 16px; box-shadow: var(--shadow-sm); }
.pd-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: inherit; font: inherit; }
.pd-row:first-child, .pd-emp + .pd-row { border-top: 0; }
.pd-emp + .pd-row { border-top: 1px solid var(--line); }
.pd-t { width: 38px; height: 38px; border-radius: 12px; background: var(--good-bg); color: var(--good); display: grid; place-items: center; flex: none; }
.pd-t svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pd-row small { display: block; font-size: .78rem; color: var(--muted); }
.pd-row b { display: block; font-size: .98rem; font-weight: 620; overflow-wrap: anywhere; }
.pd-empty { color: var(--faint); font-weight: 500; }
.pd-pen { color: var(--faint); flex: none; }
.pd-add { flex: none; font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 99px; background: var(--good-bg); color: var(--good); }
.pd-emp { display: flex; background: var(--paper-2); border-radius: 14px; padding: 3px; margin: 12px 0 4px; }
.pd-emp button { flex: 1; border: 0; background: none; padding: 10px 4px; border-radius: 11px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); min-height: 40px; transition: background 200ms var(--ease), color 200ms; }
.pd-emp button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.pd-sc { padding: 14px 0; }
.pd-scbig { display: flex; align-items: flex-end; justify-content: space-between; }
.pd-scn { font-size: 2.5rem; font-weight: 780; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.pd-bands { position: relative; display: flex; gap: 3px; height: 10px; margin: 16px 0 6px; }
.pd-bands i { flex: 1; border-radius: 5px; }
.pd-bands i:nth-child(1) { background: #e26a6a; } .pd-bands i:nth-child(2) { background: #f0b24a; } .pd-bands i:nth-child(3) { background: #7fcf9f; } .pd-bands i:nth-child(4) { background: #0a9a68; }
.pd-pin { position: absolute; top: -6px; width: 4px; height: 22px; border-radius: 2px; background: var(--ink); transform: translateX(-2px); }
.pd-bl { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); }
.pd-two { display: flex; gap: 8px; margin-top: 14px; }
.pd-two .btn { flex: 1; }
.pd-lock { text-align: center; margin-top: 18px; }
.pd-sheet { gap: 10px; }
.pd-q { margin: 0; font-size: .85rem; color: var(--muted); }
.pd-big { margin: 0; font-size: 2.4rem; font-weight: 780; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pd-in { width: 100%; border: 0; border-bottom: 2px solid var(--field); padding: 8px 0; font: inherit; font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; background: none; color: var(--ink); border-radius: 0; }
.pd-in.small { font-size: 1.1rem; border: 1.5px solid var(--field); border-radius: 14px; padding: 12px 14px 12px 28px; }
.pd-in:focus { outline: none; border-bottom-color: var(--solid); }
.pd-range { width: 100%; accent-color: var(--solid); margin: 6px 0 0; }
.pd-ticks { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .pd-av:before { animation: none; }}

/* ---------- The wallet (sign-in page and Analysis): your cards slide out of leather into a row; tap the leather to pick its colour ---------- */
:root { --l1: #f0953f; --l2: #d9701f; --l3: #a84f10; }
.lw-wrap { position: relative; margin: 0 -18px; overflow-x: clip; -webkit-user-select: none; user-select: none; }
.report > .lw-wrap { margin-top: 12px; }
.lw-stage { position: relative; height: var(--stage); }
.lw { position: absolute; inset: 0; }
.lw::after { content: ""; position: absolute; left: 50%; margin-left: calc(var(--ww) * -.47); bottom: -14px; width: calc(var(--ww) * .94); height: 30px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .5), rgba(0, 0, 0, .18) 60%, transparent); filter: blur(6px); }
/* the back of the wallet, behind the cards */
.lw-back { position: absolute; left: 50%; margin-left: calc(var(--ww) / -2); bottom: 6px; width: var(--ww); height: calc(var(--bh) + 26px); border-radius: 24px 24px 16px 16px; background: linear-gradient(180deg, var(--l2), var(--l3)); z-index: 1; }
/* the cards: one row, swiped sideways like Home's. Closed, they sit stacked and small in the pocket; open, each takes its own place. */
.lw-row { position: absolute; left: 0; right: 0; bottom: 20px; height: var(--rowh); z-index: 2; margin: 0; padding: 0 var(--pr, 18px); scroll-padding: 0; align-items: flex-end; overflow-x: auto; overflow-y: hidden; }
.lw-row > button { flex: 0 0 var(--cw); scroll-snap-align: center; }
.lw-row { scroll-behavior: smooth; overscroll-behavior-x: contain; } /* every card rests in the middle */
.lw:not(.open) .lw-row { overflow-x: hidden; }

.lw:not(.open) .lw-row > button { transform: none; opacity: 1; }
.lw-t { transform-origin: 50% 100%; will-change: transform; }
.lw.open .lw-t { transform: translateY(var(--open)); transition: transform 380ms cubic-bezier(.3, 0, .2, 1), opacity 380ms; }
.lw.open .lw-row > button:not(.on) .lw-t { transform: translateY(var(--open)) scale(.94); opacity: .82; }
.lw-row > button { scroll-snap-stop: always; }

.lw-c .money, .lw-c .money .p { color: inherit; }
.lw-c .money .p { opacity: .7; }
/* the front of the wallet, over the lower part of the cards */
.lw-body { position: absolute; left: 50%; margin-left: calc(var(--ww) / -2); bottom: 6px; width: var(--ww); height: var(--bh); border-radius: 24px 24px 16px 16px; z-index: 3; overflow: hidden; cursor: pointer; background:
    radial-gradient(120% 90% at 22% -10%, rgba(255, 255, 255, .26), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='.5'/></svg>"),
    linear-gradient(165deg, var(--l1) 0%, var(--l2) 48%, var(--l3) 100%); transform-origin: 50% 100%; }
.lw-body::before { content: ""; position: absolute; inset: 8px; border: 2px dashed rgba(255, 244, 226, .45); border-radius: 13px 13px 8px 8px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35)); }
.lw-body::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: linear-gradient(rgba(0, 0, 0, .28), transparent); border-radius: 24px 24px 0 0; pointer-events: none; } /* the rolled top edge of the pocket */
.lw-stud { position: absolute; left: 50%; top: 38px; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, var(--l1), var(--l3)); box-shadow: inset 0 2px 3px rgba(255, 255, 255, .35), inset 0 -3px 5px rgba(0, 0, 0, .35), 0 3px 5px rgba(0, 0, 0, .3); }
.lw-stud::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, rgba(0, 0, 0, .25), rgba(0, 0, 0, .05)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4); }
.lw-pill { position: absolute; left: calc(50% + var(--ww) / 2 - 20px); transform: translateX(-100%); z-index: 4; border: 0; border-radius: 999px; padding: 6px 12px 6px 14px; min-height: 32px; display: flex; align-items: center; gap: 7px; font: inherit; font-size: .72rem; font-weight: 700; color: #fff7ec; background: rgba(0, 0, 0, .34); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 2px 5px rgba(0, 0, 0, .25); }
.lw-pill i { width: 7px; height: 7px; border-radius: 50%; background: #fff7ec; opacity: .9; }
.lw-pill:active { transform: translateX(-100%) scale(.96); }
.lw-c:focus-visible, .lw-body:focus-visible, .lw-pill:focus-visible { outline: 3px solid #7fe3b4; outline-offset: 3px; }
.lw-dots { opacity: 0; margin-top: 2px; transition: opacity .8s .7s; }
.lw-dots.show { opacity: 1; }
.lw-dots i { background: rgba(255, 255, 255, .35); }
.lw-dots i.on { background: #fff; }
.lw-hint { margin: 4px 0 12px; text-align: center; font-size: .7rem; color: rgba(255, 255, 255, .7); }
.lw-swatches { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; padding: 6px 0; }
.lw-swatches button { width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: linear-gradient(145deg, var(--a), var(--b)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 5px rgba(0, 0, 0, .3); transition: transform .3s var(--ease), box-shadow .3s; }
.lw-swatches button[aria-checked="true"] { transform: scale(1.1); box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--solid); }
@media (prefers-reduced-motion: reduce) { .lw-dots { transition: none; }}

/* ---------- Where you missed (#analysis?s=missed), and the My cards page ---------- */
.ms-h { margin: 0 0 6px; }
.ms-rule { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ms-rule:first-of-type { border-top: 0; padding-top: 4px; }
.ms-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--good-bg); color: var(--good); font-style: normal; font-weight: 700; font-size: .85rem; }

.an-pill.go { text-decoration: none; cursor: pointer; align-items: center; }
.an-pill .chev { margin-left: auto; font-size: 1.4rem; line-height: 1; }

/* ---------- Analysis: plain boxes that open their own pages ---------- */
.report .an-card { margin-top: 12px; }
.an-card { display: block; border-radius: 20px; padding: 14px 16px; color: inherit; text-decoration: none; transition: transform 200ms var(--ease); }
a.an-card:active { transform: scale(.985); }
.an-ct { display: flex; align-items: center; gap: 10px; }
.an-ct b { flex: 1; font-size: .92rem; font-weight: 650; color: var(--muted); }
.an-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--good-bg); font-size: 1rem; }
.an-ct .chev { color: var(--faint); font-size: 1.5rem; line-height: 1; }
.an-line { margin: 10px 0 0; font-size: 1.05rem; font-weight: 650; line-height: 1.35; letter-spacing: -.01em; }
.an-meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 12px; }
.an-meter i { display: block; height: 100%; border-radius: 4px; }
.an-stack { display: flex; gap: 2px; height: 10px; margin-top: 12px; }
.an-stack i { height: 100%; border-radius: 4px; }
.an-card .rep-trend { height: 64px; margin-top: 8px; }

/* ---------- Logging: the amount and its keypad, the paste box, statement upload and review; the automation page ---------- */
.sp { gap: 10px; }
.sp-amt { display: flex; align-items: baseline; justify-content: center; gap: 6px; border: 0; background: none; padding: 6px 0 2px; font: inherit; color: var(--ink); }
.sp-cur { font-size: 1.6rem; font-weight: 600; color: var(--muted); }
.sp-amt b { font-size: 3rem; font-weight: 780; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.sp-amt.empty b { color: var(--faint); }
.sms-bubble { background: var(--good-bg); border-radius: 20px 20px 20px 6px; padding: 12px 14px; }
.sms-box { width: 100%; border: 0; background: none; font: inherit; color: var(--ink); resize: none; outline: none; min-height: 96px; }

.st-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--good-bg); color: var(--good); margin-bottom: 4px; }
.st-ic svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.ah { background: var(--surface); border-radius: 24px; padding: 18px; box-shadow: var(--shadow-sm); display: grid; gap: 12px; }
.ah-top { display: flex; align-items: center; gap: 12px; }
.ah-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--good-bg); color: var(--good); flex: none; }
.ah-ic svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ah h3 { margin: 0; font-size: 1.1rem; letter-spacing: -.02em; }
.ah-text { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.ah-flow { display: flex; align-items: center; gap: 8px; background: var(--paper-2); border-radius: 16px; padding: 12px; font-size: .82rem; }
.ah-a, .ah-b { flex: 1; min-width: 0; display: grid; gap: 4px; background: var(--surface); border-radius: 12px; padding: 9px 10px; line-height: 1.3; }
.ah-a { color: var(--muted); }
.ah-arrow { color: var(--good); font-weight: 700; }
.ah-sum { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-sm); }

/* ---------- Points: one card at a time ---------- */
.pt-sel { display: grid; gap: 14px; margin-top: 6px; }
.pt-box { border-radius: 22px; padding: 16px; display: grid; gap: 8px; }
.pt-bal { font-size: 2.2rem; font-weight: 780; letter-spacing: -.04em; line-height: 1.05; }
.pt-bal small { font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.pt-badge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg, var(--good-bg)); color: #fff; font-weight: 800; font-size: .78rem; letter-spacing: -.02em; flex: none; }
.pt-badge.ic { background: var(--good-bg); color: var(--good); font-size: 1.15rem; }
.pt-badge.big { width: 56px; height: 56px; border-radius: 16px; font-size: 1rem; }
.pt-goal { display: grid; gap: 6px; padding: 12px 0 2px; border-top: 1px solid var(--line); }
.rd-head { display: flex; align-items: center; gap: 12px; }
.rd-get { font-size: 2rem; font-weight: 780; letter-spacing: -.035em; line-height: 1.1; }

/* ---------- Pick: best card for your shops, and Sale on? ---------- */
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-tile { display: grid; gap: 12px; padding: 12px; border: 0; border-radius: 20px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: transform 160ms var(--ease); }
.shop-tile:active { transform: scale(.97); }
.shop-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.shop-top b { font-size: .92rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-width: 0; overflow-wrap: anywhere; } /* "BookMyShow" breaks onto two lines instead of being cut */
.shop-use { display: grid; gap: 1px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, var(--c1, var(--ink)), var(--c2, var(--ink))); color: var(--ink-card, #fff); }
.shop-rate { font-size: 1.35rem; font-weight: 780; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.shop-use small { font-size: .74rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@keyframes sale-spin { to { transform: rotate(360deg); } }

/* ---------- Shortcuts (Home and Pick) ---------- */
.sc-row { display: flex; gap: 12px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 8px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-left: 18px; }
.sc-row::-webkit-scrollbar { display: none; }
.sc-bub { flex: none; justify-items: center; width: 66px; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; scroll-snap-align: start; }
.sc-ic { width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; font-size: 1.5rem; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform 160ms var(--ease); }
.sc-bub:active .sc-ic { transform: scale(.92); }
.sc-bub small { font-size: .74rem; font-weight: 560; text-align: center; line-height: 1.2; }
.sc-row.hd-green:not(.on-white) .sc-bub small { color: #fff; }
.list .item > .pt-badge { width: 40px; height: 40px; }
.nowrap { white-space: nowrap; }

/* ---------- Limits & perks: ring, limit bars, room breakdown ---------- */
button.lp-hero { display: block; width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer; transition: transform 160ms var(--ease); }
button.lp-hero:active { transform: scale(.985); }
.lp-top { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; margin: 12px 0 4px; }
.lp-ring { position: relative; flex: none; }
.lp-ring-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.lp-ring-mid b { font-size: .92rem; font-variant-numeric: tabular-nums; }
.lp-ring-mid span { font-size: .72rem; color: var(--muted); }
.lp-legend { display: grid; gap: 7px; min-width: 0; flex: 1 1 150px; font-size: .82rem; }
.lp-legend > div { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; }
.lp-legend i { width: 10px; height: 10px; border-radius: 3px; }
.lp-legend span { color: var(--ink-2, var(--ink)); line-height: 1.25; }
.lp-legend b { font-variant-numeric: tabular-nums; font-weight: 650; }
.lp-name { display: inline-flex; align-items: center; gap: 8px; }
.lp-name i { width: 10px; height: 10px; border-radius: 3px; background: var(--lc); flex: none; }
.lp-bar { position: relative; margin: 8px 0 4px; background: color-mix(in srgb, var(--lc) 14%, transparent); overflow: hidden; }
.lp-bar i { position: absolute; left: 0; top: 0; bottom: 0; }

.lp-bar .proj { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--lc) 45%, transparent) 0 4px, transparent 4px 8px); }
.lp-line .small:last-child { margin-top: 4px; line-height: 1.4; }
.room-bar { display: flex; gap: 3px; height: 14px; border-radius: 8px; overflow: hidden; }
.room-bar i { background: linear-gradient(135deg, var(--c1), var(--c2)); min-width: 6px; }
.room-line { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .88rem; }
.room-line > i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.room-line small { display: block; color: var(--muted); font-size: .76rem; }
.room-total { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--good-bg); color: var(--good); font-size: .88rem; }

/* ---------- Pick: the ask card, and the answer as a receipt ---------- */
.ask-card { margin-top: 4px; }
.ask-card.intro { animation: rise 320ms var(--ease) both; }
.ask-card h1 { display: flex; align-items: center; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); }
.ask-spark { border-radius: 11px; display: grid; place-items: center; background: var(--good-bg); color: var(--good); flex: none; }
.ask-spark svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

.ask-cta > span:not(.go) { transition: opacity 250ms; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
/* Pick's card to use: the shared box (.panel) with the shop, one line with the card and what it gives, one line against the next best, the actions */
.rc { position: relative; display: grid; gap: 12px; margin: 12px 0 18px; }
.rc.reveal { animation: rise 260ms var(--ease) both; }
.rc-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 1.3rem; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.rc-x:active { transform: scale(.92); }
.rc-head { display: flex; align-items: center; gap: 12px; padding-right: 44px; }
.rc-head b { font-size: 1.05rem; }
.rc-pick { display: flex; align-items: center; gap: 12px; padding-top: 2px; }
.rc-hero { margin: 0; font-size: 1.28rem; line-height: 1.35; font-weight: 520; letter-spacing: -0.01em; color: var(--ink); }
.rc-hero b { font-weight: 720; }
.rc-hero .money { font-size: 1.28rem; color: var(--good); letter-spacing: -0.02em; }
.rc-hero .money .p { color: inherit; opacity: .6; }
.rc-rate { color: var(--muted); font-size: 1rem; font-weight: 500; white-space: nowrap; }
.rc-vs { margin: -4px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.4; }
.rc-why summary { font-size: .9rem; font-weight: 650; color: var(--accent-text); cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.rc-why[open] { display: grid; gap: 10px; }
.rc-why p { margin: 0; font-size: .88rem; line-height: 1.45; }
.rc-why .rc-row { cursor: default; }
.rc-why .rc-row:active { opacity: 1; }
.rc-others { display: grid; gap: 6px; }
.rc-cap { display: grid; gap: 6px; }
.rc-other { min-height: 40px; margin-top: -6px; color: var(--muted); font-size: .92rem; text-decoration: none; }
.rc-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rc-total > span { color: var(--muted); font-size: .9rem; }
.rc-total .money { font-size: 2.3rem; }
.rc-line { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.rc-line span { color: var(--muted); }
.rc-line b { font-variant-numeric: tabular-nums; font-weight: 620; text-align: right; }
.rc-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; font-variant-numeric: tabular-nums; }
.rc-row .mini { width: 36px; height: 23px; border-radius: 5px; }
.rc-row .mini::after { left: 5px; top: 7px; width: 8px; height: 6px; }
.rc-row b { display: block; font-size: .9rem; font-weight: 620; }
.rc-row small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.3; }
.rc-row:active { opacity: .6; }
.rc-stamp { justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border: 2px solid var(--good); border-radius: 10px; color: var(--good); font-weight: 750; font-size: .85rem; transform: rotate(-5deg); }
.rc-stamp svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .rc.reveal, .ask-card.intro { animation: none; }}

/* ---------- Your next card: the teaser on Pick and its own page ---------- */

.nx-gain { color: var(--good); font-weight: 700; font-size: .95rem; }

.nx-sel { display: grid; gap: 14px; margin-top: 6px; }
.nx .pt-bal { font-size: 1.9rem; color: var(--good); }
.nx-bars { display: grid; gap: 8px; margin-top: 4px; }
.nx-bar { display: grid; grid-template-columns: minmax(0, 34%) 1fr auto; align-items: center; gap: 10px; font-size: .85rem; }
.nx-bar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-bar > i { height: 10px; border-radius: 6px; background: var(--good-bg); overflow: hidden; }
.nx-bar > i > i { display: block; height: 100%; border-radius: 6px; background: var(--good); }
.nx-bar b { font-variant-numeric: tabular-nums; font-weight: 650; }
.nx-table { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 10px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-left: 18px; }
.nx-table::-webkit-scrollbar { display: none; }
.nx-col { flex: 0 0 62%; max-width: 250px; scroll-snap-align: start; display: grid; gap: 10px; align-content: start; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.nx-col > b { font-size: .98rem; line-height: 1.2; }
.nx-cell { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .9rem; justify-items: start; }
.nx-cell small { color: var(--muted); font-size: .74rem; }
.nx-cell > span:not(.tag) { font-weight: 620; font-variant-numeric: tabular-nums; }
.nx-cell.best > span { color: var(--good); }
.nx-cell.best small::after { content: " · best"; color: var(--good); font-weight: 650; }

/* ---------- Setup: "Not sure which card you have?" ---------- */
.pt-month { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: var(--good-bg); }

.tile small { display: block; color: var(--muted); font-size: .74rem; }

/* ---------- A card on its own page, and perk cards ---------- */
.cp-face { display: grid; justify-items: center; margin-top: 2px; }
.cp-face .face { width: min(100%, 320px); }
.cp-tabs { margin-top: 14px; }
.cp-panel { display: grid; gap: 12px; margin-top: 12px; }
.pk-sec { display: grid; }
.pk-sec h3 { margin: 6px 2px 0; font-size: .95rem; }

/* ---------- Home and card decks: the card in the middle, a glimpse of the next one each side ---------- */
.deck:not(.lw-row) { --dw: min(78vw, 340px); padding-left: calc((100vw - var(--dw)) / 2); padding-right: calc((100vw - var(--dw)) / 2); }
.deck:not(.lw-row) > button { flex: 0 0 var(--dw); transition: transform 240ms var(--ease), opacity 240ms, --lean 240ms var(--ease); will-change: transform; }

/* ---------- Watch out for: rows, not a paragraph ---------- */

.cp-tabbed { display: grid; gap: 4px; }
.lp-card .cp-tabs { margin-top: 10px; }

/* ---------- Cards: sliding actions, the disclaimer; Home: Good to know ---------- */
.act-row, .gk-row { position: relative; display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 8px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-left: 18px; }
.act-row::-webkit-scrollbar, .gk-row::-webkit-scrollbar { display: none; }
.act-row { margin-top: 26px; }
.act-tile { flex: 0 0 42%; scroll-snap-align: start; justify-items: start; padding: 10px 12px; border: 0; border-radius: 18px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.act-tile:active { transform: scale(.985); }
.act-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--good-bg); color: var(--good); font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.act-tile b { font-size: .88rem; }
.act-tile small { color: var(--muted); font-size: .74rem; line-height: 1.25; }
.disc { margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: .8rem; color: var(--muted); }
.disc summary { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; list-style: none; }
.disc summary::-webkit-details-marker { display: none; }
.disc p { margin: 6px 0 0; }

.nx-verdict { display: grid; gap: 2px; --tint: var(--good); }
.nx-verdict small { color: var(--good); font-weight: 650; }
.nx-verdict b { font-size: 1.15rem; }

/* ---------- Card analysis tab; Good to know boxes ---------- */
.cp-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; padding: 3px; gap: 0; }
.cp-tabs button { min-width: 0; min-height: 40px; padding: 0 2px; font-size: .78rem; white-space: nowrap; text-align: center; }
.cp-months { justify-self: start; }
.cp-months button { min-height: 36px; }

/* ---------- Cards wallet on the light page; places row; sale tiles; use it page; compare peek ---------- */

.place-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 10px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-left: 18px; }
.place-row::-webkit-scrollbar { display: none; }
/* Rows of boxes that scroll sideways keep room below for the boxes' shadow (the row clips what overflows) */
.hs-strip, .gk-row, .place-row { padding-bottom: 30px; margin-bottom: -22px; }
div.act-row { padding-bottom: 26px; } /* the Cards tiles: a box follows them, so the room is real space, not pulled back */
.shop-tile.place { flex: 0 0 46%; scroll-snap-align: start; text-decoration: none; color: var(--ink); }
.shop-tile.place.all { place-content: center; justify-items: center; text-align: center; gap: 4px; --tint: var(--good); color: var(--good); }
.all-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff; font-size: 1.2rem; }
.shop-tile.place.all small { color: var(--good); }
.nx-tile .cp-face .face { width: 100%; }
.nx-tile { align-content: start; }
.sale-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sale-tile3 { display: grid; justify-items: center; gap: 8px; padding: 14px 6px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; }
.sale-tile3 small { font-size: .78rem; font-weight: 600; text-align: center; }
.sale-tile3:active { transform: scale(.97); }
.sale-row-link { display: flex; align-items: center; gap: 12px; padding: 4px 0; color: var(--ink); text-decoration: none; }
.sale-row-link small { display: block; color: var(--muted); font-size: .78rem; }
.sale-row-link .chev { color: var(--muted); font-size: 1.3rem; }
/* A shop's bank offers today (saleOffersPage): the shop in the hero, then grouped offer rows like an inset list. */
.so-shop { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.so-shop .pt-badge { width: 36px; height: 36px; border-radius: 11px; }
.so-shop b { color: #eef6f2; font-size: 1rem; font-weight: 700; }
.so-shop + h1 { margin-top: 10px; }
.so-group h2 { margin: 0 0 4px; font-size: 1.02rem; }
.so-list > .so-row + .so-row { border-top: 1px solid var(--line); }
.so-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; }
.so-list > .so-row:last-child { padding-bottom: 2px; }
.so-mark { flex: none; margin-top: 2px; }
.so-mark.mini { width: 40px; height: 26px; border-radius: 6px; }
.so-mark.mini::after { left: 5px; top: 8px; width: 9px; height: 7px; }
.so-mark.pt-badge { width: 40px; height: 40px; font-size: .68rem; letter-spacing: 0; }
div.sk.so-mark { width: 40px; height: 40px; border-radius: 12px; }
.so-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.so-main > .sk + .sk { margin-top: 6px; }
.so-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.so-val { font-size: 1.22rem; font-weight: 780; letter-spacing: -.02em; color: var(--good); line-height: 1.2; }
.so-yours { flex: none; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-bank { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.so-code { justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 5px 10px; border: 1px dashed var(--good); border-radius: 9px; background: var(--good-bg); color: var(--good); font: inherit; font-weight: 700; font-size: .84rem; letter-spacing: .04em; cursor: pointer; }
.so-code small { font-weight: 600; letter-spacing: 0; opacity: .8; }
.so-code:active { transform: scale(.97); }
.so-state b { font-size: 1.02rem; }
.so-best { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.so-note { margin: 4px 2px 0; }
.so-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 2px; }
.so-foot > :only-child { margin-left: auto; }
.ui-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ui-row:first-of-type { border-top: 0; }
.ui-row .mini { width: 40px; height: 26px; border-radius: 5px; }
.ui-t { color: var(--ink); text-decoration: none; min-width: 0; }
.ui-t b { display: block; font-size: .92rem; line-height: 1.25; }
.ui-t small { display: block; color: var(--muted); font-size: .78rem; margin-top: 1px; }
.cmp { overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.cmp::-webkit-scrollbar { display: none; }
.cmp.section > .cmp-head, .cmp.section > .cmp-row { width: calc(var(--n, 2) * 46%); min-width: 100%; }
.pt-badge { text-transform: uppercase; }

/* ---------- Good to know at one size ---------- */
.lw { perspective: 1400px; perspective-origin: 50% 100%; }

.nx-col.base { background: var(--surface-2); }

/* depth: the sides of the front fall away a little, and its lower edge is thicker */

/* Depth: a painted edge round the front, a thicker lower lip, the cards shaded where they meet the pocket, and the wallet's own shadow on the page. */
.lw-body { box-shadow: inset 0 2px 1px rgba(255, 255, 255, .38), inset 0 0 0 2px rgba(0, 0, 0, .28), inset 0 -6px 0 rgba(0, 0, 0, .22), inset 0 -18px 26px rgba(0, 0, 0, .25),
  0 -10px 14px -8px rgba(0, 0, 0, .55), 0 22px 30px -14px rgba(0, 0, 0, .65), 0 8px 12px -6px rgba(0, 0, 0, .45) !important; }
.lw-back { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .3), inset 0 14px 24px rgba(0, 0, 0, .45); }

/* Real leather: a photographed, free-to-use (CC0) leather surface from ambientCG (Leather 037), tinted to the chosen colour by
   laying it over the colour with "overlay", so the grain and its light stay real whichever colour is picked. */
.lw-body, .lw-back { background-size: 240px auto, auto, auto, auto; }
.lw-body { background-image: linear-gradient(90deg, rgba(0, 0, 0, .2), transparent 9%, transparent 91%, rgba(0, 0, 0, .2)), radial-gradient(120% 90% at 22% -10%, rgba(255, 255, 255, .22), transparent 55%), url("leather.jpg"), linear-gradient(165deg, var(--l1) 0%, var(--l2) 48%, var(--l3) 100%) !important;
  background-size: auto, auto, 260px auto, auto !important; background-blend-mode: normal, normal, overlay, normal !important; }
.lw-back { background-image: url("leather.jpg"), linear-gradient(180deg, var(--l2), var(--l3)) !important; background-size: 260px auto, auto !important; background-blend-mode: overlay, normal !important; filter: brightness(.6); }

/* The owner's first name: a fine italic serif in brushed silver, pressed into the leather, on the button's line. */
.lw-name { position: absolute; left: 22px; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; font-family: Georgia, 'Times New Roman', Times, serif; font-style: italic; font-weight: 400; font-size: 1.05rem; letter-spacing: .09em; line-height: 32px; color: #e4e7eb; opacity: .9; text-shadow: 0 -1px 0 rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .2); }

/* Good to know: no underlines, one size */

/* the wallet's name and button share one line */
.lw-pill { bottom: 18px !important; }
.lw-name { bottom: 12px !important; }
/* Your next card: the card as a chip that fits its tile */
.nx-chip { display: grid; align-content: space-between; aspect-ratio: 1.586; width: 100%; padding: 8px 10px; border-radius: 12px; background: linear-gradient(135deg, var(--c1), var(--c2)); color: var(--ink-card, #fff); overflow: hidden; box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .5); }
.nx-chip small { font-size: .7rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .92; }
.nx-chip em { font-size: .68rem; font-style: italic; font-weight: 700; justify-self: end; }
.nx-tile b { font-size: .86rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lw-row { gap: 10px; }

/* Home: bigger cards, the neighbours still showing */

/* Shortcuts and tiles: flex, not grid, inside a button, so Safari on iPhone does not stretch the rows apart */
.sc-row { align-items: flex-start; }
.sc-bub { display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; height: auto; }
.act-tile { display: flex !important; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1px; height: auto; }
.sc-ic { flex: none; }

/* The wallet row must not scale or fade its own buttons (the generic deck rule does): the cards inside move by their own animation. */
.lw-row > button, .lw-row > button:not(.on) { transform: none !important; opacity: 1 !important; transition: none !important; }

.lw-hint.on-white { color: var(--muted); }
.home .deck:not(.lw-row) { --dw: min(88vw, 380px); }
.home .monthcard { margin-left: auto; margin-right: auto; }
.mc-score b { font-size: .74rem; } .mc-score span { font-size: .52rem; }
.ui-hot { --tint: #8a1f3d; }
.ui-hot > .row b { color: #8a1f3d; }
:root[data-theme="dark"] .ui-hot { --tint: var(--box-tint); }
:root[data-theme="dark"] .ui-hot > .row b { color: var(--ink); }
:root[data-theme="dark"] .ui-hot .ui-row { border-top-color: var(--line); }
.ui-hot .ui-row { border-top-color: color-mix(in srgb, #8a1f3d 18%, transparent); }

/* Home: the month box as a wide, low, rounded rectangle */
.home .monthcard { border-radius: 20px; }

.mc-score { width: 62px; height: 62px; } .mc-ring { width: 62px; height: 62px; }
.mc-top .small { font-size: .74rem; }
.mc-foot { margin-top: 4px; padding-top: 5px; font-size: .74rem; }
/* Cards: "Card by card analysis" sits on the green like every other tab's heading, above the wallet; the wallet's dots work on green and on white */
.cbc-head { display: flex; align-items: center; gap: 12px; margin: 26px 0 2px; }
.cbc-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; flex: none; background: linear-gradient(145deg, #12b27a, #007a4e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -6px rgba(0, 40, 24, .6); }
.cbc-head h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.025em; line-height: 1.15; }
.cbc-head small { display: block; margin-top: 2px; font-size: .8rem; opacity: .8; }
.cbc-head .hd-green.on-white { color: var(--ink); }
.cbc-wal .lw-dots i { background: rgba(30, 60, 45, .28); }
.cbc-wal .lw-dots i.on { background: #fff; box-shadow: 0 0 0 1px rgba(30, 60, 45, .45); }

/* Actions under a card: rows in one white card, and the "nothing saved yet" box */
.act-list { padding: 2px 16px; }
.act-row { margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.act-row:first-child { border-top: 0; }
.act-row:active { opacity: .7; }
.act-row .grow { min-width: 0; } .act-row .small { display: block; line-height: 1.3; }
.nodata { display: grid; justify-items: start; gap: 6px; padding: 16px; }
.nodata p { margin: 0; }
.nodata .act-list { justify-self: stretch; margin-top: 6px; padding: 0 12px; background: var(--surface-2, var(--bg)); box-shadow: none; }
.nd-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; background: var(--good-bg); }

/* Messages: a rounded pill with an icon; Undo is a plain green button, with a bar running down while it is still possible */
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; font-size: .9rem; font-weight: 600; position: relative; overflow: hidden; background: color-mix(in srgb, var(--ink) 94%, #0f2e23); }
.toast-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .85rem; font-weight: 800; background: rgba(255, 255, 255, .16); }
.toast-msg { min-width: 0; line-height: 1.25; }
.toast.has-action { gap: 10px; padding-right: 6px; }
.toast-btn { min-height: 34px; min-width: 0; padding: 0 14px; border-radius: 999px; background: #1fcf8f; color: #04281a; font-weight: 800; font-size: .86rem; }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #1fcf8f; transform-origin: left; animation: toastbar linear forwards; }
@keyframes toastbar { to { transform: scaleX(0); } }

/* Tiles: a rupee figure and its paise stay on one line (the small-label rule for tiles had made each a block) */
.tile b .money, .tile b .money .p { display: inline; font-size: inherit; margin: 0; white-space: nowrap; }
.tile b .money { color: inherit; }
.tile b .money .p { color: var(--faint); }

/* Spends: one slim line each; tap for details and Delete */
.item.sp { min-height: 0; padding: 11px 14px; gap: 11px; cursor: pointer; }
.list > .item.sp { flex-wrap: wrap; min-height: 0; }
.item.sp .grow { flex: 1 1 0; }
.item.sp .t { font-size: .95rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.item.sp .grow .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .76rem; margin-top: 1px; }
.sp-sum { text-align: right; flex: none; }
.sp-sum .amt { font-size: .98rem; }
.sp-sum .small { font-size: .74rem; white-space: nowrap; }
.sp-more { flex: 1 1 100%; display: none; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0 0 49px; }
.item.sp.open .sp-more { display: flex; }
.item.sp.open { background: var(--surface-2); }
.sp-miss { font-size: .78rem; color: var(--bad); font-weight: 600; line-height: 1.3; }
.sp-del { flex: none; border: 0; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .8rem; font-weight: 700; color: var(--bad); background: color-mix(in srgb, var(--bad) 11%, transparent); }
.sp-del:active { transform: scale(.96); }
.sp-search { width: 100%; margin: 0 0 4px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem; }
.sp-search:focus { outline: 2px solid #007a4e; outline-offset: 1px; }

/* Home: the month box as wide as the cards, a little taller */
.home .monthcard { width: min(88vw, 380px); padding: 12px 16px 10px; }
.mc-big { font-size: 1.55rem; }
.mc-score, .mc-ring { width: 68px; height: 68px; }

/* Missed rewards page */
.ms-top3 { display: grid; gap: 12px; }
.ms-sw { display: flex; justify-content: center; }
.ms-sw .mo-switch { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.ms-sw .mo-switch button { color: #d6efe4; padding: 7px 20px; font-size: .88rem; }
.ms-sw .mo-switch button[aria-pressed="true"] { color: #0f2e23; font-weight: 700; }
.ms-sw .mo-pill { background: #fff; }
.ms-hero { position: relative; overflow: hidden; padding: 18px 18px 16px; border-radius: 26px; color: #fff; background: linear-gradient(150deg, #ff9a52 0%, #ef5a36 55%, #c8312c 100%); box-shadow: 0 18px 34px -18px rgba(120, 20, 10, .75), inset 0 1px 0 rgba(255, 255, 255, .35); }
.ms-hero::after { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .28), transparent); }
.ms-hero.good { background: linear-gradient(150deg, #2fd69a, #0f9d6b 60%, #0a7a56); box-shadow: 0 18px 34px -18px rgba(0, 60, 40, .7), inset 0 1px 0 rgba(255, 255, 255, .35); }
.ms-hero-top { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: .95rem; position: relative; }
.ms-hero-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); }
.ms-big { margin: 10px 0 2px; position: relative; }
.ms-big .money { color: #fff; font-size: clamp(2.6rem, 13vw, 3.2rem); font-weight: 780; letter-spacing: -.045em; }
.ms-big .money .p { color: rgba(255, 255, 255, .72); font-weight: 600; }
.ms-hero-sub { margin: 6px 0 0; font-size: .9rem; line-height: 1.4; color: rgba(255, 255, 255, .92); position: relative; max-width: 34ch; }
.ms-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; position: relative; }
.ms-chips span { padding: 5px 11px; border-radius: 999px; background: rgba(0, 0, 0, .2); font-size: .78rem; font-weight: 650; }
.ms-fix { padding: 16px 14px; }
.ms-fix .ms-h { padding: 0 4px; font-size: 1.1rem; }
.ms-fix > p { padding: 0 4px; }
details.ms-rule { display: block; padding: 0; margin-top: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
details.ms-rule:first-of-type { border-top: 1px solid var(--line); padding-top: 0; }
details.ms-rule[open] { border-color: color-mix(in srgb, #ef5a36 45%, var(--line)); box-shadow: 0 8px 18px -12px rgba(200, 50, 40, .5); }
.ms-rule > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; }
.ms-rule > summary::-webkit-details-marker { display: none; }
.ms-rule .ms-n { background: #ef5a36; color: #fff; }
.rep-gain.big { font-size: .95rem; padding: 4px 10px; }
.ms-body { padding: 2px 14px 14px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.ms-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 8px; margin-top: 10px; }
.ms-side { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 14px; background: var(--surface-2, var(--bg)); min-width: 0; }
.ms-side.best { background: color-mix(in srgb, var(--good) 11%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--good) 45%, transparent); }
.ms-side .mini { flex: none; width: 30px; height: 20px; margin-top: 2px; }
.ms-side small { display: block; font-size: .68rem; color: var(--muted); }
.ms-side b { display: block; font-size: .84rem; line-height: 1.2; overflow-wrap: anywhere; }
.ms-side span { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.ms-arrow { align-self: center; color: var(--muted); font-size: 1.1rem; }
/* Two sides of a comparison need room for lakhs and crores: stacked, with the arrow pointing down, unless the box is wide */
.ms-body { container-type: inline-size; }
@container (max-width: 400px) { .ms-compare { grid-template-columns: minmax(0, 1fr); } .ms-arrow { justify-self: center; transform: rotate(90deg); } .ms-side span { overflow-wrap: normal; } }
.ms-paylist { display: grid; gap: 0; margin-top: 4px; }
.ms-pl-h { margin: 0 0 2px; font-weight: 600; }
.ms-pay { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-top: 6px; border-radius: 12px; background: color-mix(in srgb, #ef5a36 8%, var(--surface)); border-left: 3px solid #ef5a36; }
.ms-pay b { font-size: .9rem; }
.ms-paylist .more-btn { margin-top: 8px; }

/* Upload a statement, and the results */
.su-head { display: flex; align-items: center; gap: 12px; }
.su-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(145deg, #12b27a, #007a4e); box-shadow: 0 8px 16px -8px rgba(0, 90, 60, .7); }
.su-ic svg, .su-up svg, .su-cam svg, .su-priv svg { stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.su-ic svg { width: 24px; height: 24px; }
.su-priv { margin: 3px 0 0; display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); }
.su-priv svg { width: 13px; height: 13px; }
.su-step { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; font-weight: 650; font-size: .9rem; }
.su-step i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .75rem; font-weight: 800; color: #fff; background: #007a4e; flex: none; }
.su-drop { display: grid; justify-items: center; gap: 8px; width: 100%; padding: 22px 14px; border: 2px dashed color-mix(in srgb, #007a4e 45%, var(--line)); border-radius: 20px; background: color-mix(in srgb, #007a4e 6%, var(--surface)); color: var(--ink); font: inherit; cursor: pointer; transition: transform 160ms var(--ease), background 160ms; }
.su-drop:active { transform: scale(.985); background: color-mix(in srgb, #007a4e 12%, var(--surface)); }
.su-up { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #007a4e; box-shadow: 0 8px 18px -8px rgba(0, 90, 60, .8); }
.su-up svg { width: 26px; height: 26px; }
.su-drop b { font-size: 1.05rem; }
.su-kinds { display: flex; gap: 6px; }
.su-kinds i { font-style: normal; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.su-cam { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font: inherit; font-weight: 600; color: var(--ink); }
.su-cam svg { width: 20px; height: 20px; }
.su-busy { display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: 18px; background: color-mix(in srgb, #007a4e 8%, var(--surface)); }
.su-busy b { display: block; }
.su-busy small { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; }
.su-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid color-mix(in srgb, #007a4e 25%, transparent); border-top-color: #007a4e; animation: suspin 800ms linear infinite; flex: none; }
@keyframes suspin { to { transform: rotate(360deg); } }
.su-err { margin-top: 10px; padding: 12px 14px; border-radius: 14px; font-size: .88rem; line-height: 1.4; color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 30%, transparent); }
.su-tips { padding: 12px 14px; border-radius: 16px; background: var(--surface-2, var(--bg)); font-size: .86rem; }
.su-tips summary { cursor: pointer; font-weight: 650; }
.su-tips ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); }
.su-done { justify-items: stretch; }
.su-tick { width: 64px; height: 64px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #12b27a, #007a4e); animation: sutick 520ms var(--spring) both; }
.su-tick svg { width: 32px; height: 32px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes sutick { from { transform: scale(.4); opacity: 0; } }
/* results */
.rv-sum { padding: 16px; border-radius: 22px; color: #fff; background: linear-gradient(150deg, #0f3d2d, #007a4e 70%, #12b27a); box-shadow: 0 14px 28px -16px rgba(0, 60, 40, .8); }
.rv-sum-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .78rem; }
.rv-src { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-weight: 700; }
.rv-span { color: #cfeadd; }
.rv-found { margin-top: 10px; font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.rv-tot small { display: block; color: #cfeadd; font-size: .74rem; margin-top: 6px; }
.rv-tot b { font-size: 2rem; letter-spacing: -.04em; font-weight: 780; }
.rv-sub { margin-top: 2px; font-size: .78rem; color: #cfeadd; }
.rv-warn { padding: 10px 12px; border-radius: 14px; font-size: .84rem; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.rv-need { padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; font-size: .82rem; color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.rv-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rv-all { flex: none; border: 0; background: none; font: inherit; font-size: .8rem; font-weight: 700; color: #007a4e; padding: 6px 0; }
.rv-day { margin-top: 10px; }
.rv-dh { display: flex; justify-content: space-between; padding: 0 4px 6px; font-size: .8rem; font-weight: 650; color: var(--muted); }
.rv-list { border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.rv-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.rv-row + .rv-row { border-top: 1px solid var(--line); }
.rv-check { width: 22px; height: 22px; flex: none; accent-color: #007a4e; }
.rv-shop { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: inherit; }
.rv-shop b { display: block; font-size: .92rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-shop small { display: block; margin-top: 1px; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-shop.check small { color: var(--warn); font-weight: 600; }
.rv-amt { flex: none; text-align: right; }
.rv-amt b { display: block; font-size: .95rem; white-space: nowrap; }
.rv-amt small { font-size: .7rem; color: var(--muted); }
.rv-flag { display: inline-block; margin-top: 2px; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.rv-bar { position: sticky; bottom: -1px; margin: 4px -4px 0; padding: 12px 4px 4px; background: linear-gradient(transparent, var(--surface) 28%); }

/* Pick: ideas to ask (a sideways row of questions, and the sheet with all of them by intent) */
.idea-chips { margin-top: 12px; }
.idea-chips .chip2 { flex: none; min-height: 40px; white-space: nowrap; }
.idea-chips .chip2.more, .idea-group .chip2:hover { border-color: var(--accent); color: var(--accent-text); }
.idea-group b { display: block; margin: 4px 0 8px; font-size: .92rem; }
.idea-group .chip2 { min-height: 40px; text-align: left; }

/* Contact us and Suggest a feature: a chat */
.sp-chat { background: var(--surface); border-radius: 26px; box-shadow: var(--shadow-sm); overflow: hidden; }
.sp-who { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sp-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; flex: none; background: linear-gradient(145deg, #12b27a, #007a4e); box-shadow: 0 6px 14px -6px rgba(0, 90, 60, .7); }
.sp-who b { display: block; }
.sp-who small { display: block; color: var(--muted); font-size: .76rem; margin-top: 1px; }
.sp-pill { flex: none; padding: 4px 10px; border-radius: 999px; font-size: .7rem; font-weight: 700; color: #007a4e; background: color-mix(in srgb, #007a4e 12%, transparent); }
.sp-thread { display: grid; gap: 10px; padding: 16px; background: color-mix(in srgb, var(--bg, #f4f7f5) 70%, var(--surface)); }
.sp-thread .bubble { max-width: 86%; padding: 10px 13px; border-radius: 18px; font-size: .92rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-thread .bubble.them { justify-self: start; border-bottom-left-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.sp-thread .bubble.me { justify-self: end; border-bottom-right-radius: 6px; color: #fff; background: #007a4e; }
.sp-thread .bubble.me .small { color: rgba(255, 255, 255, .8); margin-top: 4px; }
.sp-ok { display: flex; align-items: flex-start; gap: 10px; justify-self: stretch; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, #007a4e 11%, var(--surface)); }
.sp-ok i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #007a4e; }
.sp-ok i svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-ok b { display: block; }
.sp-notify { justify-self: start; font-size: .82rem; font-weight: 650; color: #007a4e; text-decoration: none; }
.sp-compose { display: grid; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.sp-q { font-weight: 650; font-size: .9rem; }
.sp-box { width: 100%; min-height: 104px; resize: none; padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem; line-height: 1.4; }
.sp-box:focus { outline: 2px solid #007a4e; outline-offset: 1px; }
.sp-send { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; color: #fff; background: #007a4e; box-shadow: 0 8px 16px -8px rgba(0, 90, 60, .8); }
.sp-send svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sp-send:disabled { opacity: .45; box-shadow: none; }
.sp-send:active:not(:disabled) { transform: scale(.96); }
.sp-next .sp-step { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; font-size: .88rem; color: var(--muted); }
.sp-next .sp-step i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .74rem; font-weight: 800; color: #007a4e; background: color-mix(in srgb, #007a4e 13%, transparent); }

/* Settings and account: grouped cards */
.sc2 { margin-top: 14px; border-radius: 22px; overflow: hidden; }
.sc2-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.sc2-h h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.01em; }
.sc2-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; font-size: 1rem; background: var(--good-bg); }
.sc2-body { padding: 6px 16px 12px; }
.sc2 .set-line { padding: 10px 16px 14px; }
.sc2 .sr { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.sc2 .sr:active { background: var(--surface-2, var(--bg)); }
.sc2 .sr b { display: block; font-size: .94rem; }
.sc2 .sr .small { display: block; }
.sc2 .sr .sc2-ic { width: 32px; height: 32px; }
.sc2 .sr .chev { width: 18px; height: 18px; color: var(--faint); flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sc2 .sr.danger b { color: var(--bad); }
.sc2 .sr.danger .sc2-ic { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.sp-who b { white-space: nowrap; }

/* The progress bar: a glowing gradient that sweeps with light, so you can see it is alive */
.meter { height: 12px; border-radius: 99px; background: color-mix(in srgb, #0f9d6b 12%, var(--paper-2)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); }
.meter > i { position: relative; overflow: hidden; border-radius: 99px; background: linear-gradient(90deg, #0f9d6b, #5fe0a8); box-shadow: 0 0 12px -2px rgba(15, 157, 107, .8); }
.meter > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .6) 50%, transparent 75%); transform: translateX(-120%); animation: meterShine 2.6s ease-in-out infinite; }
.meter.hot > i { background: linear-gradient(90deg, #e0a100, #ffd45c); box-shadow: 0 0 12px -2px rgba(224, 161, 0, .8); }
.meter.full > i { background: linear-gradient(90deg, #d6336c, #ff8fb6); box-shadow: 0 0 12px -2px rgba(214, 51, 108, .8); }
.meter.done > i { background: linear-gradient(90deg, #0f9d6b, #5fe0a8); }
.lp-bar { height: 12px; border-radius: 99px; }
.lp-bar i { border-radius: 99px; }
.lp-bar .got { background: linear-gradient(90deg, var(--lc), color-mix(in srgb, var(--lc) 55%, #fff)); overflow: hidden; box-shadow: 0 0 10px -3px var(--lc); }
.lp-bar .got::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .55) 50%, transparent 75%); transform: translateX(-120%); animation: meterShine 2.6s ease-in-out infinite; }
@keyframes meterShine { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(130%); } }
@media (prefers-reduced-motion: reduce) { .meter > i::after, .lp-bar .got::after { animation: none; }}

/* Wallet colours: the + that opens the colour picker */
.lw-swatches .add { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: conic-gradient(#ff5f6d, #ffc371, #f9f871, #4cd964, #34c8ff, #8f7bff, #ff5f6d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 5px rgba(0, 0, 0, .3); }
.lw-swatches .add span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); font-size: 1.25rem; font-weight: 700; line-height: 1; }
.lw-swatches .add input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* Rewards */
.rw-rate { flex: none; width: 66px; height: 66px; border-radius: 50%; display: grid; place-content: center; text-align: center; }
.rw-rate b { font-size: 1.35rem; line-height: 1; letter-spacing: -.03em; }
.rw-rate.long b { font-size: 1.05rem; }
.rw-rate small { font-size: .62rem; opacity: .85; margin-top: 1px; }
.rw-sub { font-size: .8rem; color: var(--muted); }
.rw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rw-chips span { padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.rw-live small { display: block; margin-top: 5px; font-size: .76rem; color: var(--muted); }
.rw-none { margin-top: 12px; padding: 14px; border-radius: 22px; background: color-mix(in srgb, var(--bad) 7%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 22%, transparent); }
.rw-none-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 1.3rem; }
.rw-none-h b { display: block; font-size: .98rem; }
.rw-none-h small { display: block; color: var(--muted); font-size: .78rem; }
.rw-none-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rw-x { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--surface); font-size: .84rem; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.rw-x i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--bad) 12%, transparent); font-size: .8rem; }

/* Perks */
.pkx { display: grid; gap: 10px; padding: 16px; border-radius: 22px; cursor: pointer; transition: transform 160ms var(--ease); }
.pkx:active { transform: scale(.988); }
.pkx-top { display: flex; align-items: center; gap: 12px; }
.pkx-ic { flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 1.5rem; background: color-mix(in srgb, #0f9d6b 13%, var(--surface)); }
.pkx-cover .pkx-ic { background: color-mix(in srgb, #2f8fe0 15%, var(--surface)); }
.pkx-lounge .pkx-ic, .pkx-travel .pkx-ic { background: color-mix(in srgb, #8a6d3b 16%, var(--surface)); }
.pkx-fuel .pkx-ic, .pkx-fees .pkx-ic { background: color-mix(in srgb, #ee6c2b 15%, var(--surface)); }
.pkx-golf .pkx-ic { background: color-mix(in srgb, #0f9d6b 18%, var(--surface)); }
.pkx-big { font-size: 1.5rem; font-weight: 780; letter-spacing: -.035em; line-height: 1.1; color: #0b7a53; }
.pkx-cover .pkx-big { color: #1d6fb8; }
.pkx-fuel .pkx-big, .pkx-fees .pkx-big { color: #c2410c; }
.pkx-t { font-size: .98rem; font-weight: 640; line-height: 1.25; }
.pkx-d { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pkx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pkx-chips span { padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 650; background: var(--surface-2, var(--bg)); color: var(--muted); }
.pkx-chips .lock { color: #b45309; background: color-mix(in srgb, #e0a100 16%, transparent); }
.pkx-chips .warn { color: #b45309; background: color-mix(in srgb, #e0a100 16%, transparent); }
.pkx-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .82rem; }
.pkx-link { font-weight: 650; color: #1d6fb8; text-decoration: none; }
.pkx-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.pkx-go i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; color: #fff; background: #007a4e; }
.pk-sec { gap: 12px; }
/* One perk on its own page (viewPerk): a hero with its state, then how to claim, the fine print folded, and one action at the end. */
.pkp-card { display: inline-flex; align-items: center; gap: 4px; color: #cfeadd; font-weight: 600; text-decoration: none; }
.pkp-card i { font-style: normal; font-size: 1.2em; line-height: 1; }
.pkp-hero.pkx-cover { --tint: #2f8fe0; } .pkp-hero:is(.pkx-lounge, .pkx-travel) { --tint: #8a6d3b; } .pkp-hero:is(.pkx-fuel, .pkx-fees) { --tint: #ee6c2b; }
.pkp-top { display: flex; align-items: center; gap: 14px; }
.pkp-top .grow { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.pkp-top .tag.muted { background: var(--paper-2); color: var(--muted); }
.pkp-big { font-size: 1.9rem; font-weight: 780; letter-spacing: -.04em; line-height: 1.05; color: var(--accent-text); overflow-wrap: anywhere; }
.pkp-line { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--ink-2, var(--ink)); }
.pkp-pips { display: flex; gap: 6px; }
.pkp-pips i { flex: 1; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 14%, var(--paper-2)); }
.pkp-pips i.on { background: var(--accent); }
.pkp-gate { display: grid; gap: 6px; }
.pkp-gate small { color: var(--muted); font-size: .82rem; }
.pkp-warn { margin: 0; font-size: .85rem; line-height: 1.4; color: var(--warn); }
.pkp-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.pkp-list li { position: relative; padding-left: 20px; font-size: .93rem; line-height: 1.45; }
.pkp-list li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pkp-first { padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--ink); }
.pkp-first > b { display: block; font-size: .82rem; color: var(--warn); }
.pkp-first ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; line-height: 1.4; }
.pkp-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.pkp-steps li { position: relative; counter-increment: s; padding: 2px 0 0 38px; min-height: 26px; font-size: .93rem; line-height: 1.45; }
.pkp-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.pkp-one { color: var(--ink); font-size: .95rem; }
.pkp-thin { margin: 0; font-size: .8rem; color: var(--faint, var(--muted)); }
.cp-sec.pkp-fine { display: block; }
.pkp-fine > summary { list-style: none; cursor: pointer; color: var(--ink); display: flex; align-items: center; justify-content: space-between; min-height: 24px; font-weight: 680; }
.pkp-fine > summary::-webkit-details-marker { display: none; }
.pkp-fine > summary::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 200ms; }
.pkp-fine[open] > summary { margin-bottom: 12px; }
.pkp-fine[open] > summary::after { transform: rotate(-135deg); }
.pkp-src { display: inline-block; margin-top: 12px; color: var(--accent-text); font-weight: 650; text-decoration: none; }
.pkp-acts { display: grid; gap: 10px; margin-top: 20px !important; }
.pv-box { padding: 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.pv-box h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font-size: 1.02rem; }
.pv-box h3 i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .8rem; font-weight: 800; color: #fff; background: #007a4e; }
.pv-box.need { background: color-mix(in srgb, #e0a100 10%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, #e0a100 35%, transparent); }
.pv-box.need h3 i { background: #d18a00; }
.pv-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pv-list li { position: relative; padding-left: 26px; font-size: .93rem; line-height: 1.45; }
.pv-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .68rem; font-weight: 800; color: #fff; background: #12b27a; }
.pv-box.need .pv-list li::before { content: "!"; background: #d18a00; }

/* Do you know? */
.dyk-head { display: flex; align-items: center; gap: 12px; }
.dyk-head h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.03em; }
.dyk-head small { display: block; margin-top: 2px; font-size: .82rem; opacity: .85; }
.dyk-bulb { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; flex: none; background: linear-gradient(145deg, #ffd45c, #f0953f); box-shadow: 0 8px 16px -8px rgba(240, 149, 63, .9), inset 0 1px 0 rgba(255, 255, 255, .5); animation: bulb 3.2s ease-in-out infinite; }
@keyframes bulb { 0%, 100% { box-shadow: 0 8px 16px -8px rgba(240, 149, 63, .9), 0 0 0 0 rgba(255, 212, 92, .0); } 50% { box-shadow: 0 8px 16px -8px rgba(240, 149, 63, .9), 0 0 0 8px rgba(255, 212, 92, .22); } }
@media (prefers-reduced-motion: reduce) { .dyk-bulb { animation: none; }}
.dyk-row { gap: 12px; }
.dyk { --tint: var(--dk, #0f9d6b); --box-mark: inset 0 3px 0 var(--tint); scroll-snap-align: start; align-content: start; color: var(--ink); text-decoration: none; }
.dyk:active { transform: scale(.985); }
.dyk-cover { --dk: #2f8fe0; } .dyk-lounge { --dk: #8a6d3b; } .dyk-hidden { --dk: #d18a00; } .dyk-waiver { --dk: #0f9d6b; } .dyk-fee { --dk: #ee6c2b; } .dyk-reward { --dk: #ee6c2b; } .dyk-none { --dk: #d6336c; } .dyk-limit { --dk: #0e9aa7; } .dyk-perk { --dk: #0f9d6b; } .dyk-forex { --dk: #2f8fe0; } .dyk-net { --dk: #4b5bd6; } .dyk-rule { --dk: #5f6b66; }

.dyk-k { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; }
.dyk-k i { font-style: normal; font-size: .9rem; }
.dyk-top .mini { margin-left: auto; width: 26px; height: 17px; border-radius: 4px; }
.dyk-top .mini::after { left: 3px; top: 5px; width: 6px; height: 4px; }
.dyk-top small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dyk-t { font-weight: 720; letter-spacing: -.015em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dyk-d { margin: 0; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.dyk-go { align-items: center; margin-top: 2px; }
.dyk-go i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; color: #fff; background: var(--dk); }

/* Pick: the ask box as a real object with depth */
.ask-card { position: relative; padding: 16px 14px 14px; border-radius: 28px; border: 1px solid rgba(255, 255, 255, .7); background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--surface) 90%, #cfe8dc) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -2px 4px rgba(0, 40, 25, .05), 0 2px 3px rgba(0, 30, 20, .1), 0 12px 22px -8px rgba(0, 30, 20, .35), 0 30px 48px -26px rgba(0, 30, 20, .5); }
.ask-card h1 { justify-content: flex-start; text-align: left; margin: 0 0 12px -2px; font-size: clamp(1.08rem, 5.2vw, 1.3rem); gap: 9px; }
.ask-spark { width: 32px; height: 32px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 3px 6px -2px rgba(0, 90, 60, .35); }
.ask-card .ask { max-width: 100%; }
.ask-card .ask:focus-within { box-shadow: inset 0 2px 4px rgba(0, 30, 20, .08), inset 0 0 0 2px var(--good); }
.ask input { text-overflow: ellipsis; }
.ask input::placeholder { transition: opacity 260ms; text-overflow: ellipsis; }
.ask input.ph-out::placeholder { opacity: 0; }
.pick-hint.try { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; font: inherit; font-size: .82rem; color: var(--muted); cursor: pointer; }
.pick .ask-card + .section { margin-top: 12px; }

/* Rewards: each rate in its brand's colour */
.rw-rate { color: var(--rf, #fff); background: linear-gradient(145deg, color-mix(in srgb, var(--rb, #12b27a) 78%, #fff), var(--rb, #087a52)); box-shadow: 0 8px 16px -8px color-mix(in srgb, var(--rb, #0a7a52) 85%, #000), inset 0 1px 0 rgba(255, 255, 255, .4); }
.rw-chips span { color: color-mix(in srgb, var(--rb, #0f9d6b) 70%, #000); background: color-mix(in srgb, var(--rb, #0f9d6b) 13%, transparent); }
.rw-conds { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.rw-conds li { position: relative; padding-left: 14px; font-size: .76rem; line-height: 1.35; color: var(--muted); }
.rw-conds li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 5px; height: 5px; border-radius: 50%; background: var(--rb, #0f9d6b); }
.pt-badge { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 2px 4px -1px rgba(0, 0, 0, .25); }

/* Card faces: a real card's depth: raised edge, grain, a gloss that catches the light, an embossed name, a chip that shines */
.face { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 0'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.22'/></svg>"), linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%); background-blend-mode: soft-light, normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), inset 0 -2px 3px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 0 0 .5px rgba(0, 0, 0, .35), 0 3px 5px rgba(0, 0, 0, .22), 0 16px 24px -10px rgba(0, 0, 0, .55), 0 30px 36px -24px rgba(0, 0, 0, .5); }
.face::after { background: radial-gradient(120% 90% at 8% -10%, rgba(255, 255, 255, .34), transparent 52%), linear-gradient(112deg, transparent 28%, rgba(255, 255, 255, .2) 44%, rgba(255, 255, 255, .05) 52%, transparent 64%), linear-gradient(0deg, rgba(0, 0, 0, .22), transparent 38%); }
.face .f-name, .face .f-amt { text-shadow: 0 1px 0 rgba(0, 0, 0, .38), 0 -1px 0 rgba(255, 255, 255, .16); }
.face .chipmark { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 2px rgba(0, 0, 0, .35); background-image: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%), linear-gradient(135deg, #f7e2a1, #c9a24a 55%, #f1d78a); }
.face .chipmark.silver { background-image: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%), linear-gradient(135deg, #f2f2f4, #a9abb3 55%, #e4e5e9); }
.face .f-net { text-shadow: 0 1px 1px rgba(0, 0, 0, .3); }

/* Do you know?: a wide, low card: the icon, the words, the arrow */
.dyk { flex: 0 0 88%; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; border-radius: 20px; }
.dyk-ic { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 1.4rem; background: color-mix(in srgb, var(--dk) 14%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dk) 22%, transparent); }
.dyk-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dyk-top { display: flex; align-items: baseline; gap: 6px; }
.dyk-k { padding: 0; background: none; font-size: .68rem; font-weight: 800; letter-spacing: .02em; color: var(--dk); }
.dyk-top small { margin: 0; max-width: none; font-size: .68rem; color: var(--muted); }
.dyk-top small::before { content: "· "; }
.dyk-t { font-size: .96rem; line-height: 1.2; }
.dyk-d { font-size: .78rem; line-height: 1.3; -webkit-line-clamp: 3; }
.dyk-go { flex: none; width: 32px; height: 32px; margin: 0; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; font-weight: 700; color: #fff; background: var(--dk); }

/* Wallet: every card shows in the stack, each step a little higher than the one in front */
.lw:not(.open) .lw-t { transform: translate(calc(var(--home) - var(--i) * (var(--cw) + 10px)), calc(var(--shut) - var(--k) * var(--st, 16px))) scale(var(--sc)); }

.lw-row > button { z-index: calc(100 - var(--i)); }

/* Home: even spacing around the headings */
.dyk-head { margin-bottom: 16px; }
.home .sc-row { margin-top: -6px; }

/* Rewards: the cards are links; and a rule's own page */
.rl-hero { display: flex; align-items: center; gap: 16px; padding: 18px 16px; border-radius: 26px; background: linear-gradient(135deg, color-mix(in srgb, var(--rb, #0f9d6b) 16%, var(--surface)), var(--surface)); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--rb, #0f9d6b) 45%, transparent), var(--shadow-sm); }
.rl-hero .rw-rate { width: 84px; height: 84px; }
.rl-hero .rw-rate b { font-size: 1.8rem; }
.rl-hero b { display: block; font-size: 1.2rem; letter-spacing: -.02em; line-height: 1.2; }
.rl-hero span:not(.rw-rate) { display: block; margin-top: 4px; font-size: .84rem; color: var(--muted); }

.rl-list { display: grid; gap: 0; }
.rl-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rl-row:first-child { border-top: 0; }
.rl-row b { display: block; font-size: .95rem; }
.rl-row small { display: block; color: var(--muted); font-size: .76rem; }
.rl-row .pt-badge { width: 38px; height: 38px; flex: none; }
.rl-other { display: grid; gap: 8px; }
.rl-orow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2, var(--bg)); color: var(--ink); text-decoration: none; }
.rl-orow b { flex: none; min-width: 48px; font-size: 1.05rem; color: #0b7a53; }
.rl-orow span { flex: 1; min-width: 0; font-size: .9rem; font-weight: 600; }
.rl-orow i { font-style: normal; color: var(--faint); font-size: 1.3rem; }
.rw-x.ok i { background: color-mix(in srgb, #0f9d6b 14%, transparent); }

/* A reward's page: room between the title, the card and the boxes below it */
.rl .sub-hero { padding-bottom: 6px; }
.rl > .rl-hero { margin-top: 8px !important; }
.rl > .tiles { margin-top: 14px; }
.rl > * + * { margin-top: 14px; }

/* Card tip: the first lines sit in a card of their own, never as dark text on the green */
.ct-lead { padding: 14px 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 560; }
.ct-lead::before { content: "📲"; display: block; margin-bottom: 6px; font-size: 1.5rem; }

/* Do you know?: a touch taller, and closer to the shortcuts */
.dyk { padding-top: 15px; padding-bottom: 15px; }
.dyk-sec { margin-bottom: -8px; }

/* Home cards: room for their shadows (the row used to cut them off), a turn as they pass, and neighbours that are not faded like a photo */
.home .deck:not(.lw-row) { padding-top: 12px; padding-bottom: 44px; margin-bottom: -26px; perspective: 1100px; }
.home .deck:not(.lw-row) > button:not(.on) { opacity: .96; transform: scale(.94); }
.home .deck:not(.lw-row) > button .face { transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); transform-origin: 50% 70%; transition: transform 140ms linear; }
.home .deck:not(.lw-row) > button.on .face { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(255, 255, 255, .12), 0 0 0 .5px rgba(0, 0, 0, .35), 0 4px 6px rgba(0, 0, 0, .25), 0 22px 30px -10px rgba(0, 0, 0, .6), 0 40px 50px -26px rgba(0, 0, 0, .55); }

/* Pick: the ask box as a real object, and its field set into it */
.ask-card .ask { border-radius: 20px; padding: 6px 6px 6px 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 92%, #000), var(--surface-2)); box-shadow: inset 0 2px 5px rgba(0, 30, 20, .16), inset 0 0 0 1px rgba(0, 30, 20, .08), 0 1px 0 rgba(255, 255, 255, .9); }
.ask-card .ask .ib.go { border-radius: 15px; background: linear-gradient(180deg, #12b27a, #007a4e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 12px -4px rgba(0, 90, 60, .6); }
.ask-card::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: -14px; height: 22px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 25, 16, .45), transparent); filter: blur(6px); z-index: -1; }
/* dark mode: the ask box goes black, its words white */
:root[data-theme="dark"] .ask-card { border-color: rgba(255, 255, 255, .08); background: linear-gradient(180deg, #121614 0%, #070908 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 2px 3px rgba(0, 0, 0, .4), 0 14px 26px -10px rgba(0, 0, 0, .8); }
:root[data-theme="dark"] .ask-card h1, :root[data-theme="dark"] .ask-card .ask input { color: #fff; }
:root[data-theme="dark"] .ask-card .ask { background: #1a201d; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .08); }
:root[data-theme="dark"] .ask-card .ask input::placeholder, :root[data-theme="dark"] .ask-card .pick-hint, :root[data-theme="dark"] .ask-card .ib { color: rgba(255, 255, 255, .7); }
:root[data-theme="dark"] .ask-spark { background: rgba(31, 207, 143, .15); color: #4fd6a2; }

/* arrows as icons, in the middle of their circles */
.dyk-go svg, .pkx-go i svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* card number: on the card face, and in a strip under it */
/* With a number: chip right under the bank name, the number centred (both ways) in the space between the chip and the card name. */
.face .f-pan { display: grid; gap: 2px; align-self: center; font-variant-numeric: tabular-nums; justify-items: center; text-align: center; }
.face .f-pan span { font-family: "OCR A Std", "Courier New", ui-monospace, monospace; font-size: clamp(.95rem, 4.6vw, 1.15rem); letter-spacing: .08em; text-shadow: 0 1px 0 rgba(0, 0, 0, .45), 0 -1px 0 rgba(255, 255, 255, .2); }
.face .f-pan small { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .72rem; letter-spacing: .06em; opacity: .9; }
.face .f-pan small i { font-style: normal; font-size: .46rem; line-height: 1.05; width: 28px; opacity: .8; }
/* The chip shares the first row with the bank name (below it, on the left) so the "this month" figures on the right do not push it down. */
.face:has(.f-pan) { grid-template-rows: auto 1fr auto; }
.face:has(.f-pan) > :not(.f-glow) { grid-column: 1; } /* not the travelling light: pinned to column 1 it sat 18px inside the card's left edge */
.face:has(.f-pan) .f-top { grid-row: 1; }
.face:has(.f-pan) .f-mid { grid-row: 1; align-self: end; justify-self: start; margin-top: 24px; }
@media (max-width: 340px) {
  .face:has(.f-pan) .chipmark { width: 34px; height: 25px; } .face:has(.f-pan) .chipmark::after { inset: 6px 8px; }
  .cp-card .face:has(.f-pan) { padding: 16px 18px; } .cp-card .face:has(.f-pan) .chipmark { width: 36px; height: 27px; }
}
.face:has(.f-pan) .f-pan { grid-row: 2; }
.face:has(.f-pan) .f-bot { grid-row: 3; }
.pan-strip { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; }
.pan-strip small { display: block; font-size: .7rem; color: var(--muted); }
.pan-num b { font-variant-numeric: tabular-nums; letter-spacing: .04em; font-size: .98rem; }
.pan-acts { display: flex; gap: 6px; }
.pan-btn { border: 0; border-radius: 999px; padding: 7px 11px; font: inherit; font-size: .76rem; font-weight: 700; color: #0b7a53; background: color-mix(in srgb, #0f9d6b 12%, transparent); }
.pan-add { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: var(--ink); }
.pan-add > span { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #0b7a53; background: color-mix(in srgb, #0f9d6b 12%, transparent); font-weight: 800; }
.pan-add b { display: block; font-size: .94rem; }

/* update buttons */
.upd-mini { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: .74rem; font-weight: 700; color: #0b7a53; background: color-mix(in srgb, #0f9d6b 12%, transparent); }
.upd-note { margin: 8px 2px 0; line-height: 1.35; }
.upd-mini svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.list > .item.mc-row { flex-direction: column; align-items: stretch; gap: 8px; }
.mc-open { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.mc-acts { display: flex; gap: 8px; padding-left: 52px; }
.pan-strip { flex-wrap: wrap; row-gap: 10px; }
.pan-acts { margin-left: 0; width: 100%; }
.pan-btn { flex: 1; }

/* a button with a haptic label gets a place for it, unless it already has a position of its own */
:where(.hz) { position: relative; }

/* a page slides in as one piece: its boxes do not rise in again on their own */
.subpage .panel { animation: none; }

/* Settings: the owner's tools fold away in cards of their own */
.sc2-fold > summary { list-style: none; cursor: pointer; padding-bottom: 14px; }
.sc2-fold > summary::-webkit-details-marker { display: none; }
.sc2-fold > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 200ms; }
.sc2-fold[open] > summary::after { transform: rotate(-135deg); }
.sc2-fold .sc2-body > .section { margin: 0; }
.sc2-fold .sc2-body > .section > h2 { display: none; }
.sc2 textarea { min-height: 64px; max-height: 140px; }

/* ---------- Setup on the moving green sky ---------- */
/* Below the sky the page is the sheet's own white, and the sky ends just under the sheet's top, so the sheet always seems to reach the
   bottom of the screen, even when the phone reports a shorter screen after its keyboard closes. */
html.in-setup { background: var(--surface) !important; background-image: none !important; }
.ob { background: transparent; }
.ob.ob-done { inset: 0; height: auto; background: radial-gradient(120% 70% at 50% 38%, #17573f 0%, #0f2e23 55%, #0b241b 100%); }
.ob-label { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: -4px; }

/* Step 1: your name on a card, written as you type */
.ob-member-wrap { perspective: 900px; width: min(80%, 300px); margin: 20px auto 10px; }
/* It rises in, tipped back a little, and settles flat and centred. Before, a never-ending tilted float made it look stuck mid-roll. */
.ob-member { width: 100%; animation: obsettle 560ms 120ms var(--spring) both; box-shadow: 0 26px 40px -20px rgba(0, 0, 0, .7); }
.ob-member .f-bot > div:first-child { min-width: 0; }
.ob-member .f-name { font-family: "OCR A Std", "Courier New", ui-monospace, monospace; letter-spacing: .08em; font-size: clamp(.95rem, 4.4vw, 1.15rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes obsettle { from { opacity: 0; transform: translateY(18px) rotateX(16deg) scale(.96); } }

/* Steps 2 to 4: an empty wallet waits for its cards */
.ob-empty { padding: 16px 0 6px; }
.ob-ghosts { position: relative; height: 116px; }
.ob-ghosts i { position: absolute; left: 50%; top: 10px; width: 148px; margin-left: -74px; aspect-ratio: 1.586; border-radius: 14px; border: 2px dashed rgba(217, 245, 233, .42); background: rgba(255, 255, 255, .05); }
.ob-ghosts i:nth-child(1) { transform: translateX(-62px) rotate(-10deg); }
.ob-ghosts i:nth-child(2) { transform: rotate(-1deg); }
.ob-ghosts i:nth-child(3) { transform: translateX(62px) rotate(9deg); }
.ob-empty .ob-hint { padding: 10px 0 0; }
.ob-fan .face { box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .7); }
.pickgrid .pickcard .face { box-shadow: 0 12px 22px -12px rgba(0, 0, 0, .55), 0 2px 4px rgba(0, 0, 0, .12); }
.ob-more { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; }
.ob-more .chev, .fold-btn .chev.fold-chev { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.ob-more .chev.up, .fold-btn .chev.fold-chev.up { transform: rotate(180deg); }
.fold-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ob-more[hidden] { display: none; }
.ob-find { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1.5px dashed color-mix(in srgb, var(--solid) 45%, transparent); border-radius: 18px; background: var(--good-bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ob-find b { display: block; font-weight: 700; }
.ob-find small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.ob-find-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface); font-size: 1.2rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.ob-find .chev { width: 16px; height: 16px; stroke: var(--good); fill: none; stroke-width: 2.2; flex: none; }
.ob-find:active { transform: scale(.985); }

/* Find my card */
.fd-hero { display: grid; place-items: center; }
.fd-hero span { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; background: var(--good-bg); }
.fd-step { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--paper); }
.fd-q { display: flex; gap: 10px; align-items: flex-start; }
.fd-q i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .78rem; font-weight: 750; color: #fff; background: var(--solid); }
.fd-q b { display: block; }
.fd-q small { display: block; color: var(--muted); font-size: .8rem; }
.fd-banks.chips.wrapped { max-height: 128px; overflow-y: auto; padding: 2px; margin: -2px; }
.fd-banks .chip { padding: 6px 12px; min-height: 34px; font-size: .85rem; }
.fd-digits { letter-spacing: .3em; font-variant-numeric: tabular-nums; font-size: 1.2rem; }
.fd-tones { display: flex; flex-wrap: wrap; gap: 10px; }
.fd-tones button { width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; background: var(--t); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .2); cursor: pointer; }
.fd-tones button[aria-checked="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--solid); }
.fd-out { display: grid; gap: 12px; scroll-margin-top: 12px; }
.fd-out:empty { display: none; }
.fd-h { margin: 0; }
.fd-new { position: absolute; left: 8px; top: 8px; z-index: 3; padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--solid); font-size: .68rem; font-weight: 750; }
.fd-tips summary { cursor: pointer; font-weight: 600; color: var(--good); }
/* Bank: a search box, the most common banks in one row that scrolls sideways, More banks for the full list */
.fd-bankrow { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; overscroll-behavior-x: contain; }
.fd-bankrow::-webkit-scrollbar { display: none; }
.fd-banklinks { display: flex; justify-content: space-between; gap: 10px; margin-top: -4px; }
.fd-banklinks .btn { padding: 0; min-height: 32px; color: var(--good); font-weight: 650; }
.fd-bankrow .chip { flex: none; padding: 6px 12px; min-height: 34px; font-size: .85rem; }
.bk-list { display: grid; gap: 2px; max-height: 52vh; overflow-y: auto; overscroll-behavior: contain; }
.bk-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bk-list button[aria-pressed="true"] { background: var(--good-bg); font-weight: 650; }
.bk-list button:active { background: var(--paper); }

/* Last 4 digits: the caution in plain sight, and the card's face showing the digits as they are typed */
.l4-warn { display: block; margin-top: 6px; color: var(--ink); opacity: .8; line-height: 1.35; }
.l4-face .face { max-width: 340px; margin: 0 auto; }
.cp-digits { display: block; margin: 12px auto 0; }

/* Step 4: two numbers, each in its own box; the score as a half dial */
.nb { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 20px; background: var(--paper); }
.nb-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 1.2rem; background: var(--surface); box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.nb-body { flex: 1; min-width: 0; display: grid; gap: 8px; }
.nb-body b { display: block; }
.nb-body small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; font-weight: 400; }
.nb-score-row { display: flex; align-items: center; gap: 12px; }
.nb-score { width: 104px; flex: none; font-size: 1.6rem; font-weight: 650; text-align: center; letter-spacing: .04em; }
.nb-dial-wrap { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 2px; }
.nb-dial { width: 100%; max-width: 132px; }
.nb-dial path { fill: none; stroke-width: 9; stroke-linecap: round; }
.nb-track { stroke: var(--line); }
.nb-fill { stroke: var(--c, var(--line)); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0)); opacity: var(--o, 0); transition: stroke-dashoffset .6s var(--ease), stroke .4s, opacity .3s; }
.nb-band { font-size: .78rem; font-weight: 700; color: var(--muted); text-align: center; }
.nb-link { font-size: .85rem; font-weight: 650; color: var(--good); text-decoration: none; }



/* Opening the app (and the end of setup): the wallet rises to the middle and your cards step out of it */
.welcome.wopen { background: radial-gradient(120% 70% at 50% 40%, #17573f 0%, #0f2e23 55%, #0b241b 100%); color: #eef6f2; overflow: hidden; }
.wopen .wc-greet { animation-delay: 1000ms; }
.wopen .wc-name { color: #fff; animation-delay: 1150ms; }
.wopen .wake-note { color: rgba(238, 246, 242, .6); }

/* ---------- Cards rising to the middle and fanning out: sign-in, opening, end of setup ---------- */
.cf { --cw: min(54vw, 224px); position: relative; width: var(--cw); height: calc(var(--cw) / 1.586 + 34px); margin: 0 auto; pointer-events: none; }
/* Rise: each holder comes up just after the one before, so they land stacked one on another. Spread: then every card moves to its
   place at the same moment, the left ones left and the right ones right. */
.cf-c { position: absolute; left: 0; top: 14px; width: 100%; will-change: transform; animation: cf-rise 720ms cubic-bezier(.2, .85, .25, 1) both; animation-delay: calc(var(--k, 0) * 85ms + 120ms); }
@keyframes cf-rise { from { transform: translate(0, var(--from, 65vh)); } to { transform: translate(0, calc(var(--k, 0) * -3px)); } }
.cf .face { width: 100%; transform: translate(var(--x), calc(var(--y) + var(--k, 0) * 3px)) rotate(var(--r)); will-change: transform;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2), 0 2px 4px rgba(0, 0, 0, .18), 0 10px 18px -8px rgba(0, 0, 0, .35), 0 28px 40px -20px rgba(0, 0, 0, .6);
  animation: cf-spread 760ms cubic-bezier(.45, 0, .2, 1) both; animation-delay: var(--spread, 1100ms); }
@keyframes cf-spread { from { transform: translate(0, 0) rotate(0deg); } }
.cf-c:nth-child(1) { --k: 0; } .cf-c:nth-child(2) { --k: 1; } .cf-c:nth-child(3) { --k: 2; } .cf-c:nth-child(4) { --k: 3; }
.cf.n1 .face { --x: 0%; --y: 0px; --r: -3deg; }
.cf.n2 .cf-c:nth-child(1) .face { --x: -16%; --y: 6px; --r: -7deg; } .cf.n2 .cf-c:nth-child(2) .face { --x: 16%; --y: 0px; --r: 5deg; }
.cf.n3 .cf-c:nth-child(1) .face { --x: -26%; --y: 12px; --r: -10deg; } .cf.n3 .cf-c:nth-child(2) .face { --x: 0%; --y: 0px; --r: -1deg; } .cf.n3 .cf-c:nth-child(3) .face { --x: 26%; --y: 12px; --r: 9deg; }
.cf.n4 .cf-c:nth-child(1) .face { --x: -30%; --y: 16px; --r: -12deg; } .cf.n4 .cf-c:nth-child(2) .face { --x: -10%; --y: 4px; --r: -4deg; }
.cf.n4 .cf-c:nth-child(3) .face { --x: 10%; --y: 4px; --r: 4deg; } .cf.n4 .cf-c:nth-child(4) .face { --x: 30%; --y: 16px; --r: 12deg; }
.cf.n1 { --spread: 900ms; } .cf.n2 { --spread: 1000ms; } .cf.n3 { --spread: 1050ms; }
.cf-slot { flex: 1; min-height: 220px; display: flex; align-items: center; justify-content: center; padding: 10px 0 24px; position: relative; z-index: 1; }
.signin .sheet-in { position: relative; z-index: 2; } /* the cards rise from behind it */
.cf-slot .cf { --cw: min(60vw, 250px); }
.signin .hero-sub { max-width: 32ch; }
.cf-open { --cw: min(50vw, 200px); --from: 55vh; margin-bottom: 26px; }
.wopen .wc-greet { margin: 0 0 2px; font-size: 1.05rem; color: rgba(238, 246, 242, .8); animation: rise 500ms 700ms var(--ease) both; }
.wopen .wc-name { font-size: clamp(2rem, 9vw, 2.5rem); line-height: 1.1; animation: rise 550ms 850ms var(--ease) both; }
.wl-mid .cf-open { margin-bottom: 22px; }
@media (prefers-reduced-motion: reduce) { .cf-c, .cf .face { animation: none; } .ob-member { animation: none; }}

/* ---------- Every card face, everywhere: a real card's bevelled edge, a soft inner shade and layered depth under it ---------- */
:root { --shadow-card: 0 0 0 .5px rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .14), 0 4px 8px -2px rgba(0, 0, 0, .16), 0 16px 28px -14px rgba(6, 30, 20, .5), 0 30px 44px -28px rgba(6, 30, 20, .4); }
.face::after { border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 0 22px rgba(0, 0, 0, .14); }
.face .f-top > span:first-child, .face .f-type { text-shadow: 0 1px 1px rgba(0, 0, 0, .28); }
.face .wave { filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .3)); }
.ob-fan .face, .pickgrid .pickcard .face, .rd-c .face { box-shadow: var(--shadow-card); }
.cf .face .f-bot > div:first-child { min-width: 0; }
.cf .face .f-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Where the green sky ends: a sheet in the page's colour that slides (transform only, so it is smooth), with rounded corners for a clean edge */
.sky-cut { --cut: var(--paper); position: absolute; top: 0; left: 0; width: 100%; z-index: -1; pointer-events: none; display: none; background: var(--cut); will-change: transform; }
.sky-cut.anim { transition: transform var(--sky-ms, 900ms) cubic-bezier(.16, 1, .3, 1); }
.sky-cut::before, .sky-cut::after { content: ""; position: absolute; top: -28px; width: 28px; height: 28px; opacity: 0; transition: opacity 300ms; }
.sky-cut::before { left: 0; background: radial-gradient(circle at 100% 0, transparent 27.5px, var(--cut) 28px); }
.sky-cut::after { right: 0; background: radial-gradient(circle at 0 0, transparent 27.5px, var(--cut) 28px); }
.sky-cut.crisp::before, .sky-cut.crisp::after { opacity: 1; }
html.in-setup .sky-cut { --cut: var(--surface); }
@media (prefers-reduced-motion: reduce) { .sky-cut.anim { transition: none; }}

/* Do you know: the arrow sits in the middle of its circle (an older rule spread a single item to the left edge) */
.dyk-go { justify-content: center; align-content: center; }

/* ---------- Premium ---------- */
.pr-hero { display: grid; place-items: center; }
.pr-hero span { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; font-size: 2rem; background: linear-gradient(145deg, #ffe08a, #e0a526 60%, #b97a10); box-shadow: 0 12px 24px -12px rgba(185, 122, 16, .8), inset 0 1px 0 rgba(255, 255, 255, .6); }
.pr-list { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 12px; }
.pr-list li { display: flex; gap: 12px; align-items: flex-start; }
.pr-ic { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--paper); font-size: 1.1rem; }
.pr-list b { display: flex; align-items: center; gap: 6px; }
.pr-list em { font-style: normal; font-size: .66rem; font-weight: 750; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, #e0a526 18%, transparent); color: #9a6a0c; }
.pr-list small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.btn.pr-go { background: linear-gradient(135deg, #1b1b1f, #3a3a42); color: #ffe08a; border: 0; font-weight: 700; box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .7); }
.pl-ban { display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 4px; padding: 14px 16px; border: 0; border-radius: 20px; text-align: left; font: inherit; cursor: pointer; color: #fff7e0; background: linear-gradient(135deg, #1b1b1f, #33333b); box-shadow: var(--shadow-sm); }
.pl-ban > span:first-child { font-size: 1.5rem; }
.pl-ban b { display: block; }
.pl-ban small { display: block; font-size: .8rem; opacity: .8; }
.pl-ban.prem { cursor: default; color: #3a2a05; background: linear-gradient(135deg, #ffe9a8, #f2c14e); }
.pl-go { flex: none; padding: 7px 12px; border-radius: 999px; font-size: .78rem; font-weight: 750; color: #1b1b1f; background: #ffe08a; }
.lk-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.lk-face { flex: 0 0 150px; position: relative; filter: grayscale(.85) brightness(.9); opacity: .75; }
.lk-face::after { content: "🔒"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; z-index: 4; }
.lk-ic { font-size: 1.2rem; }
:root[data-theme="dark"] .btn.pr-go { background: linear-gradient(135deg, #ffe08a, #e0a526); color: #1b1b1f; }
.ai-free { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 10px; padding: 8px 12px; border: 0; border-radius: 12px; font: inherit; font-size: .78rem; text-align: left; cursor: pointer; color: var(--muted); background: color-mix(in srgb, #e0a526 12%, var(--surface)); }
.ai-free b { flex: none; color: #9a6a0c; font-weight: 750; }
:root[data-theme="dark"] .ai-free b { color: #ffe08a; }
.pr-proof { --tint: var(--good); --box-wash: 20%; display: grid; gap: 4px; padding: 14px 16px; border-radius: 18px; text-align: center; }
.pr-proof b { font-size: 1.8rem; letter-spacing: -.03em; color: var(--good); }
.pr-proof span { font-size: .86rem; color: var(--ink); }
.pl-made { margin-top: 2px; font-weight: 650; opacity: 1 !important; }
.su-share { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--good-bg); }
.su-share b { display: block; font-size: .9rem; }
.su-share small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }

/* ---------- Network benefits ---------- */
.nw-nets { display: flex; flex-wrap: wrap; gap: 8px; }
.nw-net { padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .01em; color: #fff; }
.nw-visa { background: linear-gradient(135deg, #1a1f71, #2a3bb0); } .nw-mastercard { background: linear-gradient(135deg, #eb001b, #f79e1b); } .nw-rupay { background: linear-gradient(135deg, #097a3e, #f37021); } .nw-amex { background: linear-gradient(135deg, #016fd0, #4aa3ec); }
.nw-src { display: inline-block; margin-top: 4px; font-size: .76rem; font-weight: 650; color: var(--good); text-decoration: none; }
.nw-busy { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); }

/* ---------- Trip and points planner ---------- */

.tp-form { padding: 16px; border-radius: 22px; }
.tp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tp-two .field { min-width: 0; }
.tp-ppl { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.tp-out { display: grid; gap: 12px; margin-top: 14px; }
.tp-out:empty { display: none; }
.tp-sum { padding: 14px 16px; border-radius: 18px; font-weight: 600; background: color-mix(in srgb, #2f8fe0 12%, var(--surface)); }
.tp-list { display: grid; gap: 12px; }
.tp-opt { display: grid; gap: 6px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.tp-opt.ok { box-shadow: inset 0 0 0 2px var(--good), var(--shadow-sm); }
.tp-miles b { font-size: 1.5rem; letter-spacing: -.02em; }
.tp-miles span { color: var(--muted); font-size: .85rem; }
.tp-from { display: flex; gap: 10px; align-items: flex-start; }
.tp-from small { display: block; font-size: .8rem; color: var(--muted); }
.tp-ppl b { white-space: nowrap; font-size: .92rem; }
.tp-ppl .btn.small { min-width: 36px; padding: 0; }

/* ---------- Trust: how sure a card's details are, and a way to say they are wrong ---------- */
.tr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.tr-b { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.tr-b.ok { color: var(--good); background: var(--good-bg); }
.tr-b.warn { color: #9a6a0c; background: color-mix(in srgb, #e0a526 16%, var(--surface)); }
.tr-b.none { color: var(--muted); background: var(--paper-2); }
.tr-rep { border: 0; background: none; padding: 4px 0; font: inherit; font-size: .8rem; font-weight: 650; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
:root[data-theme="dark"] .tr-b.warn { color: #ffd479; }
/* The fan's motion is played from app.js (cardFan) with plain numbers; the style keeps only where the cards rest. */
.cf-c, .cf .face { animation: none; }

/* ---------- Card colour sheet ---------- */
.lk-prev { width: min(78%, 280px); margin: 4px auto 2px; }
.lk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lk-box { display: grid; gap: 5px; justify-items: center; border: 0; padding: 0; background: none; font: inherit; cursor: pointer; }
.lk-box i { width: 100%; aspect-ratio: 1.586; border-radius: 10px; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 10px -4px rgba(0, 0, 0, .45); transition: transform .2s var(--ease); }
.lk-box span { font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lk-box[aria-checked="true"] i { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--solid); transform: scale(1.04); }
.lk-box[aria-checked="true"] span { color: var(--ink); font-weight: 700; }
.lk-own { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--paper); font-size: .88rem; font-weight: 600; }
.lk-pick { display: flex; gap: 8px; }
.lk-pick input { width: 40px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }

/* "Tychra earned you": quietly bright wherever the app made the difference */
.made-you.mk { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 12px 14px; border-radius: 18px; text-decoration: none; color: var(--ink); background: linear-gradient(120deg, color-mix(in srgb, var(--good) 14%, var(--surface)), color-mix(in srgb, #e0a526 12%, var(--surface))); position: relative; overflow: hidden; }
.made-you.mk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 48%, transparent 66%); transform: translateX(-120%); animation: mk-shine 1.6s 1.2s ease-out 1 both; pointer-events: none; }
@keyframes mk-shine { to { transform: translateX(120%); } }
.mk-spark { font-size: 1.3rem; }
.mk-line { display: block; font-size: .92rem; }
.mk-line b { color: var(--good); font-size: 1.05rem; }
.made-you.mk small { display: block; color: var(--muted); font-size: .76rem; margin-top: 1px; }
.made-you.mk .chev { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2.2; flex: none; }
@media (prefers-reduced-motion: reduce) { .made-you.mk::after { animation: none; }}

/* Share straight to the app: the one-liner under Add spends, and its steps */
.sh-tip { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 11px 14px; border: 0; border-radius: 16px; font: inherit; font-size: .86rem; font-weight: 600; text-align: left; cursor: pointer; color: var(--ink); background: var(--good-bg); }
.sh-tip .chev { width: 15px; height: 15px; stroke: var(--good); fill: none; stroke-width: 2.2; flex: none; }
.sh-i { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; font-style: italic; color: var(--good); border: 1.5px solid currentColor; }
.sh-step { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.sh-step i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .74rem; font-weight: 750; color: #fff; background: var(--solid); }

/* Apply for a card */

.adm-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.adm-row small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }

/* ---------- Daily habits: the weekly challenge, today's tip ---------- */
.ch-slot:empty { display: none; }
.ch { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 14px 16px; border-radius: 20px; text-decoration: none; color: var(--ink); }
.ch b { display: block; font-size: .92rem; }
.ch small { display: block; color: var(--muted); font-size: .76rem; margin-top: 4px; }
.ch-ic { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; font-size: 1.25rem; background: color-mix(in srgb, #e0a526 14%, var(--surface)); }
.ch-bar { height: 7px; margin-top: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.ch-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e0a526, #f2c14e); transition: width .8s var(--ease); }
.ch.done { --tint: #e0a526; }
.dyk-today { padding: 1px 7px; border-radius: 999px; font-size: .62rem; font-weight: 800; color: #fff; background: var(--dk, var(--solid)); }

/* Partner offers: a box of their own, marked */
.po { margin: 18px 0 6px; padding: 14px 0 4px; border-top: 1px dashed var(--line); }
.po-head { display: flex; align-items: center; gap: 8px; }
.po-head h2 { margin: 0; font-size: 1.05rem; }
.po-tag { padding: 2px 8px; border-radius: 999px; font-size: .68rem; font-weight: 800; color: #9a6a0c; background: color-mix(in srgb, #e0a526 16%, var(--surface)); }
.po-note { margin: 4px 0 10px; font-size: .76rem; color: var(--muted); }
.po-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 6px; }
.po-row::-webkit-scrollbar { display: none; }
.po-box { flex: 0 0 78%; max-width: 320px; scroll-snap-align: start; display: grid; gap: 8px; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px color-mix(in srgb, #e0a526 25%, transparent); }
.po-box small { display: block; color: var(--muted); font-size: .76rem; }
.po-box p { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.po-go { justify-self: start; padding: 7px 16px; border-radius: 999px; font-size: .82rem; font-weight: 700; text-decoration: none; color: #1b1b1f; background: #ffe08a; }

/* Home: changes the banks made to your cards */
.cxh-list { display: grid; gap: 8px; margin-top: 10px; }
.cxh-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--ink); --box-mark: inset 3px 0 0 var(--tint, var(--line)); }
.cxh-row.bad { --tint: #d9534f; }
.cxh-row.good { --tint: var(--good); }
.cxh-row small { display: block; color: var(--muted); font-size: .74rem; font-weight: 700; }
.cxh-row span:not(.mini) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .86rem; }
.cxh-row .mini { margin-top: 2px; }
.cxh-row .chev { width: 15px; height: 15px; stroke: var(--muted); fill: none; stroke-width: 2.2; flex: none; margin-top: 4px; }

/* The opening: the cards move only by the app's own animations (see cardFan), never by these as well */
.cf.js .cf-c, .cf.js .face { animation: none; }
/* Signed in: from the very first frame, the opening's green (boot.js), until the opening lifts away */
html.opening, html.opening body { background: #0f2e23 radial-gradient(120% 70% at 50% 40%, #17573f 0%, #0f2e23 55%, #0b241b 100%) no-repeat fixed; }

/* The wallet's cards stack in order (the first in front) on every phone, not only where a tap label happens to position them */
.lw-row > button { position: relative; }
/* iPhone tap labels stay inside their own button: these buttons reset every style (all: unset), which would let the label cover the page */
.hz.cmp-card, .hz.rep-type, .hz.textlink, .hz.more-btn, .hz.ck-chip { position: relative; }
/* Limit bars grow from the left */
.lp-bar > i { transform-origin: left; }

/* The card in view: a soft light travels slowly once around its edge only, from the top-left corner all the way round and back,
   with a short tail behind it. Nothing crosses the face of the card. */
@property --ga { syntax: '<angle>'; inherits: false; initial-value: 302deg; }
.f-glow { position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; padding: 1.8px;
  background: conic-gradient(from var(--ga), rgba(255, 255, 255, .95) 0deg, rgba(255, 255, 255, .45) 7deg, transparent 20deg, transparent 290deg, rgba(255, 255, 255, .1) 312deg, rgba(255, 255, 255, .5) 345deg, rgba(255, 255, 255, .95) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: glow-run 7000ms cubic-bezier(.4, 0, .4, 1) both; }
/* 302deg is the top-left corner of a card (its corner as seen from the middle); one full turn brings the light back there */
@keyframes glow-run { 0% { --ga: 302deg; opacity: 0; } 8% { opacity: 1; } 90% { opacity: 1; } 100% { --ga: 662deg; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .f-glow { display: none; }}

/* Network benefits, as a box of its own */
.nwx { display: grid; gap: 12px; margin: 14px 0 4px; padding: 16px; border-radius: 20px; text-decoration: none; color: var(--ink); --tint: #2f6fdf; }
.nwx-top { display: flex; gap: 12px; align-items: center; }
.nwx-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 1.3rem; background: color-mix(in srgb, #2f6fdf 16%, transparent); flex: none; }
.nwx-top small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; margin-top: 2px; }
.nwx-lock { flex: none; font-size: .72rem; font-weight: 800; padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, #e0a526 18%, transparent); color: var(--ink); }
.nwx .chev { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2.2; flex: none; }
.nwx .nw-nets { display: flex; flex-wrap: wrap; gap: 6px; }

/* Home: what Tychra did for you */
.imp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.imp-t { min-width: 0; container-type: inline-size; display: grid; gap: 2px; padding: 14px; border-radius: 18px; }
.imp-t b { white-space: nowrap; font-size: clamp(.62rem, calc(100cqw / (var(--n, 6) * .7)), 1.35rem); line-height: 1.15; letter-spacing: -.01em; }
.imp-t small { color: var(--muted); font-size: .76rem; line-height: 1.3; }
.imp-t.good b { color: var(--good); }
.imp-ic { font-size: 1.05rem; }

/* A shop's own logo in its badge */
.pt-badge.logo { background: #fff; padding: 0; overflow: hidden; }
.pt-badge.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* ---------- Points: ways to use a card's points, sorted by what they are for (Points tab, under the wallet) ----------
   pw-* is shared with the "What your points can do" pages (uw-*). Rows are one button each (44px and up), motion is
   transform and opacity only, and every colour comes from the theme's variables so dark mode follows. */
.pw-hero { display: grid; gap: 8px; }
.pw-hbtn { position: relative; display: grid; gap: 6px; width: 100%; padding: 16px; border: 0; border-radius: 22px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: linear-gradient(135deg, color-mix(in srgb, var(--good) 16%, var(--surface)), var(--surface) 70%); box-shadow: var(--shadow-sm), inset 0 0 0 1px color-mix(in srgb, var(--good) 22%, transparent); transition: transform 160ms var(--ease); }
.pw-hbtn:active, .pw-row:active, .pw-sure:active { transform: scale(.985); }
.pw-hk { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8rem; font-weight: 650; color: var(--muted); }
.pw-hk .tag { flex: none; font-size: .75rem; }
.pw-hrow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pw-hrow b { font-size: 1.02rem; line-height: 1.25; overflow-wrap: anywhere; }
.pw-big { font-size: 2rem; font-weight: 780; letter-spacing: -.035em; line-height: 1.1; color: var(--good); overflow-wrap: anywhere; }
.pw-big small { font-size: .95rem; font-weight: 650; letter-spacing: 0; color: var(--ink); }
.pw-big.pw-rate { font-size: 1.35rem; }
.pw-hsub { font-size: .84rem; color: var(--muted); line-height: 1.35; }
.pw-how { justify-self: start; margin-top: 2px; font-size: .86rem; font-weight: 700; color: var(--accent-text); }
.pw-need { display: grid; gap: 4px; }
.pw-need small { font-size: .8rem; color: var(--warn); }
.pw-sure { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 16px; font: inherit; font-size: .86rem; text-align: left; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; }
.pw-sure > b { flex: none; color: var(--good); }
.pw-tip { margin: 0; padding: 10px 14px; border-radius: 16px; font-size: .84rem; line-height: 1.45; color: var(--ink-2); background: var(--surface-2); }

.pw-group { display: grid; gap: 10px; padding: 14px; border-radius: 22px; }
.pw-gh { display: flex; align-items: center; gap: 10px; }
.pw-gh h3 { flex: 1; min-width: 0; margin: 0; font-size: 1.05rem; }
.pw-gic { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; background: var(--good-bg); }
.pw-gn { flex: none; font-size: .8rem; font-weight: 650; color: var(--good); }
.pw-sub { display: grid; gap: 6px; }
.pw-sub + .pw-sub { padding-top: 6px; border-top: 1px solid var(--line); }
.pw-sh { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.pw-guide { display: inline-flex; align-items: center; min-height: 44px; margin: -10px -6px; padding: 0 6px; font-size: .8rem; font-weight: 650; letter-spacing: 0; text-transform: none; text-decoration: none; color: var(--accent-text); }
.pw-rows { display: grid; gap: 2px; }
.pw-list { display: grid; gap: 4px; }
.pw-common { margin: 0; padding: 8px 10px; border-radius: 12px; font-size: .8rem; line-height: 1.4; color: var(--muted); background: var(--surface-2); }
.pw-common .warn-text { color: var(--warn); }
.pw-row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 6px; border: 0; border-radius: 14px; font: inherit; text-align: left; color: var(--ink); background: none; cursor: pointer; transition: transform 160ms var(--ease); }
.pw-row.best { background: color-mix(in srgb, var(--good) 8%, transparent); }
.pw-row .pt-badge { width: 40px; height: 40px; }
.pw-tx { display: grid; gap: 1px; min-width: 0; }
.pw-tx b { font-size: .92rem; line-height: 1.3; overflow-wrap: anywhere; }
.pw-tx small { font-size: .78rem; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pw-tx small.warn-text { color: var(--warn); }
.pw-tag { justify-self: start; margin: 2px 0; font-size: .75rem; padding: 1px 8px; }
.pw-val { display: grid; justify-items: end; text-align: right; max-width: 34vw; }
.pw-val b { font-size: .95rem; font-weight: 750; color: var(--good); white-space: nowrap; }
.pw-val b.pw-rate { white-space: normal; font-size: .82rem; color: var(--ink); overflow-wrap: anywhere; }
.pw-val small { font-size: .75rem; color: var(--muted); line-height: 1.25; }
.pw-row .chev { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 2.2; }
.pw-more { width: 100%; min-height: 44px; margin-top: 4px; border: 0; border-radius: 12px; font: inherit; font-size: .86rem; font-weight: 650; color: var(--accent-text); background: var(--surface-2); cursor: pointer; }
.pw-miss { margin: 0 4px; }

.pw-facts { display: grid; gap: 10px; padding: 14px 16px; border-radius: 22px; }
.pw-facts h3 { margin: 0; }
.pw-facts dl { display: grid; gap: 10px; margin: 0; }
.pw-fact { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; }
.pw-fic { grid-row: span 2; font-size: 1rem; line-height: 1.5; }
.pw-fact dt { font-size: .76rem; font-weight: 700; color: var(--muted); }
.pw-fact dd { margin: 0; font-size: .88rem; line-height: 1.4; overflow-wrap: anywhere; }
.pw-fact dd small { display: block; margin-top: 2px; font-size: .78rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .pw-hbtn, .pw-row, .pw-sure { transition: none; }}
/* The back button on sub-pages looks 38px but takes taps over 46px (UI audit: tap targets of 44px or more) */
.sub-back { position: relative; }
.sub-back::before { content: ""; position: absolute; inset: -4px; }

/* Sale on: a shop row with the owner's Remove beside it */
.sale-row { display: flex; gap: 8px; align-items: center; }
.sale-row .sale-row-link { flex: 1; min-width: 0; }

/* Section headings inside a panel (Sale on's kinds of shop) */
.pt-h { margin: 0; font-size: 1rem; font-weight: 750; }
/* =====================================================================================================
   What your points can do: the sliding boxes on Points (pu-*) and the page each box opens (uw-*), with
   each use's icon tile (ut). One material for all of them: a surface lit from above (a faint wash of the
   use's colour, a light top edge and a hairline), lifted by layered shadows. Each use brings its two
   colours (--u1, --u2) for its tile, its timeline and its tints. Motion is transform and opacity only,
   tap targets are 44px and up, and in dark mode the depth comes from light edges, not shadows.
   ===================================================================================================== */
:root { --lift-edge: rgba(255, 255, 255, .9); --lift-line: rgba(14, 26, 21, .06);
  --lift: 0 1px 1px rgba(4, 30, 20, .08), 0 6px 12px -4px rgba(4, 30, 20, .16), 0 20px 32px -16px rgba(4, 30, 20, .42);
  --lift-sm: 0 1px 1px rgba(4, 30, 20, .08), 0 4px 10px -4px rgba(4, 30, 20, .14), 0 12px 20px -12px rgba(4, 30, 20, .34); }
:root[data-theme="dark"] { --lift-edge: rgba(255, 255, 255, .09); --lift-line: rgba(255, 255, 255, .07);
  --lift: 0 1px 1px rgba(0, 0, 0, .5), 0 12px 24px -12px rgba(0, 0, 0, .9); --lift-sm: var(--lift); }
/* The rim of every box: a hairline of light, brightest along the top and the top-left corner, fainter down the left side, a trace on
   the bottom-right, and a soft glow just inside the top-left (like the edge of an iOS widget). Only inset shadows: no extra layer, no
   change in size, nothing to repaint on scroll. Card faces keep their own travelling light (.f-glow). */
:root { --rim: inset 0 1px 0 var(--lift-edge), inset 1px 0 0 rgba(255, 255, 255, .7), inset 2px 2px 3px -2px rgba(255, 255, 255, .95), inset -1px -1px 0 rgba(255, 255, 255, .35); }
:root[data-theme="dark"] { --rim: inset 0 1px 0 rgba(255, 255, 255, .16), inset 1px 0 0 rgba(255, 255, 255, .08), inset 2px 2px 4px -2px rgba(255, 255, 255, .16), inset -1px -1px 0 rgba(255, 255, 255, .03); }

/* The icon tile: the use's colours, a glossy top half, a darker foot and a shadow in its own colour */
.ut { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff;
  background: linear-gradient(155deg, var(--u1), var(--u2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 5px rgba(0, 0, 0, .16), 0 1px 2px rgba(0, 0, 0, .16), 0 8px 16px -8px var(--u2); }
.ut::before { content: ""; position: absolute; inset: 1px 1px 52%; border-radius: 13px 13px 10px 10px; background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0)); pointer-events: none; }
.ut svg { position: relative; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .22)); }
.ut.sm { width: 36px; height: 36px; border-radius: 11px; }
.ut.sm::before { border-radius: 10px 10px 8px 8px; }
.ut.sm svg { width: 18px; height: 18px; }
.ut.xl { width: 76px; height: 76px; border-radius: 24px; }
.ut.xl::before { border-radius: 23px 23px 14px 14px; }
.ut.xl svg { width: 36px; height: 36px; stroke-width: 1.6; }

/* Points goal sheet (gs-) and a card's "Points and expiry" screen (pe-): native-style flows, one question per block, big numbers. */
.gs-title { margin: 0; }
.gs > .gs-sec, .pe > .gs-sec { margin-top: 22px; }
.gs-sec h3 { margin: 0 0 8px; font-size: .86rem; font-weight: 650; color: var(--muted); }
.gs-hero { display: grid; justify-items: center; gap: 10px; padding: 6px 0 2px; text-align: center; }
.gs-hero .ut.xl { animation: gs-pop 300ms var(--spring) both; }
@keyframes gs-pop { from { transform: scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }
.gs-name { width: 100%; min-width: 0; border: 0; border-bottom: 1.5px solid transparent; background: transparent; color: var(--ink); font: inherit; font-size: 1.55rem; font-weight: 700;
  letter-spacing: -0.02em; text-align: center; padding: 4px 0 6px; caret-color: var(--accent); transition: border-color 160ms; }
.gs-name::placeholder, .gs-num::placeholder, .pe-num::placeholder { color: var(--faint); }
.gs-name:focus { outline: none; border-bottom-color: var(--accent); }
.gs-err { font-size: .86rem; font-weight: 550; margin-top: 6px; }
.gs-err:empty { display: none; }
.gs-hero .gs-err { margin-top: -4px; }
.gs-chip { display: inline-flex; align-items: center; gap: 9px; padding: 0 16px 0 7px; }
.gs-chip .mini, .pe-card .mini { width: 36px; height: 23px; border-radius: 5px; }
.gs-chip .mini::after, .pe-card .mini::after { left: 5px; top: 7px; width: 8px; height: 6px; }
.gs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
/* The tiles and the number boxes wear the shared box material (.list); a picked tile is tinted in its own use's colour. */
.gs-tile { display: grid; justify-items: start; align-content: start; gap: 8px; min-height: 84px; padding: 11px 12px; border: 2px solid transparent; border-radius: 16px;
  color: var(--ink); font: inherit; font-size: .9rem; font-weight: 620; line-height: 1.2; text-align: left; cursor: pointer; overflow: visible;
  transition: border-color 180ms var(--ease), transform 160ms var(--ease); }
.gs-tile:active { transform: scale(.96); }
.gs-tile[aria-pressed="true"] { --tint: var(--u1); --box-wash: 26%; border-color: var(--u2); }
.gs-parts { margin-top: 16px; }
.gs-parts[hidden], .pe-val[hidden], .pe-valfield[hidden] { display: none; }
.gs-part { display: inline-flex; align-items: center; gap: 9px; min-height: 52px; padding: 6px 16px 6px 7px; text-align: left; }
.gs-part .pt-badge { width: 36px; height: 36px; border-radius: 10px; font-size: .7rem; }
.gs-part b { display: block; font-size: .88rem; font-weight: 640; white-space: nowrap; }
.gs-part small { display: block; font-size: .74rem; opacity: .75; white-space: nowrap; }
.gs-amount, .pe-bal { display: block; padding: 14px 16px; cursor: text; }
.gs-amount:focus-within, .pe-bal:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.gs-numrow, .pe-numrow { display: flex; align-items: baseline; gap: 8px; }
.gs-num, .pe-num { flex: 1; width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; font-size: 2.2rem; font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; caret-color: var(--accent); }
.gs-num:focus, .pe-num:focus { outline: none; }
.gs-unit, .pe-unit { flex: none; color: var(--muted); font-size: 1rem; font-weight: 620; }
.gs-reach { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .88rem; line-height: 1.4; }
.gs-reach .meter { height: 8px; }
.gs-hint { margin: 8px 0 0; }
.gs-remove { color: var(--bad); }
.pe-card { display: flex; align-items: center; gap: 12px; }
.pe-card .mini { width: 54px; height: 34px; border-radius: 7px; }
.pe-card .mini::after { left: 7px; top: 11px; width: 11px; height: 8px; }
.pe-card b { display: block; font-weight: 650; line-height: 1.25; }
.pe-card small { display: block; color: var(--muted); font-size: .82rem; }
.pe-k { display: block; color: var(--muted); font-size: .84rem; margin-bottom: 2px; }
.pe-total { margin-top: 6px; font-size: .88rem; color: var(--muted); }
.pe-total b { color: var(--good); font-weight: 700; white-space: nowrap; }
.pe-total b + span { white-space: nowrap; } /* " at ₹1.00 a point" stays whole; the no-balance hint wraps */
.pe-val { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 4px 4px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pe-val b { display: block; font-weight: 640; }
.pe-val small { display: block; color: var(--muted); font-size: .82rem; }
.pe-change { color: var(--accent-text); font-weight: 650; }
.pe-note { margin: -4px 0 10px; }
.pe-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 36px; gap: 8px; align-items: center; padding: 10px 8px 10px 12px; }
.pe-row + .pe-row, .pe-row + .pe-add { border-top: 1px solid var(--line); }
.pe-in { min-height: 44px; padding: 0 12px; border-radius: 12px; border-color: transparent; background: var(--paper-2); }
.pe-date { -webkit-appearance: none; appearance: none; min-width: 0; text-align: left; }
.pe-date::-webkit-date-and-time-value { text-align: left; }
.pe-when { position: relative; display: block; min-width: 0; }
.pe-when span { display: none; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pe-when:has(.pe-date:invalid) span { display: block; }
.pe-date:invalid::-webkit-datetime-edit { color: transparent; }
.pe-pts { position: relative; display: block; min-width: 0; }
.pe-pts .pe-in { padding-right: 38px; }
.pe-pts span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .82rem; font-weight: 600; pointer-events: none; }
.pe-row.bad .pe-in { border-color: var(--bad); }
.pe-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.45rem; line-height: 1; cursor: pointer; }
.pe-x:active { background: var(--paper-2); }
.pe-add { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 14px; border: 0; background: transparent; color: var(--accent-text); font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.pe-add:active { background: var(--paper-2); }
.pe-add svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 359px) {
  .pe-row { grid-template-columns: minmax(0, 1fr) 36px; }
  .pe-when { grid-column: 1; grid-row: 2; }
  .gs-num, .pe-num { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) { .gs-hero .ut.xl { animation: none; } }

/* The sliding boxes, on the green above the wallet. The row clips what scrolls sideways, so it keeps room below for the shadows. */
.pu { margin: 0 0 16px; }
.pu-h { margin: 0 0 4px; font-size: .82rem; font-weight: 700; letter-spacing: .01em; color: rgba(238, 246, 242, .82); }
.pu-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 18px; scrollbar-width: none; margin: 0 -18px -22px; padding: 8px 18px 30px; }
.pu-row::-webkit-scrollbar { display: none; }
.pu-box { position: relative; isolation: isolate; flex: 0 0 160px; scroll-snap-align: start; display: grid; grid-template-rows: auto auto 1fr; gap: 10px; min-height: 178px; padding: 14px; border-radius: 22px; text-decoration: none; color: var(--ink); --tint: var(--u1);
  transition: transform 180ms var(--ease); }
.pu-box::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: color-mix(in srgb, var(--u2) 10%, transparent); opacity: 0; transition: opacity 140ms; pointer-events: none; }
.pu-box:active { transform: scale(.965); }
.pu-box:active::after { opacity: 1; }
.pu-top { display: flex; justify-content: space-between; align-items: flex-start; }
.pu-go { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pu-go svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pu-go.lock { background: color-mix(in srgb, #e0a526 18%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, #e0a526 35%, transparent); }
.pu-go.lock svg { stroke: #9a6a0c; }
.pu-t { font-size: .95rem; font-weight: 680; line-height: 1.25; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pu-val { align-self: end; display: grid; gap: 1px; padding: 7px 10px; border-radius: 12px; background: var(--good-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 16%, transparent); }
.pu-val small { font-size: .75rem; font-weight: 600; color: var(--ink-2); }
.pu-val b { font-size: 1.05rem; font-weight: 780; letter-spacing: -.02em; line-height: 1.2; color: var(--good); white-space: nowrap; }
.pu-on { align-self: end; display: flex; align-items: center; gap: 8px; min-width: 0; }
.pu-on small { font-size: .78rem; font-weight: 620; line-height: 1.3; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pu-minis { display: flex; flex: none; }
.pu-minis .mini { width: 28px; height: 18px; border-radius: 4px; box-shadow: 0 0 0 1.5px var(--surface), 0 1px 2px rgba(0, 0, 0, .2); }
.pu-minis .mini + .mini { margin-left: -12px; }
.pu-minis .mini::after { left: 4px; top: 6px; width: 6px; height: 5px; }
.pu-s { align-self: end; font-size: .78rem; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
:root[data-theme="dark"] .pu-go.lock svg { stroke: #ffd479; }
:root[data-theme="dark"] .pu-minis .mini { box-shadow: 0 0 0 1.5px #1c1c1c; }

/* The page a box opens: the hero with your card, each card's ways, the steps and what to weigh */
.uw-hero { position: relative; display: grid; gap: 14px; padding: 16px; border-radius: 24px; --tint: var(--u1); }
.uw-k { display: flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 680; color: var(--ink-2); }
.uw-k .tag { flex: none; }
.uw-stage { position: relative; width: 100%; max-width: 320px; margin: 0 auto; padding-top: calc(var(--peek, 0) * 9px); }
.uw-peek { position: absolute; top: calc((var(--peek) - var(--n)) * 9px); left: calc(var(--n) * 12px); right: calc(var(--n) * 12px); height: 50px; border-radius: 14px 14px 0 0;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); opacity: calc(1 - var(--n) * .22); }
.uw-face { box-shadow: 0 1px 1px rgba(0, 0, 0, .1), 0 10px 18px -10px rgba(0, 0, 0, .45), 0 26px 40px -24px rgba(6, 30, 20, .7); }
.uw-face .f-mid.f-stat > div { min-width: 0; max-width: 100%; }
.uw-face .f-amt { font-size: 1.75rem; letter-spacing: -.03em; overflow-wrap: anywhere; }
.uw-face .f-amt small { font-size: .9rem; font-weight: 650; letter-spacing: 0; }
.uw-face .f-sub { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uw-face .f-type { font-size: .75rem; }
.uw-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.uw-facts span { padding: 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 620; line-height: 1.3; color: var(--ink-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow-wrap: anywhere; }
.uw-need { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--hot) 8%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot) 18%, transparent); }
.uw-nh { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 680; color: var(--ink-2); }
.uw-nh b { color: var(--warn); }
.uw-need small { font-size: .8rem; line-height: 1.4; color: var(--warn); }
.uw-ok { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .86rem; font-weight: 650; color: var(--good); }
.uw-ok svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.uw-next { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 14px; font-size: .86rem; color: var(--ink-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.uw-next .mini, .uw-sug .mini { width: 40px; height: 25px; border-radius: 5px; }
.uw-next .mini::after, .uw-sug .mini::after { left: 5px; top: 8px; width: 8px; height: 6px; }
.uw-nv { flex: none; color: var(--good); }
.uw-way { display: grid; gap: 2px; text-align: center; }
.uw-way b { font-size: 1rem; }
.uw-way span { font-size: .86rem; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.uw-hint { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--muted); text-align: center; }
.uw-acts { display: grid; gap: 8px; }
.uw-link { min-height: 48px; font-size: .92rem; }
.uw-trip { margin-top: 12px; }

/* Nothing on your cards: the use's tile in rings of its colour, what that means, and where to go next */
.uw-empty { display: grid; justify-items: center; gap: 8px; padding: 10px 4px 2px; text-align: center; }
.uw-empty .ut.xl { margin: 6px 0 10px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 5px rgba(0, 0, 0, .16), 0 10px 22px -10px var(--u2),
  0 0 0 10px color-mix(in srgb, var(--u1) 13%, transparent), 0 0 0 20px color-mix(in srgb, var(--u1) 6%, transparent); }
.uw-empty b { font-size: 1.12rem; letter-spacing: -.01em; }
.uw-empty p { margin: 0; max-width: 34ch; font-size: .9rem; line-height: 1.45; color: var(--muted); }
.uw-sl { margin: 2px 2px 0; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.uw-alts, .uw-sugs { display: grid; gap: 6px; }
.uw-alt, .uw-sug { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px; border: 0; border-radius: 16px; font: inherit; text-align: left; text-decoration: none; color: var(--ink);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: transform 160ms var(--ease); }
.uw-alt:active, .uw-sug:active { transform: scale(.98); }
.uw-alt b, .uw-sug b { display: block; font-size: .92rem; line-height: 1.3; }
.uw-alt small, .uw-sug small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .78rem; line-height: 1.35; color: var(--muted); }
.uw-alt small { color: var(--good); font-weight: 650; }
.uw-alt[target] small { color: var(--muted); font-weight: 500; } /* another bank's page: where it goes, not a value */
.pu-page > .uw-alts { margin-top: 16px; }
.tp-h { margin: 22px 2px 10px; }
.uw-alt .chev, .uw-sug .chev { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 2.2; flex: none; }

/* Each of your cards: its own lifted block, the card's colours, its ways (pw-rows) and the bank's site */
.uw-cards { display: grid; gap: 14px; }
.uw-block { display: grid; gap: 10px; padding: 14px; border-radius: 22px; }
.uw-bh { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.uw-bh .mini { width: 52px; height: 33px; border-radius: 7px; box-shadow: 0 1px 1px rgba(0, 0, 0, .14), 0 6px 10px -6px rgba(0, 0, 0, .5); }
.uw-bh b { display: block; font-size: 1rem; }
.uw-bh small { display: block; font-size: .8rem; color: var(--muted); }
/* On these pages a way with only a written rate (often long) puts the rate under its name, so the name keeps the row's width */
.pu-page .pw-row:has(.pw-rate) { grid-template-columns: 40px minmax(0, 1fr) 14px; row-gap: 2px; }
.pu-page .pw-row:has(.pw-rate) .pt-badge { grid-row: span 2; }
.pu-page .pw-row:has(.pw-rate) .pw-val { grid-column: 2; grid-row: 2; justify-items: start; text-align: left; max-width: none; }
.pu-page .pw-row:has(.pw-rate) .chev { grid-column: 3; grid-row: 1 / span 2; }
.pu-page .pw-val b.pw-rate { font-size: .8rem; font-weight: 650; color: var(--ink-2); }

/* How it works: a timeline in the use's colours, the last step a tick */
.uw-steps { list-style: none; margin: 0; padding: 18px 16px; display: grid; border-radius: 22px; }
.uw-steps li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; }
.uw-steps li:last-child { padding-bottom: 0; }
.uw-steps ~ .uw-acts, .uw-steps ~ .uw-alts, .uw-steps ~ .uw-hint { margin-top: 12px; }
.uw-steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--u2) 50%, transparent), color-mix(in srgb, var(--u1) 16%, transparent)); }
.uw-steps i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .82rem; font-weight: 780; color: #fff;
  background: linear-gradient(155deg, var(--u1), var(--u2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 12px -6px var(--u2); }
.uw-steps i svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.uw-steps li > div { display: grid; gap: 2px; padding-top: 3px; }
.uw-steps small { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.uw-steps span { font-size: .92rem; line-height: 1.45; color: var(--ink); }

/* Before you redeem: when it is worth it, and what to watch, as two compact cards */
.uw-tips { display: grid; gap: 10px; }
.uw-tip { display: grid; gap: 8px; padding: 14px 16px; border-radius: 20px; }
.uw-tip.good { --tint: var(--good); }
.uw-tip.warn { --tint: var(--hot); }
.uw-th { display: flex; align-items: center; gap: 10px; }
.uw-th b { font-size: .96rem; }
.uw-tic { width: 28px; height: 28px; flex: none; border-radius: 9px; display: grid; place-items: center; color: #fff; background: var(--good); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.uw-tip.warn .uw-tic { background: var(--hot); }
.uw-tic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.uw-tip p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.uw-tip ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.uw-tip li { position: relative; padding-left: 16px; font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.uw-tip li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--hot); }
:root[data-theme="dark"] .uw-tic { color: #111; }
@media (prefers-reduced-motion: reduce) { .pu-box, .pu-box::after, .uw-alt, .uw-sug { transition: none; }}
/* ======================================================================================================
   A card's own page (#card?id=...): the card large and real on the green, then sections that say what it
   means for you, then its tabs. Every section is one raised surface (.cp-sec) with rows split by hairlines.
   Theme colours only; dark mode at the end. Motion is transform and opacity only, and none of it with
   reduced motion. The tabs' panels are shared with Cards > card by card, so .cp-panel rules apply there too.
   ====================================================================================================== */
/* The card: bigger, a deeper layered shadow, a soft glow of its own colours under it and a contact shadow at its foot */
.cp .sub-hero { padding-bottom: 10px; }
.cp-hero { position: relative; display: grid; justify-items: center; gap: 14px; padding: 4px 0 2px; }
.cp-hero::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: 8px; height: 84px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c2) 80%, transparent), transparent); filter: blur(18px); opacity: .7; }
.cp-card { position: relative; z-index: 1; width: min(100%, 360px); border-radius: 20px; cursor: pointer; transform-origin: 50% 100%; }
.cp-card::after { content: ""; position: absolute; left: 7%; right: 7%; bottom: -16px; height: 20px; border-radius: 50%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(0, 0, 0, .5), transparent); filter: blur(5px); }
.cp-card .face { width: 100%; border-radius: 20px; padding: 20px 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(255, 255, 255, .12), 0 0 0 .5px rgba(0, 0, 0, .35),
    0 2px 3px rgba(0, 0, 0, .2), 0 10px 16px -6px rgba(0, 0, 0, .35), 0 30px 40px -18px rgba(0, 0, 0, .55); }
.cp-card .face .f-top { font-size: .86rem; }
.cp-card .face .chipmark { width: 46px; height: 35px; border-radius: 7px; }
.cp-card .face .f-name { font-size: clamp(1.15rem, 5.6vw, 1.4rem); }
.cp-card .face .f-type { font-size: .75rem; }
.cp-card .face .f-net { font-size: 1.02rem; }
/* The card in focus leans back as the page scrolls. app.js writes --page-tilt (0 at the top, 1 after 320px) on <html> from one scroll listener,
   so it works on every phone. --lean (1 on the focused card, eased) keeps the others flat and lets focus move smoothly while scrolled. */
@media (prefers-reduced-motion: no-preference) {
  .cp-card { transform: perspective(1000px) rotateX(calc(var(--page-tilt, 0) * 14deg)) scale(calc(1 - var(--page-tilt, 0) * .06)); opacity: calc(1 - var(--page-tilt, 0) * .12); }
  .home .deck:not(.lw-row) > button.on, .lw.open .lw-row > button.on .face { --lean: 1; }
  .home .deck:not(.lw-row) > button { rotate: x calc(var(--page-tilt, 0) * var(--lean) * 14deg); scale: calc(1 - var(--page-tilt, 0) * var(--lean) * .06); }
  .home .deck:not(.lw-row) > button .face { opacity: calc(1 - var(--page-tilt, 0) * var(--lean) * .12); }
  .lw-row .lw-t { perspective: 1000px; } /* the open wallet leans only the face, a little less */
  .lw-row .face { rotate: x calc(var(--page-tilt, 0) * var(--lean) * 9deg); scale: calc(1 - var(--page-tilt, 0) * var(--lean) * .04); transition: --lean 380ms cubic-bezier(.3, 0, .2, 1); }
}
@property --lean { syntax: '<number>'; inherits: true; initial-value: 0; }
/* Who issues it and whether you hold it, in light type on the green */
.cp-id { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 10px; color: #dcefe6; font-size: .86rem; font-weight: 600; text-align: center; }
.cp-own { padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 750; color: #eef6f2; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.cp-own.on { color: #c4f7df; background: rgba(95, 224, 168, .2); }
.cp .pan-btn, .cp .pan-add { min-height: 44px; }
.cp .pan-strip small { font-size: .75rem; }

/* A section: one raised surface, a heading with something small beside it, rows split by hairlines */
.cp > .cp-sec { margin-top: 14px; }
.cp-sec { display: grid; gap: 12px; padding: 16px; border-radius: 22px; }
.cp-sec.bad { --tint: var(--bad); }
.cp-sec.warn { --tint: var(--warn); }
.cp-sh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cp-sh h3 { margin: 0; font-size: 1rem; font-weight: 680; letter-spacing: -.01em; }
.cp-tag { flex: none; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 750; color: var(--muted); background: var(--paper-2); }
.cp-tag.good { color: var(--good); background: var(--good-bg); }
.cp-tag.bad { color: var(--bad); background: var(--bad-bg); }
.cp-note { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--muted); }
.cp-note b { color: var(--ink); }
.cp-sum { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--ink-2); }
.cp-lead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; font-size: 1.9rem; font-weight: 760; letter-spacing: -.035em; line-height: 1.1; color: var(--ink); }
.cp-lead.good { color: var(--good); }
.cp-lead small { font-size: .86rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
p.cp-lead { margin: 0; font-size: 1.1rem; letter-spacing: -.01em; line-height: 1.35; }
.cp-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; font-size: 2.1rem; font-weight: 780; letter-spacing: -.04em; line-height: 1.1; }
.cp-big.good { color: var(--good); }
.cp-big small { font-size: .88rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.cp-sub > b { display: block; font-size: .9rem; }
.cp-sub p { margin: 4px 0 0; font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.cp-bar { display: grid; gap: 6px; }
.cp-bar small { font-size: .78rem; color: var(--muted); line-height: 1.35; }
.cp-lead .money, .cp-stat b .money { font-size: inherit; color: inherit; }
/* Figures in a row, each with what it is above it */
.cp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.cp-stat { display: grid; gap: 2px; min-width: 0; container-type: inline-size; }
.cp-stat small { font-size: .75rem; font-weight: 650; color: var(--muted); }
/* --n is how many characters the figure has; the size is what lets all of them fit in the column (lakhs and crores included) */
.cp-stat b { font-size: clamp(.62rem, calc(100cqw / (var(--n, 8) * .7)), 1.3rem); font-weight: 740; letter-spacing: -.03em; line-height: 1.15; white-space: nowrap; }
.cp-stat.good b { color: var(--good); }
.cp-stat.bad b { color: var(--bad); }
/* This month: the figures beside the ring of cashback room left */
/* A fact as a row; a row that opens something gets a chevron and a 44px-plus target */
.cp-row, .cp-when, .cp-perk, .cp-rate { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; margin: 0; padding: 10px 0 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; text-align: left; color: var(--ink); text-decoration: none; }
.cp-sh + .cp-row, .cp-sh + .cp-when, .cp-sh + .cp-perk, .cp-lead + .cp-rate { border-top: 0; padding-top: 0; }
.cp-rl { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: .92rem; font-weight: 620; line-height: 1.3; }
.cp-rl small { font-size: .78rem; font-weight: 500; line-height: 1.35; color: var(--muted); }
.cp-rv { flex: none; max-width: 55%; text-align: right; font-size: .92rem; font-weight: 700; overflow-wrap: anywhere; }
.cp-rl .cp-k { font-weight: 650; }
.cp-rl > b { font-size: .95rem; font-weight: 650; line-height: 1.35; }
.cp-sec .chev, .cp-panel .chev { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--faint); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cp-row.go:active, .cp-perk:active, .cp-rate:active, .rwr:active { opacity: .7; }
/* The way on, across the foot of a section */
.cp-go { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: calc(100% + 32px); min-height: 48px; margin: 0 -16px -16px; padding: 0 16px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 22px 22px; background: none; font: inherit; font-size: .9rem; font-weight: 700; text-align: left; color: var(--good); text-decoration: none; }
.cp-go .chev { stroke: currentColor; }
.cp-go:active { background: var(--surface-2); }
/* Coming up: a calendar leaf for each date */
.cp-date { flex: none; width: 44px; height: 48px; border-radius: 12px; overflow: hidden; display: grid; grid-template-rows: 18px 1fr; text-align: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .06); }
.cp-date small { font-size: .75rem; font-weight: 750; line-height: 18px; color: #fff; background: var(--solid); }
.cp-date b { font-size: 1.12rem; font-weight: 760; line-height: 30px; }
/* Perks left: what is left as short bars, not dots */
.cp-pips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.cp-pips i { width: 14px; height: 5px; border-radius: 3px; background: var(--paper-2); }
.cp-pips i.on { background: var(--good); }
.cp-perk.locked .cp-rv { color: var(--warn); }
/* A reward rate: the figure in a column of its own, the brand's colour as its edge */
.rwr-rate { flex: none; width: 76px; display: grid; gap: 1px; padding-left: 10px; border-left: 3px solid var(--rb, var(--good)); }
.rwr-rate b { font-size: 1.35rem; font-weight: 780; letter-spacing: -.03em; line-height: 1.05; color: var(--ink); }
.rwr-rate small { font-size: .75rem; font-weight: 600; color: var(--muted); }
/* "Use it for ...": where another card was used though this one paid more */
.cp-tip { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; min-height: 48px; padding: 12px 14px; border-radius: 16px; color: var(--ink); text-decoration: none; background: var(--warn-bg); }
.cp-tip b { font-size: .92rem; }
.cp-tip small { grid-column: 1; font-size: .8rem; line-height: 1.4; color: var(--ink-2); }
.cp-tip .chev { grid-column: 2; grid-row: 1 / span 2; }
/* Changes the bank announced: a cut in red, an improvement in green */
.cp-chg { display: grid; gap: 2px; padding: 2px 0 2px 12px; border-left: 3px solid var(--good); }
.cp-chg.bad { border-left-color: var(--bad); }
.cp-chg small { font-size: .75rem; font-weight: 700; color: var(--muted); }
.cp-chg p { margin: 0; font-size: .9rem; line-height: 1.45; }
.cp-from { margin-top: 2px; }
.cp-from span { font-size: .75rem; color: var(--good); background: var(--good-bg); }
.cp-sec .lp-ring-mid span { font-size: .75rem; }
.cp-chg .nw-src { display: inline-flex; align-items: center; min-height: 44px; margin: -6px 0 -10px; }
.cp-acts { display: grid; gap: 8px; margin-top: 4px; }
.cp-warn { margin: 0; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); font-size: .9rem; line-height: 1.45; }
.cp-sh + .cp-warn { padding-top: 0; border-top: 0; }
.cp-foot { display: grid; gap: 8px; justify-items: start; margin-top: 18px; }
.cp-foot p { margin: 0; font-size: .78rem; line-height: 1.45; color: var(--muted); }
.cp .tr-b { font-size: .75rem; }

/* The tabs and their panels */
.cp-tabs button, .cp-months button { min-height: 44px; }
.cp-lim .lp-top { margin: 0; }
.cp-list { gap: 0; padding-top: 6px; padding-bottom: 6px; }
.rwr { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.cp-list > .rwr:first-child { border-top: 0; }
.rwr-body { flex: 1; min-width: 0; display: grid; justify-items: start; gap: 5px; }
.rwr-t { font-size: 1rem; font-weight: 680; line-height: 1.25; }
.rwr.top .rwr-rate b { font-size: 1.6rem; color: var(--good); }
.rwr.base .rwr-rate { border-left-color: var(--line); }
.cp-panel .rw-chips span { font-size: .75rem; }
.cp-panel .pk-sec { gap: 10px; }
.cp-panel .pk-sec h3 { margin: 8px 2px 0; font-size: 1rem; }
.cp-panel .pkx { border-radius: 22px; }
.cp-panel .pkx-ic { width: 44px; height: 44px; border-radius: 13px; font-size: 1.3rem; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent); }
.cp-panel .pkx-chips span { font-size: .75rem; }
.cp-panel .pkx-foot { padding-top: 4px; }
.cp-panel .pkx-link { display: inline-flex; align-items: center; min-height: 44px; }
.cp-panel .pkx-go i { width: auto; height: auto; background: none; color: var(--good); }
.cp-panel .nodata { border-radius: 22px; }
.cp-panel .nd-ic { border-radius: 13px; }
/* This month at a glance: spent, earned and limit left side by side */
.cp-glance .cp-stats:has(> :nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* The card's main actions: one row of round buttons, each with its word under it */
.cp-qa { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 14px 6px 12px; }
.cp-qa-b { display: grid; justify-items: center; align-content: start; gap: 7px; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: .76rem; font-weight: 650; line-height: 1.2; color: var(--ink); text-align: center; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cp-qa-ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; color: var(--good); background: var(--good-bg); transition: transform 180ms var(--ease); }
.cp-qa-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cp-qa-b:active .cp-qa-ic { transform: scale(.9); }
.cp-qa-b:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 14px; }
/* Fees, rewards and perks: the summary rows, then each group under its title, with where it was read beside the title */
.cp-fgs { display: grid; gap: 20px; margin-top: 8px; }
.cp-fg { display: grid; }
.cp-fgh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding-bottom: 8px; }
.cp-fgh h4 { margin: 0; font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
.cp-fgh + .cp-row { border-top: 0; padding-top: 0; }
.cp-fg .cp-row { padding-bottom: 10px; }
.cp-fl, .cp-fl.fold-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: .88rem; font-weight: 700; color: var(--good); text-align: left; text-decoration: none; cursor: pointer; }
.cp-fl .chev { stroke: currentColor; }
.cp-fg .fx-how { border-top: 1px solid var(--line); }
.cp-fgh + .fx-how { border-top: 0; padding-top: 0; }
/* The quiet Update at the foot of a card's page and of its sheet: how fresh it is, the button, one line on what it does */
.upd-foot { display: grid; justify-items: start; gap: 6px; }
.upd-foot p { margin: 0; }
.upd-foot .upd-mini { min-height: 40px; margin-top: 4px; padding: 6px 14px; font-size: .82rem; }
.upd-foot .textlink { border: 0; background: none; padding: 0; font: inherit; font-weight: 650; color: var(--accent-text); cursor: pointer; }
.cp-upd { margin-top: 18px; padding: 0 4px; }
.cp-upd:empty { display: none; }
/* The card's sheet: the card, its name and bank, then grouped lists of rows */
.cd-hero .face { width: 100%; }
.cd-id { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cd-id h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.02em; }
.cd-id small { display: block; margin-top: 2px; font-size: .86rem; color: var(--muted); }
.cd-id .tag { flex: none; margin-top: 3px; }
.rowitem.kv { min-height: 50px; cursor: default; }
.rowitem.kv .grow { color: var(--ink-2); }
.rowitem.kv b { flex: none; max-width: 60%; text-align: right; font-weight: 680; overflow-wrap: anywhere; }
.rowitem.kv.long { display: grid; gap: 2px; }
.rowitem.kv.long b { max-width: none; text-align: left; }
.btn.link.cd-remove { color: var(--bad); text-decoration: none; }

:root[data-theme="dark"] .cp-date { background: #222; }
:root[data-theme="dark"] .upd-mini { color: #5fe0a8; }
:root[data-theme="dark"] .cp-panel .rw-chips span { color: color-mix(in srgb, var(--rb, #4fd6a2) 55%, #fff); background: color-mix(in srgb, var(--rb, #4fd6a2) 18%, transparent); }

/* ---------- Tier benefits (#network) and its entry box (nwx): each card's network tier, what the bank switched on, and how to use
   each benefit. tb-* is this page only. Every colour comes from the theme's variables (dark mode follows; the few mixes below are
   redone for dark), motion is transform and opacity only, tap targets are 44px and up, and nothing is wider than the screen. ---------- */
.tb-body { display: grid; gap: 16px; min-width: 0; }
/* The summary: one plain sentence, the numbers in bold inside it (no tiles that say the same thing twice) */
.tb-sum { display: grid; gap: 10px; padding: 18px; border-radius: 22px; }
.tb-head { margin: 0; font-size: 1.3rem; font-weight: 760; line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
.tb-ins { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.tb-ins b { font-weight: 750; color: var(--ink); }
.tb-soon { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 14px; font-size: .84rem; line-height: 1.4; background: var(--warn-bg); color: var(--ink); }
/* Network versus the bank's own: one colour each, everywhere on the page */
.tb { --tb-net: #2f62d6; --tb-bank: #c25a12; --tb-unk: var(--faint); }
.p-network { --pc: var(--tb-net); } .p-bank { --pc: var(--tb-bank); } .p-unknown { --pc: var(--tb-unk); }
/* The cards: the one in the middle is centred (the row's side padding lets the first and last reach the middle too), and the
   others shrink and fade a little by how far they are from the middle. That is a scroll-driven animation on the face, so the
   browser runs it with the scroll, with no script per frame; without it, the .on class does the same in one step. */
.tb-deck { min-width: 0; }
.tb-deck .deck:not(.lw-row) { margin-top: 0; padding-inline: calc((100% - var(--dw)) / 2 + 18px); overscroll-behavior-x: contain; }
.tb-deck .deck > button { transform: none; opacity: 1; transition: none; will-change: auto; }
.tb-deck .deck > button .face { transition: transform 300ms var(--ease), opacity 300ms; }
.tb-deck .deck > button:not(.on) .face { transform: scale(.9); opacity: .6; }
@supports (animation-timeline: view()) {
  .tb-deck .deck > button { view-timeline: --tb-card inline; }
  .tb-deck .deck > button .face { transition: none; animation: tb-peek linear both; animation-timeline: --tb-card; }
}
@keyframes tb-peek { 0%, 100% { transform: scale(.9); opacity: .6; } 50% { transform: none; opacity: 1; } }
.tb-pwrap { min-width: 0; }
.tb-panel { display: grid; gap: 14px; min-width: 0; }
.tb-tier, .tb-sec { display: grid; gap: 10px; padding: 16px; border-radius: 22px; min-width: 0; }
/* The tier as a badge in the network's colours, then one line on the counts */
.tb-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.tb-badge .nw-net { padding: 7px 14px; font-size: .98rem; line-height: 1.25; overflow-wrap: anywhere; }
.tb-badge > span:not(.nw-net):not(.tag) { font-size: .9rem; font-weight: 650; color: var(--muted); }
.nw-none { background: #5b6b63; }
.tb-line { margin: 0; font-size: .92rem; line-height: 1.45; color: var(--ink); }
.tb-tier .tb-how { margin: 0; font-size: .84rem; line-height: 1.45; color: var(--muted); }
.tb-tier .tb-look { display: flex; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; font-size: .86rem; line-height: 1.45; color: var(--ink-2); background: var(--surface-2); }
.tb-sec h3 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 1.04rem; line-height: 1.3; }
.tb-sec h3 small { font-size: .8rem; font-weight: 700; color: var(--muted); }
.tb-panel .nw-src { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0 -12px; } /* a 44px tap target without the extra space */
.tb-sub { margin: -4px 0 0; font-size: .84rem; line-height: 1.4; color: var(--muted); }
.tb-sub b { font-weight: 650; color: var(--ink-2); }
/* Rows, as in a grouped list: hairlines between, the whole row taps open */
.tb-grp { display: grid; min-width: 0; }
.tb-grp h4 { margin: 8px 0 0; font-size: .8rem; font-weight: 700; line-height: 1.3; color: var(--muted); }
.tb-grp + .tb-grp { margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.tb-list { display: grid; min-width: 0; }
.tb-list > * + * { border-top: 1px solid var(--line); }
.tb-row summary { display: grid; grid-template-columns: 40px minmax(0, 1fr) 14px; gap: 12px; align-items: center; min-height: 56px; padding: 10px 0; cursor: pointer; list-style: none; }
.tb-row summary::-webkit-details-marker { display: none; }
.tb-row .chev, .tb-fold .chev { width: 14px; height: 14px; stroke: var(--faint); fill: none; stroke-width: 2.4; transition: transform 220ms var(--ease); }
.tb-row[open] > summary .chev, .tb-fold[open] > summary .chev { transform: rotate(90deg); }
.tb-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: var(--surface-2); }
.tb-ic.g-travel { background: color-mix(in srgb, #2f6fdf 14%, var(--surface)); }
.tb-ic.g-protect { background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.tb-ic.g-life { background: color-mix(in srgb, #d9701f 15%, var(--surface)); }
.tb-ic.g-save { background: color-mix(in srgb, #e0a526 18%, var(--surface)); }
.tb-bt { display: grid; gap: 1px; min-width: 0; }
.tb-bt b { font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.tb-bt small { font-size: .8rem; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.tb-who { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: .75rem; line-height: 1.3; color: var(--muted); }
.tb-who::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--pc); }
.tb-pill { justify-self: start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--warn); background: var(--warn-bg); }
.tb-val { font-size: .88rem; font-weight: 750; line-height: 1.35; color: var(--good); }
.tb-more { display: grid; gap: 8px; padding: 0 0 12px 52px; min-width: 0; }
.tb-more > p { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--ink-2); }
.tb-cond, .tb-miss { display: flex; gap: 8px; padding: 8px 10px; border-radius: 12px; font-size: .82rem; line-height: 1.4; }
.tb-cond { background: var(--surface-2); color: var(--ink-2); }
.tb-miss { display: grid; gap: 2px; background: var(--warn-bg); color: var(--ink); }
.tb-miss b { font-size: .75rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--warn); }
.tb-more .tb-how { padding: 10px 12px; border-radius: 12px; color: var(--ink); background: var(--good-bg); }
.tb-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.tb-facts dt { font-size: .75rem; font-weight: 700; color: var(--muted); }
.tb-facts dd { margin: 0; font-size: .86rem; line-height: 1.35; overflow-wrap: anywhere; }
/* On or off: the bank's switches and the benefits that are not on, as rows with a pill on the right */
.tb-swi, .tb-offi { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 52px; padding: 8px 0; min-width: 0; }
.tb-swi b { min-width: 0; font-size: .92rem; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.tb-swi em, .tb-offi em { font-style: normal; font-size: .75rem; font-weight: 750; padding: 3px 10px; border-radius: 999px; color: var(--bad); background: var(--bad-bg); }
.tb-swi.on em { color: var(--good); background: var(--good-bg); }
.tb-offi { align-items: start; }
.tb-offi em { margin-top: 10px; }
.tb-offi .tb-ic { background: var(--bad-bg); filter: grayscale(.6); }
/* A section that opens on a tap (tips, questions for the bank) */
.tb-fold summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; cursor: pointer; list-style: none; }
.tb-fold summary::-webkit-details-marker { display: none; }
.tb-fold:not([open]) { gap: 0; }
.tb-fold summary h3 { color: var(--ink); }
.tb-chg { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tb-chg li { position: relative; display: grid; gap: 2px; padding-left: 20px; }
.tb-chg li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.tb-chg li.past::before { background: var(--faint); box-shadow: 0 0 0 4px var(--paper-2); }
.tb-chg time { font-size: .75rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--warn); }
.tb-chg li.past time { color: var(--muted); }
.tb-chg b { font-size: .9rem; line-height: 1.35; }
.tb-chg small { font-size: .82rem; line-height: 1.4; color: var(--muted); }
.tb-tips { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .88rem; line-height: 1.45; }
.tb-ask { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.tb-ask li { font-size: .88rem; line-height: 1.4; }
.tb-ask b { font-weight: 650; }
.tb-ask small { display: block; margin-top: 2px; font-size: .8rem; color: var(--muted); }
.tb-copy { justify-self: start; }
.tb-foot { display: grid; gap: 10px; }
.tb-foot > p { margin: 0; font-size: .78rem; line-height: 1.4; color: var(--muted); }
.tb-foot .notice { margin: 0; }
/* Check for updates */
.tb-upd { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 12px 16px; border: 1.5px solid color-mix(in srgb, var(--good) 35%, transparent); border-radius: 18px; text-align: left; font: inherit; color: var(--ink); background: color-mix(in srgb, var(--good) 7%, var(--surface)); cursor: pointer; transition: transform 160ms var(--ease); }
.tb-upd:active:not([disabled]) { transform: scale(.985); }
.tb-upd[disabled] { cursor: default; opacity: .85; }
.tb-upd > svg { width: 24px; height: 24px; flex: none; stroke: var(--good); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tb-upd .su-spin { width: 24px; height: 24px; border-width: 2.5px; }
.tb-upd b { display: block; font-size: .96rem; }
.tb-upd small { display: block; font-size: .78rem; line-height: 1.35; color: var(--muted); }
.tb-empty { display: grid; gap: 4px; padding: 18px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.tb-empty small { font-size: .86rem; line-height: 1.4; color: var(--muted); }
/* Free: the tier and the counts, the details under a lock */
.tb-locked { position: relative; padding: 0 0 4px; }
.tb-bh { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.tb-blur { display: grid; gap: 12px; padding: 16px; border-radius: 22px; background: var(--surface); filter: blur(3px); opacity: .55; pointer-events: none; user-select: none; }
.tb-veil { display: grid; justify-items: center; gap: 8px; margin-top: -86px; position: relative; padding: 18px 16px; border-radius: 22px; text-align: center; background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow); }
.tb-veil b { font-size: 1.04rem; line-height: 1.3; }
.tb-veil small { font-size: .84rem; color: var(--muted); }
.tb-lk { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #1b1b1f, #3a3a42); }
.tb-lk svg { width: 24px; height: 24px; stroke: #ffe08a; fill: none; stroke-width: 2; }
/* The entry box: each card's tier once the app has it */
.nw-diners { background: linear-gradient(135deg, #004a8f, #3c7fc2); }
.nwx-tiers { display: grid; gap: 6px; }
.nwx-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nwx-row .mini { width: 40px; height: 26px; border-radius: 6px; }
.nwx-row .mini::after { left: 5px; top: 8px; width: 8px; height: 6px; }
.nwx-row .grow { min-width: 0; }
.nwx-row b { display: block; font-size: .88rem; line-height: 1.3; overflow-wrap: anywhere; }
.nwx-row small { display: block; font-size: .78rem; color: var(--muted); }
.nwx-row .tag { flex: none; }
:root[data-theme="dark"] .tb { --tb-net: #7ea4ff; --tb-bank: #f0a35a; }
:root[data-theme="dark"] .tb-ic.g-travel { background: color-mix(in srgb, #2f6fdf 26%, var(--surface)); }
:root[data-theme="dark"] .tb-ic.g-protect { background: color-mix(in srgb, var(--good) 20%, var(--surface)); }
:root[data-theme="dark"] .tb-ic.g-life { background: color-mix(in srgb, #d9701f 26%, var(--surface)); }
:root[data-theme="dark"] .tb-ic.g-save { background: color-mix(in srgb, #e0a526 24%, var(--surface)); }
:root[data-theme="dark"] .tb-veil { background: color-mix(in srgb, var(--surface) 92%, transparent); }
:root[data-theme="dark"] .tb-lk { background: linear-gradient(135deg, #ffe08a, #e0a526); }
:root[data-theme="dark"] .tb-lk svg { stroke: #1b1b1f; }
@media (prefers-reduced-motion: reduce) { .tb-deck .deck > button .face { animation: none; transition: none; } .tb-row .chev, .tb-fold .chev { transition: none; } }

/* A short figure beside a heading ("since Aug 2026", "8 this week") stays on one line */
.section > .row.between > .small.muted { white-space: nowrap; flex-shrink: 0; margin-left: 8px; }

/* What the app knows about a card: one chip per part (a tap opens its tab); a part with nothing saved is a soft amber gap */
.ck { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 2px; }
.ck-chip { all: unset; box-sizing: border-box; min-height: 30px; padding: 5px 11px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: .76rem; font-weight: 650; color: var(--ink); cursor: pointer; white-space: nowrap; }
.ck-chip.gap { background: var(--warn-bg); box-shadow: none; color: var(--warn); }
.ck-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ck-when { flex-basis: 100%; font-size: .72rem; color: var(--muted); }
/* A perk's every detail line, as a short list */
.pkx-list { display: grid; gap: 3px; padding-left: 18px; -webkit-line-clamp: unset; overflow: visible; }
.pkx-list li { padding-left: 2px; }
/* The card in a sentence on Cards, and the way to its own page */
.lp-sum { display: grid; gap: 4px; margin: 8px 0 10px; text-decoration: none; color: var(--ink-2, var(--ink)); font-size: .84rem; line-height: 1.4; }
.lp-sum b { font-size: .8rem; color: var(--accent-text, var(--good)); }

/* Premium sheet: the price after the trial, the year's saving, and what Card Coins take off */
.pr-price { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pr-price > div { padding: 10px 12px; border-radius: 16px; text-align: center; }
.pr-price b { display: block; font-size: 1.25rem; font-weight: 760; letter-spacing: -.02em; }
.pr-price small { color: var(--muted); font-size: .76rem; }
.pr-coins { grid-column: 1 / -1; margin: 0; padding: 9px 12px; border-radius: 14px; background: var(--good-bg); color: var(--good); font-size: .84rem; font-weight: 650; text-align: center; }
/* Points: a Premium-only way, locked on Free */
.pu-box.locked { border: 0; font: inherit; text-align: left; cursor: pointer; }
.pu-box.locked .ut { filter: saturate(.55); }
.pu-lock { align-self: end; justify-self: start; white-space: nowrap; padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--u2) 14%, var(--surface)); color: var(--u2); font-size: .74rem; font-weight: 700; }
/* A sneak peek on Free: the first item clear, the rest faded under a shadow with the way to Premium */
.peek { position: relative; display: grid; gap: inherit; }
.peek-rows { display: grid; gap: 10px; filter: blur(3px); opacity: .55; pointer-events: none; user-select: none; max-height: 150px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent); }
.peek-go { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--surface); font: inherit; font-size: .84rem; font-weight: 700; box-shadow: var(--shadow-sm); cursor: pointer; }
.peek-go svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; }
/* Changes to your cards (Home and its page): only a sliver of the next change shows, fading out, with the way to Premium just under it */
.cxh-list .peek { justify-items: center; }
.cxh-list .peek-rows { width: 100%; max-height: 34px; filter: none; opacity: .8; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.cxh-list .peek-go { position: relative; left: auto; top: auto; transform: none; margin-top: -12px; }
/* Analysis: the Smart move, the one switch worth the most */
.an-smart { --tint: var(--good); }
.an-smart-t { margin: 6px 0 2px; font-size: 1.08rem; font-weight: 760; letter-spacing: -.015em; line-height: 1.25; }
/* Setup: Find my cards from your credit report, coming soon */
.fm { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; }
.fm-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; background: var(--paper-2); }
.fm b { display: flex; align-items: center; gap: 6px; font-size: .95rem; }
.fm b em { font-style: normal; font-size: .66rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.fm small { display: block; margin: 3px 0 8px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.fm-go { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .82rem; font-weight: 650; cursor: pointer; }
.fm-go:disabled { color: var(--good); border-color: transparent; background: var(--good-bg); }

/* Under an AI answer: where it came from, and 👍/👎 */
.ai-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 8px; }
.ai-vote { flex: none; display: inline-flex; gap: 4px; font-size: .78rem; color: var(--muted); }
.ai-vote button { min-width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 1rem; cursor: pointer; }
/* Owner: chat questions by kind */
.cs-row { padding: 6px 0; border-top: 1px solid var(--line); gap: 10px; font-size: .86rem; }
.cs-gap { color: var(--warn); }

/* ---------- Analysis: the month as a story (hero ring, smart move, what the app did, where, day by day, cards ranked) ---------- */
[data-anim="x"] { transform-origin: left; }
[data-anim="y"] { transform-origin: bottom; }
.wait:not(.seen) [data-anim] { opacity: 0; } /* a chart waiting to be scrolled to starts empty, so it never shows full and then redraws */
.ring-track { stroke: var(--ring-track, var(--paper-2)); }
.an-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.an-ring { position: relative; flex: none; width: 92px; height: 92px; --ring-track: rgba(255, 255, 255, .16); }
.an-ring svg { width: 92px; height: 92px; display: block; }
.an-ring > b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.45rem; font-weight: 760; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-ring small { font-size: .8rem; font-weight: 650; margin-left: 1px; opacity: .8; }
.an-hero-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.an-hero-t .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-hero-t .small b { color: #a8f0cf; font-weight: 700; }
.an-more { flex: none; font-size: .82rem; font-weight: 650; color: var(--accent-text); text-decoration: none; padding: 6px 0 6px 8px; }
.an-smart-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.mini.rep-chip.an-smart-chip { width: 40px; height: 26px; border-radius: 5px; flex: none; }
.an-smart-row .an-smart-t { margin: 0 0 2px; }
.an-gain { flex: none; white-space: nowrap; font-weight: 780; font-size: 1.02rem; color: var(--good); background: var(--good-bg); padding: 6px 10px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.rep-made { display: block; color: #fff; text-decoration: none; background: radial-gradient(120% 140% at 100% 0%, #1f9d6c 0%, transparent 55%), linear-gradient(135deg, #0f3d2d, #0a5c3e); }
.report .rep-made { margin-top: 12px; }
.report a.rep-made { transition: transform 200ms var(--ease); }
.report a.rep-made:active { transform: scale(.985); }
.rm-top { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; font-weight: 650; color: #bfe6d4; }
.rm-top .chev { font-size: 1.5rem; line-height: 1; }
.rm-big { margin-top: 6px; }
.rm-big b { display: block; font-size: 2rem; font-weight: 780; letter-spacing: -.035em; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rm-big > span { display: block; margin-top: 4px; font-size: .88rem; line-height: 1.4; color: #cfeadd; }
.rm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.rm-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rm-stat { position: relative; min-width: 0; container-type: inline-size; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .09); display: flex; flex-direction: column; gap: 2px; }
.rm-stat b { font-size: clamp(.62rem, calc(100cqw / (var(--n, 8) * .7)), .98rem); font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rm-stat > span { font-size: .72rem; line-height: 1.3; color: #bfe6d4; }
.rm-ring { position: absolute; top: 9px; right: 8px; width: 20px; height: 20px; --ring-track: rgba(255, 255, 255, .18); }
.an-ranks { display: grid; gap: 12px; margin-top: 12px; }
.an-rank { display: flex; align-items: center; gap: 10px; }
.an-rk { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 750; background: var(--paper-2); color: var(--muted); }
.an-rank.first .an-rk { background: linear-gradient(135deg, #ffd66b, #e5a400); color: #4a3300; }
.an-rank .mini.rep-chip { width: 30px; height: 20px; flex: none; }
.an-rn { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .9rem; }
.an-rn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.an-rn b { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-rbar { height: 7px; border-radius: 4px; background: var(--paper-2); overflow: hidden; margin: 5px 0 4px; }
.an-rbar i { display: block; height: 100%; border-radius: 4px; background: var(--band-good); }
.an-rank.first .an-rbar i { background: linear-gradient(90deg, var(--band-good), var(--accent)); }
.an-ranks-more { margin-top: 10px; }
.dc { margin-top: 12px; }
.dc-plot { display: flex; align-items: flex-end; gap: 2px; height: 96px; border-bottom: 1px solid var(--line); touch-action: pan-y; cursor: pointer; outline: none; }
.dc-plot:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 4px; }
.dc-b { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 3px 3px 0 0; }
.dc-b > i, .dc-b > b { display: block; width: 100%; max-width: 9px; border-radius: 3px 3px 1px 1px; }
.dc-b > i { background: color-mix(in srgb, var(--accent) 50%, var(--paper-2)); transition: opacity 200ms; }
.dc-b > b { position: absolute; bottom: 0; height: 0; background: var(--dc-c, var(--accent)); }
.dc-b.today > i, .dc-b.on > i { background: var(--accent); }
.dc-b.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.dc-b.later::after { content: ""; position: absolute; bottom: 2px; width: 3px; height: 3px; border-radius: 50%; background: var(--faint); opacity: .6; }
.dc.filtered .dc-b > i { opacity: 0; } /* the lit bars have their own scale: a faint total beside them would look smaller than its part */
.dc-axis { position: relative; height: 18px; font-size: .68rem; color: var(--muted); }
.dc-axis span { position: absolute; top: 4px; transform: translateX(-50%); }
.dc-cap { min-height: 42px; margin-top: 2px; font-size: .88rem; line-height: 1.4; }
.an-start .list { margin-top: 12px; }
.an-dots { display: flex; gap: 6px; margin-top: 12px; }
.an-dots i { flex: 1; height: 8px; border-radius: 4px; background: var(--paper-2); }
.an-dots i.on { background: var(--accent); }
.an-soon { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.an-soon span { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; background: var(--paper); font-size: .8rem; line-height: 1.25; color: var(--muted); }
.an-soon i { font-style: normal; font-size: 1.1rem; }
.an-card .rep-where { margin-top: 12px; }
.rep-best { display: flex; align-items: center; gap: 8px; }
.rep-best .mini.rep-chip { flex: none; }
.rep-shops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rep-shops span { padding: 4px 10px; border-radius: 999px; background: var(--paper); font-size: .78rem; white-space: nowrap; }

/* Points: the ways to use points as wide, low tiles (icon and name on top, what your points get along the bottom), so a row of
   them reads at a glance instead of tall cards with empty space */
.pu-box { flex: 0 0 236px; min-height: 0; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 11px; row-gap: 12px; align-items: center; padding: 13px 14px; border-radius: 20px; }
.pu-box .pu-top { display: contents; }
.pu-box .ut { grid-column: 1; grid-row: 1; }
.pu-box .pu-t { grid-column: 2; grid-row: 1; font-size: .92rem; }
.pu-box .pu-go { grid-column: 3; grid-row: 1; align-self: start; width: 26px; height: 26px; }
.pu-box .pu-val, .pu-box .pu-on, .pu-box .pu-s, .pu-box .pu-lock { grid-column: 1 / -1; grid-row: 2; align-self: end; }

/* What members tell each other: confirmations under a perk or rate, the Home question, reviews */
.mb-conf { font-size: .78rem; font-weight: 650; color: var(--good); margin-top: 4px; }
.mb-conf.warn { color: var(--warn); }
.mb-home { display: grid; gap: 6px; }
.mb-home b { font-size: .98rem; line-height: 1.3; }
.mb-home .row { gap: 8px; align-items: center; }
.rv-top { display: flex; align-items: baseline; gap: 8px; }
.rv-avg { font-size: 1.6rem; font-weight: 780; letter-spacing: -.02em; }
.rv-stars { color: #e0a100; letter-spacing: 1px; white-space: nowrap; }
.rv-line { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.rv-line p { margin: 0; font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.rv-pick { display: flex; gap: 6px; }
.rv-pick button { min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: var(--paper-2); font-size: 1.4rem; color: var(--faint); cursor: pointer; }
.rv-pick button.on { color: #e0a100; background: color-mix(in srgb, #e0a100 14%, var(--surface)); }

/* ---------- Update: source boxes by where a fact comes from, the card's facts, and the update sheet ---------- */
/* Green: the bank or the card network (only these change which card the app picks). Yellow: comparison sites.
   Slate blue: independent sources (news, the regulator). One look for all three: a rounded box with a soft wash of its hue. */
:root { --src-bank: #0b6e47; --src-bank-bg: #e3f5ec; --src-cmp: #7a4a00; --src-cmp-bg: #fdf1d3; --src-cmp-bg2: #fbe3a8; --src-ind: #2f4a6b; --src-ind-bg: #e6eef7; }
:root[data-theme="dark"] { --src-bank: #7fdcb0; --src-bank-bg: #12301f; --src-cmp: #f3cc7a; --src-cmp-bg: #33270d; --src-cmp-bg2: #463412; --src-ind: #a9c4e6; --src-ind-bg: #19253a; }
.srcbox { display: inline-flex; flex-wrap: wrap; justify-self: start; align-items: baseline; gap: 0 6px; text-align: left; width: fit-content; max-width: 100%; border: 0; border-radius: 10px; padding: 3px 9px 4px; font: inherit; cursor: pointer; min-height: 26px;
  color: var(--src-bank); background: var(--src-bank-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent); }
.srcbox b { font-size: .74rem; font-weight: 720; letter-spacing: .01em; }
.srcbox small { font-size: .72rem; line-height: 1.35; opacity: .9; overflow-wrap: anywhere; }
.srcbox small::before { content: '· '; }
.srcbox small:empty { display: none; }
.srcbox.cmp { color: var(--src-cmp); background: linear-gradient(135deg, var(--src-cmp-bg), var(--src-cmp-bg2)); }
.srcbox.ind { color: var(--src-ind); background: var(--src-ind-bg); }
.srcbox.cmp, .srcbox.ind { display: grid; gap: 0; }
.srcbox.cmp small::before, .srcbox.ind small::before { content: none; }
.srcbox.big { display: grid; gap: 2px; width: 100%; padding: 10px 12px; cursor: default; }
.srcbox.big small::before { content: none; }
.srcbox.big b, .srcbox.big small { font-size: .86rem; }
.src-val { margin: 0; font-size: 1.15rem; font-weight: 680; overflow-wrap: anywhere; }
.src-quote { margin: 0; padding: 10px 12px; border-left: 3px solid var(--line); background: var(--surface-2); border-radius: 0 12px 12px 0; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.fx-gap { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: .88rem; overflow-wrap: anywhere; }
.fx-gap .textlink { justify-self: start; border: 0; background: none; padding: 4px 0; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 650; color: var(--accent-text); }
.upd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.upd-steps li { position: relative; padding: 7px 0 7px 26px; font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.upd-steps li.done::before { content: ''; position: absolute; left: 4px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.upd-steps li.on { display: flex; align-items: center; gap: 10px; padding-left: 0; color: var(--muted); }
.upd-steps li.on .su-spin { width: 18px; height: 18px; border-width: 2.5px; }
.upd-h { margin: 0 0 4px; font-size: .95rem; }
.upd-src { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.upd-src li { display: grid; gap: 1px; font-size: .86rem; overflow-wrap: anywhere; }
.upd-src small { color: var(--muted); }
.upd-all { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.upd-all li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.upd-all li small { color: var(--muted); text-align: right; overflow-wrap: anywhere; min-width: 0; }
.upd-all li.on small { color: var(--accent-text); }
.upd-all li.bad small { color: var(--bad); }
/* The last 4 digits box (add a card, a card's details, a statement for a card without them) and the card pick list's search. */
.l4-in { max-width: 150px; text-align: center; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.l4-say { display: block; margin-top: 6px; }
.cpl .field > span { font-weight: 650; color: var(--ink); }
/* A long card name never pushes the network off the card face: the name breaks, the network keeps its width. */
.face .f-bot > div:first-child { min-width: 0; }
.face .f-name { overflow-wrap: anywhere; }
.face .f-net { flex: none; }
/* How to use a benefit: steps in order, then the conditions, each line with its source box */
.how { display: grid; gap: 12px; }
.how-part h4 { margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.how-part.miss h4 { color: var(--warn); }
.how-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.how-list li { font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere; }
.how-list li > span { display: block; margin-bottom: 3px; }
.fx-how { padding-top: 6px; }
.fx-how summary { cursor: pointer; font-weight: 650; font-size: .92rem; padding: 6px 0; }

/* =====================================================================================================
   Home: card tile figures, Spend to unlock, calm bank changes, and a peeking fourth row (the rest on a page)
   ===================================================================================================== */
.face .f-top > span:has(> .f-stats) { background: none; padding: 0; }
.face .f-stats { display: grid; gap: 4px; text-align: right; line-height: 1.1; text-shadow: 0 1px 1px rgba(0, 0, 0, .22); }
.face .f-stat2 { display: grid; gap: 1px; }
.face .f-stat2 small { font-size: .6rem; font-weight: 600; opacity: .72; letter-spacing: .01em; }
.face .f-stat2 > :last-child { font-size: .92rem; font-weight: 720; letter-spacing: -.01em; white-space: nowrap; }
.cxh-list { display: grid; gap: 8px; margin-top: 10px; }
.ul-list { margin-top: 10px; border-radius: 18px; padding: 2px 14px; }
.ul-list > .ul-row + .ul-row { border-top: 1px solid var(--line); }
.ul-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; text-decoration: none; color: var(--ink); }
.ul-row .mini { width: 40px; height: 26px; border-radius: 6px; margin-top: 2px; }
.ul-row .mini::after { left: 5px; top: 8px; width: 8px; height: 6px; }
.ul-row b { display: block; font-size: .95rem; line-height: 1.3; }
.ul-row small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; margin-top: 2px; }
.ul-row .meter { height: 6px; margin: 8px 0 2px; }
.ul-row .ul-foot { font-size: .72rem; }
.ul-row .chev, .hl-peek-go svg { width: 15px; height: 15px; stroke: var(--muted); fill: none; stroke-width: 2.2; flex: none; margin-top: 4px; }
.cxh-row { --box-mark: none; }
/* On their full pages the rows lie flat in their panel, split by hairlines */
.panel .ul-list { background: none; box-shadow: none; padding: 0; margin: 0; }
.panel .cxh-list { gap: 0; margin: 0; }
.panel .cxh-row { background: none; box-shadow: none; border-radius: 0; padding: 12px 0; }
.panel .cxh-row + .cxh-row { border-top: 1px solid var(--line); }
.cxh-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; background: var(--good); }
.cxh-dot.bad { background: var(--band-poor); }
.hl-peek { position: relative; display: block; height: 46px; overflow: hidden; border-radius: 16px; text-decoration: none; color: var(--ink); }
.hl-peek-row { pointer-events: none; -webkit-mask-image: linear-gradient(#000 10%, transparent 92%); mask-image: linear-gradient(#000 10%, transparent 92%); }
.hl-peek-go { position: absolute; right: 8px; bottom: 6px; display: inline-flex; align-items: center; gap: 2px; padding: 5px 8px 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 650;
  color: var(--accent-text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.hl-peek-go svg { margin: 0; stroke: currentColor; }
.cu-date.hot { background: var(--paper-2); color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--band-poor) 55%, transparent); }
.cu-date.hot span { color: var(--muted); }

/* =====================================================================================================
   Dark mode, one system: neutral near-black surfaces in three levels, hairline borders, depth from a light top edge and a
   deep shadow (never a glow). Green is kept for actions (buttons, the active tab, links), the answer ("use this card"),
   earnings and lit states; big boxes, heroes and headers are graphite, not green gradients. Tune it here.
   ===================================================================================================== */
/* Big boxes that were green (or blue) gradients: graphite with a hairline, white type as before */
:root[data-theme="dark"] :is(.st-invite, .pd-next, .rv-sum, .rep-made, .ct-hero, .ms-hero.good, .lp-hero) { background: var(--hero); box-shadow: var(--rim), inset 0 0 0 1px var(--hairline), var(--lift); }
:root[data-theme="dark"] :is(.st-invite span span, .pd-next span) { color: var(--hero-sub); }
:root[data-theme="dark"] .ms-hero.good::after { display: none; }
:root[data-theme="dark"] :is(.rl-hero, .made-you.mk) { background: var(--surface-2); box-shadow: var(--rim), inset 0 0 0 1px var(--hairline), var(--lift); }
/* Icon tiles: a raised graphite tile with the icon in green, not a glowing green tile */
:root[data-theme="dark"] .pm-wallet { --tint: var(--box-tint); --box-wash: 7%; }
:root[data-theme="dark"] .sh-tip { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hairline); }
:root[data-theme="dark"] :is(.cbc-ic, .sp-av, .sc2-ic, .hub-ic) { background: var(--surface-3); color: var(--accent-text); box-shadow: inset 0 1px 0 var(--lift-edge), inset 0 0 0 1px var(--hairline); }
/* Progress bars: a flat track and a plain fill, no glow */
:root[data-theme="dark"] .meter { background: var(--surface-3); box-shadow: none; }
:root[data-theme="dark"] .meter > i { box-shadow: none; background: var(--bright); }
:root[data-theme="dark"] .meter.hot > i { background: #e0a100; }
:root[data-theme="dark"] .meter.full > i { background: #e0607f; }
:root[data-theme="dark"] .ask-card .ask .ib.go { background: var(--solid); box-shadow: none; }
:root[data-theme="dark"] .hl-peek-go { background: var(--surface-3); }
:root[data-theme="dark"] .cxh-dot.bad { background: #e5676a; }
