/* =====================================================================
   Schwabot stylesheet: brokerage layout, light (default) and dark themes.
   Calm overview screens, denser trading screens.
   ===================================================================== */
:root {
  --bg: #FFFFFF;
  --panel: #F5F6F7;
  --panel-2: #ECEEF0;
  --border: #E3E5E8;
  --border-strong: #CDD1D6;
  --text: #111111;
  --text-2: #3F444B;
  --muted: #6B7178;
  --brand: #009CDB;          /* overwritten from CONFIG.ACCENT */
  --accent: var(--brand);
  --accent-hover: color-mix(in srgb, var(--accent) 88%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --on-accent: #FFFFFF;
  --up: #00A86B;
  --down: #E5484D;
  --up-soft: rgba(0, 168, 107, 0.10);
  --down-soft: rgba(229, 72, 77, 0.10);
  --warn: #B7791F;
  --warn-soft: rgba(183, 121, 31, 0.10);
  --overlay: rgba(17, 17, 17, 0.40);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 232px;
  --right-w: 340px;
  --tabbar-h: 64px;
  --ease: 180ms ease;
  --font: "Manrope", "Segoe UI", Arial, sans-serif;
  --code: ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --panel: #1A1A1A;
  --panel-2: #242424;
  --border: #2A2A2A;
  --border-strong: #3A3A3A;
  --text: #F4F5F6;
  --text-2: #C9CDD2;
  --muted: #8F969E;
  --accent-hover: color-mix(in srgb, var(--accent) 85%, #fff);
  --on-accent: #000000;
  --up: #00C27C;
  --down: #EF5A5F;
  --overlay: rgba(0, 0, 0, 0.65);
  --warn: #E0A43A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background var(--ease), color var(--ease);
}
a { color: var(--accent); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
code { font-family: var(--code); font-size: 12px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.mono, .num, .value { font-variant-numeric: tabular-nums; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }
.hidden { display: none !important; }
.right { text-align: right; }

/* ---------- App layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column; padding: 20px 12px;
  background: var(--bg); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 12px 20px; font-weight: 800; font-size: 17px; color: var(--text); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 13px; font-weight: 800; transition: background var(--ease); }
.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-label { padding: 16px 12px 6px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; transition: background var(--ease), color var(--ease); }
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--panel); color: var(--text); }
.nav a.active .ico { color: var(--accent); }
.ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--border); margin-top: 8px; }
.sidebar-foot .meta { min-width: 0; flex: 1; }
.sidebar-foot .meta div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.app.has-right .main { margin-right: var(--right-w); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 24px 32px 0; }
.topbar h1 { margin: 0; font-size: 24px; }
.topbar .spacer { flex: 1; }
.mobile-only { display: none !important; }
.sim-pill { font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.content { width: 100%; max-width: 1080px; padding: 20px 32px 48px; }
.content.narrow { max-width: 760px; }

.rightpanel {
  position: fixed; inset: 0 0 0 auto; width: var(--right-w); z-index: 30;
  overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 16px;
  background: var(--bg); border-left: 1px solid var(--border);
}
.rightpanel h3 { font-size: 15px; }

.tabbar { display: none; }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 16px; }
.grid > *, .stack > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 1fr) 320px; }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; } .mb-s { margin-bottom: 8px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.section-head h2 { margin: 0; }

/* ---------- Cards ---------- */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card.flat { background: var(--panel); border-color: transparent; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head p { margin: 0; }

/* Stat grid (balances, key stats, trader metrics) */
.statbar { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 24px; }
.statbar .label, .stat .label { font-size: 12px; font-weight: 600; color: var(--muted); }
.statbar .value, .stat .value { font-size: 18px; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.statbar .sub, .stat .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.statbar .value.lg { font-size: 22px; }
.keystats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.keystats > div { padding: 14px 0; border-bottom: 1px solid var(--border); }
.keystats .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.keystats .value { font-weight: 700; margin-top: 2px; }
.risk-bar { display: flex; gap: 3px; margin-top: 6px; }
.risk-bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--panel-2); }
.risk-bar i.on { background: var(--up); }
.risk-bar.mid i.on { background: var(--warn); }
.risk-bar.high i.on { background: var(--down); }

/* ---------- Portfolio header ---------- */
.hero-value { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 4px 0 6px; }
.hero-change { font-size: 15px; font-weight: 700; }
.hero-change .muted { font-weight: 600; }
.hero-label { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border: 1.5px solid transparent; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease), opacity var(--ease);
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn.ghost:hover { border-color: var(--text); background: transparent; color: var(--text); }
.btn.subtle { background: var(--panel); color: var(--text); }
.btn.subtle:hover { background: var(--panel-2); color: var(--text); }
.btn.success { background: var(--up); color: #fff; }
.btn.danger { background: transparent; border-color: var(--down); color: var(--down); }
.btn.danger:hover { background: var(--down); color: #fff; }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn .spinner { width: 15px; height: 15px; border-width: 2px; border-color: currentColor; border-top-color: transparent; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); cursor: pointer; transition: background var(--ease); }
.icon-btn:hover { background: var(--panel); color: var(--text); }
.icon-btn.on { color: var(--accent); }
.icon-btn.on .ico { fill: currentColor; }

/* Pills: timeframes, expiries, filters */
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills button, .pill {
  height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent;
  background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.pills button:hover { color: var(--text); background: var(--panel); }
.pills button.active { background: var(--accent-soft); color: var(--accent); }
.pills.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pills.scroll::-webkit-scrollbar { display: none; }
.pills.scroll button { flex-shrink: 0; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); }
.input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font: inherit; outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[readonly] { background: var(--panel); color: var(--muted); }
textarea.input { height: auto; min-height: 84px; padding: 10px 14px; resize: vertical; }
select.input { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .addon, .input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; height: 44px; }
.input-group .addon { display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--panel); color: var(--muted); font-weight: 600; font-size: 13px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span { display: inline-block; padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; transition: background var(--ease), border-color var(--ease), color var(--ease); }
.check-chip span:hover { border-color: var(--text-2); }
.check-chip input:checked + span { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.check-chip input:disabled + span { opacity: .4; cursor: not-allowed; }
.check-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; height: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; transition: border-color var(--ease), background var(--ease); }
.seg span b { display: block; font-weight: 700; }
.seg span em { font-style: normal; font-size: 12px; color: var(--muted); }
.seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Segmented control (Deposit | Withdraw, Buy | Sell, Calls | Puts) */
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel); border-radius: 999px; }
.segmented a, .segmented button { padding: 7px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; transition: background var(--ease), color var(--ease); }
.segmented a:hover, .segmented button:hover { color: var(--text); text-decoration: none; }
.segmented .active { background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.segmented.full { display: flex; }
.segmented.full > * { flex: 1; text-align: center; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--border-strong); transition: background var(--ease); flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-of-type { border-bottom: 0; }

.strength { height: 4px; border-radius: 2px; background: var(--panel-2); margin-top: 6px; overflow: hidden; }
.strength > div { height: 100%; width: 0; transition: width var(--ease), background var(--ease); }
.strength-label { font-size: 12px; color: var(--muted); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 60px; }
.pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }

/* ---------- Underline tabs ---------- */
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 0; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; transition: color var(--ease), border-color var(--ease); }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs.compact { gap: 6px; border: 0; }
.tabs.compact button { height: 30px; padding: 0 12px; border: 0; margin: 0; border-radius: 999px; font-size: 13px; }
.tabs.compact button.active { background: var(--accent-soft); color: var(--accent); }

/* ---------- Lists (positions, watchlist, markets) ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--border);
  color: var(--text); font-weight: 500; text-decoration: none; transition: background var(--ease);
}
.list-row:last-child { border-bottom: 0; }
a.list-row:hover, button.list-row:hover { background: var(--panel); text-decoration: none; }
button.list-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--border); font: inherit; text-align: left; cursor: pointer; }
.list-row .l { flex: 1; min-width: 0; }
.list-row .l b { display: block; font-weight: 700; }
.list-row .l span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .r { text-align: right; white-space: nowrap; }
.list-row .r b { display: block; font-weight: 700; }
.list-row .r span { font-size: 12px; font-weight: 600; }
.chg-pill { display: inline-block; min-width: 76px; padding: 5px 10px; border-radius: var(--radius-sm); text-align: right; font-weight: 700; font-size: 13px; color: #fff; background: var(--up); }
.chg-pill.down { background: var(--down); color: #fff !important; }
.chg-pill.flat { background: var(--panel-2); color: var(--text-2); }
.empty-state { padding: 28px 8px; text-align: center; color: var(--muted); }
.empty-state b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 8px 20px; text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--ease); }
.table tbody tr:hover { background: var(--panel); }
.table .num, .table th.num { text-align: right; }
.table td .small { font-size: 12px; }
.sym { display: flex; align-items: center; gap: 10px; }

/* ---------- Options chain ---------- */
.chain-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--ease); }
.chain-row:hover { background: var(--panel); }
.chain-row.selected { background: var(--accent-soft); }
.chain-row.itm .strike-cell::after { content: "ITM"; margin-left: 6px; font-size: 10px; font-weight: 800; color: var(--accent); }
.chain-head { cursor: default; font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 6px; padding-bottom: 6px; }
.chain-head:hover { background: transparent; }
.chain-row .strike-cell { font-weight: 800; }
.chain-row .premium { display: inline-block; min-width: 72px; padding: 5px 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--accent); color: var(--accent); font-weight: 800; text-align: center; }
.chain-spot { padding: 6px 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--accent); border-bottom: 1px solid var(--border); background: var(--accent-soft); }

/* ---------- Badges / chips ---------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: capitalize; white-space: nowrap; background: var(--panel-2); color: var(--text-2); }
.badge:empty { display: none; }
.badge.completed, .badge.active, .badge.buy { background: var(--up-soft); color: var(--up); }
.badge.rejected, .badge.stopped, .badge.sell { background: var(--down-soft); color: var(--down); }
.badge.pending, .badge.paused, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info, .badge.open { background: var(--accent-soft); color: var(--accent); }
.badge.buy, .badge.sell { text-transform: uppercase; }
.badge.sim { font-size: 10px; padding: 1px 6px; background: transparent; border: 1px solid var(--border-strong); color: var(--muted); text-transform: lowercase; }
.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--panel); font-size: 12px; font-weight: 600; color: var(--text-2); }

/* ---------- People / traders ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; background: var(--panel-2); color: var(--text-2); font-size: 12px; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.verified { display: inline-flex; color: var(--accent); vertical-align: -3px; }
.verified .ico { width: 18px; height: 18px; }
.trader-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.trader-head .who { flex: 1; min-width: 180px; }
.trader-head .who h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 20px; }
.trader-head .meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; font-weight: 600; }
.trader-card .statbar { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.markets-line { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

.sub-card { border: 1px solid var(--border); border-radius: var(--radius); }
.sub-card + .sub-card { margin-top: 12px; }
.sub-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px; }
.sub-top .who { flex: 1; min-width: 150px; font-weight: 700; }
.sub-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 0 16px 14px; }
.sub-stats span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.sub-stats b { font-weight: 700; }
.sub-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); }
details.positions { border-top: 1px solid var(--border); }
details.positions summary { padding: 12px 16px; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13px; }
details.positions .table-wrap { margin: 0; }

.finder { display: flex; gap: 10px; max-width: 480px; }
.finder .input { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 14px; margin-bottom: 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; }
.alert.error { background: var(--down-soft); color: var(--down); }
.alert.success { background: var(--up-soft); color: var(--up); }
.alert.info { background: var(--panel); color: var(--text-2); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- Charts ---------- */
.chart-box { position: relative; height: 280px; margin: 8px 0 4px; }
.chart-box.sm { height: 200px; }
.chart-box.lg { height: 320px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; color: var(--muted); text-align: center; }

/* ---------- Order ticket ---------- */
.ticket { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--bg); }
.ticket h3 { margin-bottom: 14px; }
.ticket .ticket-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-weight: 600; }
.ticket .ticket-row span:first-child { color: var(--text-2); }
.ticket .ticket-row.total { border-bottom: 0; font-size: 15px; }
.ticket .ticket-row.total span:first-child { color: var(--text); }
.ticket .input { text-align: right; font-weight: 700; }
.ticket-close { display: none; }
.sheet-backdrop { display: none; }
.mobile-actions { display: none; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 64px 16px; overflow-y: auto; background: var(--overlay); }
.modal.open { display: flex; }
.modal-box { width: 100%; max-width: 520px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); animation: rise 180ms ease; }
.modal-box.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 12px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px 20px 20px; }
.close-x { display: grid; place-items: center; width: 32px; height: 32px; background: none; border: 0; border-radius: 50%; color: var(--muted); cursor: pointer; transition: background var(--ease), color var(--ease); }
.close-x:hover { color: var(--text); background: var(--panel); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.summary-list { list-style: none; margin: 0; padding: 0; }
.summary-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.summary-list li:last-child { border-bottom: 0; }
.summary-list li > span:first-child { color: var(--text-2); font-weight: 600; }
.summary-list li > span:last-child { text-align: right; font-weight: 700; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 12px 18px; background: var(--text); color: var(--bg); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; transition: opacity var(--ease); animation: rise 180ms ease; }
.toast.error { background: var(--down); color: #fff; }

/* ---------- Loading / empty ---------- */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: var(--bg); }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); }
.placeholder { color: var(--muted); }

/* ---------- Public pages ---------- */
.pub-head { display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 32px; border-bottom: 1px solid var(--border); }
.pub-head .brand { padding: 0; }
.pub-head nav { display: flex; gap: 10px; align-items: center; }
.pub-main { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; max-width: 1120px; margin: 0 auto; padding: 48px 32px 64px; }
.pub-main.form-first { grid-template-columns: 420px minmax(0, 1fr); }
.pub-intro h1 { font-size: 34px; letter-spacing: -0.03em; margin-bottom: 10px; }
.pub-intro p { font-size: 16px; color: var(--text-2); max-width: 560px; }
.steps-list { margin: 0; padding-left: 20px; color: var(--text-2); }
.steps-list li { padding: 4px 0; }
.form-panel { align-self: start; }
.form-panel .segmented { margin-bottom: 20px; }
.form-foot { margin-top: 16px; color: var(--muted); font-size: 13px; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.check-line input { margin-top: 3px; accent-color: var(--accent); }
.pub-foot { padding: 20px 32px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.ticker { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; padding: 0 32px; height: 40px; align-items: center; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ticker::-webkit-scrollbar { display: none; }
.ticker-item { display: inline-flex; gap: 8px; font-size: 13px; font-weight: 600; }
.ticker-item b { font-weight: 800; }

/* ---------- Transfers ---------- */
.method-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.method { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--ease), background var(--ease); }
.method b { font-weight: 700; }
.method span { font-size: 12px; color: var(--muted); }
.method:hover { border-color: var(--text-2); }
.method.active { border-color: var(--accent); background: var(--accent-soft); }
.qr-box { display: inline-block; padding: 10px; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.qr-box img, .qr-box canvas { display: block; }
.address-box { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: var(--panel); border-radius: var(--radius-sm); font-family: var(--code); font-size: 12px; word-break: break-all; }
.address-box code { flex: 1; }
.fee-box { padding: 4px 16px; background: var(--panel); border-radius: var(--radius-sm); }
.notes { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.notes li { padding: 3px 0; }
.steps { display: flex; gap: 8px; margin-bottom: 20px; font-size: 12px; font-weight: 700; color: var(--muted); }
.steps span.active { color: var(--accent); }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .app.has-right .main { margin-right: 0; }
  .rightpanel { position: static; width: auto; border: 0; padding: 0 32px 48px; max-width: 1080px; }
  .app.has-right { flex-wrap: wrap; }
  .app.has-right .main { flex-basis: calc(100% - var(--sidebar-w)); }
  .app.has-right .rightpanel { margin-left: var(--sidebar-w); flex-basis: calc(100% - var(--sidebar-w)); }
}
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main-side { grid-template-columns: 1fr; }
  .keystats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: calc(var(--tabbar-h) + 16px); }
  .app.has-right .main, .app.has-right .rightpanel { margin-left: 0; flex-basis: 100%; }
  .rightpanel { padding: 0 16px 96px; z-index: auto; }   /* no stacking context, so the ticket sheet can sit above the tab bar */
  .mobile-only { display: inline-flex !important; }
  .desktop-only { display: none !important; }
  .topbar { padding: 14px 16px 0; }
  .topbar h1 { font-size: 20px; }
  .content { padding: 12px 16px 24px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .pub-main, .pub-main.form-first { grid-template-columns: 1fr; gap: 28px; padding: 28px 16px 48px; }
  .pub-main .form-panel { order: -1; }
  .sub-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-value { font-size: 40px; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg); border-top: 1px solid var(--border);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.active { color: var(--accent); }

  /* Order ticket becomes a bottom sheet */
  .ticket.sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; max-height: 88vh; overflow-y: auto;
    border-radius: 16px 16px 0 0; border-bottom: 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform 200ms ease;
  }
  .ticket.sheet.open { transform: none; }
  .ticket.sheet .ticket-close { display: grid; position: absolute; right: 12px; top: 12px; }
  .sheet-backdrop.open { display: block; position: fixed; inset: 0; z-index: 80; background: var(--overlay); }
  .mobile-actions {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: var(--tabbar-h); z-index: 50;
    padding: 12px 16px; background: var(--bg); border-top: 1px solid var(--border);
  }
  .mobile-actions .btn { flex: 1; }
  body.has-actions .main { padding-bottom: calc(var(--tabbar-h) + 84px); }
}
@media (max-width: 600px) {
  .grid-4, .form-row { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .table-wrap { margin: 0 -16px; }
  .table th, .table td { padding-left: 16px; padding-right: 16px; }
  .finder { flex-direction: column; max-width: none; }
  .seg { grid-template-columns: 1fr; }
  .sub-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .sim-pill { display: none; }
  .modal { padding: 16px 8px; }
  .pub-head { padding: 0 16px; }
  .pub-head nav .hide-sm { display: none; }
  .ticker { padding: 0 16px; }
  .chain-row { grid-template-columns: 1fr 1fr 1fr auto; }
  .chain-row .hide-xs { display: none; }
  .toasts { bottom: calc(var(--tabbar-h) + 16px); }
}

/* =====================================================================
   Landing page (index.html)
   ===================================================================== */
.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: -48px; z-index: 300; padding: 8px 14px; border-radius: var(--radius-sm); background: var(--text); color: var(--bg); }
.skip-link:focus { top: 12px; }
body.lp { font-size: 16px; }
.lp-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* 1. Navigation */
.lp-nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.lp-nav-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.lp-nav .brand { padding: 0; }
.lp-links { display: flex; gap: 28px; flex: 1; }
.lp-links a, .lp-login, .lp-menu a { color: var(--text-2); font-weight: 600; font-size: 15px; transition: color var(--ease); }
.lp-links a:hover, .lp-login:hover { color: var(--text); text-decoration: none; }
.lp-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.lp-pill { border-radius: 999px; height: 44px; padding: 0 22px; }
.lp-nav .lp-pill { height: 38px; padding: 0 18px; }
.lp-burger { display: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; place-items: center; }
.lp-menu { display: none; }

/* 2. Hero */
.lp-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.lp-hero h1 { font-size: 56px; line-height: 1.04; letter-spacing: -0.035em; font-weight: 800; margin-bottom: 20px; }
.lp-lead { font-size: 19px; line-height: 1.55; color: var(--text-2); max-width: 540px; margin-bottom: 28px; }
.lp-email { display: flex; gap: 10px; max-width: 460px; }
.lp-email .input { height: 48px; border-radius: 999px; padding: 0 20px; }
.lp-email .btn { height: 48px; flex-shrink: 0; }
.lp-form-msg { min-height: 20px; margin: 8px 0 0 20px; font-size: 13px; color: var(--down); }

.lp-phone-wrap { margin: 0; display: flex; flex-direction: column; align-items: center; }
.phone { width: 300px; height: 612px; padding: 12px; border-radius: 46px; background: #111; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .35); position: relative; }
:root[data-theme="dark"] .phone { background: #2a2a2a; }
.phone-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 96px; height: 24px; border-radius: 0 0 14px 14px; background: inherit; z-index: 2; }
.phone-screen { height: 100%; border-radius: 34px; background: var(--bg); padding: 40px 18px 18px; overflow: hidden; font-size: 13px; }
.phone-status { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--muted); margin: -26px 6px 18px; }
.phone-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.phone-value { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.phone-change { font-size: 13px; font-weight: 700; }
.phone-chart { width: 100%; height: 120px; margin: 18px 0 8px; overflow: visible; }
.phone-chart path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke-dashoffset 1100ms ease-out; }
.phone-chart path.drawn { stroke-dashoffset: 0 !important; }
.phone-base { stroke: var(--border-strong); stroke-dasharray: 2 4; }
.phone-pills { display: flex; justify-content: space-between; margin-bottom: 18px; }
.phone-pills span { padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--muted); }
.phone-pills span.active { background: var(--accent-soft); color: var(--accent); }
.phone-section { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.phone-row { display: flex; justify-content: space-between; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.phone-row b { display: block; font-weight: 700; font-size: 13px; }
.phone-row span { display: block; font-size: 11px; color: var(--muted); }
.phone-row .r { text-align: right; }
.phone-row .r span { font-weight: 700; }
.lp-illustrative { margin-top: 14px; font-size: 12px; color: var(--muted); text-align: center; }

/* 3. Feature strip */
.lp-strip-wrap { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-strip { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 auto; }
.lp-strip li { padding: 26px 24px; text-align: center; font-weight: 700; font-size: 16px; border-left: 1px solid var(--border); }
.lp-strip li:first-child { border-left: 0; }

/* Sections */
.lp-section { padding: 96px 0; }
.lp-alt { background: var(--panel); }
.lp-alt .card:not(.flat) { background: var(--bg); }
.lp-section h2 { font-size: 36px; line-height: 1.15; letter-spacing: -0.025em; font-weight: 800; margin-bottom: 14px; }
.lp-sub { color: var(--text-2); font-size: 17px; margin-bottom: 28px; }
.lp-eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.lp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.lp-split > *, .lp-hero > * { min-width: 0; }   /* wide tables scroll inside their card instead of widening the page */
.lp-text p { color: var(--text-2); font-size: 17px; }
.lp-checks { list-style: none; padding: 0; margin: 20px 0 0; }
.lp-checks li { position: relative; padding: 9px 0 9px 30px; border-bottom: 1px solid var(--border); font-weight: 600; }
.lp-checks li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.lp-source { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.lp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -20px; }

/* 4. Options chain card */
.chain-card { padding-bottom: 14px; }
.chain-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.chain-symbol { font-size: 20px; font-weight: 800; }
.chain-symbol .muted { font-size: 13px; font-weight: 600; }
.chain-quote { font-size: 14px; font-weight: 600; margin-top: 2px; }
.chain-card .pills { margin-bottom: 8px; }
.chain-table { min-width: 520px; }
.chain-table td, .chain-table th { padding-top: 9px; padding-bottom: 9px; }
.chain-table tr.itm td { background: var(--accent-soft); }
.chain-table tr.price-line td { padding: 0; border-bottom: 0; position: relative; height: 22px; }
.chain-table tr.price-line td::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--accent); }
.chain-table tr.price-line span { position: relative; margin-left: 20px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; }
.chain-table tr.price-line:hover { background: none; }

/* 5. Strategy builder */
.payoff-legs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.payoff-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.payoff-stats .label { font-size: 12px; font-weight: 600; color: var(--muted); }
.payoff-stats .value { font-size: 17px; font-weight: 800; }

/* 6. Copy trading demo */
.lp-numbered { margin: 20px 0 16px; padding-left: 22px; }
.lp-numbered li { padding: 8px 0; color: var(--text-2); }
.lp-numbered li b { color: var(--text); }
.demo-card .lp-email { max-width: none; }
.demo-card .input { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.demo-card .input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 500; }
.demo-miss { margin: 14px 0 0; color: var(--text-2); }
.demo-trader { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.demo-trader .label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.demo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.demo-stats .value { font-size: 20px; font-weight: 800; }
.strat-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; }
.strat-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--text-2); }
.strat-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.demo-trades { list-style: none; padding: 0; margin: 0 0 12px; }
.demo-trades li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.demo-trades li span { display: block; font-size: 12px; color: var(--muted); }
.settings-preview { margin-top: 16px; }
.settings-preview .summary-list { margin-top: 8px; }

/* 7. How it works */
.lp-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.lp-steps li { position: relative; padding-top: 52px; }
.lp-steps li::after { content: ""; position: absolute; top: 18px; left: 48px; right: -12px; border-top: 1px solid var(--border-strong); }
.lp-steps li:last-child::after { display: none; }
.lp-step-n { position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.lp-steps b { display: block; font-size: 17px; margin-bottom: 4px; }
.lp-steps p { margin: 0; color: var(--text-2); }

/* 8. Pricing */
.lp-table { min-width: 680px; }
.lp-table td { white-space: normal; }
.lp-price-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; padding: 16px; border-radius: var(--radius-sm); background: var(--panel); }
.lp-price-row .label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.lp-price-row b { font-size: 16px; }

/* 9. Learn */
.lp-learn { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.lp-learn-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.lp-learn-card h3 { margin: 0; }
.lp-learn-card button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px; background: none; border: 0; color: var(--text); font: inherit; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer; }
.lp-learn-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 200ms ease; }
.lp-learn-body > p { overflow: hidden; margin: 0; padding: 0 20px; color: var(--text-2); font-size: 15px; }
.lp-learn-card.open .lp-learn-body { grid-template-rows: 1fr; }
.lp-learn-card.open .lp-learn-body > p { padding-bottom: 20px; }
.lp-plus { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.lp-plus::before, .lp-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; border-radius: 1px; background: var(--muted); transition: transform var(--ease); }
.lp-plus::after { transform: rotate(90deg); }
.lp-learn-card.open .lp-plus::after, .lp-faq-item[open] .lp-plus::after { transform: rotate(0deg); }

/* 10. Security */
.lp-security { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 32px; }
.lp-security b { display: block; font-size: 16px; margin-bottom: 4px; padding-top: 14px; border-top: 2px solid var(--accent); }
.lp-security span { color: var(--text-2); font-size: 15px; }

/* 11. FAQ */
.lp-faq-wrap { max-width: 820px; }
.lp-faq { margin-top: 20px; border-top: 1px solid var(--border); }
.lp-faq-item { border-bottom: 1px solid var(--border); }
.lp-faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 17px; font-weight: 700; cursor: pointer; list-style: none; }
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item p { margin: 0 0 20px; color: var(--text-2); max-width: 700px; }

/* 12. Final sign-up */
.lp-cta { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 24px; border-radius: 16px; background: var(--panel); }
.lp-cta h2 { margin-bottom: 22px; }
.lp-cta .lp-email { width: 100%; }
.lp-cta .lp-form-msg { margin-left: 0; }

/* 13. Footer */
.lp-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; }
.lp-foot-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; margin-bottom: 40px; }
.lp-foot-cols h3 { font-size: 13px; font-weight: 800; margin-bottom: 12px; }
.lp-foot-cols a { display: block; padding: 5px 0; color: var(--text-2); font-weight: 500; font-size: 14px; }
.lp-disclosures { padding-top: 28px; border-top: 1px solid var(--border); }
.lp-disclosures p { font-size: 12px; line-height: 1.6; color: var(--muted); margin-bottom: 12px; max-width: 980px; }
.lp-disclosures a { font-weight: 600; }

/* Scroll-in */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 200ms ease, transform 200ms ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone-chart path { transition: none; stroke-dashoffset: 0 !important; }
  .lp-learn-body { transition: none; }
}

/* Landing responsive: 1280 / 768 / 375 */
@media (max-width: 1100px) {
  .lp-hero h1 { font-size: 46px; }
  .lp-split { gap: 40px; }
  .lp-learn { grid-template-columns: repeat(2, 1fr); }
  .lp-foot-cols { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .lp-container { padding: 0 20px; }
  .lp-links, .lp-login { display: none; }
  .lp-burger { display: grid; }
  .lp-menu { display: none; flex-direction: column; padding: 8px 20px 16px; border-top: 1px solid var(--border); background: var(--bg); }
  body.menu-open .lp-menu { display: flex; }
  .lp-menu a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .lp-menu a:last-child { border-bottom: 0; }
  .lp-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; padding-bottom: 56px; }
  .lp-split { grid-template-columns: 1fr; gap: 32px; }
  .lp-split.reverse > :first-child { order: 2; }
  .lp-section { padding: 64px 0; }
  .lp-section h2 { font-size: 30px; }
  .lp-steps { grid-template-columns: 1fr; gap: 20px; }
  .lp-steps li { padding: 0 0 0 54px; min-height: 36px; }
  .lp-steps li::after { top: 44px; bottom: -14px; left: 17px; right: auto; border-top: 0; border-left: 1px solid var(--border-strong); }
  .lp-security { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .lp-container { padding: 0 16px; }
  .lp-nav .lp-pill { padding: 0 14px; }
  .lp-actions { gap: 8px; }
  .lp-hero h1 { font-size: 36px; }
  .lp-lead { font-size: 17px; }
  .lp-email { flex-direction: column; }
  .lp-email .btn { width: 100%; }
  .phone { width: 280px; height: 580px; }
  .lp-strip { grid-template-columns: 1fr; }
  .lp-strip li { border-left: 0; border-top: 1px solid var(--border); padding: 16px; }
  .lp-strip li:first-child { border-top: 0; }
  .lp-section h2 { font-size: 26px; }
  .lp-scroll { margin: 0 -16px; }
  .payoff-stats, .demo-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .payoff-stats .value, .demo-stats .value { font-size: 15px; }
  .lp-price-row { grid-template-columns: 1fr; }
  .lp-learn { grid-template-columns: 1fr; }
  .lp-foot-cols { grid-template-columns: repeat(2, 1fr); }
  .lp-cta { padding: 40px 16px; }
  .settings-preview .summary-list li { flex-direction: column; gap: 6px; }
  .settings-preview .chips { justify-content: flex-start; }
  .settings-preview .summary-list li > span:last-child { text-align: left; }
}

.lp-cta-btn { height: 52px; padding: 0 32px; font-size: 16px; }
@media (max-width: 600px) { .lp-hero-copy .lp-cta-btn { width: 100%; } }

/* Single-column auth pages (sign up) */
.pub-main.single { grid-template-columns: minmax(0, 460px); justify-content: center; }

/* Ticker market groups */
.ticker-group { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--border); }
.ticker-group:first-child { padding-left: 0; border-left: 0; }
.ticker-item .badge.sim { align-self: center; }

.lp-narrow { max-width: 720px; }

/* Hero copy */
.lp-hero-copy { max-width: 560px; }
.lp-hero h1 { text-wrap: balance; letter-spacing: -0.04em; margin-bottom: 22px; }
.hero-accent { color: var(--accent); }
.lp-hero .lp-lead { font-size: 20px; line-height: 1.5; color: var(--text-2); margin-bottom: 22px; text-wrap: pretty; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0 0 34px; }
.hero-points li { position: relative; padding-left: 24px; font-size: 15px; font-weight: 700; color: var(--text); }
.hero-points li::before { content: ""; position: absolute; left: 0; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--accent-soft); }
.hero-points li::after { content: ""; position: absolute; left: 5px; top: 50%; width: 6px; height: 3px; margin-top: -3px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-link { display: inline-flex; align-items: center; gap: 2px; color: var(--text); font-weight: 700; }
.hero-link .ico { width: 18px; height: 18px; transition: transform var(--ease); }
.hero-link:hover { text-decoration: none; color: var(--accent); }
.hero-link:hover .ico { transform: translateX(3px); }
@media (max-width: 900px) { .lp-hero-copy { max-width: none; } }
@media (max-width: 600px) {
  .lp-hero .lp-lead { font-size: 17px; }
  .hero-points { gap: 8px 16px; margin-bottom: 26px; }
  .hero-points li { font-size: 14px; }
  .hero-actions { gap: 16px; }
  .hero-actions .lp-cta-btn { width: 100%; }
  .hero-link { width: 100%; justify-content: center; }
}

/* Trading page market tabs scroll sideways instead of wrapping */
#trade-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
#trade-tabs::-webkit-scrollbar { display: none; }
#trade-tabs button { flex-shrink: 0; }

/* Admin → Payments: crypto network switches */
.pay-net-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px 20px; }

/* Deposit: crypto address with QR */
.dep-address { display: flex; gap: 16px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.dep-address-info { flex: 1; min-width: 0; display: grid; gap: 6px; }
@media (max-width: 560px) { .dep-address { flex-direction: column; align-items: stretch; } .dep-address .qr-box { align-self: center; } }
.pay-net { display: grid; gap: 6px; }
