/* mobile.css -- F35/D99: the phone + tablet facelift (<1200px).
   Linked with media="(max-width: 1199.98px)": desktop never downloads it.
   Builds on tokens.css. Hero surfaces (band, hero cards, sign-in hero) read
   the --m-hero tokens, which the member's chosen hero sets (F42/D105); the
   top bar and actions keep the per-client brand blue (--m-head from
   APP_THEME_COLOR / --brand-seed). */

:root {
  --m-radius: 20px;
  --m-head: linear-gradient(135deg, var(--brand-seed) 0%, color-mix(in oklab, var(--brand-seed), black 30%) 100%);
  --m-shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 24px -14px rgba(15,23,42,.28);
  --m-gutter: max(16px, env(safe-area-inset-left));
  /* F42/D105: hero tokens (were D102's gold). The chosen hero's file,
     static/css/heroes/hNN.css, is linked after this one and sets them;
     these defaults are 05 Member Card's, so a page is right even if that
     file fails to load. Heroes only -- the top bar, buttons, switches and
     links keep the brand blue (--m-head). */
  --m-hero: linear-gradient(135deg, #0B1B3D 0%, #123C8C 58%, #1A56DB 100%);
  --m-hero-solid: #123C8C;
  --m-hero-ink: #FFFFFF;
  --m-hero-muted: #E6EDFF;
  --m-hero-glow-a: #2563EB;
  --m-hero-glow-b: #0B1B3D;
  --m-hero-glow-o: .45;
  --m-glass-bg: rgba(255,255,255,.1);
  --m-glass-bd: rgba(255,255,255,.24);
  --m-accent: var(--m-hero);
  --m-home: var(--m-hero);
  --m-rings: radial-gradient(circle at 92% 8%, transparent 46px, rgba(255,255,255,.08) 47px 48px, transparent 49px,
               transparent 74px, rgba(255,255,255,.07) 75px 76px, transparent 77px,
               transparent 104px, rgba(255,255,255,.05) 105px 106px, transparent 107px);
  /* F39: the top bar in the desktop chrome's navy (desktop.css --chrome-bg). */
  --m-chrome: linear-gradient(90deg, #0A1F44 0%, #112D6B 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --m-chrome: linear-gradient(90deg, #071430 0%, #0D2150 100%); }
  :root:not([data-theme="light"]) { --m-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 24px -14px rgba(0,0,0,.7); }
}
:root[data-theme="dark"] { --m-chrome: linear-gradient(90deg, #071430 0%, #0D2150 100%); }
:root[data-theme="dark"] { --m-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 24px -14px rgba(0,0,0,.7); }

/* ---- Colour-coded service tiles. White icon; every first stop >= 3:1 on
   white. Colour is decoration: every tile carries a text label. ---- */
.tone { color:#FFFFFF; background:linear-gradient(135deg, var(--t1), var(--t2)); box-shadow:0 8px 16px -10px var(--t2); }
.tone--green   { --t1:#16A34A; --t2:#166534; }
.tone--orange  { --t1:#EA580C; --t2:#9A3412; }
.tone--blue    { --t1:#3B82F6; --t2:#1D4ED8; }
.tone--indigo  { --t1:#6366F1; --t2:#4338CA; }
.tone--amber   { --t1:#D97706; --t2:#92400E; }
.tone--slate   { --t1:#64748B; --t2:#334155; }
.tone--purple  { --t1:#A855F7; --t2:#7E22CE; }
.tone--pink    { --t1:#EC4899; --t2:#BE185D; }
.tone--cyan    { --t1:#0891B2; --t2:#155E75; }
.tone--teal    { --t1:#0D9488; --t2:#115E59; }
.tone--emerald { --t1:#059669; --t2:#065F46; }
.tone--rose    { --t1:#E11D48; --t2:#9F1239; }
.tone--violet  { --t1:#8B5CF6; --t2:#6D28D9; }
.tone--sky     { --t1:#0284C7; --t2:#075985; }

/* ---- Header: branded top bar, and a full-bleed band that continues it
   (home/accounts/loans hero, and the F34 frame banner on every other page). ---- */
.app-bar { background:var(--m-chrome); color:#FFFFFF; border-bottom:0; }  /* desktop navy (F39); gold is for heroes only (D102) */
.app-bar .icon-btn { color:inherit; }
.app-bar .icon-btn:active { background:rgba(255,255,255,.16); }
.app-bar .app-bar__profile[aria-current="page"] { color:inherit; background:rgba(255,255,255,.18); }
.app-bar .list { color:var(--text); }
.app-bar :focus-visible { outline-color:currentColor; }

.m-hero, .desk-hero {
  display:block; margin:calc(-1 * var(--space-4)) calc(-1 * var(--m-gutter)) 0;
  padding:12px var(--m-gutter) 22px; background:var(--m-hero); color:var(--m-hero-ink);  /* F42/D106: 12px, not 4px, clear of the bar */
  border-radius:0 0 28px 28px;
}
.m-hero .balance-card {
  background:var(--m-glass-bg); border:1px solid var(--m-glass-bd); color:var(--m-hero-ink);  /* glass tuned per hero (D102, D105) */
  box-shadow:0 16px 32px -18px rgba(0,0,0,.55); border-radius:24px;
}
.m-hero .balance-card__label, .m-hero .balance-card__loans { color:var(--m-hero-muted); opacity:1; }
.m-hero .balance-card::after { opacity:.18; }

/* F42: the Home hero. Its own background (--m-home, the band unless the
   hero says otherwise) lets a landscape sky keep its bright horizon
   behind the silhouettes, where no text sits. The landscape is a still,
   self-hosted SVG; the hero's file sets the image and its height. */
.m-hero.home-hero { background:var(--m-rings), var(--m-home); }
.home-hero__scene { position:absolute; left:0; right:0; bottom:0; z-index:-1; pointer-events:none;
  background:no-repeat center bottom / 100% 100%; }

/* The frame banner on phones: description + progress only (the title is
   already in the top bar; figures/actions already in the page). */
.desk-hero { margin-bottom:var(--space-5); }  /* 12px top, as the Home hero: the 2px of F37's seamless header pressed the text against the bar */
.desk-hero__eyebrow, .desk-hero__title { display:none; }
.desk-hero__lede { margin:0; font-size:14px; line-height:1.45; opacity:.92; }
.desk-hero__lede:empty { display:none; }
.desk-hero__side > :not(.steps) { display:none; }
.desk-hero:not(:has(.steps)):has(.desk-hero__lede:empty) { display:none; }
/* PIN screens have no top bar on phones -- the band starts at the top. */
.desk-frame:has(.pin-pad) > .desk-hero { margin-top:0; padding-top:max(14px, env(safe-area-inset-top)); }

.steps { display:flex; gap:6px; margin:14px 0 0; padding:0; list-style:none; }
.steps__item { flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:6px; font-size:11px; font-weight:600;
  color:color-mix(in srgb, currentColor 70%, transparent); }
.steps__item::before { content:""; height:4px; border-radius:4px; background:color-mix(in srgb, currentColor 30%, transparent); }
.steps__item--done::before, .steps__item--current::before { background:currentColor; }
.steps__item--current { color:inherit; }
.steps { color:var(--m-hero-ink); }
.steps__num { display:none; }
.steps__label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ---- Bottom tab bar (phones) and rail (tablets): an active pill. ---- */
.tab svg { width:46px; height:30px; padding:4px 11px; border-radius:999px; flex:none; transition:background-color var(--dur) var(--ease); }
.tab[aria-current="page"] svg {
  background:var(--brand); color:var(--on-brand);
  box-shadow:0 2px 8px color-mix(in srgb, var(--brand) 32%, transparent);
}
.tab[aria-current="page"] { font-weight:700; }
@media (max-width: 767.98px) {
  .tab-bar { height:64px; border-top:0; box-shadow:0 -10px 24px -16px rgba(15,23,42,.35); }
  .tab { gap:3px; }
}

/* ---- Section headings: sentence case, a "See all" link. ---- */
.section-head { margin-top:var(--space-2); }
.section-head .t-label { font-size:15px; font-weight:700; letter-spacing:0; text-transform:none; color:var(--text); }
.section-head__link { font-size:13px; font-weight:600; color:var(--brand); text-decoration:none; }

/* ---- Cards ---- */
.list { border:0; border-radius:var(--m-radius); box-shadow:var(--m-shadow); }
.item-card { border:0; border-radius:var(--m-radius); box-shadow:var(--m-shadow); }
.item-card--alert { box-shadow:inset 4px 0 0 var(--warn), var(--m-shadow); }
.balance-card { border-radius:24px; }
.monogram--sm { width:36px; height:36px; font-size:13px; border-radius:11px; }

/* ---- Quick action tiles ---- */
.quick__icon.tone { border-radius:16px; }
.quick--lg .quick__icon { width:60px; height:60px; border-radius:18px; }
.quick--lg .quick__icon svg { width:26px; height:26px; }
.quick--4-up { grid-template-columns:repeat(4, 1fr); gap:14px 8px; }
.quick__label { font-weight:600; font-size:12px; line-height:1.3; }
.quick--lg .quick__label { font-size:13px; }
.dashboard__actions .quick, .quick--4-up, .quick--3-up:not(.quick--lg) {
  background:var(--surface); border-radius:var(--m-radius); box-shadow:var(--m-shadow); padding:18px 10px;
}
.quick__item { text-decoration:none; }

/* ---- Home: account cards, next repayment, tip ---- */
.m-cards { display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none;
  margin:0 calc(-1 * var(--m-gutter)); padding:2px var(--m-gutter) 12px; }
.m-cards::-webkit-scrollbar { display:none; }
.m-acct { flex:0 0 72%; max-width:300px; scroll-snap-align:start; display:flex; flex-direction:column; gap:3px; padding:16px;
  border-radius:var(--m-radius); background:var(--surface); box-shadow:var(--m-shadow); color:var(--text); text-decoration:none; }
.m-acct__top { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.m-acct__type { font-weight:700; }
.m-acct__num { font-size:13px; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.m-acct__caps { margin-top:8px; font-size:12px; font-weight:700; color:var(--brand); }

.m-tile { display:flex; align-items:center; gap:14px; padding:16px; border-radius:var(--m-radius);
  background:var(--surface); box-shadow:var(--m-shadow); color:var(--text); text-decoration:none; }
.m-tile__icon { width:46px; height:46px; border-radius:14px; flex:none; display:flex; align-items:center; justify-content:center; }
.m-tile__text { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.m-tile__label { font-size:12px; font-weight:600; color:var(--text-muted); }
.m-tile__title { font-weight:700; }
.m-tile__meta { font-size:13px; color:var(--text-muted); }
.m-tile__chev { flex:none; color:var(--text-subtle); }

.m-tip { display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-radius:var(--m-radius);
  background:var(--brand-subtle); color:var(--text); }
.m-tip svg { flex:none; color:var(--brand); }
.m-tip p { margin:0; font-size:13px; line-height:1.5; }

/* ---- Detail pages: the headline figure as a branded card ---- */
.m-figure { padding:20px; border-radius:var(--m-radius); background:var(--m-hero); color:var(--m-hero-ink);
  box-shadow:0 16px 32px -20px rgba(15,23,42,.6); }
.m-figure__label { margin:0 0 6px; font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; opacity:.85; }

/* ---- Transact hub (and other .svc lists): grouped rows with chevrons ---- */
.svc-hub { display:flex; flex-direction:column; gap:22px; }
.svc-group__title { margin:0 0 8px; font-size:15px; font-weight:700; color:var(--text); }
.svc-grid, .svc-list { display:flex; flex-direction:column; background:var(--surface); border-radius:var(--m-radius);
  box-shadow:var(--m-shadow); overflow:hidden; }
.svc { position:relative; display:flex; align-items:center; gap:14px; padding:14px 16px; color:var(--text); text-decoration:none; }
.svc + .svc::before { content:""; position:absolute; top:0; left:72px; right:0; border-top:1px solid var(--border); }
.svc::after { content:""; flex:none; width:8px; height:8px; margin-left:auto; border-top:2px solid var(--text-subtle);
  border-right:2px solid var(--text-subtle); transform:rotate(45deg); }
.svc:active { background:var(--surface-2); }
.svc__icon { width:42px; height:42px; border-radius:13px; flex:none; display:flex; align-items:center; justify-content:center; }
.svc__text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.svc__title { font-size:15px; font-weight:600; }
.svc__desc { font-size:13px; line-height:1.4; color:var(--text-muted); }

/* ---- Panels, help, notices, how-it-works (side column under the page) ---- */
.desk-frame__aside { display:flex; flex-direction:column; gap:16px; margin-top:var(--space-6); }
.desk-frame__aside:empty { display:none; }
.desk-frame:has(.pin-pad) > .desk-frame__aside { display:none; }
.panel { background:var(--surface); border-radius:var(--m-radius); box-shadow:var(--m-shadow); overflow:hidden; }
.panel__head { display:flex; align-items:center; justify-content:space-between; padding:14px 16px 4px; }
.panel__title { margin:0; font-size:15px; font-weight:700; }
.help-list { margin:0; padding:2px 16px 10px; }
.help-list div { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
.help-list div:last-child { border-bottom:0; }
.help-list dt { font-size:14px; color:var(--text-muted); }
.help-list dd { margin:0; font-size:14px; font-weight:600; text-align:right; }
.help-list--stacked div { flex-direction:column; gap:3px; }
.help-list--stacked dt { color:var(--text); font-weight:600; }
.help-list--stacked dd { font-weight:400; font-size:13px; color:var(--text-muted); text-align:left; }
.help-list a { color:var(--brand); text-decoration:none; }
.notice { display:flex; gap:12px; padding:14px 16px; border-radius:var(--m-radius); background:var(--brand-subtle); color:var(--text); }
.notice > svg { flex:none; color:var(--brand); margin-top:2px; }
.notice__title { margin:0 0 2px; font-size:14px; font-weight:700; }
.notice__body { margin:0; font-size:13px; line-height:1.5; color:var(--text-muted); }
.howto { margin:0; padding:8px 16px 16px; list-style:none; counter-reset:howto; display:flex; flex-direction:column; gap:12px; }
.howto li { counter-increment:howto; display:grid; grid-template-columns:24px 1fr; gap:10px; font-size:13px; line-height:1.5; color:var(--text-muted); }
.howto li::before { content:counter(howto); width:24px; height:24px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; font-size:12px; font-weight:700; background:var(--brand-subtle); color:var(--brand); }

/* ---- My Profile ---- */
.overview__stack, .overview__side--row { display:flex; flex-direction:column; gap:16px; }
.profile-card { display:flex; align-items:center; gap:16px; padding:20px; border-radius:var(--m-radius);
  background:var(--m-hero); color:var(--m-hero-ink); box-shadow:0 16px 32px -20px rgba(15,23,42,.6); }
.profile-card__avatar { width:60px; height:60px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center;
  font-size:22px; font-weight:700; background:rgba(255,255,255,.4); border:2px solid rgba(255,255,255,.7); }
.profile-card__name { margin:0; font-size:19px; font-weight:700; }
.profile-card__meta { margin:4px 0 0; display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:13px; opacity:.92; }

/* ---- Settings and other .desk-panel cards (display:contents in screens.css) ---- */
.desk-panel { display:block; }
.desk-card-row { display:flex; flex-direction:column; gap:16px; }
.settings-card, .desk-card { background:var(--surface); border-radius:var(--m-radius); box-shadow:var(--m-shadow); overflow:hidden; }
.settings-card > .section-head, .desk-card > .section-head { margin:0; padding:14px 16px 2px; }
.settings-card > .def-row { padding:12px 16px; align-items:center; }
.settings-card > .def-row + .def-row { border-top:1px solid var(--border); }
.settings-card--signout { background:none; box-shadow:none; }
.desk-card > form, .desk-card > p { margin:0; padding:10px 16px 16px; }
.desk-card > .list { box-shadow:none; border-radius:0; }
.def-row__label:has(.row-ic) { display:inline-flex; align-items:center; gap:12px; color:var(--text); }
.row-ic { width:34px; height:34px; border-radius:11px; flex:none; display:inline-flex; align-items:center; justify-content:center; }

/* ---- Money forms, PIN and result screens as cards ---- */
.money-form { background:var(--surface); border-radius:var(--m-radius); box-shadow:var(--m-shadow); padding:20px 16px; }
.result { background:var(--surface); border-radius:var(--m-radius); box-shadow:var(--m-shadow); padding:32px 20px 24px; }
.result > svg:first-child { box-sizing:content-box; width:52px; height:52px; padding:20px; border-radius:50%;
  background:color-mix(in srgb, currentColor 12%, transparent);
  box-shadow:0 0 0 12px color-mix(in srgb, currentColor 6%, transparent); margin:12px auto 28px; }
.empty svg { box-sizing:content-box; padding:16px; border-radius:50%; background:var(--surface-2); }

/* Loan application: the guarantor amount field sat on the 34px hero
   amount style, so its placeholder ("Amount (if required)") was cut off. */
.desk-card .amount-input { justify-content:flex-start; margin:12px 0; }
.desk-card .amount-input__field { font-size:20px; max-width:none; text-align:left; }

/* ---- F36: hero effects (header band, detail figure, profile card).
   CSS gradients only (CSP: no images or data: URIs); only transform and
   opacity animate, on pseudo-elements, so phones composite them cheaply.
   base.css's prefers-reduced-motion rule stops every animation here. ---- */
.m-hero, .desk-hero, .m-figure, .profile-card { position:relative; overflow:hidden; isolation:isolate; }

/* Static ornament on the element itself: concentric rings top-right, over
   the brand gradient. (A diagonal light was tried and dropped: it pushed
   white text below 4.5:1.) */
.m-hero, .desk-hero, .m-figure, .profile-card {
  background:var(--m-rings), var(--m-hero);
}

/* Aurora: two hue-shifted glows of the brand seed (same brightness, so
   white text keeps its contrast) drifting slowly behind the content. */
.m-hero::before, .desk-hero::before, .m-figure::before, .profile-card::before {
  content:""; position:absolute; inset:-60% -40%; z-index:-1; pointer-events:none;
  background:
    radial-gradient(38% 42% at 22% 30%, var(--m-hero-glow-a) 0%, transparent 70%),
    radial-gradient(34% 40% at 78% 70%, var(--m-hero-glow-b) 0%, transparent 70%);
  opacity:var(--m-hero-glow-o);
  animation:m-aurora 16s ease-in-out infinite alternate;
}
/* Dot grid, fading out towards the bottom edge. */
.m-hero::after, .desk-hero::after, .m-figure::after, .profile-card::after {
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1.6px) 0 0 / 14px 14px;
  -webkit-mask-image:linear-gradient(180deg, #000 0%, transparent 85%);
          mask-image:linear-gradient(180deg, #000 0%, transparent 85%);
}
@keyframes m-aurora {
  0%   { transform:translate3d(-6%, -4%, 0) rotate(0deg) scale(1); }
  50%  { transform:translate3d(5%, 3%, 0) rotate(8deg) scale(1.08); }
  100% { transform:translate3d(-2%, 6%, 0) rotate(-6deg) scale(1.02); }
}

/* Entrance: the hero's content rises in once, staggered. */
.m-hero > *, .desk-hero > *, .m-figure > *, .profile-card > * {
  animation:m-rise .55s cubic-bezier(.2,.7,.2,1) both;
}
.m-hero > :nth-child(2), .desk-hero > :nth-child(2), .m-figure > :nth-child(2), .profile-card > :nth-child(2) { animation-delay:.08s; }
@keyframes m-rise { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }

/* Balance cards: a glassy edge highlight and a light sweep every few seconds. */
.m-hero .balance-card { box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 18px 36px -20px rgba(0,0,0,.6); }
.m-hero .balance-card > * { position:relative; z-index:1; }
.m-hero .balance-card::before, .m-figure > .amount::after {
  content:""; position:absolute; inset:0; pointer-events:none; z-index:0;
  background:linear-gradient(105deg, transparent 35%, rgba(255,255,255,.14) 50%, transparent 65%);
  transform:translateX(-120%);
  animation:m-sheen 7s ease-in-out 1.2s infinite;
}
.m-figure > .amount { position:relative; display:inline-block; overflow:hidden; border-radius:8px; }
@keyframes m-sheen { 0%, 70% { transform:translateX(-120%); } 100% { transform:translateX(120%); } }

/* Progress bar: the current step's segment shimmers. */
.steps__item--current::before {
  background:linear-gradient(90deg, currentColor 0%, color-mix(in srgb, currentColor 45%, transparent) 50%, currentColor 100%) 0 0 / 200% 100%;
  animation:m-progress 2.4s linear infinite;
}
@keyframes m-progress { to { background-position:-200% 0; } }

/* Profile avatar: a soft breathing ring. */
.profile-card__avatar { position:relative; }
.profile-card__avatar::after {
  content:""; position:absolute; inset:-6px; border-radius:50%; border:2px solid rgba(255,255,255,.35);
  animation:m-breathe 3.2s ease-in-out infinite;
}
@keyframes m-breathe { 0%, 100% { transform:scale(1); opacity:.9; } 50% { transform:scale(1.12); opacity:0; } }

/* ---- F37: visual richness (phones + tablets) ---- */

/* Hero ornament: rings over the band and the hero cards. */
.m-hero, .desk-hero {
  background:var(--m-rings), var(--m-hero);
}

/* The sign-in band moved to auth.css with F43's own artwork; the form
   card lifting over a band, below, is shared with the PIN screens. */
.login-screen form {
  position:relative; margin-top:-32px; padding:20px 16px 8px; background:var(--surface);
  border-radius:24px; box-shadow:var(--m-shadow); animation:m-rise .55s cubic-bezier(.2,.7,.2,1) .1s both;
}
.login-screen__field-block { margin-top:0; }

/* Monograms in their own stable colour. */
.monogram.tone { border-radius:14px; color:#FFFFFF; }

/* Primary buttons, switches and the selected segment in the brand gradient. */
.btn--primary { background:var(--m-head); color:var(--on-brand); box-shadow:0 12px 22px -14px var(--brand-seed); }
.btn--primary:active { transform:scale(.98); }
.segmented__option[aria-checked="true"], .segmented__option[aria-pressed="true"] {
  background:var(--m-head); color:var(--on-brand); font-weight:700;
}
.switch[aria-checked="true"] { background:var(--m-head); }

/* Status chips get a leading dot in their own colour. */
.chip { display:inline-flex; align-items:center; gap:5px; }
.chip--active::before, .chip--dormant::before, .chip--blocked::before, .chip--closed::before {
  content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }

/* Section headings with a brand accent bar. */
.section-head .t-label::before {
  content:""; display:inline-block; width:4px; height:15px; margin-right:8px; border-radius:2px;
  vertical-align:-2px; background:var(--m-accent);
}

/* Life: cards rise in as the page opens; tiles press when tapped. */
.dashboard > :not(.m-hero):not(:has(.m-hero)), .svc-hub > *, .desk-frame__aside > *, .card-grid > *, .overview__stack > *, .overview__side--row > * {
  animation:m-rise .5s cubic-bezier(.2,.7,.2,1) both;  /* not the header band: it must not leave a gap above it */
}
.dashboard > :nth-child(2), .svc-hub > :nth-child(2), .desk-frame__aside > :nth-child(2), .card-grid > :nth-child(2), .overview__stack > :nth-child(2), .overview__side--row > :nth-child(2) { animation-delay:.06s; }
.dashboard > :nth-child(3), .svc-hub > :nth-child(3), .desk-frame__aside > :nth-child(3), .card-grid > :nth-child(3), .overview__stack > :nth-child(3), .overview__side--row > :nth-child(3) { animation-delay:.12s; }
.dashboard > :nth-child(4), .svc-hub > :nth-child(4), .card-grid > :nth-child(4), .overview__side--row > :nth-child(4) { animation-delay:.18s; }
.dashboard > :nth-child(n+5), .svc-hub > :nth-child(n+5), .card-grid > :nth-child(n+5) { animation-delay:.24s; }
.quick__icon, .svc__icon, .m-tile__icon, .row-ic { transition:transform var(--dur-fast) var(--ease); }
.svc:active .svc__icon, .m-tile:active .m-tile__icon { transform:scale(.9); }
.m-acct, .m-tile, .item-card { transition:transform var(--dur-fast) var(--ease); }
.m-acct:active, .m-tile:active { transform:scale(.98); }
.quick__icon.tone { box-shadow:0 10px 18px -10px var(--t2), inset 0 1px 0 rgba(255,255,255,.25); }

/* Tab bar: rounded top, lifted. */
@media (max-width: 767.98px) {
  .tab-bar { border-radius:22px 22px 0 0; }
}

/* Result screens: the outcome animates. Success draws its check, pending
   sweeps the clock hands with a turning ring, failure shakes once. */
.result { position:relative; overflow:hidden; }
.result > svg:first-child circle, .result > svg:first-child path { stroke-dasharray:60; stroke-dashoffset:60;
  animation:m-draw .9s cubic-bezier(.65,0,.35,1) .15s forwards; }
.result > svg:first-child path { animation-delay:.6s; }
@keyframes m-draw { to { stroke-dashoffset:0; } }
.result--pending > svg:first-child path { stroke-dasharray:none; stroke-dashoffset:0; transform-origin:12px 12px;
  animation:m-hands 3s linear infinite; }
@keyframes m-hands { to { transform:rotate(360deg); } }
.result--pending::before {
  content:""; position:absolute; left:50%; top:34px; width:112px; height:112px; margin-left:-56px; border-radius:50%;
  background:conic-gradient(from 0deg, transparent 0 70%, color-mix(in srgb, var(--brand) 55%, transparent) 100%);
  -webkit-mask:radial-gradient(circle, transparent 52px, #000 53px);
          mask:radial-gradient(circle, transparent 52px, #000 53px);
  animation:m-hands 1.8s linear infinite;
}
.result--danger > svg:first-child { animation:m-shake .5s ease-in-out 1s both; }
@keyframes m-shake { 0%, 100% { transform:none; } 20%, 60% { transform:translateX(-6px); } 40%, 80% { transform:translateX(6px); } }
.result::after {  /* soft confetti of brand dots behind the icon */
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(circle at 18% 22%, var(--brand-subtle) 5px, transparent 6px),
    radial-gradient(circle at 82% 16%, var(--brand-subtle) 7px, transparent 8px),
    radial-gradient(circle at 74% 44%, var(--brand-subtle) 4px, transparent 5px),
    radial-gradient(circle at 26% 48%, var(--brand-subtle) 3px, transparent 4px);
}
.result > * { position:relative; z-index:1; }

/* Empty states: the icon in a brand-gradient medallion. */
.empty svg { color:var(--on-brand); background:var(--m-head); box-shadow:0 14px 28px -16px var(--brand-seed); }

/* ---- Precedence fixes (keep last) ---- */
/* Desktop-only overviews stay off phones even where a shared class above
   (e.g. .overview__stack) gives them a display. */
.desk-only { display:none; }
/* Pages that bring their own header band (Loans' hero card) skip the
   frame banner, so there's one band, not two. */
.desk-frame:has(.m-hero) > .desk-hero { display:none; }
/* The "For you" carousel's tips are now the side column's help + notice. */
.promo, .section-head:has(+ .promo) { display:none; }

/* F40: statement on phones and tablets -- a hero summary, the All / Money
   in / Money out switch, and the ledger table drawn as day-grouped cards.
   Screen only, so printing keeps components.css's table. */
@media screen {
.stmt-sum { grid-template-columns:1fr 1fr; grid-template-areas:"close close" "open open" "in out"; gap:10px 12px;
  padding:18px; background:var(--surface); border-radius:var(--m-radius); box-shadow:var(--m-shadow); }
.stmt-sum--mini { grid-template-areas:"close close" "in out"; }
.stmt-sum--loan { grid-template-areas:"close close" "open open" "out in"; }
.stmt-sum--loan.stmt-sum--mini { grid-template-areas:"close close" "out in"; }
.stmt-sum__item { padding:0; border:0; border-radius:0; background:none; }
.stmt-sum__cur { display:inline; }
.stmt-sum__item--close { grid-area:close; }
.stmt-sum__item--close .stmt-sum__label { color:var(--text-muted); opacity:1; }
.stmt-sum__item--close .stmt-sum__value { color:var(--text); font-size:32px; line-height:1.1; letter-spacing:-.01em; }
.stmt-sum__item--open { grid-area:open; flex-direction:row; flex-wrap:wrap; gap:4px; margin-top:-4px; }
.stmt-sum__item--open .stmt-sum__label::after { content:":"; }
.stmt-sum__item--open .stmt-sum__label, .stmt-sum__item--open .stmt-sum__value { font-size:14px; font-weight:400; color:var(--text-muted); }
.stmt-sum__item--in, .stmt-sum__item--out { padding:12px 14px; border-radius:14px; }
.stmt-sum__item--in { grid-area:in; background:var(--ok-bg); }
.stmt-sum__item--out { grid-area:out; background:var(--danger-bg); }
.stmt-sum__item--in .stmt-sum__value, .stmt-sum__item--out .stmt-sum__value { font-size:17px; }
.stmt-tabs { display:block; }
.stmt-tabs .segmented { padding:4px; border-radius:14px; }
.stmt-tabs .segmented__option { min-height:44px; border-radius:11px; }
.stmt-tabs .segmented__option[aria-pressed="true"] { box-shadow:0 1px 3px rgba(15,23,42,.14); }
.stmt-filter { padding:14px; border:0; border-radius:var(--m-radius); box-shadow:var(--m-shadow); }
.stmt-filter__type { display:none; }
.stmt-filter__field { flex:1 1 40%; }
.stmt-filter__search, .stmt-filter .btn { flex:1 1 100%; }
.stmt-tools .btn { flex:1 1 0; padding-inline:12px; }
.stmt-tools__filter { display:flex; cursor:pointer; }
.stmt-toggle:focus-visible + .stmt-tools .stmt-tools__filter { outline:2px solid var(--brand); outline-offset:2px; }
.stmt-toggle:checked + .stmt-tools .stmt-tools__filter { background:var(--brand-subtle); }
.stmt-toggle:not(:checked) ~ .stmt-filter { display:none; }

.ledger-wrap { background:none; border:0; border-radius:0; overflow:visible; }
.ledger, .ledger tbody, .ledger tr, .ledger td, .ledger th { display:block; }
.ledger thead, .ledger .ledger__edge, .ledger .lr__d { display:none; }
.ledger td, .ledger th { padding:0; border:0; }
.ledger__day + .ledger__day { margin-top:16px; }
.lr-day { position:sticky; top:56px; z-index:1; padding:0 4px 8px; background:var(--bg); }
.lr-day th { font-size:12px; font-weight:700; letter-spacing:.06em; color:var(--text-muted); }
.ledger .lr { display:grid; grid-template-columns:auto minmax(0,1fr) auto; grid-template-areas:"t t a" "r c b"; gap:3px 8px;
  position:relative; padding:14px 16px 14px 66px; background:var(--surface); }
.lr + .lr { border-top:1px solid var(--border); }
.lr-day + .lr { border-radius:var(--m-radius) var(--m-radius) 0 0; }
.lr:last-child { border-radius:0 0 var(--m-radius) var(--m-radius); }
.lr-day + .lr:last-child { border-radius:var(--m-radius); }
.lr__t { grid-area:t; font-size:15px; min-width:0; overflow-wrap:anywhere; }
.lr__t .txn-ic { display:flex; position:absolute; left:16px; top:50%; margin-top:-19px; }
.lr__r, .lr__c, .lr__b { font-size:12px; color:var(--text-muted); }
.lr__r { grid-area:r; }
.lr__c { grid-area:c; min-width:0; overflow:hidden; }
.lr__c .chip { display:block; max-width:max-content; overflow:hidden; text-overflow:ellipsis; padding:2px 8px; font-size:11px; }
.ledger .lr__in, .ledger .lr__out { grid-area:a; font-size:15px; font-weight:700; }
.lr__in:empty, .lr__out:empty { display:none; }
.lr .amount[data-direction="credit"]::before { content:"+"; }
.lr .amount[data-direction="debit"]::before { content:"\2212"; }
.lr__b { grid-area:b; }
.ledger .lr__b::before { content:"Bal "; }
.lr__dc { display:inline; font-size:12px; font-weight:600; color:var(--text-muted); }
.stmt-sum--loan .stmt-sum__item--in, .stmt-sum--loan .stmt-sum__item--out { background:var(--surface-2); }
}
