/* ================================================================
   Fund app — light trading-desk theme
   One neutral ramp, one cobalt accent, green/red only for meaning.
   ================================================================ */
:root {
  --bg: #ffffff;
  --backdrop: #eef0f3;
  --surface: #ffffff;
  --raised: #f4f5f7;
  --raised-2: #eceef1;
  --line: rgba(17, 24, 39, .08);
  --line-2: rgba(17, 24, 39, .12);
  --text: #15181e;
  --text-2: #4d5461;
  --muted: #6e7480;

  --accent: #2f6fed;
  --accent-ink: #2459c9;
  --accent-soft: rgba(47, 111, 237, .1);
  --up: #16a34a;
  --up-ink: #15803d;
  --up-btn: #12894a;
  --up-soft: rgba(22, 163, 74, .1);
  --down: #dc2626;
  --down-btn: #e04848;
  --down-soft: rgba(220, 38, 38, .08);
  --warn: #b7791f;
  --warn-soft: rgba(234, 179, 8, .14);
  --ink: #12151b;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow-lg: 0 8px 24px rgba(17, 24, 39, .08);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  /* aliases still used by older markup */
  --card: var(--surface);
  --card2: var(--raised);
  --bg2: var(--raised);
  --brand: var(--accent);
  --radius: var(--r-lg);
}
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: var(--ease); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 500; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
b, strong { font-weight: 500; }
.ico { flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.pad { padding: 20px; }
.up { color: var(--up-ink); }
.down { color: var(--down); }
.num, .big, .t-val, .right b { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ================= Shell ================= */
.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
@media (min-width: 540px) {
  body.app { background: var(--backdrop); }
  .shell { box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
}
.page-head { display: flex; align-items: center; justify-content: space-between; padding: calc(20px + var(--safe-t)) 24px 4px; }
.page-head h1 { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(16px + var(--safe-t)) 24px 8px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.round-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
  transition: background-color .15s var(--ease), transform .15s var(--ease), color .15s var(--ease);
}
.round-btn:hover { background: var(--raised); }
.round-btn:active { transform: scale(.96); }
.round-btn.on { color: var(--down); }
.round-btn.on .ico { fill: currentColor; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: transparent; border: 0; color: var(--text-2); cursor: pointer; transition: background-color .15s var(--ease); }
.icon-btn:hover { background: var(--raised); }
.avatar-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #dfe7f7; color: var(--accent-ink); font-weight: 500; font-size: 17px; }
.avatar-btn i { position: absolute; right: 1px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #22c3a6; border: 2px solid var(--bg); }
.screen { padding: 12px 24px 32px; }
body.has-nav .screen { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 48px); }

/* Floating pill tab bar */
.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + var(--safe-b)); width: calc(100% - 48px); max-width: 432px; height: var(--nav-h);
  display: flex; justify-content: space-around; align-items: center; padding: 0 8px;
  background: var(--surface); border-radius: 32px; box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(17, 24, 39, .12);
}
.tabbar a { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; color: #9aa0ab; transition: color .15s var(--ease), background-color .15s var(--ease); }
.tabbar a:hover { color: var(--text-2); }
.tabbar a.on { color: var(--accent); }
.tabbar a.on::after { content: ""; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ================= Entrance motion ================= */
.screen > * { animation: rise .42s var(--ease) both; }
.screen > *:nth-child(2) { animation-delay: .04s; }
.screen > *:nth-child(3) { animation-delay: .08s; }
.screen > *:nth-child(4) { animation-delay: .12s; }
.screen > *:nth-child(5) { animation-delay: .16s; }
.screen > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ================= Basics ================= */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px; }
.label { font-size: 13px; color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 12px; }
.section-head h2 { font-size: 15px; font-weight: 500; color: var(--text); }
.section-head a, .section-head .small { font-size: 13px; color: var(--muted); font-weight: 400; }
.section-head a:hover { color: var(--text); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 24px; border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap;
  color: var(--text); background: var(--raised);
  transition: background-color .15s var(--ease), transform .12s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--up-btn); color: #fff; }
.btn-primary:hover { background: #0f7a41; }
.btn-blue { background: var(--accent); color: #fff; }
.btn-blue:hover { background: var(--accent-ink); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--raised); }
.btn-danger { background: var(--down-btn); color: #fff; }
.btn-block { width: 100%; }
.btn-small { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 18px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.alert { padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 12px; font-size: 14px; }
.alert-ok { background: var(--up-soft); color: var(--up-ink); }
.alert-bad { background: var(--down-soft); color: #b91c1c; }
.alert-warn { background: var(--warn-soft); color: #8a5a10; }
.alert-info { background: var(--accent-soft); color: var(--accent-ink); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; }
.badge-ok { background: var(--up-soft); color: var(--up-ink); }
.badge-bad { background: var(--down-soft); color: var(--down); }
.badge-warn { background: var(--warn-soft); color: #8a5a10; }
.badge-info { background: var(--raised); color: var(--text-2); }
.pill { font-size: 12.5px; font-weight: 500; padding: 2px 8px; border-radius: 6px; background: var(--up-soft); }

/* Forms */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 8px; font-size: 13px; color: var(--text-2); }
input, select, textarea {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px; outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; }
input[type=file] { padding: 12px; height: auto; font-size: 13px; background: var(--raised); border-style: dashed; }
input::placeholder { color: #a3a8b1; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { background: var(--raised); color: var(--muted); }
.check { display: flex !important; gap: 12px !important; align-items: flex-start; font-size: 13px !important; line-height: 1.5; color: var(--text-2); }
.check input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--accent); box-shadow: none; }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-md); overflow: hidden; background: var(--surface); transition: border-color .15s var(--ease); }
.input-group span { display: grid; place-items: center; padding: 0 12px; color: var(--text); background: var(--raised); font-size: 14px; font-variant-numeric: tabular-nums; }
.input-group input { border: 0; border-radius: 0; box-shadow: none !important; }
.input-group:focus-within { border-color: var(--accent); }
.note { font-size: 13px; color: var(--accent-ink); background: var(--accent-soft); padding: 8px 12px; border-radius: var(--r-sm); }

/* Auth */
.auth { padding: 48px 0 24px; }
.auth h1 { font-size: 26px; font-weight: 500; letter-spacing: -.01em; margin-top: 24px; }
.auth > p { margin: 8px 0 28px; color: var(--muted); }
.auth-logo img { border-radius: 14px; }
.auth .center { margin-top: 20px; }

/* ================= Overview ================= */
.asset-label { font-size: 13px; color: var(--muted); margin-top: 16px; }
.asset-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.asset-value { font-size: 40px; font-weight: 400; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.asset-cur { display: grid; gap: 0; text-align: right; font-size: 11px; color: #c0c4cb; line-height: 1.5; padding-top: 10px; }
.asset-cur b { color: var(--accent); font-size: 13px; font-weight: 500; }
.asset-change { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.asset-change .chg { display: inline-flex; align-items: center; gap: 4px; color: var(--up-ink); font-variant-numeric: tabular-nums; }
.asset-change .chg.neg { color: var(--down); }
.asset-change .chg.neg .ico { transform: rotate(180deg); }

.ranges { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 8px; }
.ranges button, .ranges a { height: 32px; min-width: 44px; padding: 0 12px; border-radius: 16px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.ranges button:hover { color: var(--text); }
.ranges .on { background: var(--accent); color: #fff; }

/* Chart component */
.chart { position: relative; margin: 0 -24px; height: 200px; touch-action: pan-y; user-select: none; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart .line { fill: none; stroke: var(--up); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart.neg .line { stroke: var(--down); }
.chart .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 3px solid var(--up); pointer-events: none; transition: left .12s linear, top .12s linear; }
.chart.neg .dot { border-color: var(--down); }
.chart .tip { position: absolute; transform: translate(-50%, -100%); margin-top: -14px; padding: 4px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; transition: left .12s linear, top .12s linear; }
.chart .tip small { color: #9aa1ad; font-weight: 400; margin-left: 4px; }
.chart .empty-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.chart-x { display: flex; justify-content: space-between; margin: 8px 0 0; font-size: 11.5px; color: #a3a8b1; font-variant-numeric: tabular-nums; }

/* Portfolio-style rows */
.rows { display: grid; }
.prow { display: grid; grid-template-columns: 44px 1fr 76px auto; align-items: center; gap: 12px; padding: 12px 0; color: var(--text); width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; border-radius: var(--r-md); transition: background-color .15s var(--ease); }
.prow:hover { background: var(--raised); }
.prow:active { transform: scale(.99); }
.logo-tile { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(17, 24, 39, .06); font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; }
.logo-tile img { width: 26px; height: 26px; border-radius: 50%; }
.p-name { min-width: 0; display: grid; }
.p-name b { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-name small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-val { display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
.p-val b { font-size: 15px; font-weight: 500; }
.p-val small { font-size: 12.5px; }
.spark { width: 76px; height: 32px; overflow: visible; }
.spark circle { fill: #fff; stroke-width: 1.6; }
.skeleton { opacity: .5; }

/* Generic list */
.list { padding: 4px 20px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; color: inherit; font: inherit; text-align: left; }
.list-row:last-child { border-bottom: 0; }
.list-row.link { color: var(--text); }
.list-row.link span { display: flex; align-items: center; gap: 10px; }
.list-row .right b { font-weight: 500; }
.empty { text-align: center; padding: 28px 20px; }
.empty p { color: var(--muted); margin: 0 0 16px; }

/* Activity tags (screenshot: soft SELL / HOLD) */
.tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; letter-spacing: .02em; }
.tag-sell { background: #fde8e8; color: #c43333; }
.tag-buy { background: #e3f6ea; color: #15803d; }
.tag-hold { background: #fdf3d4; color: #9a6b0c; }

/* ================= Getting started ================= */
.gs { padding: 20px; }
.gs-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.gs-head b { font-size: 15px; }
.gs-bar { height: 4px; background: var(--raised); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.gs-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .5s var(--ease); }
.gs-step { display: grid; grid-template-columns: 28px 1fr 20px; align-items: center; gap: 12px; padding: 12px 0; color: var(--text); border-bottom: 1px solid var(--line); }
.gs-step:last-child { border-bottom: 0; padding-bottom: 0; }
.gs-step .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.gs-step.done .n { background: var(--up); color: #fff; box-shadow: none; }
.gs-step.done .t b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.gs-step .t { display: grid; }
.gs-step .t small { color: var(--muted); font-size: 12.5px; }
.gs-step .ico { color: #b4b9c1; }

/* ================= Onboarding ================= */
.ob { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 24px calc(24px + var(--safe-b)); animation: obIn .4s var(--ease) both; }
@keyframes obIn { from { opacity: 0; } }
.ob.out { animation: obOut .3s var(--ease) forwards; }
@keyframes obOut { to { opacity: 0; transform: translateY(12px); } }
.ob-top { display: flex; justify-content: flex-end; }
.ob-skip { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; padding: 8px; }
.ob-track { flex: 1; display: flex; overflow: hidden; }
.ob-slide { flex: 0 0 100%; display: flex; flex-direction: column; justify-content: center; gap: 24px; transition: transform .45s var(--ease), opacity .45s var(--ease); }
.ob-art { height: 280px; border-radius: var(--r-xl); background: var(--raised); position: relative; overflow: hidden; display: grid; place-items: center; }
.ob-slide h2 { font-size: 26px; font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
.ob-slide p { margin: -12px 0 0; color: var(--text-2); }
.ob-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width .3s var(--ease), background-color .3s var(--ease); }
.ob-dots i.on { width: 20px; background: var(--accent); }
.ob-art .mini-card { width: 76%; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 16px; }
.ob-art .mini-card small { color: var(--muted); font-size: 12px; }
.ob-art .mini-card .v { font-size: 26px; font-variant-numeric: tabular-nums; }
.ob-art .mini-row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ob-art .mini-row:first-of-type { border-top: 0; }
.ob-art .chip-row { display: flex; gap: 8px; margin-top: 12px; }
.ob-art .chip-row span { flex: 1; text-align: center; padding: 10px; border-radius: var(--r-sm); background: var(--raised); font-size: 13px; }
.ob-art .chip-row span.on { background: var(--accent); color: #fff; }

/* ================= Market page ================= */
.search { display: flex; align-items: center; gap: 8px; background: var(--raised); border-radius: var(--r-md); padding: 0 6px 0 14px; margin-bottom: 16px; color: var(--muted); }
.search input { border: 0; background: none; padding: 0 4px; box-shadow: none !important; }
.search .btn { height: 36px; border-radius: 10px; }
.chips { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 14px; border-radius: 16px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; transition: background-color .2s var(--ease), color .2s var(--ease); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--accent); color: #fff; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips span.chip { background: var(--raised); cursor: default; }
.live-dot { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.live-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--up); }
.live-dot.off::before { background: var(--muted); }
.market-list .prow { padding: 12px 0; }
.flash-up { animation: fu 1s var(--ease); }
.flash-down { animation: fd 1s var(--ease); }
@keyframes fu { from { background: var(--up-soft); } }
@keyframes fd { from { background: var(--down-soft); } }

/* Full-screen detail sheet (screen 2 of the reference) */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .32); opacity: 0; transition: opacity .3s var(--ease); }
.sheet-body {
  position: absolute; left: 50%; bottom: 0; width: 100%; max-width: 480px; max-height: 94vh; overflow-y: auto;
  transform: translate(-50%, 100%); transition: transform .4s var(--ease);
  background: var(--bg); border-radius: 24px 24px 0 0; padding: 8px 24px calc(24px + var(--safe-b));
  box-shadow: 0 -8px 32px rgba(17, 24, 39, .12);
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-body { transform: translate(-50%, 0); }
.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 12px; }
.sheet.full .sheet-body { height: 100%; max-height: none; border-radius: 0; padding-top: calc(16px + var(--safe-t)); }
.sheet-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.d-head h3 { font-size: 15px; font-weight: 600; }
.d-head .sub { font-size: 13px; color: var(--muted); }
.d-price { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ohl { display: flex; gap: 14px; margin: 12px 0 4px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.ohl b { font-size: 14px; font-weight: 500; color: var(--text); margin-left: 4px; font-variant-numeric: tabular-nums; }
.ohl .h b { color: var(--up-ink); }
.ohl .l b { color: var(--down); }
.ohl .h::before, .ohl .l::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; background: var(--up); }
.ohl .l::before { background: var(--down); }
.chart.area { height: 220px; }
.buysell { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 8px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 8px 0 0; }
.stat-grid div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.stat-grid span { color: var(--muted); }
.stat-grid b { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ================= Amount pad (screen 3 of the reference) ================= */
.pad-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.pad-head h3 { font-size: 15px; font-weight: 600; }
.pad-head .sub { font-size: 13px; color: var(--muted); }
.pad-head .p { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pad-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.pad-line + .pad-line { border-top: 1px solid var(--line-2); }
.pad-amt { font-size: 32px; font-weight: 400; font-variant-numeric: tabular-nums; min-height: 44px; display: flex; align-items: center; }
.pad-amt .caret { width: 2px; height: 32px; background: var(--text); margin-left: 2px; animation: caret 1s steps(1) infinite; }
.pad-amt.dim { color: var(--muted); }
@keyframes caret { 50% { opacity: 0; } }
.pad-chip { font-size: 12.5px; color: var(--text-2); background: var(--raised); padding: 6px 12px; border-radius: 14px; white-space: nowrap; }
.pad-total { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 16px 0 20px; font-size: 13px; }
.pad-total span { color: var(--muted); }
.pad-total b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.pad-err { min-height: 20px; font-size: 13px; color: var(--down); margin: -8px 0 8px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 16px; }
.keypad button { height: 56px; border: 0; background: none; font: inherit; font-size: 20px; color: var(--text); cursor: pointer; display: grid; place-items: center; position: relative; }
.keypad button::before { content: ""; position: absolute; width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid transparent; transition: border-color .18s var(--ease), background-color .18s var(--ease); }
.keypad button:active, .keypad button.hit { color: var(--up-ink); }
.keypad button:active::before, .keypad button.hit::before { border-color: var(--up); background: var(--up-soft); }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick .chip { background: var(--raised); color: var(--text); }

/* ================= Plans ================= */
.plan { position: relative; padding: 24px; }
.plan h3 { font-size: 17px; font-weight: 500; }
.plan-badge { position: absolute; top: 24px; right: 24px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 6px; }
.plan-roi { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 8px; }
.plan-roi b { font-size: 40px; font-weight: 400; color: var(--text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-roi span { color: var(--muted); font-size: 13px; }
.plan-facts { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; }
.plan-facts li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan-facts li:last-child { border-bottom: 0; }
.plan-facts span { color: var(--muted); }
.plan-facts b { font-variant-numeric: tabular-nums; }
.inv .progress { height: 4px; background: var(--raised); border-radius: 4px; overflow: hidden; margin: 12px 0 8px; }
.inv .progress span { display: block; height: 100%; background: var(--up); border-radius: 4px; }

/* ================= Wallet / balance card ================= */
.balance-card { background: var(--surface); padding: 24px; }
.balance-card .label { margin-bottom: 4px; }
.balance-card .big { font-size: 34px; font-weight: 400; letter-spacing: -.02em; margin: 0 0 16px; }
.balance-card.slim .big { margin-bottom: 0; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.stats3 span { display: block; color: var(--muted); font-size: 12px; }
.stats3 b { font-size: 14px; font-variant-numeric: tabular-nums; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.actions.two { grid-template-columns: 1fr 1fr; }
.actions .btn { padding: 0 8px; font-size: 14px; }

/* Deposit */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--raised); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.seg a { text-align: center; padding: 8px; border-radius: 8px; color: var(--text-2); font-size: 14px; transition: background-color .2s var(--ease), color .2s var(--ease); }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.step { display: flex; align-items: center; gap: 12px; font-weight: 500; margin-top: 8px; }
.step span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--text); color: #fff; font-size: 12.5px; }
.pay-box { display: flex; gap: 16px; align-items: center; background: var(--raised); border-radius: var(--r-lg); padding: 16px; }
.qr { background: #fff; padding: 8px; border-radius: 10px; width: 184px; height: 184px; flex: none; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.qr img, .qr canvas { display: block; }
.pay-info { display: grid; gap: 8px; min-width: 0; }
.copy-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.copy-line b { word-break: break-all; }
.addr { font-size: 12px; word-break: break-all; color: var(--text); }
@media (max-width: 420px) { .pay-box { flex-direction: column; align-items: stretch; } .qr { margin: 0 auto; } }
@media (hover: hover) and (pointer: fine) { .mobile-only { display: none !important; } }

/* Profile */
.profile-head { display: flex; gap: 16px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #dfe7f7; color: var(--accent-ink); font-size: 22px; flex: none; }
.menu-row { display: flex; align-items: center; gap: 12px; width: 100%; color: var(--text); font: inherit; cursor: pointer; text-align: left; transition: background-color .15s var(--ease); }
.menu-row:hover { background: var(--raised); }
.menu-row.danger { color: var(--down); }
.fold summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "›"; color: var(--muted); transition: transform .2s var(--ease); }
.fold[open] summary::after { transform: rotate(90deg); }
.fold[open] summary { margin-bottom: 16px; }
.pager { display: flex; justify-content: center; gap: 12px; }
.disclaimer { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 24px; padding: 16px; background: var(--raised); border-radius: var(--r-md); }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 40px + var(--safe-b)); transform: translate(-50%, 8px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; z-index: 100; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= Top movers ================= */
.fx-board { padding: 16px 20px 12px; }
.fx-top { display: flex; justify-content: space-between; align-items: center; }
.fx-mkts { margin-bottom: 12px; }
.fx-tabs { margin-bottom: 8px; }
.fx-hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; min-height: 80px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.fx-hero-l { display: grid; gap: 2px; min-width: 0; }
.fx-hero-l b { font-size: 18px; font-weight: 500; }
.fx-crown { font-size: 12px; color: var(--muted); }
.fx-hero-r { display: grid; justify-items: end; gap: 4px; }
.fx-big { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.fx-hero-r .spark { width: 88px; height: 28px; }
.fx-list { display: grid; }
.fx-row { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.fx-row:last-child { border-bottom: 0; }
.fx-rank { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.fx-pair { display: grid; gap: 6px; min-width: 0; }
.fx-bar { height: 3px; border-radius: 2px; background: var(--raised); overflow: hidden; max-width: 140px; }
.fx-bar i { display: block; height: 100%; border-radius: 2px; }
.bg-up { background: var(--up); }
.bg-down { background: var(--down); }
.fx-row .right { display: grid; }
.fx-foot { padding: 8px 0 0; font-size: 12px; }
.fx-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.fx-name .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin { width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--raised); }

/* ================= AI desk ================= */
.ai-teaser { display: flex; align-items: center; gap: 16px; color: var(--text); padding: 16px 20px; transition: background-color .15s var(--ease); }
.ai-teaser:hover { background: var(--raised); }
.ai-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: #fff; flex: none; }
.ai-teaser-txt { display: grid; gap: 0; flex: 1; min-width: 0; }
.ai-teaser-txt b { font-size: 15px; }
.ai-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ai-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--up); }
.ai-teaser .ico.chev { color: #b4b9c1; }
.ai-hero { display: flex; gap: 16px; align-items: flex-start; }
.ai-hero h2 { font-size: 19px; margin: 2px 0 8px; }
.ai-hero p { margin: 0 0 12px; }
.ai-hero .chips { margin: 0; }
.ai-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ai-kpis .card { padding: 16px; margin-bottom: 16px; display: grid; gap: 2px; }
.ai-kpis span, .ai-kpis small { color: var(--muted); font-size: 12px; }
.ai-kpis b { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ai-bars { display: flex; align-items: flex-end; gap: 8px; height: 160px; }
.ai-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.ai-bar .col { flex: 1; width: 100%; max-width: 28px; display: flex; align-items: flex-end; }
.ai-bar .col i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: var(--raised-2); }
.ai-bar:last-child .col i.bg-up { background: var(--up); }
.ai-bar:last-child .col i.bg-down { background: var(--down); }
.ai-bar .col i.bg-down { background: #f3c6c6; }
.ai-bar .v { font-size: 11px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ai-bar .m { font-size: 11.5px; color: var(--muted); }
.ai-note { margin: 12px 0 0; }
.sim-badge { font-size: 12px; font-weight: 500; color: #8a5a10; background: var(--warn-soft); padding: 2px 8px; border-radius: 6px; }
.ai-sim-note { margin: -4px 0 12px; }
.ai-console { padding: 16px; background: #10131a; border-color: #10131a; color: #e8ebf0; border-radius: var(--r-xl); }
.sim-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.sim-stats span { display: block; font-size: 11px; color: #8b93a3; }
.sim-stats b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ai-console .up { color: #4cc38a; }
.ai-console .down { color: #f0686c; }
.sim-curve { width: 100%; height: 88px; display: block; color: #8b93a3; margin-bottom: 12px; }
.term { height: 232px; overflow-y: auto; background: #0a0c11; border-radius: 12px; padding: 8px 12px; font: 11.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #a8b0c0; scrollbar-width: thin; scrollbar-color: #2a303c transparent; }
.term .ln { white-space: normal; overflow-wrap: anywhere; animation: lnIn .25s var(--ease); }
.term .ln.dim { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #6c7588; }
.term .ts { color: #4c5466; margin-right: 8px; }
.term .sig { color: #8ab8ff; }
.term .exec { color: #e9cf7a; }
.term .win { color: #4cc38a; }
.term .loss { color: #f0686c; }
.term .model { color: #b8a6f0; }
.term .warn { color: #e9cf7a; }
@keyframes lnIn { from { opacity: 0; transform: translateY(4px); } }
.radar-row { gap: 12px; }
.rad-name { width: 104px; flex: none; }
.rad-bar { position: relative; flex: 1; height: 4px; background: var(--raised); border-radius: 2px; }
.rad-bar::after { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--line-2); }
.rad-bar i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.radar-row .badge { flex: none; min-width: 72px; text-align: center; }
.screen-title { font-size: 22px; font-weight: 500; letter-spacing: -.01em; padding: 4px 24px 0; }
.menu-row { margin-bottom: 8px; padding: 16px 20px; }

/* ================= Referrals ================= */
.ref-card { padding: 24px; }
.ref-code-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 16px; }
.ref-code { font-size: 30px; font-weight: 500; letter-spacing: .08em; font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ref-link { display: flex; align-items: center; gap: 8px; background: var(--raised); border-radius: var(--r-md); padding: 4px 4px 4px 14px; }
.ref-link span { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-levels { padding: 8px 20px; }
.ref-level { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ref-level:last-of-type { border-bottom: 0; }
.ref-level .lv { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); font-size: 13px; font-weight: 500; }
.ref-level:first-child .lv { background: var(--accent); color: #fff; }
.ref-level .t { display: grid; }
.ref-level .t small { color: var(--muted); font-size: 12.5px; }
.ref-level .p { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.invite-card { display: flex; align-items: center; gap: 16px; color: var(--text); padding: 16px 20px; transition: background-color .15s var(--ease); }
.invite-card:hover { background: var(--raised); }
.invite-card .ai-mark { background: var(--accent); }
