/*
 * KoshNova web replica stylesheet. Colours come from CSS custom properties that the Kotlin theme
 * sets on <html> from the Android palette (light, dark and accents). Sizes follow the Android
 * Compose screens in dp (1dp = 1px here); typography follows ui/theme/Type.kt.
 */

/* Fallback palette (light) before the app applies the chosen theme. */
:root {
    --primary: #4655D8; --on-primary: #FFFFFF; --primary-container: #E3E6FB; --on-primary-container: #1A2270;
    --secondary: #0F7C74; --on-secondary: #FFFFFF; --secondary-container: #D3F0EC; --on-secondary-container: #00302B;
    --tertiary: #856100; --tertiary-container: #F8EBC4;
    --background: #F3F2EF; --on-background: #1C2230; --surface: #FFFFFF; --on-surface: #1C2230;
    --surface-variant: #ECEAE5; --on-surface-variant: #5C6270; --error: #B5372C; --on-error: #FFFFFF;
    --error-container: #FBE1DD; --on-error-container: #4A0F09; --outline: #8A8F99; --outline-variant: #E3E0D9;
    --surface-container-lowest: #FFFFFF; --surface-container-low: #F8F7F5; --surface-container: #FFFFFF;
    --surface-container-high: #ECEAE5; --surface-container-highest: #E4E1DA;
    --orbit-green: #13744B; --orbit-yellow: #856100;
    --violet: #4655D8; --mint: #13744B; --gold: #856100; --spent: #B5372C;
    --font: "Outfit", "Segoe UI", Roboto, system-ui, -apple-system, Arial, sans-serif;
    --nav-height: 76px;
    color-scheme: light;
}

/* Before the app applies its theme, a dark device gets the dark Chroma background (no flash). */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --background: #14161C; --on-background: #ECEDF2; --surface: #1C1F27; --on-surface: #ECEDF2;
        --surface-container: #1C1F27; --on-surface-variant: #A2A7B5; --outline-variant: #2E3340; --primary: #8E9BFF;
        color-scheme: dark;
    }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font);
    font-size: 13px;
    line-height: 19px;
    letter-spacing: 0.15px;
    color: var(--on-background);
    background:
        radial-gradient(circle at 86% 7.5%, color-mix(in srgb, var(--primary) 8%, transparent) 0, transparent 72px),
        linear-gradient(180deg, var(--background), var(--surface-container-lowest) 50%, var(--background));
    background-attachment: fixed;
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at 86% 7.5%, color-mix(in srgb, var(--primary) 15%, transparent) 0, transparent 72px),
        linear-gradient(180deg, var(--background), var(--surface-container-lowest) 50%, var(--background));
    background-attachment: fixed;
}

button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Dialog containers take focus only to hand it on; their controls keep the focus ring. */
.modal:focus-visible, .sheet:focus-visible, .hub:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Boot and noscript */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; }
.boot-title { margin: 8px 0 0; font-size: 22px; font-weight: 700; }
.boot-title span, .brand-name span { color: var(--primary); }
.boot-text { margin: 0; color: var(--on-surface-variant); }
.noscript { margin: 24px; text-align: center; }

/* Typography (ui/theme/Type.kt) */
.headline-large { font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.3px; margin: 0; }
.headline-medium { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.2px; margin: 0; }
.headline-small { font-size: 20px; line-height: 26px; font-weight: 600; margin: 0; }
.title-large { font-size: 18px; line-height: 24px; font-weight: 600; margin: 0; }
.title-medium { font-size: 15px; line-height: 21px; font-weight: 600; letter-spacing: 0.1px; margin: 0; }
.title-small { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.1px; margin: 0; }
.body-large { font-size: 15px; line-height: 22px; margin: 0; }
.body-medium { font-size: 13px; line-height: 19px; margin: 0; }
.body-small { font-size: 11px; line-height: 16px; letter-spacing: 0.2px; margin: 0; }
.label-large { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.1px; }
.label-medium { font-size: 11px; line-height: 15px; font-weight: 600; letter-spacing: 0.25px; }
.label-small { font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.3px; }
.bold { font-weight: 700; }
.semibold { font-weight: 600; }
.medium { font-weight: 500; }
.muted { color: var(--on-surface-variant); }
.outline-text { color: var(--outline); }
.primary-text { color: var(--primary); }
.mint-text { color: var(--mint); }
.violet-text { color: var(--violet); }
.gold-text { color: var(--gold); }
.spent-text { color: var(--spent); }
.error-text { color: var(--error); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.end { text-align: end; }
.center { text-align: center; }
.upper { text-transform: uppercase; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Layout helpers */
.row { display: flex; align-items: center; gap: var(--gap, 0); min-width: 0; }
.row.top { align-items: flex-start; }
.row.bottom { align-items: flex-end; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: var(--gap, 0); min-width: 0; }
.grow { flex: 1 1 0; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 8px); }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.divider { height: 1px; background: var(--outline-variant); border: 0; margin: 0; }
.divider.soft { background: color-mix(in srgb, var(--outline-variant) 50%, transparent); }
.spacer { flex: 1 1 auto; }

/* App shell */
.app { min-height: 100vh; min-height: 100dvh; }
.main {
    width: 100%;
    margin: 0 auto;
    padding-bottom: calc(var(--nav-height) + 40px + env(safe-area-inset-bottom));
}
.notice {
    margin: 8px 16px 0;
    padding: 6px 12px;
    border-radius: 12px;
    background: var(--secondary-container);
    color: var(--on-secondary-container);
    font-size: 11px; line-height: 15px; font-weight: 600;
}
.screen { padding: 12px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.screen.tight { padding-left: 16px; padding-right: 16px; }
.screen.gap-10 { gap: 10px; }
.screen.gap-11 { gap: 11px; }
.screen.gap-14 { gap: 14px; }

/* Bottom navigation (floating bar on every width) */
.bottom-nav {
    position: fixed; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 20;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: 64px;
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface-container) 98%, transparent);
    border: 0.75px solid var(--outline-variant);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.16);
    padding: 0; margin: 0; list-style: none;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    height: 100%; width: 100%; border: 0; background: transparent;
    color: var(--on-surface-variant); font-size: 10px; line-height: 14px; font-weight: 500;
    border-radius: 22px;
}
.nav-item[aria-current="page"] { color: var(--primary); }
.nav-item:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }

/* Wide windows keep the floating bottom bar, centred like a dock (user direction, 25 October 2026). */
@media (min-width: 840px) {
    .bottom-nav { left: 50%; right: auto; width: min(560px, calc(100% - 20px)); transform: translateX(-50%); bottom: 16px; }
    .fab-host { right: 32px; bottom: calc(var(--nav-height) + 24px); }
}

/* Floating actions */
.fab-host { position: fixed; right: 16px; bottom: calc(var(--nav-height) + 12px + env(safe-area-inset-bottom)); z-index: 21; }
.fab {
    width: 52px; height: 52px; border-radius: 50%; border: 0;
    display: grid; place-items: center;
    background: var(--primary); color: var(--on-primary);
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.22);
}
.fab-extended {
    height: 50px; padding: 0 20px 0 16px; border-radius: 17px; border: 0;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary); color: var(--on-primary);
    font-size: 13px; line-height: 17px; font-weight: 500;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.22);
}

/* Icons */
.icon { display: inline-grid; place-items: center; flex: none; width: var(--size, 24px); height: var(--size, 24px); }
.icon svg { width: 100%; height: 100%; }
.icon.material svg { fill: currentColor; }
.icon.lucide svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.orb {
    --c: var(--primary);
    flex: none; display: grid; place-items: center;
    width: var(--orb, 40px); height: var(--orb, 40px);
    border-radius: var(--orb-radius, 12px);
    color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, var(--surface-container-high));
}
.orb.circle { border-radius: 50%; }

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-size: 18px; line-height: 24px; font-weight: 700; margin: 0; }
.brand-tagline { font-size: 11px; line-height: 15px; font-weight: 600; color: var(--primary); margin: 2px 0 0; }

/* Cards */
.card {
    background: var(--surface-container);
    color: var(--on-surface);
    border: 1px solid color-mix(in srgb, var(--outline-variant) 62%, transparent);
    border-radius: 20px;
    padding: var(--pad, 16px);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    min-width: 0;
}
.card.clickable, .clickable { cursor: pointer; }
.card.clickable:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--outline-variant)); }
.glass {
    background: var(--surface);
    color: var(--on-surface);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--outline-variant) 88%, var(--primary));
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}
[data-theme="dark"] .glass { background: var(--surface-container); box-shadow: none; }
.tile { height: 116px; --pad: 10px; }
/* On the narrowest phones the Credit cards tile grows and wraps instead of truncating amounts. */
@media (max-width: 380px) {
    .tile { height: auto; min-height: 116px; }
    .tile .row { flex-wrap: wrap; row-gap: 2px; }
    .tile .ellipsis { white-space: normal; overflow: visible; text-overflow: clip; }
    .tile .num { white-space: nowrap; }
    .tile .row > .col { min-width: max-content; }
}
.investments {
    border-radius: 20px; padding: 14px;
    border: 1px solid color-mix(in srgb, var(--violet) 46%, transparent);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--primary-container) 42%, transparent),
        var(--surface-container),
        color-mix(in srgb, var(--secondary-container) 22%, transparent));
}
.summary-card {
    border-radius: 19px; padding: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 34%, transparent);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--primary-container) 66%, transparent),
        color-mix(in srgb, var(--secondary-container) 42%, transparent));
}
.hero-card {
    border-radius: 19px; padding: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 34%, transparent);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--primary-container) 62%, transparent),
        color-mix(in srgb, var(--tertiary-container) 36%, transparent));
}
.kicker { font-size: 10px; line-height: 14px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--on-surface-variant); }
.big-value { font-size: 21px; line-height: 27px; font-weight: 500; letter-spacing: -0.4px; }

.metric-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--c); }
.section-title { margin-top: 4px; }
.badge {
    --c: var(--primary);
    display: inline-block; max-width: 100%;
    padding: 4px 9px; border-radius: 999px;
    font-size: 10px; line-height: 14px; font-weight: 600;
    color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.count-badge {
    min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px;
    display: inline-grid; place-items: center;
    background: var(--primary); color: var(--on-primary);
    font-size: 11px; line-height: 13px; font-weight: 500;
}

/* Progress */
.progress { height: var(--h, 7px); border-radius: 99px; background: var(--track, color-mix(in srgb, var(--outline-variant) 46%, transparent)); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--primary)); }
.ring { flex: none; position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-label { font-size: 11px; font-weight: 700; position: relative; }
.spark { display: block; width: 100%; height: 34px; padding-top: 4px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 50px; }
.bars > span { flex: 1; border-radius: 99px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 40px; padding: 0 24px; border-radius: 20px; border: 0;
    background: var(--primary); color: var(--on-primary);
    font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.1px;
}
.btn.block { width: 100%; }
.btn.tall { min-height: 48px; }
.btn.outlined { background: transparent; color: var(--primary); border: 1px solid var(--outline); }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn.text { background: transparent; color: var(--primary); padding: 0 12px; }
.btn.danger { background: var(--error); color: var(--on-error); }
.btn:disabled { opacity: 0.38; cursor: default; }
.icon-btn {
    width: 48px; height: 48px; border: 0; border-radius: 50%; background: transparent;
    display: inline-grid; place-items: center; color: inherit; flex: none;
}
.icon-btn:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.link-btn { border: 0; background: transparent; color: var(--primary); padding: 4px 3px; font-weight: 600; }
.link-btn:disabled { color: var(--on-surface-variant); }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 14px 0 10px; border-radius: 8px;
    border: 1px solid var(--outline-variant); background: transparent;
    font-size: 13px; font-weight: 600;
}
.chip[aria-pressed="true"] { background: var(--secondary-container); color: var(--on-secondary-container); border-color: transparent; }

/* Rows that act like Compose clickable rows */
.row-btn {
    display: flex; align-items: center; width: 100%; text-align: start;
    border: 0; background: transparent; padding: 0; color: inherit;
}
.row-btn:hover { background: color-mix(in srgb, var(--on-surface) 4%, transparent); }

/* Text fields (outlined) */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-box { position: relative; }
.field-box > label {
    position: absolute; top: -8px; left: 12px; padding: 0 4px;
    font-size: 12px; line-height: 16px; color: var(--on-surface-variant);
    background: var(--field-bg, var(--surface-container));
    pointer-events: none;
}
.field-box input, .field-box select, .field-box textarea {
    width: 100%; min-height: 56px; padding: 16px 16px;
    border: 1px solid var(--outline); border-radius: 16px;
    background: transparent; outline: none;
    font-size: 15px; line-height: 22px;
    appearance: none;
}
.field-box textarea { min-height: 88px; resize: vertical; }
.field-box select { padding-right: 44px; background-image: none; background-color: var(--field-bg, var(--surface-container)); cursor: pointer; }
/* Chrome on Windows draws the option list from these colours; transparent falls back to white,
 * which made light dark-mode text unreadable. */
select option, select optgroup { background-color: var(--surface-container-high); color: var(--on-surface); }
select option:disabled { color: var(--on-surface-variant); }
.pill-btn { color: var(--on-surface); }
.field-box .trailing { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--on-surface-variant); }
.field-box input:focus, .field-box select:focus, .field-box textarea:focus { border: 2px solid var(--primary); padding: 15px; }
.field-box input:focus + label, .field-box select:focus + label { color: var(--primary); }
.field.invalid .field-box input, .field.invalid .field-box select { border-color: var(--error); }
.field.invalid .field-box > label { color: var(--error); }
.field-box input:disabled, .field-box select:disabled { opacity: 0.6; }
.prefix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--on-surface-variant); font-size: 15px; }
.has-prefix input { padding-left: 34px; }
.inline-error {
    padding: 12px; border-radius: 12px;
    background: var(--error-container); color: var(--on-error-container);
    font-size: 13px; line-height: 19px;
}
.search {
    display: flex; align-items: center; gap: 12px;
    height: 48px; padding: 0 12px 0 16px;
    border: 1px solid var(--outline); border-radius: 18px;
    background: transparent;
}
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 13px; min-width: 0; }
.search:focus-within { border: 2px solid var(--primary); padding-left: 15px; }

/* Activity ledger */
.ledger { display: flex; flex-direction: column; margin-bottom: 18px; }
.ledger-cell {
    background: var(--surface); border: 1px solid var(--outline-variant);
    border-top-width: 0; cursor: pointer;
}
.ledger-cell:first-child { border-top-width: 1px; border-radius: 20px 20px 0 0; }
.ledger-cell:last-child { border-radius: 0 0 20px 20px; }
.ledger-cell:only-child { border-radius: 20px; }
.ledger-cell:hover { background: color-mix(in srgb, var(--primary) 3%, var(--surface)); }
.ledger-main { display: flex; align-items: center; gap: 9px; padding: 12px 4px 8px 12px; }
.ledger-orb { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.ledger-title { font-size: 14px; line-height: 18px; font-weight: 500; }
.ledger-meta { font-size: 11px; line-height: 14px; color: var(--on-surface-variant); }
.ledger-amount { font-size: 13px; line-height: 17px; font-weight: 500; align-self: flex-start; padding-top: 3px; }
.ledger-badge { padding: 3px 6px; font-size: 11px; line-height: 14px; font-weight: 500; max-width: 126px; }
.ledger-footer { margin-left: 61px; padding: 7px 10px 8px 0; border-top: 1px solid var(--outline-variant); font-size: 11px; line-height: 14px; color: var(--on-surface-variant); }
.pill-btn {
    border: 1px solid var(--outline-variant); background: var(--surface-container-low);
    border-radius: 13px; min-height: 42px; padding: 0 12px; width: 100%;
    font-size: 12px; line-height: 16px; font-weight: 600;
}
.month-chip {
    width: 66px; min-height: 40px; flex: none;
    border-radius: 13px; border: 1px solid var(--outline-variant);
    background: var(--surface-container-low); color: var(--on-surface-variant);
    font-size: 12px; font-weight: 500;
}
.month-chip[aria-pressed="true"] {
    background: var(--primary-container); color: var(--on-primary-container);
    border-color: color-mix(in srgb, var(--primary) 62%, transparent); font-weight: 600;
}
.month-rail { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.totals-cell { background: var(--surface-container-low); border-radius: 12px; padding: 9px 10px; }

/* Manage */
.tabs3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 16px 8px; }
.tab-card {
    height: 68px; border-radius: 17px; border: 1px solid var(--outline-variant);
    background: var(--surface); color: var(--on-surface-variant);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.tab-card[aria-selected="true"] { background: var(--primary-container); color: var(--primary); border-color: var(--primary); }
.tab-card .tab-label { font-size: 13px; line-height: 17px; font-weight: 500; }
.tab-card .tab-meta { font-size: 9px; line-height: 12px; color: var(--on-surface-variant); }
.group {
    background: var(--surface); border: 1px solid var(--outline-variant); border-radius: 18px;
    overflow: hidden; box-shadow: 0 2px 4px rgb(0 0 0 / 0.06);
}
.group-head {
    display: flex; align-items: center; gap: 8px; width: 100%;
    min-height: 48px; padding: 9px 12px; border: 0; text-align: start;
    background: var(--surface-container-low);
}
.group-title { font-size: 13px; line-height: 17px; font-weight: 500; }
.group-sub { font-size: 10px; line-height: 14px; color: var(--on-surface-variant); }
.subhead { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 12px; background: var(--surface-container-lowest); }
.ws-row { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 62px; padding: 9px 10px 9px 12px; border: 0; background: transparent; text-align: start; }
.ws-row:hover { background: color-mix(in srgb, var(--on-surface) 4%, transparent); }
.ws-orb { --c: var(--primary); width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.ws-name { font-size: 13px; line-height: 17px; font-weight: 500; }
.ws-sub { font-size: 10px; line-height: 14px; color: var(--on-surface-variant); margin-top: 2px; }
.ws-value { font-size: 12px; line-height: 16px; font-weight: 500; text-align: end; }
.ws-cap { font-size: 9px; line-height: 13px; color: var(--on-surface-variant); text-align: end; }
.empty-group { background: var(--surface); border: 1px solid var(--outline-variant); border-radius: 18px; padding: 18px 14px; text-align: center; font-size: 12px; line-height: 17px; color: var(--on-surface-variant); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 4px; border-radius: 15px; background: var(--surface-container); }
.segmented button { min-height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--on-surface-variant); font-size: 11px; font-weight: 500; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--on-surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.18); }
.detail-section { background: var(--surface-container-low); border: 1px solid color-mix(in srgb, var(--outline-variant) 72%, transparent); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
.kv { display: flex; gap: 12px; align-items: flex-start; }
.kv > :first-child { flex: 0.42; color: var(--on-surface-variant); font-size: 11px; line-height: 15px; font-weight: 600; }
.kv > :last-child { flex: 0.58; text-align: end; font-size: 13px; line-height: 19px; font-weight: 500; }

/* Weekday strip */
.days { display: flex; gap: 4px; }
.day { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 500; background: var(--surface-container-highest); color: var(--on-surface-variant); }
.day.on { background: var(--primary); color: var(--on-primary); }
.day.off { color: var(--outline); }

/* Switch */
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 16px; border: 2px solid var(--outline); background: var(--surface-container-highest); transition: background .15s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 6px; top: 6px; border-radius: 50%; background: var(--outline); transition: transform .15s, width .15s; }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); width: 24px; height: 24px; top: 2px; left: 2px; background: var(--on-primary); }

/* Home grid on wide windows */
.home-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.home-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
@media (min-width: 840px) {
    .home-grid { grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
    .home-col.second { padding-top: 54px; }
}

/* Wide windows use the full width (approved option B, 25 October 2026): wider gutters, a third
   Home column from 1,280 px and lists of cards laid out in columns. Dialogs keep their size. */
.card-grid { display: flex; flex-direction: column; gap: inherit; }
.manage-head { padding: 0 16px 6px; }
.more-columns { display: flex; flex-direction: column; gap: 10px; }
.card-grid:empty { display: none; }
@media (min-width: 840px) {
    .screen, .screen.tight { padding-left: 32px; padding-right: 32px; }
    .tabs3, .manage-head { padding-left: 32px; padding-right: 32px; }
    .notice { margin-left: 32px; margin-right: 32px; }
}
@media (min-width: 1024px) {
    .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; align-items: start; }
    .activity-tools { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
    .activity-tools .search { margin-bottom: 0 !important; }
    .totals-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .more-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
    .day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); column-gap: 16px; align-items: start; }
}
@media (min-width: 1280px) {
    .home-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

/* Dialogs */
.scrim {
    position: fixed; inset: 0; z-index: 50;
    background: rgb(0 0 0 / 0.48);
    display: grid; place-items: center;
    padding: 12px 18px;
}
.modal {
    width: 100%; max-width: 520px; max-height: min(740px, calc(100dvh - 24px));
    display: flex; flex-direction: column;
    border-radius: 24px; overflow: hidden;
    background: var(--surface-container); color: var(--on-surface);
    border: 1.5px solid var(--primary);
    box-shadow: 0 16px 48px rgb(0 0 0 / 0.3);
    --field-bg: var(--surface-container);
}
.modal.destructive { border-color: var(--error); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 8px 12px 20px; border-bottom: 1px solid color-mix(in srgb, var(--outline-variant) 48%, transparent); }
.modal-title { flex: 1; font-size: 20px; line-height: 26px; font-weight: 700; margin: 0; }
.modal-close { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--surface-container-highest); color: var(--on-surface-variant); margin: 7px; }
.modal-body { overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid color-mix(in srgb, var(--outline-variant) 48%, transparent); }

.sheet-scrim { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / 0.48); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 640px; background: var(--surface); border-radius: 28px 28px 0 0; padding: 0 16px 20px; }
.sheet-handle { width: 32px; height: 4px; border-radius: 2px; background: var(--on-surface-variant); opacity: 0.4; margin: 22px auto 10px; }
.sheet-option { display: flex; align-items: center; width: 100%; height: 62px; border: 0; background: transparent; text-align: start; }

.hub { position: fixed; inset: 0; z-index: 50; background: var(--surface); color: var(--on-surface); display: flex; flex-direction: column; }
.hub-body { flex: 1; display: grid; grid-template-columns: 136px 1fr; min-height: 0; }
.hub-tabs { border-right: 1px solid var(--outline-variant); overflow-y: auto; }
.hub-tab { display: flex; width: 100%; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent); background: var(--surface); text-align: start; padding: 0; }
.hub-tab::before { content: ""; width: 3px; flex: none; }
.hub-tab[aria-selected="true"] { background: var(--surface-container-low); color: var(--primary); }
.hub-tab[aria-selected="true"]::before { background: var(--primary); }
.hub-pane { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.check-row { display: flex; align-items: center; min-height: 44px; gap: 8px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0 12px 0 0; }
.hub-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; padding: 16px; border-top: 1px solid var(--outline-variant); }

/* Menus */
.menu-host { position: relative; }
.menu {
    position: absolute; right: 0; top: 100%; z-index: 40; min-width: 200px;
    background: var(--surface-container); border-radius: 8px; padding: 8px 0;
    box-shadow: 0 6px 20px rgb(0 0 0 / 0.22); list-style: none; margin: 0;
}
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 16px; border: 0; background: transparent; text-align: start; font-size: 14px; }
.menu button:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }

/* Type picker */
.type-choice {
    display: flex; gap: 12px; align-items: center; text-align: start; width: 100%;
    min-height: 68px; padding: 10px 12px; border-radius: 14px;
    border: 1px solid var(--outline-variant); background: color-mix(in srgb, var(--surface-variant) 48%, transparent);
}
.type-choice.prominent {
    flex-direction: column; align-items: flex-start; gap: 8px; min-height: 108px; padding: 13px; border-radius: 18px;
    border-color: color-mix(in srgb, var(--primary) 34%, transparent); background: color-mix(in srgb, var(--primary-container) 62%, transparent);
}
.type-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); flex: none; }
.summary-row { display: flex; align-items: center; border: 1px solid var(--outline); border-radius: 14px; padding: 10px 6px 10px 12px; background: var(--surface); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--c); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--on-surface); outline-offset: 1px; }
.accent { border: 0; border-radius: 50%; background: var(--c); width: 32px; height: 32px; display: grid; place-items: center; }
.accent[aria-pressed="true"] { width: 38px; height: 38px; }
.accent[aria-pressed="true"]::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--mint)); flex: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------------------------------------------------------------------------------------------
 * Motion (web-only addition approved 25 October 2026). Short, calm transitions; everything is
 * switched off for people who ask their system for reduced motion.
 * ------------------------------------------------------------------------------------------- */
@keyframes kn-page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes kn-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes kn-dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes kn-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes kn-hub-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes kn-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes kn-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes kn-ring { from { stroke-dashoffset: var(--arc, 0); } to { stroke-dashoffset: 0; } }
@keyframes kn-toast-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes kn-menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }

/* `backwards`, not `both`: a transform kept after the entrance would make the page the frame of
   every fixed overlay inside it (filters, dialogs), sizing them to the page instead of the window. */
.page { animation: kn-page-in 220ms cubic-bezier(.2, .7, .2, 1) backwards; }
.page .home-col > * { animation: kn-page-in 320ms cubic-bezier(.2, .7, .2, 1) backwards; }
.page .home-col > :nth-child(2) { animation-delay: 30ms; }
.page .home-col > :nth-child(3) { animation-delay: 60ms; }
.page .home-col > :nth-child(4) { animation-delay: 90ms; }
.page .home-col > :nth-child(5) { animation-delay: 120ms; }
.page .home-col > :nth-child(6) { animation-delay: 150ms; }
.page .home-col > :nth-child(n+7) { animation-delay: 180ms; }

.scrim, .sheet-scrim { animation: kn-fade-in 160ms ease-out both; }
.modal { animation: kn-dialog-in 200ms cubic-bezier(.2, .8, .2, 1) both; }
.sheet { animation: kn-sheet-in 260ms cubic-bezier(.2, .8, .2, 1) both; }
.hub { animation: kn-hub-in 220ms cubic-bezier(.2, .8, .2, 1) both; }
.menu { animation: kn-menu-in 140ms ease-out both; transform-origin: top right; }

.progress > span { transform-origin: left center; animation: kn-grow-x 700ms cubic-bezier(.2, .7, .2, 1) both; }
.bars > span { transform-origin: bottom center; animation: kn-grow-y 600ms cubic-bezier(.2, .7, .2, 1) both; }
.bars > span:nth-child(2) { animation-delay: 30ms; } .bars > span:nth-child(3) { animation-delay: 60ms; }
.bars > span:nth-child(4) { animation-delay: 90ms; } .bars > span:nth-child(5) { animation-delay: 120ms; }
.bars > span:nth-child(n+6) { animation-delay: 150ms; }
.ring-arc { animation: kn-ring 800ms cubic-bezier(.2, .7, .2, 1) both; }

.card, .glass, .btn, .fab, .fab-extended, .chip, .tab-card, .month-chip, .nav-item, .ledger-cell, .ws-row, .row-btn, .type-choice, .accent, .swatch {
    transition: transform 140ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.card.clickable:hover, .type-choice:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgb(0 0 0 / 0.10); }
.btn:active, .fab:active, .fab-extended:active, .chip:active, .tab-card:active, .month-chip:active, .accent:active, .swatch:active, .card.clickable:active, .type-choice:active {
    transform: scale(0.97);
}
.fab:hover, .fab-extended:hover { box-shadow: 0 8px 20px rgb(0 0 0 / 0.28); }
/* Dock-style magnification: the bar sets each icon's --dock scale from the pointer distance. */
.bottom-nav { overflow: visible; }
.nav-item { position: relative; overflow: visible; }
.nav-item .icon {
    transform-origin: bottom center;
    transform: translateY(calc((var(--dock, 1) - 1) * -14px)) scale(var(--dock, 1));
    transition: transform 140ms cubic-bezier(.2, .8, .2, 1);
    will-change: transform;
}
.nav-item[aria-current="page"] .icon { transform: translateY(calc((var(--dock, 1.08) - 1) * -14px)) scale(var(--dock, 1.08)); }
.bottom-nav.docking .nav-item:hover { background: transparent; }

/* Toast (web-only addition) */
.toast {
    position: fixed; left: 50%; z-index: 60;
    bottom: calc(var(--nav-height) + 20px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 12px;
    max-width: min(560px, calc(100vw - 32px));
    padding: 10px 8px 10px 16px; border-radius: 14px;
    background: var(--on-surface); color: var(--surface);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.28);
    font-size: 14px; line-height: 20px;
    animation: kn-toast-in 220ms cubic-bezier(.2, .8, .2, 1) both;
}
.toast .btn.text { color: var(--primary-container); min-height: 36px; }

/* Live balance chart (web-only addition) */
.chart { position: relative; margin-top: 4px; outline-offset: 4px; }
.chart svg { display: block; width: 100%; height: 44px; overflow: visible; }
.chart-tip {
    position: absolute; top: -30px; transform: translateX(-50%);
    padding: 3px 8px; border-radius: 8px; white-space: nowrap; pointer-events: none;
    background: var(--on-surface); color: var(--surface); font-size: 11px; line-height: 16px; font-weight: 600;
}
.chart-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--secondary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary) 25%, transparent); pointer-events: none; }
.chart svg { animation: kn-reveal 900ms cubic-bezier(.2, .7, .2, 1) both; }
@keyframes kn-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.bars { position: relative; }
.bars > span { cursor: default; }
.bars > span:hover { filter: brightness(1.15); }
.bar-tip { position: absolute; bottom: calc(100% + 6px); right: 0; padding: 3px 8px; border-radius: 8px; white-space: nowrap; background: var(--on-surface); color: var(--surface); font-size: 11px; line-height: 16px; font-weight: 600; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Approved web UI improvements (25 October 2026) ---------------------------------------- */

/* 1B: text and spacing about 15% larger from 1,024 px; overlays opened inside a page keep their
   size, as do the bottom bar, add buttons, forms and toasts outside the page. */
@media (min-width: 1024px) {
    .main { zoom: 1.15; }
    .main .scrim, .main .sheet-scrim, .main .hub { zoom: 0.869565; }
}

/* 3A: Edit and Delete on the row under a mouse pointer. */
.hover-actions { display: none; align-items: center; gap: 2px; flex: none; }
.hover-action { width: 32px; height: 32px; color: var(--on-surface-variant); }
.hover-action:hover { color: var(--primary); }
.hover-action:last-child:hover { color: var(--error); }
@media (hover: hover) and (pointer: fine) {
    .hover-actions { display: inline-flex; visibility: hidden; }
    .hover-host:hover .hover-actions { visibility: visible; }
}
.ws-row-host { display: flex; align-items: center; }
.ws-row-host > .ws-row { flex: 1; min-width: 0; }
.ws-row-host > .hover-actions { padding-right: 6px; }

/* 4A: the Activity toolbar stays pinned while a month scrolls, on wide windows only (user
   direction, 25 October 2026: on phones it would cover about a quarter of the screen). */
@media (min-width: 1024px) {
    .activity-toolbar {
        position: sticky; top: 0; z-index: 6;
        margin: 0 -32px; padding: 8px 32px 10px;
        background: var(--background);
        border-bottom: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent);
    }
    /* The year and month chips share one line, as in the approved mock-up. */
    .activity-toolbar .stack { flex-direction: row; align-items: center; gap: 10px; }
    .activity-toolbar .stack > select { flex: none; width: auto; }
    .activity-toolbar .month-rail { flex: 1; min-width: 0; }
}

/* 2A: docked transaction details beside the timeline. It docks only from 1,100 px, where the
   page is zoomed 1.15 and viewport units scale with it, hence the division below. */
.activity-body.with-panel { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.details-panel {
    position: sticky; top: calc(var(--toolbar-h, 120px) + 12px); margin-top: 12px;
    max-height: calc(100dvh / 1.15 - var(--toolbar-h, 120px) - 110px); overflow-y: auto;
    background: var(--surface); border: 1px solid var(--outline-variant); border-radius: 20px; padding: 16px;
    animation: kn-hub-in 200ms cubic-bezier(.2, .8, .2, 1) both;
}
.ledger-cell.selected { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); box-shadow: inset 3px 0 0 var(--primary); }

/* 5A: day headings with Spent and Received. */
.day-head { flex-wrap: wrap; row-gap: 2px; }
.day-flow { text-align: end; }

/* 6: balance chart ranges and scale. */
.chart-head { margin-top: 8px; }
.range-chips { display: inline-flex; gap: 4px; }
.range-chip {
    min-height: 24px; padding: 2px 8px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--outline-variant); background: transparent; color: var(--on-surface-variant);
    font-size: 11px; line-height: 16px; font-weight: 500;
}
.range-chip[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.chart-wrap { gap: 8px; align-items: stretch; }
.chart-wrap .chart { flex: 1; min-width: 0; }
.chart-scale {
    display: flex; flex-direction: column; justify-content: space-between; flex: none;
    padding: 4px 0 2px; font-size: 10px; line-height: 12px; color: var(--on-surface-variant); opacity: 0.85;
}

/* 8: a short fade between light and dark. */
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
    transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, fill 250ms ease, stroke 250ms ease, box-shadow 250ms ease !important;
}

/* 9: keyboard shortcut card. */
kbd {
    display: inline-block; min-width: 24px; padding: 1px 6px; text-align: center;
    border: 1px solid var(--outline-variant); border-bottom-width: 2px; border-radius: 6px;
    background: var(--surface-container-low); color: var(--on-surface);
    font: 500 12px/18px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.shortcut-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid color-mix(in srgb, var(--outline-variant) 50%, transparent); }
.shortcut-keys { display: inline-flex; align-items: center; gap: 4px; flex: none; }

/* 10: quick search. */
.palette-scrim {
    position: fixed; inset: 0; z-index: 70; display: flex; justify-content: center; align-items: flex-start;
    padding: 12vh 16px 16px; background: rgb(0 0 0 / 0.42);
    animation: kn-fade-in 140ms ease-out both;
}
.palette {
    width: min(560px, 100%); overflow: hidden; border-radius: 18px;
    background: var(--surface); color: var(--on-surface); border: 1px solid var(--outline-variant);
    box-shadow: 0 24px 60px rgb(0 0 0 / 0.3);
    animation: kn-dialog-in 180ms cubic-bezier(.2, .8, .2, 1) both;
}
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--outline-variant); color: var(--on-surface-variant); }
.palette-input input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--on-surface); font-size: 16px; line-height: 24px; outline: none; }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: min(420px, 60vh); overflow-y: auto; }
.palette-list:empty { display: none; }
.palette-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.palette-item[aria-selected="true"] { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.palette-empty { margin: 0; padding: 18px; text-align: center; color: var(--on-surface-variant); font-size: 13px; }
.palette-hint { margin: 0; padding: 8px 16px 10px; border-top: 1px solid color-mix(in srgb, var(--outline-variant) 50%, transparent); color: var(--on-surface-variant); font-size: 11px; }

/* 11A: spending donut inside Spending constellation on wide Home. */
.donut-row { gap: 16px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid color-mix(in srgb, var(--outline-variant) 50%, transparent); }
.donut { position: relative; width: 112px; height: 112px; flex: none; }
.donut svg { display: block; transform: rotate(0deg); }
.donut-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.donut-slice { transition: stroke-width 0.15s ease; cursor: default; }
.donut-slice:hover { stroke-width: 7.5; }
.donut-legend { gap: 6px; min-width: 0; }

/* ---- Round two, approved from mock-ups (25 October 2026) ------------------------------------ */

/* 1A: the transaction just saved or restored glows; a restored one also slides back in. */
.ledger-cell.flash { animation: kn-flash 1.6s ease-out 1; }
.ledger-cell.enter { animation: kn-enter 320ms cubic-bezier(.2, .8, .2, 1) 1, kn-flash 1.6s ease-out 1; }
@keyframes kn-flash {
    0%, 100% { background: var(--surface); }
    25% { background: color-mix(in srgb, var(--primary) 22%, var(--surface)); }
}
@keyframes kn-enter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 2: a deleted row folds away; the Undo message shows its remaining time. */
.ledger-cell.leaving { overflow: hidden; pointer-events: none; animation: kn-fold 320ms cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes kn-fold {
    from { max-height: 200px; opacity: 1; }
    to { max-height: 0; opacity: 0; border-width: 0; }
}
.toast { overflow: hidden; }
.toast-timer {
    position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
    background: var(--primary-container); transform-origin: left center;
    animation: kn-countdown linear forwards;
}
@keyframes kn-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* 3: bars and rings move to new values. */
.progress > span { transition: width 600ms cubic-bezier(.2, .7, .2, 1); }
.ring-arc { transition: stroke-dasharray 600ms cubic-bezier(.2, .7, .2, 1), stroke-opacity 200ms; }
.donut-slice { transition: stroke-dasharray 600ms cubic-bezier(.2, .7, .2, 1), stroke-dashoffset 600ms cubic-bezier(.2, .7, .2, 1), stroke-width 0.15s ease; }

/* 4: the balance line morphs between ranges where the browser supports the CSS `d` property. */
.chart-line, .chart-fill { transition: d 450ms cubic-bezier(.2, .7, .2, 1); }
.chart-dot { transition: left 150ms ease, top 150ms ease; }

/* 5: Home cards grow into their pages. The page's own entrance waits while the card morphs. */
html.vt-running .page, html.vt-running .page * { animation: none !important; }
::view-transition-group(kn-card) { animation-duration: 340ms; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }

/* 6: buttons press in slightly; + turns into × while the type picker is open. */
.btn, .icon-btn, .fab, .fab-extended, .chip, .tab-card, .month-chip, .range-chip, .nav-item, .row-btn { transition: transform 90ms ease; }
.btn:active, .icon-btn:active, .fab:active, .fab-extended:active, .chip:active, .tab-card:active, .month-chip:active, .range-chip:active, .row-btn:active { transform: scale(0.96); }
.fab .icon { transition: transform 200ms cubic-bezier(.2, .8, .2, 1); }
.fab.open .icon { transform: rotate(45deg); }

/* 7A, 8A, 9A: greeting, comparison, coming up. */
.compare-note { font-size: 11px; line-height: 14px; margin-top: 2px; }
.coming-row { gap: 8px; min-height: 30px; padding-top: 6px; }
.coming-row + .coming-row { border-top: 1px solid color-mix(in srgb, var(--outline-variant) 45%, transparent); }

/* 11: right-click menu at the pointer. */
.context-layer { position: fixed; inset: 0; z-index: 79; }
.menu.context-menu { position: fixed; right: auto; z-index: 80; min-width: 190px; transform-origin: top left; }
.menu .danger-text { color: var(--error); }

/* 12: compact rows. */
[data-density="compact"] .ledger-main { padding: 7px 4px 5px 10px; gap: 8px; }
[data-density="compact"] .ledger-orb { width: 32px; height: 32px; border-radius: 11px; }
[data-density="compact"] .ledger-footer { padding: 4px 10px 5px 0; margin-left: 50px; }
[data-density="compact"] .ws-row { min-height: 48px; padding-top: 5px; padding-bottom: 5px; }
[data-density="compact"] .ws-orb { width: 30px; height: 30px; border-radius: 10px; }
[data-density="compact"] .day-head { padding-top: 12px !important; padding-bottom: 6px !important; }

@media (prefers-reduced-motion: reduce) {
    .ledger-cell.flash, .ledger-cell.enter, .ledger-cell.leaving, .toast-timer { animation: none !important; }
    .progress > span, .ring-arc, .donut-slice, .chart-line, .chart-fill, .chart-dot, .fab .icon { transition: none !important; }
}

/* ---- Round three motion, approved from the demo (26 October 2026) --------------------------- */

/* The canvas behind page changes matches the page, so a sliding page never flashes white. */
html { background: var(--background); }

/* 1 and 2: pages inside a tab slide in from the right and Back slides them away; a card can grow
   into its page instead. The bottom bar, add button and message stay still. */
html.vt-nav .bottom-nav { view-transition-name: kn-dock; }
html.vt-nav .fab-host { view-transition-name: kn-fab; }
html.vt-nav .toast { view-transition-name: kn-toast; }
html.vt-running .scrim, html.vt-running .modal { animation: none !important; }
.kn-entered:not(.flash-card) { animation: none !important; }
@keyframes kn-push-in { from { transform: translateX(100%); } }
@keyframes kn-push-out { to { transform: translateX(-25%); opacity: 0.4; } }
@keyframes kn-pop-in { from { transform: translateX(-25%); opacity: 0.4; } }
@keyframes kn-pop-out { to { transform: translateX(100%); } }
@keyframes kn-axis-in { from { transform: translateX(var(--axis)); opacity: 0; } }
@keyframes kn-axis-out { to { transform: translateX(calc(var(--axis) * -1)); opacity: 0; } }
html.nav-forward::view-transition-old(root), html.nav-forward::view-transition-new(root),
html.nav-back::view-transition-old(root), html.nav-back::view-transition-new(root) { mix-blend-mode: normal; }
html.nav-forward::view-transition-old(root) { animation: kn-push-out 320ms cubic-bezier(.2, .8, .2, 1) both; }
html.nav-forward::view-transition-new(root) { animation: kn-push-in 320ms cubic-bezier(.2, .8, .2, 1) both; }
html.nav-back::view-transition-old(root) { animation: kn-pop-out 280ms cubic-bezier(.4, 0, .2, 1) both; z-index: 1; }
html.nav-back::view-transition-new(root) { animation: kn-pop-in 280ms cubic-bezier(.4, 0, .2, 1) both; }
/* Wide windows move a short distance and fade, so a whole desktop page never sweeps across. */
@media (min-width: 840px) {
    html.nav-forward::view-transition-old(root) { --axis: 48px; animation: kn-axis-out 200ms cubic-bezier(.4, 0, 1, 1) both; }
    html.nav-forward::view-transition-new(root) { --axis: 48px; animation: kn-axis-in 280ms cubic-bezier(0, 0, .2, 1) 60ms both; }
    html.nav-back::view-transition-old(root) { --axis: -48px; animation: kn-axis-out 200ms cubic-bezier(.4, 0, 1, 1) both; z-index: auto; }
    html.nav-back::view-transition-new(root) { --axis: -48px; animation: kn-axis-in 280ms cubic-bezier(0, 0, .2, 1) 60ms both; }
}

/* 3: dialogs, sheets, Filters, menus and messages animate out. The leaving copy is inert. */
@keyframes kn-fade-out { to { opacity: 0; } }
@keyframes kn-dialog-out { to { opacity: 0; transform: translateY(8px) scale(0.96); } }
@keyframes kn-sheet-out { to { transform: translateY(100%); } }
@keyframes kn-hub-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes kn-menu-out { to { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@keyframes kn-toast-out { to { opacity: 0; transform: translate(-50%, 16px); } }
.kn-ghost { pointer-events: none !important; }
.kn-ghost.kn-leave-dialog { animation: kn-fade-out 180ms ease-in forwards !important; }
.kn-ghost.kn-leave-dialog .modal, .kn-ghost.kn-leave-dialog .palette { animation: kn-dialog-out 180ms cubic-bezier(.4, 0, 1, 1) forwards !important; }
.kn-ghost.kn-leave-sheet { animation: kn-fade-out 220ms ease-in forwards !important; }
.kn-ghost.kn-leave-sheet .sheet { animation: kn-sheet-out 220ms cubic-bezier(.4, 0, 1, 1) forwards !important; }
.kn-ghost.kn-leave-hub { animation: kn-hub-out 200ms cubic-bezier(.4, 0, 1, 1) forwards !important; }
.kn-ghost.kn-leave-menu { animation: kn-menu-out 130ms ease-in forwards !important; }
.kn-ghost.kn-leave-toast { animation: kn-toast-out 180ms ease-in forwards !important; }

/* 4: the bottom-bar highlight and segmented thumbs glide to the chosen item. */
.nav-pill {
    position: absolute; left: 0; top: 0; bottom: 0; width: calc(100% / 5); pointer-events: none;
    transform: translateX(calc(var(--i, 0) * 100%));
    transition: transform 320ms cubic-bezier(.2, .8, .2, 1);
}
.nav-pill::before { content: ""; position: absolute; inset: 7px 10px; border-radius: 16px; background: color-mix(in srgb, var(--primary) 12%, transparent); }
.segmented { position: relative; }
.segmented > button { position: relative; z-index: 1; transition: color 200ms ease; }
.segmented > button[aria-selected="true"] { background: transparent; box-shadow: none; }
.segmented::before {
    content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 18px) / 3);
    border-radius: 11px; background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.18); pointer-events: none;
    transition: transform 280ms cubic-bezier(.2, .8, .2, 1);
}
.segmented.two::before { width: calc((100% - 13px) / 2); }
.segmented:has(> button:nth-child(2)[aria-selected="true"])::before { transform: translateX(calc(100% + 5px)); }
.segmented:has(> button:nth-child(3)[aria-selected="true"])::before { transform: translateX(calc(200% + 10px)); }
.segmented:not(:has(> button[aria-selected="true"]))::before { opacity: 0; }

/* 5: sections unfold and fold by height. */
.collapsible { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 260ms cubic-bezier(.2, .8, .2, 1), opacity 200ms ease; }
.collapsible.open { grid-template-rows: 1fr; opacity: 1; }
.collapsible > .collapsible-inner { min-height: 0; overflow: hidden; }
.collapsible.settled > .collapsible-inner { overflow: visible; }

/* 7: lists cascade in when a tab or section opens; only the first eight items wait. */
.stagger > * { animation: kn-page-in 320ms cubic-bezier(.2, .7, .2, 1) backwards; }
.stagger > :nth-child(2) { animation-delay: 30ms; }
.stagger > :nth-child(3) { animation-delay: 60ms; }
.stagger > :nth-child(4) { animation-delay: 90ms; }
.stagger > :nth-child(5) { animation-delay: 120ms; }
.stagger > :nth-child(6) { animation-delay: 150ms; }
.stagger > :nth-child(7) { animation-delay: 180ms; }
.stagger > :nth-child(8) { animation-delay: 210ms; }
.stagger > :nth-child(n+9) { animation: none; }

/* ---- Monthly activity: port of the app Option C page, opened from Spending this month ---- */
:root {
    --oc-page: #F7F5FF; --oc-surface: #FFFFFF; --oc-surface-2: #F0EDFF; --oc-surface-3: #FAF9FF;
    --oc-text: #181625; --oc-muted: #6F6A7E; --oc-line: #E4DFF0;
    --oc-violet: #6F4CFF; --oc-violet-soft: #ECE6FF; --oc-cyan: #087F8E; --oc-cyan-soft: #E2F7F9;
    --oc-red: #B7374D; --oc-red-soft: #FFEBEF; --oc-green: #217A4B; --oc-green-soft: #E7F6ED;
    --oc-gold: #946415; --oc-gold-soft: #FFF4DC;
}
[data-theme="dark"] {
    --oc-page: #0B0E18; --oc-surface: #141827; --oc-surface-2: #1B2033; --oc-surface-3: #101421;
    --oc-text: #F6F3FF; --oc-muted: #AAA5BA; --oc-line: #2B3145;
    --oc-violet: #9A7CFF; --oc-violet-soft: #292044; --oc-cyan: #67DBE8; --oc-cyan-soft: #15353A;
    --oc-red: #FF8796; --oc-red-soft: #3C1E29; --oc-green: #72D79B; --oc-green-soft: #173329;
    --oc-gold: #F0C46E; --oc-gold-soft: #392D19;
}
.screen.ma-screen { gap: 0; padding-top: 8px; padding-bottom: 24px; background: var(--oc-page); color: var(--oc-text); min-height: 100vh; }
.ma-screen.compact { padding-left: 12px; padding-right: 12px; }
.ma-header { min-height: 48px; margin-bottom: 12px; }
.ma-header .icon-btn { width: 40px; height: 40px; color: var(--oc-text); }
.ma-title { margin: 0; font-size: 18px; line-height: 22px; letter-spacing: -0.36px; font-weight: 500; color: var(--oc-text); }

.ma-selectors { display: flex; align-items: flex-end; gap: 8px; padding: 13px; border-radius: 19px; background: var(--oc-surface); }
.ma-selectors.compact { flex-direction: column; align-items: stretch; gap: 6px; }
.ma-field { flex: 1; min-width: 0; }
.ma-field-label { display: block; padding: 0 0 5px 2px; font-size: 11px; line-height: 14px; color: var(--oc-muted); }
.ma-select-box { position: relative; }
.ma-select-box select {
    width: 100%; min-height: 44px; appearance: none; -webkit-appearance: none; cursor: pointer;
    padding: 9px 30px 9px 10px; border-radius: 12px; border: 1px solid var(--oc-line);
    background: var(--oc-surface-3); color: var(--oc-text); font: inherit; font-size: 12px; line-height: 16px;
}
.ma-select-box select option { background: var(--oc-surface); color: var(--oc-text); }
.ma-select-icon { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); color: var(--oc-muted); pointer-events: none; display: grid; }
.ma-swap { width: 34px; height: 44px; display: grid; place-items: center; color: var(--oc-violet); flex: none; }
.ma-selectors.compact .ma-swap { width: 100%; height: 22px; }
.ma-selectors.compact .ma-swap .icon { transform: rotate(90deg); }

.ma-hero {
    margin-top: 11px; padding: 16px; border-radius: 20px; overflow: hidden;
    background:
        radial-gradient(circle at 94% 4%, color-mix(in srgb, var(--oc-cyan) 24%, transparent), transparent 62%),
        linear-gradient(135deg, var(--oc-violet-soft), var(--oc-surface));
}
.ma-hero-label { margin: 0; font-size: 11px; line-height: 14px; color: var(--oc-muted); }
.ma-hero-total { margin: 3px 0 0; font-size: 25px; line-height: 29px; letter-spacing: -0.75px; font-weight: 500; color: var(--oc-text); }
.ma-hero-compare { margin: 7px 0 0; font-size: 11px; line-height: 14px; }
.ma-tiles { display: flex; gap: 7px; margin-top: 15px; align-items: stretch; }
.ma-tiles.compact { flex-direction: column; }
.ma-tile, .ma-tile-spacer { flex: 1; min-width: 0; }
.ma-tile { display: flex; flex-direction: column; padding: 9px; border-radius: 12px; background: color-mix(in srgb, var(--oc-surface) 82%, transparent); }
.ma-tile-label { font-size: 10px; line-height: 13px; color: var(--oc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-tile-value { margin-top: 3px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-tile-compare { margin-top: 3px; font-size: 9px; line-height: 11px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ma-tiles.compact .ma-tile { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; }
.ma-tiles.compact .ma-tile-value { margin-top: 0; }
.ma-tiles.compact .ma-tile-compare { grid-column: 1 / -1; }

.ma-section { gap: 10px; align-items: flex-end; margin: 18px 2px 8px; }
.ma-section-title { margin: 0; font-size: 14px; line-height: 18px; font-weight: 500; color: var(--oc-text); }
.ma-section-caption { font-size: 10px; line-height: 13px; color: var(--oc-muted); text-align: end; max-width: 55%; }
.ma-selection { gap: 10px; min-height: 46px; padding: 0 6px 0 13px; margin-bottom: 8px; border-radius: 13px; background: var(--oc-violet-soft); color: var(--oc-violet); font-size: 11px; line-height: 14px; font-weight: 500; }
.ma-selection .btn.text { color: var(--oc-violet); min-height: 40px; }

.ma-ledger { border-radius: 18px; overflow: hidden; background: var(--oc-surface); }
.ma-group + .ma-group { border-top: 8px solid var(--oc-page); }
.ma-group-head { gap: 9px; padding: 11px 12px; background: var(--oc-surface-2); cursor: pointer; }
.ma-group-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ma-left { flex: 0.82; min-width: 0; }
.ma-right { flex: 1.18; min-width: 0; align-items: flex-end; text-align: end; }
.ma-group-title { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--oc-text); }
.ma-group-sub { margin-top: 2px; font-size: 10px; line-height: 12px; color: var(--oc-muted); }
.ma-group-amount { font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.ma-small-compare { margin-top: 2px; font-size: 9px; line-height: 11px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ma-divider { height: 1px; margin: 0 12px; background: var(--oc-line); }
.ma-category { gap: 10px; min-height: 52px; padding: 9px 12px; cursor: pointer; }
.ma-category.dimmed { opacity: 0.62; }
.ma-check { width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--oc-muted); display: grid; place-items: center; flex: none; color: #fff; }
.ma-check.on { background: var(--oc-violet); border-color: var(--oc-violet); }
.ma-category-name { font-size: 11px; line-height: 14px; font-weight: 500; color: var(--oc-text); }
.ma-deleted { margin-top: 2px; font-size: 9px; line-height: 11px; color: var(--oc-muted); }
.ma-presence { align-self: flex-start; margin-top: 3px; padding: 2px 5px; border-radius: 6px; background: var(--oc-gold-soft); color: var(--oc-gold); font-size: 8px; line-height: 10px; }
.ma-category-amount { font-size: 11px; line-height: 14px; font-weight: 500; white-space: nowrap; }
.ma-group-head:focus-visible, .ma-category:focus-visible { outline: 2px solid var(--oc-violet); outline-offset: -2px; }

.ma-empty-rows { margin: 0; padding: 16px; border-radius: 15px; background: var(--oc-surface); color: var(--oc-muted); font-size: 12px; }
.ma-day { margin: 0; padding: 5px 2px 6px; font-size: 10px; line-height: 13px; font-weight: 500; color: var(--oc-muted); }
.ma-transaction { margin-bottom: 7px; padding: 10px; border-radius: 15px; background: var(--oc-surface); }
.ma-transaction-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--oc-violet-soft); color: var(--oc-violet); }
.ma-transaction-text { min-width: 0; padding: 0 10px; }
.ma-transaction-title { font-size: 11px; line-height: 14px; font-weight: 500; color: var(--oc-text); }
.ma-transaction-meta { margin-top: 2px; font-size: 9px; line-height: 12px; color: var(--oc-muted); }
.ma-transaction-amount { font-size: 11px; line-height: 14px; font-weight: 500; text-align: end; white-space: nowrap; }
.card.flash-card { animation: kn-flash-card 1.6s ease-out 1; }
@keyframes kn-flash-card { 0%, 100% { box-shadow: none; } 25% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 60%, transparent); } }
@media (prefers-reduced-motion: reduce) { .card.flash-card { animation: none; } }

/* Spending constellation page (port of SpendingConstellationScreen). */
.screen.constellation-page { gap: 14px; padding-bottom: 24px; }
.constellation-head { padding: 12px; border-radius: 28px; background: var(--surface-container-low); border: 1px solid color-mix(in srgb, var(--outline-variant) 64%, transparent); }
.constellation-total { padding: 16px 18px; border-radius: 28px; background: color-mix(in srgb, var(--primary-container) 48%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent); }
.constellation-card { padding: 14px 16px; border-radius: 28px; background: var(--surface-container); border: 1px solid color-mix(in srgb, var(--outline-variant) 62%, transparent); }
.history-month { cursor: pointer; }
.history-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none; }
.status-badge { align-self: flex-start; margin-top: 4px; padding: 3px 8px; border-radius: 999px; background: var(--surface-container-highest); color: var(--outline); font-size: 11px; line-height: 14px; }

/* Fixed Deposit portfolio (port of FixedDepositPortfolioScreen). */
.screen.fd-page { gap: 12px; padding-left: 16px; padding-right: 16px; padding-bottom: 24px; }
@media (min-width: 840px) { .screen.fd-page { padding-left: 32px; padding-right: 32px; } }
.fd-summary { display: flex; flex-direction: column; padding: 18px; border-radius: 28px; color: var(--on-primary); background: linear-gradient(135deg, var(--primary), var(--secondary), color-mix(in srgb, var(--primary) 82%, transparent)); }
.fd-summary-muted { color: color-mix(in srgb, var(--on-primary) 80%, transparent); }
.fd-stat { border-top: 1px solid color-mix(in srgb, var(--on-primary) 25%, transparent); padding-top: 8px; min-width: 0; }
.fd-card { border-radius: 28px; background: var(--surface-container-low); border: 1px solid color-mix(in srgb, var(--outline-variant) 72%, transparent); overflow: hidden; }
.fd-card-head { gap: 11px; padding: 13px; cursor: pointer; }
.fd-mark { width: 40px; height: 40px; border-radius: 16px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--primary-container) 72%, transparent); color: var(--primary); font-size: 11px; font-weight: 700; }
.fd-mark.muted-mark { background: var(--surface-container-highest); color: var(--on-surface-variant); }
.fd-account { gap: 9px; padding: 11px 14px 8px; }
.fd-row { margin: 4px 10px; padding: 12px; border-radius: 16px; background: var(--surface-container); }
.fd-row:last-child { margin-bottom: 10px; }
.fd-progress { height: 5px; margin-top: 9px; border-radius: 99px; overflow: hidden; background: var(--surface-container-highest); }
.fd-progress > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }

/* Money owed (ports of ReceivablesScreen, ReceivableDetailScreen and person pages). */
.owed-status { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--c); background: var(--surface-container-high); border: 1px solid color-mix(in srgb, var(--c) 34%, transparent); }
.owed-overdue { width: fit-content; gap: 7px; margin-top: 14px; padding: 7px 12px; border-radius: 999px; background: var(--error-container); color: var(--on-error-container); }

/* Activity details: linked-refund summary button and list (port of ActivityLinkedRefundListDialog). */
.btn.linked-refund-summary { display: flex; align-items: center; gap: 12px; height: auto; min-height: 56px; padding: 10px 16px; color: var(--on-surface); }
.linked-refund { gap: 12px; padding: 12px 0; border-top: 1px solid var(--outline-variant); cursor: pointer; border-radius: 8px; }
.linked-refund:hover { background: color-mix(in srgb, var(--on-surface) 6%, transparent); }
.linked-refund:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Card EMI plans (port of EmiPlansForCardDialog). */
.card-emi-plan { display: flex; flex-direction: column; gap: 5px; padding: 13px; border-radius: 16px; background: var(--surface-container-high); border: 1px solid var(--outline-variant); cursor: pointer; }
.card-emi-plan.needs-review { border-color: color-mix(in srgb, var(--error) 50%, transparent); }
.card-emi-plan:hover { background: color-mix(in srgb, var(--on-surface) 6%, var(--surface-container-high)); }
.card-emi-plan:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.card-emi-plan + .card-emi-plan { margin-top: 8px; }
.emi-status { flex: none; padding: 4px 8px; border-radius: 999px; font-size: 11px; line-height: 14px; font-weight: 500; background: var(--surface-container-highest); color: var(--on-surface); }
.emi-status.active { background: var(--primary-container); color: var(--on-primary-container); }
.info-panel { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--surface-container-high); }

/* Account statement (port of AccountStatementScreen and its filter screen). */
.statement-identity { gap: 1px; padding: 4px 4px 0; }
.statement-note { padding: 12px; border-radius: 14px; background: var(--surface-container-high); color: var(--on-surface-variant); font-size: 14px; line-height: 20px; }
.statement-filter-control { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--outline-variant); background: var(--surface-container-high); color: var(--on-surface); text-align: start; cursor: pointer; }
.statement-filter-control:hover { background: color-mix(in srgb, var(--on-surface) 5%, var(--surface-container-high)); }
.statement-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface-container); border: 1px solid var(--outline-variant); }
.statement-card h2, .statement h2, .statement-filter h2 { margin: 0; }
.statement-value { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px; border-radius: 12px; background: var(--surface-container-highest); }
.statement-metric { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px; border-radius: 14px; border: 1px solid var(--outline-variant); background: var(--surface-container); color: var(--on-surface); text-align: start; cursor: pointer; }
.statement-metric.selected { background: var(--primary-container); border-color: var(--primary); }
.statement-metric:hover:not(.selected) { background: color-mix(in srgb, var(--on-surface) 5%, var(--surface-container)); }
.statement-applied { gap: 4px; padding: 0 4px 0 12px; border-radius: 12px; background: var(--secondary-container); color: var(--on-secondary-container); }
.statement-year { margin: 8px 0 0; font-size: 22px; line-height: 28px; font-weight: 700; }
.statement-month { margin: 4px 0 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--primary); }
.statement-date { margin: 3px 0 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--on-surface-variant); }
.statement-row { display: flex; align-items: center; padding: 12px; border-radius: 18px; background: var(--surface-container); border: 1px solid var(--outline-variant); cursor: pointer; }
.statement-row:hover { background: color-mix(in srgb, var(--on-surface) 5%, var(--surface-container)); }
.statement-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.statement-amount { flex: none; padding: 4px 7px; border-radius: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--c, var(--on-surface-variant)); background: color-mix(in srgb, var(--c, var(--on-surface-variant)) 12%, transparent); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.segmented.two { grid-template-columns: repeat(2, 1fr); }
.statement-radios { display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--outline-variant); overflow: hidden; }
.statement-radio { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 16px; border: 0; background: transparent; color: var(--on-surface); text-align: start; cursor: pointer; }
.statement-radio + .statement-radio { border-top: 1px solid var(--outline-variant); }
.statement-radio:hover { background: color-mix(in srgb, var(--on-surface) 5%, transparent); }
.radio-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--on-surface-variant); }
.radio-dot.on { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 0 5px, transparent 6px); }

/* Institutions (port of ManageBanksDialog). */
.managed-bank { display: flex; flex-direction: column; gap: 4px; padding: 9px 10px; }

/* EMI plan details (port of EmiPlanDetailsDialog). */
.emi-details-head { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--primary-container) 48%, transparent); }
.emi-fact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; align-items: baseline; }
.emi-timeline-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface-container-high); border: 1px solid var(--outline-variant); }
.emi-timeline-row + .emi-timeline-row { margin-top: 8px; }
.emi-timeline-row.review { border-color: color-mix(in srgb, var(--error) 50%, transparent); }

/* Change history (port of ChangeHistoryScreen). */
.history-filters { display: flex; flex-direction: column; gap: 12px; }
.history-filters .btn.text { align-self: flex-start; }
.history-year { margin: 4px 0 0; font-size: 24px; line-height: 32px; font-weight: 700; }
.history-month { margin: 0; font-size: 22px; line-height: 28px; font-weight: 400; color: var(--primary); }
.history-date { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.history-badge { padding: 4px 9px; border-radius: 999px; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }

/* Saved typed holdings in Edit category (port of SavedTypedHoldingsSummary). */
.saved-holdings { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: var(--surface-container-high); }

/* Statement period endpoints stack when the content is narrower than 340 px (16 px gutters). */
.period-endpoints > * { min-width: 0; }
@media (max-width: 371px) { .period-endpoints { grid-template-columns: 1fr; } }

/* Demo sign-in (approved from mock-ups, 3 November 2026): sign in, email code, new account with a
 * live password checklist (option B) and the one-time recovery key. */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; padding: 24px 16px 48px; }
.auth-wrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.auth-wrap .notice { margin: 0; text-align: center; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: min(6vh, 48px); }
.auth-card { --pad: 24px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1:focus { outline: none; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-sub { margin: -6px 0 0; color: var(--on-surface-variant); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.auth-alt { margin: 0; text-align: center; color: var(--on-surface-variant); font-size: 13px; }
.auth-hint { margin: 0; text-align: center; color: var(--on-surface-variant); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.auth-hint .link-btn { font-size: inherit; }
.field-box.has-action input { padding-right: 56px; }
.field-box.has-action input:focus { padding-right: 55px; }
.field-box .field-action { position: absolute; right: 4px; top: 4px; color: var(--on-surface-variant); }
.code-boxes { display: flex; gap: 8px; justify-content: center; }
.code-boxes input {
    flex: 1; min-width: 0; max-width: 52px; height: 56px; padding: 0;
    border: 1px solid var(--outline); border-radius: 14px; background: transparent; outline: none;
    text-align: center; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.code-boxes input:focus { border: 2px solid var(--primary); }
.code-boxes.invalid input { border-color: var(--error); }
.pw-rules { list-style: none; margin: -4px 0 0; padding: 0 4px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 18px; }
.pw-rules li { display: flex; align-items: center; gap: 8px; color: var(--on-surface-variant); transition: color 160ms ease; }
.pw-rules li .icon { color: var(--outline); }
.pw-rules li.met { color: var(--orbit-green); }
.pw-rules li.met .icon { color: inherit; animation: kn-rule-met 220ms cubic-bezier(.2, .8, .2, 1); }
@keyframes kn-rule-met { from { transform: scale(0.6); } to { transform: scale(1); } }
.recovery-key {
    margin: 0; padding: 12px; border-radius: 14px; background: var(--surface-container-high);
    font-family: ui-monospace, "Cascadia Mono", Consolas, "Roboto Mono", monospace;
    font-size: 17px; line-height: 30px; letter-spacing: 1px; text-align: center;
    user-select: all; overflow-wrap: anywhere;
}
.key-actions { display: flex; gap: 8px; }
.key-actions .btn { flex: 1; padding: 0 12px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 20px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--primary); }
@media (prefers-reduced-motion: reduce) { .pw-rules li.met .icon { animation: none; } }
/* Sign-in follow-ups (approved 3 November 2026): S1 steps, Forgot password, warnings, W2 highlights. */
.auth-steps { display: flex; flex-direction: column; gap: 6px; margin-bottom: -4px; }
.auth-steps-text { margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--primary); }
.auth-steps-bar { display: flex; gap: 4px; }
.auth-steps-bar span { flex: 1; height: 4px; border-radius: 2px; background: var(--outline-variant); transition: background-color 220ms ease; }
.auth-steps-bar span.done { background: var(--primary); }
.auth-forgot { display: flex; justify-content: flex-end; margin: -8px 0 -4px; }
.field-warning { margin: 0; display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 18px; }
.field-warning { background: color-mix(in srgb, var(--orbit-yellow) 14%, transparent); color: var(--on-surface); }
.field-warning .icon { color: var(--orbit-yellow); flex: none; }
.auth-highlights { display: none; list-style: none; margin: 4px 0 0; padding: 0; justify-content: space-between; gap: 12px; color: var(--on-surface-variant); font-size: 13px; }
.auth-highlights li { display: flex; align-items: center; gap: 6px; }
.auth-highlights .icon { color: var(--primary); }
@media (min-width: 1024px) { .auth-highlights { display: flex; } }
.btn.sign-out { color: var(--error); border-color: color-mix(in srgb, var(--error) 60%, transparent); }
/* Reset with an email code (user direction, 3 November 2026): Send OTP inside the email field,
 * the recovery key dialog, new password twice and the Password changed page (approved P1). */
.field-box .field-text-action { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 6px 8px; white-space: nowrap; font-size: 13px; }
.field-box .field-text-action:disabled { color: var(--on-surface-variant); font-variant-numeric: tabular-nums; }
.field-box.has-action:has(.field-text-action) input { padding-right: 104px; }
.field-box.has-action:has(.field-text-action) input:focus { padding-right: 103px; }
.auth-done { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 8px 0; }
.auth-done > .icon { color: var(--orbit-green); }
.auth-highlights { justify-content: center; gap: 28px; }

/* =============================================================================================
 * Chroma tiles, approved from mock-ups on 4 November 2026 for the website only (the Android app
 * keeps its own look). Outfit type, soft tinted tiles per kind of money, an indigo balance card,
 * a lime accent, pill buttons and navigation, and a sidebar on wide windows. Only solid fills,
 * simple shadows and rounded shapes, so the same look could later be built in Jetpack Compose.
 * It changes appearance only: every screen, flow and behaviour stays as it was.
 * ============================================================================================= */
@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 400; src: url("fonts/outfit-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 500; src: url("fonts/outfit-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 600; src: url("fonts/outfit-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 700; src: url("fonts/outfit-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 400; src: url("fonts/outfit-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 500; src: url("fonts/outfit-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 600; src: url("fonts/outfit-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 700; src: url("fonts/outfit-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Money and decoration colours. The old names (mint, spent, violet, gold) keep working. */
:root {
    --font: "Outfit", "Segoe UI", Roboto, system-ui, -apple-system, Arial, sans-serif;
    --lime: #C9F27B; --on-lime: #1C2230; --ink: #1C2230; --on-ink: #FFFFFF;
    --mint: #13744B; --spent: #B5372C; --violet: #4655D8; --gold: #856100;
    --money-income: #13744B; --money-spent: #B5372C; --money-transfer: #245BA8; --money-invest: #856100; --money-others: #6A45A8;
    --tint-income: #D9F2E3; --tint-spent: #FBE1DD; --tint-transfer: #DCE8F8; --tint-invest: #F8EBC4; --tint-others: #EBE1F8;
    --hero-bg: #4655D8; --hero-fg: #FFFFFF;
    --cta-bg: #1C2230; --cta-fg: #FFFFFF;
    --sel-bg: #1C2230; --sel-fg: #FFFFFF;
    --nav-bg: #1C2230; --nav-fg: #A3A8B6; --nav-on-fg: #FFFFFF;
    --side-bg: #FFFFFF;
    --notice-bg: #EAF8CB; --notice-fg: #2E4106;
    --shadow-1: 0 1px 2px rgb(28 34 48 / 0.05), 0 1px 1px rgb(28 34 48 / 0.03);
    --shadow-2: 0 10px 28px -12px rgb(28 34 48 / 0.28);
    --shadow-3: 0 24px 64px -16px rgb(16 20 32 / 0.36);
}
[data-theme="dark"] {
    --ink: #ECEDF2; --on-ink: #14161C;
    --mint: #7FDCA9; --spent: #FF9C8F; --violet: #8E9BFF; --gold: #EDC75F;
    --money-income: #7FDCA9; --money-spent: #FF9C8F; --money-transfer: #8FB8F2; --money-invest: #EDC75F; --money-others: #C2A6F2;
    --tint-income: #173426; --tint-spent: #3A1F1C; --tint-transfer: #1A2A40; --tint-invest: #352B12; --tint-others: #2B2140;
    --hero-bg: #3B47B5; --hero-fg: #FFFFFF;
    --cta-bg: #C9F27B; --cta-fg: #14161C;
    --sel-bg: #C9F27B; --sel-fg: #14161C;
    --nav-bg: #0E1015; --nav-fg: #8E94A3; --nav-on-fg: #ECEDF2;
    --side-bg: #181A21;
    --notice-bg: #26301A; --notice-fg: #D7F49C;
    --shadow-1: none;
    --shadow-2: 0 10px 28px -12px rgb(0 0 0 / 0.6);
    --shadow-3: 0 24px 64px -16px rgb(0 0 0 / 0.7);
}

/* Monthly activity follows the same palette. */
:root {
    --oc-page: var(--background); --oc-surface: var(--surface); --oc-surface-2: var(--surface-container-low); --oc-surface-3: var(--surface-container-low);
    --oc-text: var(--on-surface); --oc-muted: var(--on-surface-variant); --oc-line: var(--outline-variant);
    --oc-violet: var(--primary); --oc-violet-soft: var(--primary-container); --oc-cyan: var(--money-transfer); --oc-cyan-soft: var(--tint-transfer);
    --oc-red: var(--money-spent); --oc-red-soft: var(--tint-spent); --oc-green: var(--money-income); --oc-green-soft: var(--tint-income);
    --oc-gold: var(--money-invest); --oc-gold-soft: var(--tint-invest);
}
[data-theme="dark"] {
    --oc-page: var(--background); --oc-surface: var(--surface); --oc-surface-2: var(--surface-container-low); --oc-surface-3: var(--surface-container-low);
    --oc-text: var(--on-surface); --oc-muted: var(--on-surface-variant); --oc-line: var(--outline-variant);
    --oc-violet: var(--primary); --oc-violet-soft: var(--primary-container); --oc-cyan: var(--money-transfer); --oc-cyan-soft: var(--tint-transfer);
    --oc-red: var(--money-spent); --oc-red-soft: var(--tint-spent); --oc-green: var(--money-income); --oc-green-soft: var(--tint-income);
    --oc-gold: var(--money-invest); --oc-gold-soft: var(--tint-invest);
}

/* Base */
body, [data-theme="dark"] body {
    font-family: var(--font); letter-spacing: 0; font-size: 13.5px;
    background: var(--background); background-attachment: scroll;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.num, .ledger-amount, .ws-value, .big-value { font-variant-numeric: tabular-nums; }
.headline-large, .headline-medium, .headline-small, .title-large, .modal-title { letter-spacing: -0.3px; }
.bold { font-weight: 700; }
.boot-title span, .brand-name span { color: var(--primary); }
.brand-name { font-weight: 700; letter-spacing: -0.3px; }
.brand-tagline { color: var(--on-surface-variant); font-weight: 500; }
::selection { background: color-mix(in srgb, var(--primary) 26%, transparent); }

/* Cards and tiles */
.card, .glass, [data-theme="dark"] .glass {
    background: var(--surface); border: 0; border-radius: 22px; box-shadow: var(--shadow-1);
}
[data-theme="dark"] .card, [data-theme="dark"] .glass { border: 1px solid var(--outline-variant); }
.card.clickable:hover { border-color: transparent; }
.card.clickable:hover, .type-choice:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
[data-theme="dark"] .card.clickable:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--outline-variant)); }
.investments { background: var(--tint-invest); border: 0; border-radius: 22px; }
.summary-card { background: var(--primary-container); border: 0; border-radius: 22px; }
.hero-card { background: var(--tint-income); border: 0; border-radius: 22px; }
.detail-section { background: var(--surface-container-low); border: 0; border-radius: 18px; }
.totals-cell { border-radius: 16px; background: var(--surface-container-low); }
.empty-group, .group { border: 0; border-radius: 22px; box-shadow: var(--shadow-1); }
[data-theme="dark"] .empty-group, [data-theme="dark"] .group { border: 1px solid var(--outline-variant); }
.group-head { background: var(--surface-container-low); }
.subhead { background: var(--surface); }
.kicker { letter-spacing: 0.8px; font-weight: 600; }
.badge { font-weight: 600; }

/* The indigo hero: Home's balance card. Colours inside are re-scoped so its text, chart and
   tooltip read on indigo in both themes. */
.card.hero-balance {
    background: var(--hero-bg); color: var(--hero-fg); border: 0; border-radius: 28px;
    box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--hero-bg) 90%, black);
    --on-surface: #FFFFFF; --on-surface-variant: rgb(255 255 255 / 0.78); --outline-variant: rgb(255 255 255 / 0.22);
    --primary: var(--lime); --secondary: #FFFFFF; --mint: var(--lime); --spent: #FFC2BA; --error: #FFC2BA;
    --surface: #FFFFFF; --outline: rgb(255 255 255 / 0.6);
}
.hero-balance .mint-text { color: var(--lime); }
.hero-balance .icon-btn:hover { background: rgb(255 255 255 / 0.12); }
.hero-balance .metric-dot { box-shadow: 0 0 0 3px rgb(255 255 255 / 0.12); }
.hero-balance .chart-tip { background: #FFFFFF; color: var(--hero-bg); }
.hero-balance .range-chip { border-color: rgb(255 255 255 / 0.3); color: rgb(255 255 255 / 0.85); }
.hero-balance .range-chip[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.hero-balance > .row:nth-of-type(2) > .col {
    background: rgb(255 255 255 / 0.12); border-radius: 16px; padding: 9px 11px;
}

/* Icons in soft round tints */
.orb, .ledger-orb, .ws-orb, .type-icon, .ma-group-icon { border-radius: 50%; }
.orb { background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.ledger-orb { background: color-mix(in srgb, var(--c) 15%, transparent); }
.avatar { background: var(--primary); color: var(--on-primary); }

/* Buttons and chips: pills */
.btn { border-radius: 999px; font-weight: 600; background: var(--cta-bg); color: var(--cta-fg); }
.btn.outlined { background: transparent; color: var(--on-surface); border: 1.5px solid var(--outline-variant); }
.btn.outlined:hover { border-color: var(--outline); }
.btn.tonal { background: var(--primary-container); color: var(--on-primary-container); }
.btn.text { background: transparent; color: var(--primary); }
.btn.danger { background: var(--error); color: var(--on-error); }
.btn:not(.outlined):not(.text):not(.tonal):not(.danger):hover { filter: brightness(1.08); }
.link-btn { color: var(--primary); }
.icon-btn:hover { background: color-mix(in srgb, var(--on-surface) 7%, transparent); }
.chip { border-radius: 999px; border: 1.5px solid var(--outline-variant); font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-fg); border-color: transparent; }
.month-chip { border-radius: 999px; border: 1.5px solid var(--outline-variant); background: var(--surface); }
.month-chip[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-fg); border-color: transparent; }
.range-chip { border-radius: 999px; }
.range-chip[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-fg); border-color: transparent; }
.pill-btn { border-radius: 999px; background: var(--surface); border: 1.5px solid var(--outline-variant); }
.tab-card { border-radius: 20px; border: 0; background: var(--surface); box-shadow: var(--shadow-1); }
.tab-card[aria-selected="true"] { background: var(--sel-bg); color: var(--sel-fg); border: 0; }
.tab-card[aria-selected="true"] .tab-meta { color: inherit; opacity: 0.75; }
[data-theme="dark"] .tab-card { border: 1px solid var(--outline-variant); }
.segmented { border-radius: 999px; background: var(--surface-container-high); }
.segmented button { border-radius: 999px; }
.segmented::before { border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-1), 0 1px 3px rgb(0 0 0 / 0.12); }
.type-choice { border-radius: 18px; border: 0; background: var(--surface-container-low); }
.type-choice.prominent { border: 0; background: var(--primary-container); border-radius: 22px; }
.summary-row { border-radius: 16px; border: 1.5px solid var(--outline-variant); }
.swatch[aria-pressed="true"] { outline-color: var(--on-surface); }
.day.on { background: var(--sel-bg); color: var(--sel-fg); }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }

/* Fields */
.field-box input, .field-box select, .field-box textarea {
    border-radius: 16px; border: 1.5px solid var(--outline-variant); background: var(--surface);
}
.field-box input:hover, .field-box select:hover, .field-box textarea:hover { border-color: var(--outline); }
.field-box input:focus, .field-box select:focus, .field-box textarea:focus {
    border: 1.5px solid var(--primary); padding: 16px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}
.field-box.has-action input:focus { padding-right: 56px; }
.field-box.has-action:has(.field-text-action) input:focus { padding-right: 104px; }
.field-box > label { background: var(--field-bg, var(--surface)); border-radius: 4px; }
.field-box select { background-color: var(--field-bg, var(--surface)); }
.inline-error { border-radius: 14px; }
.search { border-radius: 999px; border: 1.5px solid var(--outline-variant); background: var(--surface); }
.search:focus-within { border: 1.5px solid var(--primary); padding-left: 16px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }

/* Activity ledger */
.ledger-cell { background: var(--surface); border-color: var(--outline-variant); }
.ledger-cell:first-child { border-radius: 22px 22px 0 0; }
.ledger-cell:last-child { border-radius: 0 0 22px 22px; }
.ledger-cell:only-child { border-radius: 22px; }
.ledger-cell:hover { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.ledger-cell.selected { background: color-mix(in srgb, var(--primary) 9%, var(--surface)); box-shadow: inset 4px 0 0 var(--primary); }
.ledger-title { font-weight: 500; }
.ledger-amount { font-weight: 600; }
.details-panel { border: 0; border-radius: 24px; box-shadow: var(--shadow-2); }
[data-theme="dark"] .details-panel { border: 1px solid var(--outline-variant); }
@media (min-width: 1024px) {
    .activity-toolbar { background: color-mix(in srgb, var(--background) 92%, transparent); }
}

/* Dialogs, sheets, menus, messages */
.scrim, .sheet-scrim { background: rgb(14 16 22 / 0.5); }
.modal { border: 0; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-3); --field-bg: var(--surface); }
[data-theme="dark"] .modal { border: 1px solid var(--outline-variant); }
.modal.destructive { box-shadow: var(--shadow-3), inset 0 4px 0 var(--error); }
.modal-head, .modal-actions { border-color: var(--outline-variant); }
.modal-close { background: var(--surface-container-high); }
.sheet { border-radius: 30px 30px 0 0; background: var(--surface); }
.menu { border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-2); padding: 6px; }
[data-theme="dark"] .menu { border: 1px solid var(--outline-variant); }
.menu button { border-radius: 12px; height: 44px; }
.palette { border: 0; border-radius: 24px; box-shadow: var(--shadow-3); }
.palette-item { border-radius: 14px; }
.palette-item[aria-selected="true"] { background: var(--primary-container); color: var(--on-primary-container); }
.hub-tab[aria-selected="true"] { background: var(--primary-container); color: var(--on-primary-container); }
.toast { border-radius: 20px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-3); }
.toast .btn.text { color: var(--lime); }
[data-theme="dark"] .toast .btn.text { color: #3B47B5; }
.toast-timer { background: var(--lime); }
.chart-tip, .bar-tip { background: var(--ink); color: var(--on-ink); border-radius: 10px; }
.notice { background: var(--notice-bg); color: var(--notice-fg); border-radius: 999px; padding: 7px 14px; }
kbd { border-radius: 8px; }

/* Floating actions: lime */
.fab { background: var(--lime); color: var(--on-lime); box-shadow: 0 10px 24px -10px rgb(0 0 0 / 0.45); }
.fab-extended { background: var(--lime); color: var(--on-lime); border-radius: 999px; box-shadow: 0 10px 24px -10px rgb(0 0 0 / 0.45); font-weight: 600; }

/* Bottom bar: a dark pill; the chosen tab's icon sits in a lime pill. */
.bottom-nav { background: var(--nav-bg); border: 0; border-radius: 999px; box-shadow: 0 14px 34px -14px rgb(0 0 0 / 0.55); }
.nav-item { color: var(--nav-fg); border-radius: 999px; font-weight: 500; }
.nav-item[aria-current="page"] { color: var(--nav-on-fg); }
.nav-item[aria-current="page"] .icon { color: var(--on-lime); }
.nav-item:hover { background: transparent; color: var(--nav-on-fg); }
.nav-pill::before { inset: 8px 50% auto auto; width: 52px; height: 30px; transform: translateX(50%); border-radius: 999px; background: var(--lime); }
.nav-brand { display: none; }

/* Wide windows: a sidebar with the logo, the five tabs and the add button (approved). */
@media (min-width: 1024px) {
    .app { padding-left: 248px; }
    .main { padding-bottom: 48px; }
    .bottom-nav {
        top: 16px; bottom: 16px; left: 16px; right: auto; width: 216px; height: auto; transform: none;
        display: flex; flex-direction: column; padding: 18px 12px; border-radius: 28px;
        background: var(--side-bg); box-shadow: var(--shadow-1);
    }
    [data-theme="dark"] .bottom-nav { border: 1px solid var(--outline-variant); }
    .nav-brand { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 8px; margin-bottom: 18px; }
    .nav-brand .brand-name { font-size: 19px; line-height: 24px; color: var(--on-surface); }
    .nav-item {
        flex-direction: row; justify-content: flex-start; gap: 12px; height: 48px; width: 100%; flex: none;
        padding: 0 16px; font-size: 14.5px; line-height: 20px; color: var(--on-surface-variant); position: relative; z-index: 1;
    }
    .nav-item:hover { color: var(--on-surface); background: color-mix(in srgb, var(--on-surface) 5%, transparent); }
    .nav-item[aria-current="page"] { color: var(--on-lime); font-weight: 600; }
    .nav-item[aria-current="page"] .icon { color: var(--on-lime); }
    .nav-item .icon, .nav-item[aria-current="page"] .icon { transform: none !important; }
    .nav-pill { left: 12px; right: 12px; top: 84px; bottom: auto; width: auto; height: 48px; transform: translateY(calc(var(--i, 0) * 100%)); }
    .nav-pill::before { inset: 0; width: auto; height: auto; transform: none; border-radius: 999px; }
    .fab-host { left: 28px; right: auto; bottom: 34px; width: 192px; }
    .fab { width: 100%; height: 48px; border-radius: 999px; display: flex; gap: 8px; justify-content: center; font: 600 14px/1 var(--font); }
    .fab::after { content: attr(aria-label); }
    .fab.open .icon { transform: rotate(45deg); }
    .fab-extended { width: 100%; justify-content: center; height: 48px; }
    .toast { left: calc(50% + 124px); bottom: 24px; }
    .notice { border-radius: 999px; }
}
@media (min-width: 840px) and (max-width: 1023px) {
    .bottom-nav { width: min(520px, calc(100% - 20px)); }
}

/* Sidebar option A (approved 4 November 2026): the pin keeps the sidebar open beside the page;
 * unpinned, it shrinks to an icon rail that opens over the page on hover or keyboard focus and
 * closes when the pointer or focus leaves. Wide windows only; phones keep the bottom bar. */
.nav-pin { display: none; }
@media (min-width: 1024px) {
    .app { transition: padding-left 220ms cubic-bezier(.2, .8, .2, 1); }
    .bottom-nav { transition: width 220ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms ease; }
    .fab-host { transition: width 220ms cubic-bezier(.2, .8, .2, 1); }
    .nav-item > span:not(.icon):not(.nav-badge), .nav-brand .brand-name { white-space: nowrap; transition: opacity 160ms ease; }
    .nav-pin {
        display: grid; position: absolute; top: 25px; right: 12px; width: 34px; height: 34px; z-index: 2;
        color: var(--on-surface-variant); transition: opacity 160ms ease;
    }
    .nav-pin:hover { color: var(--on-surface); }
    .nav-pin[aria-pressed="true"] { color: var(--primary); }
    .app.rail { padding-left: 104px; }
    .app.rail .bottom-nav { overflow: hidden; box-shadow: var(--shadow-3); }
    .app.rail .nav-item { padding: 0 13.5px; }
    .app.rail ~ .toast { left: calc(50% + 52px); }
    /* Closed rail: icons only. Pointing at it or tabbing into it falls back to the full sidebar. */
    .app.rail:not(:has(.bottom-nav:hover, .bottom-nav :focus-visible, .fab-host:hover, .fab-host :focus-visible)) .bottom-nav { width: 72px; box-shadow: var(--shadow-1); }
    .app.rail:not(:has(.bottom-nav:hover, .bottom-nav :focus-visible, .fab-host:hover, .fab-host :focus-visible)) :is(.nav-item > span:not(.icon):not(.nav-badge), .nav-brand .brand-name, .nav-pin) { opacity: 0; }
    .app.rail:not(:has(.bottom-nav:hover, .bottom-nav :focus-visible, .fab-host:hover, .fab-host :focus-visible)) .nav-pin { pointer-events: none; }
    .app.rail:not(:has(.bottom-nav:hover, .bottom-nav :focus-visible, .fab-host:hover, .fab-host :focus-visible)) .fab-host { width: 48px; }
    .app.rail:not(:has(.bottom-nav:hover, .bottom-nav :focus-visible, .fab-host:hover, .fab-host :focus-visible)) .fab::after { content: none; }
    .app.rail:not(:has(.bottom-nav:hover, .bottom-nav :focus-visible, .fab-host:hover, .fab-host :focus-visible)) .fab-extended { font-size: 0; gap: 0; }
}
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
    .app, .bottom-nav, .fab-host, .nav-pin, .nav-item > span:not(.icon):not(.nav-badge), .nav-brand .brand-name { transition: none; }
}

/* Sign-in pages */
.auth-card { border-radius: 28px; box-shadow: var(--shadow-2); }
[data-theme="dark"] .auth-card { box-shadow: none; }
.auth-card h1 { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.4px; }
.auth-brand .brand-name { font-size: 22px; }
.auth-wrap .notice { border-radius: 999px; }
.code-boxes input { border-radius: 16px; border: 1.5px solid var(--outline-variant); background: var(--surface); font-family: var(--font); }
.code-boxes input:focus { border: 1.5px solid var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.auth-steps-bar span { height: 6px; border-radius: 999px; }
.auth-steps-bar span.done { background: var(--primary); }
.pw-rules li.met { color: var(--money-income); }
.field-warning { background: var(--tint-invest); color: var(--on-surface); border-radius: 14px; }
.field-warning .icon { color: var(--money-invest); }
.recovery-key { border-radius: 18px; background: var(--primary-container); color: var(--on-primary-container); }
.auth-done > .icon { color: var(--money-income); }
.auth-highlights .icon { color: var(--primary); }
.auth-highlights li { background: var(--surface); padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow-1); }
[data-theme="dark"] .auth-highlights li { border: 1px solid var(--outline-variant); }
/* With the sidebar's logo on wide windows, Home's header keeps only the greeting. */
@media (min-width: 1024px) {
    .main .brand > .icon, .main .brand .brand-name { display: none; }
    .main .brand .brand-tagline { font-size: 15px; line-height: 20px; color: var(--on-surface); font-weight: 600; margin: 0; }
}

/* =============================================================================================
 * Website home page (approved option A, "Orbit hero and bento", 4 November 2026; AGENTS.md rule
 * 260): a sticky top bar with Log in and Sign up, an orbit hero around a live balance card, a
 * moving strip of features, feature tiles with small looping demos, three steps, privacy,
 * questions and a closing call to action. Every animation stops for reduced motion.
 * ============================================================================================= */
button.auth-brand { border: 0; background: transparent; color: inherit; padding: 4px 8px; border-radius: 999px; cursor: pointer; font: inherit; }
button.auth-brand:hover { background: color-mix(in srgb, var(--on-surface) 5%, transparent); }

.lp { min-height: 100vh; background: var(--background); color: var(--on-surface); overflow-x: clip; }
.lp h1, .lp h2, .lp h3, .lp p { margin: 0; }
.lp h2:focus { outline: none; }
.lp .strong { font-weight: 600; color: var(--on-surface); }
.lp-lime { background: var(--lime); color: var(--on-lime); }
.lp-lime:hover { background: color-mix(in srgb, var(--lime) 88%, #000); }
.lp .btn .icon { transition: transform 200ms ease; }
.lp .btn:hover .icon { transform: translateX(3px); }

/* Top bar */
.lp-top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--background) 94%, transparent); transition: box-shadow 200ms ease; }
.lp-top.scrolled { box-shadow: 0 1px 0 var(--outline-variant), 0 8px 24px -18px rgb(0 0 0 / 0.4); }
.lp-top-inner { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; }
.lp-brand, .lp-foot-brand { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px 6px; border-radius: 999px; color: inherit; cursor: pointer; }
.lp-brand .brand-name { font-size: 19px; line-height: 24px; }
.lp-links { display: none; gap: 4px; margin: 0 auto; }
.lp-link { border: 0; background: transparent; color: var(--on-surface-variant); font: 500 14px/20px var(--font); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.lp-link:hover { color: var(--on-surface); background: color-mix(in srgb, var(--on-surface) 6%, transparent); }
.lp-auth { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.lp-auth .btn { padding: 0 18px; }
.lp-login { color: var(--on-surface); }
@media (min-width: 900px) { .lp-links { display: flex; } .lp-auth { margin-left: 0; } }

/* Hero */
.lp-hero { max-width: 1180px; margin: 0 auto; padding: 28px 16px 40px; display: grid; gap: 28px; align-items: center; }
.lp-hero-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lp-hero-copy > * { animation: lp-rise 700ms cubic-bezier(.2, .8, .2, 1) both; }
.lp-hero-copy > :nth-child(2) { animation-delay: 80ms; }
.lp-hero-copy > :nth-child(3) { animation-delay: 160ms; }
.lp-hero-copy > :nth-child(4) { animation-delay: 240ms; }
.lp-hero-copy > :nth-child(5) { animation-delay: 320ms; }
.lp-eyebrow { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--tint-income); color: var(--money-income); font-size: 13px; font-weight: 600; }
.lp-title { position: relative; z-index: 0; font-size: clamp(44px, 9vw, 84px); line-height: 0.98; font-weight: 700; letter-spacing: -2px; }
.lp-accent { color: var(--primary); position: relative; white-space: nowrap; }
.lp-accent::after { content: ""; position: absolute; left: 2%; right: 4%; bottom: 0.06em; height: 0.16em; border-radius: 999px; background: var(--lime); z-index: -1; transform-origin: left; animation: lp-underline 900ms 600ms cubic-bezier(.2, .8, .2, 1) both; }
.lp-lede { font-size: 17px; line-height: 27px; color: var(--on-surface-variant); max-width: 560px; }
.lp-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-ctas .btn { font-size: 15px; padding: 0 24px; }
.lp-fine { font-size: 13px; line-height: 18px; color: var(--on-surface-variant); }
@media (min-width: 900px) {
    .lp-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 48px 16px 64px; min-height: min(760px, calc(100vh - 64px)); }
}

/* Orbit */
.lp-orbit { --size: min(460px, calc(100vw - 64px)); position: relative; width: var(--size); height: var(--size); margin: 0 auto; perspective: 900px; animation: lp-fade 900ms 200ms both; }
.lp-ring { position: absolute; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--primary) 34%, transparent); animation: lp-spin 60s linear infinite; }
.lp-ring.outer { inset: 0; --r: calc(var(--size) / 2); }
.lp-ring.inner { inset: 12%; --r: calc(var(--size) * 0.38); animation-duration: 44s; animation-direction: reverse; border-style: solid; border-color: color-mix(in srgb, var(--outline-variant) 80%, transparent); }
.lp-sat { position: absolute; top: 50%; left: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a))); }
.lp-sat-chip { position: absolute; left: -23px; top: -23px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow-2); animation: lp-spin 60s linear infinite reverse; }
.lp-ring.inner .lp-sat-chip { animation-duration: 44s; animation-direction: normal; width: 40px; height: 40px; left: -20px; top: -20px; }
.k-income { background: var(--tint-income); color: var(--money-income); }
.k-spent { background: var(--tint-spent); color: var(--money-spent); }
.k-transfer { background: var(--tint-transfer); color: var(--money-transfer); }
.k-invest { background: var(--tint-invest); color: var(--money-invest); }
.k-others { background: var(--tint-others); color: var(--money-others); }
.lp-sat-chip.k-card { background: var(--surface); color: var(--primary); }
.lp-sat-chip.k-home { background: var(--lime); color: var(--on-lime); }
.lp-glow { position: absolute; inset: 26%; border-radius: 50%; background: color-mix(in srgb, var(--primary) 22%, transparent); filter: blur(40px); animation: lp-breathe 6s ease-in-out infinite; }
.lp-card {
    position: absolute; left: 50%; top: 50%; width: 58%; padding: 16px 16px 10px; border-radius: 24px;
    background: var(--hero-bg); color: var(--hero-fg); box-shadow: var(--shadow-3);
    transform: translate(-50%, -50%) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform 400ms cubic-bezier(.2, .8, .2, 1);
    display: flex; flex-direction: column; gap: 4px;
}
.lp-card-label { font-size: 12px; line-height: 16px; }
.lp-card-amount { font-size: clamp(22px, 5.6vw, 32px); line-height: 1.15; font-weight: 700; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.lp-card-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.lp-card-split > div { background: rgb(255 255 255 / 0.14); border-radius: 14px; padding: 8px 10px; min-width: 0; }
.lp-card-mini { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lp-spark { display: block; height: 46px; margin-top: 6px; }
.lp-spark svg { width: 100%; height: 100%; overflow: visible; }
.lp-spark-line { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: lp-draw 1600ms 500ms cubic-bezier(.4, 0, .2, 1) forwards; }
.lp-spark-dot { fill: var(--lime); transform-box: fill-box; transform-origin: center; opacity: 0; animation: lp-pop 400ms 2000ms both, lp-ping 2.4s 2.4s ease-out infinite; }

/* Feature strip */
.lp-marquee { border-block: 1px solid var(--outline-variant); overflow: hidden; padding: 14px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.lp-marquee-track { display: flex; width: max-content; animation: lp-marquee 48s linear infinite; }
.lp-marquee:hover .lp-marquee-track { animation-play-state: paused; }
.lp-marquee-list { display: flex; gap: 28px; padding: 0 14px; margin: 0; list-style: none; }
.lp-marquee-list li { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 15px; font-weight: 500; color: var(--on-surface-variant); }
.lp-marquee-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.lp-marquee-list li:nth-child(3n+2) .lp-marquee-dot { background: var(--money-income); }
.lp-marquee-list li:nth-child(3n) .lp-marquee-dot { background: var(--money-invest); }

/* Sections */
.lp-section { max-width: 1180px; margin: 0 auto; padding: 72px 16px 8px; }
.lp-narrow { max-width: 820px; }
.lp-head { display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin-bottom: 28px; }
.lp-kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--primary); }
.lp-head h2, .lp-privacy h2, .lp-final h2 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; font-weight: 700; letter-spacing: -1px; scroll-margin-top: 88px; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms cubic-bezier(.2, .8, .2, 1), transform 700ms cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* Bento */
.lp-bento { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.lp-tile { border-radius: 28px; padding: 22px; display: flex; flex-direction: column; gap: 8px; min-height: 230px; min-width: 0; background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid transparent; transition: opacity 700ms cubic-bezier(.2, .8, .2, 1), transform 700ms cubic-bezier(.2, .8, .2, 1), box-shadow 250ms ease; }
.lp-tile.in:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); transition-delay: 0ms; }
[data-theme="dark"] .lp-tile { border-color: var(--outline-variant); }
.lp-tile h3 { font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -0.3px; color: var(--on-surface); }
.lp-tile p { font-size: 14.5px; line-height: 21px; color: var(--on-surface-variant); }
.lp-tile.k-transfer-soft { background: var(--primary-container); }
.lp-tile.k-transfer-soft p { color: var(--on-primary-container); }
.lp-tile.k-plain { background: var(--surface); }
.lp-tile.k-income { background: var(--tint-income); }
.lp-tile.k-spent { background: var(--tint-spent); }
.lp-tile.k-transfer { background: var(--tint-transfer); }
.lp-tile.k-invest { background: var(--tint-invest); }
.lp-tile.k-others { background: var(--tint-others); }
.lp-demo { flex: 1; display: flex; align-items: center; min-height: 96px; margin-bottom: 6px; }
@media (min-width: 1024px) { .t-budget .lp-ring-demo { width: 176px; height: 176px; } .t-budget .lp-gauge-big { font-size: 34px; line-height: 38px; } }
@media (min-width: 640px) {
    .lp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .t-budget, .t-refund, .t-cards { grid-column: span 2; }
}
@media (min-width: 1024px) {
    .lp-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .t-budget { grid-column: span 2; grid-row: span 2; }
    .t-refund, .t-cards { grid-column: span 2; }
}
.lp-tile:nth-child(2), .lp-tile:nth-child(5) { transition-delay: 80ms; }
.lp-tile:nth-child(3), .lp-tile:nth-child(6) { transition-delay: 160ms; }
.lp-tile:nth-child(4), .lp-tile:nth-child(7) { transition-delay: 240ms; }

/* Budget gauge and bars */
.t-budget .lp-demo { flex-wrap: wrap; gap: 24px; }
.lp-ring-demo { position: relative; width: 140px; height: 140px; flex: none; }
.lp-gauge, .lp-gauge svg { display: block; width: 100%; height: 100%; }
.lp-gauge svg { transform: rotate(-90deg); }
.lp-gauge circle { fill: none; stroke-width: 12; }
.lp-gauge-track { stroke: color-mix(in srgb, var(--money-income) 18%, transparent); }
.lp-gauge-fill { stroke: var(--money-income); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray 1400ms 300ms cubic-bezier(.2, .8, .2, 1); }
.in .lp-gauge-fill { stroke-dasharray: 42 100; }
.lp-gauge-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--on-surface-variant); }
.lp-gauge-big { font-size: 28px; line-height: 32px; font-weight: 700; color: var(--money-income); }
.lp-bars { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 12px; }
.lp-bar { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--on-surface-variant); }
.lp-bar-track { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--money-income) 16%, transparent); overflow: hidden; }
.lp-bar-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--money-income); transition: width 1200ms cubic-bezier(.2, .8, .2, 1); }
.in .lp-bar-fill { width: var(--w); }
.lp-bar:nth-child(2) .lp-bar-fill { transition-delay: 150ms; }
.lp-bar:nth-child(3) .lp-bar-fill { transition-delay: 300ms; }

/* Linked refund */
.lp-link-demo { display: flex; align-items: stretch; gap: 6px; width: 100%; max-width: 420px; }
.lp-link-line { width: 24px; flex: none; }
.lp-link-line svg { width: 100%; height: 100%; }
.lp-link-line path { fill: none; stroke: var(--money-spent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .lp-link-line path { animation: lp-draw 900ms 900ms cubic-bezier(.4, 0, .2, 1) forwards; }
.lp-rows { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lp-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 16px; background: var(--surface); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-1); }
.lp-row.late { opacity: 0; transform: translateX(16px); transition: opacity 500ms 500ms ease, transform 500ms 500ms cubic-bezier(.2, .8, .2, 1); }
.in .lp-row.late { opacity: 1; transform: none; }
.m-spent { color: var(--money-spent); font-weight: 600; }
.m-income { color: var(--money-income); font-weight: 600; }

/* Bank to cash */
.lp-move { display: flex; align-items: center; gap: 8px; width: 100%; }
.lp-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-1); flex: none; }
.lp-path { position: relative; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--money-transfer) 55%, transparent) 0 6px, transparent 6px 11px); }
.lp-coin { position: absolute; top: -6px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--money-transfer); box-shadow: 0 0 0 4px color-mix(in srgb, var(--money-transfer) 22%, transparent); }
.in .lp-coin { animation: lp-travel 2.6s cubic-bezier(.6, 0, .4, 1) infinite; }

/* FD and gold columns */
.lp-columns { display: flex; align-items: flex-end; gap: 8px; height: 96px; width: 100%; }
.lp-columns span { flex: 1; height: var(--h); border-radius: 10px 10px 4px 4px; background: color-mix(in srgb, var(--money-invest) 70%, transparent); transform: scaleY(0); transform-origin: bottom; transition: transform 900ms var(--d) cubic-bezier(.2, .8, .2, 1); }
.lp-columns span:last-child { background: var(--money-invest); }
.in .lp-columns span { transform: none; }

/* Shared limit */
.lp-limit { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.lp-limit-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--on-primary-container); }
.lp-limit-bar { display: flex; gap: 3px; height: 14px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 14%, var(--surface)); overflow: hidden; }
.lp-limit-bar span { width: 0; transition: width 1200ms cubic-bezier(.2, .8, .2, 1); }
.lp-limit-bar .seg-a { background: var(--primary); border-radius: 999px 0 0 999px; }
.lp-limit-bar .seg-b { background: var(--money-others); transition-delay: 300ms; }
.in .lp-limit-bar .seg-a { width: 34%; }
.in .lp-limit-bar .seg-b { width: 16%; }
.lp-limit-keys { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--on-primary-container); }
.lp-limit-keys > span { display: inline-flex; align-items: center; gap: 6px; }
.lp-limit-keys .key-a, .lp-limit-keys .key-b { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.lp-limit-keys .key-b { background: var(--money-others); }

/* Recurring calendar */
.lp-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; width: 100%; max-width: 220px; }
.lp-cal span { aspect-ratio: 1; border-radius: 8px; background: color-mix(in srgb, var(--on-surface) 7%, transparent); }
.lp-cal span.due { background: var(--primary); }
.in .lp-cal span.due { animation: lp-ping-box 2.4s ease-out infinite; }
.lp-cal span.due:nth-child(12) { animation-delay: 800ms; }
.lp-cal span.due:nth-child(18) { animation-delay: 1600ms; }

/* Money for others */
.lp-lent { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-1); }
.lp-lent p { font-size: 13px; }
.lp-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--money-others); color: var(--surface); font-weight: 700; }
.in .lp-lent { animation: lp-bob 4s ease-in-out infinite; }

/* Steps */
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }
.lp-steps li { position: relative; padding: 22px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--d) ease, transform 600ms var(--d) cubic-bezier(.2, .8, .2, 1); }
[data-theme="dark"] .lp-steps li { border: 1px solid var(--outline-variant); }
.lp-steps.reveal { opacity: 1; transform: none; }
.lp-steps.in li { opacity: 1; transform: none; }
.lp-steps h3 { font-size: 18px; line-height: 24px; font-weight: 700; }
.lp-steps p { font-size: 14.5px; line-height: 21px; color: var(--on-surface-variant); }
.lp-step-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--on-lime); font-weight: 700; font-size: 17px; }
@media (min-width: 900px) {
    .lp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lp-steps::before { content: ""; position: absolute; left: 42px; right: 42px; top: 42px; height: 2px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform 1200ms 300ms cubic-bezier(.2, .8, .2, 1); }
    .lp-steps.in::before { transform: none; }
    .lp-steps li { background: transparent; box-shadow: none; }
    [data-theme="dark"] .lp-steps li { border: 0; }
    .lp-step-num { position: relative; z-index: 1; box-shadow: 0 0 0 8px var(--background); }
}

/* Privacy */
.lp-privacy { border-radius: 32px; padding: 32px 22px; background: var(--nav-bg); color: #FFFFFF; display: grid; gap: 28px; }
[data-theme="dark"] .lp-privacy { border: 1px solid var(--outline-variant); }
.lp-privacy .lp-kicker { color: var(--lime); }
.lp-privacy-copy { display: flex; flex-direction: column; gap: 12px; }
.lp-privacy-copy > p:last-child { color: #C9CDD8; font-size: 16px; line-height: 24px; }
.lp-privacy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lp-privacy-list li { display: flex; gap: 14px; padding: 16px; border-radius: 20px; background: rgb(255 255 255 / 0.06); }
.lp-privacy-list .strong { color: #FFFFFF; }
.lp-privacy-list p { font-size: 14px; line-height: 20px; color: #C9CDD8; }
.lp-privacy-icon { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: #1C2230; }
@media (min-width: 900px) {
    .lp-privacy { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); padding: 48px; align-items: center; }
    .lp-privacy-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Questions */
.lp-faq { display: flex; flex-direction: column; gap: 10px; }
.lp-q { border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-1); }
[data-theme="dark"] .lp-q { border: 1px solid var(--outline-variant); }
.lp-q summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; cursor: pointer; font-size: 16px; font-weight: 600; border-radius: 20px; }
.lp-q summary::-webkit-details-marker { display: none; }
.lp-q summary .icon { color: var(--primary); transition: transform 250ms cubic-bezier(.2, .8, .2, 1); flex: none; }
.lp-q[open] summary .icon { transform: rotate(45deg); }
.lp-q p { padding: 0 20px 18px; font-size: 15px; line-height: 23px; color: var(--on-surface-variant); }
.lp-q[open] p { animation: lp-rise 300ms cubic-bezier(.2, .8, .2, 1) both; }

/* Closing call to action and footer */
.lp-final { max-width: 1148px; margin: 72px 16px 0; border-radius: 32px; padding: 44px 22px; background: var(--hero-bg); color: var(--hero-fg); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; position: relative; overflow: hidden; }
@media (min-width: 1180px) { .lp-final { margin-inline: auto; } }
.lp-final h2, .lp-final p { position: relative; z-index: 1; }
.lp-final::before, .lp-final::after { content: ""; position: absolute; border-radius: 50%; border: 1.5px dashed rgb(255 255 255 / 0.22); pointer-events: none; }
.lp-final::before { width: 520px; height: 520px; left: -200px; top: -260px; animation: lp-spin 80s linear infinite; }
.lp-final::after { width: 380px; height: 380px; right: -140px; bottom: -220px; animation: lp-spin 60s linear infinite reverse; }
.lp-final p { font-size: 17px; line-height: 26px; opacity: 0.9; max-width: 520px; }
.lp-final .lp-ctas { justify-content: center; margin-top: 6px; position: relative; z-index: 1; }
.lp-ghost { background: transparent; color: var(--hero-fg); border: 1.5px solid rgb(255 255 255 / 0.6); }
.lp-ghost:hover { background: rgb(255 255 255 / 0.1); }
.lp-footer { max-width: 1180px; margin: 0 auto; padding: 32px 16px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.lp-footer p { font-size: 13px; color: var(--on-surface-variant); }
.lp-foot-brand { cursor: default; padding: 0; }

@keyframes lp-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes lp-fade { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes lp-spin { to { rotate: 360deg; } }
@keyframes lp-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lp-draw { to { stroke-dashoffset: 0; } }
@keyframes lp-pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes lp-ping { 0% { transform: scale(1); } 40% { transform: scale(1.6); } 100% { transform: scale(1); } }
@keyframes lp-ping-box { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 45%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
@keyframes lp-breathe { 0%, 100% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes lp-marquee { to { transform: translateX(-50%); } }
@keyframes lp-travel { 0% { left: 0; } 70%, 100% { left: calc(100% - 14px); } }
@keyframes lp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

@media (prefers-reduced-motion: reduce) {
    .lp *, .lp *::before, .lp *::after { animation: none !important; transition: none !important; }
    .lp .reveal, .lp .lp-steps li, .lp .lp-row.late { opacity: 1; transform: none; }
    .lp .lp-spark-line, .lp .lp-link-line path { stroke-dashoffset: 0; }
    .lp .lp-spark-dot { opacity: 1; }
    .lp-marquee-track { width: auto; }
    .lp-marquee-list[aria-hidden="true"] { display: none; }
    .lp-marquee-list { flex-wrap: wrap; row-gap: 10px; }
}

/* Hide balances from Home's header (approved option A, 4 November 2026): a second eye beside the
 * greeting; the balance card keeps its own. */
.brand .brand-eye { margin-left: auto; flex: none; width: 44px; height: 44px; border-radius: 50%; color: var(--on-surface-variant); background: var(--surface); box-shadow: var(--shadow-1); }
[data-theme="dark"] .brand .brand-eye { border: 1px solid var(--outline-variant); }
.brand .brand-eye:hover { color: var(--on-surface); }
.brand .brand-eye[aria-pressed="true"] { color: var(--primary); }
@media (min-width: 1024px) {
    .main .brand .greeting-sep { display: none; }
    .main .brand .greeting-date { display: block; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--on-surface-variant); }
}

/* Feature tour (approved option A, "Spotlight on the real app", 4 November 2026; AGENTS.md rules
 * 262 and 263): the app dims, a lime ring sits on the control being explained and a card explains
 * it. Keep the steps in FeatureTour.kt current whenever website features change. */
.tour { position: fixed; inset: 0; z-index: 70; }
.tour-shield { position: absolute; inset: 0; background: transparent; }
.tour-shield.dim { background: rgb(14 16 22 / 0.58); animation: kn-fade-in 200ms ease both; }
.tour-spot {
    position: absolute; pointer-events: none;
    box-shadow: 0 0 0 9999px rgb(14 16 22 / 0.58), 0 0 0 3px var(--lime), 0 0 0 7px color-mix(in srgb, var(--lime) 35%, transparent);
    transition: left 380ms cubic-bezier(.2, .8, .2, 1), top 380ms cubic-bezier(.2, .8, .2, 1), width 380ms cubic-bezier(.2, .8, .2, 1), height 380ms cubic-bezier(.2, .8, .2, 1), border-radius 380ms ease;
}
/* The pulse lives on its own ring: animating the dimming shadow itself washed the dim out. */
.tour-spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; animation: tour-pulse 2.2s ease-out infinite; }
.tour-card {
    position: absolute; width: min(360px, calc(100vw - 32px));
    background: var(--surface); color: var(--on-surface); border-radius: 24px; padding: 18px 18px 12px;
    box-shadow: var(--shadow-3); display: flex; flex-direction: column; gap: 10px;
    animation: tour-card-in 260ms cubic-bezier(.2, .8, .2, 1) both;
}
[data-theme="dark"] .tour-card { border: 1px solid var(--outline-variant); }
.tour-card:focus { outline: none; }
.tour-card.centred { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)); padding: 24px 22px 14px; animation-name: tour-card-in-centre; }
.tour-count { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.4px; color: var(--primary); }
.tour-title { margin: 2px 0 0; font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -0.3px; }
.tour-card.centred .tour-title { font-size: 24px; line-height: 30px; }
.tour-body { margin: 6px 0 0; font-size: 14.5px; line-height: 21px; color: var(--on-surface-variant); }
.tour-dots { display: flex; gap: 5px; }
.tour-dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--outline-variant); transition: width 250ms ease, background-color 250ms ease; }
.tour-dots span.seen { background: color-mix(in srgb, var(--primary) 45%, transparent); }
.tour-dots span.on { width: 18px; background: var(--primary); }
.tour-actions { display: flex; align-items: center; gap: 4px; margin: 0 -6px; }
.tour-actions .btn.text { padding: 0 12px; }
.tour-skip { color: var(--on-surface-variant) !important; }
.tour-next { padding: 0 20px; }
@keyframes tour-pulse { 0% { box-shadow: 0 0 0 3px rgb(201 242 123 / 0.7); } 70%, 100% { box-shadow: 0 0 0 14px rgb(201 242 123 / 0); } }
@keyframes tour-card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tour-card-in-centre { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.tour.still .tour-spot, .tour.still .tour-spot::after, .tour.still .tour-card, .tour.still .tour-shield { animation: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-spot::after, .tour-card, .tour-shield.dim { animation: none !important; transition: none !important; } }

/* =============================================================================================
 * Motion round four (approved from playable mock-ups on 6 November 2026; AGENTS.md rule 264):
 * portal A into Log in and Sign up, the self-checking email code, the decoding recovery key,
 * drawn password ticks, the theme circle reveal, Save becoming a tick and Home's first arrival.
 * The amount scramble, eye blink and error nudge run from Motion.kt. All of it stops for
 * reduced motion.
 * ============================================================================================= */

/* Portal: a layer that grows from a button, covers the page, or ripples out from a point. */
.kn-portal { position: fixed; z-index: 95; pointer-events: auto; }
.kn-portal.grow {
    transition: left 460ms cubic-bezier(.7, 0, .2, 1), top 460ms cubic-bezier(.7, 0, .2, 1), width 460ms cubic-bezier(.7, 0, .2, 1),
        height 460ms cubic-bezier(.7, 0, .2, 1), border-radius 460ms cubic-bezier(.7, 0, .2, 1), opacity 180ms ease;
}
.kn-portal.cover { opacity: 0; transition: opacity 180ms ease; }
.kn-portal.cover.shown { opacity: 1; }
.kn-portal.cover.grow {
    transition: left 460ms cubic-bezier(.7, 0, .2, 1), top 460ms cubic-bezier(.7, 0, .2, 1), width 460ms cubic-bezier(.7, 0, .2, 1),
        height 460ms cubic-bezier(.7, 0, .2, 1), border-radius 460ms cubic-bezier(.7, 0, .2, 1), opacity 180ms ease;
}
.kn-portal.ripple { transform: scale(0); transition: transform 560ms cubic-bezier(.7, 0, .3, 1); }
.kn-portal.ripple.spread { transform: scale(1); }
.kn-portal.fade { opacity: 0 !important; pointer-events: none; transition: opacity 320ms ease !important; }

/* Email code: red and shaking when wrong; green, merging into one circle that draws a tick. */
.code-boxes { position: relative; }
.code-boxes input { transition: border-color 200ms ease, background-color 200ms ease, color 150ms ease, transform 420ms cubic-bezier(.6, 0, .3, 1), border-radius 300ms ease, opacity 200ms ease; }
.code-boxes.wrong input, .code-boxes.wrong input:focus { border-color: var(--money-spent); background: var(--tint-spent); color: var(--money-spent); box-shadow: none; }
.code-boxes.right input, .code-boxes.right input:focus { border-color: var(--money-income); background: var(--tint-income); color: var(--money-income); box-shadow: none; caret-color: transparent; }
.code-boxes.merged input { transform: translateX(var(--dx, 0px)); border-radius: 50%; background: var(--money-income); color: transparent; }
.code-boxes.ticked input { opacity: 0; }
.code-tick {
    position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%;
    background: var(--money-income); display: grid; place-items: center; pointer-events: none;
    opacity: 0; transform: scale(.5); transition: opacity 180ms ease, transform 340ms cubic-bezier(.2, 1.5, .4, 1);
}
.code-tick svg { width: 32px; height: 32px; }
.code-tick path { fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 380ms ease 160ms; }
.code-boxes.ticked .code-tick { opacity: 1; transform: scale(1); animation: code-tick-ring 900ms ease-out 200ms; }
.code-boxes.ticked .code-tick path { stroke-dashoffset: 0; }
@keyframes code-tick-ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--money-income) 45%, transparent); } to { box-shadow: 0 0 0 18px transparent; } }

/* Recovery key: groups scramble, then lock in with a small pop; Copy pops a tick. */
.recovery-key .key-group { display: inline-block; font-variant-numeric: tabular-nums; }
.recovery-key.decoding .key-group:not(.locked) { opacity: .5; }
.recovery-key .key-group.locked { animation: key-lock 280ms cubic-bezier(.2, 1.4, .4, 1); }
@keyframes key-lock { from { transform: scale(1.18); color: var(--primary); } to { transform: none; } }
.key-actions .btn.copied .icon { color: var(--money-income); animation: rule-pop 320ms cubic-bezier(.2, 1.5, .4, 1); }

/* Password rules: the met circle pops and its tick draws itself; all five met sweeps green. */
.rule-tick svg circle { fill: currentColor; transform-box: fill-box; transform-origin: center; animation: rule-pop 260ms cubic-bezier(.2, 1.5, .4, 1) both; }
.rule-tick svg path { fill: none; stroke: var(--surface); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: lp-draw 280ms ease-out 140ms forwards; }
@keyframes rule-pop { from { transform: scale(.3); } to { transform: scale(1); } }
.pw-rules { position: relative; }
.pw-rules.all-met::after {
    content: ""; position: absolute; inset: -6px -4px; border-radius: 14px; pointer-events: none;
    background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--money-income) 26%, transparent) 50%, transparent 70%);
    background-size: 250% 100%; animation: pw-sweep 900ms ease-out forwards;
}
@keyframes pw-sweep { from { background-position: 120% 0; opacity: 1; } 80% { opacity: 1; } to { background-position: -60% 0; opacity: 0; } }

/* Light and dark: the new theme grows as a circle from the chip (the clip is animated from Kotlin). */
html.vt-reveal::view-transition-old(root), html.vt-reveal::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.vt-reveal::view-transition-new(root) { z-index: 1; }

/* Save: the primary button shrinks into a green circle and a tick wipes in before the form closes. */
.modal button[type="submit"].saved {
    min-width: 0; width: 44px !important; padding: 0 !important; border-radius: 999px; position: relative; overflow: hidden;
    background: var(--money-income) !important; color: transparent !important;
    transition: width 320ms cubic-bezier(.6, 0, .3, 1), background-color 200ms ease;
}
.modal button[type="submit"].saved::after {
    content: ""; position: absolute; inset: 0; clip-path: inset(0 100% 0 0);
    background: center / 22px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.5l4.2 4.2L18.5 7.8' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    animation: save-tick 300ms ease-out 260ms forwards;
}
@keyframes save-tick { to { clip-path: inset(0 0 0 0); } }
.modal.saving { pointer-events: none; }
.modal.saving .modal-actions .btn:not(.saved) { opacity: 0; transition: opacity 180ms ease; }

/* Home's first arrival after sign-in: cards rise one after another, column by column. */
.home-grid.arriving .home-col > * { animation: kn-arrive 620ms cubic-bezier(.2, .8, .2, 1) both; }
.home-grid.arriving .home-col:nth-child(1) > :nth-child(2) { animation-delay: 70ms; }
.home-grid.arriving .home-col:nth-child(1) > :nth-child(3) { animation-delay: 140ms; }
.home-grid.arriving .home-col:nth-child(1) > :nth-child(4) { animation-delay: 210ms; }
.home-grid.arriving .home-col:nth-child(1) > :nth-child(5) { animation-delay: 280ms; }
.home-grid.arriving .home-col:nth-child(1) > :nth-child(6) { animation-delay: 350ms; }
.home-grid.arriving .home-col:nth-child(2) > :nth-child(1) { animation-delay: 90ms; }
.home-grid.arriving .home-col:nth-child(2) > :nth-child(2) { animation-delay: 160ms; }
.home-grid.arriving .home-col:nth-child(2) > :nth-child(3) { animation-delay: 230ms; }
.home-grid.arriving .home-col:nth-child(2) > :nth-child(4) { animation-delay: 300ms; }
.home-grid.arriving .home-col:nth-child(3) > :nth-child(1) { animation-delay: 180ms; }
.home-grid.arriving .home-col:nth-child(3) > :nth-child(2) { animation-delay: 250ms; }
.home-grid.arriving .home-col:nth-child(3) > :nth-child(3) { animation-delay: 320ms; }
.home-grid.arriving .home-col:nth-child(3) > :nth-child(4) { animation-delay: 390ms; }
@keyframes kn-arrive { from { opacity: 0; transform: translateY(22px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .kn-portal { display: none; }
    .code-boxes input, .code-tick, .code-tick path { transition: none !important; }
    .code-boxes.ticked .code-tick, .recovery-key .key-group.locked, .key-actions .btn.copied .icon,
    .rule-tick svg circle, .pw-rules.all-met::after, .home-grid.arriving .home-col > * { animation: none !important; }
    .rule-tick svg path { animation: none !important; stroke-dashoffset: 0; }
    .modal button[type="submit"].saved, .modal button[type="submit"].saved::after { transition: none !important; animation: none !important; }
}

/* =============================================================================================
 * Website revamp (approved from mock-ups on 6 November 2026; AGENTS.md rule 265): S1 start page
 * showcase, L1 split-screen Log in and Sign up, H1 Home command centre, A1 Activity month rail,
 * M1 page heads and richer cards, P1 Log out. Website only; the Android app is unchanged.
 * ============================================================================================= */

/* ---------- P1: Log out ---------- */
.btn.log-out .icon { transition: transform 220ms cubic-bezier(.2, .8, .2, 1); }
.btn.log-out:hover .icon, .btn.log-out:focus-visible .icon { transform: translateX(4px); }
.logout-art { position: relative; width: 120px; height: 120px; margin: 4px auto 6px; display: grid; place-items: center; }
.logout-orbit { position: absolute; inset: 8px; border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, transparent); border-radius: 50%; animation: lp-spin 9s linear infinite; }
.logout-moon { position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 30%, transparent); animation: logout-drift 2.8s cubic-bezier(.5, 0, .5, 1) infinite; }
@keyframes logout-drift { 0%, 25% { transform: translate(0, 0); opacity: 1; } 75% { transform: translate(34px, -30px) scale(.6); opacity: 0; } 100% { transform: translate(0, 0); opacity: 0; } }

/* ---------- M1: page heads ---------- */
.page-head { border-radius: 26px; }
.summary-card.page-head { background: var(--tint-others); padding: 18px 20px; }
.summary-card.page-head .big-value { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.8px; color: var(--money-others); }
.recurring-head { background: var(--tint-invest) !important; border: 0 !important; }
.recurring-head .head-figure { display: flex; flex-direction: column; gap: 2px; }
.recurring-head .big-value { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.8px; color: var(--money-invest); }
.profile-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px; background: var(--primary-container); color: var(--on-primary-container); }
.profile-open { display: flex; align-items: center; gap: 14px; flex: 1 1 260px; min-width: 0; border: 0; background: transparent; color: inherit; text-align: start; padding: 4px; border-radius: 18px; cursor: pointer; }
.profile-open:hover { background: color-mix(in srgb, var(--on-surface) 5%, transparent); }
.profile-open .muted { color: color-mix(in srgb, var(--on-primary-container) 75%, transparent); }
.avatar.big { width: 56px; height: 56px; font-size: 19px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent); }
.profile-head .btn.log-out { background: var(--surface); }
[data-theme="dark"] .profile-head .btn.log-out { background: transparent; }

/* ---------- M1: richer cards ---------- */
.ws-trend { display: block; width: 72px; height: 18px; margin-top: 4px; }
.ws-trend svg { width: 100%; height: 100%; overflow: visible; }
.ws-trend path { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: lp-draw 900ms cubic-bezier(.4, 0, .2, 1) 150ms forwards; }
.ws-trend.up path { stroke: var(--money-income); }
.ws-trend.down path { stroke: var(--money-spent); }
.ws-limit { display: block; width: 72px; height: 5px; margin-top: 6px; border-radius: 999px; background: color-mix(in srgb, var(--money-others) 18%, transparent); overflow: hidden; }
.ws-limit > span { display: block; height: 100%; border-radius: inherit; background: var(--money-others); transform-origin: left; animation: kn-grow-x 800ms cubic-bezier(.2, .7, .2, 1) both; }
.due-pill { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 11px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.due-pill.soon { background: var(--tint-invest); color: var(--money-invest); }
.due-pill.later { background: var(--tint-transfer); color: var(--money-transfer); }
.due-pill.late { background: var(--tint-spent); color: var(--money-spent); }

/* ---------- H1: Home command centre ---------- */
.home-cc { display: flex; flex-direction: column; gap: 14px; }
.hero-balance.band { border-radius: 28px; }
.budget-left .metric-dot { box-shadow: 0 0 0 2px rgb(255 255 255 / 0.25); }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick-action {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px;
    border: 1px solid var(--outline-variant); border-radius: 20px; background: var(--surface); color: var(--on-surface);
    font: 600 12.5px/16px var(--font); cursor: pointer; transition: transform 200ms cubic-bezier(.2, .8, .2, 1), box-shadow 200ms ease, border-color 200ms ease;
}
.quick-action:hover:not(:disabled) { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.quick-action:active:not(:disabled) { transform: scale(.96); }
.quick-action:disabled { opacity: .45; cursor: default; }
.qa-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); transition: transform 300ms cubic-bezier(.2, 1.4, .4, 1); }
.quick-action:hover:not(:disabled) .qa-icon { transform: rotate(-8deg) scale(1.08); }
.cc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.cc-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cc-head { margin: 6px 2px 0; font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--on-surface-variant); }
.cc-money { display: flex; flex-direction: column; gap: 10px; }
.cc-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; align-items: start; }
.cc-strip .two-up { display: contents; }
@media (min-width: 1024px) {
    .hero-balance.band { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(0, 1.4fr); column-gap: 28px; align-items: start; padding: 22px 26px !important; }
    .hero-balance.band > * { grid-column: 1; }
    .hero-balance.band > .chart-head { grid-column: 2; grid-row: 1; margin-top: 0; }
    .hero-balance.band > .chart-wrap, .hero-balance.band > .sparkline, .hero-balance.band > :last-child { grid-column: 2; grid-row: 2 / span 3; align-self: stretch; }
    .hero-balance.band .chart svg { height: 120px; }
    .hero-balance.band .headline-medium { font-size: 40px; line-height: 46px; letter-spacing: -1px; }
    .quick-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .quick-action { flex-direction: row; min-height: 60px; gap: 10px; font-size: 14px; }
    .cc-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
}
/* Home's first arrival (rule 264), for the command-centre layout. */
.home-cc.arriving > *, .home-cc.arriving .cc-col > *, .home-cc.arriving .cc-strip > *, .home-cc.arriving .cc-strip .two-up > * { animation: kn-arrive 620ms cubic-bezier(.2, .8, .2, 1) both; }
.home-cc.arriving > :nth-child(2) { animation-delay: 60ms; }
.home-cc.arriving > :nth-child(3) { animation-delay: 120ms; }
.home-cc.arriving > :nth-child(4) { animation-delay: 180ms; }
.home-cc.arriving .cc-col:nth-child(1) > * { animation-delay: 240ms; }
.home-cc.arriving .cc-col:nth-child(2) > * { animation-delay: 320ms; }
.home-cc.arriving .cc-strip > *, .home-cc.arriving .cc-strip .two-up > * { animation-delay: 400ms; }

/* ---------- A1: Activity month rail ---------- */
.activity-layout { display: flex; flex-direction: column; }
.activity-main { display: contents; }
.activity-main > .activity-toolbar { order: 0; }
.activity-rail { order: 1; margin-top: 12px; }
.activity-main > .activity-body { order: 2; }
.activity-rail { background: var(--surface); border-radius: 24px; padding: 16px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 10px; }
[data-theme="dark"] .activity-rail { border: 1px solid var(--outline-variant); }
.rail-month { margin: 0; font-size: 17px; line-height: 22px; font-weight: 700; letter-spacing: -0.3px; }
.rail-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rail-fig { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 14px; background: var(--surface-container-low); min-width: 0; }
.rail-fig-label { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--on-surface-variant); }
.rail-fig-value { font-size: 14px; line-height: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-label { margin: 4px 0 0; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--on-surface-variant); }
.rail-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.rail-cal .dow { text-align: center; font-size: 10px; line-height: 14px; font-weight: 600; color: var(--on-surface-variant); }
.cal-day {
    aspect-ratio: 1; min-height: 28px; border: 0; border-radius: 9px; padding: 0; cursor: pointer;
    font: 600 11px/1 var(--font); color: var(--on-surface); background: color-mix(in srgb, var(--on-surface) 5%, transparent);
    transition: transform 160ms ease, box-shadow 160ms ease;
}
.cal-day.l1 { background: color-mix(in srgb, var(--money-spent) 16%, transparent); }
.cal-day.l2 { background: color-mix(in srgb, var(--money-spent) 32%, transparent); }
.cal-day.l3 { background: color-mix(in srgb, var(--money-spent) 52%, transparent); color: #FFFFFF; }
.cal-day.l4 { background: var(--money-spent); color: #FFFFFF; }
[data-theme="dark"] .cal-day.l3, [data-theme="dark"] .cal-day.l4 { color: #14161C; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-day:hover:not(:disabled) { transform: scale(1.12); box-shadow: var(--shadow-2); }
.cal-day:disabled { cursor: default; opacity: .55; }
.rail-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.rail-cats li { display: flex; flex-direction: column; gap: 4px; }
.rail-cats .between { gap: 8px; }
.day-block { scroll-margin-top: calc(var(--toolbar-h, 120px) + 16px); }
.day-block.day-flash .day-head { animation: day-flash 1.6s ease-out; border-radius: 14px; }
@keyframes day-flash { 0%, 30% { background: color-mix(in srgb, var(--lime) 55%, transparent); } 100% { background: transparent; } }
@media (min-width: 1024px) {
    .activity-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
    .activity-main { display: block; min-width: 0; }
    .activity-rail { order: 0; position: sticky; top: 12px; margin-top: 0; }
    .activity-main .activity-toolbar { margin-left: 0; padding-left: 0; }
    /* The docked details panel needs the room: the rail steps aside while it is open. */
    .activity-layout.panel-open { grid-template-columns: minmax(0, 1fr); }
    .activity-layout.panel-open .activity-rail { display: none; }
}

/* ---------- L1: split-screen Log in and Sign up ---------- */
.auth.split { display: flex; flex-direction: column; padding: 0; min-height: 100dvh; }
.auth-panel {
    position: relative; overflow: hidden; color: #FFFFFF; background: var(--hero-bg);
    margin: 10px 10px 0; border-radius: 26px; padding: 16px 18px 18px; min-height: 150px;
    display: flex; flex-direction: column; gap: 8px;
}
.auth-panel .auth-brand { align-self: flex-start; margin: 0; color: #FFFFFF; padding: 4px 8px 4px 4px; }
.auth-panel .auth-brand:hover { background: rgb(255 255 255 / 0.1); }
.auth-panel .brand-name, .auth-panel .brand-name span { color: #FFFFFF; }
.auth-panel .brand-name span { color: var(--lime); }
.auth-orbit { position: absolute; right: -60px; top: -40px; width: 220px; height: 220px; pointer-events: none; opacity: .9; }
.auth-orbit .ring { position: absolute; border-radius: 50%; border: 1.5px dashed rgb(255 255 255 / 0.35); animation: lp-spin 36s linear infinite; }
.auth-orbit .ring.outer { inset: 0; }
.auth-orbit .ring.inner { inset: 26%; border-style: solid; border-color: rgb(255 255 255 / 0.2); animation-duration: 24s; animation-direction: reverse; }
.auth-orbit .moon { position: absolute; top: -8px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; }
.auth-orbit .moon.lime { background: var(--lime); }
.auth-orbit .moon.mint { background: #7FDCA9; width: 12px; height: 12px; margin-left: -6px; top: -6px; }
.auth-orbit .core { position: absolute; inset: 40%; border-radius: 50%; background: rgb(255 255 255 / 0.14); }
.auth-panel-copy { position: relative; z-index: 1; max-width: 420px; }
.auth-panel-title { margin: 0; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.6px; }
.auth-panel-tip { margin: 6px 0 0; font-size: 14px; line-height: 20px; color: rgb(255 255 255 / 0.86); animation: tip-in 520ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes tip-in { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.auth-panel-steps { position: relative; z-index: 1; list-style: none; margin: 4px 0 0; padding: 0; display: none; flex-direction: column; gap: 10px; }
.auth-panel-steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgb(255 255 255 / 0.7); transition: color 300ms ease; }
.auth-panel-steps .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid rgb(255 255 255 / 0.4); transition: background-color 300ms ease, border-color 300ms ease, color 300ms ease, transform 300ms cubic-bezier(.2, 1.4, .4, 1); }
.auth-panel-steps li.current { color: #FFFFFF; font-weight: 600; }
.auth-panel-steps li.current .dot { background: #FFFFFF; color: var(--hero-bg); border-color: #FFFFFF; transform: scale(1.08); }
.auth-panel-steps li.done { color: #FFFFFF; }
.auth-panel-steps li.done .dot { background: var(--lime); color: #1C2230; border-color: var(--lime); }
.auth-panel .auth-highlights { position: relative; z-index: 1; margin-top: auto; justify-content: flex-start; color: rgb(255 255 255 / 0.85); }
.auth-panel .auth-highlights .icon { color: var(--lime); }
.auth-panel .auth-highlights li { background: rgb(255 255 255 / 0.12); color: #FFFFFF; border: 0; box-shadow: none; }
.auth-side { flex: 1; display: flex; justify-content: center; padding: 18px 16px 48px; }
.auth-switch { grid-template-columns: 1fr 1fr; margin: 0; }
.auth-switch button { font-size: 14px; font-weight: 600; min-height: 42px; }
@media (min-width: 1024px) {
    .auth.split { display: grid; grid-template-columns: minmax(380px, 42%) minmax(0, 1fr); }
    .auth-panel { position: sticky; top: 16px; margin: 16px 0 16px 16px; height: calc(100dvh - 32px); padding: 28px 34px 30px; gap: 18px; }
    .auth-orbit { right: auto; left: 50%; top: 46%; width: min(380px, 70%); height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); }
    .auth-panel-copy { margin-top: auto; }
    .auth-panel-title { font-size: 40px; line-height: 46px; letter-spacing: -1.2px; }
    .auth-panel-tip { font-size: 16px; line-height: 24px; }
    .auth-panel-steps { display: flex; }
    .auth-panel .auth-highlights { margin-top: 0; }
    .auth-side { align-items: center; padding: 32px 24px; }
    .auth-side .auth-steps { display: none; }
}

/* ---------- S1: start page showcase ---------- */
.lp-theme { color: var(--on-surface-variant); }
.lp-theme:hover { color: var(--on-surface); }
.lp-start { display: flex; flex-direction: column; gap: 8px; max-width: 480px; }
.lp-start-field { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--outline-variant); box-shadow: var(--shadow-2); transition: border-color 200ms ease, box-shadow 200ms ease; }
.lp-start-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 14%, transparent), var(--shadow-2); }
.lp-start-field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--on-surface); font: 500 16px/22px var(--font); padding: 8px 12px; }
.lp-start-go { min-height: 44px; padding: 0 20px; background: var(--ink); color: var(--on-ink); white-space: nowrap; }
.lp-start-go:hover { background: color-mix(in srgb, var(--ink) 86%, var(--primary)); }
.lp-start-alt { margin: 0 0 0 14px; font-size: 14px; color: var(--on-surface-variant); }
.lp-start .inline-error { margin: 0; }
.lp-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.lp-card-eye { width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 0.16); color: #FFFFFF; cursor: pointer; }
.lp-card-eye:hover { background: rgb(255 255 255 / 0.26); }
.lp-card-ranges { display: flex; gap: 6px; justify-content: flex-end; margin-top: 2px; }
.lp-card-chip { border: 0; border-radius: 999px; padding: 3px 10px; font: 600 11px/16px var(--font); background: rgb(255 255 255 / 0.16); color: #FFFFFF; cursor: pointer; }
.lp-card-chip[aria-pressed="true"] { background: var(--lime); color: #1C2230; }
.lp-spark-line { transition: d 520ms cubic-bezier(.2, .8, .2, 1); }
.lp-try { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 900px) { .lp-try { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lp-try-card { border-radius: 28px; padding: 22px; display: flex; flex-direction: column; gap: 14px; color: var(--on-surface); }
.lp-try-card.k-spent { background: var(--tint-spent); }
.lp-try-card.k-transfer { background: var(--tint-transfer); }
.lp-try-card.k-income { background: var(--tint-income); }
.lp-try-card h3 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -0.3px; }
.lp-try-rows { display: flex; flex-direction: column; gap: 8px; min-height: 92px; }
.lp-row.linked { position: relative; animation: refund-in 520ms cubic-bezier(.2, .8, .2, 1) both; }
.lp-row.linked::before { content: ""; position: absolute; left: -10px; top: -26px; width: 10px; height: 44px; border: 2px solid var(--money-spent); border-right: 0; border-radius: 10px 0 0 10px; clip-path: inset(0 0 100% 0); animation: refund-link 500ms ease-out 260ms forwards; }
@keyframes refund-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes refund-link { to { clip-path: inset(0 0 0 0); } }
.lp-fig { display: flex; flex-direction: column; gap: 2px; }
.lp-fig-label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--on-surface-variant); }
.lp-fig-value { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.5px; }
.lp-fig-note { font-size: 13px; line-height: 18px; color: var(--on-surface-variant); animation: refund-in 420ms ease both; }
.lp-try-actions { margin-top: auto; }
.lp-try-actions .btn { width: 100%; min-height: 44px; }
.lp-move.still .lp-coin { animation: none; left: 0; }
.lp-move.moved .lp-coin { animation: lp-travel 900ms cubic-bezier(.6, 0, .4, 1) forwards; }
.lp-umbrella { display: flex; gap: 3px; height: 18px; border-radius: 999px; padding: 3px; background: var(--surface); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--money-income) 45%, transparent); }
.lp-umbrella .seg { display: block; height: 100%; border-radius: 999px; transition: width 380ms cubic-bezier(.2, .8, .2, 1); }
.lp-umbrella .s0, .lp-umbrella-keys .s0 { background: var(--money-income); }
.lp-umbrella .s1, .lp-umbrella-keys .s1 { background: var(--money-invest); }
.lp-umbrella .s2, .lp-umbrella-keys .s2 { background: var(--money-transfer); }
.lp-umbrella-keys { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--on-surface-variant); }
.lp-umbrella-keys li { display: inline-flex; align-items: center; gap: 5px; }
.lp-umbrella-keys .key { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.lp-try-card input[type="range"] { width: 100%; accent-color: var(--money-income); }

@media (prefers-reduced-motion: reduce) {
    .logout-orbit, .logout-moon, .ws-trend path, .ws-limit > span, .auth-orbit .ring, .auth-panel-tip,
    .lp-row.linked, .lp-row.linked::before, .lp-fig-note, .lp-move.moved .lp-coin, .home-cc.arriving * { animation: none !important; }
    .ws-trend path { stroke-dashoffset: 0; }
    .lp-row.linked::before { clip-path: none; }
    .quick-action, .qa-icon, .cal-day, .lp-umbrella .seg, .lp-spark-line { transition: none !important; }
}
.hero-balance.band .label-medium { white-space: nowrap; }
@media (min-width: 1024px) {
    .activity-rail .rail-figs { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .activity-rail .rail-fig { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; padding: 7px 12px; }
    .activity-rail .rail-fig-value { font-size: 15px; }
}

/* =============================================================================================
 * Scroll round (6 November 2026, under the user's overnight auto-approval; AGENTS.md rule 266):
 * a reading-progress line, the hero lifting away, feature tiles flying in, a statement that
 * lights up word by word, the pinned "Follow ₹1,000" journey and a steps line that draws with
 * the scroll. Browsers without scroll timelines keep the earlier rise-into-view.
 * ============================================================================================= */
.lp-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--lime); transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* Statement: each word goes from faint to full as you read. */
.lp-statement-wrap { padding-top: 96px; }
.lp-statement { margin: 0; max-width: 980px; font-size: clamp(30px, 5.4vw, 64px); line-height: 1.12; font-weight: 700; letter-spacing: -1.4px; }
.lp-statement .word { color: color-mix(in srgb, var(--on-surface) 16%, transparent); transition: color 380ms ease; }
.lp-statement .word.lit { color: var(--on-surface); }
.lp-statement .word.lit.stop { color: var(--primary); }

/* Follow ₹1,000: a tall track with a pinned scene. */
.lp-journey-track { position: relative; height: 420vh; }
.lp-journey {
    position: sticky; top: 76px; height: calc(100vh - 96px); min-height: 520px;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center;
    padding: 20px; border-radius: 32px; background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden;
}
[data-theme="dark"] .lp-journey { border: 1px solid var(--outline-variant); }
.lp-journey-copy { display: flex; flex-direction: column; gap: 10px; }
.lp-journey-step { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.6px; color: var(--primary); }
.lp-journey-title { margin: 0; font-size: clamp(24px, 3.4vw, 38px); line-height: 1.12; font-weight: 700; letter-spacing: -0.8px; animation: tip-in 480ms cubic-bezier(.2, .8, .2, 1) both; }
.lp-journey-body { margin: 0; font-size: 16px; line-height: 24px; color: var(--on-surface-variant); max-width: 440px; animation: tip-in 480ms cubic-bezier(.2, .8, .2, 1) 80ms both; }
.lp-journey-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.lp-journey-figs .lp-fig { padding: 10px 12px; border-radius: 16px; background: var(--surface-container-low); }
.lp-journey-figs .lp-fig-value { font-size: 20px; line-height: 26px; }
.m-transfer { color: var(--money-transfer); font-weight: 600; }
.lp-journey-dots { display: flex; gap: 6px; }
.lp-journey-dots span { width: 8px; height: 8px; border-radius: 999px; background: var(--outline-variant); transition: width 300ms ease, background-color 300ms ease; }
.lp-journey-dots span.on { background: var(--primary); width: 22px; }
.lp-journey-map { position: relative; width: 100%; max-width: 560px; aspect-ratio: 4 / 3; justify-self: center; }
.lp-journey-svg, .lp-journey-svg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-journey-svg .track { fill: none; stroke: var(--outline-variant); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
.lp-journey-svg .trail { fill: none; stroke: var(--primary); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.lp-station { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lp-station .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--outline-variant); transition: transform 300ms cubic-bezier(.2, 1.4, .4, 1), border-color 300ms ease, background-color 300ms ease; }
.lp-station .name { font-size: 13px; font-weight: 600; color: var(--on-surface-variant); background: var(--surface); padding: 2px 8px; border-radius: 999px; box-shadow: var(--shadow-1); transition: color 300ms ease; }
.lp-station.reached .dot { border-color: var(--primary); background: var(--primary-container); }
.lp-station.here .dot { transform: scale(1.35); border-color: var(--primary); background: var(--lime); }
.lp-station.here .name { color: var(--on-surface); }
.lp-station.s0.reached .dot { border-color: var(--money-income); }
.lp-station.s2.reached .dot { border-color: var(--money-transfer); }
.lp-station.s3.reached .dot { border-color: var(--money-spent); }
.lp-journey-coin {
    position: absolute; left: 12%; top: 76%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%;
    display: grid; place-items: center; font: 700 20px/1 var(--font); color: #1C2230; background: var(--lime);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--lime) 30%, transparent), var(--shadow-2); z-index: 2;
}
.lp-journey-list { list-style: decimal; margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) {
    .lp-journey { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); padding: 36px 44px; gap: 36px; }
}

/* Scroll-linked motion where the browser supports scroll timelines. */
@supports (animation-timeline: view()) {
    .lp-progress { animation: lp-progress linear both; animation-timeline: scroll(root); }
    @keyframes lp-progress { to { transform: scaleX(1); } }
    .lp-hero-copy { animation: hero-lift linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    @keyframes hero-lift { to { transform: translateY(-80px); opacity: 0; } }
    .lp-orbit { animation: lp-fade 900ms 200ms both, orbit-away linear both; animation-timeline: auto, view(); animation-range: normal, exit 0% exit 100%; }
    @keyframes orbit-away { to { transform: perspective(900px) rotateX(24deg) scale(.82) translateY(-40px); opacity: .1; } }
    .lp-bento .lp-tile.reveal { opacity: 1; transform: none; transition: box-shadow 250ms ease; }
    .lp-bento .lp-tile { animation: tile-fly linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
    .lp-bento .lp-tile:nth-child(odd) { --fx: -60px; --fr: -4deg; }
    .lp-bento .lp-tile:nth-child(even) { --fx: 60px; --fr: 4deg; }
    @keyframes tile-fly { from { opacity: 0; transform: translateX(var(--fx, 0)) translateY(60px) rotate(var(--fr, 0)) scale(.94); } to { opacity: 1; transform: none; } }
    .lp-steps::before { transition: none; animation: steps-draw linear both; animation-timeline: view(); animation-range: entry 40% cover 60%; }
    @keyframes steps-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    .lp-final::before { animation: lp-spin 80s linear infinite, final-grow linear both; animation-timeline: auto, view(); animation-range: normal, entry 0% cover 60%; }
    @keyframes final-grow { from { scale: .4; opacity: 0; } to { scale: 1; opacity: 1; } }
}

@media (prefers-reduced-motion: reduce) {
    .lp-progress, .lp-hero-copy, .lp-orbit, .lp-bento .lp-tile, .lp-steps::before, .lp-final::before, .lp-journey-title, .lp-journey-body { animation: none !important; }
    .lp-progress { display: none; }
    .lp-statement .word { color: var(--on-surface); transition: none; }
}
.lp-station { transform: translate(-50%, -10px); }
.lp-auth .btn { white-space: nowrap; }
@media (max-width: 420px) {
    .lp-brand .brand-name { display: none; }
    .lp-auth { gap: 2px; }
    .lp-auth .btn { padding: 0 12px; }
}

/* =============================================================================================
 * App-page motion round (6 November 2026, under the user's overnight auto-approval; AGENTS.md
 * rule 267): a pointer spotlight on cards, Manage's groups leaning toward the pointer, moons
 * drifting in Home's balance band, Home sections and Activity rows rising in as they scroll into
 * view, the calendar cascading per month, Recurring's month dial and the avatar's moon.
 * ============================================================================================= */

/* Pointer spotlight: a soft light under the pointer on the card it is over. */
.main .card, .main .group, .main .activity-rail, .main .quick-action { position: relative; }
.main .card::after, .main .group::after, .main .activity-rail::after, .main .quick-action::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
    background: radial-gradient(260px circle at var(--mx, -400px) var(--my, -400px), color-mix(in srgb, var(--primary) 10%, transparent), transparent 70%);
    opacity: 0; transition: opacity 260ms ease;
}
.main .lit::after { opacity: 1; }
.main .hero-balance::after { background: radial-gradient(320px circle at var(--mx, -400px) var(--my, -400px), rgb(255 255 255 / 0.14), transparent 70%); }
[data-theme="dark"] .main .card::after, [data-theme="dark"] .main .group::after { background: radial-gradient(260px circle at var(--mx, -400px) var(--my, -400px), color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%); }

/* Manage's groups lean toward the pointer. */
.tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 380ms cubic-bezier(.2, .8, .2, 1), box-shadow 300ms ease; will-change: transform; }
.tilt.lit { box-shadow: var(--shadow-2); }

/* Home: two soft moons drift inside the balance band. */
.hero-balance.band { position: relative; overflow: hidden; isolation: isolate; }
.band-moon { position: absolute; border-radius: 50%; pointer-events: none; z-index: -1; }
.band-moon.a { width: 260px; height: 260px; right: -70px; top: -110px; background: rgb(255 255 255 / 0.07); animation: moon-drift-a 16s ease-in-out infinite; }
.band-moon.b { width: 120px; height: 120px; left: 38%; bottom: -60px; background: color-mix(in srgb, var(--lime) 18%, transparent); animation: moon-drift-b 12s ease-in-out infinite; }
@keyframes moon-drift-a { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, 30px); } }
@keyframes moon-drift-b { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(50px, -16px) scale(1.15); } }

/* Activity: the calendar's days cascade in when the month changes. */
.cal-day { animation: cal-pop 360ms cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(var(--i, 0) * 14ms); }
@keyframes cal-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* Recurring: the month dial. */
.recurring-head { position: relative; }
.month-dial { position: absolute; top: 14px; right: 14px; width: 104px; height: 104px; }
.recurring-head .head-figure { padding-right: 112px; min-height: 96px; }
.dial-art, .dial-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dial-track { fill: none; stroke: color-mix(in srgb, var(--money-invest) 22%, transparent); stroke-width: 7; }
.dial-sweep { fill: none; stroke: var(--money-invest); stroke-width: 7; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 60px 60px; stroke-dasharray: 0 100; animation: dial-sweep 1100ms cubic-bezier(.2, .8, .2, 1) 150ms forwards; }
@keyframes dial-sweep { to { stroke-dasharray: var(--to) 100; } }
.dial-tick { stroke: color-mix(in srgb, var(--on-surface) 25%, transparent); stroke-width: 1; }
.dial-due { stroke: var(--surface); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: rule-pop 380ms cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(900ms + var(--d, 0ms)); }
.dial-due.out { fill: var(--money-spent); }
.dial-due.in { fill: var(--money-income); }
.dial-due.inv { fill: var(--money-invest); }
.dial-today { fill: var(--lime); stroke: #1C2230; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: dial-today 2.4s ease-in-out 1.2s infinite; }
@keyframes dial-today { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.dial-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dial-number { font-size: 24px; line-height: 26px; font-weight: 700; color: var(--money-invest); }
.dial-caption { font-size: 10px; line-height: 12px; color: var(--on-surface-variant); }

/* More: the avatar has its own moon. */
.avatar.big { position: relative; }
.avatar.big::after {
    content: ""; position: absolute; inset: -9px; border-radius: 50%; pointer-events: none;
    border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, transparent);
    background: radial-gradient(circle at 50% 0, var(--lime) 0 4.5px, transparent 5.5px);
    animation: lp-spin 9s linear infinite;
}

/* Scroll-linked rises inside the app where the browser supports scroll timelines. */
@supports (animation-timeline: view()) {
    .home-cc:not(.arriving) .cc-col > *, .home-cc:not(.arriving) .cc-strip > *, .home-cc:not(.arriving) .cc-strip .two-up > * {
        animation: app-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 70%;
    }
    .activity-timeline .ledger-cell:not(.flash):not(.enter):not(.leaving) { animation: row-glide linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
    @keyframes app-rise { from { opacity: .2; transform: translateY(36px) scale(.98); } to { opacity: 1; transform: none; } }
    @keyframes row-glide { from { opacity: .25; transform: translateX(28px); } to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
    .tilt { transform: none !important; transition: none; }
    .band-moon, .cal-day, .dial-sweep, .dial-due, .dial-today, .avatar.big::after,
    .home-cc .cc-col > *, .home-cc .cc-strip > *, .activity-timeline .ledger-cell { animation: none !important; }
    .dial-sweep { stroke-dasharray: var(--to) 100; }
}

/* =============================================================================================
 * Feature round (6 November 2026, under the user's overnight auto-approval; AGENTS.md rule 268):
 * "Play your month" story, the budget pace marker, no-spend days and CSV download in Activity's
 * rail, and the start page's lakhs-and-crores demo.
 * ============================================================================================= */

/* Play your month */
.cc-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.recap-btn {
    display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; padding: 5px 14px 5px 5px; border-radius: 999px;
    background: var(--hero-bg); color: #FFFFFF; font: 600 13px/18px var(--font); box-shadow: var(--shadow-1);
    transition: transform 200ms cubic-bezier(.2, .8, .2, 1), box-shadow 200ms ease;
}
.recap-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.recap-btn-ring { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: #1C2230; box-shadow: 0 0 0 3px rgb(255 255 255 / 0.25); animation: recap-ping 2.4s ease-out infinite; }
@keyframes recap-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lime) 70%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

.recap {
    position: fixed; inset: 0; z-index: 80; overflow: hidden; color: #FFFFFF; background: #262E8F;
    display: flex; flex-direction: column; padding: 14px 18px 18px; outline: none;
    animation: recap-in 420ms cubic-bezier(.2, .8, .2, 1) both;
}
[data-theme="dark"] .recap { background: #1A1F5C; }
@keyframes recap-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.recap-orbit { position: absolute; inset: 0; pointer-events: none; }
.recap-orbit .ring { position: absolute; left: 50%; top: 52%; border-radius: 50%; border: 1.5px dashed rgb(255 255 255 / 0.16); transform: translate(-50%, -50%); }
.recap-orbit .r1 { width: min(130vw, 980px); aspect-ratio: 1; animation: recap-spin 90s linear infinite; }
.recap-orbit .r2 { width: min(80vw, 620px); aspect-ratio: 1; border-style: solid; border-color: rgb(255 255 255 / 0.08); }
.recap-orbit .moon { position: absolute; left: 50%; top: -10px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--lime); }
@keyframes recap-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.recap-bars { position: relative; z-index: 2; display: flex; gap: 5px; }
.recap-bars .seg { flex: 1; height: 4px; border-radius: 999px; background: rgb(255 255 255 / 0.25); overflow: hidden; }
.recap-bars .seg.done { background: #FFFFFF; }
.recap-bars .fill { display: block; height: 100%; background: #FFFFFF; transform-origin: left; animation: recap-fill linear forwards; }
.recap.paused .recap-bars .fill { animation-play-state: paused; }
@keyframes recap-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.recap-top { position: relative; z-index: 3; display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.recap-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-right: auto; }
.recap-icon { width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 0.12); color: #FFFFFF; cursor: pointer; }
.recap-icon:hover { background: rgb(255 255 255 / 0.22); }
.recap-zone { position: absolute; top: 90px; bottom: 90px; z-index: 1; border: 0; background: transparent; cursor: pointer; }
.recap-zone.back { left: 0; width: 33%; cursor: w-resize; }
.recap-zone.next { right: 0; width: 67%; cursor: e-resize; }
.recap-stage { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.recap-slide { width: min(720px, 100%); display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: center; }
.recap-slide > * { animation: recap-rise 620ms cubic-bezier(.2, .8, .2, 1) both; }
.recap-slide > :nth-child(2) { animation-delay: 90ms; }
.recap-slide > :nth-child(3) { animation-delay: 180ms; }
.recap-slide > :nth-child(4) { animation-delay: 270ms; }
.recap-slide > :nth-child(5) { animation-delay: 360ms; }
@keyframes recap-rise { from { opacity: 0; transform: translateY(26px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.recap-kicker { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--lime); }
.recap-big { margin: 0; font-size: clamp(40px, 9vw, 88px); line-height: 1.02; font-weight: 700; letter-spacing: -2px; }
.recap-line { margin: 0; font-size: clamp(16px, 2.2vw, 20px); line-height: 1.45; color: rgb(255 255 255 / 0.86); max-width: 560px; }
.recap-line .hl-in { color: #9FF0C4; font-weight: 600; }
.recap-line .hl { color: var(--lime); font-weight: 600; }
.recap-end { margin: 10px 0 0; font-size: 15px; color: rgb(255 255 255 / 0.7); }
.recap-cats { width: min(480px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: start; }
.recap-cat { animation: recap-rise 600ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(300ms + var(--d, 0ms)); }
.recap-cat .between { gap: 10px; margin-bottom: 5px; font-size: 15px; }
.recap-meter { width: min(480px, 100%); height: 14px; border-radius: 999px; background: rgb(255 255 255 / 0.14); overflow: hidden; }
.recap-meter > span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--lime); transform-origin: left; animation: kn-grow-x 1200ms cubic-bezier(.2, .8, .2, 1) 300ms both; }
.recap-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 420px; }
.recap-dots span { width: 14px; height: 14px; border-radius: 50%; background: rgb(255 255 255 / 0.18); animation: rule-pop 360ms cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(300ms + var(--d, 0ms)); }
.recap-dots span.on { background: var(--lime); }
.recap-nav { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.recap-count { margin: 0; font-size: 13px; color: rgb(255 255 255 / 0.7); }
.recap-nav .btn { min-height: 44px; padding: 0 20px; }
.recap-nav .btn:disabled { opacity: .35; }

/* Budget pace marker on the Monthly Orbit bar. */
.pace-host { position: relative; }
.pace-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--on-surface); opacity: .55; }
.pace-mark::after { content: ""; position: absolute; top: -5px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: inherit; }

/* Activity rail extras. */
.rail-nospend { margin: 0; font-size: 13px; color: var(--on-surface-variant); }
.rail-nospend .num { font-size: 15px; font-weight: 700; color: var(--money-income); }
.rail-csv { min-height: 40px; font-size: 13px; }

/* Lakhs and crores. */
.lp-try { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)) !important; }
.lp-try-card.k-invest { background: var(--tint-invest); }
.lp-group-input { width: 100%; border: 1.5px solid color-mix(in srgb, var(--money-invest) 40%, transparent); border-radius: 14px; padding: 10px 14px; background: var(--surface); color: var(--on-surface); font: 700 20px/26px var(--font); outline: none; font-variant-numeric: tabular-nums; }
.lp-group-input:focus { border-color: var(--money-invest); box-shadow: 0 0 0 4px color-mix(in srgb, var(--money-invest) 18%, transparent); }
.m-invest { color: var(--money-invest); font-weight: 600; }
.muted-num { color: var(--on-surface-variant); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    .recap, .recap-orbit .r1, .recap-slide > *, .recap-cat, .recap-meter > span, .recap-dots span, .recap-btn-ring { animation: none !important; }
    .recap-bars .fill { animation: none !important; transform: none; }
}

/* =============================================================================================
 * Round six (6 November 2026, overnight auto-approval; AGENTS.md rule 269): Quick search actions,
 * a Skip to content link, the money flow diagram, the insight line and statement printing.
 * ============================================================================================= */
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 600; text-decoration: none; transition: top 200ms ease; }
.skip-link:focus { top: 12px; }
#main-content:focus { outline: none; }

.insight-line { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; min-height: 20px; font-size: 13px; line-height: 18px; color: var(--on-surface-variant); }
.insight-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 color-mix(in srgb, var(--lime) 70%, transparent); animation: recap-ping 2.4s ease-out infinite; }
.insight-text { animation: tip-in 520ms cubic-bezier(.2, .8, .2, 1) both; }
@media (min-width: 1024px) { .main .brand .insight-line { font-size: 13px; } }

.money-flow { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.flow-art { position: relative; width: 100%; aspect-ratio: 600 / 260; }
.flow-art svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow-art .ribbon { opacity: .38; clip-path: inset(0 100% 0 0); animation: flow-in 900ms cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: var(--d, 0ms); transition: opacity 200ms ease; }
.flow-art .ribbon:hover { opacity: .75; }
.flow-art .node { animation: rule-pop 420ms cubic-bezier(.2, 1.4, .4, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes flow-in { to { clip-path: inset(0 0 0 0); } }
.flow-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; }
.flow-key { display: inline-flex; align-items: center; gap: 6px; }
.flow-key .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }

.statement-print { flex: none; min-height: 40px; }
@media (max-width: 560px) { .statement-print { font-size: 0; gap: 0; padding: 0 12px; } }

/* Printing a statement: only the statement, in ink on white. */
@media print {
    .bottom-nav, .fab-host, .notice, .skip-link, .toast, .statement-print, .statement-filter-control, .icon-btn, .tour, .kn-portal { display: none !important; }
    .app { padding: 0 !important; }
    .main { zoom: 1 !important; padding: 0 !important; }
    body, .main, .card { background: #FFFFFF !important; color: #000000 !important; box-shadow: none !important; }
    .main .card::after, .main .group::after { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .insight-dot, .insight-text, .flow-art .ribbon, .flow-art .node { animation: none !important; }
    .flow-art .ribbon { clip-path: none; }
}

/* =============================================================================================
 * Round seven (6 November 2026, overnight auto-approval; AGENTS.md rule 270): search highlights,
 * the attention badge on Recurring, budget pace markers, the account balance chart, a starfield
 * behind the dark theme and Back to top on the start page.
 * ============================================================================================= */
mark.hit { background: color-mix(in srgb, var(--lime) 70%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; box-decoration-break: clone; animation: hit-in 360ms ease both; }
[data-theme="dark"] mark.hit { background: color-mix(in srgb, var(--lime) 40%, transparent); }
@keyframes hit-in { from { background: transparent; } }

.nav-item { position: relative; }
.nav-badge {
    position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    display: grid; place-items: center; font: 700 10.5px/1 var(--font); color: #FFFFFF; background: var(--money-spent);
    box-shadow: 0 0 0 2px var(--nav-bg); animation: badge-pulse 2.6s ease-out infinite; z-index: 2;
}
@keyframes badge-pulse { 0% { box-shadow: 0 0 0 2px var(--nav-bg), 0 0 0 2px color-mix(in srgb, var(--money-spent) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 2px var(--nav-bg), 0 0 0 10px transparent; } }
@media (min-width: 1024px) {
    .nav-badge { position: static; margin-left: auto; box-shadow: none; animation: none; }
    .app.rail:not(:has(.bottom-nav:hover, .bottom-nav :focus-visible, .fab-host:hover, .fab-host :focus-visible)) .nav-badge { position: absolute; top: 4px; left: 30px; }
}

.account-chart { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.account-chart-art { display: block; height: 120px; }
.account-chart-art svg { width: 100%; height: 100%; overflow: visible; }
.acc-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: d 520ms cubic-bezier(.2, .8, .2, 1); }
.acc-area { fill: color-mix(in srgb, var(--primary) 12%, transparent); stroke: none; transition: d 520ms cubic-bezier(.2, .8, .2, 1); }

/* A faint starfield behind the dark theme, on brand with the orbit. */
[data-theme="dark"] body {
    background-image:
        radial-gradient(1px 1px at 12% 18%, rgb(255 255 255 / 0.28), transparent 60%),
        radial-gradient(1px 1px at 68% 8%, rgb(255 255 255 / 0.22), transparent 60%),
        radial-gradient(1.5px 1.5px at 84% 42%, rgb(201 242 123 / 0.25), transparent 60%),
        radial-gradient(1px 1px at 36% 64%, rgb(255 255 255 / 0.18), transparent 60%),
        radial-gradient(1px 1px at 92% 86%, rgb(255 255 255 / 0.2), transparent 60%),
        radial-gradient(1.5px 1.5px at 22% 92%, rgb(142 155 255 / 0.28), transparent 60%),
        radial-gradient(1px 1px at 54% 34%, rgb(255 255 255 / 0.14), transparent 60%);
    background-size: 640px 640px;
    background-attachment: fixed;
}
[data-theme="dark"] .lp, [data-theme="dark"] .auth { background: transparent; }

.lp-top-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--outline-variant); border-radius: 999px; padding: 6px 14px 6px 10px; background: var(--surface); color: var(--on-surface); font: 600 13px/18px var(--font); cursor: pointer; transition: transform 200ms cubic-bezier(.2, .8, .2, 1); }
.lp-top-btn:hover { transform: translateY(-3px); }
.lp-top-btn:hover .icon { animation: top-hop 600ms ease; }
@keyframes top-hop { 40% { transform: translateY(-4px); } }

@media (prefers-reduced-motion: reduce) {
    mark.hit, .nav-badge, .lp-top-btn .icon { animation: none !important; }
    .acc-line, .acc-area { transition: none; }
}

/* The six code boxes need a visible outline (at least 3:1 against the card) in both themes; the
 * Chroma outline-variant border was about 1.3:1 in dark mode (found 6 November 2026). */
.code-boxes input { border-color: #8A8F9C; }
[data-theme="dark"] .code-boxes:not(.wrong):not(.right) input { border-color: #6B7284; }

/* ---- Round eight (rule 271, 6 November 2026) ---- */

/* Savings dial on Home: the arc fills to the share of this month's income kept. */
.savings-dial .row { align-items: center; }
.savings-ring { position: relative; flex: 0 0 auto; width: 84px; height: 84px; display: grid; place-items: center; }
.savings-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.savings-ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.savings-ring .track { stroke: var(--surface-container-high); }
.savings-ring .arc { stroke: var(--c); stroke-dasharray: var(--to) 100; animation: savings-fill 1100ms cubic-bezier(.2, .8, .2, 1) both 200ms; }
@keyframes savings-fill { from { stroke-dasharray: 0 100; } }
.savings-pct { position: relative; font: 700 17px/1 var(--font); color: var(--on-surface); }

/* Bill countdowns on Recurring: the ring empties as the due time nears. */
.countdowns { margin-bottom: 8px; }
.countdown-card .row { align-items: center; }
.countdown-ring { position: relative; flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center; color: var(--money-spent); }
.countdown-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.countdown-ring circle { fill: none; stroke-width: 4; stroke-linecap: round; }
.countdown-ring .track { stroke: var(--surface-container-high); }
.countdown-ring .arc { stroke: currentColor; stroke-dasharray: var(--left) 100; transition: stroke-dasharray 600ms ease; animation: savings-fill 900ms cubic-bezier(.2, .8, .2, 1) both; }
.countdown-label { font: 600 13px/18px var(--font); font-variant-numeric: tabular-nums; }
.countdown-label.soon { color: var(--money-spent); }
.countdown-label.later { color: var(--on-surface-variant); }
.countdown-card:has(.countdown-label.soon) .countdown-ring .icon { animation: countdown-tick 2s ease-in-out infinite; }
@keyframes countdown-tick { 0%, 80%, 100% { transform: none; } 88% { transform: rotate(-12deg); } 94% { transform: rotate(10deg); } }

/* Spending heatmap in Monthly activity. */
.heatmap-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.heatmap-months { display: flex; flex-wrap: wrap; gap: 6px; }
.heat-month { border: 1px solid var(--outline-variant); background: transparent; color: var(--on-surface); border-radius: 999px; padding: 4px 12px; font: 600 12px/16px var(--font); cursor: pointer; }
.heat-month[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.heatmap { display: grid; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 3px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.heat-cell { width: 14px; height: 14px; border-radius: 4px; background: var(--surface-container-high); animation: heat-in 420ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: min(calc(var(--i) * 3ms), 600ms); }
.heat-cell.out { background: transparent; animation: none; }
.heat-cell.l1 { background: color-mix(in srgb, var(--money-spent) 28%, var(--surface-container-high)); }
.heat-cell.l2 { background: color-mix(in srgb, var(--money-spent) 52%, var(--surface-container-high)); }
.heat-cell.l3 { background: color-mix(in srgb, var(--money-spent) 76%, var(--surface-container-high)); }
.heat-cell.l4 { background: var(--money-spent); }
.heat-cell.sel { box-shadow: inset 0 0 0 1.5px var(--on-surface); }
.heat-cell:not(.out):hover { transform: scale(1.35); position: relative; z-index: 1; }
@keyframes heat-in { from { opacity: 0; transform: scale(0.3); } }

/* Undo countdown ring: the arc empties over the six seconds Undo stays available. */
.undo-btn { display: inline-flex; align-items: center; gap: 8px; }
.undo-ring { position: relative; width: 28px; height: 28px; display: grid; place-items: center; }
.undo-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.undo-ring circle { fill: none; stroke-width: 2.5; }
.undo-ring .track { stroke: currentColor; opacity: 0.25; }
.undo-ring .arc { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 100 100; animation: undo-drain var(--undo-ms) linear forwards; }
@keyframes undo-drain { to { stroke-dasharray: 0 100; } }
.undo-secs { position: relative; font: 700 11px/1 var(--font); }

/* Animated empty states: the icon floats and a small moon circles it. */
.empty-orbit { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; }
.empty-orbit .orb { animation: empty-float 3.2s ease-in-out infinite; }
.empty-moon { position: absolute; inset: -7px; border-radius: 50%; animation: empty-spin 5s linear infinite; pointer-events: none; }
.empty-moon::before { content: ""; position: absolute; top: 0; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px color-mix(in srgb, var(--lime) 70%, transparent); }
@keyframes empty-float { 50% { transform: translateY(-3px); } }
@keyframes empty-spin { to { transform: rotate(360deg); } }

/* Live accent preview: the swatch being previewed lifts. */
.accent:hover, .accent:focus-visible { transform: scale(1.12); }

@media (prefers-reduced-motion: reduce) {
    .savings-ring .arc, .countdown-ring .arc, .heat-cell, .empty-orbit .orb, .empty-moon,
    .countdown-card .countdown-ring .icon { animation: none !important; }
    .undo-ring .arc { animation-duration: var(--undo-ms) !important; }
}

/* Reduced-motion safety net (rule 271): anything not switched off above finishes at once. The
 * Undo ring is the one exception: it shows time, not decoration. */
@media (prefers-reduced-motion: reduce) {
    *:not(.undo-ring .arc), *::before, *::after {
        animation-duration: 1ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }
}
.heat-legend { display: inline-flex; align-items: center; gap: 3px; }
.heat-legend .heat-cell.key { width: 10px; height: 10px; border-radius: 3px; animation: none; }
.heat-legend .heat-cell.key:first-of-type { margin-left: 4px; }
.heat-legend .heat-cell.key:last-of-type { margin-right: 4px; }

/* Narrow-window polish (rule 271): rows waiting to glide in from the right must not widen the page,
 * and the bottom bar's five columns may shrink below their label width at 320 px. */
.activity-timeline { overflow-x: clip; overflow-clip-margin: 8px; }
.bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nav-item { min-width: 0; }
@media (max-width: 340px) { .nav-item { font-size: 9.5px; } }

/* ---- Round nine (rule 272, 6 November 2026) ---- */

/* Year so far sits beside Play your month. */
.cc-head-row .recap-btn { margin-left: auto; }
.recap-year-btn { min-height: 36px; padding: 0 10px; }

/* The savings arc draws in once, then follows what-if changes smoothly. */
.savings-ring .arc { animation-fill-mode: backwards; transition: stroke-dasharray 320ms cubic-bezier(.2, .8, .2, 1), stroke 200ms ease; }
.savings-dial { transition: box-shadow 200ms ease; }
.savings-dial.what-if-on { box-shadow: 0 0 0 2px color-mix(in srgb, var(--lime) 70%, transparent), var(--shadow-1); }
.savings-dial.what-if-on .savings-ring .track { stroke-dasharray: 3 4; }
.what-if { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--outline-variant); display: flex; flex-direction: column; gap: 8px; }
.what-if-select { border: 1px solid var(--outline-variant); background: var(--surface); color: var(--on-surface); border-radius: 999px; padding: 4px 10px; font: 600 12px/16px var(--font); max-width: 52%; }
.what-if-range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
.what-if-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--lime) var(--fill, 0%), var(--surface-container-high) var(--fill, 0%)); }
.what-if-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--surface-container-high); }
.what-if-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--lime); }
.what-if-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: var(--surface); border: 3px solid var(--lime); box-shadow: var(--shadow-1); }
.what-if-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--lime); }
.what-if-range:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 6px; }

/* Coin drop into the balance band. */
.kn-coin { position: fixed; z-index: 90; width: 44px; height: 44px; margin: -22px 0 0 -22px; pointer-events: none; perspective: 400px; }
.kn-coin-face { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF3B0, #F2C94C 55%, #C9971C); color: #6B4A00; font: 800 22px/1 var(--font); box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.18), 0 6px 14px rgb(0 0 0 / 0.3); }
.kn-coin-label { position: absolute; left: 52px; top: 10px; white-space: nowrap; font: 700 15px/20px var(--font); color: var(--money-income); text-shadow: 0 1px 2px rgb(0 0 0 / 0.3); }
.band.coin-hit { animation: coin-hit 650ms cubic-bezier(.2, .8, .2, 1); }
@keyframes coin-hit { 30% { transform: scale(1.012); box-shadow: 0 0 0 4px color-mix(in srgb, #F2C94C 55%, transparent); } }

/* Biggest month bars in the year story. */
.recap-months { display: flex; align-items: flex-end; gap: 10px; height: 120px; margin-top: 22px; }
.recap-month { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.recap-month .bar { width: 100%; max-width: 46px; height: var(--h); border-radius: 10px 10px 4px 4px; background: rgb(255 255 255 / 0.25); transform-origin: bottom; animation: recap-grow 700ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d); }
.recap-month.top .bar { background: var(--lime); }
.recap-month .lbl { font: 600 12px/16px var(--font); color: rgb(255 255 255 / 0.75); }
@keyframes recap-grow { from { transform: scaleY(0); } }

/* Accounts orbit in Manage. */
.acc-orbit-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.acc-orbit { position: relative; width: min(100%, 340px); aspect-ratio: 1; margin: 4px auto 0; container-type: inline-size; }
.acc-ring { position: absolute; border-radius: 50%; border: 1.5px dashed var(--outline-variant); pointer-events: none; }
.acc-ring.inner-track { inset: 19%; }
.acc-ring.outer-track { inset: 5%; border-style: solid; opacity: 0.6; }
.acc-sun { position: absolute; inset: 35%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--primary) 30%, var(--surface)), var(--surface-container-high)); box-shadow: 0 0 40px color-mix(in srgb, var(--primary) 30%, transparent); padding: 4px; }
.acc-spin { position: absolute; inset: 0; animation: acc-spin 90s linear infinite; }
.acc-spin.outer { animation-duration: 140s; animation-direction: reverse; }
.acc-orbit:hover .acc-spin, .acc-orbit:focus-within .acc-spin { animation-play-state: paused; }
@keyframes acc-spin { to { transform: rotate(360deg); } }
.acc-planet { position: absolute; left: 50%; top: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); padding: 0; border: 0; background: none; cursor: pointer; transform: rotate(var(--a)) translateX(var(--rad)) rotate(calc(-1 * var(--a))); }
.acc-spin.inner .acc-planet { --rad: 31cqw; }
.acc-spin.outer .acc-planet { --rad: 45cqw; }
.acc-planet-body { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, #FFFFFF), var(--c)); color: #10131C; font: 700 13px/1 var(--font); box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 45%, transparent); animation: acc-spin 90s linear infinite reverse, planet-in 600ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: 0s, var(--d); transition: scale 200ms cubic-bezier(.2, .8, .2, 1); }
.acc-spin.outer .acc-planet-body { animation-duration: 140s, 600ms; animation-direction: normal, normal; }
.acc-orbit:hover .acc-planet-body, .acc-orbit:focus-within .acc-planet-body { animation-play-state: paused; }
.acc-planet:hover .acc-planet-body, .acc-planet:focus-visible .acc-planet-body { scale: 1.15; }
.acc-planet:focus-visible { outline: none; }
.acc-planet:focus-visible .acc-planet-body { outline: 3px solid var(--primary); outline-offset: 3px; }
@keyframes planet-in { from { opacity: 0; scale: 0.3; } }

/* No-spend streak in Activity's rail. */
.rail-streak { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font: 500 13px/18px var(--font); color: var(--on-surface-variant); }
.rail-streak .streak-flame { display: inline-grid; place-items: center; color: var(--outline); }
.rail-streak.on { color: var(--on-surface); }
.rail-streak.on .streak-flame { color: #F28C28; animation: flame-flicker 1.6s ease-in-out infinite; transform-origin: bottom center; }
.rail-streak.milestone .streak-flame { position: relative; }
.rail-streak.milestone .streak-flame::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #F28C28; animation: streak-burst 1.4s ease-out 3; }
@keyframes flame-flicker { 50% { transform: scale(1.12) rotate(-4deg); } }
@keyframes streak-burst { from { opacity: 0.9; transform: scale(0.6); } to { opacity: 0; transform: scale(1.8); } }

/* Heatmap days are buttons now. */
button.heat-cell { border: 0; padding: 0; cursor: pointer; display: block; }
button.heat-cell:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Larger text and high contrast (Appearance, this visit only). */
html.text-large body { zoom: 1.125; }
html.contrast-high[data-theme="light"] { --on-surface-variant: #2B2F38 !important; --outline-variant: #6B7080 !important; --outline: #3D4250 !important; }
html.contrast-high[data-theme="dark"] { --on-surface-variant: #E3E6EE !important; --outline-variant: #9097A8 !important; --outline: #C2C7D3 !important; }
html.contrast-high .card, html.contrast-high .ledger-cell, html.contrast-high .chip, html.contrast-high .quick-action { border-color: var(--outline-variant) !important; }
html.contrast-high :focus-visible { outline-width: 3px !important; }

@media (prefers-reduced-motion: reduce) {
    .acc-spin, .acc-planet-body, .recap-month .bar, .rail-streak .streak-flame, .rail-streak .streak-flame::after, .band.coin-hit { animation: none !important; }
}

/* Contrast fixes found by the round-nine accessibility audit (rule 272): de-emphasised text keeps
 * at least 4.5:1, badges mix their colour toward the text colour, and the balance band and the
 * start page card use lighter tints behind white text. */
.outline-text, .day.off { color: var(--on-surface-variant); }
.badge { color: color-mix(in srgb, var(--c) 68%, var(--on-surface)); }
.card.hero-balance { --on-surface-variant: rgb(255 255 255 / 0.92); }
.lp-card-split > div { background: rgb(255 255 255 / 0.09); }
.lp-card-chip { background: rgb(255 255 255 / 0.09); }
.card.hero-balance, .card.hero-balance.band { --on-surface-variant: rgb(255 255 255 / 0.95) !important; }
.hero-balance > .row:nth-of-type(2) > .col, .hero-balance.band .col.metric, .hero-balance .metric-tile { background: rgb(8 12 40 / 0.16); }

/* The Undo ring shows time, not decoration, so it runs under reduced motion too (the older rule at
 * the top of the motion section switches every animation off; found by the headless reduced-motion
 * run, rule 272). */
@media (prefers-reduced-motion: reduce) {
    .toast .undo-ring .arc { animation: undo-drain var(--undo-ms) linear forwards !important; }
}

/* The ₹ prefix keeps its room while the field is focused (the focus rule reset the left padding,
 * so the first digit slid under the sign; reported 6 November 2026). */
.field-box.has-prefix input { padding-left: 34px; }
.field-box.has-prefix input:focus { padding-left: 33px; }
/* Four month figures (In, Out, Net, Invested): two by two on narrow windows. */
.rail-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Budget pace on Activity's calendar (approved option B, 6 November 2026; rule 274). Red fades as
 * the month catches up, grey is on pace, green deepens below it. Text keeps at least 4.5:1. */
.cal-day.p-over3 { background: #A32D2D; color: #FCEBEB; }
.cal-day.p-over2 { background: #F09595; color: #501313; }
.cal-day.p-over1 { background: #FCEBEB; color: #791F1F; }
.cal-day.p-on { background: #F1EFE8; color: #444441; }
.cal-day.p-under1 { background: #EAF3DE; color: #27500A; }
.cal-day.p-under2 { background: #C0DD97; color: #27500A; }
.cal-day.p-under3 { background: #97C459; color: #173404; }
.cal-day.p-future { background: transparent; color: var(--on-surface-variant); }
[data-theme="dark"] .cal-day.p-over2 { background: #791F1F; color: #FCEBEB; }
[data-theme="dark"] .cal-day.p-over1 { background: #501313; color: #F7C1C1; }
[data-theme="dark"] .cal-day.p-on { background: #2E3340; color: #E3E6EE; }
[data-theme="dark"] .cal-day.p-under1 { background: #173404; color: #C0DD97; }
[data-theme="dark"] .cal-day.p-under2 { background: #27500A; color: #EAF3DE; }
[data-theme="dark"] .cal-day.p-under3 { background: #3B6D11; color: #EAF3DE; }
.pace-legend { display: inline-flex; align-items: center; gap: 3px; font: 500 11px/14px var(--font); color: var(--on-surface-variant); text-transform: none; letter-spacing: 0; }
.pace-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pace-key:first-of-type { margin-left: 4px; }
.pace-key:last-of-type { margin-right: 4px; }
.pace-key.p-over3 { background: #A32D2D; }
.pace-key.p-over1 { background: #F09595; }
.pace-key.p-on { background: #B4B2A9; }
.pace-key.p-under1 { background: #C0DD97; }
.pace-key.p-under3 { background: #639922; }
.pace-note { margin: -2px 0 6px; }
