/*
VOICE   a calm trading instrument: the number first, honest about losses, no hype
IDEA    a night-time trading desk: black glass, one violet light on what matters
PICTURE the balance on a violet glow, the running P&L line, the checklist on every token
COLOUR  true black, violet for actions, the key figure and the chart; green and red only for money moving, always with a sign
TYPE    the phone's own font (SF Pro on iPhone), 700 for figures, tabular numbers
LAYOUT  sidebar + 1180px content on desktop; floating tab bar and bottom sheets on phones
*/
:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0e0b14;
  --surface-2: #17121f;
  --surface-3: #201a2b;
  --line: #231c30;
  --line-strong: #342a46;
  --ink: #f5f3fa;
  --muted: #a39cb5;
  --faint: #6f6883;
  --accent: #7c3aed;
  --accent-hover: #8b5cf6;
  --accent-ink: #ffffff;
  --accent-soft: #a78bfa;
  --accent-bg: #1d1233;
  --series: #a78bfa;
  --good: #2fd88c;
  --good-bg: #0c2419;
  --bad: #ff5a7a;
  --bad-bg: #2a0f17;
  --warn: #ffc65c;
  --warn-bg: #2a200d;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: none;
  --nav-w: 232px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  letter-spacing: -.005em;
  font-variant-numeric: tabular-nums;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sprite { position: absolute; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1 { font-size: clamp(28px, 3vw, 34px); line-height: 1.1; margin: 0; letter-spacing: -.025em; font-weight: 700; }
h2 { font-size: 17px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
.nav {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.02em; padding: 4px 10px 18px; }
.brand-mark { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: var(--radius-sm); text-decoration: none; color: var(--muted); font-weight: 600;
}
.nav-link svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--accent-bg); color: var(--ink); }
.nav-link.active svg { stroke: var(--accent-soft); }
.nav-foot { margin-top: auto; padding: 12px; font-size: 12px; color: var(--faint); }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px clamp(16px, 3vw, 32px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand-small { display: none; padding: 0; }
.lookup { flex: 1; max-width: 560px; position: relative; }
.lookup svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.lookup input {
  width: 100%; min-height: 44px; padding: 0 14px 0 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); font-size: 15px;
}
.lookup input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.lookup input::placeholder { color: var(--faint); }
.live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live.on i { background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 2.4s infinite; }
.live.off i { background: var(--bad); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

#content { max-width: 1180px; margin: 0 auto; padding: clamp(18px, 3vw, 32px) clamp(16px, 3vw, 32px) 48px; }
.view { display: grid; gap: 18px; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; translate: 0 6px; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.toolbar .search { width: auto; flex: 0 1 260px; }

/* ---------- building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head.padded { padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.text-link { font-size: 14px; font-weight: 600; color: var(--accent-soft); text-decoration: none; }
.text-link:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface-2); font-weight: 600; white-space: nowrap;
  transition: transform .12s, background .15s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.btn.spinning svg { animation: spin .8s linear infinite; }

.input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); font-size: 16px; }
.input:focus { border-color: var(--accent); outline: none; background: var(--surface); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.segmented button { flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; font-size: 14px; color: var(--muted); }
.segmented button b { font-weight: 600; color: var(--faint); margin-left: 4px; }
.segmented button.active { background: var(--accent); color: #fff; }
.segmented button.active b { color: rgba(255, 255, 255, .7) !important; }
.segmented button.active b { color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pill.CANDIDATE, .pill.good { background: var(--good-bg); color: var(--good); }
.pill.RISKY, .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.AVOID, .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); vertical-align: 2px; margin-left: 6px; }
.tag.real { background: var(--accent); color: #fff; border-color: var(--accent); }

.up { color: var(--good); font-weight: 700; }
.down { color: var(--bad); font-weight: 700; }
.num { text-align: right; white-space: nowrap; }
.show-sm { display: none; }

.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; overflow: hidden; font-weight: 700; font-size: 13px; color: #0b0710; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 52px; height: 52px; font-size: 17px; }
.token-cell { display: flex; align-items: center; gap: 12px; }
.token-cell b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.token-cell small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty { padding: 26px 18px; text-align: center; color: var(--muted); font-size: 14px; }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; }
.hero-figure {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid #3a2566; color: var(--ink);
  border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px;
}
/* the one glow in the app: violet light behind the balance */
.hero-figure::before {
  content: ""; position: absolute; z-index: -1; inset: -40% -30% auto auto; width: 120%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(124, 58, 237, .55), rgba(124, 58, 237, .12) 55%, transparent 75%);
}
.hero-figure .label { font-weight: 600; font-size: 14px; color: var(--muted); }
.hero-figure .big { font-size: clamp(38px, 3.8vw, 52px); font-weight: 700; line-height: 1; letter-spacing: -.035em; white-space: nowrap; }
.hero-figure .big.up, .hero-figure .big.down { font-weight: 700; }
.hero-figure .sub { font-weight: 500; font-size: 14px; color: var(--muted); }
.hero-figure .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
.hero-figure .fact { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); border-radius: 14px; padding: 10px 12px; }
.hero-figure .fact small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.hero-figure .fact b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.progress { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); border-radius: 99px; }

.chart-card { display: flex; flex-direction: column; }
.fig { position: relative; flex: 1; min-height: 260px; }
.fig > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fig text { fill: var(--faint); font-size: 12px; font-family: inherit; }
.tip {
  position: absolute; pointer-events: none; z-index: 2; padding: 8px 10px; border-radius: 12px;
  background: var(--surface-3); border: 1px solid var(--line-strong); color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}
.tip b { font-weight: 800; }

.autopilot-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.autopilot-state { display: flex; align-items: center; gap: 12px; }
.autopilot-state .orb { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.autopilot-state .orb svg { width: 22px; height: 22px; fill: currentColor; }
.autopilot-state.on .orb { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 24px rgba(124, 58, 237, .45); }
.autopilot-state small { display: block; color: var(--muted); font-size: 13px; }
.rules { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.activity { list-style: none; margin: 10px 0 0; padding: 0; }
.activity li { display: grid; grid-template-columns: auto 10px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.activity time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.activity i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.activity i.buy { background: var(--accent-soft); }
.activity i.win { background: var(--good); }
.activity i.loss { background: var(--bad); }

.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 50px; height: 30px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: translate .2s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { translate: 20px 0; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent-soft); outline-offset: 2px; }

.pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.pick:first-child { border-top: 0; padding-top: 0; }
.pick-size { font-weight: 700; font-size: 15px; text-align: right; }
.pick-size small { display: block; font-weight: 600; font-size: 12px; color: var(--muted); }
.pick-actions { grid-column: 1 / -1; display: flex; gap: 8px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--faint); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th.num, .table td.num { text-align: right; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--surface-2); }
.scorebar { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.scorebar .track { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.scorebar .track i { display: block; height: 100%; border-radius: 99px; }
.scorebar b { font-size: 13px; width: 2.2em; text-align: right; }
.fill-CANDIDATE { background: var(--good); }
.fill-RISKY { background: var(--warn); }
.fill-AVOID { background: var(--bad); }

/* position range: stop loss ... take profit, with a marker for now */
.range { position: relative; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--bad-bg), var(--surface-2) 50%, var(--good-bg)); min-width: 120px; margin: 6px 0 4px; }
.range .zero { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--line-strong); }
.range .now { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; translate: -50% -50%; background: var(--accent-soft); border: 2px solid var(--surface); box-shadow: 0 0 10px rgba(167, 139, 250, .6); }
.range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }
.sell-now { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.kpi small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi b { display: block; font-size: 22px; font-weight: 700; margin-top: 2px; white-space: nowrap; letter-spacing: -.02em; }
.kpi > span { font-size: 12px; color: var(--muted); }
.kpi.accent { background: linear-gradient(160deg, #3b1d78, #1c1030 70%); color: var(--ink); border-color: #4a2d86; }
.kpi.accent small, .kpi.accent > span { color: #c9b8f5; }

.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 9em minmax(0, 1fr) 6em; gap: 10px; align-items: center; font-size: 14px; }
.bar-row .track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 99px; background: var(--series); }
.bar-row .num { font-weight: 600; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
fieldset.card { margin: 0; display: grid; gap: 14px; }
legend { float: left; width: 100%; font-weight: 650; font-size: 16px; padding: 0; margin-bottom: 2px; letter-spacing: -.01em; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.affix { position: relative; display: block; }
.affix .input { padding-right: 64px; }
.affix i { position: absolute; right: 12px; top: 50%; translate: 0 -50%; font-style: normal; font-size: 13px; font-weight: 700; color: var(--muted); }
.check-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.check-row small { display: block; color: var(--muted); font-size: 13px; }
.why { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.why summary { cursor: pointer; font-weight: 700; font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.why ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.why li { display: flex; justify-content: space-between; gap: 12px; }
.why li b { white-space: nowrap; }
.signal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.signal-row:first-of-type { border-top: 0; padding-top: 0; }
.signal-row small { display: block; color: var(--muted); font-size: 13px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.inline-form .input { flex: 1 1 160px; min-height: 40px; font-size: 14px; }
.wallet-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.wallet-row:first-child { border-top: 0; }
.wallet-row code { font-size: 12px; color: var(--muted); }
.report-text { white-space: pre-wrap; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); color: var(--muted); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; overflow-x: auto; }
.report-item + .report-item { margin-top: 10px; }
.report-item summary { cursor: pointer; font-weight: 700; font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.verdict-compare { display: grid; gap: 14px; }
.vc-row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr) minmax(0, 1fr) 5em; align-items: center; gap: 0; font-size: 14px; }
.vc-row .neg, .vc-row .pos { height: 14px; }
.vc-row .neg { display: flex; justify-content: flex-end; border-right: 2px solid var(--line-strong); }
.vc-row .neg i { height: 100%; background: var(--bad); border-radius: 99px 0 0 99px; }
.vc-row .pos i { display: block; height: 100%; background: var(--good); border-radius: 0 99px 99px 0; }
.tuner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.rule-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.whale { display: inline-flex; margin-top: 4px; padding: 2px 8px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-weight: 800; font-size: 12px; }
@media (max-width: 760px) { .tuner-grid { grid-template-columns: minmax(0, 1fr); } .vc-row { grid-template-columns: 6.5em minmax(0, 1fr) minmax(0, 1fr) 4.5em; } }
.settings-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.plain-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
.plain-list svg { width: 20px; height: 20px; fill: none; stroke: var(--good); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.plain-list li.warn svg { stroke: var(--warn); }
.danger-zone .btn { margin-top: 14px; }

/* ---------- drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(520px, 100vw);
  background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain;
  translate: 100% 0; transition: translate .28s cubic-bezier(.2, .8, .2, 1); visibility: hidden;
  padding: calc(18px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom));
}
.drawer.open { translate: 0 0; visibility: visible; }
.drawer:focus { outline: none; }
.drawer-close { position: sticky; top: 0; margin-left: auto; z-index: 2; }
#drawerBody { display: grid; gap: 16px; margin-top: -44px; }
.token-head { display: flex; align-items: center; gap: 14px; padding-right: 56px; }
.token-head h2 { font-size: 24px; line-height: 1.1; }
.token-head p { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verdict-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.gauge { width: 112px; height: 112px; position: relative; }
.gauge svg { width: 100%; height: 100%; rotate: -90deg; }
.gauge b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 32px; font-weight: 700; letter-spacing: -.03em; }
.gauge small { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.verdict-word { font-size: 13px; font-weight: 700; }
.verdict-word.CANDIDATE { color: var(--good); }
.verdict-word.RISKY { color: var(--warn); }
.verdict-word.AVOID { color: var(--bad); }
.verdict-card p { font-size: 15px; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.stat small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.stat b { font-size: 15px; white-space: nowrap; }
.moves { display: grid; gap: 8px; }
.move { display: grid; grid-template-columns: 3em minmax(0, 1fr) minmax(0, 1fr) 5.5em; align-items: center; gap: 0; font-size: 13px; }
.move > span:first-child { color: var(--muted); font-weight: 700; }
.move .neg, .move .pos { height: 10px; }
.move .neg { display: flex; justify-content: flex-end; border-right: 2px solid var(--line-strong); }
.move .neg i { height: 100%; background: var(--bad); border-radius: 99px 0 0 99px; }
.move .pos i { display: block; height: 100%; background: var(--good); border-radius: 0 99px 99px 0; }
.move .num { font-weight: 800; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.checks li:first-child { border-top: 0; padding-top: 0; }
.checks small { display: block; color: var(--muted); font-size: 13px; }
.mark { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; }
.mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mark.pass { background: var(--good-bg); color: var(--good); }
.mark.warn { background: var(--warn-bg); color: var(--warn); }
.mark.fail { background: var(--bad-bg); color: var(--bad); }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 14px; font-weight: 600; background: var(--surface-2); }
.links svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.advice { border-left: 4px solid var(--line-strong); }
.advice.paper { border-left-color: var(--accent-soft); }
.advice.real { border-left-color: var(--good); }
.advice.skip { border-left-color: var(--bad); }
.advice small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.advice .big { font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.trade-form { display: grid; gap: 12px; }
.trade-form .row { display: flex; gap: 8px; flex-wrap: wrap; }
.trade-form .affix { flex: 1 1 140px; }
.copy-mint { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); }
.copy-mint code { overflow-wrap: anywhere; font-size: 12px; }

/* ---------- login + toast ---------- */
.login { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login-card { width: min(380px, 100%); display: grid; gap: 14px; text-align: center; }
.login-icon { width: 52px; height: 52px; margin: 0 auto; fill: none; stroke: var(--accent-soft); stroke-width: 1.8; stroke-linecap: round; filter: drop-shadow(0 0 16px rgba(124, 58, 237, .6)); }
.login-card .input { text-align: center; font-size: 24px; letter-spacing: .35em; min-height: 56px; }
.error-text { color: var(--bad); font-weight: 700; min-height: 1.5em; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70; translate: -50% 20px;
  max-width: min(92vw, 460px); padding: 12px 16px; border-radius: 12px;
  background: var(--surface-3); border: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .6);
  opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .fig { min-height: 220px; }
  .table .hide-md { display: none; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  /* floating tab bar, like a native app */
  .nav {
    position: fixed; top: auto; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; height: auto;
    flex-direction: row; justify-content: space-around; gap: 0;
    padding: 6px; border-radius: 24px;
    border: 1px solid var(--line-strong);
    background: rgba(18, 14, 26, .82); backdrop-filter: saturate(1.6) blur(22px); -webkit-backdrop-filter: saturate(1.6) blur(22px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .7);
  }
  .nav .brand, .nav-foot { display: none; }
  .nav-link { flex: 1; flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 0; font-size: 10.5px; font-weight: 600; border-radius: 18px; }
  .nav-link svg { width: 22px; height: 22px; }
  .nav-link:hover { background: transparent; }
  .nav-link.active { background: var(--accent-bg); color: var(--ink); }
  .nav-link.active svg { stroke: var(--accent-soft); }
  .brand-small { display: flex; }
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); border-bottom-color: transparent; }
  .live span { display: none; }
  #content { padding: 14px 14px calc(104px + env(safe-area-inset-bottom)); }
  .view { gap: 14px; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; border-radius: 22px; }
  .card.flush { padding: 0; }
  .table .hide-sm { display: none; }
  .show-sm { display: block; font-size: 12px; margin-top: 2px; }
  .table th, .table td { padding: 11px 12px; }
  .stat { padding: 9px 10px; }
  .stat b { font-size: 14px; }
  .bar-row { grid-template-columns: 7em minmax(0, 1fr) 5.5em; }
  .hero-figure { padding: 20px 18px; border-radius: 24px; }
  .hero-figure .big { font-size: 46px; }
  .toolbar .search { flex: 1 1 100%; }
  .kpis { gap: 10px; }
  /* details open as a bottom sheet instead of sliding in from the side */
  .drawer {
    top: auto; left: 0; width: 100vw; max-height: 92dvh; border-left: 0;
    border-top: 1px solid var(--line-strong); border-radius: 26px 26px 0 0;
    translate: 0 100%; background: var(--surface);
    padding-top: 22px;
  }
  .drawer::before { content: ""; position: absolute; top: 8px; left: 50%; translate: -50% 0; width: 40px; height: 5px; border-radius: 99px; background: var(--line-strong); }
  .drawer .stat, .drawer .card { background: var(--surface-2); }
}
@media (max-width: 420px) {
  .kpi b { font-size: 19px; }
  .scorebar { min-width: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.kpi.accent .up, .kpi.accent .down { color: inherit; }
.vc-row.wide { grid-template-columns: 12em minmax(0, 1fr) minmax(0, 1fr) 4em; }
@media (max-width: 760px) { .vc-row.wide { grid-template-columns: 8.5em minmax(0, 1fr) minmax(0, 1fr) 3.8em; } }
.demo-banner { position: relative; z-index: 25; padding: 8px 16px; text-align: center; font-size: 13px; font-weight: 600; background: var(--accent-bg); color: #d9ccff; border-bottom: 1px solid #3a2566; }
.demo-banner a { color: inherit; }
