/* ==========================================================================
   Public site + auth styles
   One stylesheet, no framework. Tokens first, then layout, then components.
   ========================================================================== */

:root {
  --primary: #2b5ce6;
  --primary-600: #1f47c7;
  --primary-50: #eef3ff;
  --primary-100: #dce6ff;
  --ink: #0b1220;
  --ink-2: #1f2937;
  --muted: #667085;
  --line: #e6e8ee;
  --surface: #f1f3f6;
  --surface-2: #f8f9fb;
  --success: #12b76a;
  --success-ink: #067647;
  --danger: #d92d20;
  --warning: #f79009;

  /* Theme-aware surfaces (overridden in [data-theme="dark"] below) */
  --bg: #ffffff;
  --card: #ffffff;
  --header-bg: rgba(255, 255, 255, .86);
  --line-strong: #cfd4dd;
  --subtle: #98a2b3;
  --faint: #c3c8d4;
  --prose: #475467;
  --accent: #2b5ce6;
  --contrast: #0b1220;
  --contrast-hover: #1c2536;
  --success-50: #e7f8ef;
  --orb-glow: #ffffff;
  --alert-success-bg: #ecfdf3;
  --alert-success-line: #abefc6;
  --alert-error-bg: #fef3f2;
  --alert-error-line: #fecdca;
  --alert-error-ink: #b42318;
  --callout-bg: #fff8eb;
  --callout-line: #fde7c2;
  --callout-ink: #7a4b00;
  --callout-icon: #dc8a0e;
  color-scheme: light;

  --radius-xl: 40px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 16px 36px -14px rgba(16, 24, 40, .22);
  --shadow-lg: 0 50px 90px -30px rgba(31, 71, 199, .45);

  --font-display: "Questrial", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1200px;
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
}
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--contrast); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; }
.skip-link:focus { top: 12px; }
.text-primary { color: var(--accent); }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 44px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: 500 14px/1 var(--font-body);
  cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 22px -10px rgba(43, 92, 230, .7); }
.btn-primary:hover { background: var(--primary-600); transform: translateY(-1px); }
.btn-dark { background: var(--contrast); color: #fff; }
.btn-dark:hover { background: var(--contrast-hover); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: #eef3ff; }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); }
.btn-link { height: auto; padding: 0; color: var(--ink); font-weight: 500; }
.btn-link:hover { color: var(--accent); }
.btn-link:hover .icon { transform: translateX(3px); }
.btn-link .icon { transition: transform .2s; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 17px/1 var(--font-body); color: var(--ink); letter-spacing: -.01em; }
.brand-mark { width: 28px; height: 28px; color: var(--accent); }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 14px; color: var(--ink-2); opacity: .78; transition: color .2s, opacity .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 22px; }
.nav-login { font-size: 14px; font-weight: 500; color: var(--ink); }
.nav-login:hover { color: var(--accent); }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.mobile-menu { border-top: 1px solid var(--line); background: var(--bg); padding: 12px 0 24px; }
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink); }
.mobile-menu .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }

/* ---------- Hero ---------- */
.hero { padding-top: 8px; }
.hero-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 32px;
  min-height: 580px; padding: 72px 64px;
  background: var(--surface); border-radius: var(--radius-xl);
}
.hero h1 { font-size: clamp(40px, 5.3vw, 64px); line-height: 1.08; margin-bottom: 22px; }
.hero h1 .accent { display: block; color: var(--accent); }
.hero .lead { max-width: 430px; color: var(--muted); font-size: 16px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; }
.checklist { list-style: none; padding: 0; margin: 26px 0 34px; display: grid; gap: 12px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--success); color: #fff; flex: none; }
.check .icon { width: 12px; height: 12px; stroke-width: 3; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 460px; }
.orb { position: absolute; border-radius: 50%; pointer-events: none; }
.orb-1 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(43, 92, 230, .22), transparent 65%); top: -40px; right: -60px; }
.orb-2 { width: 300px; height: 300px; background: radial-gradient(circle, var(--orb-glow), transparent 70%); bottom: -40px; left: 0; }
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(43, 92, 230, .14); pointer-events: none; }
.ring-1 { width: 380px; height: 380px; }
.ring-2 { width: 520px; height: 520px; border-style: dashed; border-color: rgba(43, 92, 230, .1); }

.float-card {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px;
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow-md);
  font-size: 12px; line-height: 1.3; color: var(--ink);
  animation: float 6s ease-in-out infinite;
}
.float-card strong { display: block; font-size: 13px; }
.float-card small { color: var(--muted); }
.float-card .badge { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-50); color: var(--accent); }
.float-card .badge.green { background: var(--success-50); color: var(--success-ink); }
.float-card.top { top: 40%; left: -12px; }
.float-card.bottom { bottom: 28px; right: -12px; animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Phone mockup ---------- */
.phone {
  position: relative; z-index: 2;
  width: 272px; aspect-ratio: 9 / 19;
  padding: 10px; border-radius: 48px;
  background: linear-gradient(145deg, #1d2433, #070b14);
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #2c3446;
  transform: rotate(-7deg);
}
.phone-screen {
  position: relative; height: 100%; overflow: hidden;
  padding: 46px 16px 16px; border-radius: 38px;
  background: var(--card); font-size: 11px; line-height: 1.35; color: var(--ink);
}
.phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 86px; height: 24px; border-radius: 20px; background: #070b14; }
.phone-top { display: flex; align-items: center; justify-content: space-between; }
.phone-user { display: flex; align-items: center; gap: 8px; }
.phone-user small { display: block; color: var(--muted); font-size: 9px; }
.phone-user strong { font-size: 11px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #fdba74, #f97316); color: #fff; font-weight: 700; font-size: 11px; }
.phone-bell { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.phone-bell .icon { width: 14px; height: 14px; }
.phone-balance { text-align: center; margin: 16px 0 4px; }
.phone-balance small { color: var(--muted); font-size: 10px; }
.phone-balance strong { display: block; font: 400 30px/1.2 var(--font-display); }
.phone-balance strong span { color: var(--faint); }
.pill-up { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--success-50); color: var(--success-ink); font-size: 10px; font-weight: 600; }
.phone-chart { margin: 6px -16px 0; }
.phone-chart svg { width: 100%; height: 92px; }
.phone-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 14px; }
.phone-actions span { display: flex; align-items: center; justify-content: center; gap: 4px; height: 32px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 600; }
.phone-actions .icon { width: 13px; height: 13px; }
.phone-actions .deposit { background: var(--primary); }
.phone-actions .withdraw { background: var(--contrast); }
.phone-list-title { font: 600 12px var(--font-body); margin-bottom: 4px; }
.asset { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.asset-logo { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; }
.asset-name { flex: 1; font-weight: 600; }
.asset-name small, .asset-val small { display: block; font-size: 9px; font-weight: 500; color: var(--muted); }
.asset-val { text-align: right; font-weight: 600; }
.asset-val small.up { color: var(--success-ink); }

/* ---------- Marquee strip ---------- */
.strip {
  margin-top: 20px; padding: 26px 0; overflow: hidden;
  background: var(--surface); border-radius: var(--radius-lg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.strip-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip ul { display: flex; gap: 56px; list-style: none; margin: 0; padding: 0 56px 0 0; }
.strip li { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 15px; color: var(--ink-2); }
.strip li .icon { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-tight { padding: 72px 0; }
.section-head { max-width: 660px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); }
.section-head p { color: var(--muted); font-size: 15px; margin: 0; }
.section-head.left { margin-inline: 0; text-align: left; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--primary-50); color: var(--accent);
  font: 500 13px/1.4 var(--font-body);
}
.band { background: var(--surface); border-radius: var(--radius-xl); padding: 96px 64px; }

/* Problem cards: 3 across, then 2 across */
.problem-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.problem-card {
  grid-column: span 2;
  display: flex; flex-direction: column; gap: 36px;
  min-height: 300px; padding: 32px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.problem-card:nth-child(n + 4) { grid-column: span 3; }
.problem-card:hover { border-color: var(--primary-100); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.problem-card h3 { font-size: 22px; margin: 0; }
.problem-card > .icon { width: 46px; height: 46px; color: var(--accent); stroke-width: 1.2; }
.problem-card p { margin: auto 0 0; max-width: 360px; color: var(--muted); font-size: 14.5px; }

/* Solution */
.feature-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; }
.feature-hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 480px; padding: 40px;
  border-radius: var(--radius-lg); color: #fff;
  background: radial-gradient(120% 80% at 100% 0%, #5b84ff 0%, transparent 55%), linear-gradient(160deg, #2b5ce6, #1938a8);
}
.feature-hero h3 { color: #fff; font-size: 32px; max-width: 420px; }
.feature-hero p { color: rgba(255, 255, 255, .8); max-width: 420px; }
.mini-dash {
  margin-top: auto; padding: 20px;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.mini-dash-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; font-size: 13px; color: rgba(255, 255, 255, .75); }
.mini-dash-head strong { font: 400 22px var(--font-display); color: #fff; }
.alloc { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 12px; font-size: 13px; padding: 6px 0; }
.alloc-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.alloc-bar span { display: block; height: 100%; border-radius: inherit; background: #fff; }
.alloc em { font-style: normal; text-align: right; color: rgba(255, 255, 255, .8); }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.feature-card {
  padding: 28px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: background-color .25s, box-shadow .25s;
}
.feature-card:hover, .feature-card.is-raised { background: var(--card); box-shadow: var(--shadow-md); }
.feature-card h3 { font-size: 19px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; }
.icon-badge { width: 48px; height: 48px; margin-bottom: 28px; border-radius: 14px; display: grid; place-items: center; background: var(--card); color: var(--accent); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.icon-badge .icon { width: 22px; height: 22px; }
.icon-badge.solid { background: var(--primary-50); border-color: transparent; box-shadow: none; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.step { position: relative; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.step-num { width: 42px; height: 42px; margin-bottom: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font: 400 15px var(--font-display); }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 48px; left: 84px; right: 20px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--primary-100) 0 6px, transparent 6px 12px);
}
.step h3 { font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split h2 { font-size: clamp(30px, 3.4vw, 42px); }
.split .lead { color: var(--muted); }
.tick-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.tick-list li { display: flex; gap: 12px; align-items: flex-start; }
.tick-list li .check { margin-top: 3px; }
.tick-list strong { display: block; color: var(--ink); font-weight: 600; }
.tick-list span.muted { font-size: 14px; }
.card-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.price-card {
  position: relative; display: flex; flex-direction: column;
  padding: 32px 26px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.price-card.is-featured { background: var(--contrast); border-color: var(--contrast); color: #cbd5e1; box-shadow: var(--shadow-lg); }
.price-card.is-featured h3, .price-card.is-featured .price { color: #fff; }
.price-card.is-featured .price-sub, .price-card.is-featured .price small { color: #98a2b3; }
.price-card.is-featured .price-features .icon { color: #8fb0ff; }
.price-badge { position: absolute; top: 22px; right: 20px; padding: 4px 10px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; }
.price-card h3 { font-size: 21px; margin-bottom: 6px; }
.price-sub { min-height: 44px; margin: 0; color: var(--muted); font-size: 13.5px; }
.price { margin: 22px 0 0; font: 400 34px/1.1 var(--font-display); color: var(--ink); }
.price small { display: block; margin-top: 6px; font: 500 13px var(--font-body); color: var(--muted); }
.price-features { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 12px; font-size: 14px; }
.price-features li { display: flex; gap: 10px; align-items: flex-start; }
.price-features .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.price-card .btn { margin-top: auto; }
.disclaimer { max-width: 760px; margin: 28px auto 0; text-align: center; color: var(--muted); font-size: 12.5px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { padding: 0 24px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: var(--primary-100); box-shadow: var(--shadow-sm); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; list-style: none; cursor: pointer; font-weight: 500; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--accent); transition: transform .25s; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { margin: 0; padding-bottom: 22px; color: var(--muted); font-size: 15px; }

/* CTA */
.cta {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.4fr auto; align-items: center; gap: 32px;
  padding: 72px 64px; border-radius: var(--radius-xl); color: #fff;
  background: radial-gradient(90% 120% at 100% 0%, #5b84ff, transparent 60%), var(--primary);
}
.cta::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; bottom: -220px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); pointer-events: none; }
.cta h2 { color: #fff; font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 10px; }
.cta p { margin: 0; color: rgba(255, 255, 255, .82); max-width: 560px; }
.cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; }

/* Inner page hero */
.page-hero { padding-top: 8px; }
.page-hero-card {
  position: relative; overflow: hidden;
  padding: 84px 64px; text-align: center;
  background: var(--surface); border-radius: var(--radius-xl);
}
.page-hero-card::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(43, 92, 230, .16), transparent 65%); pointer-events: none; }
.page-hero h1 { position: relative; max-width: 840px; margin: 0 auto 16px; font-size: clamp(36px, 4.6vw, 56px); }
.page-hero p { position: relative; max-width: 640px; margin: 0 auto; color: var(--muted); font-size: 16px; }
.breadcrumb { position: relative; display: flex; justify-content: center; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--faint); }
.breadcrumb a:hover { color: var(--accent); }

/* Generic card grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card {
  display: flex; flex-direction: column;
  padding: 30px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.service-card:hover { border-color: var(--primary-100); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.service-card h3 { font-size: 20px; }
.service-card p { color: var(--muted); font-size: 14.5px; }
.service-card .btn-link { margin-top: auto; font-size: 14px; }

.contact-card { padding: 30px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.contact-card h3 { font-size: 20px; margin-bottom: 6px; }
.contact-card p { color: var(--muted); font-size: 14px; }
.contact-card a.value, .contact-card .value { color: var(--ink); font-weight: 600; word-break: break-word; }
.contact-card a.value:hover { color: var(--accent); }

/* Markets widgets */
.widget-card { overflow: hidden; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.widget-card .tradingview-widget-container { min-height: 420px; }
.ticker-wrap { margin-top: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); }
.widget-fallback { padding: 24px; color: var(--muted); font-size: 14px; }

/* Legal / prose pages */
.prose-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); padding: 22px; border: 1px solid var(--line); border-radius: 20px; }
.toc h2 { margin: 0 0 12px; font: 600 12px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--accent); }
.prose { max-width: 780px; }
.prose h2 { margin: 52px 0 14px; font-size: 26px; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 28px 0 10px; font-size: 20px; }
.prose p, .prose li { color: var(--prose); line-height: 1.75; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose .meta { font-size: 14px; color: var(--muted); }
.prose .caps { font-size: 14px; letter-spacing: .01em; }
.callout { display: flex; gap: 14px; margin: 0 0 28px; padding: 20px 22px; border-radius: 20px; background: var(--callout-bg); border: 1px solid var(--callout-line); color: var(--callout-ink); font-size: 14.5px; }
.callout .icon { color: var(--callout-icon); margin-top: 2px; }
.callout p { margin: 0; color: inherit; }
.info-table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 15px; }
.info-table th, .info-table td { padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.info-table th { width: 40%; font-weight: 500; color: var(--muted); }
.info-table td { color: var(--ink); }

/* Invite page */
.invite { max-width: 560px; margin: 0 auto; text-align: center; padding: 56px 40px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.invite .avatar { width: 64px; height: 64px; margin: 0 auto 24px; font-size: 22px; }
.invite h1 { font-size: clamp(28px, 3.6vw, 38px); }
.invite p { color: var(--muted); }
.invite .btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 32px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-about p { max-width: 330px; margin: 16px 0 20px; color: var(--muted); font-size: 14px; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.footer-contact a:hover { color: var(--accent); }
.footer-col h2 { margin-bottom: 16px; font: 600 12px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: 14px; color: var(--muted); }
.footer-col a:hover { color: var(--accent); }
.risk-note { margin-top: 48px; padding: 18px 22px; border-radius: 16px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.risk-note strong { color: var(--ink-2); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 24px; font-size: 13px; color: var(--muted); }
.footer-bottom nav { display: flex; gap: 20px; }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- Forms & alerts ---------- */
.field { margin-bottom: 16px; }
.field > label, .field-label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-wrap { position: relative; }
.input-wrap > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--subtle); pointer-events: none; }
.input {
  width: 100%; height: 48px; padding: 0 14px 0 42px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  font-size: 15px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--subtle); }
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(43, 92, 230, .12); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-wrap.has-toggle .input { padding-right: 48px; }
select.input {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.toggle-pass { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 8px; border: 0; border-radius: 10px; background: none; color: var(--subtle); cursor: pointer; }
.toggle-pass:hover { color: var(--ink); }
.toggle-pass .icon { width: 18px; height: 18px; }
.field-error { display: block; margin-top: 6px; font-size: 12.5px; color: var(--danger); }
.field-hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.strength { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.strength span { height: 4px; border-radius: 4px; background: var(--line); transition: background-color .2s; }
.strength[data-level="1"] span:nth-child(1) { background: var(--danger); }
.strength[data-level="2"] span:nth-child(-n + 2) { background: var(--warning); }
.strength[data-level="3"] span { background: var(--success); }
.form-meta { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; font-size: 14px; }
.form-meta a, .auth-sub a, .checkbox a { color: var(--accent); font-weight: 500; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; font-size: 13.5px; color: var(--muted); }
.checkbox input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.recaptcha { margin: 4px 0 20px; min-height: 78px; }
.alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.alert .icon { width: 18px; height: 18px; margin-top: 1px; }
.alert-success { background: var(--alert-success-bg); border: 1px solid var(--alert-success-line); color: var(--success-ink); }
.alert-error { background: var(--alert-error-bg); border: 1px solid var(--alert-error-line); color: var(--alert-error-ink); }

/* ---------- Auth layout ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-main { display: flex; flex-direction: column; padding: 32px 48px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.auth-form { width: 100%; max-width: 430px; }
.auth-form h1 { font-size: 38px; margin-bottom: 8px; }
.auth-sub { margin-bottom: 28px; color: var(--muted); font-size: 15px; }
.auth-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.auth-foot a:hover { color: var(--accent); }
.auth-aside {
  position: sticky; top: 16px; height: calc(100vh - 32px); margin: 16px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: 56px; border-radius: var(--radius-xl); color: #fff;
  background: radial-gradient(100% 70% at 100% 0%, #5b84ff, transparent 60%), linear-gradient(160deg, #2b5ce6, #1938a8);
}
.auth-aside h2 { max-width: 440px; color: #fff; font-size: clamp(28px, 2.6vw, 38px); }
.auth-aside p { max-width: 420px; color: rgba(255, 255, 255, .8); }
.auth-aside .phone-stage { position: relative; flex: 1; display: grid; place-items: center; min-height: 0; }
.auth-aside .phone { width: 240px; transform: rotate(6deg); box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .5), inset 0 0 0 2px #2c3446; }
.auth-aside .ring { border-color: rgba(255, 255, 255, .18); }
.auth-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: rgba(255, 255, 255, .85); }
.auth-points li { display: flex; align-items: center; gap: 8px; }
.auth-points .icon { width: 16px; height: 16px; }

/* ---------- Dark theme ----------
   <html data-theme="dark"> is set before first paint (partials/theme_init).
   Only tokens change here, plus a few spots that need different treatment. */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0e17;
  --surface: #0f1521;
  --surface-2: #121927;
  --card: #151c2b;
  --header-bg: rgba(10, 14, 23, .82);
  --ink: #f2f4f8;
  --ink-2: #ccd3df;
  --muted: #95a0b4;
  --subtle: #6d788d;
  --faint: #4a5468;
  --prose: #b3bccb;
  --line: #222b3c;
  --line-strong: #354056;
  --accent: #84a5ff;
  --primary-50: #172242;
  --primary-100: #2a3d72;
  --contrast: #1b2540;
  --contrast-hover: #24304f;
  --success-ink: #4ade80;
  --success-50: #0f2b1e;
  --danger: #f97066;
  --orb-glow: rgba(132, 165, 255, .08);
  --alert-success-bg: #0f2b1e;
  --alert-success-line: #1d5236;
  --alert-error-bg: #2b1215;
  --alert-error-line: #5e242a;
  --alert-error-ink: #fca5a5;
  --callout-bg: #2a200c;
  --callout-line: #4f3b13;
  --callout-ink: #f6d28d;
  --callout-icon: #f5a524;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-md: 0 16px 36px -14px rgba(0, 0, 0, .65);
  --shadow-lg: 0 50px 90px -30px rgba(0, 0, 0, .75);
}
[data-theme="dark"] .price-card.is-featured { border-color: var(--primary); }
[data-theme="dark"] .phone-actions .withdraw { background: #2a3552; }
[data-theme="dark"] .ring { border-color: rgba(132, 165, 255, .16); }
[data-theme="dark"] select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d788d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
[data-theme="dark"] .g-recaptcha { filter: invert(.9) hue-rotate(180deg); }
[data-theme="dark"] .asset-logo { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
/* Chrome paints third-party iframes opaque white when their color-scheme differs from the page's; keep widgets transparent */
.tradingview-widget-container iframe { color-scheme: normal; }

/* Smooth colour change when the visitor flips the switch (class added for ~400ms by site.js) */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease !important;
}

/* Theme switch */
.theme-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  cursor: pointer; transition: border-color .2s, color .2s, transform .2s;
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--accent); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .icon-sun, [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.auth-top-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .pricing-grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .nav-links, .nav-actions .nav-login, .nav-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions { gap: 10px; }
  .hero-card { grid-template-columns: 1fr; padding: 56px 32px 24px; min-height: 0; }
  .hero-visual { min-height: 520px; }
  .problem-card, .problem-card:nth-child(n + 4) { grid-column: span 3; }
  .problem-card:last-child:nth-child(odd) { grid-column: span 6; }
  .feature-layout, .split, .cta, .prose-layout { grid-template-columns: 1fr; }
  .split { gap: 40px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .toc { position: static; }
  .band { padding: 72px 32px; }
  .cta { padding: 56px 36px; }
  .page-hero-card { padding: 64px 28px; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { padding: 24px; }
}

@media (max-width: 640px) {
  .section { padding: 80px 0; }
  .container { padding-inline: 16px; }
  .hero-card { padding: 44px 22px 16px; border-radius: 30px; }
  .hero-visual { min-height: 480px; }
  .ring-2 { display: none; }
  .float-card.top { left: -4px; }
  .float-card.bottom { display: none; }
  .phone { width: 240px; }
  .problem-grid { grid-template-columns: 1fr; }
  .problem-card, .problem-card:nth-child(n + 4), .problem-card:last-child:nth-child(odd) { grid-column: auto; min-height: 0; }
  .feature-grid, .card-grid-2, .pricing-grid, .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .feature-hero { padding: 28px; min-height: 0; }
  .alloc { grid-template-columns: 90px 1fr 36px; }
  .band { padding: 56px 20px; border-radius: 30px; }
  .cta { padding: 44px 24px; border-radius: 30px; }
  .page-hero-card { padding: 52px 20px; border-radius: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .auth-form h1 { font-size: 32px; }
  .invite { padding: 40px 22px; }
}
