/* Global Flash Pay: shared tokens + signed-in app.
   Identity: mineral paper, ink navy, jade actions, amber money-in accents,
   and an imigongo chevron field reserved for the card (the one bold element). */
:root {
  --paper: #EEF1EC;
  --paper-2: #F6F7F3;
  --surface: #FFFFFF;
  --ink: #14203A;
  --ink-2: #1D2B4A;
  --ink-soft: #4B5568;
  --line: #D9DED5;
  --line-strong: #C3CABF;
  --jade: #0E6B57;
  --jade-press: #0A5444;
  --jade-tint: #E1EFEA;
  --amber: #D99A1E;
  --amber-tint: #FBF1DC;
  --clay: #B23A2E;
  --display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --text: 'Instrument Sans', system-ui, sans-serif;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-card: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--jade); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.015em; }
h1 { font-size: 30px; line-height: 1.12; }
h2 { font-size: 21px; line-height: 1.2; }
h3 { font-size: 16px; }
p { margin: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 9px; font: 700 18px/1 var(--display); color: var(--ink); text-decoration: none; }
.mark { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, var(--ink) 0 50%, var(--amber) 50% 100%); flex: none; }
.sandbox-pill { font-size: 12px; font-weight: 600; color: #6B4A00; background: var(--amber-tint); border: 1px solid #EFD9A6; padding: 3px 10px; border-radius: 99px; }
.link-btn { background: none; border: 0; color: var(--ink-soft); font: 500 14px var(--text); cursor: pointer; padding: 6px 8px; border-radius: var(--r-sm); }
.link-btn:hover { color: var(--ink); background: var(--paper-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border-radius: var(--r-md); border: 1.5px solid transparent; font: 600 16px var(--text); cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--jade); color: #fff; }
.btn-primary:hover { background: var(--jade-press); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-quiet { background: transparent; color: var(--ink); border-color: transparent; }
.btn-quiet:hover { background: rgba(20,32,58,.06); }
.btn-google { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-google:hover { background: var(--paper-2); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #E6A93A; }
.btn-onink { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-onink:hover { border-color: #fff; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 17px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Forms */
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
input, select { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: 400 16px var(--text); }
input:hover, select:hover { border-color: var(--line-strong); }
input:focus, select:focus { border-color: var(--jade); outline: none; box-shadow: 0 0 0 3px rgba(14,107,87,.18); }
.amount-input { font: 600 28px var(--text); min-height: 60px; }
.field-hint { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.error-text { color: var(--clay); font-size: 14px; }
.error-text:empty { display: none; }

/* Surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.notice { border-left: 4px solid var(--amber); background: var(--amber-tint); padding: 14px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.empty { padding: 26px 22px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.empty .btn { margin-top: 14px; }

/* ================= App shell ================= */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.topbar .brand { margin-right: auto; }
#view { flex: 1; padding: 4px 16px 104px; outline: none; width: 100%; max-width: 560px; margin: 0 auto; }

/* Bottom tabs (mobile) */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--ink-soft);
  text-decoration: none; font-size: 12px; font-weight: 500; border-radius: var(--r-sm); }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--jade); }

/* Desktop: sidebar layout */
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 248px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "top top" "nav main"; }
  .topbar { grid-area: top; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 4; }
  .tabbar { grid-area: nav; position: sticky; top: 73px; align-self: start; display: flex; flex-direction: column; gap: 4px;
    background: transparent; border: 0; padding: 24px 16px; height: calc(100dvh - 73px); }
  .tabbar a { flex-direction: row; gap: 12px; padding: 11px 14px; font-size: 15px; color: var(--ink); }
  .tabbar a:hover { background: rgba(20,32,58,.05); }
  .tabbar a[aria-current="page"] { background: var(--surface); color: var(--jade); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
  #view > * { max-width: 920px; }
  .shell:has(.tabbar[hidden]) #view > * { max-width: none; }
  #view { grid-area: main; max-width: none; margin: 0; padding: 36px 48px 64px; border-left: 1px solid var(--line); background: var(--paper-2); }
  .shell:has(.tabbar[hidden]) { grid-template-columns: 1fr; grid-template-areas: "top" "main"; }
  .shell:has(.tabbar[hidden]) #view { max-width: none; border: 0; background: transparent; padding: 0; }
  h1 { font-size: 34px; }
}

/* ================= Wallet ================= */
.wallet-head { display: flex; flex-direction: column; gap: 16px; }
.balance-hero { padding: 10px 0 4px; }
.balance-hero .total { font: 600 46px/1.05 var(--text); letter-spacing: -0.025em; }
.alloc h3 { font-size: 15px; margin-bottom: 14px; }
.asset-cols { display: grid; gap: 4px; }
.asset-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.asset-list li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.asset-list li + li { border-top: 1px solid var(--line); }
.asset-badge { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 700 11px var(--display); color: #fff; background: var(--ink); }
.asset-badge.fiat { background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); }
.asset-name { flex: 1; min-width: 0; }
.asset-amt { text-align: right; }
.group-title { margin: 22px 0 8px; font-size: 15px; color: var(--ink-soft); font-weight: 600; font-family: var(--text); }
@media (min-width: 960px) {
  .wallet-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .wallet-head .btn-row { min-width: 340px; }
  .asset-cols { grid-template-columns: 1fr 1fr; gap: 20px; }
}

/* ================= Virtual card (the hero element) ================= */
.vcard { position: relative; aspect-ratio: 1.586; border-radius: var(--r-card); color: #fff; overflow: hidden;
  background: var(--ink); padding: 20px 22px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 24px 48px -24px rgba(20,32,58,.55); }
.vcard::before { content: ""; position: absolute; inset: 0;
  --zz: rgba(217,154,30,.85);
  background:
    linear-gradient(135deg, var(--zz) 25%, transparent 25%) -11px 0 / 22px 22px,
    linear-gradient(225deg, var(--zz) 25%, transparent 25%) -11px 0 / 22px 22px,
    linear-gradient(315deg, var(--ink) 25%, transparent 25%) 0 0 / 22px 22px,
    linear-gradient(45deg, var(--ink) 25%, transparent 25%) 0 0 / 22px 22px;
  -webkit-mask: linear-gradient(118deg, transparent 0 48%, #000 66%);
          mask: linear-gradient(118deg, transparent 0 48%, #000 66%); }
.vcard > * { position: relative; }
.vcard.frozen { filter: grayscale(.9) brightness(.85); }
.vcard .vc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.vcard .vc-bal { font: 600 30px/1.05 var(--text); letter-spacing: -0.02em; }
.vcard .vc-pan { font: 500 18px var(--text); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.vcard .vc-bottom { display: flex; justify-content: space-between; align-items: flex-end; font-size: 14px; }
.visa { font: italic 800 24px/1 var(--display); letter-spacing: -0.02em; }
.chip { width: 36px; height: 27px; border-radius: 6px; background: linear-gradient(135deg, #E9C46A, #B98A2A); }
.status-tag { font-size: 12px; font-weight: 600; background: rgba(255,255,255,.18); padding: 3px 9px; border-radius: 99px; }
#view .vcard { max-width: 440px; }
.card-switch { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.card-switch button { flex: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px;
  padding: 6px 14px; font: 500 14px var(--text); cursor: pointer; color: var(--ink); }
.card-switch button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 440px; }
.action-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0;
  font: 500 13px var(--text); color: var(--ink); cursor: pointer; padding: 6px 0; }
.action-grid .ico { width: 50px; height: 50px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; border: 1px solid var(--line); }
.action-grid button:hover .ico { border-color: var(--jade); }
.action-grid svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ================= Convert ================= */
.swap-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.swap-box + .swap-box { margin-top: 8px; }
.swap-line { display: grid; grid-template-columns: 1fr 104px; gap: 10px; align-items: end; }
.quote { border: 1.5px solid var(--jade); border-radius: var(--r-md); padding: 18px; background: var(--surface); }
.quote dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 12px 0 0; font-size: 15px; }
.quote dt { color: var(--ink-soft); }
.quote dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.receive, .quote .receive { font: 600 32px/1.1 var(--text); letter-spacing: -0.02em; }
.timer { font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
#q-form > .error-text { margin: 10px 0; }
@media (min-width: 960px) { #view > section:has(#q-form) { max-width: 560px; } }

/* ================= Activity ================= */
.tx-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.tx-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; }
.tx-list li + li { border-top: 1px solid var(--line); }
.tx-title { font-weight: 600; }
.tx-amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.tx-amt.in { color: var(--jade); }
.tx-amt.out { color: var(--ink); }
.tx-meta { font-size: 13px; color: var(--ink-soft); }
.tx-status { text-align: right; font-size: 13px; }
.st-completed { color: var(--jade); }
.st-processing, .st-held_for_review { color: #8A5C00; }
.st-failed, .st-declined { color: var(--clay); }
.st-awaiting_payment, .st-expired { color: var(--ink-soft); }

/* ================= Auth ================= */
.auth { display: grid; gap: 28px; padding: 12px 0 40px; }
.auth-side { display: none; }
.auth-main { width: 100%; max-width: 420px; }
.auth-main h1 { margin-bottom: 6px; }
.auth-main > .muted { margin-bottom: 24px; }
.auth-main .btn-google { margin-bottom: 4px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 14px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-switch { margin-top: 20px; font-size: 15px; }
.auth-switch a { font-weight: 600; text-underline-offset: 3px; }
.auth-wait { padding: 20vh 0; text-align: center; }
@media (min-width: 960px) {
  body.on-auth .topbar { position: absolute; left: 0; right: 0; border: 0; background: transparent; }
  body.on-auth .topbar .brand { color: #fff; }
  body.on-auth .mark { background: linear-gradient(135deg, #fff 0 50%, var(--amber) 50% 100%); }
  .auth { grid-template-columns: minmax(420px, 46%) 1fr; gap: 0; padding: 0; min-height: 100dvh; }
  .auth-side { display: flex; flex-direction: column; justify-content: center; gap: 36px; padding: 120px 64px 64px;
    background: var(--ink); color: #fff; position: relative; overflow: hidden; }
  .auth-quote { font: 800 52px/1.02 var(--display); letter-spacing: -0.03em; }
  .auth-card { width: 360px; transform: rotate(-4deg); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); background: var(--ink-2); }
  .auth-card::before { background:
    linear-gradient(135deg, rgba(217,154,30,.9) 25%, transparent 25%) -11px 0 / 22px 22px,
    linear-gradient(225deg, rgba(217,154,30,.9) 25%, transparent 25%) -11px 0 / 22px 22px,
    linear-gradient(315deg, var(--ink-2) 25%, transparent 25%) 0 0 / 22px 22px,
    linear-gradient(45deg, var(--ink-2) 25%, transparent 25%) 0 0 / 22px 22px; }
  .auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: rgba(255,255,255,.82); }
  .auth-points li { padding-left: 26px; position: relative; }
  .auth-points li::before { content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 7px;
    border-left: 2px solid var(--amber); border-bottom: 2px solid var(--amber); transform: rotate(-45deg); }
  .auth-main { align-self: center; justify-self: center; padding: 48px 32px; }
}

/* ================= Sheet, toast ================= */
.sheet { width: 100%; max-width: 480px; margin: auto auto 0; border: 0; border-radius: 22px 22px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom));
  background: var(--paper); color: var(--ink); max-height: 90dvh; }
@media (min-width: 720px) { .sheet { margin: auto; border-radius: 22px; padding: 22px 24px 26px; } }
.sheet::backdrop { background: rgba(20,32,58,.45); }
.sheet[open] { animation: rise .22s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); font-size: 16px; cursor: pointer; color: var(--ink); }
.address-box { word-break: break-all; font-size: 15px; background: var(--surface); padding: 14px; border-radius: var(--r-sm); border: 1.5px dashed var(--line); }
.reveal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reveal-grid .panel strong { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-md); font-size: 15px; z-index: 20; }
.toast.err { background: var(--clay); }
openreceive-checkout { display: block; }

/* ================= Charts (shared) ================= */
.hb { display: grid; gap: 10px; }
.hb-row, .hb-axis { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 64px; gap: 14px; align-items: center; }
.hb-row { padding: 6px 8px; margin: 0 -8px; border-radius: var(--r-sm); cursor: default; }
.hb-row:hover, .hb-row:focus-visible { background: var(--paper-2); }
.hb-label { font-size: 15px; }
.hb-track { position: relative; height: 18px; }
.hb-bar { position: absolute; left: 0; top: 0; bottom: 0; background: #A7B0BE; border-radius: 0 4px 4px 0; }
.hb-row.is-hl .hb-bar { background: var(--jade); }
.hb-row.is-hl .hb-label, .hb-row.is-hl .hb-val { font-weight: 700; color: var(--jade); }
.hb-val { font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.hb-grid { position: absolute; top: -6px; bottom: -6px; width: 1px; background: var(--line); }
.hb-ref { position: absolute; top: -8px; bottom: -8px; width: 2px; background: var(--amber); z-index: 1; }
.hb-ticks { height: 22px; }
.hb-refrow .hb-track { height: 22px; }
.hb-tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.hb-ref-label { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 12px; font-weight: 600; color: #7A5300; white-space: nowrap; background: var(--surface); padding: 0 4px; }
.hb-axis .hb-tick:first-child { transform: none; }
@media (max-width: 640px) {
  .hb-row, .hb-axis { grid-template-columns: 1fr 56px; }
  .hb-row .hb-label { grid-column: 1 / -1; }
  .hb-axis .hb-label { display: none; }
}
.sb { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; }
.sb-seg { min-width: 4px; }
.sb-seg:hover, .sb-seg:focus-visible { filter: brightness(1.08); }
.sb-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.sb-legend li { display: grid; grid-template-columns: 12px 1fr auto 44px; gap: 10px; align-items: center; font-size: 14px; }
.sw { width: 12px; height: 12px; border-radius: 3px; }
.sb-v { font-variant-numeric: tabular-nums; }
.sb-p { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (min-width: 960px) { .sb-legend { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.chart-tip { position: fixed; z-index: 30; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 12px;
  border-radius: var(--r-sm); font-size: 13px; line-height: 1.4; max-width: 260px; box-shadow: 0 8px 20px -8px rgba(0,0,0,.4); }
.tip-muted { color: rgba(255,255,255,.7); }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { padding: 10px 4px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.data-table thead th { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.data-table .r { text-align: right; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } html { scroll-behavior: auto; } * { transition: none !important; } }

/* ================= v2 additions ================= */
.lang-pick { width: auto; min-height: 36px; padding: 4px 28px 4px 10px; font-size: 14px; border-radius: var(--r-sm); background-color: transparent; border-color: var(--line); }
.topbar .lang-slot { display: inline-flex; }
.tabbar { grid-template-columns: repeat(6, 1fr); }
.tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
@media (max-width: 380px) { .tabbar a { font-size: 11px; } }

.wallet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 960px) { .wallet-actions { grid-template-columns: repeat(4, auto); } .wallet-actions .btn { padding: 0 16px; } }
.row-between.wrap { flex-wrap: wrap; align-items: flex-end; }
.narrow { max-width: 560px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; }
.seg button { border: 0; background: transparent; font: 600 14px var(--text); color: var(--ink-soft); padding: 7px 14px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.seg button[aria-selected="true"] { background: var(--ink); color: #fff; }
.seg-lg { display: flex; }
.seg-lg button { flex: 1; padding: 10px 16px; font-size: 15px; }
.trade { max-width: 560px; }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; font-size: 15px; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; word-break: break-all; }
.pending-ico { width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--jade-tint); border-top-color: var(--jade); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Business */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.tile-v { font: 600 26px/1.15 var(--text); letter-spacing: -0.02em; margin-top: 2px; }
@media (max-width: 520px) { .tile-v { font-size: 20px; } .tiles { gap: 8px; } .tile { padding: 12px; } }
.biz-chart { margin-top: 14px; }
.cols { display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line-strong); }
.col { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; border-radius: 4px 4px 0 0; }
.col:hover, .col:focus-visible { background: var(--paper-2); }
.col-bar { display: block; width: 100%; background: var(--jade); border-radius: 4px 4px 0 0; }
.col-bar.is-zero { height: 2px !important; background: var(--line-strong); }
.cols-x { display: flex; gap: 4px; margin-top: 6px; }
.cols-x span { flex: 1; font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: visible; }
.link-list, .key-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.link-list li { display: grid; gap: 12px; padding: 16px; }
.link-list li + li, .key-list li + li { border-top: 1px solid var(--line); }
.ll-main { display: grid; gap: 4px; min-width: 0; }
.ll-amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.ll-url { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ll-actions { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 960px) { .link-list li { grid-template-columns: 1fr auto; align-items: center; } }
.key-list { background: var(--paper-2); }
.key-list li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; }
.key-list li span { flex: 1; }
.code { background: var(--ink); color: #E8ECF4; border-radius: var(--r-sm); padding: 14px 16px; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; margin: 0; white-space: pre; }
.secret-row { display: flex; gap: 8px; align-items: center; }
.secret-row code { flex: 1; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; font-size: 13px; }

/* Hosted checkout */
.pay-body { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 20px 16px; }
.pay { width: 100%; max-width: 440px; margin: auto 0; }
.pay-head { text-align: left; margin-bottom: 18px; position: relative; }
.pay-head h1 { font-size: 26px; margin: 4px 0 6px; }
.pay-lang { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.pay-amt { font: 600 40px/1.1 var(--text); letter-spacing: -0.025em; margin-top: 12px; }
.pay-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; }
.pay-card .notice { margin: 0; }
.pay-done { text-align: center; padding: 40px 10px; display: grid; gap: 10px; justify-items: center; }
.done-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--jade); position: relative; }
.done-ico::after { content: ""; position: absolute; left: 21px; top: 19px; width: 20px; height: 11px; border-left: 4px solid #fff; border-bottom: 4px solid #fff; transform: rotate(-45deg); }
.pay-foot { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-soft); margin-top: 24px; }
.pay-foot .mark { width: 18px; height: 18px; border-radius: 5px; }

@media (max-width: 520px) {
  .topbar { gap: 8px; }
  .topbar .app-name { display: none; }
  .topbar .lang-pick { max-width: 128px; }
}
.quote .timer { margin: 12px 0 10px; }
.quote .error-text:not(:empty) { margin-bottom: 10px; }

/* Send anywhere */
.dest-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.dest { text-align: left; display: grid; gap: 4px; align-content: start; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px; cursor: pointer; font: inherit; color: var(--ink); }
.dest:hover { border-color: var(--jade); }
.dest.is-static { cursor: default; }
.dest.is-static:hover { border-color: var(--line); }
.dest-t { font-weight: 700; font-size: 16px; }
.dest-d { color: var(--ink-soft); font-size: 14px; }
.dest-ex { font-size: 13px; color: var(--jade); font-weight: 600; margin-top: 4px; }
.soon-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.soon-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 16px; }
.soon-list li + li { border-top: 1px solid var(--line); }
.soon-name { font-weight: 600; }
.soon-reg { grid-column: 1; font-size: 13px; color: var(--ink-soft); }
.soon-list .btn { grid-column: 2; grid-row: 1 / span 2; }
.soon-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.soon-chip { display: inline-flex; flex-direction: column; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-sm); padding: 8px 12px; font-size: 14px; }
.soon-chip span { font-size: 12px; color: var(--ink-soft); }
.l-dest { margin: 32px 0 8px; }

/* v4: local currency */
.total-local { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 4px; color: var(--ink-soft); font-size: 15px; }
.ccy-inline .lang-pick { max-width: 210px; min-height: 32px; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[dir="rtl"] .num, [dir="rtl"] .asset-amt, [dir="rtl"] .total { direction: ltr; unicode-bidi: isolate; }

/* v4: dashboard insights + illustrations */
.pairs-legend { list-style: none; margin: 0 0 12px; padding: 0; display: flex; gap: 18px; font-size: 13px; color: var(--ink-soft); }
.pairs-legend li { display: flex; align-items: center; gap: 8px; }
.col.pair { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.col.pair .col-bar { flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.kpi .k-l { font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.kpi .k-v { font: 600 22px/1.2 var(--text); letter-spacing: -0.01em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .k-dot { width: 8px; height: 8px; border-radius: 50%; }
.insight-grid { display: grid; gap: 16px; }
@media (min-width: 960px) { .insight-grid { grid-template-columns: 3fr 2fr; } }
.panel h3 + .muted { margin-top: -6px; }
.illu { display: block; width: 168px; height: auto; margin: 0 auto 6px; }
.empty.with-illu { text-align: center; display: grid; justify-items: center; gap: 6px; }
.empty.with-illu p { max-width: 36em; }
.chart-empty { display: flex; align-items: center; gap: 16px; color: var(--ink-soft); font-size: 14px; }
.chart-empty .illu { width: 96px; margin: 0; }
@media (min-width: 960px) { .insight-grid { align-items: start; } }
#act-insights:not(:empty) { margin-bottom: 8px; }

/* v5: security centre */
.sec-hero { display: grid; gap: 18px; align-items: center; }
@media (min-width: 720px) { .sec-hero { grid-template-columns: 180px 1fr; } }
.sec-hero .illu { width: 160px; margin: 0 auto; }
.sec-hero-body { display: grid; gap: 8px; }
.sec-score { font: 600 18px var(--text); color: var(--ink-soft); }
.sec-score strong { font: 800 44px/1 var(--display); color: var(--ink); }
.sec-score span { margin-left: 8px; font-size: 14px; padding: 3px 10px; border-radius: 99px; background: var(--jade-tint); color: var(--jade); vertical-align: middle; }
.meter { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; max-width: 520px; }
.meter span { height: 10px; border-radius: 4px; background: var(--line); }
.meter span.on { background: var(--jade); }
.layers { display: grid; gap: 10px; }
@media (min-width: 960px) { .layers { grid-template-columns: 1fr 1fr; } }
.layer { display: grid; grid-template-columns: 40px 1fr; gap: 6px 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.layer.is-on { border-color: color-mix(in srgb, var(--jade) 35%, var(--line)); }
.layer-ico svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--paper-2); fill: none; stroke: var(--ink-soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.layer.is-on .layer-ico svg { background: var(--jade-tint); stroke: var(--jade); }
.layer-t { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.layer-n { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.layer-act { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; }
.layer-act:empty { display: none; }
.chip-st { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.chip-st.on { background: var(--jade-tint); color: var(--jade); }
.chip-st.off { background: var(--paper-2); color: var(--ink-soft); }
.chip-st.wait { background: #FBEFD9; color: #8A5A00; }
.sec-cols { display: grid; gap: 16px; }
@media (min-width: 960px) { .sec-cols { grid-template-columns: 1fr 1fr; align-items: start; } }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; }
.plain-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.plain-list li > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sec-log { list-style: none; margin: 0; padding: 0; display: grid; }
.sec-log li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.sec-log .dot { margin-top: 6px; box-shadow: none; }
.sec-log .tone-warn .dot { background: var(--amber); }
.sec-log .tone-bad .dot { background: #C2412D; }
.code-input { font: 600 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .3em; text-align: center; }
.gate { max-width: 400px; }
.gate .gate-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--jade-tint) center / 28px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E6B57' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='10' width='14' height='10' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); margin: 0 auto; }
.gate h2, .gate #gate-sub { text-align: center; }
.gate[data-mode="lock"]::backdrop { background: var(--ink); }
.qr-box { width: 200px; margin: 0 auto; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.qr-box svg { display: block; width: 100%; height: auto; }
.steps-mini { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.rec-codes { columns: 2; margin: 0; padding: 14px 14px 14px 34px; background: var(--paper-2); border-radius: var(--r-md); font: 600 15px/1.9 ui-monospace, SFMono-Regular, Menlo, monospace; }
.auth-2fa { display: grid; place-items: center; }
.auth-2fa .auth-main { max-width: 420px; }
@media (max-width: 959px) {
  .tabbar { grid-template-columns: repeat(7, minmax(0, 1fr)); padding-left: 2px; padding-right: 2px; }
  .tabbar a { font-size: 10.5px; min-width: 0; }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar svg { width: 22px; height: 22px; }
}
.hb-money .hb-row, .hb-money .hb-axis { grid-template-columns: minmax(100px, 32%) 1fr 116px; }
.hb-money .hb-val { white-space: nowrap; font-size: 14px; }
@media (max-width: 640px) { .hb-money .hb-row, .hb-money .hb-axis { grid-template-columns: 1fr 112px; } }

/* Brand by-line: "(Powered by BridgePointWeb3)" — little and italic. */
.brand-by { font: italic 400 0.62em/1.2 var(--text); color: inherit; opacity: 0.72; letter-spacing: 0; white-space: nowrap; margin-left: -3px; }
.pay-foot .brand-by { font-size: 0.92em; margin-left: 0; }
@media (max-width: 520px) {
  .l-nav .brand { display: inline-grid; grid-template-columns: auto auto; column-gap: 9px; row-gap: 1px; align-items: center; }
  .l-nav .brand .mark { grid-row: 1 / span 2; }
  .l-nav .brand-by { grid-column: 2; margin-left: 0; font-size: 0.58em; }
  .topbar .brand-by { display: none; }
}
