/* Bylt Capital client portal. Layout A (Danny, 2026-10-16): a sidebar on wide
   screens, a bottom tab bar on phones; offers fold open on phones.
   Same system as the homepage: Plus Jakarta Sans, brand blue, ink neutrals,
   4px corners, borders over shadows. Light and dark follow the device. */
:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --bg: #f4f7fd; --surface: #ffffff; --tint: #eef2f9; --tint-2: #e6ebf4;
  --line: #d6dae4; --line-soft: #e6e9f0; --line-strong: #b7bdcc;
  --text: #0b1220; --text-2: #4a5673; --text-3: #6b7693;
  --link: #1e64d6; --btn: #1e64d6; --btn-hover: #154aa3; --on-btn: #ffffff;
  --wash: #eef3fb; --wash-2: #dbe7f8; --brand-300: #7aaae9;
  --good: #0f7a4a; --good-wash: #e5f3ec; --warn: #8a5300; --warn-wash: #fff3d9; --bad: #b3261e; --bad-wash: #fdecea;
  --band: #0b1220; --on-band: #ffffff; --on-band-2: #b7bdcc;
  --mark-bg: #0b1220; --mark-fg: #ffffff;
  --scrim: rgba(11, 18, 32, 0.42);
  --radius: 4px; --radius-lg: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a101c; --surface: #111a2b; --tint: #162036; --tint-2: #1b2740;
    --line: #26324a; --line-soft: #1d2840; --line-strong: #3a4762;
    --text: #e8edf7; --text-2: #aab3c7; --text-3: #8c95ad;
    --link: #7aaae9; --btn: #2a6fe0; --btn-hover: #4a85e0; --on-btn: #ffffff;
    --wash: #142039; --wash-2: #1c2f52; --brand-300: #7aaae9;
    --good: #4cc48f; --good-wash: #0f2a1f; --warn: #e3a845; --warn-wash: #2b2111; --bad: #f0776d; --bad-wash: #2d1515;
    --band: #060b16; --on-band: #ffffff; --on-band-2: #aab3c7;
    --mark-bg: #e8edf7; --mark-fg: #0b1220;
    --scrim: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--link); }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.015em; }
:focus-visible { outline: 2px solid var(--btn); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.app { container: app / inline-size; min-height: 100vh; }
.boot { min-height: 80vh; display: grid; place-content: center; justify-items: center; gap: 20px; }

/* ── Building blocks ── */
.eyebrow { font: 500 11px/1.3 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3); }
.h1 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.h2 { font-size: 18px; font-weight: 700; line-height: 1.25; }
.h3 { font-size: 15px; font-weight: 700; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.right { margin-left: auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; min-width: 0; }
.card.flat { background: var(--tint); border-color: var(--line-soft); }
.card.hi { border-color: var(--btn); background: var(--wash); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head .h3 { min-width: 0; }
.hr { height: 1px; background: var(--line-soft); margin: 4px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; transition: background 120ms, border-color 120ms; }
.btn:hover { border-color: var(--line-strong); }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--on-btn); }
.btn.primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.danger { color: var(--bad); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--link); padding: 0 8px; }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn.lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.link { color: var(--link); font-weight: 600; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flip { transform: scaleX(-1); }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--tint); color: var(--text-2); }
.pill.good { background: var(--good-wash); color: var(--good); }
.pill.warn { background: var(--warn-wash); color: var(--warn); }
.pill.bad { background: var(--bad-wash); color: var(--bad); }
.pill.info { background: var(--wash-2); color: var(--link); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill .ic { width: 13px; height: 13px; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--btn); color: var(--on-btn);
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.bar { height: 6px; border-radius: 999px; background: var(--tint-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--btn); border-radius: inherit; }
.bar.good > i { background: var(--good); }

.kv { display: grid; grid-template-columns: minmax(45%, 1fr) minmax(0, auto); gap: 8px 16px; margin: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mid { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -0.01em; font-size: 17px; color: var(--text); text-decoration: none; }
.brand .mark { width: 26px; height: 26px; border-radius: 3px; background: var(--mark-bg); color: var(--mark-fg);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; letter-spacing: 0; }
.brand em { font-style: normal; color: var(--link); }
.brand.on-dark { color: var(--on-band); }
.brand.on-dark .mark { background: var(--on-band); color: var(--band); }
.brand.on-dark em { color: var(--brand-300); }
.brand picture { display: block; }
.brand .logo { display: block; height: 26px; width: auto; }
.brand .sub { font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-left: 2px; }

/* Forms */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); font-size: 16px; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--btn); box-shadow: 0 0 0 3px var(--wash-2); }
.field .help { font-size: 12px; color: var(--text-3); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fgrid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--btn); }
.error { color: var(--bad); font-size: 12.5px; font-weight: 600; }
.notice { padding: 10px 12px; border-radius: var(--radius); background: var(--warn-wash); color: var(--warn); font-size: 13px; font-weight: 600; }
.notice.good { background: var(--good-wash); color: var(--good); }
.notice.info { background: var(--wash); color: var(--link); }
.money-in { position: relative; }
.money-in::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.money-in input { padding-left: 24px; }
.otp { letter-spacing: 0.4em; font: 600 22px/1 var(--mono) !important; text-align: center; }
.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.choice { text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.choice b { display: block; font-variant-numeric: tabular-nums; }
.choice span { display: block; font-size: 12px; color: var(--text-3); }
.choice[aria-pressed="true"] { border-color: var(--btn); background: var(--wash); box-shadow: inset 0 0 0 1px var(--btn); }
input[type=range] { width: 100%; accent-color: var(--btn); height: 32px; }

/* Product picker */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pcard { position: relative; text-align: left; display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface); min-width: 0; }
.pcard:hover { border-color: var(--line-strong); }
.pcard[aria-pressed="true"] { border-color: var(--btn); background: var(--wash); box-shadow: inset 0 0 0 1px var(--btn); }
.pcard .tickbox { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border: 1.5px solid var(--line-strong); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; color: var(--on-btn); }
.pcard[aria-pressed="true"] .tickbox { background: var(--btn); border-color: var(--btn); }
.pcard .tickbox .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.pcard .name { font-weight: 700; font-size: 14.5px; padding-right: 26px; }
.pcard .blurb { color: var(--text-2); font-size: 12.5px; }
.specs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; font-size: 12px; margin: 0; }
.specs dt { color: var(--text-3); }
.specs dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Progress */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-3); min-width: 0; }
.steps li::before { content: ""; height: 4px; border-radius: 999px; background: var(--tint-2); }
.steps li.done::before { background: var(--good); }
.steps li.now::before { background: var(--btn); }
.steps li.now { color: var(--text); }
.steps li.done { color: var(--text-2); }
.steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Task rows */
.tasks { display: grid; }
.task { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0;
  border-top: 1px solid var(--line-soft); text-align: left; width: 100%; }
.task:first-child { border-top: 0; }
.task .tic { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--wash); color: var(--link); }
.task.bad .tic { background: var(--bad-wash); color: var(--bad); }
.task.good .tic { background: var(--good-wash); color: var(--good); }
.task.warn .tic { background: var(--warn-wash); color: var(--warn); }
.task b { display: block; font-size: 14px; }
.task small { display: block; color: var(--text-2); font-size: 12.5px; overflow-wrap: anywhere; }
.task > .ic { color: var(--text-3); }

/* Documents */
.doc { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.doc:first-child { border-top: 0; }
.doc .dic { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--tint); color: var(--text-3); }
.doc.st-approved .dic { background: var(--good-wash); color: var(--good); }
.doc.st-received .dic { background: var(--wash); color: var(--link); }
.doc.st-reupload .dic { background: var(--bad-wash); color: var(--bad); }
.doc .dname { font-weight: 700; }
.doc .dhint { color: var(--text-2); font-size: 12.5px; }
.doc .files { color: var(--text-3); font-size: 12px; font-family: var(--mono); overflow-wrap: anywhere; margin-top: 4px; }
.doc .note { margin-top: 6px; padding: 8px 10px; background: var(--bad-wash); color: var(--bad); border-radius: var(--radius); font-size: 12.5px; font-weight: 600; }
.doc .note.ok { background: var(--good-wash); color: var(--good); }
.doc .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.doc .up-err { color: var(--bad); font-size: 12.5px; font-weight: 600; margin-top: 6px; }

/* Offers */
.ogrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ogrid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); justify-self: center; }
.ocard { display: grid; gap: 14px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); min-width: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.oacc { display: grid; gap: 10px; }
.fold { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.fold.open { border-color: var(--btn); }
.fold-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px; text-align: left; min-height: 64px; }
.fold-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.fold-ic { color: var(--text-3); transition: transform 160ms ease; }
.fold.open .fold-ic { transform: rotate(180deg); }
.fold-body { display: grid; gap: 14px; padding: 14px 16px 16px; border-top: 1px solid var(--line-soft); }
.review { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.only-m { display: none; }

/* Funding */
.donut { --p: 50; width: 88px; height: 88px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--tint-2) 0); }
.donut::before { content: ""; grid-area: 1 / 1; width: 66px; height: 66px; border-radius: 50%; background: var(--surface); }
.donut b { grid-area: 1 / 1; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; position: relative; }
.adv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.paid-off { opacity: 0.6; }
.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fig .lbl { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.fig .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.renew { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--good-wash); color: var(--good); }
.renew b { color: var(--text); }
.renew .grow { flex: 1; min-width: 180px; color: var(--text-2); }

/* Messages */
.thread { display: grid; gap: 12px; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 12px; background: var(--tint); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { justify-self: end; background: var(--btn); color: var(--on-btn); }
.msg .who { font-size: 11.5px; font-weight: 700; color: var(--text-3); margin-bottom: 2px; white-space: normal; }
.msg.me .who { color: var(--wash-2); }
.compose { display: flex; gap: 8px; margin-top: 14px; }
.compose textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 160px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 16px; resize: vertical; }

/* Sheets, toast */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(520px, 100%); max-height: 86vh; overflow: auto; background: var(--surface); border-radius: 14px 14px 0 0;
  padding: 18px max(18px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70;
  background: var(--band); color: var(--on-band); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 13px; max-width: calc(100% - 32px); text-align: center; }
.toast.bad { background: var(--bad); }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--tint-2); border-top-color: var(--btn); animation: rot 0.8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 36px 18px; display: grid; gap: 10px; justify-items: center; }
.empty .ic { width: 28px; height: 28px; color: var(--text-3); }
.iconbtn { width: 38px; height: 38px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; position: relative; color: var(--text-2); }
.iconbtn .badge { position: absolute; top: -6px; right: -6px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font: 600 15px/1.4 var(--mono); padding: 14px; background: var(--tint); border-radius: var(--radius-lg); }
.qr { display: grid; place-items: center; padding: 10px; background: #ffffff; border-radius: var(--radius-lg); width: 200px; max-width: 100%; justify-self: center; }
.qr svg { width: 100%; height: auto; display: block; }
.secret { font: 600 14px/1.5 var(--mono); letter-spacing: 0.08em; word-break: break-all; padding: 10px 12px; background: var(--tint); border-radius: var(--radius); }
.optcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.optcard { text-align: left; display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.optcard:hover { border-color: var(--btn); }
.optcard .ic { width: 24px; height: 24px; color: var(--link); }

/* ── Signing in ── */
/* Sign-in: one card centred on the page, horizontally and vertically. */
.auth { display: grid; place-items: center; min-height: 100vh; padding-block: 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth-main { width: min(460px, 100%); display: grid; gap: 14px; }
.auth-form { display: grid; gap: 18px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 8px 32px 32px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; height: 58px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.auth-foot { margin: 0; text-align: center; font: 500 11px/1.5 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ── Signed in: sidebar + content ── */
.a-wrap { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.a-side { position: sticky; top: 0; height: 100vh; overflow: auto; border-right: 1px solid var(--line); background: var(--surface); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; }
.a-nav { display: grid; gap: 2px; }
.a-nav button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius); color: var(--text-2); font-weight: 600; font-size: 13.5px; text-align: left; width: 100%; }
.a-nav button:hover { background: var(--tint); color: var(--text); }
.a-nav button[aria-current="page"] { background: var(--wash); color: var(--link); }
.a-nav .badge { margin-left: auto; }
.a-who { margin-top: auto; display: grid; gap: 2px; padding: 12px 10px; border-top: 1px solid var(--line-soft); font-size: 12.5px; }
.a-main { min-width: 0; }
.a-top { display: flex; align-items: center; gap: 12px; height: 60px; padding-left: 28px; padding-right: 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.a-top .mbrand { display: none; }
.a-body { padding: 28px 28px 48px; max-width: 1180px; }
.a-home { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.a-home .span2 { grid-column: span 2; }
.a-home .span3 { grid-column: 1 / -1; }
.tabbar { display: none; }

/* ── Phones ── */
@container app (max-width: 900px) {
  .only-m { display: revert; }
  .btn.only-m { display: inline-flex; }
  .only-d { display: none !important; }
  .h1 { font-size: 22px; }
  .card { padding: 16px; }
  .fgrid, .pgrid, .ogrid, .optcards, .review { grid-template-columns: minmax(0, 1fr); }
  .ogrid.two-up { grid-template-columns: minmax(0, 1fr); }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: 34px minmax(0, 1fr); }
  .doc .acts { grid-column: 2; justify-content: flex-start; }
  .steps li span { font-size: 11px; }
  .msg { max-width: 88%; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-right, 0px)); }
  .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--text-3); position: relative; }
  .tabbar button[aria-current="page"] { color: var(--link); }
  .tabbar .ic { width: 22px; height: 22px; }
  .tabbar .badge { position: absolute; top: 0; left: calc(50% + 6px); height: 16px; min-width: 16px; font-size: 10px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .auth { place-items: start center; min-height: 0; padding-block: 0 40px; }
  .auth-form { background: none; border: 0; border-radius: 0; padding: 0; }
  .auth-top { margin-bottom: 14px; }
  .a-wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .a-side { display: none; }
  .a-top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); height: 56px; }
  .a-top .mbrand { display: inline-flex; }
  .a-top .ttl { display: none; }
  .a-body { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 100px max(16px, env(safe-area-inset-left, 0px)); }
  .a-home { grid-template-columns: minmax(0, 1fr); }
  .a-home .span2, .a-home .span3 { grid-column: auto; }
  .a-home .h-funding { order: -1; }   /* phones: Funding first, then Needs your attention (Danny) */
}
@container app (max-width: 380px) { .figs { grid-template-columns: minmax(0, 1fr); } .codes { grid-template-columns: minmax(0, 1fr); } }
