:root {
  --ground: #F3F3F1; --ink: #111111; --muted: #666666; --soft: #767676; --card: #FFFFFF;
  --line: #EDEDEA; --accent: #111111; --in: #17693F; --out: #B3261E;
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); overscroll-behavior: none; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--ink); -webkit-text-size-adjust: 100%; }
button, input { font-family: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
#app { height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; background: var(--ink); }
.screen { flex: 1; min-height: 0; overflow-y: auto; background: var(--ground); border-radius: 0 0 28px 28px;
  padding: calc(var(--top) + 18px) 20px 26px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.screen.full { border-radius: 0; padding-bottom: calc(var(--bottom) + 20px); }
.tabs { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px 12px max(calc(var(--bottom) - 6px), 12px); min-height: 0; }
/* Installed on iPhone: iOS paints the status-bar strip with the page colour, so make it the light ground, not black. */
html.installed { background: linear-gradient(var(--ground) 50%, var(--ink) 50%); }
html.installed body { background: transparent; }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #A3A3A3; font-size: 11.5px; font-weight: 500; min-height: 44px; }
.tabs a[aria-current] { color: #FFFFFF; }
.tabs svg { width: 24px; height: 24px; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.pill { width: 44px; height: 44px; flex: none; border: 0; border-radius: 14px; background: var(--card); display: flex; align-items: center; justify-content: center; padding: 0; position: relative; }
.pill.dark { background: var(--ink); color: #FFFFFF; }
.pill svg { width: 22px; height: 22px; }
.mark { width: 42px; height: 42px; flex: none; display: block; }
.cur { width: 40px; height: 44px; border: 0; padding: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.cur span { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--soft); font-family: 'Inter Tight', sans-serif; font-size: 16px; font-weight: 500; }
.cur[aria-pressed="true"] span { background: var(--card); color: var(--ink); }
.label { font-size: 13px; color: var(--muted); }
.note { font-size: 12.5px; color: var(--muted); }
.big { display: flex; align-items: baseline; font-family: 'Inter Tight', sans-serif; font-weight: 500; font-size: clamp(38px, 13vw, 52px); line-height: 1; letter-spacing: -0.035em; }
.big .dim, .dim { color: var(--soft); }
.rf { flex: none; fill: currentColor; }
.accounts { display: flex; gap: 10px; overflow-x: auto; margin: 0 -20px; padding: 0 20px; scrollbar-width: none; flex: none; }
.accounts::-webkit-scrollbar { display: none; }
.acct { flex: 1 0 196px; border-radius: 20px; background: var(--card); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.acct { border: 0; margin: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.acct[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }
.acct .sub { color: var(--muted); } .acct[aria-pressed="true"] .sub { color: #B5B5B5; }
.acct .name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct .bal { display: flex; align-items: baseline; font-family: 'Inter Tight', sans-serif; font-size: 20px; letter-spacing: -0.02em; }
.acct .ends { display: flex; gap: 10px; font-size: 11.5px; }
.acct .ends span { display: flex; align-items: center; gap: 4px; }
.acct .ends svg { width: 12px; height: 12px; }
.logo { width: 28px; height: 28px; flex: none; border-radius: 8px; overflow: hidden; color: #FEFEFE; }
.logo.BML { background: linear-gradient(180deg, #D0382F, #9C2420); }
.logo.MIB { background: linear-gradient(180deg, #2559C4, #3070F7); }
.logo svg { width: 100%; height: 100%; display: block; }
.card { border-radius: 20px; background: var(--card); padding: 4px 14px; display: flex; flex-direction: column; flex: none; }
.card.pad { padding: 14px; gap: 12px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--card); flex: none; border: 0; width: 100%; text-align: left; }
.tile { width: 38px; height: 38px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--line); color: #555555; }
.tile svg { width: 20px; height: 20px; }
.tile svg.cat { width: 22px; height: 22px; }
.tile.sms { background: #DDF5E8; color: var(--in); width: 40px; height: 40px; border-radius: 13px; }
.tile.dark { background: var(--ink); color: #FFFFFF; }
.tx { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.t1 { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2 { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt { display: flex; align-items: baseline; flex: none; font-family: 'Inter Tight', sans-serif; font-size: 15px; font-weight: 500; }
.amt.in { color: var(--in); } .amt.out { color: var(--out); }
.h { font-size: 15px; font-weight: 600; }
.title { font-family: 'Inter Tight', sans-serif; font-size: 30px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.link { font-size: 13px; font-weight: 500; color: var(--accent); padding: 6px 0; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; padding: 0 12px 0 7px; border: 0; border-radius: 14px; background: var(--card); font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.chip .tile { width: 28px; height: 28px; border-radius: 9px; } .chip .tile svg { width: 17px; height: 17px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }
.chip small { font-size: 10.5px; font-weight: 600; color: var(--accent); } .chip[aria-pressed="true"] small { color: #FFFFFF; }
.btn { height: 54px; border: 0; border-radius: 16px; background: var(--card); font-size: 15px; font-weight: 500; flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn.dark { background: var(--ink); color: #FFFFFF; flex: 2; }
.btn:disabled { opacity: 0.45; }
.field { height: 54px; width: 100%; border: 0; border-radius: 16px; background: var(--card); padding: 0 16px; font-size: 16px; outline: none; }
.field:focus { box-shadow: 0 0 0 2px var(--ink); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.switch input { width: 22px; height: 22px; accent-color: var(--ink); }
.setting { cursor: pointer; }
.toggle { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: 16px; background: #DCDCD8; cursor: pointer; transition: background 0.2s; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
.toggle:checked { background: var(--ink); }
.toggle:checked::after { transform: translateX(20px); }
.toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .toggle, .toggle::after { transition: none; } }
.sms-text { font-size: 13px; line-height: 1.5; color: var(--muted); background: var(--ground); border-radius: 12px; padding: 10px 12px; overflow-wrap: anywhere; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; }
.err { color: var(--out); font-size: 13px; }
.grow { flex: 1; }
.center { text-align: center; }
.spin { width: 36px; height: 36px; margin: 40px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

/* Bank SMS card on Home */
.msg-icon { width: 46px; height: 46px; flex: none; border-radius: 11.5px; background: linear-gradient(180deg, #5FE676 0%, #12B83A 100%); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.msg-icon svg { width: 41px; height: 41px; }
/* Review: the SMS as it arrived, fading into the app */
.sms-screen { background: linear-gradient(180deg, #FFFFFF 0, #FFFFFF 196px, var(--ground) 330px); }
.pill.grey { background: var(--ground); }
.imsg { display: flex; flex-direction: column; gap: 10px; font-family: -apple-system, 'SF Pro Text', 'Inter', system-ui, sans-serif; }
.imsg-who { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.imsg-who > div:last-child { display: flex; align-items: center; gap: 2px; }
.imsg-who svg[viewBox="0 0 24 24"] { width: 10px; height: 10px; color: #8E8E93; }
.logo.round { width: 44px; height: 44px; border-radius: 50%; }
.imsg-count { min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: flex-end; font-family: 'Inter', sans-serif; font-size: 13px; color: var(--muted); }
.imsg-when { text-align: center; font-size: 11.5px; color: #8E8E93; }
.imsg-when b { font-weight: 600; }
.bubble { position: relative; align-self: flex-start; max-width: min(292px, 82%); border-radius: 19px; background: #E9E9EB; padding: 9px 13px; font-size: 15.5px; line-height: 1.38; overflow-wrap: anywhere; transform-origin: left bottom; }
.bubble svg { position: absolute; left: -6px; bottom: 0; width: 20px; height: 18px; fill: #E9E9EB; }
.bubble mark { background: #D9CFFF; color: var(--ink); border-radius: 5px; padding: 1px 5px; }
.read { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--in); padding-top: 6px; }
.read svg { width: 15px; height: 15px; }
@keyframes rs-bubble { 0% { opacity: 0; transform: translateY(14px) scale(.94); } 60% { opacity: 1; transform: translateY(0) scale(1.015); } 100% { opacity: 1; transform: none; } }
@keyframes rs-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.anim .bubble { animation: rs-bubble .55s cubic-bezier(.2,.8,.2,1) .15s both; }
.anim .rise { animation: rs-rise .6s cubic-bezier(.2,.8,.2,1) .75s both; }
.anim .rise.two { animation-delay: .9s; }
@media (prefers-reduced-motion: reduce) { .anim .bubble, .anim .rise { animation: none; } }
/* Opened in a browser tab on a phone: slimmer menu, since the browser has its own bar below */
.burger, .menu-close, .install { display: none; }
.burger svg { width: 22px; height: 22px; }
/* A phone browser that has not installed the app: no tab bar; a black menu waits under
   the screen, and the menu button slides the screen aside to reveal it, like the desktop sidebar. */
@media (max-width: 959px) {
  .in-browser .burger { display: flex; }
  .in-browser .h-head .mark { display: none; }
  .in-browser .screen { position: relative; z-index: 1; border-radius: 0; transform-origin: left center; transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), border-radius 0.42s, box-shadow 0.42s; }
  .in-browser.menu-open .screen { transform: translateX(262px) scale(0.9); border-radius: 28px; box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45); overflow: hidden; cursor: pointer; }
  .in-browser.menu-open .screen > * { pointer-events: none; }
  .in-browser .tabs { position: fixed; z-index: 0; left: 0; top: 0; height: 100dvh; width: 248px; min-height: 0; display: flex; flex-direction: column; gap: 4px; padding: 0 14px; box-sizing: border-box; overflow-y: auto; opacity: 0; transform: translateX(-24px); pointer-events: none; transition: opacity 0.32s, transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .in-browser.menu-open .tabs { opacity: 1; transform: none; pointer-events: auto; }
  .in-browser .tabs .brand { display: flex; align-items: center; gap: 10px; padding: 0 0 18px 8px; color: #FFFFFF; font-family: 'Inter Tight', sans-serif; font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
  .in-browser .tabs .brand img { width: 38px; height: 38px; display: block; }
  .in-browser .tabs .brand span { flex: 1; }
  .in-browser .tabs a, .in-browser .tabs a.extra { display: flex; flex-direction: row; justify-content: flex-start; gap: 12px; height: 46px; min-height: 46px; flex: none; border-radius: 12px; padding: 0 12px; font-size: 15px; color: #B5B5B5; }
  .in-browser .tabs a[aria-current] { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; font-weight: 600; }
  .in-browser .tabs svg { width: 20px; height: 20px; flex: none; }
  .in-browser .menu-close { display: flex; width: 44px; height: 44px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.12); color: #FFFFFF; align-items: center; justify-content: center; padding: 0; }
  /* The menu's top edge meets the screen's top edge; the brand row sits on that line. */
  .in-browser .tabs .brand { min-height: 44px; padding: 0 0 14px 8px; }
  /* Add to Home Screen: last thing in the menu, on the screen's bottom edge, in the brand's own look. */
  .in-browser .install { display: flex; margin-top: auto; flex: none; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: #FFFFFF; background: linear-gradient(160deg, #2A221B, #1A1511); border: 1px solid rgba(233, 167, 74, 0.35); border-radius: 18px; padding: 12px; cursor: pointer; }
  .install img { width: 44px; height: 44px; border-radius: 10px; flex: none; display: block; }
  .install b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
  .install small { display: block; font-size: 12px; color: #C9B49A; margin-top: 2px; }
  .install > svg { width: 18px; height: 18px; flex: none; color: #E9A74A; transition: transform 0.25s; }
  .install[aria-expanded="true"] > svg { transform: rotate(90deg); }
  .in-browser .how { display: none; margin: 8px 0 0; padding: 12px 12px 12px 30px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); color: #E6DCD0; font-size: 13px; line-height: 1.45; flex: none; }
  .in-browser .how.show { display: block; }
  .how li + li { margin-top: 6px; }
  .how b { color: #FFFFFF; font-weight: 600; }
}
@media (max-width: 959px) and (prefers-reduced-motion: reduce) { .in-browser .screen, .in-browser .tabs { transition: none; } }
.hint { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 14px; border-radius: 18px; background: var(--ink); color: #FFFFFF; flex: none; }
.hint > svg { width: 22px; height: 22px; flex: none; }
.hint button { width: 44px; height: 44px; flex: none; border: 0; background: transparent; color: #B5B5B5; display: flex; align-items: center; justify-content: center; padding: 0; }
.hint button svg { width: 18px; height: 18px; }
.hint { position: sticky; bottom: 0; margin-top: auto; }
.chip.more { padding: 0 14px; border: 1.5px dashed #9A9A96; background: transparent; }
.actions { position: sticky; bottom: 0; padding-top: 8px; background: linear-gradient(180deg, rgba(243, 243, 241, 0), var(--ground) 30%); }

/* ---------- parts only a wide window shows ---------- */
.wide, .tabs .brand, .tabs .extra, .tabs.desk-only { display: none; }
.h-side { display: contents; }
.tagchip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12.5px; font-weight: 500; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- a computer browser: sidebar and dashboard ---------- */
@media (min-width: 960px) {
  #app { max-width: none; flex-direction: row; }
  .tabs, .tabs.desk-only { order: -1; width: 248px; flex: none; display: flex; flex-direction: column; gap: 4px; padding: 24px 16px 20px; min-height: 0; overflow-y: auto; }
  .tabs .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; color: #FFFFFF; font-family: 'Inter Tight', sans-serif; font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
  .tabs .brand img { width: 38px; height: 38px; display: block; }
  .tabs a, .tabs a.extra { display: flex; flex-direction: row; justify-content: flex-start; gap: 12px; height: 44px; min-height: 44px; flex: none; border-radius: 12px; padding: 0 12px; font-size: 14.5px; color: #B5B5B5; }
  .tabs a:hover { color: #FFFFFF; }
  .tabs a[aria-current] { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; font-weight: 600; }
  .tabs svg { width: 20px; height: 20px; flex: none; }
  .screen, .screen.full { margin: 12px 12px 12px 0; border-radius: 28px; padding: 28px 32px; gap: 22px; }
  .screen:not(.home) > * { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; }
  .title.wide, .month.wide { display: flex; }
  .thead.wide { display: grid; }
  .h-head .mark { display: none; }

  .screen.home { display: grid; grid-template-columns: 330px minmax(0, 1fr) 340px; grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "head head head" "bal accts accts" "recent recent side"; column-gap: 24px; align-items: stretch; }
  .h-head { grid-area: head; } .h-bal { grid-area: bal; justify-content: center; } .h-accts { grid-area: accts; } .h-recent { grid-area: recent; min-height: 0; }
  .h-side { grid-area: side; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
  .h-bal .big { font-size: 60px; }
  .accounts { overflow: visible; margin: 0; padding: 0; gap: 12px; }
  .acct { flex: 1 1 0; min-width: 0; padding: 16px; }
  .acct .bal { font-size: 24px; }
  .h-recent > .card { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 22px; border-radius: 22px; }
  .h-recent .tx { display: grid; grid-template-columns: 54px minmax(0, 1fr) 176px 156px 112px; gap: 14px; }
  .h-recent .tx .tile, .h-recent .tx .mid .t2 { display: none; }
  .h-recent .tx .amt { justify-content: flex-end; }
  .h-recent .w-day { display: block; color: var(--muted); font-size: 13px; }
  .h-recent .w-tag, .activity .w-tag { display: block; min-width: 0; }
  /* Activity: the same columns, with the day as a heading above each group */
  .screen.activity > * { max-width: 980px; }
  .activity .tx { display: grid; grid-template-columns: 38px minmax(0, 1fr) 200px 180px 124px; gap: 14px; align-items: center; }
  .activity .tx .mid .t2 { display: none; }
  .activity .tx .amt { justify-content: flex-end; }
  .activity .w-acct { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-width: 0; }
  .activity .w-acct .logo { width: 20px; height: 20px; border-radius: 6px; }
  .activity .w-acct span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .h-recent .w-acct { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-width: 0; }
  .h-recent .w-acct .logo { width: 20px; height: 20px; border-radius: 6px; }
  .h-recent .w-acct span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .thead.tx { display: grid; font-size: 12px; color: var(--soft); padding: 10px 0; }
  .thead .amt { font-family: inherit; font-size: 12px; font-weight: 400; }
  .month { display: flex; flex: 1; min-height: 0; border-radius: 22px; padding: 18px 20px; gap: 14px; overflow-y: auto; }
  .banner { border-radius: 20px; padding: 14px 16px; }
  .actions { background: none; }
}

/* Import: what the statement would change, then what already matches */
.ready { border-radius: 22px; background: var(--ink); color: #FFFFFF; padding: 16px; display: flex; flex-direction: column; gap: 14px; flex: none; }
.ready .n { font-family: 'Inter Tight', sans-serif; font-size: 52px; font-weight: 500; line-height: 0.9; letter-spacing: -0.035em; }
.ready .sub { font-size: 12.5px; color: #B5B5B5; }
.ready .in { border-radius: 14px; background: rgba(255, 255, 255, 0.10); padding: 2px 12px; }
.ready .in .row { gap: 10px; padding: 10px 0; } .ready .in .row + .row { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.ready .in svg { width: 18px; height: 18px; flex: none; color: #FFFFFF; }
.ready .t { font-size: 14px; font-weight: 600; } .ready .c { font-family: 'Inter Tight', sans-serif; font-size: 18px; font-weight: 500; }
.match { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #DDF5E8; color: var(--in); flex: none; }
.match svg { width: 22px; height: 22px; flex: none; }
.ready details > summary { list-style: none; cursor: pointer; } .ready details > summary::-webkit-details-marker { display: none; }
.ready details + details { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.ready .chg { display: flex; align-items: center; gap: 10px; padding: 8px 0 8px 28px; border-top: 1px dashed rgba(255, 255, 255, 0.14); }
.ready .fig { display: flex; align-items: baseline; gap: 6px; font-family: 'Inter Tight', sans-serif; font-size: 14px; flex: none; }
.ready .fig .was { display: flex; align-items: baseline; color: #B5B5B5; text-decoration: line-through; }
.ready .fig .arrow { color: #B5B5B5; }
.ready .fig .rf { color: inherit; }

/* ---------- motion ---------- */
@keyframes dl-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes dl-leave { to { opacity: 0; transform: translateX(-28px); } }
@keyframes dl-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dl-pop { 0% { transform: scale(0.94); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes dl-fade { from { opacity: 0; } to { opacity: 1; } }
/* A screen arriving: its sections rise in one after another, then the rows of each list. */
.screen.enter > * { animation: dl-enter 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.screen.enter > *:nth-child(2) { animation-delay: 0.04s; } .screen.enter > *:nth-child(3) { animation-delay: 0.08s; }
.screen.enter > *:nth-child(4) { animation-delay: 0.12s; } .screen.enter > *:nth-child(5) { animation-delay: 0.16s; }
.screen.enter > *:nth-child(6) { animation-delay: 0.2s; } .screen.enter > *:nth-child(n+7) { animation-delay: 0.24s; }
.screen.enter .card > .tx { animation: dl-enter 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: 0.18s; }
.screen.enter .card > .tx:nth-child(2) { animation-delay: 0.21s; } .screen.enter .card > .tx:nth-child(3) { animation-delay: 0.24s; }
.screen.enter .card > .tx:nth-child(4) { animation-delay: 0.27s; } .screen.enter .card > .tx:nth-child(5) { animation-delay: 0.3s; }
.screen.enter .card > .tx:nth-child(6) { animation-delay: 0.33s; } .screen.enter .card > .tx:nth-child(n+7) { animation-delay: 0.36s; }
.screen.enter ~ .tabs a[aria-current] svg { animation: dl-pop 0.36s ease-out both; }
.screen.leave > * { animation: dl-leave 0.22s ease-in forwards; }
/* Bars fill from the left. */
.bar i { transform-origin: left center; animation: dl-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both; }
/* Touch feedback: things you can press give a little as you press them. */
.pill, .btn, .chip, .acct, .banner, .install, .cur span, .msg-icon, .tagchip { transition: transform 0.16s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease; }
.pill:active, .btn:active, .chip:active, .acct:active, .banner:active, .install:active { transform: scale(0.96); }
.btn:disabled:active { transform: none; }
.acct[aria-pressed="true"], .chip[aria-pressed="true"], .cur[aria-pressed="true"] span { animation: dl-pop 0.3s ease-out; }
.err:not(:empty) { animation: dl-fade 0.25s ease-out; }
.spin { animation: spin 0.8s linear infinite, dl-fade 0.3s ease-out 0.15s both; }
@media (hover: hover) { .tx:hover, .banner:hover { background-color: color-mix(in srgb, var(--ground) 45%, transparent); } .tx { transition: background-color 0.2s; border-radius: 10px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .spin { animation: spin 2.4s linear infinite !important; }
}
.screen.enter .h-side > * { animation: dl-enter 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both; }

/* How current a balance is */
.acct .asof { font-size: 11px; color: var(--soft); }
.acct[aria-pressed="true"] .asof { color: #9A9A96; }
.acct .asof.stale, .stale-text { color: #A8410F; }
.acct[aria-pressed="true"] .asof.stale { color: #FFB48F; }
.upd { display: flex; flex-direction: column; gap: 8px; }
.upd[hidden] { display: none; }

/* Installed on iPhone: content scrolling under the status bar fades out through a smooth, progressive blur
   (weak at the bottom edge, strong at the top), the way iOS blurs behind its own bars. */
.top-blur { display: none; }
html.installed .top-blur { display: block; position: fixed; z-index: 20; left: 0; right: 0; top: 0; height: calc(var(--top) + 14px); pointer-events: none; }
.top-blur i { position: absolute; inset: 0; }
.top-blur i:nth-child(1) { -webkit-backdrop-filter: blur(0.5px); backdrop-filter: blur(0.5px); -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 14%, #000 28%, transparent 42%); mask-image: linear-gradient(to top, transparent 0%, #000 14%, #000 28%, transparent 42%); }
.top-blur i:nth-child(2) { -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); -webkit-mask-image: linear-gradient(to top, transparent 14%, #000 28%, #000 42%, transparent 56%); mask-image: linear-gradient(to top, transparent 14%, #000 28%, #000 42%, transparent 56%); }
.top-blur i:nth-child(3) { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); -webkit-mask-image: linear-gradient(to top, transparent 28%, #000 42%, #000 56%, transparent 70%); mask-image: linear-gradient(to top, transparent 28%, #000 42%, #000 56%, transparent 70%); }
.top-blur i:nth-child(4) { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); -webkit-mask-image: linear-gradient(to top, transparent 42%, #000 56%, #000 70%, transparent 84%); mask-image: linear-gradient(to top, transparent 42%, #000 56%, #000 70%, transparent 84%); }
.top-blur i:nth-child(5) { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-mask-image: linear-gradient(to top, transparent 56%, #000 70%, #000 84%, transparent 98%); mask-image: linear-gradient(to top, transparent 56%, #000 70%, #000 84%, transparent 98%); }
.top-blur i:nth-child(6) { -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); -webkit-mask-image: linear-gradient(to top, transparent 70%, #000 84%); mask-image: linear-gradient(to top, transparent 70%, #000 84%); }
/* A soft wash of the page colour, strongest under the clock and battery so they stay easy to read. */
.top-blur i:nth-child(7) { background: linear-gradient(180deg, rgba(243, 243, 241, 0.92) 0%, rgba(243, 243, 241, 0.78) 40%, rgba(243, 243, 241, 0.35) 75%, rgba(243, 243, 241, 0) 100%); }

/* ---------- transaction sheet: tap a payment ---------- */
.tx.tappable { cursor: pointer; border-radius: 12px; transition: background 0.15s; }
.tx.tappable:active { background: rgba(17, 17, 17, 0.04); }
.tx.tappable:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-dim { position: absolute; inset: 0; background: rgba(17, 17, 17, 0.42); opacity: 0; transition: opacity 0.3s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; max-height: calc(100dvh - var(--top) - 20px); overflow-y: auto; overscroll-behavior: contain;
  box-sizing: border-box; border-radius: 30px 30px 0 0; background: var(--ground); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  padding: 10px 20px calc(var(--bottom) + 18px); display: flex; flex-direction: column; gap: 14px; transform: translateY(104%); transition: transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1); scrollbar-width: none; }
.sheet-wrap.open .sheet-dim { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet > * { flex: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #BDBBB6; margin: -2px auto 2px; padding: 8px 40px; background-clip: content-box; box-sizing: content-box; touch-action: none; cursor: grab; }
.sheet:focus { outline: none; }
.sheet-title { font-size: 18px; font-weight: 600; line-height: 1.25; }
.sheet .big-tile { width: 52px; height: 52px; border-radius: 16px; } .sheet .big-tile svg.cat { width: 28px; height: 28px; }
.round-btn { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: #E6E4DF; display: flex; align-items: center; justify-content: center; padding: 0; }
.round-btn svg { width: 18px; height: 18px; }
.sheet-amt { font-size: 44px; } .sheet-amt.in { color: var(--in); }
.sheet .chip svg:not(.cat) { width: 16px; height: 16px; margin-left: 2px; }
.sheet .chip.more { gap: 4px; }
.switch-row { flex-direction: row !important; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.switch-row span { display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; } .switch-row small { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.details { padding: 2px 16px; } .details .row { gap: 12px; padding: 12px 0; font-size: 14px; } .details .row + .row { border-top: 1px solid var(--line); }
.details span { color: var(--muted); } .details b { font-weight: 500; display: flex; align-items: center; gap: 8px; text-align: right; }
.details .logo { width: 22px; height: 22px; border-radius: 7px; }
.sms-orig summary { font-size: 14px; font-weight: 600; cursor: pointer; }
.sms-orig .bubble.small { margin-top: 10px; font-size: 14px; }
.note-field { display: flex; align-items: center; gap: 10px; height: 50px; border-radius: 16px; background: var(--card); padding: 0 16px; color: #8E8E8A; }
.note-field svg { width: 18px; height: 18px; flex: none; } .note-field input { flex: 1; min-width: 0; border: 0; background: none; font-size: 15px; color: var(--ink); outline: none; }
.search { display: flex; align-items: center; gap: 10px; height: 46px; border-radius: 14px; background: var(--card); padding: 0 14px; color: #8E8E8A; }
.search svg { width: 18px; height: 18px; flex: none; } .search input { flex: 1; min-width: 0; border: 0; background: none; font-size: 15px; color: var(--ink); outline: none; }
.sheet-actions .btn { flex: 1; } .sheet-actions .btn.dark { flex: 1.4; }
.btn.danger { color: var(--out); gap: 8px; } .btn.danger svg { width: 18px; height: 18px; }
.tgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; border-radius: 20px; background: var(--card); padding: 8px; }
.tgrid button { border: 0; background: none; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; font-size: 11px; line-height: 1.25; color: #555555; cursor: pointer; }
.tgrid button .tile { width: 48px; height: 48px; border-radius: 15px; } .tgrid button .tile svg.cat { width: 25px; height: 25px; }
.tgrid button[aria-pressed="true"] { color: var(--ink); font-weight: 600; } .tgrid button[aria-pressed="true"] .tile { box-shadow: 0 0 0 2px var(--ink); }
.sheet-foot { position: sticky; bottom: calc(-1 * (var(--bottom) + 18px)); margin: 0 -20px calc(-1 * (var(--bottom) + 18px)); padding: 14px 20px calc(var(--bottom) + 18px); background: linear-gradient(180deg, rgba(243, 243, 241, 0) 0%, var(--ground) 18%); display: flex; flex-direction: column; gap: 10px; }
.sheet-foot .btn { width: 100%; }
@media (min-width: 960px) { .sheet { bottom: 50%; transform: translateY(60%) scale(0.96); opacity: 0; border-radius: 28px; max-width: 480px; max-height: 86vh; padding-bottom: 20px; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s; }
  .sheet-wrap.open .sheet { transform: translateY(50%); opacity: 1; } .sheet .grab { display: none; } .sheet-foot { bottom: -20px; margin-bottom: -20px; padding-bottom: 20px; } }
.sheet .card .chip { background: var(--ground); }
.sheet-foot .btn { flex: none; height: 54px; }
.sheet .card .chip[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }

/* ---------- account cards: balance first, pencil to rename ---------- */
.acct-card { gap: 12px; border-radius: 22px; }
.acct-card .logo { width: 36px; height: 36px; border-radius: 11px; }
.icon-btn { width: 36px; height: 36px; flex: none; border: 0; border-radius: 13px; background: var(--ground); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; }
.acct-bal { display: flex; align-items: baseline; font-family: 'Inter Tight', sans-serif; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.acct-bal.neg { color: var(--out); }
.fresh-text { color: var(--in); }
.pill-btn { height: 36px; flex: none; border: 0; border-radius: 12px; background: var(--ground); color: var(--ink); padding: 0 12px 0 10px; display: flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; }
.pill-btn svg { width: 16px; height: 16px; }
.acct-card .field { background: var(--ground); }
