/* Reusable components (design v2). Tokens only (var(--…)); logical properties only. */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x clip: a safety net only (owner 26 Nov 12:00); the real causes are fixed where they are */
html { -webkit-text-size-adjust: 100%; background-color: var(--color-page); overflow-x: clip; }
body {
  margin: 0;
  background-color: var(--color-page);
  background-image: var(--dotgrid-image);
  background-size: var(--dotgrid-size);
  color: var(--color-text);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;   /* amounts line up (Inter replaces the mono for numbers) */
  font-size-adjust: from-font;          /* a late font swap keeps the same size (Safari 17+) */
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-family: var(--font-heading); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); }
p { margin: 0; }
a { color: var(--color-link); }
a:hover { color: var(--color-link-hover); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Icon */
.icon {
  inline-size: var(--size-icon); block-size: var(--size-icon); flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: var(--stroke-icon);
  stroke-linecap: round; stroke-linejoin: round;
}
.icon--sm { inline-size: var(--size-icon-sm); block-size: var(--size-icon-sm); }
.icon--tab { inline-size: var(--size-icon-tab); block-size: var(--size-icon-tab); }
[dir="rtl"] .icon--flip { transform: scaleX(-1); }
/* owner 26 Nov (PM job 3): Arabic letters join; tracking (letter-spacing) would pull them apart */
html[lang="ar"] body * { letter-spacing: normal !important; }

/* Test label bar: always visible */
.test-label {
  position: sticky; inset-block-start: 0; z-index: var(--z-label);
  background: var(--label-bg); color: var(--label-text);
  font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-medium);
  text-align: center; padding: var(--space-3) var(--space-8);
  /* owner 26 Nov 16:47 (fix 5): the topmost bar clears the iPhone status bar (viewport-fit=cover) */
  padding-block-start: calc(var(--space-3) + env(safe-area-inset-top, 0px));
}

/* bootcheck.js: shown only when the app could not start (never a blank screen) */
.boot-fail:not([hidden]) { display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  padding: var(--space-8); text-align: center; color: var(--color-text); }

/* Text */
.title {
  font-family: var(--font-heading); font-size: var(--text-6xl); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight); line-height: var(--leading-tight);
}
.title--sm { font-size: var(--text-5xl); }
.section-title { font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.subtitle { font-size: var(--text-md); color: var(--color-text-muted); }
.muted { font-size: var(--text-xs); color: var(--color-text-muted); line-height: var(--leading-normal); }
.body-text { font-size: var(--text-md); line-height: var(--leading-normal); }
.mono { font-family: var(--font-mono); font-size: var(--text-2xs); }
.section-label {
  font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-caps); color: var(--color-text-muted); text-transform: uppercase;
}

/* Logo: KEA + orange dot */
.logo {
  display: inline-flex; align-items: baseline;
  font-family: var(--font-logo); font-weight: var(--logo-weight); font-size: var(--logo-size);
  letter-spacing: var(--tracking-logo); line-height: var(--leading-tight); color: var(--color-text);
  text-decoration: none;
}
.logo__i { color: var(--logo-i); }
.chat-thinking { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
/* Sign-in code (owner 22 Nov): six drawn boxes under one real, transparent input. Solid colours, no blur. */
.otp { display: flex; flex-direction: column; gap: var(--space-3); }
.otp__row { position: relative; }
.otp__boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-3); }
.otp__box {
  block-size: var(--size-otp-box); border-radius: var(--radius-card); border: var(--border-width) solid var(--color-line);
  background: var(--color-surface); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: var(--weight-semibold); color: var(--color-text);
  transition: border-color var(--motion-fast), opacity var(--motion-otp), transform var(--motion-otp);
}
.otp__box--active { border-color: var(--color-accent); box-shadow: 0 0 0 var(--border-width) var(--color-accent); }
.otp__input {
  position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; background: transparent;
  color: transparent; caret-color: transparent; font-size: var(--text-input-min); padding: 0; opacity: 1;
}
/* the orange active box is the focus mark here; the page-wide ring would frame the whole invisible input */
.otp__input:focus, .otp__input:focus-visible { outline: none; box-shadow: none; }
.otp__done {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
  opacity: 0; transform: scale(0.6);
  transition: opacity var(--motion-otp) var(--motion-otp-tick-delay), transform var(--motion-otp) var(--motion-otp-tick-delay);
}
.otp__tick {
  inline-size: var(--size-otp-tick); block-size: var(--size-otp-tick); border-radius: var(--radius-round);
  background: var(--color-positive); fill: none; stroke: var(--color-accent-text); stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round; padding: var(--space-4);
}
.otp__row--ok .otp__box { opacity: 0; transform: translateY(calc(-1 * var(--otp-shift))) scale(0.9); }
.otp__row--ok .otp__box:nth-child(2) { transition-delay: calc(var(--motion-otp-stagger) * 1); }
.otp__row--ok .otp__box:nth-child(3) { transition-delay: calc(var(--motion-otp-stagger) * 2); }
.otp__row--ok .otp__box:nth-child(4) { transition-delay: calc(var(--motion-otp-stagger) * 3); }
.otp__row--ok .otp__box:nth-child(5) { transition-delay: calc(var(--motion-otp-stagger) * 4); }
.otp__row--ok .otp__box:nth-child(6) { transition-delay: calc(var(--motion-otp-stagger) * 5); }
.otp__row--ok .otp__done { opacity: 1; transform: none; }
.otp__row--wrong .otp__boxes { animation: otp-shake var(--motion-shake) ease-in-out; }
@keyframes otp-shake {
  20%, 60% { transform: translateX(calc(-1 * var(--otp-shift))); }
  40%, 80% { transform: translateX(var(--otp-shift)); }
}
@media (prefers-reduced-motion: reduce) {
  .otp__box, .otp__done { transition: none; }
  .otp__row--wrong .otp__boxes { animation: none; }
}
.card.signed-in { display: flex; flex-direction: row; align-items: center; gap: var(--space-5); }
.signed-in .otp__tick { flex-shrink: 0; }
.signin__or { text-align: center; margin: 0; }
/* KEA-LENS-SPEC section 19: the emergency box on an insurance policy */
.emergency-box { border-inline-start: 4px solid var(--color-danger); }
.emergency-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 10px; border-top: 1px solid var(--color-line); }
.emergency-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.emergency-row__label { font-size: .85rem; color: var(--color-text-muted); }
.emergency-row__value { font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.emergency-row__src { font-size: .75rem; }
.emergency-row__acts { display: flex; flex: none; align-items: center; gap: 4px; }
.emergency-sub { font-size: 1rem; margin: 8px 0 0; }
.emergency-steps { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }
/* KEA-LENS-SPEC 31: Add to Apple / Google Wallet on the emergency card */
.wallet-add { display: flex; flex-direction: column; gap: var(--space-3); }
.emergency-missing ul { margin: 0; padding-inline-start: 20px; }
/* KEA-LENS-SPEC section 21: KEAi Monthly */
.monthly-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.monthly-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.monthly-row__what { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.monthly-row__amount { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 600; }
.monthly-total { font-weight: 700; margin: 0; }
.monthly-tips { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }   /* owner 27 Nov: between "Email me a code" and Google */

/* Static KEAi badge (owner 22 Nov): graphite chip, orange "i." mark, no animation */
.keai-badge {
  display: inline-flex; align-items: baseline; justify-content: center; flex-shrink: 0;
  inline-size: var(--size-keai-badge); block-size: var(--size-keai-badge); border-radius: var(--radius-round);
  background: var(--color-text); padding-block-start: var(--space-2); box-sizing: border-box;
  font-family: var(--font-logo); font-weight: var(--logo-weight); font-size: var(--text-md); line-height: 1;
}
.keai-badge__i { color: var(--logo-i); }
.keai-badge__dot { inline-size: var(--size-keai-badge-dot); block-size: var(--size-keai-badge-dot); border-radius: var(--radius-bar);
  background: var(--logo-dot); margin-inline-start: var(--space-1); }
.logo__dot {
  display: inline-block; inline-size: var(--size-logo-dot); block-size: var(--size-logo-dot);
  border-radius: var(--radius-bar); background: var(--logo-dot); margin-inline-start: var(--logo-dot-gap);
}

/* App bar (tab screens): logo on the start side, actions on the end side */
.app-header {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  min-block-size: var(--size-appbar); padding: 0 var(--gutter);
}
/* owner 26 Nov 16:47 (fix 5): when the header is the first thing on screen (no test label), it clears the status bar */
.app > .app-header:first-child, .app-header:first-child { padding-block-start: env(safe-area-inset-top, 0px);
  min-block-size: calc(var(--size-appbar) + env(safe-area-inset-top, 0px)); }
.bell-link { overflow: visible; }
.app-header__actions { display: flex; align-items: center; gap: var(--space-4); }
.text-action {
  border: 0; background: transparent; min-block-size: var(--size-touch); padding: 0 var(--space-2);
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted);
  text-transform: uppercase; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
}

/* Back bar (sub-screens): back arrow, title, small mono meta */
.back-bar {
  display: flex; align-items: center; gap: var(--space-4);
  min-block-size: var(--size-backbar); padding: 0 var(--space-6);
}
.back-bar__back {
  inline-size: var(--size-touch); block-size: var(--size-touch); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--color-text); cursor: pointer; padding: 0; text-decoration: none;
}
.back-bar__text { display: flex; flex-direction: column; min-inline-size: 0; flex: 1; }
.back-bar__title { font-size: var(--text-lg); font-weight: var(--weight-bold); overflow-wrap: anywhere; }
.back-bar__meta {
  font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--color-text-muted); text-transform: uppercase;
}
.back-bar__end { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }

/* Icon button */
.icon-button {
  inline-size: var(--size-touch); block-size: var(--size-touch); border-radius: var(--radius-round);
  border: var(--border-width) solid var(--color-line); background: var(--color-surface); color: var(--color-text);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  text-decoration: none;
}

/* Buttons */
.button {
  min-block-size: var(--size-button); padding: 0 var(--space-10); border-radius: var(--radius-pill);
  border: var(--border-width) solid transparent; cursor: pointer;
  font-size: var(--text-base); font-weight: var(--weight-bold);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3);
  text-decoration: none; transition: background var(--motion-fast);
}
.button--primary { background: var(--color-primary); color: var(--color-primary-text); }
.button--primary:hover { background: var(--color-primary-hover); color: var(--color-primary-text); }
.button--secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-line); }
.button--accent { background: var(--color-accent); color: var(--color-accent-text); }
.button--ghost { background: transparent; color: var(--color-text-muted); font-weight: var(--weight-medium); }
.button--danger { background: var(--color-surface); color: var(--color-danger); border-color: var(--color-line); }
.button--small {
  min-block-size: var(--size-touch); font-size: var(--text-sm); font-weight: var(--weight-semibold);
  padding: 0 var(--space-7);
}
.button--lg { min-block-size: var(--size-button-lg); font-size: var(--text-lg); }
.button--block { inline-size: 100%; }
.button:disabled { opacity: var(--opacity-disabled); cursor: not-allowed; }

/* Segmented: a row of chips, the selected one in ink (Money: Week / Month / Year; sign up / log in) */
.segmented { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.segmented__item {
  min-block-size: var(--size-touch); padding: 0 var(--space-7); border-radius: var(--radius-pill);
  border: var(--border-width) solid var(--color-line); background: var(--chip-bg); color: var(--color-text);
  font-size: var(--text-sm); white-space: nowrap; cursor: pointer;
}
.segmented--fill { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); flex-wrap: nowrap; gap: var(--space-2); }
.segmented--fill .segmented__item { padding: var(--space-2) var(--space-3); white-space: normal; line-height: var(--leading-tight); }
.segmented__item[aria-selected="true"], .segmented__item[aria-pressed="true"] {
  background: var(--chip-selected-bg); color: var(--chip-selected-text);
  border-color: var(--chip-selected-bg); font-weight: var(--weight-semibold);
}

/* Form field */
.field { display: flex; flex-direction: column; gap: var(--space-3); }
.field__label { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.field__hint { font-size: var(--text-xs); color: var(--color-text-muted); }
.field__input {
  min-block-size: var(--size-input); inline-size: 100%; min-inline-size: 0;
  border-radius: var(--radius-card); border: var(--border-width) solid var(--color-line);
  background: var(--color-surface); padding: 0 var(--space-9); font-size: var(--text-base);
}
.field__input:focus { outline: none; border-color: var(--color-line-strong); }
.field__input--code { font-family: var(--font-mono); letter-spacing: var(--tracking-caps-wide); }
select.field__input { appearance: auto; }
.form { display: flex; flex-direction: column; gap: var(--space-7); }

/* Choice cards (radio) and checkbox */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.choice {
  min-block-size: var(--size-input); padding: var(--space-6) var(--space-5); border-radius: var(--radius-card);
  border: var(--border-width) solid var(--card-border); background: var(--card-bg);
  font-size: var(--text-sm); font-weight: var(--weight-bold); cursor: pointer; text-align: center;
}
.choice[aria-checked="true"] { border: var(--border-width-strong) solid var(--card-border-selected); }
.check {
  display: flex; align-items: flex-start; gap: var(--space-5); min-block-size: var(--size-touch);
  font-size: var(--text-md); font-weight: var(--weight-semibold); cursor: pointer; padding-block: var(--space-5);
}
.check__box {
  inline-size: var(--size-icon); block-size: var(--size-icon); margin: var(--space-1) 0 0; flex-shrink: 0;
  accent-color: var(--color-primary);
}

/* Card */
.card {
  border: var(--border-width) solid var(--card-border); border-radius: var(--radius-card);
  padding: var(--space-7); display: flex; flex-direction: column; gap: var(--space-4); background: var(--card-bg);
}
.card--soft { background: var(--color-page); }
.card--selected { border: var(--border-width-strong) solid var(--card-border-selected); }
.card--flush { padding: 0; gap: 0; overflow: hidden; }
.card--hero {
  background: var(--color-primary); color: var(--color-on-ink); border-color: var(--color-primary);
  border-radius: var(--radius-hero); padding: var(--space-10); gap: var(--space-3);
}
.card--note {
  background: var(--color-reward-soft); color: var(--color-reward-deep); border-color: var(--color-reward-soft);
  border-radius: var(--radius-sm); padding: var(--space-5) var(--space-6); font-size: var(--text-sm);
  line-height: var(--leading-normal);
}
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); flex-wrap: wrap; }
.card--flush > .section-label { padding: var(--space-5) var(--space-6) var(--space-3); }
.card--flush > .row-item { padding-inline: var(--space-6); border-block-end: 0; border-block-start: var(--border-width) solid var(--color-line); }

/* Stat tile (Vault: Protected 9 / Due in 30 days 3 / Premiums) */
.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.stat-tile {
  background: var(--card-bg); border: var(--border-width) solid var(--card-border); border-radius: var(--radius-sm);
  padding: var(--space-5); display: flex; flex-direction: column; min-inline-size: 0;
}
.stat-tile__label { font-size: var(--text-2xs); color: var(--color-text-muted); }
.stat-tile__value {
  font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-stat); font-weight: var(--weight-bold);
  white-space: nowrap;   /* an amount never breaks across lines; the size shrinks on narrow phones instead */
}
.stat-tile--due .stat-tile__value { color: var(--color-due); }
.stat-tile--reward .stat-tile__value { color: var(--color-reward); }
.stat-tile--positive .stat-tile__value { color: var(--color-positive); }

/* List rows */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-6);
  min-block-size: var(--size-input); padding-block: var(--space-5);
  border-block-end: var(--border-width) solid var(--color-line); font-size: var(--text-md);
}
.list-row:last-child { border-block-end: 0; }
.list-row__main { display: flex; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.list-row__title { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.list-row__meta { font-size: var(--text-xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.list-row__end { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }

/* Row item (You settings rows: label on start, mono value on end, 46 px tall) */
.row-item {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-6);
  min-block-size: var(--size-touch); padding-block: var(--space-1);
  border-block-end: var(--border-width) solid var(--color-line);
  font-size: var(--text-md); color: var(--color-text); text-decoration: none;
}
button.row-item {
  inline-size: 100%; background: transparent; border-inline: 0; border-block-start: 0;
  padding-inline: 0; text-align: start; cursor: pointer;
}
.row-item__main { display: flex; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.row-item__title { overflow-wrap: anywhere; }
.row-item__meta { font-size: var(--text-xs); color: var(--color-text-muted); }
.row-item__value {
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted);
  text-transform: uppercase; text-align: end; overflow-wrap: anywhere;
}
.row-item__value--positive { color: var(--color-positive); }
.row-item__value--due { color: var(--color-due); }
.row-item__value--reward { color: var(--color-reward); }
.row-item__chevron { color: var(--color-text-muted); }

/* Pills (mono tags): gold reward / green confirmed / amber due */
.pill {
  display: inline-flex; align-items: center; padding: var(--space-1h) var(--space-4); border-radius: var(--radius-tag);
  font-family: var(--font-mono); font-size: var(--text-3xs); font-weight: var(--weight-medium);
  text-transform: uppercase; white-space: nowrap; align-self: flex-start;
  background: var(--color-page); color: var(--color-text-muted);
}
.pill--gold, .pill--accent { background: var(--pill-gold-bg); color: var(--pill-gold-text); }
.pill--green, .pill--positive { background: var(--pill-green-bg); color: var(--pill-green-text); }
.pill--amber { background: var(--pill-amber-bg); color: var(--pill-amber-text); }
.pill--ink { background: var(--color-primary); color: var(--color-primary-text); }
.pill--dashed {
  background: transparent; border: var(--border-width) dashed var(--color-line-dashed);
}

/* Chips (You: "What KEA knows about you"; suggestion buttons) */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3h) var(--space-6); border-radius: var(--radius-pill);
  background: var(--chip-bg); border: var(--border-width) solid var(--color-line); color: var(--color-text);
  font-size: var(--text-sm); text-decoration: none;
}
button.chip, a.chip { min-block-size: var(--size-touch); padding-block: 0; padding-inline: var(--space-7); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--chip-selected-bg); color: var(--chip-selected-text); border-color: var(--chip-selected-bg); }

/* Usage bar (orange fill on a thin track) */
.usage { display: flex; flex-direction: column; gap: var(--space-4); }
.usage__bar {
  display: block; block-size: var(--size-usage); border-radius: var(--radius-xs);
  background: var(--usage-track); overflow: hidden;
}
.usage__fill { display: block; block-size: 100%; inline-size: 0; background: var(--usage-fill); }
.usage--lg .usage__bar { block-size: var(--size-usage-lg); border-radius: var(--radius-bar); }
.usage__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
.usage__title { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.usage__value { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.usage__meta { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted); text-transform: uppercase; }

/* Receipt card: thermal look (printer slot, dashed dividers, mono, barcode, torn edge, stamp) */
.receipt { position: relative; inline-size: 100%; max-inline-size: var(--size-receipt); margin-inline: auto; }
.receipt__slot {
  block-size: var(--size-receipt-slot); margin-inline: calc(-1 * var(--space-5));
  border-radius: var(--radius-tag); background: var(--receipt-slot); box-shadow: var(--shadow-slot);
}
.receipt__paper-wrap { position: relative; margin-block-start: calc(-1 * var(--space-3)); animation: receipt-print var(--motion-print) var(--ease-print) both; }
.receipt__paper {
  background: var(--receipt-bg); color: var(--color-text); box-shadow: var(--shadow-card);
  padding: var(--space-8) var(--space-10) var(--space-6);
  font-family: var(--font-receipt); font-size: var(--text-xs);
}
.receipt__kicker {
  text-align: center; font-size: var(--text-2xs); color: var(--color-text-muted); letter-spacing: var(--tracking-receipt);
  text-transform: uppercase;
}
.receipt__logo { display: flex; justify-content: center; margin-block-start: var(--space-3); }
.receipt__divider { border: 0; border-block-start: var(--border-width-strong) dashed var(--receipt-divider); margin: var(--space-5) 0; }
.receipt__line { display: flex; justify-content: space-between; gap: var(--space-6); padding: var(--space-1h) 0; }
.receipt__line > span:last-child { text-align: end; overflow-wrap: anywhere; }
.receipt__line--strong { font-weight: var(--weight-semibold); }
.receipt__line--reward { color: var(--color-reward); font-weight: var(--weight-semibold); }
.receipt__line--muted { color: var(--color-text-muted); }
.receipt__note {
  font-size: var(--text-2xs); color: var(--color-text-muted); line-height: var(--leading-loose); text-align: center;
}
.receipt__barcode {
  display: block; inline-size: 100%; block-size: var(--size-barcode); margin-block-start: var(--space-5);
  fill: currentColor; color: var(--color-text);
}
.receipt__ref { text-align: center; font-size: var(--text-3xs); color: var(--color-text-muted); }
.receipt__tear { block-size: var(--size-tear); background: var(--receipt-tear-image) 0 0 / var(--receipt-tear-size) repeat-x; }
.receipt__section { position: relative; }
.receipt__stamp-slot { position: absolute; inset-inline-end: 0; inset-block-start: 0; }
.stamp {
  display: inline-block; border: var(--border-width-stamp) solid var(--receipt-stamp); color: var(--receipt-stamp);
  background: var(--receipt-stamp-bg); border-radius: var(--radius-stamp); padding: var(--space-3) var(--space-5);
  font-family: var(--font-receipt); font-size: var(--text-sm); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps-wide); text-transform: uppercase;
  transform: rotate(var(--stamp-angle)); animation: receipt-stamp var(--motion-stamp) var(--motion-stamp-delay) var(--ease-stamp) both;
}
@keyframes receipt-print {
  from { clip-path: inset(0 0 100% 0); transform: translateY(calc(-1 * var(--space-9))); }
  to { clip-path: inset(0 0 0 0); transform: translateY(0); }
}
@keyframes receipt-stamp {
  from { opacity: 0; transform: rotate(var(--stamp-angle-start)) scale(var(--stamp-scale-start)); }
  to { opacity: 1; transform: rotate(var(--stamp-angle)) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .receipt__paper-wrap, .stamp { animation: none; } }

/* Code box (one-time codes with copy) */
.code-box {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-6);
  padding: var(--space-6) var(--space-7); border-radius: var(--radius-card);
  background: var(--card-bg); border: var(--border-width) solid var(--card-border);
}
.code-box__main { display: flex; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.code-box__label {
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted);
  letter-spacing: var(--tracking-caps); text-transform: uppercase;
}
.code-box__value {
  font-family: var(--font-mono); font-size: var(--text-4xl); font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caps-wide); overflow-wrap: anywhere;
}

/* Notices */
.notice { font-size: var(--text-sm); padding: var(--space-5) var(--space-6); border-radius: var(--radius-sm); line-height: var(--leading-normal); }
.notice--error { background: var(--color-danger-soft); color: var(--color-danger); }
.notice--info { background: var(--color-reward-soft); color: var(--color-reward-deep); }

/* Empty state */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-4);
  padding: var(--space-12) var(--space-8); border-radius: var(--radius-card);
  background: var(--card-bg); border: var(--border-width) solid var(--card-border);
}
.empty__icon {
  inline-size: var(--size-icon-tile); block-size: var(--size-icon-tile); border-radius: var(--radius-round);
  background: var(--color-primary); color: var(--color-primary-text);
  display: flex; align-items: center; justify-content: center;
}
.empty__title { font-size: var(--text-lg); font-weight: var(--weight-semibold); font-family: var(--font-heading); letter-spacing: var(--tracking-heading); }
.empty__body { font-size: var(--text-md); color: var(--color-text-muted); }

/* Tab bar: Home · Shop · Money · Vault · You. Active = ink + orange dot. */
.tabbar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: var(--z-tabbar);
  block-size: var(--size-tabbar); margin-inline: auto; max-inline-size: var(--size-app-max);
  background: var(--tabbar-bg); border-block-start: var(--border-width) solid var(--color-line);
  display: flex; justify-content: space-around; align-items: flex-start; padding-block-start: var(--space-4);
}
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-1h);
  min-inline-size: var(--size-tab-min); min-block-size: var(--size-touch); padding: var(--space-3) 0;
  text-decoration: none; color: var(--tabbar-idle);
  font-size: var(--text-2xs); font-weight: var(--weight-medium); letter-spacing: var(--tracking-tab);
}
.tabbar__item:hover { color: var(--tabbar-active); }
.tabbar__item[aria-current="page"] { color: var(--tabbar-active); font-weight: var(--weight-bold); }
.tabbar__dot {
  display: block; inline-size: var(--size-tab-dot); block-size: var(--size-tab-dot);
  border-radius: var(--radius-xs); background: transparent;
}
.tabbar__item[aria-current="page"] .tabbar__dot { background: var(--color-dot); }

/* Bottom sheet (confirm steps: "Confirm and book") */
.sheet-scrim {
  position: fixed; inset: 0; z-index: var(--z-sheet); background: var(--color-scrim);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  inline-size: 100%; max-inline-size: var(--size-app-max); max-block-size: var(--size-sheet-max); overflow-y: auto;
  background: var(--sheet-bg); border-start-start-radius: var(--radius-sheet); border-start-end-radius: var(--radius-sheet);
  padding: var(--space-10) var(--space-9) var(--space-15);
  display: flex; flex-direction: column; gap: var(--space-6);
}
.sheet__title { font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-3xl); font-weight: var(--weight-semibold); }

/* Toast: a notification card at the top */
.toast {
  position: fixed; inset-inline: var(--space-6); inset-block-start: var(--space-6);
  z-index: var(--z-toast); margin-inline: auto; max-inline-size: calc(var(--size-app-max) - 2 * var(--space-6));
  background: var(--toast-bg); color: var(--color-text); border: var(--border-width) solid var(--color-line);
  border-radius: var(--radius-toast); box-shadow: var(--shadow-toast);
  padding: var(--space-6) var(--space-7); font-size: var(--text-sm); line-height: var(--leading-normal);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.toast__kicker { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted); letter-spacing: var(--tracking-caps-sm); text-transform: uppercase; }
.toast__title { font-size: var(--text-base); font-weight: var(--weight-bold); }

/* Avatar (You header) */
.avatar {
  inline-size: var(--size-avatar); block-size: var(--size-avatar); border-radius: var(--radius-round); flex-shrink: 0;
  background: var(--color-primary); color: var(--color-primary-text);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-2xl); font-weight: var(--weight-bold);
}

.confirm-step { display: flex; flex-direction: column; gap: var(--space-4); padding-block: var(--space-4); }

/* KEAi orb (design-v2 01 / 02, owner 21 Nov). Only containers animate, with transform and opacity: the spin
   container turns, the beat container pulses, the glow and ripple fade. The 170 dots sit still inside the spin
   container (positions: generated /css/orb.css). will-change only on the spin container. */
.orb { display: flex; flex-direction: column; align-items: center; gap: var(--orb-caption-gap); --_stage: var(--orb-size-large); }
.orb--small { --_stage: var(--orb-size-small); }
.orb__stage {
  position: relative; inline-size: var(--_stage); block-size: var(--_stage); flex: none;
  perspective: calc(var(--_stage) * var(--orb-perspective-ratio));
  display: flex; align-items: center; justify-content: center;
}
.orb__ripple {
  position: absolute; inline-size: var(--orb-ripple-size); block-size: var(--orb-ripple-size); border-radius: 50%;
  border: var(--border-width) solid var(--orb-ripple-line);
  animation: orb-ripple var(--orb-beat-ms) ease-out infinite;
}
.orb__beat {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  animation: orb-beat var(--orb-beat-ms) ease-in-out infinite;
}
.orb__core {
  position: absolute; inline-size: var(--orb-core-size); block-size: var(--orb-core-size); border-radius: 50%;
  background: radial-gradient(circle, var(--orb-glow-from), var(--orb-glow-to) var(--orb-glow-mid-stop), transparent var(--orb-glow-end-stop));
  animation: orb-glow var(--orb-beat-ms) ease-in-out infinite;
}
.orb__tilt {
  position: relative; inline-size: 0; block-size: 0;
  transform-style: preserve-3d; transform: rotateX(var(--orb-tilt));
  transition: transform var(--orb-tilt-ms) var(--orb-ease);
}
.orb__spin {
  position: absolute; inset-block-start: 0; inset-inline-start: 0; inline-size: 0; block-size: 0;
  transform-style: preserve-3d; animation: orb-spin var(--orb-spin-ms) linear infinite;
  will-change: transform;
}
.orb__dot {
  position: absolute; inset-block-start: calc(var(--orb-dot-size) / -2); inset-inline-start: calc(var(--orb-dot-size) / -2);
  inline-size: var(--orb-dot-size); block-size: var(--orb-dot-size); border-radius: 50%; background: var(--orb-dot-ink);
}
.orb__dot:nth-child(3n) { background: var(--orb-dot-mid); }
.orb__dot:nth-child(5n) { background: var(--orb-dot-light); }
.orb--listening .orb__dot:nth-child(7n) { background: var(--orb-accent); }
/* Small orb (chat header, nudges): two dot rings turning in opposite directions, breathing, with a soft glow. */
.orb__breathe { position: absolute; inset: 0; animation: orb-breathe var(--orb-breathe-ms) ease-in-out infinite; }
.orb__ring { position: absolute; inset: 0; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; }
.orb__ring--a { background-image: url("/img/orb-ring-a.svg"); animation: orb-turn var(--orb-ring-a-ms) linear infinite; }
.orb__ring--b { background-image: url("/img/orb-ring-b.svg"); opacity: var(--orb-ring-b-opacity); animation: orb-turn var(--orb-ring-b-ms) linear infinite reverse; }
.orb__glow {
  position: absolute; inset: var(--orb-small-glow-inset); border-radius: 50%;
  background: radial-gradient(circle, var(--orb-small-glow), transparent var(--orb-glow-end-stop));
  animation: orb-small-glow var(--orb-small-glow-ms) ease-in-out infinite;
}
.orb__caption { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; }
.orb__title { font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-5xl); font-weight: var(--weight-semibold); }
.orb__tag { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--tracking-caps-wide); color: var(--color-text-muted); }
.orb--listening .orb__ripple { animation-duration: var(--orb-beat-listening-ms); border-color: var(--orb-ripple-line-listening); }
.orb--listening .orb__beat, .orb--listening .orb__core { animation-duration: var(--orb-beat-listening-ms); }
.orb--listening .orb__core { inline-size: var(--orb-core-size-listening); block-size: var(--orb-core-size-listening); }
.orb--listening .orb__tilt { transform: rotateX(var(--orb-tilt-listening)); }
.orb--listening .orb__tag { color: var(--color-accent); }
/* Hidden page or orb out of view: everything stops where it is. */
.orb--paused .orb__spin, .orb--paused .orb__beat, .orb--paused .orb__core, .orb--paused .orb__ripple,
.orb--paused .orb__ring, .orb--paused .orb__breathe, .orb--paused .orb__glow { animation-play-state: paused; }
@keyframes orb-spin { to { transform: rotateY(360deg); } }
@keyframes orb-turn { to { transform: rotate(360deg); } }
@keyframes orb-beat {
  0%, 48%, 100% { transform: scale(1); }
  12% { transform: scale(var(--orb-beat-rise)); }
  22% { transform: scale(var(--orb-beat-dip)); }
  32% { transform: scale(var(--orb-beat-echo)); }
}
@keyframes orb-glow {
  0%, 48%, 100% { opacity: var(--orb-glow-rest); }
  12% { opacity: var(--orb-glow-peak); }
  32% { opacity: var(--orb-glow-echo); }
}
@keyframes orb-ripple {
  0% { transform: scale(var(--orb-ripple-from)); opacity: var(--orb-ripple-opacity); }
  100% { transform: scale(var(--orb-ripple-scale)); opacity: 0; }
}
@keyframes orb-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(var(--orb-breathe-scale)); }
}
@keyframes orb-small-glow {
  0%, 100% { opacity: var(--orb-small-glow-rest); }
  50% { opacity: 1; }
}
/* Reduced motion: a still orb. No spin, heartbeat, glow, ripple, ring or tilt animation; states swap at once. */
@media (prefers-reduced-motion: reduce) {
  .orb__spin, .orb__beat, .orb__core, .orb__ripple, .orb__ring, .orb__breathe, .orb__glow { animation: none; }
  .orb__ripple { opacity: 0; }
  .orb__core { opacity: var(--orb-glow-rest); }
  .orb__tilt { transition: none; }
}

.icon--xs { inline-size: var(--size-icon-xs); block-size: var(--size-icon-xs); stroke-width: var(--stroke-icon-bold); }

/* Home LIVE feed card (design-v2 01) */
.feed-card {
  display: flex; align-items: center; gap: var(--space-6); min-block-size: var(--size-touch);
  padding: var(--space-6h) var(--space-7); border-radius: var(--radius-card);
  background: var(--card-bg); border: var(--border-width) solid var(--card-border);
  color: var(--color-text); text-decoration: none;
}
.feed-card--strong { border: var(--border-width-strong) solid var(--card-border-selected); }
.feed-card__tag {
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted);
  min-inline-size: var(--feed-tag-min); flex-shrink: 0;
}
.feed-card__tag--due { color: var(--feed-tag-due); }
.feed-card__tag--positive { color: var(--feed-tag-positive); }
.feed-card__tag--reward { color: var(--color-reward); }
.feed-card__text { flex: 1; min-inline-size: 0; font-size: var(--text-md); line-height: var(--leading-snug); overflow-wrap: anywhere; }
.feed-card__age { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted); flex-shrink: 0; }

/* Chat bubbles */
.bubble {
  padding: var(--space-6) var(--space-7); font-size: var(--text-base); line-height: var(--leading-relaxed);
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.bubble--user {
  align-self: flex-end; max-inline-size: var(--bubble-user-max);
  background: var(--color-primary); color: var(--color-on-ink); line-height: var(--leading-normal);
  border-radius: var(--radius-bubble); border-end-end-radius: var(--radius-bubble-tail);
}
.bubble--kea {
  align-self: flex-start; max-inline-size: var(--bubble-kea-max);
  background: var(--card-bg); border: var(--border-width) solid var(--card-border);
  border-radius: var(--radius-bubble); border-end-start-radius: var(--radius-bubble-tail);
  white-space: normal;   /* owner 26 Nov 16:47: paragraphs, <br> and lists carry the lines */
}
/* Owner 26 Nov 16:47: the daily brief card */
.day-brief { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.day-brief__row + .day-brief__row { border-block-start: var(--border-width) solid var(--color-line); }
.day-brief__link { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: baseline;
  padding-block: var(--space-4); color: var(--color-text); text-decoration: none; }
.day-brief__when { font-size: var(--text-xs); color: var(--color-text-muted); white-space: nowrap; }
.day-brief__text { min-inline-size: 0; overflow-wrap: anywhere; }
.day-brief__amount { font-weight: var(--weight-semibold); white-space: nowrap; }
.bubble__p { margin: 0; }
.bubble__p + .bubble__p, .bubble__p + .bubble__list, .bubble__list + .bubble__p { margin-block-start: var(--space-4); }
.bubble__list { margin: 0; padding-inline-start: var(--space-10); }
.bubble__list li + li { margin-block-start: var(--space-2); }

/* Product comparison (design-v2 02): offer cards, shop buttons, reward line, note */
.offers { display: flex; flex-direction: column; gap: var(--space-4); max-inline-size: var(--offers-max); }
.offer {
  display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) var(--space-7);
  border-radius: var(--radius-card); background: var(--card-bg); border: var(--border-width) solid var(--card-border);
}
.offer--pick { border: var(--border-width-strong) solid var(--card-border-selected); }
.offer__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
.offer__name { font-size: var(--text-md); font-weight: var(--weight-semibold); min-inline-size: 0; overflow-wrap: anywhere; }
.offer__price { font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-price); font-weight: var(--weight-bold); white-space: nowrap; }
.offer__tags { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted); text-transform: uppercase; }
.offer__reward { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-reward); }
.offer__reward--none { font-weight: var(--weight-regular); color: var(--color-text-muted); }
.offers__label, .offers__better { margin: 0; font-size: var(--text-2xs); color: var(--color-text-muted); line-height: var(--leading-note); }

/* Chat cards (KEA-CHAT-CARDS-SPEC): one per reply, server-built values, the static KEAi badge, no motion */
.ui-card { gap: var(--space-4); }
.ui-card__head { display: flex; align-items: center; gap: var(--space-4); }
.ui-card__title { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); min-inline-size: 0; overflow-wrap: anywhere; }
.ui-card__big { font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-price); font-weight: var(--weight-bold); }
.ui-card__meta { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.ui-card__warn { color: var(--color-text); font-weight: var(--weight-semibold); }
.ui-card__was { text-decoration: line-through; }
.ui-card__steps { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.ui-card__step { display: flex; justify-content: space-between; gap: var(--space-4); }
.ui-card__step--done { color: var(--color-text); }
.ui-card__step--current { font-weight: var(--weight-semibold); }
.ui-card__step--upcoming { color: var(--color-text-muted); }
.ui-card__actions { display: flex; gap: var(--space-4); flex-wrap: wrap; align-items: center; }
.offers__shop { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.shop-button {
  min-block-size: var(--size-touch); padding: 0 var(--space-7); border-radius: var(--radius-pill);
  background: transparent; color: var(--color-text); border: var(--border-width) solid var(--color-line);
  font-size: var(--text-sm); font-weight: var(--weight-semibold); cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--space-3);
}
.shop-button--pick { background: var(--color-primary); color: var(--color-primary-text); border-color: var(--color-primary); }
.shop-button:disabled { opacity: var(--opacity-disabled); cursor: progress; }
.reward-line {
  display: flex; gap: var(--space-5); align-items: flex-start; padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-sm); background: var(--color-reward-soft); color: var(--color-reward-deep);
  font-size: var(--text-sm); line-height: var(--leading-normal);
}
.reward-line__plan {
  font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--color-reward);
  letter-spacing: var(--tracking-caps-md); padding-block-start: var(--space-1); white-space: nowrap;
}
.offers__note { font-size: var(--text-2xs); color: var(--color-text-muted); line-height: var(--leading-note); }

/* Confirm card inside the chat */
.chat-card { align-self: flex-start; max-inline-size: var(--bubble-kea-max); }

/* Message bar: +, input, mic / send; solid background so messages scroll under it */
.composer {
  background: var(--composer-bg); padding: var(--space-5) var(--space-8) var(--composer-pad-block-end);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.composer__row { display: flex; gap: var(--space-5); align-items: center; min-inline-size: 0; }
.composer__button {
  inline-size: var(--size-composer-button); block-size: var(--size-composer-button); flex-shrink: 0;
  border-radius: var(--radius-round); border: var(--border-width) solid var(--color-line);
  background: var(--color-surface); color: var(--color-text); padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.composer__button--mic { background: var(--color-primary); color: var(--color-primary-text); border-color: var(--color-primary); }
.composer__button--live { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-text); }
.composer__button--send { background: var(--color-accent); color: var(--color-accent-text); border-color: var(--color-accent); }
.composer__button--send:disabled { opacity: var(--opacity-disabled); cursor: default; }
.composer__field {
  flex: 1; min-inline-size: 0; block-size: var(--size-input); border-radius: var(--radius-pill);
  border: var(--border-width) solid var(--color-line); background: var(--color-surface);
  display: flex; align-items: center; padding: 0 var(--space-9); box-shadow: var(--shadow-sm);
}
.composer__field:focus-within { border-color: var(--color-line-strong); }
.composer__input {
  flex: 1; min-inline-size: 0; border: 0; background: transparent; font-size: var(--text-base);
  outline: none; color: var(--color-text);
}
.composer__input:focus-visible { box-shadow: none; }
.usage-link {
  display: flex; align-items: center; gap: var(--space-5); padding-inline: var(--usage-link-inset);
  min-block-size: var(--size-touch); margin-block: calc(-1 * var(--space-4));
  text-decoration: none; color: var(--color-text-muted);
}
/* owner 26 Nov 12:00: "15 of 100 AI messages used today · Resets at midnight, your time" was one unbreakable line that
   pushed the iPhone page wider than the screen; now it wraps and the bar keeps a small width */
.usage-link__bar { flex: 1 1 var(--space-12); min-inline-size: var(--space-12); }
.usage-link__text { flex: 0 1 auto; min-inline-size: 0; font-family: var(--font-mono); font-size: var(--text-2xs);
  overflow-wrap: anywhere; }

/* A message arriving in the chat */
.msg-in { animation: msg-in var(--motion-msg) var(--ease-out) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(var(--home-msg-shift)); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .msg-in { animation: none; } }
.offer__checked { font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--color-text-muted); letter-spacing: var(--tracking-caps-md); }

/* Shop partners (design-v2 03) and Partner page (06) */
.letter-tile {
  inline-size: var(--size-letter-tile); block-size: var(--size-letter-tile); border-radius: var(--radius-round); flex-shrink: 0;
  background: var(--color-primary); color: var(--color-primary-text);
  font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-weight: var(--weight-bold); font-size: var(--text-xl);
  display: flex; align-items: center; justify-content: center;
}
.letter-tile--row { inline-size: var(--size-letter-tile-row); block-size: var(--size-letter-tile-row); font-size: var(--text-lg); }
.letter-tile--lg { inline-size: var(--size-letter-tile-lg); block-size: var(--size-letter-tile-lg); font-size: var(--text-4xl); }
.partner-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.partner-tile, .partner-row {
  background: var(--card-bg); border: var(--border-width) solid var(--card-border); border-radius: var(--radius-card);
  display: flex; align-items: center; text-decoration: none; color: var(--color-text); min-inline-size: 0;
}
.partner-tile { flex-direction: column; gap: var(--space-3); padding: var(--space-6) var(--space-4); text-align: center; }
.partner-row { gap: var(--space-6); padding: var(--space-6); min-block-size: var(--size-touch); }
.partner-row__main { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.partner-tile__name, .partner-row__name { font-size: var(--text-sm); font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.partner-row__name { font-size: var(--text-md); }
.partner-tag { font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.partner-tag--reward { color: var(--color-reward); }
.partner-row__chevron { color: var(--color-text-muted); flex-shrink: 0; }
.travel-cat { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text-muted); }
.partner-head { display: flex; align-items: center; gap: var(--space-7); }
.partner-head__text { display: flex; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.partner-head__name { font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-5xl); font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.partner-reward__label { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--tracking-caps); color: var(--color-on-ink-label); }
.partner-reward__title { font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-7xl); font-weight: var(--weight-bold); }
.partner-reward__text { font-size: var(--text-sm); color: var(--color-on-ink-muted); line-height: var(--leading-normal); }
.step { display: flex; gap: var(--space-6); align-items: flex-start; }
.step__num {
  inline-size: var(--size-step); block-size: var(--size-step); border-radius: var(--radius-round); flex-shrink: 0;
  background: var(--color-primary); color: var(--color-primary-text);
  font-family: var(--font-mono); font-size: var(--text-xs); display: flex; align-items: center; justify-content: center;
}
.step__text { font-size: var(--text-md); line-height: var(--leading-normal); }
.earns-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.earns-box {
  background: var(--card-bg); border: var(--border-width) solid var(--card-border); border-radius: var(--radius-sm);
  padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3);
}
.earns-box__label { font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--color-positive); }
.earns-box--no .earns-box__label { color: var(--color-danger); }
.earns-box__text { font-size: var(--text-xs); color: var(--color-text-muted); line-height: var(--leading-normal); overflow-wrap: anywhere; }
.cta-bar {
  position: sticky; inset-block-end: 0; margin-inline: calc(-1 * var(--gutter));
  padding: var(--space-7) var(--gutter) calc(var(--space-7) + env(safe-area-inset-bottom)); background: var(--color-page); border-block-start: var(--border-width) solid var(--color-line);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.cta-bar__note { font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--color-text-muted); text-align: center; overflow-wrap: anywhere; }

/* Money (design-v2 04) */
.round-button {
  inline-size: var(--size-touch); block-size: var(--size-touch); border-radius: var(--radius-round); border: 0;
  background: var(--color-primary); color: var(--color-primary-text); font-size: var(--text-2xl);
  line-height: var(--leading-none); cursor: pointer; flex-shrink: 0;
}
.round-button:hover { background: var(--color-primary-hover); }
.money-bar__title { font-family: var(--font-heading); font-size: var(--text-6xl); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); }
.money-spent { display: flex; flex-direction: column; gap: var(--space-3); }
.money-spent__label { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted); }
.money-spent__total { font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--money-total-size); font-weight: var(--weight-bold); line-height: var(--leading-tight); overflow-wrap: anywhere; }
.money-spent .usage__bar { inline-size: var(--size-budget-bar); max-inline-size: 100%; }
.money-spent .text-action { align-self: flex-start; }
.usage--due .usage__fill { background: var(--color-due); }
.cat--shopping { background: var(--chart-shopping); }
.cat--bills { background: var(--chart-bills); }
.cat--groceries { background: var(--chart-groceries); }
.cat--insurance { background: var(--chart-insurance); }
.cat--others { background: var(--chart-others); }
/* Charts (KEA's own SVG): colours only from chart / reward tokens; nothing animates */
.chart, .chart-trend, .chart-trend__months { direction: ltr; }
.chart { display: block; inline-size: 100%; block-size: auto; overflow: visible; }
.chart--donut { inline-size: var(--size-donut); block-size: var(--size-donut); flex-shrink: 0; }
.chart-arc { fill: none; stroke-width: var(--chart-arc-width); }
.chart-arc--shopping { stroke: var(--chart-shopping); }
.chart-arc--bills { stroke: var(--chart-bills); }
.chart-arc--groceries { stroke: var(--chart-groceries); }
.chart-arc--insurance { stroke: var(--chart-insurance); }
.chart-arc--others { stroke: var(--chart-others); }
.chart-budget { display: flex; flex-direction: column; gap: var(--space-3); min-inline-size: 0; }
.chart--budget { block-size: var(--size-chart-budget); inline-size: var(--size-budget-bar); max-inline-size: 100%; border-radius: var(--radius-xs); overflow: hidden; }
.chart-track { fill: var(--color-line); }
.chart-fill--budget { fill: var(--color-due); }
.chart-budget__meta { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted); }
.chart-trend { display: flex; flex-direction: column; gap: var(--space-2); max-inline-size: var(--size-chart-trend-max); }
.chart-baseline { stroke: var(--color-line); stroke-width: var(--size-chart-line); vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke: var(--chart-shopping); stroke-width: var(--size-chart-line); stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-dot { fill: var(--chart-shopping); }
.chart-dot--now { fill: var(--chart-bills); }
.chart-trend__months { display: flex; font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--color-text-muted); text-transform: uppercase; }
.chart-trend__months > span { flex: 1; min-inline-size: 0; text-align: center; }
.chart--rewards { block-size: var(--size-chart-rewards); }
.chart-link { stroke: var(--color-line); stroke-width: var(--size-chart-line); vector-effect: non-scaling-stroke; }
.chart-link--on { stroke: var(--color-reward-mid); }
.chart-node { stroke-width: var(--size-chart-line); vector-effect: non-scaling-stroke; }
.chart-node--pending { fill: var(--color-due); stroke: var(--color-due); }
.chart-node--confirmed { fill: var(--color-positive); stroke: var(--color-positive); }
.chart-node--paid { fill: var(--color-reward); stroke: var(--color-reward); }
.chart-node--empty { fill: transparent; }
.money-spent--chart { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
/* Beside the donut the total never splits: when it does not fit, the whole text block moves under the donut. */
.money-spent--chart .money-spent__text { min-inline-size: auto; }
.money-spent--chart .money-spent__total { white-space: nowrap; }
.money-spent__text { display: flex; flex-direction: column; gap: var(--space-3); min-inline-size: 0; }
.reward-totals__progress { display: block; }
@media (prefers-reduced-motion: reduce) { .chart, .chart * { transition: none; animation: none; } }
.cat-list { display: flex; flex-direction: column; }
.cat-row { display: flex; align-items: center; gap: var(--space-5); min-block-size: var(--size-cat-row); font-size: var(--text-md); }
.cat-row__dot { inline-size: var(--size-legend-dot); block-size: var(--size-legend-dot); border-radius: var(--radius-round); flex-shrink: 0; }
.cat-row__name { flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
.cat-row__pct { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-muted); inline-size: var(--size-cat-pct); flex-shrink: 0; }
/* The amount keeps its natural width on one line ("S$2,725.80"); the name gives way, never the edge. */
.cat-row__value { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--weight-semibold); min-inline-size: var(--size-cat-value); white-space: nowrap; text-align: end; flex-shrink: 0; }
.reward-totals {
  display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) var(--space-7);
  border-radius: var(--radius-card); background: var(--card-bg); border: var(--border-width) solid var(--card-border);
  text-decoration: none; color: var(--color-text);
}
.reward-totals__head { display: flex; justify-content: space-between; gap: var(--space-4); }
.reward-totals__title { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.reward-totals__more { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted); }
.reward-totals__row { display: flex; gap: var(--space-4); }
.reward-totals__item { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.reward-totals__label { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-caps-sm); }
.reward-totals__label--due { color: var(--color-due); }
.reward-totals__label--positive { color: var(--color-positive); }
.reward-totals__label--reward { color: var(--color-reward); }
.reward-totals__value { font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--money-tile-size); font-weight: var(--weight-bold); overflow-wrap: anywhere; }
.reward-totals__note { font-size: var(--text-2xs); color: var(--color-text-muted); }
/* Phone test 21 Nov: total earned, a "what happens next" line under each state, progress to payout */
.reward-totals__earned { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.reward-totals__next { font-size: var(--text-2xs); color: var(--color-text-muted); line-height: var(--leading-snug); }
.reward-totals__to-payout { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text); }
.rewards-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-4); align-items: center;
  min-block-size: var(--size-touch); padding: var(--space-6h) var(--space-7); border-radius: var(--radius-card);
  background: var(--card-bg); border: var(--border-width) solid var(--card-border); color: var(--color-text);
  text-decoration: none;
}
.rewards-card__title { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-reward); letter-spacing: var(--tracking-caps-sm); text-transform: uppercase; }
/* owner 23 Nov: the line wraps to a second line instead of being cut off at "next payout…" */
.rewards-card__line { grid-column: 1; min-inline-size: 0; font-size: var(--text-sm); white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; line-height: var(--leading-snug); }
.rewards-card__chevron { grid-column: 2; grid-row: 1 / span 2; color: var(--color-text-muted); }
.home__rewards:empty { display: none; }
.receipts-earned { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.receipts-earned:empty { display: none; }
.payout-status {
  display: flex; flex-direction: column; align-items: stretch; gap: var(--space-4);
  padding-inline: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted);
}
.payout-status--due .payout-status__text { color: var(--color-due); font-weight: var(--weight-semibold); }
.nudge {
  display: flex; gap: var(--space-6); padding: var(--space-7); border-radius: var(--radius-card);
  background: var(--card-bg); border: var(--border-width) solid var(--card-border);
}
.nudge__orb { flex-shrink: 0; }
.nudge__orb .orb--small { --_stage: var(--orb-size-mini); }
.nudge__main { display: flex; flex-direction: column; gap: var(--space-3); min-inline-size: 0; }
.nudge__text { font-size: var(--text-md); line-height: var(--leading-normal); }
.nudge__action {
  align-self: flex-start; min-block-size: var(--size-touch); padding: 0; border: 0; background: transparent;
  font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-link); text-decoration: underline; cursor: pointer;
}
.nudge__action:disabled { opacity: var(--opacity-disabled); }
.due-list { border-radius: var(--radius-card); background: var(--card-bg); border: var(--border-width) solid var(--card-border); overflow: hidden; }
.due-list__label {
  padding: var(--space-5) var(--space-6) var(--space-3); font-family: var(--font-mono); font-size: var(--text-2xs);
  letter-spacing: var(--tracking-caps); color: var(--color-text-muted);
}
.due-row { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-5) var(--space-6); border-block-start: var(--border-width) solid var(--color-line); }
.due-row__name { flex: 1; min-inline-size: 0; font-size: var(--text-md); overflow-wrap: anywhere; }
.due-row__date { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-muted); flex-shrink: 0; }
.due-row__amount { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--weight-semibold); min-inline-size: var(--size-due-value); text-align: end; flex-shrink: 0; white-space: nowrap; }

/* Receipts (design-v2 08) */
.paid-pill {
  display: inline-flex; align-items: center; min-block-size: var(--size-touch); padding: 0 var(--space-6);
  border-radius: var(--radius-pill); background: var(--paid-pill-bg); color: var(--paid-pill-text);
  font-size: var(--text-sm); font-weight: var(--weight-bold); text-decoration: none; white-space: nowrap;
}
.paid-pill:hover { color: var(--paid-pill-text); }
.filter-row { display: flex; gap: var(--space-3); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.filter-row > .chip { flex-shrink: 0; }
.title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; }
.title-row__link {
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted);
  min-block-size: var(--size-touch); display: inline-flex; align-items: center;
}
.receipt-month { display: flex; flex-direction: column; }
/* Money parts (owner 22 Nov): Spent, Received, On the way */
.money__part-title { margin: 0; font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.received-list { display: flex; flex-direction: column; border-block-start: var(--border-width) solid var(--color-line); }
.received-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding-block: var(--space-5); border-block-end: var(--border-width) solid var(--color-line); color: inherit; text-decoration: none; }
.received-row__main { display: flex; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.received-row__title { font-weight: var(--weight-semibold); }
.received-row__meta { font-size: var(--text-sm); color: var(--color-text-muted); overflow-wrap: anywhere; }
.received-row__amount { font-family: var(--font-mono); color: var(--color-positive); white-space: nowrap; }
.receipt-month__head {
  display: flex; align-items: center; justify-content: space-between; min-block-size: var(--size-touch);
  font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--tracking-caps);
  color: var(--color-text-muted); text-transform: uppercase; cursor: pointer; list-style: none;
}
.receipt-month__head::-webkit-details-marker { display: none; }
.receipt-month__head::after { content: '›'; transition: transform var(--motion-fast); }
.receipt-month[open] > .receipt-month__head::after { transform: rotate(90deg); }
.receipt-list { display: flex; flex-direction: column; }
.receipt-row {
  display: flex; gap: var(--space-6); align-items: center; padding: var(--space-6) 0;
  border-block-end: var(--border-width) solid var(--color-line); text-decoration: none; color: var(--color-text);
}
.receipt-row__tile {
  inline-size: var(--size-receipt-tile-inline); block-size: var(--size-receipt-tile-block); flex-shrink: 0;
  border-radius: var(--radius-stamp); background: var(--color-receipt); border: var(--border-width) solid var(--color-line);
  font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
}
.commission-note { display: block; font-size: var(--text-xs); color: var(--color-text-muted); }
/* never recoloured or cropped; owner 26 Nov: a 40 px rounded tile with a 1 px Stone border, like the website's
   "Brands on KEAi" */
.partner-logo { inline-size: 40px; block-size: 40px; flex-shrink: 0; object-fit: contain; border-radius: var(--radius-tag);
  border: var(--border-width) solid var(--palette-line); background: var(--palette-card); }
.partner-row__brand { font-size: var(--text-xs); color: var(--color-text-muted); }
.receipt-row__tile--photo { object-fit: cover; padding: 0; }
.receipt-row__tile--doc { color: var(--color-text-muted); }
.receipt-row__main { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: var(--space-1h); }
.receipt-row__title { font-size: var(--text-md); font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.receipt-row__meta { font-size: var(--text-xs); color: var(--color-text-muted); }
.receipt-row__detail { font-size: var(--text-2xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.receipt-row__end { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1h); flex-shrink: 0; }
.receipt-row__amount { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.receipt-row__amount--muted { color: var(--color-text-muted); }
.receipt-row__amount--reward { color: var(--color-reward); }
.receipt-row__state { font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--color-text-muted); }
.receipt-row__state--due { color: var(--color-due); }
.receipt-row__state--reward { color: var(--color-reward); }
.receipt-row__state--positive { color: var(--color-positive); }
.footnote {
  padding: var(--space-6) var(--space-7); border-radius: var(--radius-sm); background: var(--card-bg);
  border: var(--border-width) solid var(--card-border); font-size: var(--text-xs); color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* Reward receipt (design-v2 07) */
.receipt--printed .receipt__paper-wrap, .receipt--printed .stamp { animation: none; }
.receipt__line--due { color: var(--color-due); font-weight: var(--weight-semibold); }
.receipt__line--positive { color: var(--color-positive); font-weight: var(--weight-semibold); }
.vault-row {
  display: flex; align-items: center; gap: var(--space-5); padding: var(--space-6) var(--space-7);
  border-radius: var(--radius-card); background: var(--card-bg); border: var(--border-width) solid var(--card-border);
  text-decoration: none; color: var(--color-text);
}
.vault-row__icon { color: var(--color-positive); display: flex; }
.vault-row__main { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.vault-row__title { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.vault-row__meta { font-size: var(--text-xs); color: var(--color-text-muted); }
.vault-row__chevron { color: var(--color-text-muted); font-size: var(--text-xl); }
.receipt-actions { display: flex; gap: var(--space-5); justify-content: center; flex-wrap: wrap; }
.button--pill {
  min-block-size: var(--size-button-md); padding: 0 var(--space-8); border-radius: var(--radius-pill);
  font-size: var(--text-md); text-decoration: none; display: inline-flex; align-items: center;
}

/* Logo, large (Upgrade 14) */
.logo--lg { font-size: var(--logo-size-lg); }
.logo--lg .logo__dot { inline-size: var(--size-logo-dot-lg); block-size: var(--size-logo-dot-lg); border-radius: var(--radius-round); margin-inline-start: var(--logo-dot-gap-lg); }

/* You (design-v2 05): profile head, plan cards, gold nudge link */
.profile-head { display: flex; align-items: center; gap: var(--space-7); }
.profile-head__text { display: flex; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.profile-head__name {
  margin: 0; font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-4xl); font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
}
.profile-head__meta { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted); }
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.plan-card {
  display: flex; flex-direction: column; gap: var(--space-2); min-inline-size: 0;
  padding: var(--space-6) var(--space-5); border-radius: var(--radius-card);
  border: var(--border-width) solid var(--plan-card-border); background: var(--card-bg);
  color: var(--color-text); text-align: start; font: inherit;
}
button.plan-card { cursor: pointer; }
.plan-card--current { border: var(--border-width-strong) solid var(--plan-card-current-border); }
.plan-card__name { font-size: var(--text-sm); font-weight: var(--weight-bold); }
@media (max-width: 359px) { .plan-card { padding-inline: var(--space-3); } } /* 320 px: "Maintenance", "S$[PRICE]/MO" fit */
.plan-card__feature {
  font-size: var(--text-2xs); line-height: var(--leading-snug); color: var(--color-text-muted); overflow-wrap: break-word;
}
.plan-card__foot {
  font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--color-text-muted);
  margin-block-start: var(--space-1); overflow-wrap: break-word;
}
.plan-card__foot--current { color: var(--plan-current-text); }
.nudge-link {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-5) var(--space-6); border-radius: var(--radius-sm); min-block-size: var(--size-touch);
  background: var(--color-reward-soft); color: var(--color-reward-deep); text-decoration: none; font-size: var(--text-sm);
  line-height: var(--leading-snug);
}
.nudge-link:hover { color: var(--color-reward-deep); }
.nudge-link__more { font-weight: var(--weight-bold); white-space: nowrap; }

/* Gold note: a sentence on soft gold (tracker "On Premium …"; Upgrade nudge = --center) */
.gold-note {
  background: var(--color-reward-soft); color: var(--color-reward-deep); border-radius: var(--radius-card);
  padding: var(--space-6) var(--space-7); font-size: var(--text-sm); line-height: var(--leading-normal);
}
.gold-note--center { border-radius: var(--radius-sm); padding: var(--space-5) var(--space-7); font-size: var(--text-md); text-align: center; }

/* Upgrade (14): Premium | Pro switch, ticked features, billing options, inert footer words */
.pill-tabs {
  /* owner 25 Nov (website Part C): Free, Premium and Pro side by side, one row */
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-3); padding: var(--space-2);
  background: var(--card-bg); border: var(--border-width) solid var(--color-line); border-radius: var(--radius-hero);
}
.pill-tabs__item {
  min-block-size: var(--size-plan-tab); border-radius: var(--radius-option); border: 0; background: transparent;
  color: var(--color-text); font: inherit; font-size: var(--text-md); font-weight: var(--weight-semibold); cursor: pointer;
}
.pill-tabs__item[aria-pressed="true"] { background: var(--color-primary); color: var(--color-primary-text); }
.feature-list { list-style: none; margin: 0; padding: var(--space-1) var(--space-2); display: flex; flex-direction: column; gap: var(--space-4); }
.feature-list__item { display: flex; gap: var(--space-5); align-items: center; font-size: var(--text-base); }
.feature-list__tick { color: var(--color-positive); display: flex; flex-shrink: 0; }
.feature-list__tick .icon { stroke-width: var(--stroke-icon-bold); }
.bill-option {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  inline-size: 100%; padding: var(--space-7) var(--space-8); border-radius: var(--radius-option);
  border: var(--border-width) solid var(--color-line); background: var(--card-bg); color: var(--color-text);
  font: inherit; text-align: start; cursor: pointer;
}
.bill-option[aria-pressed="true"] { border: var(--border-width-stamp) solid var(--color-line-strong); }
.bill-option__badge {
  position: absolute; inset-block-start: calc(-1 * var(--space-5)); inset-inline-end: var(--space-7);
  font-family: var(--font-mono); font-size: var(--text-3xs); background: var(--color-primary); color: var(--color-primary-text);
  padding: var(--space-1h) var(--space-4); border-radius: var(--radius-tag);
}
.bill-option__main { display: flex; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.bill-option__title { font-size: var(--text-base); font-weight: var(--weight-bold); }
.bill-option__price, .bill-option__end { font-size: var(--text-xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.bill-option__end { font-size: var(--text-sm); text-align: end; }
.foot-links { display: flex; justify-content: center; gap: var(--space-11); margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }

/* Reward tracker (13): ink hero, steps */
.reward-hero {
  background: var(--color-primary); color: var(--color-on-ink); border-radius: var(--radius-hero);
  padding: var(--space-10); display: flex; flex-direction: column; gap: var(--space-3);
}
.reward-hero__label {
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-on-ink-label); letter-spacing: var(--tracking-caps);
}
.reward-hero__value { font-family: var(--font-heading); letter-spacing: var(--tracking-heading); font-size: var(--text-hero); font-weight: var(--weight-bold); }
.reward-hero__text { font-size: var(--text-sm); color: var(--color-on-ink-muted); line-height: var(--leading-normal); }
.tracker {
  list-style: none; margin: 0; padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-7);
  background: var(--card-bg); border: var(--border-width) solid var(--card-border); border-radius: var(--radius-option);
}
.tracker__step { display: flex; gap: var(--space-6); align-items: flex-start; --_mark: var(--step-upcoming); }
.tracker__step--done { --_mark: var(--step-done); }
.tracker__step--current { --_mark: var(--step-current); }
.tracker__step--declined { --_mark: var(--step-declined); }
.tracker__mark {
  inline-size: var(--size-step-mark); block-size: var(--size-step-mark); border-radius: var(--radius-round); flex-shrink: 0;
  border: var(--border-width-strong) solid var(--_mark); color: var(--_mark);
  display: flex; align-items: center; justify-content: center; font-size: var(--text-xs);
}
.tracker__text { display: flex; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.tracker__title { font-size: var(--text-md); font-weight: var(--weight-semibold); color: var(--color-text); overflow-wrap: anywhere; }
.tracker__step--upcoming .tracker__title { color: var(--color-text-muted); }
.tracker__note { font-size: var(--text-xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.tracker__step--declined .tracker__note { color: var(--step-declined); }

/* Bell and alerts (Task V10) */
.bell-link { position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-inline-size: var(--size-touch); min-block-size: var(--size-touch); color: var(--color-text); }
.bell-link__badge { position: absolute; inset-block-start: var(--space-3); inset-inline-end: var(--space-2);
  min-inline-size: var(--size-badge); block-size: var(--size-badge); padding: 0 var(--space-1h); border-radius: var(--radius-round);
  background: var(--color-accent); color: var(--color-on-accent); font-size: var(--text-3xs); font-weight: var(--weight-bold);
  display: flex; align-items: center; justify-content: center; }
.bell-link__badge:empty { display: none; }
.bell__list { display: flex; flex-direction: column; gap: var(--space-3); }
.bell-row { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: start; text-align: start;
  padding: var(--space-6) var(--space-7); border-radius: var(--radius-card); background: var(--card-bg);
  border: var(--border-width) solid var(--card-border); color: var(--color-text); font: inherit; inline-size: 100%; }
.bell-row__dot { inline-size: var(--size-legend-dot); block-size: var(--size-legend-dot); border-radius: var(--radius-round);
  margin-block-start: var(--space-3); background: transparent; }
.bell-row--unread .bell-row__dot { background: var(--color-accent); }
.bell-row--urgent { border-color: var(--card-border-selected); }
.bell-row__main { display: flex; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.bell-row__title { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.bell-row__body { font-size: var(--text-sm); color: var(--color-text-muted); overflow-wrap: anywhere; }
.bell-row__age { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted); }
.bell-row__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-inline-start: var(--space-6); margin-block-start: calc(var(--space-2) * -1); }
.push-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6) var(--space-7);
  border-radius: var(--radius-card); background: var(--card-bg); border: var(--border-width-strong) solid var(--card-border-selected); }
.push-card__title { font-weight: var(--weight-semibold); }
.push-card__body { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.push-card__actions { display: flex; gap: var(--space-5); align-items: center; }
.home__push:empty { display: none; }

/* Vault (design-v2 09, Task V11) */
.vault-list { border-radius: var(--radius-card); background: var(--card-bg); border: var(--border-width) solid var(--card-border); overflow: hidden; }
.vault-list__label { padding: var(--space-5) var(--space-6) var(--space-4); font-family: var(--font-mono); font-size: var(--text-2xs);
  letter-spacing: var(--tracking-caps-sm); color: var(--color-text-muted); }
.vault-list__empty { margin: 0; padding: var(--space-5) var(--space-6); border-block-start: var(--border-width) solid var(--color-line);
  font-size: var(--text-sm); color: var(--color-text-muted); }
.vault-entry { display: flex; gap: var(--space-5); align-items: flex-start; padding: var(--space-5h) var(--space-6);
  border-block-start: var(--border-width) solid var(--color-line); color: var(--color-text); text-decoration: none; }
.vault-entry__dot { inline-size: var(--size-legend-dot); block-size: var(--size-legend-dot); border-radius: var(--radius-round);
  background: var(--color-due); margin-block-start: var(--space-3); flex-shrink: 0; }
.vault-entry__main { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.vault-entry__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.vault-entry__title { font-size: var(--text-md); font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.vault-entry__meta { font-size: var(--text-xs); color: var(--color-text-muted); }
.vault-entry__value { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--weight-semibold); white-space: nowrap; }
.vault-entry__chevron { color: var(--color-text-muted); }
.vault-entry__tag { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-caps-sm); }
.vault-entry__tag--positive { color: var(--color-positive); }
.vault-entry__tag--due { color: var(--color-due); }
.vault-entry__tag--muted { color: var(--color-text-muted); }
.vault-limit { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-card); background: var(--color-reward-soft); color: var(--color-text); text-decoration: none; font-size: var(--text-sm); }
.vault-limit__more { font-weight: var(--weight-semibold); white-space: nowrap; }
.fact-list { margin: 0; display: flex; flex-direction: column; border-radius: var(--radius-card); background: var(--card-bg);
  border: var(--border-width) solid var(--card-border); }
.fact-list__row { display: flex; justify-content: space-between; gap: var(--space-5); padding: var(--space-5) var(--space-6);
  border-block-start: var(--border-width) solid var(--color-line); }
.fact-list__row:first-child { border-block-start: 0; }
.fact-list__label { color: var(--color-text-muted); font-size: var(--text-sm); }
.fact-list__value { margin: 0; text-align: end; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1);
  font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.title-block { display: flex; flex-direction: column; gap: var(--space-1); }
.warranty-card { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) var(--space-7);
  border-radius: var(--radius-card); background: var(--card-bg); border: var(--border-width) solid var(--card-border);
  color: var(--color-text); text-decoration: none; }
.warranty-card__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
.warranty-card__title { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.warranty-card__bar { display: block; inline-size: 100%; block-size: var(--size-bar); }
.warranty-card__track { fill: var(--color-line); }
.warranty-card__fill { fill: var(--color-text); }
.warranty-card__meta { font-size: var(--text-xs); color: var(--color-text-muted); }

/* Stage 4: "Add your documents" (Home card, the "+" sheet, Vault "+ Add") */
.doc-card { gap: var(--space-4); }
.doc-card__title { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); }
.doc-card__text { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); line-height: var(--leading-snug); }
.doc-buttons { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.doc-buttons .button { flex: 1 1 8rem; }

/* Payout methods in You (owner 22 Nov C/C2) */
.pay-method { padding-block: var(--space-4); border-block-end: var(--border-width) solid var(--color-line); }
.pay-method__name { font-weight: var(--weight-semibold); }
.pay-method__state { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-text-muted); }

/* Owner 24 Nov: a document in chat — the photo (first hour) or a PDF icon, then "Moved to your Vault" */
.doc-bubble { display: flex; flex-direction: column; gap: var(--space-2); }
.doc-bubble__thumb { inline-size: 160px; max-inline-size: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-tag); }
.doc-bubble__icon { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--weight-semibold); }
.doc-moved { display: flex; flex-direction: column; gap: var(--space-2); }
.doc-moved__head { display: flex; align-items: center; gap: var(--space-2); font-weight: var(--weight-semibold); margin: 0; }
.doc-moved__label { margin: 0; }

/* Owner 24 Nov: the wallet-style Vault. Section colours: DESIGN.md › Vault sections (soft tiles only). */
.vault-entry__tag--danger { color: var(--color-danger); }
.vault-search { display: flex; align-items: center; gap: var(--space-4); padding-inline: var(--space-6);
  min-block-size: 44px; background: var(--color-surface); border: var(--border-width) solid var(--color-line);
  border-radius: var(--radius-pill); }
.vault-search__input { flex: 1; min-inline-size: 0; border: 0; background: transparent; font: inherit; color: var(--color-text);
  min-block-size: 44px; }
.vault-search__input:focus { outline: none; }
.vault-search:focus-within { outline: 2px solid var(--color-line-strong); outline-offset: 2px; }
.wallet-card { display: flex; align-items: center; gap: var(--space-6); padding: var(--space-8) var(--space-7);
  min-block-size: 88px; border-radius: var(--radius-card); border: var(--border-width) solid var(--color-line);
  color: var(--color-text); text-decoration: none; background: var(--color-surface); }
.wallet-card--warranty { background: var(--palette-tile-sage); }
.wallet-card--insurance { background: var(--palette-tile-stone); }
.wallet-card--bills { background: var(--palette-tile-rose); }
.wallet-card--equipment { background: var(--palette-white); }
.wallet-card__icon { display: inline-flex; inline-size: 44px; block-size: 44px; align-items: center; justify-content: center;
  border-radius: var(--radius-round); background: var(--color-surface); flex-shrink: 0; }
.wallet-card__main { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.wallet-card__title { font-weight: var(--weight-semibold); }
.wallet-card__next, .wallet-card__count { font-size: var(--text-sm); color: var(--color-text-muted); }
.vault-card { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-6);
  border-radius: var(--radius-card); border: var(--border-width) solid var(--color-line); background: var(--color-surface);
  color: var(--color-text); text-decoration: none; min-block-size: 64px; }
.vault-card__thumb { inline-size: 44px; block-size: 44px; border-radius: var(--radius-tag); object-fit: cover; flex-shrink: 0; }
.vault-card__thumb--none { display: inline-flex; align-items: center; justify-content: center; background: var(--palette-tile-stone); }
.vault-card--warranty .vault-card__thumb--none { background: var(--palette-tile-sage); }
.vault-card--bills .vault-card__thumb--none { background: var(--palette-tile-rose); }
.vault-card__main { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.vault-card__name { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.vault-card__meta { font-size: var(--text-sm); color: var(--color-text-muted); }
.vault-card__side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); flex-shrink: 0; }
.vault-card__amount { font-weight: var(--weight-semibold); }
.vault-sort { display: inline-flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
.vault-sort__select { font: inherit; color: var(--color-text); background: var(--color-surface); min-block-size: 44px;
  border: var(--border-width) solid var(--color-line); border-radius: var(--radius-tag); padding-inline: var(--space-4); }
/* DESIGN.md §7: cards rise once (opacity + 12px, 0.45s, ease-out), at most 3 staggered 60ms apart; text never
   animates on its own; nothing at all with reduced motion. Only opacity and transform. */
@keyframes vault-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.vault-rise > * { animation: vault-rise .35s var(--ease-out) both; }
.vault-rise > :nth-child(2) { animation-delay: 60ms; }
.vault-rise > :nth-child(n+3) { animation-delay: 120ms; }
@media (prefers-reduced-motion: reduce) { .vault-rise > * { animation: none; } }
.banner { position: fixed; inset-inline: var(--space-6); inset-block-start: calc(env(safe-area-inset-top, 0px) + var(--space-6));
  z-index: var(--z-toast); margin-inline: auto; max-inline-size: calc(var(--size-app-max) - 2 * var(--space-6));
  background: var(--toast-bg); color: var(--color-text); border: var(--border-width) solid var(--color-line);
  border-radius: var(--radius-toast); box-shadow: var(--shadow-toast); padding: var(--space-6) var(--space-7);
  font-weight: var(--weight-semibold); text-decoration: none; min-block-size: 44px; display: flex; align-items: center; }

/* Owner 24 Nov (second pass): the Vault as a Wallet — an overlapping stack of cards, each showing only its top strip
   (section colour edge, monogram, name, one key chip). DESIGN.md › Vault sections; motion §7 (cards only, 350 ms). */
.wallet-pass--warranty { --pass-bg: var(--palette-tile-sage); --pass-edge: var(--palette-green); }
.wallet-pass--insurance { --pass-bg: var(--palette-tile-stone); --pass-edge: var(--palette-edge-insurance); }
.wallet-pass--bills { --pass-bg: var(--palette-tile-rose); --pass-edge: var(--palette-rose); }   /* orange/amber: urgency only */
.wallet-pass--loans { --pass-bg: var(--palette-tile-mauve); --pass-edge: var(--palette-plum); }
.wallet-pass--cards { --pass-bg: var(--palette-tile-olive); --pass-edge: var(--palette-olive); }
.wallet-pass--equipment { --pass-bg: var(--palette-white); --pass-edge: var(--palette-line); }
.wallet-stack, .vault-attention__list { list-style: none; margin: 0; padding: 0; }
.wallet-stack { display: flex; flex-direction: column; }
.wallet-stack > .wallet-stack__item + .wallet-stack__item { margin-block-start: -28px; }   /* overlap: only the top strip shows */
.wallet-pass { position: relative; display: flex; align-items: flex-start; gap: var(--space-6); inline-size: 100%;
  min-block-size: 100px; padding: var(--space-6) var(--space-7) var(--space-7) var(--space-8); text-align: start;
  font: inherit; color: var(--color-text); background: var(--pass-bg, var(--palette-white));
  border: var(--border-width) solid var(--color-line); border-inline-start: 6px solid var(--pass-edge, var(--palette-stone));
  border-radius: var(--radius-card); box-shadow: 0 -6px 18px var(--palette-ink-06); cursor: pointer;
  -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.wallet-pass:focus-visible { outline: 2px solid var(--color-text); outline-offset: -4px; }
.vault-attention__list { display: flex; flex-direction: column; gap: var(--space-4); }
.vault-attention__list .wallet-pass { min-block-size: 0; box-shadow: none; }
.wallet-pass__mono, .vault-full__face .wallet-pass__mono { display: inline-flex; align-items: center; justify-content: center;
  inline-size: 36px; block-size: 36px; flex-shrink: 0; border-radius: 50%; background: var(--palette-ink-06);
  font-weight: var(--weight-semibold); font-size: var(--text-sm); letter-spacing: .02em; }
.wallet-pass__text { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.wallet-pass__name { font-weight: var(--weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-pass__chip { font-size: var(--text-sm); color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
/* owner 25 Nov (KEA-APP-PALETTE-SPEC.md): orange no longer means urgency. Within 7 days = Due soon (amber); within 2 days
   or overdue = Urgent (red); always with the words ("Due tomorrow", "Overdue"), never colour alone. */
.wallet-pass__chip.is-near, .vault-full__rel.is-near { color: var(--color-due); font-weight: var(--weight-semibold); }
.wallet-pass__chip.is-urgent, .vault-full__rel.is-urgent { color: var(--color-danger); }
.wallet-stack.is-leaving > li:not(.is-lifted) { transform: translateY(60vh); opacity: 0;
  transition: transform .35s var(--ease-out), opacity .35s var(--ease-out); }
.wallet-stack > li.is-lifted, .vault-attention__list > li.is-lifted { visibility: hidden; }
.wallet-ghost { position: fixed; inset: 0; z-index: var(--z-toast); transform-origin: 0 0; pointer-events: none;
  background: var(--pass-bg); will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .wallet-stack.is-leaving > li:not(.is-lifted) { transition: none; }
  .wallet-ghost { display: none; }
}
.vault-filters { display: flex; gap: var(--space-4); overflow-x: auto; scrollbar-width: none; }
.vault-filter { flex-shrink: 0; min-block-size: 36px; padding: 0 var(--space-7); border-radius: 999px; font: inherit;
  font-size: var(--text-sm); color: var(--color-text); background: var(--palette-card);
  border: var(--border-width) solid var(--color-line); cursor: pointer; }
.vault-filter[aria-pressed="true"] { background: var(--palette-ink); color: var(--palette-white); border-color: var(--palette-ink); }
.vault-full__face { display: flex; align-items: center; gap: var(--space-7); min-block-size: 140px;
  padding: var(--space-10) var(--space-8); background: var(--pass-bg); border-radius: var(--radius-card);
  border-inline-start: 6px solid var(--pass-edge); touch-action: pan-x; }
.vault-full__name { margin: 0; font-size: var(--text-xl); overflow-wrap: anywhere; }
.vault-full__name:focus { outline: none; }
.vault-full__provider { margin: 0; color: var(--color-text-muted); }
.vault-full__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.vault-full__rows { margin: 0; display: flex; flex-direction: column; gap: var(--space-5); }
.vault-full__row { display: flex; justify-content: space-between; gap: var(--space-6); }
.vault-full__label { flex-shrink: 0; max-inline-size: 45%; color: var(--color-text-muted); }
.vault-full__value { margin: 0; text-align: end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-4);
  overflow-wrap: anywhere; }
.vault-full__rel { color: var(--color-text-muted); }
.vault-paid { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }
.vault-paid__state { font-weight: var(--weight-semibold); }
.vault-paid__state.is-paid { color: var(--palette-green); }
/* Orb Live (owner 25 Nov, KEA-ORB-LIVE-SPEC.md): the canvas orb. Its size changes by scale only (transform); the
   box's height follows its size step. Reduced motion: no resize animation (the engine itself stays still). */
/* the 340 px canvas on a 320 px phone: the sides are cut, never the page widened */
.orb-live { position: relative; display: flex; justify-content: center; block-size: var(--orb-live-h-home);
  max-inline-size: 100%; overflow-x: clip; }
.orb-live[data-size="chat"] { block-size: var(--orb-live-h-chat); }
.orb-live[data-size="react"] { block-size: var(--orb-live-h-react); }
.orb-live[data-size="big"] { block-size: var(--orb-live-h-big); }
.orb-live__canvas { flex: none; inline-size: var(--orb-live-size); block-size: var(--orb-live-size); transform-origin: 50% 0;
  touch-action: none; }
.orb-live[data-size="chat"] .orb-live__canvas { transform: scale(var(--orb-live-scale-chat)); }
.orb-live[data-size="react"] .orb-live__canvas { transform: scale(var(--orb-live-scale-react)); }
.orb-live[data-size="big"] .orb-live__canvas { transform: scale(var(--orb-live-scale-big)); }
@media (prefers-reduced-motion: no-preference) {
  .orb-live__canvas { transition: transform var(--orb-live-resize-ms) var(--ease-out); }
}

/* Orb Live Part 3 (owner 25 Nov): the reminder card in chat — what, when, a live countdown, Cancel; "now" when it rings */
.remcard { display: flex; flex-direction: row; align-items: center; gap: var(--space-6); background: var(--palette-amber-soft);
  border: var(--border-width) solid var(--palette-line); max-inline-size: 90%; }
.remcard__ic { font-size: var(--text-3xl); flex: none; }
.remcard__body { min-inline-size: 0; }
.remcard p { margin: 0; }
.remcard__t { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.remcard__m { font-size: var(--text-sm); color: var(--color-text-muted); }
.remcard__left { color: var(--palette-amber); font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); }
.remcard__x { margin-inline-start: auto; flex: none; font: inherit; font-size: var(--text-xs); color: var(--color-text-muted);
  background: var(--palette-card); border: var(--border-width) solid var(--palette-line); border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-5); cursor: pointer; }
.remcard.is-ring { border-color: var(--palette-orange); box-shadow: 0 0 0 3px var(--palette-orange-28); }
.remcard.is-off { opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .remcard.is-ring .remcard__ic { animation: remcard-ring .5s ease-in-out 4; }
}
@keyframes remcard-ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }

/* Coupon partner (owner 25 Nov, noon): the code and noon's own offer text */
.coupon-card__head { margin: 0; font-weight: var(--weight-bold); }

/* Loans & finance (owner 25 Nov): progress, the one hint from this loan's numbers, the fixed line */
.loan-progress { margin: 0; font-weight: var(--weight-semibold); }
.loan-hint { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6);
  border-radius: var(--radius-tag); background: var(--palette-tile-mauve); }
.loan-hint p { margin: 0; }
.loan-hint__title { font-size: var(--text-xs); color: var(--color-text-muted); }
.loan-disclaimer { margin: 0; font-size: var(--text-xs); color: var(--color-text-muted); }
/* Cards & memberships (owner 25 Nov): the safety line (always shown), pay buttons, benefits */
.cards-safety { margin: 0; padding: var(--space-6); border-radius: var(--radius-tag); background: var(--palette-tile-olive);
  border-inline-start: 4px solid var(--palette-olive); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.card-pay { flex-wrap: wrap; gap: var(--space-4); }
.card-benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.card-benefit p { margin: 0; }
.vault-full__list { margin: 0; padding-inline-start: var(--space-8); text-align: start; }
.vault-full__portal { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); }
.vault-full__link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.vault-full__thumb { inline-size: 96px; block-size: 96px; border-radius: var(--radius-tag); object-fit: cover; }
.vault-full__thumb--none { display: inline-flex; align-items: center; justify-content: center; background: var(--palette-tile-stone); }

/* Policy explainer (owner 24 Nov, Phase 1) */
.policy-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.policy-point { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.policy-point.is-unclear .policy-point__text { color: var(--color-text-muted); font-style: italic; }
.policy-point__detail, .policy-point__meta, .policy-point__note { font-size: var(--text-sm); color: var(--color-text-muted); }
.policy-cite { font-size: var(--text-xs); color: var(--color-text-muted); border: var(--border-width) solid var(--color-line);
  border-radius: 999px; padding: 0 var(--space-4); }
.policy-disclaimer { font-size: var(--text-sm); color: var(--color-text-muted); border-block-start: var(--border-width) solid var(--color-line);
  padding-block-start: var(--space-4); margin: 0; }
.policy-ask__text { min-block-size: 8rem; resize: vertical; }
/* Orb Live Part 5: rock, paper, scissors */
.rps__status { margin: 0; text-align: center; font-size: var(--text-xl); font-weight: 600; min-block-size: 1.5em; }
.rps__picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.rps__pick { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-6) var(--space-3);
  font: inherit; border: var(--border-width) solid var(--color-line); border-radius: var(--radius-card); background: var(--color-surface);
  color: var(--color-text); cursor: pointer; min-block-size: 44px; }
.rps__pick span:first-child { font-size: 2rem; }
.rps__hands { display: flex; justify-content: center; gap: var(--space-12); }
.rps__hand { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.rps__hand b { font-size: 3rem; line-height: 1; }
.rps__score { margin: 0; text-align: center; }
/* Upgrade (owner 25 Nov, website Part C): Recommended, the free price, Coming 2027, the reassurance row */
.upgrade__recommended { display: inline-block; margin-block-start: var(--space-3); font-size: var(--text-sm); font-weight: 600;
  padding: var(--space-1) var(--space-4); border-radius: var(--radius-pill); color: var(--color-positive); background: var(--color-positive-soft); }
.upgrade__free-price { margin: 0; text-align: center; font-size: var(--text-2xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.upgrade__soon { margin-inline-start: var(--space-3); font-size: var(--text-sm); color: var(--color-due); background: var(--color-due-soft);
  padding: 0 var(--space-3); border-radius: var(--radius-tag); white-space: nowrap; }
.upgrade__reassure { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-6); font-size: var(--text-sm); color: var(--color-text-muted); }
.upgrade__reassure li::before { content: '✓ '; color: var(--color-positive); }
.bill-option__was { color: var(--color-text-muted); font-size: var(--text-sm); }
/* "Reading your receipt" (owner 25 Nov, website Part B): label left, value and its chip right */
.reading__rows { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3) var(--space-6); margin: 0; }
.reading__label { color: var(--color-text-muted); font-size: var(--text-sm); }
.reading__value { margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: flex-end; text-align: end; }
@media (prefers-reduced-motion: no-preference) {
  .reading__rows dd { animation: reading-in .3s var(--ease-out); }
}
@keyframes reading-in { from { opacity: 0; } to { opacity: 1; } }
/* "Checking stores" (owner 25 Nov, website Part A): cheapest first, the best row marked with a line, not colour alone */
.pc-rows { display: flex; flex-direction: column; }
.pc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-5); align-items: center;
  padding-block: var(--space-4); border-block-start: var(--border-width) solid var(--color-line); }
.pc-row:first-child { border-block-start: 0; }
.pc-row__left { display: flex; flex-direction: column; min-inline-size: 0; }
.pc-row__total { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-row--best .pc-row__left b { text-decoration: underline; text-underline-offset: 3px; }
.pc-buy { margin: 0; font-weight: 600; }
/* Delete my account (owner 26 Nov): the rewards given up said plainly, in red */
.delete-account__warn { margin: 0; padding: var(--space-4) var(--space-5); border-radius: var(--radius-tag);
  color: var(--color-danger); background: var(--color-danger-soft); font-weight: 600; }
.delete-account--done { justify-content: center; min-block-size: 100vh; gap: var(--space-8); }
/* The wallet card shows everything (owner 26 Nov, KEA-FIX-ORB-26NOV part 4): summary, status words, the masked number */
.vault-summary { display: grid; gap: var(--space-2); }
.vault-summary__what { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.vault-summary__next { margin: 0; font-weight: 600; }
.vault-status { justify-self: start; display: inline-block; font-size: var(--text-sm); font-weight: 600;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-tag); color: var(--color-text-muted); }
.vault-status--urgent { color: var(--color-danger); background: var(--color-danger-soft); }
.vault-status--due { color: var(--color-due); background: var(--color-due-soft); }
.vault-status--positive { color: var(--color-positive); background: var(--color-positive-soft); }
.vault-full__secure { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.vault-full__number { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.vault-full__hist { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.vault-full__linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: start; }
.vault-reread { border-inline-start: 3px solid var(--color-due); }
.vault-missing .body-text { margin: 0 0 var(--space-3); }
/* Email a provider (owner 26 Nov, KEA-EMAIL-CASES-SPEC.md 5): the draft shown in the app first */
.email-preview__body { min-block-size: 16rem; resize: vertical; line-height: 1.45; white-space: pre-wrap; font: inherit; }
.email-preview__placeholder, .email-preview__warn { font-size: var(--text-sm); margin: 0; padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-tag); color: var(--color-due); background: var(--color-due-soft); }
.email-preview__attach { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; }
.email-preview__send { border-block-start: var(--border-width) solid var(--color-line); padding-block-start: var(--space-4); }
.policy-block .policy-group { border: 0; box-shadow: none; padding: 0; background: transparent; }   /* inside the Wallet card: not a card in a card */
/* Deals & coupons (owner 26 Nov, job D): the Money link, the price drops, the EU/UK line */
.deals-link, .deals-drop { text-decoration: none; color: inherit; }
.deals__note { background: var(--color-surface); border: var(--border-width) solid var(--color-line); color: var(--color-text); }
.you__privacy { font-size: var(--text-sm); overflow-wrap: anywhere; }
/* Google's Search Suggestions under a weather reply (owner 26 Nov, Orb Live Part 6) */
.search-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); min-inline-size: 0; }
/* KEA-LENS-SPEC 33: a tip from KEAi under a reply, one line and one button (quiet, never a banner) */
.chat-tip { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); max-inline-size: 100%;
  padding: var(--space-5); border: var(--border-width) solid var(--card-border); border-radius: var(--radius-card); background: var(--card-bg); }
.chat-tip__text { margin: 0; color: var(--color-text); }
.search-sugg__by { font-size: var(--text-2xs); color: var(--color-text-muted); }
.search-sugg__q { max-inline-size: 100%; overflow-wrap: anywhere; text-decoration: none; }

/* ---- Onboarding (owner 26 Nov, docs/KEA-ONBOARDING-LEGAL-26NOV.md) ---- */
/* Welcome: four cards in a scroll-snap track, dots, Next / Get started, the legal footer */
.welcome {
  display: flex; flex-direction: column; gap: var(--space-8); min-block-size: 100dvh; box-sizing: border-box;
  inline-size: 100%; min-inline-size: 0; max-inline-size: var(--size-app-max); margin-inline: auto;
  /* the test label above it already clears the status bar */
  padding: var(--space-6) var(--space-10) max(var(--space-8), env(safe-area-inset-bottom));
}
.welcome__top { display: flex; justify-content: space-between; align-items: center; min-block-size: var(--size-touch); }
.welcome__skip { margin-inline-start: auto; }
.welcome__track {
  flex: 1; display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scrollbar-width: none; min-block-size: 0; min-inline-size: 0; inline-size: 100%;
}
.welcome__track::-webkit-scrollbar { display: none; }
.welcome__track:focus-visible { outline: 2px solid var(--color-line-strong); outline-offset: 2px; }
.welcome__card {
  flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center; gap: var(--space-6); padding-inline: var(--space-2);
  min-inline-size: 0; overflow: hidden;
}
.welcome__orb { display: flex; justify-content: center; min-inline-size: 0; overflow: hidden; }
.welcome__mark {
  inline-size: var(--size-touch); block-size: var(--size-touch); border-radius: var(--radius-pill);
  display: grid; place-items: center; background: var(--color-surface); border: 1px solid var(--color-line);
  font-weight: var(--weight-bold); color: var(--color-accent);
}
.welcome__title { margin: 0; }
.welcome__body { margin: 0; color: var(--color-text-muted); }
.welcome__dots { display: flex; justify-content: center; gap: var(--space-5); }
.welcome__dot {
  inline-size: var(--welcome-dot); block-size: var(--welcome-dot); padding: 0; border: 0; border-radius: var(--radius-pill);
  background: var(--color-line); cursor: pointer;
  /* a 44 px tap area around the small dot */
  box-sizing: content-box; border: calc((var(--size-touch) - var(--welcome-dot)) / 2) solid transparent; background-clip: content-box;
}
.welcome__dot[aria-selected="true"] { background-color: var(--color-text); }
.welcome__actions { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-4); }
.welcome__member { align-self: center; text-align: center; inline-size: auto; }
/* is-fading is added only with reduced motion (welcome.js): the fade replaces the slide */
.welcome__card.is-fading { animation: welcome-fade var(--motion-welcome-fade) var(--ease-out); }
@keyframes welcome-fade { from { opacity: 0; } to { opacity: 1; } }

/* Terms · Privacy · Disclaimer (welcome cards, sign-in) */
.legal-foot { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: var(--space-2);
  font-size: var(--text-sm); color: var(--color-text-muted); }
.legal-foot__link {
  border: 0; background: none; padding: var(--space-4) var(--space-3); min-block-size: var(--size-touch);
  color: var(--color-text-muted); text-decoration: underline; text-underline-offset: 2px; font: inherit; cursor: pointer;
}
.legal-foot__dot { color: var(--color-text-faint); }

/* The legal reader: a full-screen layer over the current screen (the consent ticks stay underneath) */
.legal-reader {
  position: fixed; inset: 0; z-index: var(--z-reader); display: flex; flex-direction: column; background: var(--color-page);
  padding-block-start: env(safe-area-inset-top);
}
.has-legal-reader body { overflow: hidden; }
.legal-reader__bar { flex: none; }
.legal-reader__scroll {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; inline-size: 100%;
  max-inline-size: var(--size-app-max); margin-inline: auto;
  padding: var(--space-6) var(--space-10) max(var(--space-16), env(safe-area-inset-bottom));
  font-size: var(--text-md); line-height: 1.6;
}
.legal-reader__meta { color: var(--color-text-muted); font-size: var(--text-sm); margin: var(--space-2) 0 var(--space-8); }
.legal-reader__body { overflow-wrap: anywhere; }
.legal-reader__h2 { font-size: var(--text-lg); font-weight: var(--weight-bold); margin: var(--space-12) 0 var(--space-4); }
.legal-reader__nav { border-block: 1px solid var(--color-line); padding-block: var(--space-4); }
.legal-reader__nav .legal-reader__ul { list-style: none; padding: 0; }
.legal-reader__ul, .legal-reader__ol { padding-inline-start: var(--space-12); }
.legal-reader__li + .legal-reader__li { margin-block-start: var(--space-4); }
.legal-reader__inline { padding: 0; font: inherit; text-align: start; }
.legal-reader__web { display: inline-block; margin-block-start: var(--space-12); }

/* Consent: the "What KEAi is and isn't" points, the two boxes, Continue that explains what is missing */
.consent__points { margin: 0; padding-inline-start: var(--space-10); display: flex; flex-direction: column; gap: var(--space-3); }
.consent__country { font-size: var(--text-sm); }
.consent__check { font-weight: var(--weight-semibold); }
.consent__doc { padding: 0; font: inherit; min-block-size: 0; line-height: inherit; vertical-align: baseline; }
.button.is-disabled { opacity: var(--opacity-disabled); }
.policy-disclaimer .disclaimer-link, .loan-disclaimer .disclaimer-link { padding: 0; font: inherit; }
.you__legal { margin-block-start: var(--space-8); }

/* SIM-100 fix 2: first-run guide (Home card steps) and the empty Vault's example card (dashed edge = not real) */
.doc-card__steps { margin: 0; padding-inline-start: var(--space-8); display: flex; flex-direction: column;
  gap: var(--space-2); font-size: var(--text-sm); line-height: var(--leading-snug); }
.vault-first { gap: var(--space-5); }
.vault-example { position: relative; opacity: .78; }
.vault-example__pass { cursor: default; box-shadow: none; border-style: dashed; border-inline-start-style: solid; }
.vault-example__tag { position: absolute; inset-block-start: var(--space-4); inset-inline-end: var(--space-5);
  font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--tracking-caps-wide);
  text-transform: uppercase; color: var(--color-text-muted); padding: 2px var(--space-3);
  border: var(--border-width) dashed var(--color-line-dashed); border-radius: var(--radius-pill, 999px); }
/* SIM-100 fix 5: Edit / Delete on the chat's document card */
.doc-fix { border-block-start: var(--border-width) solid var(--color-line); padding-block-start: var(--space-4); }
.doc-fix .confirm-step { inline-size: 100%; }

/* Statement insights (docs/KEA-STATEMENT-INSIGHTS-SPEC.md). Bars: one ink hue for magnitude (the trend line's), thin,
   rounded data end, text first; no rainbow. Status lines carry words, never colour alone. */
.statement-row { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  text-decoration: none; color: inherit; }
.statement-row__title { flex: 1 1 12rem; font-weight: var(--weight-semibold); }
.statement-upload__privacy { font-size: var(--text-sm); }
.st-head { gap: var(--space-2); }
.st-check { margin: 0; font-size: var(--text-sm); padding-inline-start: var(--space-4);
  border-inline-start: 3px solid var(--color-line); }
.st-check--ok { border-inline-start-color: var(--palette-green); }
.st-check--warn { border-inline-start-color: var(--color-due); font-weight: var(--weight-semibold); }
.st-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: var(--space-4); }
.st-stat { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-5);
  background: var(--color-surface); border: var(--border-width) solid var(--color-line); border-radius: var(--radius-card); }
.st-stat__label { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase;
  letter-spacing: var(--tracking-caps-wide); font-family: var(--font-mono); }
.st-stat__value { font-size: var(--text-md); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere; }
.st-part { gap: var(--space-4); }
.st-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.st-bar { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-4); align-items: baseline; }
.st-bar__name { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-bar__value { font-variant-numeric: tabular-nums; color: var(--color-text-muted); font-size: var(--text-sm); }
.st-bar__track { grid-column: 1 / -1; block-size: 8px; background: var(--palette-ink-06); border-radius: 4px; overflow: hidden; }
.st-bar__fill { display: block; block-size: 100%; background: var(--chart-shopping); border-radius: 0 4px 4px 0; }
.st-bar:hover .st-bar__fill { opacity: .8; }
.st-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.st-list__row { display: flex; flex-direction: column; gap: var(--space-1); }
.st-list__name { font-weight: var(--weight-semibold); }
.st-cuts { list-style: none; margin: 0; padding: 0; }
.st-cut__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-4); align-items: baseline; }
.st-cut__what { font-weight: var(--weight-semibold); }
.st-cut__save { font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.st-cut__tags, .st-actions { flex-wrap: wrap; gap: var(--space-3); }
.st-tips { margin: 0; padding-inline-start: var(--space-8); display: flex; flex-direction: column; gap: var(--space-3);
  line-height: var(--leading-snug); }
.st-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.st-line { display: grid; grid-template-columns: 3.5rem 1fr auto; grid-template-areas: 'date name amount' 'date cat cat';
  gap: var(--space-1) var(--space-4); padding-block: var(--space-4); border-block-end: var(--border-width) solid var(--color-line); }
.st-line__date { grid-area: date; color: var(--color-text-muted); font-size: var(--text-sm); }
.st-line__name { grid-area: name; min-inline-size: 0; overflow-wrap: anywhere; }
.st-line__amount { grid-area: amount; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-line__amount--in { color: var(--palette-green); }
.st-line__cat { grid-area: cat; justify-self: start; max-inline-size: 100%; font: inherit; font-size: var(--text-sm); }
select.st-line__cat { padding: var(--space-1) var(--space-3); border: var(--border-width) solid var(--color-line);
  border-radius: var(--radius-pill, 999px); background: var(--color-surface); color: var(--color-text); min-block-size: 32px; }
.st-draft { white-space: pre-wrap; font: inherit; margin: 0; padding: var(--space-5); background: var(--color-surface);
  border: var(--border-width) solid var(--color-line); border-radius: var(--radius-card); }
.st-disclaimer { font-size: var(--text-sm); }

/* Money › Your money (owner 27 Nov, no Shop tab): one row per place */
.money-rows { display: flex; flex-direction: column; background: var(--color-surface);
  border: var(--border-width) solid var(--color-line); border-radius: var(--radius-card); overflow: hidden; }
.money-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-5) var(--space-6); text-decoration: none; color: inherit; min-block-size: 48px; }
.money-row + .money-row { border-block-start: var(--border-width) solid var(--color-line); }
.money-row__title { font-weight: var(--weight-semibold); }
.money-row__value { color: var(--color-text-muted); font-variant-numeric: tabular-nums; text-align: end; }

/* KEAi Lens (docs/KEA-LENS-SPEC.md): covered and not covered side by side (stacked on a phone); every point with its
   quote, its citation and how sure; status in words, never colour alone */
.lens-hero .title { font-size: var(--text-xl); }
.lens-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.lens-doc-row { display: flex; flex-direction: column; gap: var(--space-2); text-decoration: none; color: inherit; }
.lens-doc-row__title { font-weight: var(--weight-semibold); }
.lens-doc-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.lens-recovered { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-6);
  background: var(--color-surface); border: var(--border-width) solid var(--color-line); border-radius: var(--radius-card); }
.lens-recovered__amount { font-size: var(--text-xl); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.lens-sides { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }
@media (min-width: 560px) { .lens-sides { grid-template-columns: 1fr 1fr; } }
.lens-group { gap: var(--space-3); }
.lens-group--covered > .section-title { border-inline-start: 4px solid var(--palette-green); padding-inline-start: var(--space-3); }
.lens-group--not_covered > .section-title { border-inline-start: 4px solid var(--color-due); padding-inline-start: var(--space-3); }
.lens-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.lens-point { display: flex; flex-direction: column; gap: var(--space-2); padding-block-end: var(--space-4);
  border-block-end: var(--border-width) solid var(--color-line); }
.lens-point__text { margin: 0; line-height: var(--leading-snug); }
.lens-point--unclear .lens-point__text { font-style: italic; }
.lens-quote { margin: 0; padding-inline-start: var(--space-4); border-inline-start: 2px solid var(--color-line);
  color: var(--color-text-muted); font-size: var(--text-sm); line-height: var(--leading-snug); }
.lens-point__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.lens-cite { font-family: var(--font-mono); font-size: var(--text-2xs); padding: 2px var(--space-3); color: var(--color-text);
  background: var(--color-surface); border: var(--border-width) solid var(--color-line); border-radius: var(--radius-pill, 999px);
  min-block-size: 0; }
button.lens-cite { cursor: pointer; text-decoration: underline; }
.lens-locked { font-weight: var(--weight-semibold); }
.lens-ask textarea, .lens-reject textarea { inline-size: 100%; resize: vertical; font: inherit; }
.lens-verdict { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); padding-inline-start: var(--space-4);
  border-inline-start: 4px solid var(--color-line); }
.lens-verdict--likely_covered { border-inline-start-color: var(--palette-green); }
.lens-verdict--likely_not { border-inline-start-color: var(--color-due); }
.lens-confirm { margin: 0; font-weight: var(--weight-semibold); }
.lens-deadline { flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.lens-deadline__text { font-weight: var(--weight-semibold); }
.lens-actions { flex-wrap: wrap; gap: var(--space-3); }
.lens-draft__subject { margin: 0; font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.lens-draft__body { white-space: pre-wrap; font: inherit; font-size: var(--text-sm); margin: 0; padding: var(--space-5);
  background: var(--color-page); border-radius: var(--radius-card); overflow-wrap: anywhere; }
.lens-check { margin: 0; padding-inline-start: var(--space-8); display: flex; flex-direction: column; gap: var(--space-2); }
.lens-check__done::marker { content: '✓  '; }
.lens-route ul { margin: 0; padding-inline-start: var(--space-8); }
.lens-home-card { text-decoration: none; color: inherit; gap: var(--space-1); }
.lens-home-card__text { font-weight: var(--weight-semibold); }
.lens-disclaimer { font-size: var(--text-sm); }

/* Cards & EMIs (KEA-LENS-SPEC 25): the card report's plain-word lines; a row's pill says Full report / Reminders. */
.card-report__list { margin: 0; padding-inline-start: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.cards-emis-row { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; }

/* Home checklist, "first win in 60 seconds" (KEA-LENS-SPEC 28). The ring repeats the "2 of 5 done" text; a done step
   has a tick and the word "done", never colour alone. */
.home__checklist:empty { display: none; }
.checklist__head { display: flex; align-items: center; gap: var(--space-4); }
.checklist__titles { display: flex; flex-direction: column; gap: var(--space-1); flex: 1; }
.checklist__ring { inline-size: 44px; block-size: 44px; flex: none; }
.checklist__ring-track { fill: none; stroke: var(--color-line); stroke-width: 4; }
.checklist__ring-fill { fill: none; stroke: var(--color-positive); stroke-width: 4; stroke-linecap: round; }
.checklist__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.checklist__step { display: flex; gap: var(--space-3); align-items: flex-start; }
.checklist__mark { flex: none; inline-size: 22px; block-size: 22px; border-radius: 50%; border: var(--border-width-strong) solid var(--color-line-strong);
  display: inline-flex; align-items: center; justify-content: center; font-size: var(--text-sm); }
.checklist__step--done .checklist__mark { background: var(--color-positive); border-color: var(--color-positive); color: var(--color-on-accent); }
.checklist__step--done .checklist__label { color: var(--color-text-muted); }
.checklist__text { display: flex; flex-direction: column; gap: var(--space-2); }
.checklist__end { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.checklist__hint { font-size: var(--text-sm); color: var(--color-text-muted); }

@media print {
  .app-header, .back-bar, .tabbar, .tab-bar, nav, .statement__noprint, .test-banner, .st-actions, .st-file { display: none !important; }
  .st-bar__fill { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  select.st-line__cat { border: 0; appearance: none; -webkit-appearance: none; padding: 0; }
}
