/* Money — calm and light. One accent; red only for overdue. */
@font-face { font-family: 'Anek Latin'; font-weight: 400; font-display: swap; src: url(../fonts/anek-latin-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Anek Latin'; font-weight: 500; font-display: swap; src: url(../fonts/anek-latin-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Anek Latin'; font-weight: 600; font-display: swap; src: url(../fonts/anek-latin-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Anek Latin'; font-weight: 700; font-display: swap; src: url(../fonts/anek-latin-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Anek Latin'; font-weight: 400; font-display: swap; src: url(../fonts/anek-latin-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Anek Latin'; font-weight: 500; font-display: swap; src: url(../fonts/anek-latin-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Anek Latin'; font-weight: 600; font-display: swap; src: url(../fonts/anek-latin-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Anek Latin'; font-weight: 700; font-display: swap; src: url(../fonts/anek-latin-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* monsoon evening: deep navy, mist, one marigold */
  --bg: #edf1f5; --surface: #ffffff; --ink: #11283d; --muted: #5f7286; --line: #dde4ea; --soft: #e9eef3;
  --night: #0e2a40; --night-2: #16405e; --marigold: #f6a73a; --marigold-soft: #fff1dc;
  --accent: #17706b; --accent-soft: #e0f0ee; --alert: #c4412c; --alert-soft: #fbe8e3;
  --c-family: #e39a3b; --c-sip: #3e6fd8; --c-emergency: #8a62cc; --c-emis: #c75887; --c-fixed: #6e9a2f; --c-buffer: #8b97a3; --c-share: var(--accent);
  --on-ink: #ffffff;
  --r: 20px; --pad: 18px; --tab-h: 66px;
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.067, 1.099 24.3%, 1.108 26%, 1.1, 1.077 30.6%, 1.021 35.9%, 0.995 39.8%, 0.983 43.2%, 0.981 47.6%, 0.996 58.5%, 1.001 69.4%, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.4 'Anek Latin', system-ui, sans-serif; font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
b, .num, .big { font-weight: 600; }
.muted { color: var(--muted); font-weight: 400; }

/* layout: phone first */
#app { min-height: 100dvh; }
.appbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px; padding: calc(10px + env(safe-area-inset-top)) var(--pad) 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); view-transition-name: appbar; }
.appbar h1 { flex: 1; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.iconbtn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: none; color: var(--ink); cursor: pointer; }
.iconbtn:hover, .iconbtn.on { background: var(--soft); }
.iconbtn.spin svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.screen { padding: 4px var(--pad) calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; }

.tabbar { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); view-transition-name: tabbar; }
.tab { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; }
.tab.on { color: var(--accent); font-weight: 600; }
.tabbar .glow { position: absolute; top: 8px; left: 0; width: 20%; height: 32px; display: flex; justify-content: center; pointer-events: none;
  transform: translateX(calc(var(--i) * 100%)); opacity: var(--on); transition: transform 0.5s var(--spring); }
.tabbar .glow::before { content: ''; width: 56px; border-radius: 16px; background: var(--accent-soft); }
.sidebar { display: none; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--pad); }
.card h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.label { font-size: 13px; color: var(--muted); }
.big { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; margin: 2px 0 6px; }
.big.neg { color: var(--ink); }
.sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.sub b { color: var(--ink); }
.hint { margin-top: 8px; font-size: 13px; color: var(--muted); }
.foot { margin: 16px 2px 0; font-size: 13px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-width: 0; }
.tile .num { font-size: 18px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li > span:first-child { flex: 1; min-width: 0; }
.list li > b { white-space: nowrap; }
.list .muted { font-size: 13px; }
.list .when { flex: 0 0 76px !important; color: var(--muted); font-size: 14px; }
.list .what { flex: 1; min-width: 0; }
.list li.strong > b, .list li.strong > span:first-child { font-weight: 600; }
.alert, .list li.alert b { color: var(--alert); }
.attention { border-color: color-mix(in srgb, var(--alert) 30%, var(--line)); }
.chip { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--ink); }
.chip.ok { background: var(--accent-soft); color: var(--accent); }
.chip.alert { background: var(--alert-soft); color: var(--alert); }
.chip.muted { color: var(--muted); }

.split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 12px 0 6px; gap: 2px; }
.seg { min-width: 3px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.c-family { background: var(--c-family); } .c-sip { background: var(--c-sip); } .c-emergency { background: var(--c-emergency); }
.c-emis { background: var(--c-emis); } .c-fixed { background: var(--c-fixed); } .c-buffer { background: var(--c-buffer); } .c-share { background: var(--c-share); }
.legend li:last-child { font-weight: 600; }

.months { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.months a { flex: none; text-decoration: none; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.months a.on { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.bars .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); transform-origin: left; animation: grow 0.6s var(--spring) both; }
@keyframes grow { from { transform: scaleX(0); } }
.trend { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 170px; align-items: end; }
.trend .col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-decoration: none; text-align: center; gap: 4px; }
.trend .v { font-size: 11px; color: var(--muted); white-space: nowrap; }
.trend .bar { align-self: end; background: color-mix(in srgb, var(--accent) 35%, var(--surface)); border-radius: 6px 6px 2px 2px; transform-origin: bottom; animation: rise 0.6s var(--spring) both; }
.trend .col.on .bar { background: var(--accent); }
.trend .m { font-size: 12px; color: var(--muted); }
@keyframes rise { from { transform: scaleY(0); } }

.activity { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.day { min-width: 0; }
.day h3 { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; margin: 0 2px 6px; }
.day h3 .muted { font-size: 13px; }
.day .list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 var(--pad); }
.txns li { align-items: center; min-width: 0; }
.txns li > .time { flex: 0 0 58px !important; font-size: 13px; color: var(--muted); }
.txns .what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.txns li > b { flex: none; }
.txns .what, .txns .what .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txns b.in { color: var(--accent); }

.btn { font: inherit; font-weight: 500; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-ink); width: 100%; }
.link { font: inherit; border: 0; background: none; color: var(--accent); padding: 0; cursor: pointer; text-decoration: underline; }
.error { color: var(--alert); }
.loading { padding: 40px 0; text-align: center; }
.toast { position: fixed; z-index: 9; left: 50%; bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100vw - 32px); transition: all 0.35s var(--spring); view-transition-name: toast; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.signin { grid-column: 1 / -1; width: 100%; max-width: 380px; margin: 0 auto; padding: 18vh 24px 40px; display: grid; gap: 14px; }
.signin .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.signin h1 { font-size: 32px; font-weight: 600; }
.signin form { display: grid; gap: 12px; }
.signin label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.signin input { font: inherit; font-size: 18px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.signin input[name=code] { letter-spacing: 0.4em; text-align: center; font-size: 24px; }

/* odometer */
.odo { display: inline-flex; overflow: hidden; vertical-align: bottom; }
.odo-d { display: inline-block; height: 1.15em; overflow: hidden; }
.odo-col { display: flex; flex-direction: column; transform: translateY(calc(var(--n, 0) * -1.15em)); transition: transform 0.9s var(--spring); }
.odo-col span, .odo-c { display: block; height: 1.15em; line-height: 1.15em; }

/* laptop: sidebar + grid */
@media (min-width: 900px) {
  #app { display: grid; grid-template-columns: 232px 1fr; grid-template-rows: auto 1fr; }
  .sidebar { display: flex; flex-direction: column; gap: 4px; grid-row: 1 / 3; position: sticky; top: 0; height: 100dvh; padding: 20px 14px;
    border-right: 1px solid var(--line); background: var(--surface); view-transition-name: sidebar; }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-size: 20px; }
  .sidebar .tab { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 15px; }
  .sidebar .tab.on { background: var(--accent-soft); }
  .sidebar .tab:hover:not(.on) { background: var(--soft); }
  .tabbar { display: none; }
  .appbar { grid-column: 2; padding: 20px 28px 12px; }
  .screen { grid-column: 2; padding: 4px 28px 40px; margin: 0; width: 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .grid > .hero, .grid > .tiles, .grid > .span2 { grid-column: 1 / -1; }
  .activity { max-width: 760px; }
  .toast { bottom: 24px; }
  .big { font-size: 48px; }
}
@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* screen changes */
::view-transition-old(root) { animation: 160ms ease-out both fade-out; }
::view-transition-new(root) { animation: 420ms var(--spring) both rise-in; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; }
}
.signin details { font-size: 14px; }
.signin details form { margin-top: 10px; }

/* dark mode: follows the phone unless you pick one in Settings */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #081521; --surface: #0f2233; --ink: #e5edf4; --muted: #8fa4b7; --line: #1d3549; --soft: #152d42; --on-ink: #0b1a27;
  --night: #102f48; --night-2: #1b4a6d; --marigold: #f7ad45; --marigold-soft: #3a2a14;
  --accent: #45b8ac; --accent-soft: #11332f; --alert: #f07058; --alert-soft: #3b1d17;
  --c-family: #eba54d; --c-sip: #6d93ec; --c-emergency: #a585e0; --c-emis: #de78a3; --c-fixed: #93bf52; --c-buffer: #9aa7b3;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #081521; --surface: #0f2233; --ink: #e5edf4; --muted: #8fa4b7; --line: #1d3549; --soft: #152d42; --on-ink: #0b1a27;
  --night: #102f48; --night-2: #1b4a6d; --marigold: #f7ad45; --marigold-soft: #3a2a14;
  --accent: #45b8ac; --accent-soft: #11332f; --alert: #f07058; --alert-soft: #3b1d17;
  --c-family: #eba54d; --c-sip: #6d93ec; --c-emergency: #a585e0; --c-emis: #de78a3; --c-fixed: #93bf52; --c-buffer: #9aa7b3;
  color-scheme: dark;
}
:root[data-theme="dark"] .hero.plain, :root[data-theme="dark"] .face { box-shadow: none; }
.seg-ctl { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--soft); gap: 2px; }
.seg-ctl button { font: inherit; font-size: 14px; border: 0; background: none; color: var(--muted); padding: 7px 14px; border-radius: 9px; cursor: pointer; }
.seg-ctl button.on { background: var(--surface); color: var(--ink); font-weight: 600; }

/* ---------- v2: the runway hero, card faces, timeline ---------- */
.card { border-radius: 16px; box-shadow: none; }
.hero { position: relative; border-radius: 26px; padding: 22px 20px 18px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, var(--night-2), var(--night) 60%); }
.hero::after { content: ''; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(246,167,58,.18), transparent 70%); pointer-events: none; }
.hero.plain { color: var(--ink); background: none; padding: 6px 2px 4px; }
.hero.plain::after { display: none; }
.h-label { font-size: 15px; opacity: .78; }
.hero.plain .h-label { color: var(--muted); opacity: 1; }
.h-big { font-size: 54px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; margin: 2px 0 6px; display: flex; align-items: baseline; gap: 10px; }
.hero.plain .h-big { font-size: 44px; }
.h-unit { font-size: 18px; font-weight: 500; letter-spacing: 0; opacity: .7; }
.h-sub { font-size: 14.5px; line-height: 1.45; opacity: .82; max-width: 52ch; }
.hero.plain .h-sub { color: var(--muted); opacity: 1; }
.h-sub b { color: var(--marigold); }
.hero.is-short .h-big { color: var(--marigold); }
.runway { display: block; width: 100%; height: auto; margin: 14px 0 6px; overflow: visible; }
.rw-line { fill: none; stroke: var(--marigold); stroke-width: 2.2; stroke-linejoin: round; stroke-dasharray: 1400; stroke-dashoffset: 0; animation: draw 1.4s ease-out both; }
@keyframes draw { from { stroke-dashoffset: 1400; } }
.rw-zero { stroke: rgba(255,255,255,.22); stroke-dasharray: 2 4; }
.rw-m { fill: rgba(255,255,255,.55); font-size: 10px; text-anchor: middle; }
.rw-l { fill: rgba(255,255,255,.8); font-size: 10px; }
.rw-dot { fill: var(--night); stroke: var(--marigold); stroke-width: 2.5; }
.rw-today { fill: #fff; }
.h-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 10px; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.12); }
.h-months > div { background: rgba(14,42,64,.55); padding: 10px 12px; }
.h-months p { font-size: 12px; opacity: .7; }
.h-months b { font-size: 17px; }
.stand .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.stand .right { text-align: right; }
.big2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.note .list li:last-child b { color: var(--accent); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.timeline > li { position: relative; }
.timeline > li::before { content: ''; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.timeline > li:has(.in)::before { border-color: var(--accent); background: var(--accent); }
.t-day { font-size: 13px; font-weight: 600; color: var(--muted); }
.timeline ul { list-style: none; margin: 4px 0 2px; padding: 0; }
.timeline ul li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 15px; }
.timeline ul li span { min-width: 0; }
.timeline ul li b { white-space: nowrap; font-weight: 600; }
.timeline ul li.in b { color: var(--accent); }
.t-bal { font-size: 12.5px; color: var(--muted); }

.cardx { padding: 10px; }
.cardx > .list, .cardx > .hint { padding: 0 8px; }
.face { position: relative; border-radius: 16px; padding: 16px 16px 14px; color: #fff; margin-bottom: 8px; overflow: hidden; aspect-ratio: auto;
  background: linear-gradient(135deg, var(--fa, #33475b), var(--fb, #1b2a3a)); }
.face::after { content: ''; position: absolute; right: -30px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.08); }
.f-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.f-top b { font-size: 15px; }
.face .chip { background: rgba(255,255,255,.18); color: #fff; }
.face .chip.alert { background: #fff; color: var(--alert); }
.f-amt { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 18px; }
.f-sub { font-size: 13px; opacity: .8; }
.f-num { font-size: 13px; letter-spacing: .12em; opacity: .75; margin-top: 14px; }
.f-icici-sapphiro { --fa: #3a3f4b; --fb: #15181f; }
.f-icici-amazon { --fa: #2b3a4f; --fb: #121c29; }
.f-sbi-prime { --fa: #1d5aa8; --fb: #0d2f63; }
.f-sbi-tataneu { --fa: #6a3aa8; --fb: #331a5c; }
.f-axis-flipkart { --fa: #9b2350; --fb: #53102b; }

.tab.on { color: var(--ink); }
.tabbar .glow::before { background: var(--marigold-soft); }
.sidebar .tab.on { background: var(--marigold-soft); color: var(--ink); }
.months a.on { background: var(--ink); border-color: var(--ink); }
.fill, .trend .col.on .bar { background: var(--ink); }
.trend .bar { background: color-mix(in srgb, var(--ink) 22%, var(--surface)); }
.btn.primary { background: var(--ink); border-color: var(--ink); }
@media (min-width: 900px) {
  .grid > .safe { grid-column: 1 / -1; }
  .h-big { font-size: 64px; }
  .runway { max-height: 200px; }
}
@media (prefers-reduced-motion: reduce) { .rw-line { animation: none; } }

/* ---------- add a payment ---------- */
.fab { position: fixed; z-index: 7; right: 18px; bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 20px;
  display: grid; place-items: center; background: var(--marigold); color: #1b1203; box-shadow: 0 10px 24px -8px rgba(246,167,58,.7); view-transition-name: fab; }
.fab svg { width: 26px; height: 26px; stroke-width: 2.4; }
@media (min-width: 900px) { .fab { bottom: 28px; right: 28px; } }
.sheet-wrap { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; border: 0; background: rgba(5,14,22,.5); animation: fadein .2s ease-out both; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; background: var(--surface); color: var(--ink);
  border-radius: 26px 26px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 14px; animation: up .45s var(--spring) both; }
@media (min-width: 900px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 26px; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fadein { from { opacity: 0; } }
.grab { justify-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet h2 { font-size: 20px; font-weight: 600; }
.sheet label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.sheet input, .sheet select { font: inherit; font-size: 17px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.sheet .amt { display: flex; align-items: center; gap: 6px; font-size: 40px; font-weight: 700; color: var(--ink); }
.sheet .amt input { font-size: 40px; font-weight: 700; border: 0; background: none; padding: 0; letter-spacing: -0.02em; }
.sheet .amt input:focus { outline: none; }
.dir, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dir label, .chips label { display: block; }
.dir input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.dir span, .chips span { display: inline-block; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); font-size: 14px; cursor: pointer; }
.dir input:checked + span, .chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.dir input:focus-visible + span, .chips input:focus-visible + span { outline: 2px solid var(--marigold); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.txns .x { flex: none; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 4px 2px 4px 8px; cursor: pointer; }
