@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root, html[data-theme="dark"] {
  --ink: #071018;
  --panel: #10202b;
  --line: #2a4454;
  --copper: #d9a441;
  --paper: #f3efe4;
  --mute: #9fb3c0;
  --ok: #7dcaa4;
  --bad: #e07a6a;
  --field: #0c1820;
  --chip: #0c1820;
}
html[data-theme="light"] {
  --ink: #f3f1ea;
  --panel: #ffffff;
  --line: #d9d4c8;
  --copper: #b8860b;
  --paper: #171717;
  --mute: #5c6570;
  --ok: #2a7d5b;
  --bad: #c4564a;
  --field: #ffffff;
  --chip: #f7f6f2;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; min-height: 100dvh; overflow-x: hidden; }
body {
  font-family: "IBM Plex Sans", sans-serif;
  max-width: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(217,164,65,.12), transparent 50%),
    linear-gradient(180deg, color-mix(in srgb, var(--ink) 88%, #000), var(--ink));
  color: var(--paper);
}

a { color: var(--copper); text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3, .brand-type { font-family: inherit; font-weight: 700; }

.wrap { width: min(1120px, calc(100% - 24px)); margin: 0 auto; max-width: 100%; }
.site-header, .app-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; flex: 0 0 auto; min-width: 0; color: var(--paper); order: 1; }
.brand-logo, .brand img, .logo {
  display: block;
  height: 40px;
  width: 132px;
  max-width: 40vw;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}
.nav {
  display: none;
  gap: 18px; align-items: stretch;
  flex-direction: column;
  order: 3; flex-basis: 100%; width: 100%;
}
.nav a, .nav-logout button { color: var(--mute); white-space: nowrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.nav-logout { margin: 0; }
.nav-logout button {
  display: block; width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: 0;
  font: inherit; font-weight: 600; cursor: pointer; color: var(--mute);
}
.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-left: auto; order: 2; }
.header-actions > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  font-size: .85rem;
  line-height: 1;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.auth-switch { text-align: center; color: var(--mute); margin: 16px 0 0; }
.auth-switch a { color: var(--paper); font-weight: 600; }
.auth-legal { text-align: center; color: var(--mute); margin: 10px 0 0; font-size: .88rem; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.auth-legal a { color: var(--paper); font-weight: 600; }
.legal-page { padding: 40px 0; max-width: 760px; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.legal-tab {
  border: 1px solid var(--line); background: var(--chip); color: var(--paper);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font: inherit; font-weight: 600;
}
.legal-tab.is-active { background: var(--copper); color: #1a1204; border-color: var(--copper); }
.legal-panel h2 { margin: 0 0 8px; }
.legal-doc { color: var(--mute); line-height: 1.6; }
.legal-scroll {
  max-height: 420px; overflow: auto; padding-right: 8px;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.legal-doc h2 { color: var(--paper); font-size: 1.05rem; margin: 22px 0 8px; }
.legal-doc ul { padding-left: 1.2rem; }
.header-actions:has(.nav-toggle:checked) ~ .nav { display: flex; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; min-width: 48px; min-height: 48px; padding: 0;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--paper);
  cursor: pointer;
}
.theme-toggle svg { width: 22px; height: 22px; display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun,
html:not([data-theme]) .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.nav-toggle { display: none; }
.nav-toggle-btn {
  display: flex;
  width: 52px; height: 52px; min-width: 52px; min-height: 52px;
  border: 1px solid var(--line); border-radius: 12px;
  align-items: center; justify-content: center; flex-direction: column; gap: 6px;
  cursor: pointer;
  background: var(--panel);
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle-btn span { display: block; width: 24px; height: 3px; background: var(--paper); }
.btn {
  border: 0; cursor: pointer; border-radius: 999px;
  padding: 11px 18px; font-weight: 600; font-family: inherit;
}
.btn-copper { background: var(--copper); color: #1a1204; }
a.btn-copper { color: #1a1204; }
.onboarding-nav {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 16px 0 0;
}
.onboarding-nav .btn { width: auto; flex: 0 0 auto; }
.btn-inline {
  padding: 4px 12px; font-size: .95rem; font-weight: 600; border-radius: 8px;
}
.row-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; white-space: nowrap;
}
.row-actions-form {
  display: inline-flex; margin: 0; width: auto;
}
.btn-copy {
  width: 40px; min-width: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-copy svg { width: 18px; height: 18px; display: none; }
.btn-copy .icon-copy { display: block; }
.btn-copy.is-copied .icon-copy { display: none; }
.btn-copy.is-copied .icon-copied { display: block; }
.callback-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch;
}
.callback-row .btn { height: 100%; }
button[data-integrate]:disabled,
.btn:disabled { opacity: .45; cursor: default; }
.btn-ghost { background: transparent; color: var(--paper); border: 1px solid var(--line); }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; padding: 64px 0; align-items: center; }
.hero h1 { font-size: clamp(36px, 6vw, 68px); line-height: .95; margin: 0 0 16px; }
.lede { color: var(--mute); font-size: 1.1rem; max-width: 52ch; }
.grid { display: grid; gap: 18px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  min-width: 0; max-width: 100%;
}
.price { font-family: inherit; font-size: 2rem; font-weight: 700; color: var(--copper); }
.price-slider-card { margin-top: 22px; }
.price-slider-value { font-family: inherit; font-size: 1.35rem; font-weight: 700; margin: 6px 0 12px; }
.price-slider-card input[type=range] {
  width: 100%; accent-color: var(--copper); height: 28px; cursor: pointer;
}
.pricing-cta { margin-top: 28px; text-align: center; }
form { display: grid; gap: 12px; }
.add-platform { margin-top: 24px; }
.form-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px;
}
.form-actions .btn { width: auto; }
form.row-actions-form { display: inline-flex; margin: 0; width: auto; gap: 0; }
label { font-size: .82rem; color: var(--mute); display: grid; gap: 6px; min-width: 0; }
input, select, textarea {
  width: 100%; max-width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--field); color: var(--paper); font: inherit; font-size: 16px;
}
.auth-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 40px 0 80px; }
.auth-narrow { max-width: 520px; padding: 32px 0 max(32px, env(safe-area-inset-bottom, 0px)); }
.home-compact { padding: 24px 0 32px; align-items: start; }
.home-compact h1, .home-compact h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); line-height: 1.15; margin: 0 0 10px; }
.home-compact .lede { font-size: .95rem; max-width: none; margin: 0 0 14px; }
.home-compact .card { padding: 18px; }
.home-compact ol { margin: 8px 0 0; padding-left: 1.2rem; }
.home-compact .feature-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; color: var(--mute); font-size: .9rem; }
.home-compact .feature-list b { color: var(--paper); }
.home-compact .span-2 { grid-column: 1 / -1; }
.home-landing { padding-bottom: 24px; }
.home-hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px;
  padding: 36px 0 12px; align-items: start;
}
.home-hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.65rem); line-height: 1.2;
  margin: 8px 0 16px; letter-spacing: -.02em;
}
.home-headline {
  display: grid;
  gap: .85em;
}
.home-headline > span {
  display: flex;
  align-items: center;
  gap: .35em;
  min-height: 1.35em;
  overflow: hidden;
}
.home-headline-slot {
  display: block;
  overflow: hidden;
  height: 1.25em;
  line-height: 1.25em;
  min-width: 9ch;
  flex: 0 0 auto;
}
.home-headline-track {
  display: flex;
  flex-direction: column;
  animation: home-headline-slide 6s ease-in-out infinite;
}
.home-headline-track > span {
  display: flex;
  align-items: center;
  height: 1.25em;
  line-height: 1.25em;
  white-space: nowrap;
}
@keyframes home-headline-slide {
  0%, 26% { transform: translateY(0); }
  33%, 59% { transform: translateY(-1.25em); }
  66%, 92% { transform: translateY(-2.5em); }
  100% { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .home-headline { gap: .35em; }
  .home-headline > span { overflow: visible; min-height: 0; }
  .home-headline-slot { height: auto; overflow: visible; min-width: 0; }
  .home-headline-track { animation: none; display: inline; }
  .home-headline-track > span { display: inline; height: auto; }
  .home-headline-track > span + span::before { content: " / "; }
}
.home-hero .lede { font-size: 1.08rem; max-width: 46ch; margin: 0 0 22px; }
.home-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.home-cta .btn { text-decoration: none; display: inline-flex; align-items: center; }
.home-cta a.btn-copper { color: #1a1204; }
.home-cta a.btn-ghost { color: var(--paper); }
.strategy-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.strategy-pills button {
  padding: 7px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer; font-family: inherit;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--paper);
}
.strategy-pills button:hover,
.strategy-pills button:focus-visible,
.strategy-pills button[aria-expanded="true"] {
  border-color: var(--copper); color: var(--copper);
}
.strategy-dialog {
  border: 0; padding: 0; background: transparent;
  max-width: min(560px, calc(100vw - 32px));
}
.strategy-dialog::backdrop { background: rgba(7, 16, 24, .72); }
.strategy-dialog-card {
  position: relative;
  margin: 0;
  padding: 22px 22px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--paper);
}
.strategy-dialog-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--paper); font-size: 1.4rem; cursor: pointer;
}
.strategy-dialog-close:hover { color: var(--copper); }
.strategy-dialog h2 { margin: 4px 0 12px; font-size: 1.45rem; }
.strategy-dialog-figure {
  display: block; width: 100%; height: auto; border-radius: 12px; margin: 0 0 14px;
  background: #10202b;
}
.strategy-dialog-copy p { margin: 0 0 10px; color: var(--mute); line-height: 1.5; }
.strategy-dialog-copy p:last-child { margin-bottom: 0; }
.home-hero-panel { padding: 24px; }
.home-hero-panel > .btn {
  display: flex;
  justify-content: center;
  width: fit-content;
  margin-inline: auto;
}
.home-onboarding {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.home-onboarding li {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  justify-items: start;
  text-align: left;
  column-gap: 14px;
  row-gap: 2px;
  padding: 8px 0;
}
.home-onboarding .home-flow-num { grid-row: 1 / span 2; }
.home-onboarding li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 44px;
  left: 17px;
  width: 2px;
  height: calc(100% - 24px);
  background: var(--copper);
  opacity: .45;
  pointer-events: none;
}
.home-onboarding strong {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--paper);
}
.home-onboarding li > span:last-child {
  color: var(--mute);
  font-size: .88rem;
  line-height: 1.35;
}
.hero-stats { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 16px; }
.hero-stats li { display: grid; gap: 4px; }
.hero-stats b { font-size: 1.02rem; }
.hero-stats span { color: var(--mute); font-size: .92rem; line-height: 1.45; }
.home-algo-disclaimer { margin: 18px 0 0; }
.home-algo-disclaimer .btn-ghost { color: var(--paper); text-decoration: none; }
.home-section { padding: 28px 0; }
.home-section-head { margin-bottom: 16px; max-width: 46rem; }
.home-section-head h2 { margin: 6px 0 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.home-feature-grid, .home-workspace, .home-split {
  display: grid; gap: 16px;
}
.home-feature-grid { grid-template-columns: repeat(3, 1fr); }
.home-workspace, .home-split { grid-template-columns: 1fr 1fr; }
.home-feature h3, .home-workspace h3 { margin: 8px 0 8px; }
.home-feature p, .home-workspace p { margin: 0; color: var(--mute); line-height: 1.5; }
.home-feature p + p { margin-top: 10px; }
.home-feature .logo-pill, .home-feature .chip { margin-bottom: 8px; }
.platform-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 100%;
  margin-bottom: 12px;
}
.platform-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: center;
}
.logo-row .platform-logo-wrap {
  width: auto;
  flex: 0 0 auto;
  height: 40px;
  margin-bottom: 0;
}
.logo-row .platform-logo {
  height: 36px;
  max-width: 160px;
}
.platform-choice-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.platform-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}
.platform-choice input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--copper);
}
.platform-choice .platform-logo {
  height: 36px;
  width: 140px;
  max-width: 100%;
  margin: 0;
}
.platform-features {
  margin: 0; padding-left: 1.15rem; color: var(--mute); line-height: 1.45; display: grid; gap: 6px;
}
.home-index {
  font-family: inherit; font-weight: 700; color: var(--copper); font-size: 1.35rem; letter-spacing: .04em;
}
.home-steps { margin: 12px 0 0; padding-left: 1.15rem; display: grid; gap: 10px; color: var(--mute); }
.home-steps b { color: var(--paper); }
.home-flow {
  list-style: none;
  margin: 0;
  padding: 28px 12px 24px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}
.home-flow li {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding: 0 10px;
}
.home-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 2px;
  background: var(--copper);
  opacity: .45;
  pointer-events: none;
}
.home-flow-num {
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--copper);
  color: #1a1204;
  font-weight: 700;
  font-size: .95rem;
}
.home-flow strong {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--paper);
}
.home-flow li > span:last-child {
  color: var(--mute);
  font-size: .88rem;
  line-height: 1.35;
  max-width: 16ch;
}
.home-band {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; text-align: center;
  margin: 12px 0 28px; padding: 28px; border-radius: 22px;
  border: 1px solid var(--line); background: var(--panel);
}
.home-band h2 { margin: 0 0 8px; font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
.home-band p { margin: 0 auto; color: var(--mute); max-width: 62ch; }
.home-band .btn { text-decoration: none; color: #1a1204; }
.home-platforms-qr {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(200px, .55fr);
  gap: 16px;
  align-items: stretch;
}
.home-platforms-card {
  min-width: 0;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
.home-platforms-card:hover {
  border-color: color-mix(in srgb, var(--copper) 55%, var(--line));
}
.logo-carousel {
  overflow: hidden;
  margin-top: 14px;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.logo-carousel-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: logo-marquee 36s linear infinite;
  will-change: transform;
}
.logo-carousel-group {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-right: 32px;
  flex: 0 0 auto;
}
.logo-carousel:hover .logo-carousel-track { animation-play-state: paused; }
.logo-carousel .platform-logo-wrap {
  flex: 0 0 auto;
  width: auto;
  height: 44px;
  margin: 0;
}
.logo-carousel .platform-logo {
  height: 40px;
  max-width: 140px;
}
@keyframes logo-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--logo-shift, 50%)), 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .logo-carousel-track { animation: none; }
}
.home-app-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
}
.home-app-card .market { margin: 0; }
.home-app-card h2 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
.home-app-card p { margin: 0; color: var(--mute); max-width: 62ch; }
.home-app-card .btn { text-decoration: none; }
.home-app-card a.btn-copper { color: #1a1204; }
.home-qr {
  width: min(160px, 70%); height: auto; aspect-ratio: 1;
  object-fit: contain;
  background: #fff; border-radius: 14px; padding: 10px; flex-shrink: 0;
}
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.platform-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--chip); }
.platform-card h3 { margin: 6px 0 4px; font-size: 1rem; }
.platform-card p { margin: 0; color: var(--mute); font-size: .85rem; }
.badge, .badge-soon { display: inline-block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--copper); }
.badge-soon {
  margin-left: 8px; padding: 3px 8px; border-radius: 999px;
  background: var(--chip); border: 1px solid var(--line); vertical-align: middle;
}
.logo-row, .chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.logo-pill, .chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 12px; border-radius: 10px; font-size: .85rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--chip); color: var(--paper);
}
.logo-pill.schwab { background: #00a0df; color: #fff; border-color: #00a0df; }
.logo-pill.alpaca { background: #fcd34d; color: #111; border-color: #fcd34d; }
.logo-pill.tastytrade { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.logo-pill.tradier { background: #1f6feb; color: #fff; border-color: #1f6feb; }
.logo-pill.tradestation { background: #f26522; color: #fff; border-color: #f26522; }
.logo-pill.ibkr { background: #d81921; color: #fff; border-color: #d81921; }
.logo-pill.taapi { background: #ec4899; color: #fff; border-color: #ec4899; }
.logo-pill.polygon { background: #6d28d9; color: #fff; border-color: #6d28d9; }
.chip { border-style: dashed; border-radius: 999px; font-weight: 500; }
.workspace { display: grid; gap: 12px; }
.workspace h2 { margin-bottom: 4px; }
.workspace .card p { margin: 0; color: var(--mute); }
.workspace .card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.flash { padding: 10px 12px; border-radius: 10px; background: #1c333f; color: var(--ok); }
.flash.error { color: var(--bad); }
.app-shell {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr;
  min-height: 100vh; min-height: 100dvh; max-width: 100%;
}
.app-nav-cluster { display: contents; }
.app-topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: max(6px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 6px max(14px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--line);
  background: #09141b; position: sticky; top: 0; z-index: 30; min-height: 58px;
  overflow: visible;
}
.app-topbar .brand { order: 0; max-width: none; flex: 0 0 auto; }
.account-switch {
  position: relative;
  margin: 0;
  min-width: 0;
  flex: 1 1 100%;
  max-width: none;
  z-index: 32;
}
.account-switch-toggle {
  width: 100%;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
}
.account-switch-kicker {
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mute);
}
.account-switch-value {
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-switch-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  max-height: min(50vh, 280px);
  overflow: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.account-switch-menu[hidden] { display: none; }
.account-switch-menu form { margin: 0; display: block; }
.account-switch-option {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  cursor: pointer;
}
.account-switch-option:hover, .account-switch-option.is-active { background: var(--chip); }
@media (min-width: 861px) {
  .account-switch {
    flex: 0 1 280px;
    max-width: 320px;
    margin-left: auto;
  }
}
.app-nav-backdrop {
  position: fixed; inset: var(--app-topbar-height, 58px) 0 0 0; background: rgba(0,0,0,.45); z-index: 24;
}
.side {
  position: fixed; top: var(--app-topbar-height, 58px); left: 0; bottom: 0; width: min(240px, 86vw);
  z-index: 25; transform: translateX(-105%); transition: transform .2s ease;
  border-right: 1px solid var(--line); padding: 20px; background: #09141b;
  overflow: auto;
}
.app-shell.is-nav-open .side { transform: none; }
.side a { display: flex; align-items: center; gap: 8px; padding: 10px 0; color: var(--mute); }
.side a.active, .side a:hover { color: var(--paper); }
.side a.nav-locked { color: var(--mute); }
.nav-lock { flex: 0 0 auto; color: var(--copper); }
.main {
  padding: 20px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  min-width: 0; max-width: 100%;
}
.kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.position-group-head td {
  font-weight: 700; background: color-mix(in srgb, var(--copper) 12%, var(--panel));
  border-top: 1px solid var(--line);
}
.position-group-head .hint { font-weight: 500; margin-left: 8px; }
.strategy-name { margin-right: 6px; }
.field-label-row { display: inline-flex; align-items: center; gap: 6px; }
.strategy-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0; margin: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--mute); cursor: help; vertical-align: middle;
}
.strategy-chip:hover, .strategy-chip:focus-visible { color: var(--copper); }
.strategy-float-tip {
  position: fixed; z-index: 80; max-width: min(280px, 70vw); padding: 10px 12px; border-radius: 10px;
  background: var(--panel); color: var(--paper); border: 1px solid var(--line);
  font-size: .82rem; font-weight: 500; line-height: 1.35;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28); pointer-events: none;
}
.position-group-row td:first-child { padding-left: 1.25rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.toggle { display: inline-flex; align-items: center; gap: 10px; }
.dash-head { gap: 14px 20px; align-items: center; }
.dash-head h1 { margin: 0; }
.dash-market { margin: 0; margin-left: auto; }
.algo-inline { display: inline-flex; align-items: center; gap: 10px; }
.algo-inline-label { font-size: .92rem; font-weight: 600; color: var(--paper); }
.algo-inline-form { margin: 0; display: inline-flex; }
.algo-switch {
  width: 44px; height: 26px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--line); position: relative; flex-shrink: 0;
}
.algo-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .15s ease;
}
.algo-switch.is-on { background: var(--ok); }
.algo-switch.is-on::after { transform: translateX(18px); }
.algo-lock {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; color: var(--copper); background: var(--chip);
}
.sub-account {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 8px;
}
.sub-account-label { font-size: .82rem; font-weight: 600; color: var(--mute); white-space: nowrap; }
.sub-account select {
  width: auto; min-width: 5.5rem; padding: 6px 10px; margin: 0;
}
.market { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.market.open { color: var(--ok); }
.legal { white-space: pre-wrap; color: var(--mute); line-height: 1.55; max-height: 360px; overflow: auto; }
.footer { color: var(--mute); padding: 40px 0; font-size: .85rem; text-align: center; width: min(1120px, calc(100% - 24px)); }
.field-with-mark { position: relative; display: block; }
.field-with-mark input { padding-right: 2.4rem; }
.availability-mark {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ok); font-size: 1.2rem; display: none;
}
.availability-mark.show { display: inline; }
.oauth-guide { color: var(--mute); line-height: 1.55; margin: 0 0 16px; }
.oauth-guide p { margin: 0 0 10px; }
.oauth-guide ol { margin: 0 0 10px; padding-left: 1.25rem; }
.oauth-guide li { margin: 6px 0; }
.hint { font-size: .82rem; margin: 4px 0 0; color: var(--mute); }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--bad); }
.pw-rules { margin: 0; padding-left: 1.1rem; color: var(--mute); font-size: .82rem; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.bad { color: var(--bad); }
.phone-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; }
.symbol-picker { display: grid; gap: 10px; }
.symbol-picker-label { color: var(--paper); font-weight: 600; }
.symbol-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 36px; }
.symbol-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--chip); color: var(--paper);
  border-radius: 999px; padding: 6px 10px; cursor: pointer; font: inherit;
}
.symbol-chip span:last-child { color: var(--mute); }
.symbol-combo { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.symbol-options {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 280px; overflow: auto; margin: 0; padding: 6px;
  list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.symbol-option, .symbol-empty { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.symbol-option:hover, .symbol-option.is-selected { background: var(--chip); }
.symbol-option.is-selected { color: var(--copper); }
.symbol-empty { color: var(--mute); cursor: default; }
.symbol-native.is-enhanced { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.watchlist-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 12px;
}
.watchlist-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0; flex: 1 1 auto;
}
.watchlist-tabs a {
  display: inline-flex; align-items: center;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--paper); background: var(--panel); font-weight: 600;
}
.watchlist-tabs a.is-active { border-color: var(--copper); color: var(--copper); }
.watchlist-actions { display: flex; align-items: center; gap: 6px; }
.watchlist-actions form { margin: 0; width: auto; display: inline-flex; }
.watchlist-icon {
  width: 36px; height: 36px; padding: 0; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.watchlist-icon svg { width: 18px; height: 18px; display: block; }
.watchlist-icon:hover { border-color: var(--copper); color: var(--copper); }
.watchlist-icon:disabled { opacity: .4; cursor: default; }
.watchlist-rename {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px;
}
.watchlist-rename input { flex: 1 1 180px; margin: 0; }
.table-wrap input[type="checkbox"] { width: auto; margin: 0; }
.symbol-table-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.symbol-table-head h2 { margin: 0; }
.symbol-table-head .row-actions { margin: 0; }
.symbol-table-head a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.watchlist-tradelist-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 8px;
  background: #d9a441 !important;
  color: #1a1204 !important;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none !important;
  opacity: 1 !important;
  filter: none !important;
  cursor: pointer;
  pointer-events: auto;
}
.symbol-select-table input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: var(--copper);
}
.preference-options {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0;
  display: grid; gap: 10px;
}
.preference-options legend { padding: 0 6px; color: var(--paper); font-weight: 600; }
.preference-options label {
  display: flex; align-items: center; gap: 10px; color: var(--paper); font-size: .95rem;
}
.preference-options input[type="radio"] { width: auto; margin: 0; }
.notification-history { margin-top: 18px; }
.notification-history summary {
  cursor: pointer; font-family: inherit; font-weight: 700; font-size: 1.2rem; list-style: none;
}
.notification-history summary::-webkit-details-marker { display: none; }
.notification-history summary::after {
  content: "Show"; float: right; font-family: "IBM Plex Sans", sans-serif;
  font-size: .78rem; color: var(--mute); font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.notification-history[open] summary::after { content: "Hide"; }
.history-item { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.history-item h3 { margin: 0 0 6px; font-size: 1.05rem; }
.table-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  margin-top: 12px;
}
.table-pager .btn[disabled] { opacity: .45; cursor: default; }
.table-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.table-head h3 { margin: 0; }
.column-picker { position: relative; }
.column-picker summary {
  cursor: pointer; list-style: none; font-weight: 600; color: var(--copper);
}
.column-picker summary::-webkit-details-marker { display: none; }
.column-picker form {
  position: absolute; right: 0; z-index: 4; margin-top: 8px; min-width: 180px;
  display: grid; gap: 8px; padding: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.column-picker label { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.column-picker input[type="checkbox"] { width: auto; margin: 0; }
.range-bar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.range-bar select { width: auto; min-width: 8rem; }
@media (min-width: 861px) {
  .app-shell.is-nav-open .main { margin-left: 240px; }
  .app-shell.is-nav-open .app-nav-backdrop { display: none; }
  .app-topbar .nav-toggle-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
}
@media (max-width: 860px) {
  .hero, .auth-split,
  .home-hero, .home-feature-grid, .home-workspace, .home-split, .home-platforms-qr { grid-template-columns: 1fr; }
  .home-flow {
    grid-template-columns: 1fr;
    padding: 18px 20px 18px 16px;
    gap: 4px;
  }
  .home-flow li {
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    justify-items: start;
    text-align: left;
    column-gap: 14px;
    padding: 10px 0 10px 8px;
  }
  .home-flow-num { grid-row: 1 / span 2; }
  .home-flow li:not(:last-child)::after {
    top: 46px;
    left: 25px;
    width: 2px;
    height: calc(100% - 28px);
  }
  .home-flow li > span:last-child { max-width: none; }
  .kpi { grid-template-columns: 1fr 1fr; }
  .site-header { flex-wrap: wrap; gap: 8px; }
  .site-header .brand { max-width: 28%; }
  .site-header .brand-logo, .site-header .brand img {
    height: 28px; width: 92px; max-width: 100%;
  }
  .header-actions { margin-left: auto; order: 2; gap: 6px; }
  .theme-toggle, .nav-toggle-btn {
    width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: 12px;
  }
  .nav { padding: 8px 0 12px; }
  .auth-split { padding: 20px 0 32px; }
  .main { padding: 14px; }
  .legal-page { padding: 20px 0; }
  .dash-market { margin-left: 0; flex-basis: 100%; }
  .home-hero { padding: 20px 0 8px; }
  .home-section { padding: 18px 0; }
  .home-band { padding: 18px; }
  .card { padding: 16px; }
  h1 { overflow-wrap: break-word; }
}
.integration-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}
.integration-panel { text-align: center; padding: 28px 16px; }
.integration-copy { margin: 16px 0 0; font-weight: 600; font-size: 1.05rem; }
.integration-spinner {
  display: inline-block;
  width: 42px;
  height: 42px;
  border: 3px solid var(--line);
  border-top-color: var(--copper);
  border-radius: 50%;
  animation: integration-spin .8s linear infinite;
}
.integration-overlay.is-done .integration-spinner { animation: none; border-top-color: var(--ok); }
.integration-overlay.is-done .integration-copy { color: var(--ok); }
.integration-overlay.is-failed .integration-spinner { animation: none; border-top-color: var(--bad); }
.integration-overlay.is-failed .integration-copy { color: var(--bad); }
@keyframes integration-spin { to { transform: rotate(360deg); } }
.sub-current h2 { margin: 4px 0 8px; }
.sub-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 18px;
  margin: 16px 0 8px;
}
.sub-meta dt { font-size: .75rem; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.sub-meta dd { margin: 4px 0 0; font-weight: 600; }
.sub-plans { margin-top: 28px; }
.sub-plans h2 { margin-bottom: 8px; }
.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px;
  margin-top: 16px;
}
.plan-card { display: grid; align-content: start; gap: 10px; }
.plan-card.is-current { border-color: var(--copper); }
.plan-card .price { margin: 0; }
.price-unit { font-size: .45em; font-weight: 600; color: var(--mute); margin-left: 2px; }
.plan-features { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; color: var(--mute); font-size: .9rem; }
.plan-features li { padding-left: 1.1rem; position: relative; }
.plan-features li::before { content: ""; position: absolute; left: 0; top: .45em; width: .45em; height: .45em; border-radius: 50%; background: var(--copper); }
.plan-card form { margin-top: 8px; }
.chip {
  display: inline-block; width: fit-content; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); font-size: .8rem; color: var(--copper);
}
@media (max-width: 480px) {
  .kpi { grid-template-columns: 1fr; }
  .phone-row, .symbol-combo { grid-template-columns: 1fr; }
  .home-cta .btn { width: 100%; justify-content: center; }
  .home-hero h1 { font-size: 1.4rem; }
  .price { font-size: 1.55rem; }
  .wrap { width: min(1120px, calc(100% - 16px)); }
}
