/*
 * ACG Markets — Dashboard components
 * Built only from css/landing/tokens.css + css/dashboard/tokens.css.
 */

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--acg-page);
  transition: background-color .2s var(--acg-ease), color .2s var(--acg-ease);
  color: var(--acg-text);
  font: var(--acg-weight-regular) var(--acg-size-sm)/var(--acg-leading-normal) var(--acg-font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

.acg-icon { width: var(--acg-icon); height: var(--acg-icon); flex: none; }
.acg-icon--sm { width: var(--acg-icon-sm); height: var(--acg-icon-sm); }
.acg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Top bar ─────────────────────────────────────────────────── */
.acg-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--acg-topbar-h);
  padding: 0 var(--acg-space-8);
  background: var(--acg-topbar-bg);
}
.acg-topbar__logo img { display: block; height: var(--acg-space-5); width: auto; }
.acg-topbar__utils { display: flex; align-items: center; gap: var(--acg-space-6); }
.acg-topbar__link {
  display: inline-flex; align-items: center; gap: var(--acg-space-2);
  color: var(--acg-text-secondary); text-decoration: none;
  transition: color var(--acg-duration) var(--acg-ease);
}
.acg-topbar__link:hover { color: var(--acg-text); }
.acg-topbar__link[aria-disabled="true"] { color: var(--acg-text-muted); opacity: .5; pointer-events: none; }
.acg-topbar__link[aria-current="page"] { color: var(--acg-text); }

/* User menu */
.acg-user { position: relative; }
.acg-user__btn {
  display: inline-flex; align-items: center; gap: var(--acg-space-2);
  height: var(--acg-control-h); padding: 0 var(--acg-space-2) 0 var(--acg-space-1);
  background: transparent; border: 0; border-radius: var(--acg-radius-md); cursor: pointer;
}
.acg-user__btn:hover { background: var(--acg-surface); }
.acg-user__btn:focus-visible { outline: none; box-shadow: var(--acg-focus); }
.acg-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--acg-avatar); height: var(--acg-avatar);
  border-radius: var(--acg-radius-full);
  background: var(--acg-grad-teal);
  font: var(--acg-weight-medium) var(--acg-size-xs)/1 var(--acg-font);
}
.acg-menu {
  position: absolute; right: 0; top: calc(100% + var(--acg-space-2));
  min-width: 240px; padding: var(--acg-space-2);
  background: var(--acg-surface);
  border: 1px solid var(--acg-border);
  border-radius: var(--acg-radius-md);
  box-shadow: var(--acg-shadow);
}
.acg-menu[hidden] { display: none; }
.acg-menu__head { padding: var(--acg-space-2) var(--acg-space-3) var(--acg-space-3); border-bottom: 1px solid var(--acg-border); margin-bottom: var(--acg-space-2); }
.acg-menu__name { font-weight: var(--acg-weight-medium); }
.acg-menu__email { color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-menu__item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--acg-space-3);
  width: 100%; height: var(--acg-control-h); padding: 0 var(--acg-space-3);
  border-radius: var(--acg-radius-md);
  color: var(--acg-text-secondary); text-decoration: none;
}
.acg-menu__item:hover { background: var(--acg-surface-muted); color: var(--acg-text); }
.acg-menu__item[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.acg-menu__item--danger { color: var(--acg-negative); }
.acg-menu__item--danger:hover { background: var(--acg-negative-tint); color: var(--acg-negative); }

/* ── Tab bar ─────────────────────────────────────────────────── */
.acg-tabbar {
  position: sticky; top: var(--acg-topbar-h); z-index: 15;
  display: flex; align-items: stretch; gap: var(--acg-space-8);
  height: var(--acg-tabbar-h);
  padding: 0 var(--acg-space-8);
  background: var(--acg-chrome);
  border-bottom: 1px solid var(--acg-border-subtle);
  overflow-x: auto; scrollbar-width: none;
}
.acg-tabbar a {
  position: relative; display: inline-flex; align-items: center;
  color: var(--acg-text-muted); text-decoration: none; white-space: nowrap;
  transition: color var(--acg-duration) var(--acg-ease);
}
.acg-tabbar a:hover { color: var(--acg-text); }
.acg-tabbar a[aria-current="page"] { color: var(--acg-text); }
.acg-tabbar a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--acg-teal); border-radius: var(--acg-radius-full);
}

/* ── Layout ──────────────────────────────────────────────────── */
.acg-app { display: grid; grid-template-columns: var(--acg-sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--acg-topbar-h) - var(--acg-tabbar-h)); }
.acg-main { padding: var(--acg-space-8) var(--acg-space-8) var(--acg-space-18); }
.acg-main__inner { max-width: var(--acg-content-max); margin: 0 auto; display: flex; flex-direction: column; gap: var(--acg-space-12); }

/* ── Sidebar ─────────────────────────────────────────────────── */
.acg-sidebar {
  position: sticky; top: calc(var(--acg-topbar-h) + var(--acg-tabbar-h));
  align-self: start;
  height: calc(100vh - var(--acg-topbar-h) - var(--acg-tabbar-h));
  padding: var(--acg-space-6) var(--acg-space-4);
  background: var(--acg-chrome);
  border-right: 1px solid var(--acg-border-subtle);
  overflow-y: auto;
}
.acg-side { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--acg-space-1); }
.acg-side ul { list-style: none; margin: var(--acg-space-1) 0 0; padding: 0 0 0 var(--acg-space-3); display: flex; flex-direction: column; gap: var(--acg-space-1); border-left: 1px solid var(--acg-border); margin-left: var(--acg-space-4); }
.acg-side ul[hidden] { display: none; }
.acg-side__item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--acg-space-2);
  width: 100%; height: var(--acg-control-h); padding: 0 var(--acg-space-3);
  border: 0; border-radius: var(--acg-radius-md);
  background: transparent; color: var(--acg-text-muted);
  text-align: left; text-decoration: none; cursor: pointer;
  transition: background-color var(--acg-duration) var(--acg-ease), color var(--acg-duration) var(--acg-ease);
}
.acg-side__item:hover { background: var(--acg-surface); color: var(--acg-text); }
.acg-side__item:focus-visible { outline: none; box-shadow: var(--acg-focus); }
.acg-side__item[aria-current="true"] { background: var(--acg-surface); color: var(--acg-text); box-shadow: inset 2px 0 0 var(--acg-teal); }
.acg-side__item .acg-icon--sm { transition: rotate var(--acg-duration) var(--acg-ease); }
.acg-side__item[aria-expanded="true"] .acg-icon--sm { rotate: 90deg; }
.acg-side__item--alert { color: var(--acg-negative); background: var(--acg-negative-tint); margin-top: var(--acg-space-4); }
.acg-side__item--alert:hover { color: var(--acg-negative); background: var(--acg-negative-tint); box-shadow: inset 0 0 0 1px var(--acg-negative); }
.acg-side__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--acg-icon); height: var(--acg-icon); padding: 0 var(--acg-space-1);
  border-radius: var(--acg-radius-full);
  background: var(--acg-negative); color: var(--acg-text-inverse);
  font: var(--acg-weight-semibold) var(--acg-size-xs)/1 var(--acg-font);
}

/* ── Page header ─────────────────────────────────────────────── */
.acg-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--acg-space-6); flex-wrap: wrap; }
.acg-pagehead__title { display: flex; flex-direction: column; gap: var(--acg-space-1); }
.acg-pagehead__meta { display: flex; align-items: center; gap: var(--acg-space-3); color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--acg-control-h); height: var(--acg-control-h);
  border: 0; border-radius: var(--acg-radius-md);
  background: transparent; color: var(--acg-text);
  box-shadow: inset 0 0 0 1px var(--acg-border);
  cursor: pointer;
  transition: box-shadow var(--acg-duration) var(--acg-ease), background-color var(--acg-duration) var(--acg-ease);
}
.acg-iconbtn:hover { background: var(--acg-surface); box-shadow: inset 0 0 0 1px var(--acg-border-strong); }
.acg-iconbtn:focus-visible { outline: none; box-shadow: var(--acg-focus); }
.acg-iconbtn.is-spinning .acg-icon { animation: acg-spin .7s var(--acg-ease); }
@keyframes acg-spin { to { rotate: 360deg; } }

/* ── Section ─────────────────────────────────────────────────── */
.acg-section { display: flex; flex-direction: column; gap: var(--acg-space-5); scroll-margin-top: calc(var(--acg-topbar-h) + var(--acg-tabbar-h) + var(--acg-space-6)); }
.acg-section__head { display: flex; align-items: center; justify-content: space-between; gap: var(--acg-space-4); }
.acg-section__title { display: inline-flex; align-items: center; gap: var(--acg-space-3); margin: 0; font: var(--acg-weight-medium) var(--acg-size-lg)/var(--acg-leading-snug) var(--acg-font); }
.acg-section__title .acg-icon { color: var(--acg-ink-accent); }
.acg-section__count { color: var(--acg-text-muted); font-weight: var(--acg-weight-regular); }

/* ── Balance row ─────────────────────────────────────────────── */
.acg-balances { display: grid; grid-template-columns: 3fr 2fr; gap: var(--acg-grid-gap); }
.acg-balance { min-height: 220px; justify-content: space-between; }
.acg-balance--total { background: var(--acg-noise), var(--acg-grad-teal); }
.acg-balance--total::before { display: block; }
.acg-balance__label { color: var(--acg-text-secondary); }
.acg-balance__value { display: flex; align-items: baseline; gap: var(--acg-space-2); font-variant-numeric: tabular-nums; }
.acg-balance__ccy { color: var(--acg-text-muted); font-size: var(--acg-size-md); }
.acg-balance__split { display: flex; gap: var(--acg-space-8); padding-top: var(--acg-space-4); border-top: 1px solid var(--acg-border-subtle); }
.acg-balance__split dt { color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-balance__split dd { margin: 0; font-size: var(--acg-size-md); font-variant-numeric: tabular-nums; }
.acg-balance__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--acg-space-4); }

/* ── Trading account rows ────────────────────────────────────── */
.acg-accounts { display: flex; flex-direction: column; gap: var(--acg-space-3); }
.acg-account {
  display: grid; grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(0, 1fr)) auto;
  align-items: center; gap: var(--acg-space-6);
  padding: var(--acg-space-5) var(--acg-space-6);
}
.acg-account__id { display: flex; align-items: center; gap: var(--acg-space-3); }
.acg-account__logo { width: var(--acg-badge); height: var(--acg-badge); border-radius: var(--acg-radius-md); flex: none; }
.acg-account__name { font-weight: var(--acg-weight-medium); display: flex; align-items: center; gap: var(--acg-space-2); }
.acg-account__login { color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-kv dt { color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-kv dd { margin: 0; font-size: var(--acg-size-md); font-variant-numeric: tabular-nums; }
.acg-up { color: var(--acg-positive); }
.acg-down { color: var(--acg-negative); }

/* ── Quick actions ───────────────────────────────────────────── */
.acg-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--acg-grid-gap); }
.acg-action { padding: var(--acg-space-6); gap: var(--acg-space-5); justify-content: space-between; }
.acg-action__badge {
  display: flex; align-items: center; justify-content: center;
  width: var(--acg-badge); height: var(--acg-badge);
  border-radius: var(--acg-radius-md);
  background: var(--acg-teal-tint); box-shadow: var(--acg-inner-glow);
  color: var(--acg-ink-accent);
}
.acg-action__title { margin: 0 0 var(--acg-space-1); font: var(--acg-weight-medium) var(--acg-size-md)/var(--acg-leading-snug) var(--acg-font); }
.acg-action__desc { margin: 0; color: var(--acg-text-muted); }

/* ── Performance chart ───────────────────────────────────────── */
.acg-perf__ror { display: flex; align-items: baseline; gap: var(--acg-space-2); color: var(--acg-text-muted); }
.acg-perf__ror strong { font: var(--acg-weight-medium) var(--acg-size-h4)/1 var(--acg-font); font-variant-numeric: tabular-nums; }
.acg-chart { position: relative; height: var(--acg-chart-h); }
.acg-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.acg-chart__grid { stroke: var(--acg-border-subtle); stroke-width: 1; }
.acg-chart__axis { fill: var(--acg-text-muted); font: var(--acg-weight-regular) var(--acg-size-xs)/1 var(--acg-font); }
.acg-chart__line { fill: none; stroke: var(--acg-ink-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.acg-chart__area { fill: url(#acg-chart-fill); }
.acg-chart__dot { fill: var(--acg-ink-accent); stroke: var(--acg-bg); stroke-width: 2; }

/* ── Table ───────────────────────────────────────────────────── */
.acg-table-card { padding: 0; gap: 0; }
.acg-table-wrap { overflow-x: auto; }
.acg-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.acg-table th {
  padding: var(--acg-space-4) var(--acg-space-6);
  text-align: left; white-space: nowrap;
  color: var(--acg-text-muted); font-weight: var(--acg-weight-regular); font-size: var(--acg-size-xs);
  border-bottom: 1px solid var(--acg-border);
}
.acg-table td { padding: var(--acg-space-4) var(--acg-space-6); white-space: nowrap; border-bottom: 1px solid var(--acg-border-subtle); }
.acg-table tr:last-child td { border-bottom: 0; }
.acg-table tbody tr { transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-table tbody tr:hover { background: var(--acg-surface-sunken); }
.acg-table .is-num { text-align: right; }
.acg-table__symbol { font-weight: var(--acg-weight-medium); }
.acg-side-pill {
  display: inline-flex; align-items: center; padding: 2px var(--acg-space-2);
  border-radius: var(--acg-radius-md);
  font-size: var(--acg-size-xs); font-weight: var(--acg-weight-medium);
}
.acg-side-pill--buy { background: var(--acg-teal-tint); color: var(--acg-positive); }
.acg-side-pill--sell { background: var(--acg-negative-tint); color: var(--acg-negative); }

/* ── Empty state ─────────────────────────────────────────────── */
.acg-empty { display: flex; flex-direction: column; align-items: center; gap: var(--acg-space-2); padding: var(--acg-space-12) var(--acg-space-6); text-align: center; color: var(--acg-text-muted); }
.acg-empty .acg-icon { color: var(--acg-text-muted); }

/* ── Floating chat button ────────────────────────────────────── */
.acg-fab {
  position: fixed; right: var(--acg-space-6); bottom: var(--acg-space-6); z-index: 30;
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--acg-fab); height: var(--acg-fab);
  border: 0; border-radius: var(--acg-radius-full);
  background: var(--acg-teal); color: #000;
  box-shadow: var(--acg-shadow); cursor: pointer;
  transition: background-color var(--acg-duration) var(--acg-ease), translate var(--acg-duration) var(--acg-ease);
}
.acg-fab:hover { background: var(--acg-teal-hover); translate: 0 -2px; }
.acg-fab:focus-visible { outline: none; box-shadow: var(--acg-focus); }

/* ── Smaller screens (pending design sign-off; keeps it usable) ── */
@media (max-width: 1180px) {
  .acg-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acg-account { grid-template-columns: 1fr 1fr 1fr; }
  .acg-account__id { grid-column: 1 / -1; }
  .acg-account > .acg-btn { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .acg-app { grid-template-columns: minmax(0, 1fr); }
  .acg-sidebar { display: none; }
  .acg-balances { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .acg-topbar, .acg-tabbar { padding: 0 var(--acg-space-4); }
  .acg-topbar__utils .acg-topbar__link { display: none; }
  .acg-main { padding: var(--acg-space-6) var(--acg-space-4) var(--acg-space-18); }
  .acg-actions { grid-template-columns: minmax(0, 1fr); }
  .acg-balance__split { gap: var(--acg-space-6); }
  .acg-pagehead .acg-h3 { font-size: var(--acg-size-h4); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Themes ──────────────────────────────────────────────────── */
.acg-card { box-shadow: var(--acg-card-shadow); }
.acg-balance--total { box-shadow: none; }
.acg-badge { color: var(--acg-ink-accent); border-color: var(--acg-border-accent); }
.acg-topbar .acg-avatar { background: color-mix(in srgb, var(--acg-white) 16%, transparent); }
.acg-tabbar { align-items: stretch; }
.acg-theme {
  align-self: center; margin-left: auto; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 0; border-radius: var(--acg-radius-full);
  background: transparent; color: var(--acg-text-muted); cursor: pointer;
  transition: background-color var(--acg-duration) var(--acg-ease), color var(--acg-duration) var(--acg-ease), rotate .4s var(--acg-ease);
}
.acg-theme:hover { background: var(--acg-surface-muted); color: var(--acg-text); }
.acg-theme:active { rotate: 20deg; }
.acg-theme .is-sun { display: none; }
:root[data-theme="light"] .acg-theme .is-moon { display: none; }
:root[data-theme="light"] .acg-theme .is-sun { display: block; }

/* Chart hover */
.acg-chart__cross { stroke: var(--acg-border-strong); stroke-dasharray: 2 3; opacity: 0; transition: opacity var(--acg-duration) var(--acg-ease); }
.acg-chart:hover .acg-chart__cross { opacity: 1; }
.acg-chart__tip { position: absolute; top: 0; translate: -50% -110%; padding: var(--acg-space-2) var(--acg-space-3); border-radius: var(--acg-radius-md); background: var(--acg-surface); box-shadow: var(--acg-shadow); font-size: var(--acg-size-xs); white-space: nowrap; pointer-events: none; }
.acg-chart__tip strong { display: block; font-size: var(--acg-size-sm); font-weight: var(--acg-weight-medium); }
.acg-chart__tip span { color: var(--acg-text-muted); }

/* Small craft details */
.acg-card.acg-action { transition: translate .3s cubic-bezier(.16,1,.3,1), box-shadow .3s cubic-bezier(.16,1,.3,1); }
.acg-card.acg-action:hover { translate: 0 -2px; }
.acg-account { transition: background-color var(--acg-duration) var(--acg-ease); }

/* ══ One sidebar (replaces top bar, tab bar and section nav) ══════ */
.acg-app { grid-template-columns: var(--acg-sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.acg-sb {
  position: sticky; top: 0; height: 100vh; z-index: 40;
  display: flex; flex-direction: column; gap: var(--acg-space-2);
  padding: var(--acg-space-6) var(--acg-space-4) var(--acg-space-4);
  background: var(--acg-sidebar-bg);
  overflow-y: auto; scrollbar-width: none;
}
.acg-sb__logo { display: block; padding: 0 var(--acg-space-3); margin-bottom: var(--acg-space-6); }
.acg-sb__logo img { display: block; height: 18px; width: auto; }
:root[data-theme="light"] .acg-sb__logo img, :root[data-theme="light"] .acg-mbar img { filter: invert(1); }
.acg-sb__nav { display: flex; flex-direction: column; gap: 2px; }
.acg-sb__fill { flex: 1; min-height: var(--acg-space-6); }

.acg-nv {
  display: flex; align-items: center; gap: var(--acg-space-3); width: 100%;
  height: 40px; padding: 0 var(--acg-space-3); border: 0; border-radius: var(--acg-radius-md);
  background: transparent; color: var(--acg-text-muted); text-align: left; text-decoration: none; cursor: pointer;
  font: var(--acg-weight-regular) var(--acg-size-sm)/1 var(--acg-font);
  transition: background-color var(--acg-duration) var(--acg-ease), color var(--acg-duration) var(--acg-ease);
}
.acg-nv:hover { background: var(--acg-nav-hover); color: var(--acg-text); }
.acg-nv[aria-current="page"] { background: var(--acg-nav-active); color: var(--acg-text); }
.acg-nv[aria-current="page"] .acg-nv__ic { color: var(--acg-ink-accent); }
.acg-nv:focus-visible { outline: none; box-shadow: var(--acg-focus); }
.acg-nv__end { margin-left: auto; color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-nv--alert { margin-top: var(--acg-space-4); color: var(--acg-negative); background: var(--acg-negative-tint); }
.acg-nv--alert:hover { color: var(--acg-negative); background: var(--acg-negative-tint); }
.acg-nv__count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--acg-radius-full); background: var(--acg-negative); color: #fff; font-size: var(--acg-size-xs); font-weight: var(--acg-weight-semibold); line-height: 20px; text-align: center; }

/* Alpha Capital icon set, drawn as masks so they take the text colour */
.acg-nv__ic { flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.acg-nv__ic--dashboard { --ic: url("../../images/icons/nav-dashboard.svg"); }
.acg-nv__ic--live { --ic: url("../../images/icons/nav-metrics.svg"); }
.acg-nv__ic--demo { --ic: url("../../images/icons/nav-assessment.svg"); }
.acg-nv__ic--history { --ic: url("../../images/icons/nav-trades.svg"); }
.acg-nv__ic--funds { --ic: url("../../images/icons/nav-payout.svg"); }
.acg-nv__ic--tx { --ic: url("../../images/icons/nav-payments.svg"); }
.acg-nv__ic--add { --ic: url("../../images/icons/nav-add.svg"); }
.acg-nv__ic--platforms { --ic: url("../../images/icons/nav-downloads.svg"); }
.acg-nv__ic--apps { --ic: url("../../images/icons/nav-verify.svg"); }
.acg-nv__ic--inbox { --ic: url("../../images/icons/nav-inbox.svg"); }
.acg-nv__ic--support { --ic: url("../../images/icons/nav-help.svg"); }
.acg-nv__ic--settings { --ic: url("../../images/icons/nav-setup.svg"); }
.acg-nv__ic--updown { --ic: url("../../images/icons/user-updown.svg"); width: 16px; height: 16px; }
.acg-nv__ic--theme { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5Z' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Theme switch */
.acg-switch { position: relative; margin-left: auto; width: 32px; height: 18px; border-radius: var(--acg-radius-full); background: var(--acg-teal); transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-switch i { position: absolute; top: 2px; left: 16px; width: 14px; height: 14px; border-radius: var(--acg-radius-full); background: #fff; transition: left .25s cubic-bezier(.16,1,.3,1); }
:root[data-theme="light"] .acg-switch { background: var(--acg-surface-muted); }
:root[data-theme="light"] .acg-switch i { left: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.2); }

/* User */
.acg-sb__me { position: relative; margin-top: var(--acg-space-2); padding-top: var(--acg-space-3); box-shadow: inset 0 1px 0 var(--acg-border-subtle); }
.acg-me { display: flex; align-items: center; gap: var(--acg-space-3); width: 100%; padding: var(--acg-space-2) var(--acg-space-3); border: 0; border-radius: var(--acg-radius-md); background: transparent; color: var(--acg-text); text-align: left; cursor: pointer; transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-me:hover, .acg-me[aria-expanded="true"] { background: var(--acg-nav-hover); }
.acg-me__txt { flex: 1; min-width: 0; line-height: 1.35; }
.acg-me__txt strong { display: block; font-weight: var(--acg-weight-medium); }
.acg-me__txt small { display: block; color: var(--acg-text-muted); font-size: var(--acg-size-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acg-me .acg-nv__ic { color: var(--acg-text-muted); }
.acg-sb__me .acg-menu { top: auto; bottom: calc(100% + var(--acg-space-1)); left: 0; right: 0; min-width: 0; }

/* Mobile: sidebar slides in */
.acg-mbar { display: none; }
@media (max-width: 960px) {
  .acg-app { grid-template-columns: minmax(0, 1fr); }
  .acg-sb { display: flex !important; position: fixed; left: 0; top: 0; bottom: 0; width: min(var(--acg-sidebar-w), 86vw); z-index: 70; translate: -100% 0; transition: translate .3s cubic-bezier(.16,1,.3,1); box-shadow: var(--acg-shadow); }
  body.nav-open .acg-sb { translate: 0 0; }
  .acg-scrim { position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.5); }
  .acg-mbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 56px; margin: calc(var(--acg-space-6) * -1) calc(var(--acg-space-4) * -1) var(--acg-space-4); padding: 0 var(--acg-space-4); background: var(--acg-sidebar-bg); }
  .acg-mbar img { height: 14px; }
}

/* ── Sidebar v2: groups, application card ──────────────────── */
.acg-nv__chev { margin-left: auto; width: 14px; height: 14px; flex: none; background: currentColor; opacity: .7;
  -webkit-mask: url("../../images/icons/chevron-down.svg") center / contain no-repeat; mask: url("../../images/icons/chevron-down.svg") center / contain no-repeat;
  transition: rotate .25s cubic-bezier(.16,1,.3,1); }
.acg-nv__badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--acg-radius-full); background: var(--acg-teal); color: #000; font-size: var(--acg-size-xs); font-weight: var(--acg-weight-semibold); line-height: 20px; text-align: center; }

/* Section labels in the flat nav (the Alpha dashboards' "GET STARTED": 10px, uppercase, muted) */
.acg-sb__label { padding: var(--acg-space-4) var(--acg-space-3) var(--acg-space-1); color: var(--acg-text-muted); font-size: 11px; font-weight: var(--acg-weight-medium); letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
/* icons sit a step quieter than the label beside them and light up with it */
.acg-sb .acg-nv .acg-nv__ic { opacity: .85; transition: opacity var(--acg-duration) var(--acg-ease), color var(--acg-duration) var(--acg-ease); }
.acg-sb .acg-nv:hover .acg-nv__ic, .acg-sb .acg-nv[aria-current="page"] .acg-nv__ic { opacity: 1; }

/* Application progress card */
.acg-appl { display: flex; flex-direction: column; gap: var(--acg-space-3); margin: var(--acg-space-4) 0 var(--acg-space-3); padding: var(--acg-space-4); border-radius: var(--acg-radius-md); background: var(--acg-nav-hover); color: var(--acg-text); text-decoration: none; transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-appl:hover { background: var(--acg-nav-active); }
.acg-appl__head { position: relative; display: flex; align-items: center; gap: var(--acg-space-3); }
.acg-appl__ring { width: 40px; height: 40px; flex: none; rotate: -90deg; }
.acg-appl__ring circle { fill: none; stroke-width: 3; }
.acg-appl__ring .t { stroke: var(--acg-border-subtle); }
.acg-appl__ring .b { stroke: var(--acg-ink-accent); stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.16,1,.3,1); }
.acg-appl__pct { position: absolute; left: 0; top: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: var(--acg-weight-semibold); }
.acg-appl__title { min-width: 0; line-height: 1.35; }
.acg-appl__title strong { display: block; font-weight: var(--acg-weight-medium); font-size: var(--acg-size-sm); }
.acg-appl__title small { display: block; color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-appl__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--acg-space-2); }
.acg-appl__steps li { display: flex; align-items: center; gap: var(--acg-space-2); color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-appl__steps i { width: 14px; height: 14px; flex: none; border-radius: var(--acg-radius-full); box-shadow: inset 0 0 0 1.5px var(--acg-border-strong); }
.acg-appl__steps li.is-done { color: var(--acg-text-secondary); }
.acg-appl__steps li.is-done span { text-decoration: line-through; text-decoration-color: var(--acg-text-muted); }
.acg-appl__steps li.is-done i { box-shadow: none; background: var(--acg-ink-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.5l4.5-5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.acg-appl__steps li.is-next { color: var(--acg-text); }
.acg-appl__steps li.is-next i { box-shadow: inset 0 0 0 1.5px var(--acg-ink-accent); }
.acg-appl__go { display: flex; align-items: center; gap: var(--acg-space-1); color: var(--acg-ink-accent); font-size: var(--acg-size-xs); font-weight: var(--acg-weight-medium); }
.acg-appl__go .acg-nv__chev { margin-left: 0; rotate: -90deg; transition: translate var(--acg-duration) var(--acg-ease); }
.acg-appl:hover .acg-appl__go .acg-nv__chev { translate: 3px 0; }
@media (prefers-reduced-motion: reduce) { .acg-grp__body { transition: none; } }

/* ── Compact sidebar: fits a 720px-tall window with Accounts open ── */
.acg-sb { gap: 2px; padding: var(--acg-space-5) var(--acg-space-3) var(--acg-space-3); }
.acg-sb__logo { margin-bottom: var(--acg-space-5); }
.acg-nv { height: 36px; }
.acg-sub { height: 32px; }
.acg-grp__inner::after { height: 2px; }
.acg-sb__fill { min-height: var(--acg-space-4); }

.acg-appl { flex-direction: row; align-items: center; gap: var(--acg-space-3); margin: 0 0 var(--acg-space-2); padding: var(--acg-space-3); }
.acg-appl__ringwrap { position: relative; flex: none; width: 36px; height: 36px; }
.acg-appl__ring { width: 36px; height: 36px; }
.acg-appl__pct { width: 36px; height: 36px; font-size: 10px; }
.acg-appl__title { flex: 1; min-width: 0; line-height: 1.35; }
.acg-appl__title strong { display: block; font-size: var(--acg-size-sm); font-weight: var(--acg-weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acg-appl__title small { display: block; color: var(--acg-ink-accent); font-size: var(--acg-size-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acg-appl__chev { margin-left: 0; rotate: -90deg; color: var(--acg-text-muted); transition: translate var(--acg-duration) var(--acg-ease); }
.acg-appl:hover .acg-appl__chev { translate: 2px 0; color: var(--acg-text); }

.acg-sb__me { margin-top: var(--acg-space-1); padding-top: var(--acg-space-2); }
.acg-me { padding: var(--acg-space-1) var(--acg-space-3); }

/* Theme button sits next to the logo instead of taking a row */
.acg-sb__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--acg-space-5); padding-right: var(--acg-space-1); }
.acg-sb__top .acg-sb__logo { margin-bottom: 0; }
.acg-sb__top .acg-theme { width: 32px; height: 32px; margin-left: 0; }
.acg-sb__top .acg-theme .acg-icon { width: 18px; height: 18px; }

/* ── Current trading account (MT5) ─────────────────────────── */
.acg-cur { position: relative; display: flex; align-items: center; gap: var(--acg-space-1); margin-bottom: var(--acg-space-4); padding: var(--acg-space-1); border-radius: var(--acg-radius-md); background: var(--acg-nav-hover); }
.acg-cur__pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--acg-space-2); padding: var(--acg-space-1) var(--acg-space-2); border: 0; border-radius: var(--acg-radius-md); background: transparent; color: var(--acg-text); text-align: left; cursor: pointer; transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-cur__pick:hover, .acg-cur__pick[aria-expanded="true"] { background: var(--acg-nav-active); }
.acg-cur__pick img { width: 28px; height: 28px; flex: none; border-radius: calc(var(--acg-radius-md) - 4px); }
.acg-cur__txt { flex: 1; min-width: 0; line-height: 1.3; }
.acg-cur__txt strong { display: block; font-size: var(--acg-size-sm); font-weight: var(--acg-weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acg-cur__txt small { display: block; color: var(--acg-text-muted); font-size: var(--acg-size-xs); white-space: nowrap; }
.acg-cur__pick .acg-nv__ic { color: var(--acg-text-muted); }
.acg-cur__trade { flex: none; height: 32px; padding: 0 var(--acg-space-3); border: 0; border-radius: var(--acg-radius-md); background: var(--acg-teal); color: #000; font: var(--acg-weight-medium) var(--acg-size-xs)/1 var(--acg-font); cursor: pointer; transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-cur__trade:hover { background: var(--acg-teal-hover); }
.acg-cur__menu { top: calc(100% + var(--acg-space-1)); left: 0; right: 0; min-width: 0; z-index: 60; }
.acg-cur__label { padding: var(--acg-space-2) var(--acg-space-3) var(--acg-space-1); color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-cur__opt { display: flex; align-items: center; gap: var(--acg-space-2); width: 100%; padding: var(--acg-space-2) var(--acg-space-3); border: 0; border-radius: var(--acg-radius-md); background: transparent; color: var(--acg-text-secondary); text-align: left; cursor: pointer; font: inherit; }
.acg-cur__opt:hover { background: var(--acg-surface-muted); color: var(--acg-text); }
.acg-cur__opt span { flex: 1; min-width: 0; line-height: 1.3; }
.acg-cur__opt small { display: block; color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-cur__opt b { font-weight: var(--acg-weight-regular); font-size: var(--acg-size-xs); color: var(--acg-text-muted); }
.acg-cur__opt i { width: 6px; height: 6px; flex: none; border-radius: var(--acg-radius-full); background: transparent; }
.acg-cur__opt[aria-checked="true"] { color: var(--acg-text); }
.acg-cur__opt[aria-checked="true"] i { background: var(--acg-ink-accent); }
.acg-cur__add { color: var(--acg-ink-accent); font-size: var(--acg-size-xs); }
.acg-account.is-current { box-shadow: inset 2px 0 0 var(--acg-ink-accent), var(--acg-card-shadow); }
.acg-toast { position: fixed; left: 50%; bottom: var(--acg-space-8); z-index: 90; translate: -50% 0; padding: var(--acg-space-3) var(--acg-space-4); border-radius: var(--acg-radius-md); background: var(--acg-text); color: var(--acg-page); box-shadow: var(--acg-shadow); font-size: var(--acg-size-sm); }
.acg-toast[hidden] { display: none; }

/* One radius everywhere in the dashboard (the application card's): --acg-radius-md */
.acg-app .acg-btn, .acg-app .acg-badge, .acg-app .acg-iconbtn, .acg-app .acg-card { border-radius: var(--acg-radius-md); }
.acg-app .acg-btn__icon { border-radius: calc(var(--acg-radius-md) - 2px); }
.acg-app .acg-account__logo, .acg-app .acg-action__badge { border-radius: var(--acg-radius-md); }

/* Open new account: quiet grey at rest, turns teal on hover */
.acg-add {
  display: flex; align-items: center; gap: var(--acg-space-2);
  height: 32px; margin: var(--acg-space-1) 0 0 calc(var(--acg-space-3) + 18px - var(--acg-space-1));
  padding: 0 var(--acg-space-3) 0 var(--acg-space-1);
  border-radius: var(--acg-radius-md); background: var(--acg-nav-hover);
  color: var(--acg-text-secondary); font-size: var(--acg-size-sm); font-weight: var(--acg-weight-medium); text-decoration: none;
  transition: background-color var(--acg-duration) var(--acg-ease), color var(--acg-duration) var(--acg-ease);
}
.acg-add__plus {
  position: relative; width: 24px; height: 24px; flex: none;
  border-radius: calc(var(--acg-radius-md) - 3px); background: var(--acg-surface-muted);
  transition: rotate .3s cubic-bezier(.16,1,.3,1), background-color var(--acg-duration) var(--acg-ease);
}
.acg-add__plus::before, .acg-add__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -0.75px 0 0 -5px; border-radius: 1px; background: var(--acg-text-secondary); transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-add__plus::after { rotate: 90deg; }
.acg-add:hover { background: var(--acg-teal); color: #000; }
.acg-add:hover .acg-add__plus { rotate: 90deg; background: #000; }
.acg-add:hover .acg-add__plus::before, .acg-add:hover .acg-add__plus::after { background: var(--acg-teal); }

/* Trade = compact square button so the account name has room */
.acg-cur { gap: var(--acg-space-1); }
.acg-cur__trade { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; }
.acg-cur__trade img { filter: brightness(0); transition: translate var(--acg-duration) var(--acg-ease); }
.acg-cur__trade:hover img { translate: 2px 0; }
.acg-cur__pick .acg-nv__ic--updown { width: 14px; height: 14px; }

/* ══ Sidebar: final details ═══════════════════════════════════ */
.acg-sb__tools { display: flex; align-items: center; gap: 2px; }

/* New client: account block becomes a call to action */
.acg-cur--empty { padding: 0; background: transparent; }
.acg-cur--empty .acg-add { flex: 1; margin: 0; height: 44px; }

/* ══ Canvas v2 ════════════════════════════════════════════════ */
/* Header status line */
.acg-pagehead__status { display: flex; align-items: center; flex-wrap: wrap; gap: var(--acg-space-2); margin: 0; color: var(--acg-text-muted); font-size: var(--acg-size-sm); }
.acg-pagehead__status b { font-weight: var(--acg-weight-medium); }
.acg-dotsep { width: 3px; height: 3px; border-radius: var(--acg-radius-full); background: var(--acg-text-muted); }
.acg-live { display: inline-flex; align-items: center; gap: var(--acg-space-2); }
.acg-live::before { content: ""; width: 6px; height: 6px; border-radius: var(--acg-radius-full); background: var(--acg-ink-accent); box-shadow: 0 0 0 3px var(--acg-teal-tint); }

/* Total card: trend line + split bar */
.acg-balance--total { position: relative; overflow: hidden; }
.acg-balance__spark { position: absolute; right: var(--acg-space-8); top: var(--acg-space-8); width: 40%; max-width: 260px; height: 72px; color: rgba(255, 255, 255, 0.55); pointer-events: none; }
.acg-balance__spark svg { width: 100%; height: 100%; overflow: visible; }
.acg-split { display: flex; flex-direction: column; gap: var(--acg-space-3); }
.acg-split__bar { display: flex; gap: 3px; height: 6px; }
.acg-split__bar i { display: block; height: 100%; border-radius: var(--acg-radius-full); transition: width .8s cubic-bezier(.16,1,.3,1); }
.acg-split__bar i:first-child { background: rgba(255, 255, 255, 0.45); }
.acg-split__bar i:last-child { background: var(--acg-teal); }
.acg-split .acg-balance__split { padding-top: 0; border-top: 0; }
.acg-balance__split dt { display: flex; align-items: center; gap: 6px; }
.acg-balance__split dt b { width: 6px; height: 6px; border-radius: var(--acg-radius-full); }
.acg-balance__split dt b.is-w { background: rgba(255, 255, 255, 0.45); }
.acg-balance__split dt b.is-l { background: var(--acg-teal); }

/* Wallet card: actions inside */
.acg-wallet__head { display: flex; align-items: center; justify-content: space-between; }
.acg-wallet__more { display: inline-flex; align-items: center; gap: 2px; color: var(--acg-text-muted); font-size: var(--acg-size-xs); text-decoration: none; transition: color var(--acg-duration) var(--acg-ease); }
.acg-wallet__more:hover { color: var(--acg-text); }
.acg-wallet__more .acg-nv__chev { margin: 0; rotate: -90deg; width: 12px; height: 12px; }
.acg-wallet__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--acg-space-2); }
.acg-wallet__actions .acg-btn { padding: 0 var(--acg-space-2); }

/* Account rows */
.acg-account { grid-template-columns: minmax(200px, 1.3fr) repeat(4, minmax(0, 1fr)) auto; padding: var(--acg-space-4) var(--acg-space-5); }
.acg-kv--eq { position: relative; }
.acg-kv__spark { display: block; width: 64px; height: 22px; margin-top: 4px; color: var(--acg-text-muted); }
.acg-kv__spark.acg-up { color: var(--acg-positive); }
.acg-kv__spark.acg-down { color: var(--acg-negative); }
.acg-kv__spark svg { width: 100%; height: 100%; overflow: visible; }
.acg-account__act { position: relative; display: flex; align-items: center; gap: var(--acg-space-2); }
.acg-account__trade { height: 36px; padding: 0 var(--acg-space-5); }
.acg-more { width: 36px; height: 36px; box-shadow: none; background: var(--acg-surface-muted); }
.acg-more span, .acg-more span::before, .acg-more span::after { display: block; width: 3px; height: 3px; border-radius: var(--acg-radius-full); background: currentColor; }
.acg-more span { position: relative; }
.acg-more span::before, .acg-more span::after { content: ""; position: absolute; top: 0; }
.acg-more span::before { left: -6px; }
.acg-more span::after { left: 6px; }
.acg-more__menu { top: calc(100% + var(--acg-space-1)); right: 0; min-width: 180px; z-index: 30; }

/* Performance range */
.acg-perf__side { display: flex; align-items: center; gap: var(--acg-space-5); }
.acg-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--acg-radius-md); background: var(--acg-surface-muted); }
.acg-seg button { height: 28px; padding: 0 var(--acg-space-3); border: 0; border-radius: calc(var(--acg-radius-md) - 3px); background: transparent; color: var(--acg-text-muted); font: var(--acg-weight-medium) var(--acg-size-xs)/1 var(--acg-font); cursor: pointer; transition: background-color var(--acg-duration) var(--acg-ease), color var(--acg-duration) var(--acg-ease); }
.acg-seg button:hover { color: var(--acg-text); }
.acg-seg button[aria-pressed="true"] { background: var(--acg-surface); color: var(--acg-text); box-shadow: var(--acg-card-shadow); }

@media (max-width: 1180px) {
  .acg-account { grid-template-columns: 1fr 1fr; }
  .acg-account__id, .acg-account__act { grid-column: 1 / -1; }
  .acg-account__act .acg-account__trade { flex: 1; }
}
@media (max-width: 640px) {
  .acg-balance__spark { display: none; }
  .acg-perf__side { flex-direction: column; align-items: flex-end; gap: var(--acg-space-2); }
}
.acg-account__login, .acg-account__name { white-space: nowrap; }

/* ══ Canvas v3 (broker brief) ═════════════════════════════════ */
.acg-main__inner { gap: var(--acg-space-6); }
.acg-pagehead { align-items: center; }
.acg-pagehead__meta { gap: var(--acg-space-3); }
.acg-pagehead__meta > span { color: var(--acg-text-muted); }
.acg-btn--sm { height: 32px; padding: 0 var(--acg-space-3); font-size: var(--acg-size-xs); }

/* Next step (new clients) */
.acg-next { gap: var(--acg-space-4); }
.acg-next__head { display: flex; align-items: center; justify-content: space-between; }
.acg-next__count { color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-next__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--acg-space-3); }
.acg-next__steps li { display: flex; flex-direction: column; gap: var(--acg-space-3); padding: var(--acg-space-4); border-radius: var(--acg-radius-md); background: var(--acg-surface-sunken); color: var(--acg-text-muted); }
.acg-next__steps li.is-current { background: var(--acg-teal-tint); color: var(--acg-text); box-shadow: inset 0 0 0 1px var(--acg-border-accent); }
.acg-next__steps strong { display: block; color: var(--acg-text); font-weight: var(--acg-weight-medium); }
.acg-next__steps p { margin: 4px 0 0; font-size: var(--acg-size-xs); }
.acg-next__steps .acg-btn { align-self: flex-start; height: 36px; }
.acg-next__num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--acg-radius-full); background: var(--acg-surface-muted); font-size: var(--acg-size-xs); font-weight: var(--acg-weight-semibold); color: var(--acg-text); }
.acg-next__steps li.is-current .acg-next__num { background: var(--acg-teal); color: #000; }
.acg-next__steps li.is-done .acg-next__num { background: var(--acg-ink-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.5l4.5-5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat; }

/* Quick deposit card */
.acg-quick { justify-content: space-between; gap: var(--acg-space-4); }
.acg-quick__head { display: flex; align-items: center; justify-content: space-between; gap: var(--acg-space-3); }
.acg-quick__head h2 { margin: 0; font-weight: var(--acg-weight-regular); }
.acg-quick__head h2 span { color: var(--acg-text); font-weight: var(--acg-weight-medium); }
.acg-quick__links { display: flex; gap: var(--acg-space-3); }
.acg-quick__links a { color: var(--acg-text-muted); font-size: var(--acg-size-xs); text-decoration: none; }
.acg-quick__links a:hover { color: var(--acg-text); }
.acg-quick__label { margin-bottom: var(--acg-space-2); color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-quick__amts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--acg-space-2); }
.acg-quick__amts button { height: 40px; border: 0; border-radius: var(--acg-radius-md); background: var(--acg-surface-muted); color: var(--acg-text); font: var(--acg-weight-medium) var(--acg-size-sm)/1 var(--acg-font); cursor: pointer; transition: background-color var(--acg-duration) var(--acg-ease), box-shadow var(--acg-duration) var(--acg-ease); }
.acg-quick__amts button:hover { box-shadow: inset 0 0 0 1px var(--acg-border-strong); }
.acg-quick__amts button[aria-pressed="true"] { background: var(--acg-teal-tint); box-shadow: inset 0 0 0 1.5px var(--acg-ink-accent); color: var(--acg-text); }
.acg-quick__custom { margin-top: var(--acg-space-2); border-radius: var(--acg-radius-md); }
.acg-quick__method { display: flex; align-items: center; gap: var(--acg-space-3); padding: var(--acg-space-2) var(--acg-space-3); border-radius: var(--acg-radius-md); background: var(--acg-surface-sunken); }
.acg-quick__method > span:nth-child(2) { flex: 1; line-height: 1.3; }
.acg-quick__method b { display: block; font-weight: var(--acg-weight-medium); font-size: var(--acg-size-sm); }
.acg-quick__method small { color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-quick__method a { color: var(--acg-ink-accent); font-size: var(--acg-size-xs); text-decoration: none; }
.acg-quick__card { width: 32px; height: 22px; flex: none; border-radius: 4px; background: linear-gradient(135deg, #1a1f71, #2d3a9c); position: relative; }
.acg-quick__card::after { content: "VISA"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font: 700 8px/1 var(--acg-font); letter-spacing: .5px; }
[data-dep-go]:disabled { opacity: .5; cursor: not-allowed; }

/* Accounts: tabs + rows */
.acg-tabs { display: inline-flex; gap: var(--acg-space-1); }
.acg-tabs button { display: inline-flex; align-items: center; gap: var(--acg-space-2); height: 36px; padding: 0 var(--acg-space-3); border: 0; border-radius: var(--acg-radius-md); background: transparent; color: var(--acg-text-muted); font: var(--acg-weight-medium) var(--acg-size-md)/1 var(--acg-font); cursor: pointer; transition: background-color var(--acg-duration) var(--acg-ease), color var(--acg-duration) var(--acg-ease); }
.acg-tabs button span { min-width: 22px; padding: 2px 6px; border-radius: var(--acg-radius-full); background: var(--acg-surface-muted); font-size: var(--acg-size-xs); text-align: center; }
.acg-tabs button:hover { color: var(--acg-text); }
.acg-tabs button[aria-selected="true"] { background: var(--acg-surface); color: var(--acg-text); box-shadow: var(--acg-card-shadow); }
.acg-accts { padding: var(--acg-space-2); gap: 0; }
.acg-arow { position: relative; display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(150px, 1fr) repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: var(--acg-space-5); padding: var(--acg-space-4); border-radius: var(--acg-radius-md); transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-arow + .acg-arow { box-shadow: 0 -1px 0 var(--acg-border-subtle); }
.acg-arow:hover { background: var(--acg-surface-sunken); }
.acg-arow.is-current::before { content: ""; position: absolute; left: 0; top: var(--acg-space-4); bottom: var(--acg-space-4); width: 3px; border-radius: var(--acg-radius-full); background: var(--acg-ink-accent); }
.acg-arow__id { display: flex; align-items: center; gap: var(--acg-space-3); }
.acg-arow__id img { width: 36px; height: 36px; border-radius: var(--acg-radius-md); }
.acg-arow__id strong { display: block; font-weight: var(--acg-weight-medium); font-size: var(--acg-size-md); }
.acg-arow small { display: block; color: var(--acg-text-muted); font-size: var(--acg-size-xs); white-space: nowrap; }
.acg-arow__k { display: block; color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-arow b { display: block; font-weight: var(--acg-weight-regular); font-size: var(--acg-size-md); white-space: nowrap; }
.acg-arow__spark { display: block; width: 56px; height: 18px; margin-top: 2px; color: var(--acg-text-muted); }
.acg-arow__spark.acg-up { color: var(--acg-positive); }
.acg-arow__spark.acg-down { color: var(--acg-negative); }
.acg-arow__spark svg { width: 100%; height: 100%; overflow: visible; }
.acg-copy { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--acg-text); font: var(--acg-weight-regular) var(--acg-size-md)/1.4 var(--acg-font); cursor: pointer; }
.acg-copy i { width: 14px; height: 14px; background: var(--acg-text-muted); -webkit-mask: url("../../images/icons/copy.svg") center / contain no-repeat; mask: url("../../images/icons/copy.svg") center / contain no-repeat; transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-copy:hover i, .acg-copy.is-copied i { background: var(--acg-ink-accent); }
.acg-arow__act { position: relative; display: flex; align-items: center; gap: var(--acg-space-2); }
.acg-arow__act .acg-btn { height: 36px; padding: 0 var(--acg-space-4); }
.acg-empty-row { display: flex; align-items: center; justify-content: space-between; gap: var(--acg-space-4); padding: var(--acg-space-5); color: var(--acg-text-muted); }
.acg-empty-row p { margin: 0; }

/* Duo layout */
.acg-duo { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--acg-grid-gap); align-items: stretch; }
.acg-duo > .acg-card { gap: var(--acg-space-4); }

/* This month */
.acg-mstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--acg-space-3); margin: 0; }
.acg-mstats div { padding: var(--acg-space-3) var(--acg-space-4); border-radius: var(--acg-radius-md); background: var(--acg-surface-sunken); }
.acg-mstats dt { color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-mstats dd { margin: 4px 0 0; font-size: var(--acg-size-lg); }
.acg-mstats__bar { display: block; height: 4px; margin-top: 6px; border-radius: var(--acg-radius-full); background: var(--acg-surface-muted); overflow: hidden; }
.acg-mstats__bar i { display: block; height: 100%; background: var(--acg-ink-accent); border-radius: inherit; }
.acg-chart--sm { height: 180px; }

/* Funding */
.acg-fund { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acg-fund li { display: flex; align-items: center; gap: var(--acg-space-3); padding: var(--acg-space-3) 0; }
.acg-fund li + li { box-shadow: 0 -1px 0 var(--acg-border-subtle); }
.acg-fund li.is-pending { margin: 0 calc(var(--acg-space-3) * -1); padding: var(--acg-space-3); border-radius: var(--acg-radius-md); background: var(--acg-surface-sunken); box-shadow: none; }
.acg-fund li.is-pending + li { box-shadow: none; }
.acg-fund__ic { width: 32px; height: 32px; flex: none; border-radius: var(--acg-radius-md); background: var(--acg-surface-muted); position: relative; }
.acg-fund__ic::after { content: ""; position: absolute; inset: 8px; background: var(--acg-text-secondary); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.acg-fund__ic--deposit { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v13m-6-6 6 6 6-6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.acg-fund__ic--withdrawal { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20V7m-6 6 6-6 6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.acg-fund__ic--transfer { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 8h14m-4-4 4 4-4 4M20 16H6m4-4-4 4 4 4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.acg-fund__ic--deposit::after { background: var(--acg-ink-accent); }
.acg-fund__main { flex: 1; min-width: 0; line-height: 1.35; }
.acg-fund__main strong { display: block; font-weight: var(--acg-weight-medium); }
.acg-fund__main small { display: block; color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-fund__eta { color: var(--acg-text-secondary) !important; }
.acg-fund__end { text-align: right; line-height: 1.35; }
.acg-fund__end strong { display: block; font-weight: var(--acg-weight-regular); }
.acg-status { display: inline-flex; align-items: center; gap: 5px; color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-status::before { content: ""; width: 6px; height: 6px; border-radius: var(--acg-radius-full); background: var(--acg-ink-accent); }
.acg-status--pending::before { background: var(--acg-cat-metal); animation: acg-blink 1.6s ease-in-out infinite; }
@keyframes acg-blink { 50% { opacity: .3; } }
.acg-fund__empty { color: var(--acg-text-muted); padding: var(--acg-space-6) 0 !important; }

/* Recent trades */
.acg-table-card__head { padding: var(--acg-space-6) var(--acg-space-6) var(--acg-space-2); margin: 0; }

/* For you */
.acg-foryou { display: flex; flex-direction: column; gap: var(--acg-grid-gap); }
.acg-promo { position: relative; overflow: hidden; gap: var(--acg-space-3); flex: 1; }
.acg-promo::after { content: "$250K"; position: absolute; right: -8px; bottom: -18px; font: var(--acg-weight-regular) 88px/1 var(--acg-font); letter-spacing: var(--acg-tracking-display); color: rgba(255,255,255,.08); pointer-events: none; }
.acg-promo__when { align-self: flex-start; padding: 4px 10px; border-radius: var(--acg-radius-full); background: rgba(255,255,255,.14); font-size: var(--acg-size-xs); }
.acg-promo h2 { margin: 0; }
.acg-promo p { margin: 0; color: var(--acg-text-secondary); font-size: var(--acg-size-sm); max-width: 32ch; }
.acg-promo__cta { display: flex; align-items: center; gap: var(--acg-space-4); margin-top: auto; position: relative; z-index: 1; }
.acg-promo__cta .acg-btn { height: 36px; }
.acg-promo__terms { color: var(--acg-text-secondary); font-size: var(--acg-size-xs); }
.acg-tool { flex-direction: row; align-items: center; gap: var(--acg-space-3); padding: var(--acg-space-4) var(--acg-space-5); color: var(--acg-text); text-decoration: none; transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-tool:hover { background: var(--acg-surface-sunken); }
.acg-tool > span:nth-child(2) { flex: 1; line-height: 1.35; }
.acg-tool strong { display: block; font-weight: var(--acg-weight-medium); }
.acg-tool small { color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-tool__ic { width: 36px; height: 36px; flex: none; border-radius: var(--acg-radius-md); background: var(--acg-teal-tint); position: relative; }
.acg-tool__ic::after { content: ""; position: absolute; inset: 9px; background: var(--acg-ink-accent); -webkit-mask: url("../../images/icons/chart-profit.svg") center / contain no-repeat; mask: url("../../images/icons/chart-profit.svg") center / contain no-repeat; }
.acg-tool .acg-nv__chev { rotate: -90deg; color: var(--acg-text-muted); }

@media (max-width: 1240px) {
  .acg-arow { grid-template-columns: 1fr 1fr 1fr; row-gap: var(--acg-space-3); }
  .acg-arow__act { grid-column: 1 / -1; }
  .acg-arow__act .acg-btn--primary { flex: 1; }
}
@media (max-width: 960px) {
  .acg-duo, .acg-next__steps { grid-template-columns: minmax(0, 1fr); }
  .acg-pagehead__meta > span { display: none; }
}
@media (max-width: 640px) {
  .acg-arow { grid-template-columns: 1fr 1fr; }
  .acg-arow__id, .acg-arow__login { grid-column: 1 / -1; }
  .acg-mstats { grid-template-columns: 1fr 1fr; }
  .acg-quick__amts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acg-empty-row { flex-direction: column; align-items: flex-start; }
}
.acg-tabs button { white-space: nowrap; }
@media (max-width: 640px) { .acg-tabs button { font-size: var(--acg-size-sm); padding: 0 var(--acg-space-2); } }

/* ══ Statement (option C) ═════════════════════════════════════ */
.acg-stmt { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--acg-space-10, 40px); padding: var(--acg-space-8); align-items: stretch; }
.acg-stmt__label { color: var(--acg-text-muted); margin-bottom: var(--acg-space-3); }
.acg-stmt__num { font-size: var(--acg-size-h1); line-height: 1; letter-spacing: var(--acg-tracking-display); }
.acg-stmt__num small { margin-left: 4px; color: var(--acg-text-muted); font-size: var(--acg-size-lg); letter-spacing: 0; }
.acg-stmt__cents { color: var(--acg-text-muted); }
.acg-stmt__chg { margin-top: 10px; color: var(--acg-text-muted); font-size: var(--acg-size-sm); }
.acg-stmt__chg b { font-weight: var(--acg-weight-medium); }
.acg-stmt__alloc { list-style: none; margin: var(--acg-space-8) 0 0; padding: 0; display: flex; flex-direction: column; }
.acg-stmt__alloc li { display: grid; grid-template-columns: 1fr auto; gap: 6px var(--acg-space-3); padding: var(--acg-space-3) 0; }
.acg-stmt__alloc li + li { box-shadow: inset 0 1px 0 var(--acg-border-subtle); }
.acg-stmt__alloc span { color: var(--acg-text-secondary); }
.acg-stmt__alloc strong { font-weight: var(--acg-weight-medium); }
.acg-stmt__alloc em { margin-left: 6px; font-style: normal; font-weight: var(--acg-weight-regular); color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-stmt__bar { grid-column: 1 / -1; height: 4px; border-radius: var(--acg-radius-full); background: var(--acg-surface-muted); overflow: hidden; }
.acg-stmt__bar i { display: block; height: 100%; border-radius: inherit; background: var(--acg-ink-accent); transition: width .8s cubic-bezier(.16,1,.3,1); }
.acg-stmt__bar.is-w i { background: var(--acg-text-muted); }
.acg-stmt__none { color: var(--acg-text-muted); }
.acg-stmt__actions { display: flex; gap: var(--acg-space-2); margin-top: var(--acg-space-6); }
.acg-stmt__actions .acg-btn { height: 40px; padding: 0 var(--acg-space-4); }
.acg-stmt__right { display: flex; flex-direction: column; min-width: 0; }
.acg-stmt__head { display: flex; align-items: center; justify-content: space-between; gap: var(--acg-space-3); color: var(--acg-text-muted); }
.acg-stmt__ranges { display: flex; gap: 4px; }
.acg-stmt__ranges button { height: 30px; padding: 0 var(--acg-space-3); border: 0; border-radius: var(--acg-radius-md); background: none; color: var(--acg-text-muted); font: var(--acg-weight-medium) var(--acg-size-xs)/1 var(--acg-font); cursor: pointer; transition: background-color var(--acg-duration) var(--acg-ease), color var(--acg-duration) var(--acg-ease); }
.acg-stmt__ranges button:hover { color: var(--acg-text); }
.acg-stmt__ranges button[aria-pressed="true"] { background: var(--acg-surface-muted); color: var(--acg-text); }
.acg-stmt__chart { position: relative; flex: 1; min-height: 260px; margin-top: var(--acg-space-4); }
.acg-stmt__chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.acg-stmt__line { fill: none; stroke: var(--acg-ink-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acg-stmt__base { stroke: var(--acg-border); stroke-dasharray: 2 4; }
.acg-stmt__x { stroke: var(--acg-border-strong); opacity: 0; transition: opacity var(--acg-duration) var(--acg-ease); }
.acg-stmt__x.is-on { opacity: 1; }
.acg-stmt__dot { fill: var(--acg-ink-accent); stroke: var(--acg-surface); stroke-width: 3; }
.acg-stmt__tip { position: absolute; top: -6px; translate: -50% -100%; padding: 6px 10px; border-radius: var(--acg-radius-md); background: var(--acg-surface-muted); box-shadow: var(--acg-shadow); font-size: var(--acg-size-xs); white-space: nowrap; pointer-events: none; }
.acg-stmt__tip b { display: block; font-size: var(--acg-size-sm); font-weight: var(--acg-weight-medium); }
.acg-stmt__tip span { color: var(--acg-text-muted); }
@media (max-width: 960px) {
  .acg-stmt { grid-template-columns: minmax(0, 1fr); padding: var(--acg-space-6); }
  .acg-stmt__chart { min-height: 200px; }
}
@media (max-width: 640px) {
  .acg-stmt__num { font-size: var(--acg-size-h2); }
  .acg-stmt__actions .acg-btn { flex: 1; padding: 0 var(--acg-space-2); }
}

/* ══ Hero: allocation bar + wallet ════════════════════════════ */
.acg-stmt__left { display: flex; flex-direction: column; }
.acg-stmt__split { display: flex; gap: 3px; height: 6px; margin-top: var(--acg-space-6); }
.acg-stmt__split i { min-width: 4px; border-radius: var(--acg-radius-full); transition: flex .8s cubic-bezier(.16,1,.3,1); }
.acg-stmt__legend { display: flex; flex-wrap: wrap; gap: var(--acg-space-2) var(--acg-space-4); margin-top: var(--acg-space-3); color: var(--acg-text-secondary); font-size: var(--acg-size-xs); }
.acg-stmt__legend span { display: inline-flex; align-items: center; gap: 6px; }
.acg-stmt__legend b { width: 6px; height: 6px; border-radius: var(--acg-radius-full); }
.acg-stmt__legend em { font-style: normal; color: var(--acg-text-muted); }

/* The wallet: account cards peek out of a pocket; hover lifts them and reveals actions */
.acg-wallet { --peek: 22px; --lift: 40px; position: relative; margin-top: auto; padding-top: calc(var(--n) * var(--peek)); outline: none; transition: padding-top .4s cubic-bezier(.16,1,.3,1); }
.acg-wallet:hover, .acg-wallet:focus-within { padding-top: calc(var(--n) * var(--lift)); }
.acg-wallet__cards { position: absolute; inset: 0 0 auto; }
.acg-wcard {
  position: absolute; left: calc(var(--i) * 6px + 8px); right: calc(var(--i) * 6px + 8px); top: calc(var(--i) * var(--peek));
  display: flex; align-items: center; gap: var(--acg-space-3); height: 76px; padding: 0 var(--acg-space-4) 0 var(--acg-space-3);
  align-items: flex-start; padding-top: 7px;
  border-radius: var(--acg-radius-md); color: #fff; text-decoration: none;
  background: var(--acg-grad-teal); box-shadow: 0 -6px 16px rgba(0,0,0,.25);
  transition: top .4s cubic-bezier(.16,1,.3,1), translate .3s cubic-bezier(.16,1,.3,1), filter .2s;
}
.acg-wcard--1 { background: linear-gradient(205deg, #0d4f4f 16%, #1f6363 79%); }
.acg-wcard--2 { background: linear-gradient(205deg, #133d3d 16%, #1c5252 79%); }
.acg-wallet:hover .acg-wcard, .acg-wallet:focus-within .acg-wcard { top: calc(var(--i) * var(--lift)); }
.acg-wcard:hover { translate: 0 -3px; filter: brightness(1.1); }
.acg-wcard img { width: 20px; height: 20px; border-radius: 5px; flex: none; }
.acg-wcard__name { flex: 1; min-width: 0; font-size: var(--acg-size-xs); font-weight: var(--acg-weight-medium); line-height: 1.2; }
.acg-wcard__name small { margin-left: 6px; font-weight: var(--acg-weight-regular); color: rgba(255,255,255,.65); }
.acg-wcard__eq { font-size: var(--acg-size-xs); text-align: right; line-height: 1.2; }
.acg-wcard__eq small { margin-left: 6px; }
.acg-wcard__eq .acg-up { color: #8ff3e8; }
.acg-wcard__eq .acg-down { color: #ffb4b4; }
.acg-wcard--new { justify-content: center; }

.acg-wallet__pocket {
  position: relative; z-index: 5; display: flex; flex-direction: column; gap: var(--acg-space-3);
  padding: var(--acg-space-4); border-radius: var(--acg-radius-md);
  background: var(--acg-surface-muted); box-shadow: 0 -10px 20px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
}
/* stitched pocket edge */
.acg-wallet__pocket::before { content: ""; position: absolute; left: 12px; right: 12px; top: 6px; border-top: 1px dashed rgba(255,255,255,.12); pointer-events: none; }
:root[data-theme="light"] .acg-wallet__pocket { background: #ffffff; box-shadow: 0 -10px 20px rgba(0,40,40,.08), 0 1px 2px rgba(0,0,0,.06); }
:root[data-theme="light"] .acg-wallet__pocket::before { border-top-color: rgba(0,0,0,.1); }
.acg-wallet__row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--acg-space-3); }
.acg-wallet__label { display: block; color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-wallet__amt { font-size: var(--acg-size-h4); font-weight: var(--acg-weight-regular); letter-spacing: var(--acg-tracking-snug); }
.acg-wallet__hint { color: var(--acg-text-muted); font-size: var(--acg-size-xs); transition: opacity .2s; }
.acg-wallet__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--acg-space-2); max-height: 0; opacity: 0; overflow: hidden; margin-top: calc(var(--acg-space-3) * -1); transition: max-height .4s cubic-bezier(.16,1,.3,1), opacity .25s, margin-top .4s cubic-bezier(.16,1,.3,1); }
.acg-wallet__actions .acg-btn { height: 36px; padding: 0 var(--acg-space-2); }
.acg-wallet:hover .acg-wallet__actions, .acg-wallet:focus-within .acg-wallet__actions { max-height: 48px; opacity: 1; margin-top: 0; }
.acg-wallet:hover .acg-wallet__hint, .acg-wallet:focus-within .acg-wallet__hint { opacity: 0; }
@media (hover: none), (max-width: 960px) {
  .acg-wallet { padding-top: calc(var(--n) * var(--lift)); }
  .acg-wcard { top: calc(var(--i) * var(--lift)); }
  .acg-wallet__actions { max-height: 48px; opacity: 1; margin-top: 0; }
  .acg-wallet__hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .acg-wallet, .acg-wcard, .acg-wallet__actions { transition: none; } }

/* Wallet: reserve the lifted height so hover never shifts the layout; cards rise into it */
.acg-stmt__legend { margin-bottom: var(--acg-space-5); }
.acg-wallet, .acg-wallet:hover, .acg-wallet:focus-within { padding-top: calc(var(--n) * var(--lift)); }
.acg-wcard { top: calc(var(--n) * (var(--lift) - var(--peek)) + var(--i) * var(--peek)); }
.acg-wallet:hover .acg-wcard, .acg-wallet:focus-within .acg-wcard { top: calc(var(--i) * var(--lift)); }

/* ── Greeting ── */
.acg-hello { display: flex; align-items: baseline; justify-content: space-between; gap: var(--acg-space-4); flex-wrap: wrap; }
.acg-hello h1 { margin: 0; font-weight: var(--acg-weight-regular); }
.acg-hello p { margin: 0; color: var(--acg-text-muted); }

/* ── Wallet flip card: front = balance, back = actions ── */
.acg-stmt__legend { margin-bottom: var(--acg-space-6); }
.acg-flip { margin-top: auto; height: 132px; perspective: 900px; outline: none; cursor: default; }
.acg-flip__inner { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.acg-flip:hover .acg-flip__inner, .acg-flip:focus-within .acg-flip__inner, .acg-flip.is-flipped .acg-flip__inner { transform: rotateY(180deg); }
.acg-flip__face { position: absolute; inset: 0; border-radius: var(--acg-radius-md); backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.acg-flip__front {
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--acg-space-4) var(--acg-space-5);
  color: #fff; background: var(--acg-noise), var(--acg-grad-teal);
  box-shadow: 0 10px 24px rgba(0, 50, 50, .25);
}
/* soft card shine */
.acg-flip__front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 38%); pointer-events: none; }
.acg-flip__top { display: flex; align-items: center; justify-content: space-between; font-size: var(--acg-size-xs); letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.acg-flip__top img { height: 18px; width: auto; opacity: .9; }
.acg-flip__amt { font-size: var(--acg-size-h4); letter-spacing: var(--acg-tracking-snug); }
.acg-flip__amt .acg-stmt__cents { color: rgba(255,255,255,.6); }
.acg-flip__foot { display: flex; align-items: center; justify-content: space-between; font-size: var(--acg-size-xs); color: rgba(255,255,255,.7); }
.acg-flip__turn { font-size: var(--acg-size-sm); opacity: .7; }
.acg-flip__back {
  transform: rotateY(180deg); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--acg-space-2); padding: var(--acg-space-3);
  background: var(--acg-surface-muted); box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
:root[data-theme="light"] .acg-flip__back { background: #ffffff; box-shadow: 0 10px 24px rgba(0,40,40,.1), 0 1px 2px rgba(0,0,0,.06); }
.acg-flip__act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--acg-space-2); border-radius: calc(var(--acg-radius-md) - 2px); background: var(--acg-surface); color: var(--acg-text); text-decoration: none; font-size: var(--acg-size-xs); font-weight: var(--acg-weight-medium); transition: background-color var(--acg-duration) var(--acg-ease), translate var(--acg-duration) var(--acg-ease); }
:root[data-theme="light"] .acg-flip__act { background: var(--acg-surface-sunken); }
.acg-flip__act:hover { translate: 0 -2px; background: var(--acg-surface-sunken); }
.acg-flip__act.is-main { background: var(--acg-teal); color: #000; }
.acg-flip__act.is-main:hover { background: var(--acg-teal-hover); }
.acg-flip__act i { width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.i-dep { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v13m-6-6 6 6 6-6M5 20h14' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-wd { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17V4M6 10l6-6 6 6M5 20h14' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-tr { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 8h14m-4-4 4 4-4 4M20 16H6m4-4-4 4 4 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (hover: none) { .acg-flip:hover .acg-flip__inner { transform: none; } .acg-flip.is-flipped .acg-flip__inner { transform: rotateY(180deg); } }
@media (prefers-reduced-motion: reduce) { .acg-flip__inner { transition: none; } }

/* ══ Hero v3: greeting, balances row, quick actions (no chart) ══ */
.acg-hello { align-items: flex-end; }
.acg-hello p { margin: 4px 0 0; color: var(--acg-text-muted); }
.acg-hello__date { color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-cents { color: var(--acg-text-muted); }

.acg-bals { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--acg-grid-gap); }
.acg-tot { justify-content: space-between; gap: var(--acg-space-3); padding: var(--acg-space-6); }
.acg-tot__head { display: flex; align-items: center; justify-content: space-between; color: var(--acg-text-muted); }
.acg-tot__num { font-size: var(--acg-size-h2); line-height: 1.05; letter-spacing: var(--acg-tracking-display); }
.acg-tot__num small { margin-left: 4px; font-size: var(--acg-size-sm); color: var(--acg-text-muted); letter-spacing: 0; }
.acg-tot__chg { display: flex; align-items: center; gap: var(--acg-space-2); flex-wrap: wrap; color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: var(--acg-radius-full); font-size: var(--acg-size-xs); font-weight: var(--acg-weight-medium); }
.acg-chip.is-up { background: var(--acg-teal-tint); color: var(--acg-positive); }
.acg-chip.is-down { background: var(--acg-negative-tint); color: var(--acg-negative); }
.acg-eye { width: 32px; height: 32px; border: 0; border-radius: var(--acg-radius-md); background: var(--acg-surface-muted); color: var(--acg-text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: color var(--acg-duration) var(--acg-ease); }
.acg-eye:hover { color: var(--acg-text); }
.acg-eye i { width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.7'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/g%3E%3C/svg%3E"); }
.acg-eye[aria-pressed="true"] i { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M4 4l16 16M10 6c.6-.1 1.3-.2 2-.2 6 0 9.5 6.4 9.5 6.4a17 17 0 0 1-3 3.6M6.4 7.6A16.6 16.6 0 0 0 2.5 12S6 18.5 12 18.5c1.5 0 2.9-.4 4.1-1'/%3E%3C/g%3E%3C/svg%3E"); }
body.is-masked [data-money] { filter: blur(8px); user-select: none; transition: filter .2s; }
[data-money] { transition: filter .2s; }

.acg-btiles { gap: var(--acg-space-3); padding: var(--acg-space-5); }
.acg-btiles__head { display: flex; align-items: center; justify-content: space-between; color: var(--acg-text-muted); }
.acg-btiles__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 120px; gap: var(--acg-space-3); }
.acg-bt { position: relative; display: flex; flex-direction: column; gap: 2px; padding: var(--acg-space-3) var(--acg-space-4) var(--acg-space-4); border-radius: var(--acg-radius-md); background: var(--acg-surface-sunken); transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-bt:hover { background: var(--acg-surface-muted); }
.acg-bt__top { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--acg-space-2); }
.acg-bt__ic { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--acg-radius-md); background: var(--acg-surface); }
.acg-bt__ic img { width: 22px; height: 22px; }
.acg-bt.is-wallet .acg-bt__ic { background: var(--acg-teal-tint); color: var(--acg-ink-accent); }
.i-wallet { width: 18px; height: 18px; background: currentColor; -webkit-mask: url("../../images/icons/nav-payout.svg") center / contain no-repeat; mask: url("../../images/icons/nav-payout.svg") center / contain no-repeat; }
.acg-bt__more { width: 28px; height: 28px; border: 0; border-radius: var(--acg-radius-md); background: transparent; color: var(--acg-text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.acg-bt__more:hover, .acg-bt__more[aria-expanded="true"] { background: var(--acg-surface); color: var(--acg-text); }
.acg-bt__more span, .acg-bt__more span::before, .acg-bt__more span::after { display: block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.acg-bt__more span { position: relative; }
.acg-bt__more span::before, .acg-bt__more span::after { content: ""; position: absolute; top: 0; }
.acg-bt__more span::before { left: -6px; } .acg-bt__more span::after { left: 6px; }
.acg-bt .acg-more__menu { top: 32px; right: 0; }
.acg-bt__name { color: var(--acg-text-secondary); font-size: var(--acg-size-xs); }
.acg-bt__name small { color: var(--acg-text-muted); margin-left: 4px; }
.acg-bt__amt { font-size: var(--acg-size-lg); font-weight: var(--acg-weight-medium); letter-spacing: -0.01em; }
.acg-bt__foot { color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-bt--add { align-items: center; justify-content: center; gap: var(--acg-space-2); text-align: center; color: var(--acg-ink-accent); font-size: var(--acg-size-xs); font-weight: var(--acg-weight-medium); text-decoration: none; background: transparent; box-shadow: inset 0 0 0 1px dashed var(--acg-border); outline: 1px dashed var(--acg-border); outline-offset: -1px; }
.acg-bt--add:hover { background: var(--acg-teal-tint); outline-color: var(--acg-border-accent); }
.acg-bt--add:hover .acg-add__plus { rotate: 90deg; }

.acg-qa { flex-direction: row; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--acg-space-3); padding: var(--acg-space-4); }
.acg-qa__item { display: flex; align-items: center; justify-content: center; gap: var(--acg-space-3); height: 56px; border-radius: var(--acg-radius-md); background: var(--acg-surface-sunken); color: var(--acg-text); text-decoration: none; font-weight: var(--acg-weight-medium); transition: background-color var(--acg-duration) var(--acg-ease), translate var(--acg-duration) var(--acg-ease); }
.acg-qa__item:hover { background: var(--acg-surface-muted); translate: 0 -2px; }
.acg-qa__item i { width: 18px; height: 18px; background: var(--acg-ink-accent); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.acg-qa__item.is-main { background: var(--acg-teal); color: #000; }
.acg-qa__item.is-main i { background: #000; }
.acg-qa__item.is-main:hover { background: var(--acg-teal-hover); }
.i-add { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'/%3E%3C/svg%3E"); }
.i-mt5 { --m: url("../../images/icons/nav-downloads.svg"); }

@media (max-width: 1240px) {
  .acg-bals { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .acg-btiles__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acg-qa { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .acg-hello { flex-direction: column; align-items: flex-start; }
  .acg-qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acg-qa__item.is-main { grid-column: 1 / -1; }
}

/* ══ Hero v4: one card, balances on demand ═══════════════════ */
.acg-hero2 { gap: 0; padding: 0; overflow: visible; }
.acg-hero2__main { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--acg-space-6); padding: var(--acg-space-6) var(--acg-space-6) var(--acg-space-5); flex-wrap: wrap; }
.acg-hero2__main .acg-tot__head { justify-content: flex-start; gap: var(--acg-space-3); margin-bottom: var(--acg-space-2); }
.acg-hero2__main .acg-tot__num { font-size: var(--acg-size-h1); margin-bottom: var(--acg-space-3); }
.acg-hero2__actions { display: flex; gap: var(--acg-space-2); }
.acg-hbtn { display: inline-flex; align-items: center; gap: var(--acg-space-2); height: 44px; padding: 0 var(--acg-space-5); border-radius: var(--acg-radius-md); background: var(--acg-surface-muted); color: var(--acg-text); text-decoration: none; font-weight: var(--acg-weight-medium); transition: background-color var(--acg-duration) var(--acg-ease), translate var(--acg-duration) var(--acg-ease); }
.acg-hbtn:hover { translate: 0 -1px; background: color-mix(in srgb, var(--acg-surface-muted), var(--acg-text) 8%); }
.acg-hbtn i { width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.acg-hbtn.is-main { background: var(--acg-teal); color: #000; }
.acg-hbtn.is-main:hover { background: var(--acg-teal-hover); }

.acg-hero2__toggle { display: flex; align-items: center; gap: var(--acg-space-3); width: 100%; padding: var(--acg-space-3) var(--acg-space-6); border: 0; border-top: 1px solid var(--acg-border-subtle); border-radius: 0 0 var(--acg-radius-md) var(--acg-radius-md); background: transparent; color: var(--acg-text-secondary); font: var(--acg-weight-medium) var(--acg-size-sm)/1 var(--acg-font); cursor: pointer; text-align: left; transition: background-color var(--acg-duration) var(--acg-ease), color var(--acg-duration) var(--acg-ease); }
.acg-hero2__toggle:hover { background: var(--acg-surface-sunken); color: var(--acg-text); }
.acg-hero2.is-open .acg-hero2__toggle { border-radius: 0; }
.acg-hero2__mini { display: flex; gap: 2px; width: 120px; height: 6px; }
.acg-hero2__mini i { min-width: 3px; border-radius: var(--acg-radius-full); }
.acg-hero2__toggle .acg-nv__chev { margin-left: auto; transition: rotate .3s cubic-bezier(.16,1,.3,1); rotate: 0deg; }
.acg-hero2__toggle[aria-expanded="true"] .acg-nv__chev { rotate: 180deg; }

.acg-hero2__drawer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.16,1,.3,1); }
.acg-hero2.is-open .acg-hero2__drawer { grid-template-rows: 1fr; }
.acg-hero2__inner { overflow: hidden; }
.acg-hero2.is-open .acg-hero2__inner { overflow: visible; }
.acg-brows { list-style: none; margin: 0; padding: 0 var(--acg-space-3) var(--acg-space-3); }
.acg-brow { display: grid; grid-template-columns: 6px 36px minmax(0, 1fr) 48px 170px auto; align-items: center; gap: var(--acg-space-3); padding: var(--acg-space-3); border-radius: var(--acg-radius-md); transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-brow:hover { background: var(--acg-surface-sunken); }
.acg-brow__dot { width: 6px; height: 6px; border-radius: var(--acg-radius-full); }
.acg-brow__ic { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--acg-radius-md); background: var(--acg-surface-sunken); color: var(--acg-ink-accent); }
.acg-brow__ic img { width: 24px; height: 24px; }
.acg-brow__name strong { display: block; font-weight: var(--acg-weight-medium); }
.acg-brow__name small, .acg-brow__amt small { display: block; color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-brow__share { color: var(--acg-text-muted); font-size: var(--acg-size-xs); text-align: right; }
.acg-brow__amt { text-align: right; }
.acg-brow__amt strong { font-weight: var(--acg-weight-medium); }
.acg-brow__act { position: relative; display: flex; align-items: center; gap: var(--acg-space-2); justify-content: flex-end; }
.acg-brow__act .acg-btn { height: 34px; padding: 0 var(--acg-space-4); }
.acg-brow__act .acg-more__menu { top: 38px; right: 0; }
.acg-brow--add { display: block; padding: var(--acg-space-2) var(--acg-space-3); }
.acg-brow--add:hover { background: transparent; }
.acg-brow--add a { display: inline-flex; align-items: center; gap: var(--acg-space-2); height: 36px; padding: 0 var(--acg-space-3) 0 var(--acg-space-1); border-radius: var(--acg-radius-md); color: var(--acg-ink-accent); font-weight: var(--acg-weight-medium); text-decoration: none; transition: background-color var(--acg-duration) var(--acg-ease); }
.acg-brow--add a:hover { background: var(--acg-teal-tint); }
.acg-brow--add a:hover .acg-add__plus { rotate: 90deg; }

@media (max-width: 960px) {
  .acg-hero2__actions { width: 100%; }
  .acg-hbtn { flex: 1; justify-content: center; padding: 0 var(--acg-space-2); }
  .acg-brow { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .acg-brow__dot, .acg-brow__share { display: none; }
  .acg-brow__act { grid-column: 1 / -1; }
  .acg-brow__act .acg-btn { flex: 1; }
}
@media (max-width: 640px) {
  .acg-hero2__main .acg-tot__num { font-size: var(--acg-size-h2); }
  .acg-hero2__mini { width: 72px; }
}

/* ══ Hero v5: total balance + breakdown popover ═══════════════ */
.acg-hero3 { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: var(--acg-space-6); flex-wrap: wrap; padding: var(--acg-space-6) var(--acg-space-8) var(--acg-space-8); overflow: visible; }
.acg-hero3__head { display: flex; align-items: center; gap: var(--acg-space-2); margin-bottom: var(--acg-space-3); }
.acg-hero3 .acg-tot__num { font-size: var(--acg-size-h1); margin-bottom: var(--acg-space-3); }
.acg-hero3__actions { display: flex; gap: var(--acg-space-2); }

.acg-bd { position: relative; }
.acg-bd__btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--acg-space-2) 0 var(--acg-space-3); margin-left: calc(var(--acg-space-3) * -1); border: 0; border-radius: var(--acg-radius-md); background: transparent; color: var(--acg-text-muted); font: var(--acg-weight-regular) var(--acg-size-sm)/1 var(--acg-font); cursor: pointer; transition: background-color var(--acg-duration) var(--acg-ease), color var(--acg-duration) var(--acg-ease); }
.acg-bd__btn:hover, .acg-bd__btn[aria-expanded="true"] { background: var(--acg-surface-muted); color: var(--acg-text); }
.acg-bd__btn .acg-nv__chev { margin: 0; width: 12px; height: 12px; transition: rotate .25s cubic-bezier(.16,1,.3,1); }
.acg-bd__btn[aria-expanded="true"] .acg-nv__chev { rotate: 180deg; }
.acg-bd__pop {
  position: absolute; z-index: 40; top: calc(100% + 8px); left: calc(var(--acg-space-3) * -1); width: 340px;
  padding: var(--acg-space-2); border-radius: var(--acg-radius-md);
  background: var(--acg-surface); box-shadow: 0 20px 48px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--acg-border-subtle);
  animation: acg-bdin .18s cubic-bezier(.16,1,.3,1);
}
:root[data-theme="light"] .acg-bd__pop { box-shadow: 0 20px 48px rgba(0, 40, 40, .14), inset 0 0 0 1px var(--acg-border); }
@keyframes acg-bdin { from { opacity: 0; translate: 0 -4px; } }
.acg-bd__title { padding: var(--acg-space-2) var(--acg-space-3) var(--acg-space-1); color: var(--acg-text-muted); font-size: var(--acg-size-xs); }
.acg-bd__list { list-style: none; margin: 0; padding: 0; }
.acg-bd__list li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 4px var(--acg-space-3); padding: var(--acg-space-3); border-radius: calc(var(--acg-radius-md) - 2px); }
.acg-bd__list li:hover { background: var(--acg-surface-sunken); }
.acg-bd__dot { width: 8px; height: 8px; border-radius: var(--acg-radius-full); }
.acg-bd__name { font-weight: var(--acg-weight-medium); line-height: 1.3; }
.acg-bd__name small, .acg-bd__amt small { display: block; color: var(--acg-text-muted); font-size: var(--acg-size-xs); font-weight: var(--acg-weight-regular); }
.acg-bd__amt { text-align: right; line-height: 1.3; }
.acg-bd__amt strong { font-weight: var(--acg-weight-medium); }
.acg-bd__bar { grid-column: 2 / -1; height: 3px; border-radius: var(--acg-radius-full); background: var(--acg-surface-muted); overflow: hidden; }
.acg-bd__bar i { display: block; height: 100%; border-radius: inherit; }
.acg-bd__total { display: flex; justify-content: space-between; margin: var(--acg-space-1) var(--acg-space-3) 0; padding: var(--acg-space-3) 0; box-shadow: inset 0 1px 0 var(--acg-border-subtle); color: var(--acg-text-muted); }
.acg-bd__total strong { color: var(--acg-text); font-weight: var(--acg-weight-medium); }
.acg-bd__link { display: flex; align-items: center; justify-content: center; gap: 4px; height: 36px; margin-top: var(--acg-space-1); border-radius: calc(var(--acg-radius-md) - 2px); background: var(--acg-surface-sunken); color: var(--acg-text-secondary); font-size: var(--acg-size-xs); font-weight: var(--acg-weight-medium); text-decoration: none; }
.acg-bd__link:hover { color: var(--acg-text); }
.acg-bd__link .acg-nv__chev { margin: 0; width: 12px; height: 12px; rotate: -90deg; }
@media (max-width: 960px) {
  .acg-hero3 { padding: var(--acg-space-6); }
  .acg-hero3__actions { width: 100%; }
  .acg-hero3__actions .acg-hbtn { flex: 1; justify-content: center; padding: 0 var(--acg-space-2); }
}
@media (max-width: 640px) {
  .acg-hero3 .acg-tot__num { font-size: var(--acg-size-h2); }
  .acg-bd__pop { width: min(340px, calc(100vw - 48px)); }
}

/* No rubber-band bounce or scroll chaining at the page edges */
html, body { overscroll-behavior: none; }
.acg-sb, .acg-menu { overscroll-behavior: contain; }
.acg-table-wrap { overscroll-behavior-x: contain; } /* sideways only: the page still scrolls over tables */

/* ── Primary action fill follows the theme (bright teal in dark, dark teal in light) ── */
.acg-btn--primary, .acg-cur__trade, .acg-fab, .acg-nv__badge, .c-act.is-main,
.acg-next__steps li.is-current .acg-next__num { background: var(--acg-cta); color: var(--acg-cta-ink); }
.acg-btn--primary:hover, .acg-cur__trade:hover, .acg-fab:hover, .c-act.is-main:hover { background: var(--acg-cta-hover); }
.acg-add:hover { background: var(--acg-cta); color: var(--acg-cta-ink); }
.acg-add:hover .acg-add__plus { background: var(--acg-cta-ink); }
.acg-add:hover .acg-add__plus::before, .acg-add:hover .acg-add__plus::after { background: var(--acg-cta); }
:root[data-theme="light"] .acg-cur__trade img { filter: invert(1); }
:root[data-theme="light"] .acg-on-dark .acg-cur__trade img { filter: none; }
