:root {
  color-scheme: dark;
  --bg: #050914;
  --panel: #10172a;
  --panel-soft: #141d33;
  --input: #0b1120;
  --border: #28344d;
  --border-bright: #3a4b6b;
  --text: #f6f7fb;
  --muted: #97a2bb;
  --subtle: #6f7b96;
  --accent: #22c55e;
  --accent-bright: #4ade80;
  --blue: #5b9cff;
  --green: #42d7a5;
  --danger: #ff7a86;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 58% 38%, #17223f55, transparent 45%),
    radial-gradient(circle at 12% 72%, #10304c3d, transparent 34%),
    var(--bg);
}
body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .2;
  background-image: linear-gradient(#25304c17 1px, transparent 1px), linear-gradient(90deg, #25304c17 1px, transparent 1px);
  background-size: 46px 46px;
}
a { color: #86efac; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.onboarding-shell { min-height: 100vh; display: flex; flex-direction: column; position: relative; }
.site-header {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border-bottom: 1px solid #202b41a8;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #06140d; background: var(--accent); font-size: 12px; box-shadow: 0 8px 24px #22c55e2b; }
.steps { display: flex; align-items: stretch; gap: 20px; min-height: 82px; }
.step { position: relative; display: flex; align-items: center; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.3; }
.step::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: transparent; }
.step.is-active { color: #fff; }
.step.is-active::after { background: var(--accent); }
.step.is-complete { color: #86efac; }
.step.is-complete::after { background: #22c55e78; }

.onboarding-main { flex: 1; display: grid; align-items: center; width: min(1120px, calc(100% - 64px)); margin: 0 auto; padding: 46px 0 40px; }
.step-panel { width: 100%; }
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 440px); align-items: center; gap: clamp(48px, 8vw, 120px); }
.hero-copy { padding: 12px 0; }
.eyebrow { margin: 0 0 16px; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .015em; }
h1 { margin: 0; font-size: clamp(40px, 4.3vw, 58px); line-height: 1.12; letter-spacing: -.045em; }
.hero-intro { max-width: 560px; margin: 22px 0 0; color: #9facce; font-size: 17px; line-height: 1.7; }
.benefits { display: grid; gap: 19px; margin: 28px 0 0; padding: 0; list-style: none; }
.benefits li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.benefits li > span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border: 1px solid #2a3652; border-radius: 50%; background: #111a30; color: #8f9bb6; font-size: 12px; font-weight: 700; }
.benefits li.is-current > span { border-color: #22c55e77; color: #fff; background: #22c55e22; }
.benefits strong, .benefits small { display: block; }
.benefits strong { color: #dae0ed; font-size: 14px; }
.benefits small { margin-top: 3px; color: var(--subtle); font-size: 11px; }

.radar-visual { position: relative; width: 244px; height: 244px; margin: 34px 0 0 25px; overflow: hidden; border: 1px solid #28375088; border-radius: 50%; background: radial-gradient(circle, #0a1120 0 15%, #101b2c 50%, #0b1424 100%); box-shadow: inset 0 0 55px #02050f; }
.radar-visual::before, .radar-visual::after { position: absolute; content: ""; background: #25365088; }
.radar-visual::before { left: 50%; top: 0; width: 1px; height: 100%; }
.radar-visual::after { top: 50%; left: 0; width: 100%; height: 1px; }
.radar-ring { position: absolute; inset: 18%; border: 1px solid #32445c99; border-radius: 50%; }
.ring-two { inset: 34%; }
.ring-three { inset: 46%; }
.radar-sweep { position: absolute; inset: 50% 50% 0 0; border-right: 1px solid var(--accent); background: linear-gradient(35deg, transparent 14%, #22c55e14 100%); transform-origin: right top; animation: sweep 6s linear infinite; }
.blip { position: absolute; z-index: 2; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.blip-one { top: 42%; left: 65%; color: var(--accent); background: currentColor; }
.blip-two { top: 68%; left: 39%; color: var(--green); background: currentColor; }
.blip-three { top: 28%; left: 33%; color: var(--blue); background: currentColor; }
@keyframes sweep { to { transform: rotate(360deg); } }

.form-card { border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, #141e35ef, #0f172aef); box-shadow: 0 28px 80px #0005; }
.account-card { padding: 32px; }
.form-heading h2, .verify-card h2, .section-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.035em; }
.form-heading p { margin: 8px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
form { display: grid; gap: 17px; }
label { display: grid; gap: 8px; color: #cbd2e2; font-size: 12px; font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input, select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: 0;
  color: var(--text);
  background: var(--input);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #66728c; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #5b9cff1d; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px #ff7a8617; }
.password-field { position: relative; }
.password-field input { padding-right: 58px; }
.password-toggle { position: absolute; top: 50%; right: 13px; transform: translateY(-50%); }
.text-button { padding: 0; border: 0; color: #9dbbff; background: transparent; font-weight: 600; font-size: 12px; }
.password-requirements, .field-hint { margin: -7px 0 0; color: var(--subtle); font-size: 11px; line-height: 1.5; }
.password-requirements.is-valid { color: var(--green); }
.market-note { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid #273852; border-radius: 10px; background: #111c31; }
.market-note-icon { color: var(--green); font-size: 18px; }
.market-note strong, .market-note small { display: block; }
.market-note strong { color: #dbe4f4; font-size: 12px; }
.market-note small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.check-row { display: flex; grid-template-columns: none; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.55; }
.check-row input { width: 15px; min-height: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--accent); }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; width: 100%; padding: 12px 18px; border: 1px solid var(--accent); border-radius: 9px; color: #06140d; background: linear-gradient(180deg, var(--accent-bright), var(--accent)); font-weight: 700; box-shadow: 0 12px 30px #22c55e1d; }
.primary-button:hover { filter: brightness(1.06); }
.primary-button:disabled { cursor: wait; opacity: .62; }
.signin-link { margin: 0; color: var(--muted); text-align: center; font-size: 12px; }

.centered-panel { display: grid; place-items: center; min-height: 590px; }
.verify-card { width: min(440px, 100%); padding: 38px 36px; text-align: center; }
.icon-tile { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 22px; border-radius: 15px; color: var(--accent); background: #22c55e18; }
.icon-tile svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.verify-copy { margin: 10px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.verify-copy strong { color: #fff; }
.otp-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.otp-inputs input { min-width: 0; height: 54px; padding: 0; text-align: center; font-size: 22px; font-weight: 700; caret-color: var(--accent); }
.verify-card .field-hint { margin: 0; }
.resend-copy { margin: 20px 0 0; color: var(--subtle); font-size: 12px; }
.resend-copy .text-button { color: #86efac; }

.setup-panel { align-self: start; }
.setup-intro { display: grid; grid-template-columns: 1fr auto; gap: 8px 40px; align-items: end; margin-bottom: 24px; }
.setup-intro .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.setup-intro h1 { font-size: clamp(34px, 4vw, 50px); }
.setup-intro > p:not(.eyebrow) { grid-column: 1; max-width: 700px; margin: 4px 0 0; color: var(--muted); line-height: 1.6; }
.market-pills { grid-column: 2; grid-row: 2 / 4; display: flex; gap: 8px; }
.market-pills span, .multiple-note, .market-count, .recommended-note { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: #bcc6d9; background: #0c1425; font-size: 10px; font-weight: 600; }
.market-dot { width: 6px; height: 6px; border-radius: 50%; }
.market-dot.canada { background: #fa6370; }
.market-dot.usa { background: #5b9cff; }
.setup-form { grid-template-columns: 1.3fr 1fr; gap: 18px; }
.portfolio-card { grid-column: 1; grid-row: 1 / 3; padding: 24px; }
.strategy-card, .watchlist-card { grid-column: 2; padding: 24px; }
.section-heading, .section-heading > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { font-size: 17px; }
.section-number { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--accent); background: #22c55e18; font-size: 11px; font-weight: 700; }
.recommended-note { color: #bbf7d0; border-color: #22c55e3d; background: #22c55e11; }
.account-list { display: grid; gap: 12px; }
.onboarding-account { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #0b1323cc; }
.portfolio-index { grid-column: 1 / -1; display: flex; justify-content: space-between; color: #8f9bb4; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.portfolio-index small { color: var(--green); font-size: 10px; }
.portfolio-index::after { display: none; }
.remove-account { width: auto; padding: 0; border: 0; color: #aeb8cb; background: transparent; font-size: 11px; }
.remove-account:hover { color: var(--danger); }
.account-label-capital, .portfolio-currency { display: grid; }
.portfolio-currency select { color-scheme: dark; }
.add-portfolio { width: 100%; margin-top: 13px; min-height: 44px; border: 1px dashed #405171; border-radius: 10px; color: #c5cee0; background: transparent; font-size: 12px; font-weight: 600; }
.add-portfolio span { margin-right: 5px; color: var(--accent); font-size: 16px; }
.money-input { display: grid; grid-template-columns: auto 1fr auto; align-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--input); }
.money-input > span, .money-input > small { padding: 0 12px; color: var(--muted); font-size: 12px; }
.money-input input { border: 0; padding-right: 5px; padding-left: 5px; box-shadow: none; background: transparent; }
.money-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #5b9cff1d; }
.template-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.template-option { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-height: 76px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #0b1323cc; cursor: pointer; overflow: hidden; }
.template-option:has(input:checked) { border-color: #22c55e88; background: #22c55e0c; box-shadow: 0 0 0 1px #22c55e12; }
.template-option input { width: 15px; min-height: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.template-option strong, .template-option small, .template-option em { display: block; }
.template-option strong { display: -webkit-box; overflow: hidden; color: #e7ebf4; font-size: 11px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.template-option small { display: -webkit-box; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.template-option em { margin-top: 4px; color: #75839f; font-size: 8px; font-style: normal; font-weight: 400; }
.template-option i { width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.template-option:has(input:checked) i { background: var(--accent); box-shadow: 0 0 10px #22c55e88; }
.custom-template-option { border-style: dashed; }
.strategy-description, .watchlist-card > p { margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.strategy-description { margin: 8px 0 0; }
.strategy-default-note { display: grid; gap: 3px; margin: 12px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: #0b1323cc; }
.strategy-default-note strong { color: #e0e6f2; font-size: 11px; }
.strategy-default-note span { color: var(--muted); font-size: 9px; }
.symbol-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.symbol-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid #31415f; border-radius: 999px; color: #cbd4e5; background: #0a1222; font-size: 11px; font-weight: 600; }
.symbol-chip small { color: #75839f; font-size: 8px; }
.symbol-chip-more { color: #86efac; border-color: #22c55e44; }
.browse-universe { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid #344766; border-radius: 9px; color: #c6d1e6; background: #0c1527; font-size: 11px; font-weight: 600; }
.browse-universe span { margin-left: 5px; color: var(--accent); }
.universe-browser { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.universe-tools { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; margin-bottom: 9px; }
.universe-tools input, .universe-tools select { min-height: 38px; padding: 9px 10px; font-size: 11px; }
.universe-symbols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 320px; overflow: auto; padding-right: 5px; }
.universe-symbol { display: grid; gap: 2px; min-width: 0; padding: 9px 10px; border: 1px solid #293954; border-radius: 8px; color: #cbd5e7; background: #091222; text-align: left; }
.universe-symbol strong { overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.universe-symbol small { overflow: hidden; color: #73819c; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.universe-symbol:hover { border-color: #49658f; }
.universe-symbol.is-selected { border-color: #22c55e99; color: #ecfdf5; background: #22c55e13; }
.custom-symbols-label { margin-top: 2px; }
.setup-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-top: 4px; }
.setup-footer strong, .setup-footer span { display: block; }
.setup-footer strong { font-size: 13px; }
.setup-footer span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.launch-button { width: min(270px, 100%); }
.site-footer { width: min(1120px, calc(100% - 64px)); margin: auto auto 0; padding: 16px 0 20px; color: #596780; text-align: center; font-size: 10px; }
.toast { position: fixed; z-index: 10; top: 24px; left: 50%; width: min(440px, calc(100% - 32px)); padding: 14px 18px; border: 1px solid #ff7a8666; border-radius: 11px; color: #ffdce0; background: #341923f7; box-shadow: 0 16px 48px #0009; font-size: 12px; line-height: 1.5; text-align: center; transform: translateX(-50%); backdrop-filter: blur(8px); }
.toast.is-success { border-color: #42d7a566; color: #c9ffea; background: #103128f2; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
@media (max-width: 900px) {
  .site-header, .onboarding-main, .site-footer { width: min(680px, calc(100% - 36px)); }
  .site-header { gap: 22px; }
  .account-layout { grid-template-columns: 1fr; gap: 32px; }
  .hero-copy { text-align: center; }
  .hero-intro, .benefits { margin-right: auto; margin-left: auto; }
  .benefits { width: fit-content; text-align: left; }
  .radar-visual { display: none; }
  .account-card { width: min(440px, 100%); margin: auto; }
  .setup-intro { grid-template-columns: 1fr; }
  .market-pills { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .setup-form { grid-template-columns: 1fr; }
  .portfolio-card, .strategy-card, .watchlist-card { grid-column: 1; grid-row: auto; }
}
@media (max-width: 560px) {
  .site-header { width: calc(100% - 28px); min-height: 70px; }
  .steps { min-height: 70px; gap: 10px; }
  .step { font-size: 9px; }
  .brand { gap: 8px; font-size: 13px; }
  .brand-mark { width: 30px; height: 30px; }
  .onboarding-main { width: calc(100% - 28px); padding: 28px 0; }
  .account-layout { gap: 24px; }
  .hero-copy h1 { font-size: 36px; }
  .hero-intro { font-size: 14px; }
  .form-heading h2, .verify-card h2 { font-size: 23px; }
  .account-card, .verify-card, .portfolio-card, .strategy-card, .watchlist-card { padding: 22px 18px; }
  .field-row, .onboarding-account { grid-template-columns: 1fr; }
  .otp-inputs { gap: 5px; }
  .otp-inputs input { height: 49px; font-size: 19px; }
  .setup-footer { align-items: stretch; flex-direction: column; }
  .launch-button { width: 100%; }
  .template-list { grid-template-columns: 1fr; }
}
