/* AUTOSIGNAL AI — dark violet fintech. Design tokens + components. */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0a0711;
  --bg-2: #0d0a16;
  --surface: #15101f;
  --surface-2: #1b1526;
  --line: rgba(139, 92, 246, 0.16);
  --line-strong: rgba(139, 92, 246, 0.32);
  --primary: #8b5cf6;
  --primary-hi: #a855f7;
  --primary-press: #7c3aed;
  --text: #f4f2f8;
  --muted: #9a90ab;
  --muted-2: #6f6683;
  --success: #34d399;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1400px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Layer 1 — still light pools: a cool indigo dawn up top, a warmer violet
   pool bottom-right where the eye lands last. No animation on purpose. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(46% 34% at 88% 2%, rgba(124, 58, 237, 0.22), transparent 70%),
    radial-gradient(40% 30% at 8% 0%, rgba(79, 70, 229, 0.16), transparent 72%),
    radial-gradient(58% 52% at 72% 104%, rgba(139, 92, 246, 0.26), transparent 72%),
    radial-gradient(38% 40% at 10% 96%, rgba(168, 85, 247, 0.12), transparent 70%),
    /* vignette to hold the corners */
    radial-gradient(125% 95% at 50% 40%, transparent 58%, rgba(3, 2, 7, 0.6) 100%),
    /* fine grain so the flat black reads as a surface */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='1'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.14'/></svg>");
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 160px 160px;
  pointer-events: none;
  z-index: 0;
}
/* Layer 2 — a faint blueprint grid that fades out toward the edges, a soft
   vignette to hold the corners, and fine grain so the flat black reads as a
   surface rather than emptiness. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.075) 1px, transparent 1px);
  background-size: 68px 68px, 68px 68px;
  /* keep the grid off the reading area: strongest at the top, gone by mid-page */
  -webkit-mask-image: radial-gradient(115% 80% at 50% 0%, #000 20%, rgba(0,0,0,.35) 55%, transparent 85%);
  mask-image: radial-gradient(115% 80% at 50% 0%, #000 20%, rgba(0,0,0,.35) 55%, transparent 85%);
  opacity: .9;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.stack { position: relative; z-index: 1; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 7, 17, 0.72);
  border-bottom: 1px solid var(--line);
}
.hdr .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 70px; position: relative; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: .01em; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--primary-hi), var(--primary-press));
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45);
}
.brand .mark svg { width: 19px; height: 19px; stroke: #fff; }
.brand .ai { color: var(--primary-hi); }
/* centred nav with icons */
nav.main {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; gap: 4px; padding: 4px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
nav.main a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 14px;
  transition: color .2s cubic-bezier(.4,0,.2,1), background .2s cubic-bezier(.4,0,.2,1), transform .2s;
}
nav.main a svg { opacity: .8; transition: opacity .2s, transform .2s; }
nav.main a:hover { color: var(--text); background: rgba(139,92,246,.08); }
nav.main a:hover svg { opacity: 1; transform: translateY(-1px); }
nav.main a.active { color: #fff; background: linear-gradient(150deg, rgba(168,85,247,.22), rgba(124,58,237,.28)); box-shadow: inset 0 0 0 1px var(--line-strong); }
nav.main a.active svg { opacity: 1; color: var(--primary-hi); }
.hdr-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* account chip (logged in) */
.acct-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500;
  transition: border-color .2s, background .2s, transform .15s;
}
.acct-chip:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.acct-chip .av {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(150deg, var(--primary-hi), var(--primary-press)); color: #fff; font-weight: 700; font-size: 13px;
}
.acct-chip .em { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* header CTA carries both a long and a short label; CSS picks one */
.hdr-cta .sm { display: none; }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  padding: 11px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; color: #fff;
  background: linear-gradient(150deg, var(--primary-hi), var(--primary-press));
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .25s, background .2s, border-color .2s, opacity .2s;
}
/* sheen sweep on hover */
.btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .55s cubic-bezier(.4,0,.2,1);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(124,58,237,.5), inset 0 1px 0 rgba(255,255,255,.22); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:focus-visible { outline: 2px solid var(--primary-hi); outline-offset: 2px; }
.btn.cta { padding: 12px 24px; font-size: 15px; border-radius: 12px; }
.btn.ghost { background: var(--surface); border-color: var(--line-strong); box-shadow: none; color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 8px 14px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn.up { background: linear-gradient(150deg, #34d399, #10b981); box-shadow: 0 8px 22px rgba(16,185,129,.3); }
.btn.down { background: linear-gradient(150deg, #fb7185, #ef4444); box-shadow: 0 8px 22px rgba(239,68,68,.3); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

/* ---------- generic ---------- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.muted { color: var(--muted); }
.eyebrow { color: var(--primary-hi); font-weight: 600; font-size: 13px; letter-spacing: .02em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill.on { background: rgba(139,92,246,.14); color: var(--primary-hi); border: 1px solid var(--line-strong); }
.pill.ok { background: rgba(52,211,153,.14); color: var(--success); }
.pill.no { background: rgba(248,113,113,.14); color: var(--danger); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---------- forms ---------- */
label.fld { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; font-weight: 500; }
input, select {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #0b0813; color: var(--text);
  font: inherit; font-size: 14.5px; outline: none; transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--primary); }
.err { color: var(--danger); font-size: 13px; margin-top: 10px; }
.ok { color: var(--success); }

/* ---------- view ---------- */
main { position: relative; z-index: 1; }
.view { max-width: var(--maxw); margin: 0 auto; padding: 26px 24px 70px; }
.view.narrow { max-width: 760px; }
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: 30px; }
.section-head p { color: var(--muted); margin: 8px 0 0; max-width: 60ch; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; padding-top: 18px; }
.hero h1 { font-size: clamp(46px, 6.4vw, 88px); letter-spacing: -0.025em; text-transform: uppercase; }
.hero h1 .ai { color: var(--primary-hi); display: block; }
.hero p.lead { color: var(--muted); font-size: 16.5px; max-width: 48ch; margin: 20px 0 26px; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn svg, .btn svg { vertical-align: -2px; }

/* metric tiles under the hero copy */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 34px; }
.stats .s {
  display: flex; align-items: center; gap: 11px; padding: 12px 13px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02);
  transition: border-color .25s, transform .25s cubic-bezier(.16,1,.3,1);
}
.stats .s:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.stats .s .si { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: rgba(139,92,246,.13); color: var(--primary-hi); }
.stats .s .n { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.1; }
.stats .s .l { color: var(--muted); font-size: 12px; margin-top: 1px; }

/* icon-framed feature cards */
.feat-card { display: flex; flex-direction: column; gap: 12px; }
.feat-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(139,92,246,.13); color: var(--primary-hi); border: 1px solid var(--line); }

/* browser card (right of hero) */
.browser { border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #1a1330, #0d0a18); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.browser .bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.browser .bar .d { width: 11px; height: 11px; border-radius: 50%; }
.browser .bar .url { margin-left: 10px; color: var(--muted-2); font-size: 13px; }
.browser .body { padding: 18px 20px 20px; }
.browser .body .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.pair-sel { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.03); font-size: 13px; font-weight: 600; color: var(--text); }
.pair-sel .cv { color: var(--muted); font-size: 11px; }
.payout { color: var(--muted); font-size: 13px; }
.payout b { color: var(--success); }
/* metric tiles inside the chart card */
.chart-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.chart-metrics > div { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.02); }
.chart-metrics .mi { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(139,92,246,.13); color: var(--primary-hi); }
.chart-metrics .l { color: var(--muted); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.chart-metrics .v { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-top: 1px; }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.kpi .v { font-family: var(--font-display); font-weight: 700; font-size: 28px; margin-top: 4px; }
.kpi .l { color: var(--muted); font-size: 13px; }

/* tariffs */
.tier { display: flex; flex-direction: column; gap: 14px; position: relative; }
.tier.feat { border-color: var(--line-strong); box-shadow: 0 0 0 1px var(--line-strong), 0 20px 50px rgba(124,58,237,.18); }
.tier .price { font-family: var(--font-display); font-weight: 700; font-size: 34px; }
.tier ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 9px; }
.tier li { color: var(--muted); font-size: 14px; padding-left: 24px; position: relative; }
.tier li::before { content: "✓"; position: absolute; left: 0; color: var(--primary-hi); font-weight: 700; }
.tier .tag { position: absolute; top: 16px; right: 16px; }

/* signals */
.sig-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.sig-row + .sig-row { margin-top: 10px; }
.sig-dir { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.sig-dir.call { color: var(--success); }
.sig-dir.put { color: var(--danger); }
.conf { height: 6px; border-radius: 4px; background: #241b33; overflow: hidden; width: 120px; }
.conf > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-hi)); }

/* seg control */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { background: transparent; color: var(--muted); border: 0; padding: 8px 16px; cursor: pointer; font: inherit; font-weight: 600; }
.seg button.active { background: var(--primary-press); color: #fff; }

/* modal */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(6,4,12,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; overscroll-behavior: contain; touch-action: none; }
.modal { width: 100%; max-width: 420px; }
/* segmented tabs (auth) */
.tabs { display: flex; gap: 3px; margin-bottom: 18px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.tabs button {
  flex: 1; background: transparent; border: 0; color: var(--muted); border-radius: 9px;
  padding: 10px 12px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px;
  transition: color .22s, background .22s, box-shadow .22s;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: #fff; background: linear-gradient(150deg, rgba(168,85,247,.28), rgba(124,58,237,.34)); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* footer */
.ftr { border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.ftr .wrap { padding: 26px 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- motion ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }

.view { animation: viewIn .4s cubic-bezier(.16,1,.3,1) both; }
/* staggered entrance for card grids */
.tier-grid > *, .grid > *, .kpi-row > * { animation: riseIn .5s cubic-bezier(.16,1,.3,1) both; }
.tier-grid > *:nth-child(2), .grid > *:nth-child(2), .kpi-row > *:nth-child(2) { animation-delay: .06s; }
.tier-grid > *:nth-child(3), .grid > *:nth-child(3), .kpi-row > *:nth-child(3) { animation-delay: .12s; }
.tier-grid > *:nth-child(4), .grid > *:nth-child(4), .kpi-row > *:nth-child(4) { animation-delay: .18s; }
.modal-bg { animation: fadeIn .22s ease both; }
.auth-split, .modal { animation: popIn .38s cubic-bezier(.16,1,.3,1) both; }
.card { transition: border-color .25s, transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s; }
.tier-card { transition: border-color .25s, transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s; }
.tier-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.pair, .chip, .cat-tabs button, .seg button, .btn.ghost { transition: all .2s cubic-bezier(.4,0,.2,1); }
.pair:hover, .chip:hover, .cat-tabs button:hover { transform: translateY(-1px); border-color: var(--line-strong); }
a { transition: color .2s; }

/* ---------- auth split ---------- */
.auth-split { width: 100%; max-width: 820px; display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; }
.auth-aside, .auth-form { flex: 1 1 0; min-width: 0; }
.auth-aside { padding: 32px 30px; background: linear-gradient(160deg, #241442, #140d24 60%, #0e0a17); border-right: 1px solid var(--line); }
.auth-aside h2 { font-family: var(--font-display); }
.auth-perks { display: grid; gap: 16px; }
.auth-perk { display: flex; gap: 12px; align-items: flex-start; }
.auth-perk .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(139,92,246,.16); color: var(--primary-hi); flex: none; }
.auth-perk strong { display: block; font-size: 14px; }
.auth-perk span span { font-size: 12.5px; }
.auth-form { padding: 30px; }
@media (max-width: 720px) { .auth-aside { display: none; } }

/* ---------- tier cards (tradzio-like) ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1050px) { .tier-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tier-grid { grid-template-columns: 1fr; } }
.tier-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg-2)); }
.tier-card.popular { border-color: var(--line-strong); box-shadow: 0 0 0 1px var(--line-strong), 0 24px 60px rgba(124,58,237,.22); }
.tier-badge { position: absolute; top: -10px; left: 20px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(150deg, var(--primary-hi), var(--primary-press)); }
.tier-top { display: flex; align-items: center; gap: 12px; }
.tier-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(139,92,246,.14); color: var(--primary-hi); }
.tier-card h3 { font-size: 20px; }
.tier-signal { color: var(--muted); font-size: 13px; }
.tier-tag { color: var(--muted); font-size: 13.5px; margin: 0; min-height: 40px; }
.tier-engine { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; align-items: center; gap: 6px; }
.tier-engine b { color: var(--text); }
.tier-dep { display: flex; align-items: baseline; gap: 7px; padding: 6px 0; }
.tier-dep .l { color: var(--muted); font-size: 12px; }
.tier-dep .amt { font-family: var(--font-display); font-weight: 700; font-size: 32px; }
.tier-dep .cur { color: var(--primary-hi); }
.tier-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier-stats div { background: #0b0813; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.tier-stats strong { font-family: var(--font-display); font-size: 16px; display: block; }
.tier-stats span { color: var(--muted); font-size: 11.5px; }
.tier-feats { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.tier-feats li { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.tier-feats .ic { color: var(--primary-hi); flex: none; margin-top: 1px; }
.a-teal .tier-ic, .a-teal .tier-dep .cur { color: #2dd4bf; }
.a-teal.popular { box-shadow: 0 0 0 1px rgba(45,212,191,.4), 0 24px 60px rgba(45,212,191,.16); border-color: rgba(45,212,191,.4); }
.a-teal .tier-badge { background: linear-gradient(150deg, #2dd4bf, #0d9488); }
.a-gold .tier-ic, .a-gold .tier-dep .cur, .a-gold .tier-feats .ic { color: #fbbf24; }
.a-slate .tier-ic, .a-slate .tier-dep .cur { color: #94a3b8; }

/* ---------- signals ---------- */
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-tabs button { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-weight: 500; }
.cat-tabs button.on { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.pair-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 560px) { .pair-grid { grid-template-columns: repeat(2, 1fr); } }
.pair { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0b0813; color: var(--text); cursor: pointer; font: inherit; text-align: left; }
.pair.on { border-color: var(--primary); background: rgba(139,92,246,.1); }
.pair-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #0b0813; flex: none; }
.pair-nm { display: block; font-size: 14px; font-weight: 600; }
.pair-mk { display: block; font-size: 11px; color: var(--muted); }
.exp-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-weight: 600; }
.chip.on { background: var(--primary-press); color: #fff; border-color: transparent; }
.sig-result { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 22px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); }
.sig-result.call { box-shadow: 0 16px 50px rgba(52,211,153,.12); }
.sig-result.put { box-shadow: 0 16px 50px rgba(248,113,113,.12); }
.sig-head { display: flex; align-items: center; gap: 12px; }
.sig-arrow { margin-left: auto; font-size: 24px; }
.sig-arrow.call, .sig-verdict.call { color: var(--success); }
.sig-arrow.put, .sig-verdict.put { color: var(--danger); }
.sig-verdict { font-family: var(--font-display); font-weight: 700; font-size: 26px; margin: 14px 0 12px; }
.conf-wrap { display: flex; align-items: center; gap: 12px; }
.conf-wrap .conf { flex: 1; height: 8px; }

/* ---------- calculator ---------- */
.calc-field { position: relative; }
.calc-hint { display: block; color: var(--muted-2); font-size: 11.5px; margin-top: 3px; }
.calc-tile { padding: 16px 18px; }
.calc-tile .l { font-size: 12.5px; }
.calc-tile .v { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin-top: 4px; }
.calc-steps { padding: 4px 0; overflow: hidden; }
.calc-steps-head, .calc-step { display: grid; grid-template-columns: 60px 1fr 1fr 1fr; gap: 8px; padding: 10px 18px; font-size: 13.5px; }
.calc-steps-head { color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.calc-step + .calc-step, .calc-step { border-top: 1px solid rgba(139,92,246,.07); }
.calc-step span:first-child { color: var(--muted); }

/* ---------- trading: level picker ---------- */
.lvl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1050px) { .lvl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lvl-grid { grid-template-columns: 1fr; } }
.lvl {
  position: relative; text-align: left; cursor: pointer; color: var(--text); font: inherit;
  padding: 22px 20px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .25s, box-shadow .3s;
}
.lvl:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: 0 22px 50px rgba(124,58,237,.2); }
.lvl-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(139,92,246,.14); color: var(--primary-hi); }
.lvl h3 { font-size: 19px; }
.lvl .risk { color: var(--muted); font-size: 13px; }
.lvl-params { display: grid; gap: 7px; margin-top: 2px; }
.lvl-params div { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); border-top: 1px solid rgba(139,92,246,.08); padding-top: 7px; }
.lvl-params b { color: var(--text); font-weight: 600; }
.lvl-go { margin-top: auto; font-weight: 600; color: var(--primary-hi); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.lvl.aggr .lvl-ic { background: rgba(251,113,133,.14); color: #fb7185; }
.lvl.aggr .lvl-go { color: #fb7185; }
.lvl.max .lvl-ic { background: rgba(239,68,68,.16); color: #ef4444; }
.lvl.max .lvl-go { color: #ef4444; }
.lvl.calm .lvl-ic { background: rgba(52,211,153,.14); color: var(--success); }
.lvl.calm .lvl-go { color: var(--success); }

/* ---------- trading: auto session ---------- */
.trade-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.trade-head h2 { font-size: 34px; }
.strategy-line { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.strategy-line b { color: var(--text); font-weight: 600; }
.strategy-line a { color: var(--primary-hi); font-weight: 600; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
@media (max-width: 900px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); }
.kpi-card .l { color: var(--muted); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.kpi-card .v { font-family: var(--font-display); font-weight: 700; font-size: 26px; margin-top: 5px; }
.trade-main { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
@media (max-width: 900px) { .trade-main { grid-template-columns: 1fr; } }
.session-card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--bg-2)); padding: 46px 26px; text-align: center; min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.session-ic { font-size: 30px; line-height: 1; color: var(--text); }
.session-ic.run { color: var(--success); animation: pulseDot 1.6s ease-in-out infinite; }
.session-title { font-family: var(--font-display); font-weight: 700; font-size: 25px; }
.session-pnl { font-family: var(--font-display); font-weight: 700; font-size: 34px; }
.session-pnl.up { color: var(--success); } .session-pnl.down { color: var(--danger); }
.session-note { color: var(--muted); font-size: 13.5px; max-width: 46ch; }
.cycle-dots { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; margin: 16px 0 4px; }
.cycle-dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a2137; transition: background .3s, transform .3s; }
.cycle-dots i.win { background: var(--success); }
.cycle-dots i.lose { background: var(--danger); }
.cycle-dots i.now { background: var(--primary-hi); transform: scale(1.25); animation: pulseDot 1.1s infinite; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--bg-2)); padding: 18px; }
.panel + .panel { margin-top: 14px; }
.panel h4 { font-family: var(--font-display); font-size: 16px; margin: 0 0 12px; }
.acct-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acct-opt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: #0b0813; color: var(--muted); cursor: pointer; font: inherit; font-weight: 600; transition: all .22s; }
.acct-opt:hover { color: var(--text); border-color: var(--line-strong); }
.acct-opt.on { color: #fff; border-color: var(--primary); background: rgba(139,92,246,.14); }
.acct-opt.on.real { border-color: #ef4444; background: rgba(239,68,68,.14); }
.amt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.amt-chip { padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line); background: #0b0813; color: var(--text); cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; transition: all .2s; }
.amt-chip:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.amt-chip.on { border-color: var(--primary); background: rgba(139,92,246,.16); }
.amt-chip.pct { font-size: 12.5px; padding: 7px 12px; color: var(--muted); }
.amt-row { display: flex; gap: 8px; margin-top: 10px; }
.amt-row input { flex: 1; }
.amt-picked { color: var(--muted); font-size: 13px; margin-top: 10px; }
.amt-picked b { color: var(--text); }
.real-mode .btn { background: linear-gradient(150deg, #f87171, #dc2626); box-shadow: 0 8px 22px rgba(220,38,38,.35), inset 0 1px 0 rgba(255,255,255,.18); }
.real-mode .btn:hover { box-shadow: 0 14px 34px rgba(220,38,38,.5), inset 0 1px 0 rgba(255,255,255,.22); }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--line-strong); background: rgba(139,92,246,.12); color: var(--primary-hi); }
.live-pill.real { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.12); color: #fb7185; }
.live-pill .dot { animation: pulseDot 1.5s infinite; }

/* ---------- profile ---------- */
.prof-head { display: flex; align-items: center; gap: 16px; }
.prof-av {
  width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #fff;
  background: linear-gradient(150deg, var(--primary-hi), var(--primary-press));
  box-shadow: 0 8px 24px rgba(124,58,237,.4);
}
.prof-email { font-size: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.prof-head .btn { margin-left: auto; flex: none; }

.notice { display: flex; gap: 13px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); margin-top: 20px; border: 1px solid var(--line); }
.notice .ni { flex: none; margin-top: 1px; }
.notice strong { display: block; font-size: 15px; }
.notice .muted { font-size: 13.5px; }
.notice.ok { border-color: rgba(52,211,153,.28); background: rgba(52,211,153,.07); }
.notice.ok .ni { color: var(--success); }
.notice.warn { border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.07); }
.notice.warn .ni { color: #fbbf24; }

.bal-tile { display: flex; flex-direction: column; gap: 8px; }
.bal-v { font-family: var(--font-display); font-weight: 700; font-size: 32px; }

.cur-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 900px) { .cur-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cur-grid { grid-template-columns: repeat(2, 1fr); } }
.cur-opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left;
  border-radius: 10px; border: 1px solid var(--line); background: #0b0813; color: var(--text);
  cursor: pointer; font: inherit; transition: all .2s;
}
.cur-opt:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.cur-opt.on { border-color: var(--primary); background: rgba(139,92,246,.14); }
.cur-opt .cs { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(139,92,246,.14); color: var(--primary-hi); font-weight: 700; font-size: 14px; }
.cur-opt .cc { display: block; font-size: 13.5px; font-weight: 600; }
.cur-opt .cn { display: block; font-size: 11.5px; color: var(--muted); }

.meth-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
@media (max-width: 900px) { .meth-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .meth-grid { grid-template-columns: 1fr; } }
.meth {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; text-align: left;
  border-radius: 11px; border: 1px solid var(--line); background: #0b0813; color: var(--text);
  cursor: pointer; font: inherit; transition: all .2s;
}
.meth:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.meth.on { border-color: var(--primary); background: rgba(139,92,246,.13); box-shadow: 0 0 0 1px var(--line-strong); }
.meth-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.meth-nm { display: block; font-size: 13.5px; font-weight: 600; }
.meth-gr { display: block; font-size: 11.5px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }
.step { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; color: var(--muted); }
.step .sn { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: rgba(139,92,246,.16); color: var(--primary-hi); font-weight: 700; font-size: 12.5px; }
.meth.more { justify-content: center; color: var(--primary-hi); font-weight: 600; font-size: 13px; }
.dep-link { color: var(--primary-hi); font-weight: 600; }

/* ---------- wallet: two actions in the profile ---------- */
.wallet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .wallet-actions { grid-template-columns: 1fr; } }
.wallet-btn {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; text-align: left;
  border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg-2));
  color: var(--text); cursor: pointer; font: inherit;
  transition: transform .25s cubic-bezier(.16,1,.3,1), border-color .25s, box-shadow .25s;
}
.wallet-btn:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 18px 44px rgba(124,58,237,.2); }
.wallet-btn .wi { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(139,92,246,.14); color: var(--primary-hi); }
.wallet-btn.out .wi { background: rgba(52,211,153,.13); color: var(--success); }
.wallet-btn strong { display: block; font-size: 16px; font-family: var(--font-display); }
.wallet-btn span { color: var(--muted); font-size: 13px; }

/* ---------- payment modal ---------- */
.pay { position: relative; width: 100%; max-width: 940px; display: flex; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; max-height: 88vh; }
.pay-x {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); cursor: pointer;
  font-size: 18px; line-height: 1; display: grid; place-items: center; transition: all .2s;
}
.pay-x:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.pay-cats { width: 122px; flex: none; border-right: 1px solid var(--line); background: linear-gradient(180deg, #1a1330, #100b1c); padding: 10px 0; overflow-y: auto; }
.pay-cat {
  position: relative; width: 100%; display: grid; justify-items: center; gap: 6px; padding: 14px 6px;
  background: transparent; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 11px;
  font-weight: 600; letter-spacing: .03em; text-transform: uppercase; transition: color .2s, background .2s;
}
.pay-cat:hover { color: var(--text); background: rgba(139,92,246,.07); }
.pay-cat.on { color: #fff; background: rgba(139,92,246,.14); }
.pay-cat.on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary-hi); }
.pay-main { flex: 1; min-width: 0; padding: 22px 24px; overflow-y: auto; }
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.pay-head h3 { font-size: 20px; }
.pay-cur { width: auto; min-width: 104px; padding: 8px 12px; font-weight: 600; }
.pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 780px) { .pay-grid { grid-template-columns: repeat(2, 1fr); } .pay-cats { width: 96px; } }
.pay-m {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-height: 104px; padding: 12px; text-align: left; cursor: pointer; font: inherit; color: var(--text);
  border-radius: 12px; border: 1px solid var(--line); background: #0b0813; transition: all .2s;
}
.pay-m:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pay-m.on { border-color: var(--primary); background: rgba(139,92,246,.13); box-shadow: 0 0 0 1px var(--line-strong); }
.pay-m .mlogo { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; }
.mlogo.img { background: rgba(255,255,255,.06); padding: 4px; }
.mlogo.img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pay-m .mname { font-size: 13px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pay-m .mgrp { font-size: 11px; color: var(--muted); }
.pay-note { color: var(--muted); font-size: 12.5px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 700px) { .pay-row { grid-template-columns: 1fr; } }
.pay-lbl { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.pay-lbl span { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.pay-lbl span.bonus { color: var(--success); }
.pay-credit { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.pay-credit b { color: var(--text); font-family: var(--font-display); }
.pay-foot { color: var(--muted-2); font-size: 12px; margin: 12px 0 0; }
.pay-err { color: var(--danger); font-size: 13px; margin-top: 10px; }

/* ---------- risk consent checkbox ---------- */
.agree { display: flex; gap: 11px; align-items: flex-start; margin-top: 16px; cursor: pointer; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.agree input { position: absolute; opacity: 0; width: 0; height: 0; }
.agree .box {
  width: 20px; height: 20px; flex: none; border-radius: 6px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: #0b0813; color: transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.agree:hover .box { border-color: var(--primary); }
.agree input:checked + .box { background: linear-gradient(150deg, var(--primary-hi), var(--primary-press)); border-color: transparent; color: #fff; }
.agree input:focus-visible + .box { outline: 2px solid var(--primary-hi); outline-offset: 2px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  display: flex; align-items: center; gap: 10px; max-width: 92vw;
  padding: 13px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text);
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
  transform: translate(-50%, 16px); opacity: 0;
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .3s;
}
.toast.in { transform: translate(-50%, 0); opacity: 1; }
.toast .ti { display: grid; place-items: center; color: var(--primary-hi); flex: none; }
.toast.warn { border-color: rgba(251,191,36,.4); }
.toast.warn .ti { color: #fbbf24; }

/* ---------- FAQ accordion ---------- */
.faq { display: grid; gap: 10px; }
.faq-item {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  transition: border-color .25s, box-shadow .25s;
}
.faq-item:hover { border-color: var(--line-strong); }
.faq-item.open { border-color: var(--line-strong); box-shadow: 0 14px 40px rgba(124,58,237,.14); }
.faq-q {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  background: transparent; border: 0; cursor: pointer; color: var(--text);
  font: inherit; font-size: 15.5px; font-weight: 600; text-align: left;
}
.faq-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: rgba(139,92,246,.14); color: var(--primary-hi);
}
.faq-item.t-ok .faq-mark { background: rgba(52,211,153,.14); color: var(--success); }
.faq-item.t-warn .faq-mark { background: rgba(251,191,36,.14); color: #fbbf24; }
.faq-t { flex: 1; }
.faq-chev { color: var(--muted); display: grid; place-items: center; transform: rotate(90deg); transition: transform .3s cubic-bezier(.16,1,.3,1), color .2s; }
.faq-item.open .faq-chev { transform: rotate(-90deg); color: var(--primary-hi); }
.faq-a {
  display: grid; grid-template-rows: 0fr; overflow: hidden;
  transition: grid-template-rows .32s cubic-bezier(.16,1,.3,1);
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > p {
  overflow: hidden; margin: 0; padding: 0 18px 0 60px; color: var(--muted); font-size: 14.5px; line-height: 1.6;
  transition: padding .32s cubic-bezier(.16,1,.3,1);
}
.faq-item.open .faq-a > p { padding-bottom: 18px; }
@media (max-width: 560px) { .faq-a > p { padding-left: 18px; } }

.plan-pill {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: var(--primary-hi); border: 1px solid var(--line-strong); background: rgba(139,92,246,.1);
}

/* ---------- plan cards (auto-trading tariffs) ---------- */
.tier2-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; padding-top: 12px; }
@media (max-width: 1150px) { .tier2-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .tier2-grid { grid-template-columns: 1fr; } }
.tier2 {
  --ac: #6b8afd; --ac2: #3b5bdb;
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 24px 22px 20px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)), #0c0912;
  transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .3s;
}
.tier2:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--ac) 45%, transparent); box-shadow: 0 26px 60px color-mix(in srgb, var(--ac) 16%, transparent); }
.tier2.a-blue { --ac: #6b8afd; --ac2: #3b5bdb; }
.tier2.a-violet { --ac: #b168f8; --ac2: #7c3aed; }
.tier2.a-emerald { --ac: #34d399; --ac2: #059669; }
.tier2.a-gold { --ac: #f0b90b; --ac2: #b45309; }
.tier2.popular { border-color: color-mix(in srgb, var(--ac) 50%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ac) 30%, transparent), 0 26px 70px color-mix(in srgb, var(--ac) 16%, transparent); }
.t2-top {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--ac);
  background: #0c0912; border: 1px solid color-mix(in srgb, var(--ac) 55%, transparent);
}
.t2-badge {
  position: absolute; top: 18px; right: 18px; padding: 3px 9px; border-radius: 6px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .08em; color: var(--ac);
  border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent);
  background: color-mix(in srgb, var(--ac) 12%, transparent);
}
.t2-head { display: flex; align-items: center; gap: 14px; padding-right: 76px; }
.t2-ic {
  width: 52px; height: 52px; border-radius: 13px; flex: none; display: grid; place-items: center;
  color: var(--ac); background: color-mix(in srgb, var(--ac) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ac) 28%, transparent);
}
.tier2 h3 { font-size: 19px; letter-spacing: -.01em; }
.t2-ai { color: var(--ac); font-size: 13.5px; font-weight: 600; letter-spacing: .02em; }
.t2-engine { color: var(--muted-2); font-size: 12.5px; margin-top: -8px; }
.t2-dep { margin-top: 2px; }
.t2-dep .l { display: block; color: var(--muted); font-size: 13px; }
.t2-amt { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1.1; }
.t2-amt i { color: var(--ac); font-style: normal; font-size: 26px; margin-right: 6px; }
.t2-stat {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02);
  font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--muted); text-transform: uppercase;
}
.t2-stat .si { color: var(--ac); display: grid; place-items: center; }
.t2-stat b { color: var(--ac); font-size: 13.5px; }
.t2-feats { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; flex: 1; }
.t2-feats li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: #d6cfe4; line-height: 1.35; }
.t2-feats .ic { color: var(--ac); flex: none; margin-top: 1px; }
.t2-assets { padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.t2-assets .l { display: block; color: var(--muted); font-size: 13px; }
.t2-assets b { font-size: 14px; font-weight: 600; line-height: 1.35; display: block; }
.t2-cta {
  position: relative; overflow: hidden; width: 100%; padding: 14px; border-radius: 11px; border: 0;
  cursor: pointer; color: #fff; font: inherit; font-weight: 700; font-size: 15px; letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(150deg, var(--ac), var(--ac2));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--ac) 32%, transparent), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
}
.tier2.a-gold .t2-cta { color: #201400; }
.t2-cta::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.3) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .55s cubic-bezier(.4,0,.2,1);
}
.t2-cta:hover::after { transform: translateX(120%); }
.t2-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px color-mix(in srgb, var(--ac) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.24); }
.t2-foot { text-align: center; color: var(--muted-2); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.tier2.a-gold .t2-foot { color: color-mix(in srgb, var(--ac) 75%, #9a90ab); }

/* hero chart: pair tabs + taller live canvas */
.hero-pairs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.hero-pair {
  padding: 6px 11px; border-radius: 8px; border: 0; background: transparent; color: var(--muted);
  cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; transition: all .2s;
}
.hero-pair:hover { color: var(--text); }
.hero-pair.on { color: #fff; background: linear-gradient(150deg, rgba(168,85,247,.3), rgba(124,58,237,.36)); box-shadow: inset 0 0 0 1px var(--line-strong); }
.hero-chart { height: 260px; margin-top: 4px; }
.hero-chart svg { width: 100%; height: 260px; display: block; }
.browser .body .top { flex-wrap: wrap; }

.back-btn {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer;
  transition: color .2s, border-color .2s, transform .2s, background .2s;
}
.back-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); transform: translateX(-2px); }

/* ---------- live broker chart (inside the session card) ---------- */
.lc-wrap { width: 100%; margin: 14px 0 6px; }
.live-chart { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); overflow: hidden; }
.lc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lc-sym { font-weight: 600; font-size: 13.5px; }
.lc-price { font-family: var(--font-display); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.lc-price.up { color: var(--success); } .lc-price.down { color: var(--danger); }
.lc-body { height: 260px; }
.lc-body svg { width: 100%; height: 260px; display: block; }
.lc-empty { height: 260px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.lc-tfs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.lc-tf {
  border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit;
  font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 6px; transition: all .18s;
}
.lc-tf:hover { color: var(--text); }
.lc-tf.on { color: #fff; background: linear-gradient(150deg, rgba(168,85,247,.32), rgba(124,58,237,.38)); box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (max-width: 560px) { .lc-tf { padding: 4px 7px; font-size: 11px; } }

.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 16px; } .mt2 { margin-top: 26px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; }
.dl dt { color: var(--muted); }

/* ==========================================================================
   MOBILE — layout
   The desktop grid blows out on narrow screens because grid/flex children
   default to min-width:auto (min-content). Pin them to 0 first; everything
   below then actually obeys the column count it is given.
   ========================================================================== */
.hero > *, .trade-main > *, .grid > *, .kpi-row > *, .tier-grid > *, .lvl-grid > * { min-width: 0; }
.browser, .browser * { min-width: 0; }

/* bottom tab bar — the mobile replacement for the centred header nav */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  grid-template-columns: repeat(5, 1fr); gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(11, 8, 19, .88);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .45);
}
.tabbar a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px 6px; border-radius: 12px; min-height: 52px; justify-content: center;
  color: var(--muted-2); font-size: 10px; font-weight: 600; letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent; overflow: hidden;
  transition: color .22s cubic-bezier(.4, 0, .2, 1);
}
.tabbar a svg { width: 21px; height: 21px; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.tabbar a::before {
  content: ""; position: absolute; inset: 4px 6px; border-radius: 11px; opacity: 0;
  background: linear-gradient(150deg, rgba(168, 85, 247, .2), rgba(124, 58, 237, .26));
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transform: scale(.82); transition: opacity .26s, transform .32s cubic-bezier(.34, 1.56, .64, 1);
}
.tabbar a.active { color: var(--primary-hi); }
.tabbar a.active::before { opacity: 1; transform: scale(1); }
.tabbar a.active svg { animation: tabPop .42s cubic-bezier(.34, 1.56, .64, 1); }
/* Lift the icon and label above the active pill. The .ripple exclusion is
   load-bearing: the tap ripple is itself a <span> child, and any selector
   here (even `> *`) outranks `.ripple{position:absolute}` — which drops the
   ripple into the flow as a ~74px block and doubles the bar height for the
   600ms it lives. That was the tab bar "jumping" on every tap. */
.tabbar a > svg, .tabbar a > span:not(.ripple) { position: relative; }
.tabbar a:active svg { transform: scale(.88); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 6px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  nav.main { display: none; }
  .tabbar { display: grid; }
  /* keep the last row of every page clear of the fixed tab bar */
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }

  .wrap { padding: 0 16px; }
  .hdr .wrap { height: 58px; gap: 10px; }
  .brand { font-size: 16.5px; gap: 9px; }
  .brand .mark { width: 30px; height: 30px; border-radius: 8px; }
  .brand .mark svg { width: 17px; height: 17px; }
  .acct-chip { padding: 5px 12px 5px 5px; font-size: 13px; }
  .acct-chip .av { width: 27px; height: 27px; font-size: 12px; }
  .acct-chip .em { max-width: 96px; }
  /* the header CTA carries a short label on small screens */
  .hdr-cta .lg { display: none; }
  .hdr-cta .sm { display: inline; }
  .btn.cta { padding: 10px 16px; font-size: 14px; }

  .view { padding: 20px 16px 34px; }
  .view.narrow { padding-left: 16px; padding-right: 16px; }
  .section-head { margin-bottom: 18px; }
  .section-head h2 { font-size: 26px; }
  .section-head p { font-size: 14px; }

  .hero h1 { font-size: clamp(38px, 12.5vw, 58px); }
  .hero p.lead { font-size: 15.5px; margin: 16px 0 22px; max-width: none; }
  .hero .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  /* three metric tiles side by side are unreadable under ~700px — stack them */
  .stats { grid-template-columns: 1fr; gap: 8px; margin-top: 26px; }
  .stats .s { padding: 11px 12px; }

  .browser { border-radius: 15px; }
  .browser .body { padding: 14px 14px 16px; }
  .browser .body .top { flex-wrap: wrap; gap: 8px; }
  .browser .body .top .row { gap: 8px !important; }
  .chart-metrics { gap: 7px; }
  .chart-metrics > div { flex-direction: column; align-items: flex-start; gap: 6px; padding: 9px 10px; }
  .chart-metrics .mi { width: 26px; height: 26px; }
  .chart-metrics .l { font-size: 9px; letter-spacing: .04em; }
  .chart-metrics .v { font-size: 15px; }

  /* trading */
  .trade-head h2 { font-size: 27px; }
  .kpi-row { gap: 10px; margin-top: 18px; }
  .kpi-card { padding: 13px 14px; }
  .kpi-card .v { font-size: 21px; }
  .kpi-card .l { font-size: 10px; }
  .trade-main { gap: 12px; margin-top: 14px; }
  .session-card { padding: 26px 16px; min-height: 0; }
  .session-title { font-size: 21px; }
  .session-pnl { font-size: 29px; }
  .session-note { font-size: 13px; }
  .panel { padding: 15px; }
  .lc-body, .lc-body svg, .lc-empty { height: 150px; }

  /* profile */
  .prof-head { flex-wrap: wrap; gap: 12px; }
  .prof-av { width: 46px; height: 46px; font-size: 19px; }
  .prof-email { font-size: 19px; }
  .prof-head .btn { margin-left: auto; }
  .bal-v { font-size: 27px; }
  .notice { padding: 14px 15px; }

  /* tariffs */
  .tier-card { padding: 20px 17px; }
  .tier-dep .amt { font-size: 28px; }
  .tier-tag { min-height: 0; }

  /* calculator — 4 result tiles read better two-up than stacked */
  .calc-tile { padding: 13px 14px; }
  .calc-tile .v { font-size: 20px; }
  .calc-steps-head, .calc-step { grid-template-columns: 46px 1fr 1fr 1fr; gap: 6px; padding: 9px 12px; font-size: 12.5px; }

  .ftr .wrap { padding: 22px 16px; flex-direction: column; gap: 6px; }
}

/* two-up result tiles on phones (overrides the .g2 → 1fr stack above) */
@media (max-width: 900px) and (min-width: 380px) {
  .calc-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
}

@media (max-width: 430px) {
  /* avatar-only account chip — the address never fits and truncates to noise */
  .acct-chip { padding: 4px; border-radius: 50%; }
  .acct-chip .em { display: none; }
  .tabbar a { font-size: 9.5px; }
  .hero .cta-row { gap: 9px; }
}

/* iOS zooms the whole page when a focused input is under 16px */
@media (max-width: 900px) {
  input, select, textarea { font-size: 16px; }
  /* comfortable thumb targets */
  .chip, .amt-chip, .cat-tabs button, .acct-opt, .seg button, .tabs button { min-height: 42px; }
  .amt-chip { padding: 10px 15px; }
  .btn { padding: 12px 20px; }
  .btn.sm { padding: 9px 14px; }
}

/* auth modal becomes a bottom sheet on phones */
@media (max-width: 720px) {
  .modal-bg { place-items: end center; padding: 0; }
  .auth-split, .modal {
    max-width: none; border-radius: 20px 20px 0 0; border-bottom: 0;
    animation: sheetUp .4s cubic-bezier(.16, 1, .3, 1) both;
    max-height: 92vh; overflow-y: auto;
    /* the sheet scrolls itself, but must not hand the gesture to the page */
    overscroll-behavior: contain; touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .auth-form { padding: 28px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
  /* grab handle so the sheet reads as dismissible. It must be absolutely
     positioned — .auth-split is a flex row, and a static ::before would
     become a flex item and shove the form sideways. */
  .auth-split, .modal { position: relative; }
  .auth-split::before, .modal::before {
    content: ""; position: absolute; z-index: 2; top: 9px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; border-radius: 3px; background: var(--line-strong);
  }
  .modal > .card { padding-top: 28px; }
}

/* ==========================================================================
   MOTION — scroll reveal, taps, counters, chart draw-in
   ========================================================================== */
@keyframes tabPop { 0% { transform: scale(1); } 45% { transform: scale(1.22) translateY(-2px); } 100% { transform: scale(1); } }
@keyframes sheetUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes rippleOut { to { transform: scale(2.6); opacity: 0; } }
@keyframes drawLine { from { stroke-dashoffset: var(--dash, 1200); } to { stroke-dashoffset: 0; } }
@keyframes areaFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { to { background-position: 200% 0; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes glowBreathe {
  0%, 100% { box-shadow: 0 0 0 1px var(--line), 0 0 0 rgba(139, 92, 246, 0); }
  50% { box-shadow: 0 0 0 1px var(--line-strong), 0 0 34px rgba(139, 92, 246, .28); }
}
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* scroll reveal — applied by JS only to elements that start below the fold,
   so above-the-fold content keeps its immediate entrance stagger */
.reveal { opacity: 0; transform: translateY(22px); will-change: opacity, transform; }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1);
}

/* extend the entrance stagger past the 4 items it used to cover */
.tier-grid > *:nth-child(5), .grid > *:nth-child(5), .kpi-row > *:nth-child(5), .lvl-grid > *:nth-child(5) { animation-delay: .24s; }
.tier-grid > *:nth-child(6), .grid > *:nth-child(6), .lvl-grid > *:nth-child(6) { animation-delay: .3s; }
.grid > *:nth-child(7) { animation-delay: .36s; }
.grid > *:nth-child(8) { animation-delay: .42s; }
.lvl-grid > * { animation: riseIn .5s cubic-bezier(.16, 1, .3, 1) both; }
.lvl-grid > *:nth-child(2) { animation-delay: .07s; }
.lvl-grid > *:nth-child(3) { animation-delay: .14s; }
.lvl-grid > *:nth-child(4) { animation-delay: .21s; }

/* tap ripple (touch feedback where :hover does not exist) */
.ripple-host { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 70%);
  transform: scale(0); animation: rippleOut .55s cubic-bezier(.4, 0, .2, 1) forwards;
}

/* chart line draws itself in */
.draw-line { stroke-dasharray: var(--dash, 1200); animation: drawLine 1.1s cubic-bezier(.4, 0, .2, 1) both; }
.draw-area { animation: areaFade .9s ease .35s both; }

/* the brand mark drifts a little so the header is not dead still */
.brand:active .mark { transform: scale(.94); }

/* a live session breathes */
.session-card.running { animation: glowBreathe 2.8s ease-in-out infinite; }

/* confidence / progress bars grow from the left */
.conf > i { transform-origin: left center; animation: barGrow .8s cubic-bezier(.16, 1, .3, 1) both; }

/* skeleton shimmer for values still loading */
.sk {
  color: transparent !important; border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(139, 92, 246, .16) 50%, rgba(255, 255, 255, .04) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}

/* pressed states — phones have no hover, so give every control a push-down */
@media (hover: none) {
  .btn:active { transform: scale(.97); }
  .card:active, .tier-card:active, .lvl:active, .meth:active, .cur-opt:active, .pair:active { transform: scale(.985); }
  .lvl:hover, .tier-card:hover, .meth:hover, .cur-opt:hover, .stats .s:hover, .amt-chip:hover { transform: none; }
  .btn:hover { transform: none; box-shadow: 0 8px 22px rgba(124, 58, 237, .35), inset 0 1px 0 rgba(255, 255, 255, .18); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
