/* ============================================================ tokens */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #f1f3f6;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #0f1728;
  --text-2: #3d4757;
  --muted: #677285;
  --accent: #1f5bd8;
  --accent-hover: #1a4dba;
  --accent-weak: #edf2fe;
  --up: #0a7a4f;
  --up-weak: #e8f6ef;
  --down: #c0352b;
  --down-weak: #fdeeec;
  --warn: #a6590b;
  --warn-weak: #fdf4e3;
  --chart-grid: #eef0f3;
  --shadow-sm: 0 1px 2px rgba(15, 23, 40, .05);
  --shadow-md: 0 8px 24px rgba(15, 23, 40, .12), 0 2px 6px rgba(15, 23, 40, .06);
  --radius: 10px;
  --radius-sm: 7px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --glass: rgba(255, 255, 255, .72);
  --glass-strong: rgba(255, 255, 255, .88);
  --glass-border: rgba(15, 23, 40, .08);
  --grad: linear-gradient(135deg, #2f6bff 0%, #6a5cff 55%, #a24dff 100%);
  --glow: rgba(70, 90, 255, .26);
  --mesh-1: rgba(70, 110, 255, .20);
  --mesh-2: rgba(160, 90, 255, .16);
  --mesh-3: rgba(0, 190, 150, .10);
  color-scheme: light;
}
/* data-theme is set on <html> by a script in index.html: the saved choice, else the system setting */
:root[data-theme="dark"] {
    --bg: #0a0d13;
    --surface: #11151d;
    --surface-2: #151a23;
    --surface-3: #1a202b;
    --border: #232a36;
    --border-strong: #313a49;
    --text: #eef1f5;
    --text-2: #c3cad5;
    --muted: #8d97a7;
    --accent: #5b8ff0;
    --accent-hover: #75a2f3;
    --accent-weak: rgba(91, 143, 240, .14);
    --up: #3ccf8e;
    --up-weak: rgba(60, 207, 142, .12);
    --down: #f2766b;
    --down-weak: rgba(242, 118, 107, .12);
    --warn: #f0b04a;
    --warn-weak: rgba(240, 176, 74, .12);
    --chart-grid: #1b212b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, .5);
    --glass: rgba(19, 24, 34, .62);
    --glass-strong: rgba(19, 24, 34, .86);
    --glass-border: rgba(255, 255, 255, .07);
    --grad: linear-gradient(135deg, #4f7dff 0%, #8b6cff 55%, #c06bff 100%);
    --glow: rgba(110, 120, 255, .30);
    --mesh-1: rgba(60, 100, 255, .22);
    --mesh-2: rgba(150, 80, 255, .18);
    --mesh-3: rgba(0, 200, 160, .08);
    color-scheme: dark;
}

:root[data-theme="dark"] .show-light, :root:not([data-theme="dark"]) .show-dark { display: none; }

/* ============================================================ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.011em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================ top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { max-width: 1280px; margin: 0 auto; height: 56px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; }
.brand-mark { width: 32px; height: 32px; flex: none; border-radius: 8px; display: block; }
.brand-name { font-weight: 500; letter-spacing: -0.015em; }
.brand-name b { font-weight: 750; margin-left: 1px; }
.nav { display: flex; gap: 4px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-item {
  position: relative; height: 100%; display: flex; align-items: center; padding: 0 12px;
  border: 0; background: none; color: var(--muted); font: 500 14px var(--font); cursor: pointer; white-space: nowrap;
}
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--text); }
.nav-item.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.user-btn {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 4px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 500 13px var(--font); cursor: pointer;
}
.user-btn:hover { border-color: var(--border-strong); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; font-weight: 650; font-size: 12px; text-transform: uppercase; }

/* ============================================================ layout */
.page { max-width: 1280px; margin: 0 auto; padding: 28px 24px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; font-weight: 650; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.footer { max-width: 1280px; margin: 0 auto; padding: 0 24px 32px; color: var(--muted); font-size: 12px; }

/* ============================================================ panels + stats */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 15px; font-weight: 600; }
.panel-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.panel-body { padding: 18px; }
.panel-foot { padding: 10px 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.panel.danger { border-color: color-mix(in srgb, var(--down) 35%, var(--border)); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); min-width: 0; }
.panel .stat { box-shadow: none; background: var(--surface-2); }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 500; display: flex; justify-content: space-between; gap: 8px; }
.stat-value { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============================================================ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--down); border-color: var(--down); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--down) 88%, #000); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; height: 38px; }
.icon-btn { width: 30px; height: 30px; padding: 0; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { color: var(--down); background: var(--down-weak); }

.input, .select {
  height: 34px; padding: 0 11px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 14px var(--font); min-width: 0;
}
.select { padding-right: 28px; }
.input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.input:focus, .select:focus, .btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible, .seg button:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
/* show / hide password eye (added by app.js to every password box) */
.field > .pw-wrap, .pw-wrap { position: relative; display: block; font: inherit; color: inherit; }
.pw-wrap > .input { width: 100%; box-sizing: border-box; padding-right: 38px; }
.pw-eye {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 30px; height: 28px;
  display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: none;
  color: var(--muted); cursor: pointer; padding: 0;
}
.pw-eye:hover { color: var(--text); }
.pw-eye:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field .input { width: 100%; height: 38px; }
.help { font-size: 12.5px; color: var(--muted); margin: 0; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form-row .field { flex: 1 1 140px; }
.form-row .field.narrow { flex: 0 1 120px; }
.form-stack { display: grid; gap: 14px; max-width: 420px; }
.form-msg { font-size: 13px; color: var(--muted); }
.form-msg.err { color: var(--down); }
.inline-alert { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; background: var(--down-weak); color: var(--down); }
.inline-alert.info { background: var(--accent-weak); color: var(--accent); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border: 1px solid var(--border); border-radius: 9px; }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 500 13px var(--font); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.switch { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: background .15s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(14px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.accent { background: var(--accent-weak); color: var(--accent); }
.badge.success { background: var(--up-weak); color: var(--up); }
.badge.danger { background: var(--down-weak); color: var(--down); }
.badge.warn { background: var(--warn-weak); color: var(--warn); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pulse .dot { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.chg { font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg.pill { display: inline-block; padding: 2px 8px; border-radius: 6px; }
.chg.pill.up { background: var(--up-weak); }
.chg.pill.down { background: var(--down-weak); }

/* ============================================================ tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 550;
  text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table th.num { text-align: right; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.table.clickable tbody tr:not(.expand-row):not(.empty-row) { cursor: pointer; }
.table.clickable tbody tr:not(.expand-row):not(.empty-row):hover td { background: var(--surface-2); }
.table tbody tr.selected td { background: var(--accent-weak) !important; }
.table tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table .actions { text-align: right; width: 1%; }
.sym { display: flex; flex-direction: column; min-width: 0; }
.sym b { font-weight: 600; letter-spacing: .01em; }
.sym small { color: var(--muted); font-size: 12.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.weight { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.weight-bar { width: 56px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.weight-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.empty-row td { padding: 0 !important; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); white-space: normal; }
.empty .icon { width: 28px; height: 28px; margin-bottom: 8px; color: var(--border-strong); }
.empty strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 4px; }

/* ============================================================ watchlist detail */
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px; border-bottom: 1px solid var(--border); }
.detail-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0; }
.detail-title h2 { font-size: 22px; font-weight: 650; }
.detail-title .name { color: var(--muted); }
.detail-price { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: 380px; }
.chart.small { height: 300px; }
/* range click: dim the old chart and spin while fresh bars load */
.chart { position: relative; transition: opacity .15s; }
.chart.loading { opacity: .45; pointer-events: none; }
.chart.loading::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; z-index: 5;
  border: 3px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: chart-spin .7s linear infinite;
}
@keyframes chart-spin { to { transform: rotate(360deg); } }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; background: var(--muted); }
.legend i.accent { background: var(--accent); }
.legend i.dashed { background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 7px); }
.chart-legend { margin-top: 10px; gap: 8px 20px; }
.chart-legend span { cursor: help; white-space: nowrap; }
.chart-legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 4px; }
.chart-legend b:empty { display: none; }
.legend i.lg-candle { width: 10px; height: 12px; border-radius: 2px; background: linear-gradient(90deg, var(--up) 0 45%, transparent 45% 55%, var(--down) 55%); }
.legend i.lg-prev { background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 6px); }
.legend i.lg-vol { width: 10px; height: 10px; border-radius: 1px; background: linear-gradient(0deg, color-mix(in srgb, var(--up) 45%, transparent) 0 60%, transparent 60%); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ============================================================ movers / news */
/* AI picks */
.badge.rating { min-width: 46px; justify-content: center; font-weight: 600; }
.score { display: flex; align-items: center; gap: 8px; }
.score-bar { width: 72px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: 3px; background: var(--muted); }
.score-bar.buy i { background: var(--up); }
.score-bar.sell i { background: var(--down); }
.drivers { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--text-2); }
.driver { display: inline-block; white-space: nowrap; }
.driver.pos::first-letter { color: var(--up); }
.driver.neg::first-letter { color: var(--down); }
.factors-wrap { padding: 8px 0 2px; max-width: min(900px, calc(100vw - 80px)); position: sticky; left: 18px; }
.factors-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 10px; font-size: 13px; }
.factors { display: grid; grid-template-columns: minmax(160px, max-content) minmax(70px, max-content) 160px max-content; gap: 8px 18px; align-items: center; font-size: 13px; }
.factor { display: contents; }
.factor-bar { position: relative; height: 6px; border-radius: 3px; background: var(--surface-3); }
.factor-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--border-strong); }
.factor-bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.factor-bar i.pos { background: var(--up); }
.factor-bar i.neg { background: var(--down); }
@media (max-width: 640px) { .factors { grid-template-columns: 1fr max-content; } .factor-bar { display: none; } }

.warn-alert { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-weak); color: var(--text-2); margin: 6px 0 12px; line-height: 1.45; }
.warn-alert .icon { color: var(--warn); margin-top: 2px; }
.warn-alert b { color: var(--warn); }
#dc-table tr.dc-risky td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.verdict { display: flex; align-items: center; gap: 8px; }
.verdict small { color: var(--muted); font-size: 12px; }
#dc-table tr.dc-buy td:first-child { box-shadow: inset 3px 0 0 var(--up); }
#dc-table tr.dc-sell td:first-child { box-shadow: inset 3px 0 0 var(--down); }
#wsb-table tr.dc-buy td:first-child { box-shadow: inset 3px 0 0 var(--up); }
#wsb-table tr.dc-sell td:first-child { box-shadow: inset 3px 0 0 var(--down); }
#wsb-table tr.dc-risky td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.wsb-rank { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wsb-rank small { display: block; font-size: 11px; }
.buzz { display: flex; flex-direction: column; gap: 4px; min-width: 110px; }
.buzz b { font-variant-numeric: tabular-nums; font-weight: 600; }
.buzz b small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.buzz-bar { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--muted) 18%, transparent); overflow: hidden; }
.buzz-bar i { display: block; height: 100%; border-radius: 2px; background: var(--grad, var(--accent)); }
.hot { color: var(--warn); font-weight: 600; }
.stat-value.warn { color: var(--warn); }
#sh-table tr.dc-buy td:first-child { box-shadow: inset 3px 0 0 var(--up); }
#sh-table tr.dc-sell td:first-child { box-shadow: inset 3px 0 0 var(--down); }
#sh-table tr.dc-risky td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.short-bar i { background: linear-gradient(90deg, var(--warn), var(--down)); }
#dv-table tr.dv-top td:first-child { box-shadow: inset 3px 0 0 var(--up); }
#dv-table tr.dv-risk td:first-child { box-shadow: inset 3px 0 0 var(--down); }
.safety { display: flex; align-items: center; gap: 8px; min-width: 130px; cursor: help; }
.safety b { font-variant-numeric: tabular-nums; width: 24px; text-align: right; }
.safety .buzz-bar { flex: 1; max-width: 70px; }
.safety.hi .buzz-bar i { background: var(--up); }
.safety.mid .buzz-bar i { background: var(--warn); }
.safety.lo .buzz-bar i { background: var(--down); }
.safety small { color: var(--muted); font-size: 11.5px; }
.div-notes { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: var(--glass); border: 1px solid var(--glass-border); font-size: 13px; }
.div-notes b { margin-bottom: 2px; }
.div-notes .kvs { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); margin-top: 4px; }
.squeeze { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 1px 6px; border-radius: 999px; color: var(--warn); background: var(--warn-weak); cursor: help; }
.dc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 18px; border-bottom: 1px solid var(--glass-border);
  background: linear-gradient(90deg, color-mix(in srgb, var(--up) 9%, transparent), transparent 70%); }
.dc-top-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--up); }
.dc-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); }
.dc-chip .ring { width: 38px; height: 38px; }
.dc-chip .ring svg { width: 38px; height: 38px; }
.dc-chip span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.dc-chip small { color: var(--muted); font-size: 11.5px; }

.headline { white-space: normal !important; min-width: 280px; max-width: 520px; line-height: 1.4; }
.headline a { color: var(--text); }
.headline a:hover { color: var(--accent); text-decoration: none; }
.headline .meta { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.expand-row td { background: var(--surface-2); white-space: normal; padding: 6px 18px 14px !important; }
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.news li:last-child { border-bottom: 0; }
.news a { color: var(--text); font-weight: 500; }
.news a:hover { color: var(--accent); text-decoration: none; }
.news .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.news .summary { color: var(--text-2); font-size: 13px; margin-top: 4px; max-width: 900px; }

/* ============================================================ activity */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.timeline .dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.timeline time { display: block; color: var(--muted); font-size: 12px; }

/* ============================================================ auth */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 22px; }
.auth-wrap .brand { font-size: 17px; }
.auth-wrap .brand-mark { width: 40px; height: 40px; border-radius: 10px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: var(--shadow-md); }
.auth-card h1 { font-size: 20px; font-weight: 650; }
.auth-card .lead { color: var(--muted); margin: 6px 0 20px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card.wide { max-width: 520px; }
.su-step { display: grid; gap: 14px; }
.su-step[hidden], .su-only[hidden] { display: none; }
.su-steps { display: flex; gap: 8px; list-style: none; margin: -4px 0 0; padding: 0; }
.su-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted); padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.su-steps li b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); font-size: 11px; }
.su-steps li.on { color: var(--text); border-color: var(--accent); }
.su-steps li.on b { background: var(--accent); color: #fff; }
.su-group { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.su-group legend { font-size: 13px; font-weight: 500; color: var(--text-2); padding: 0; margin-bottom: 8px; }
.su-group legend small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.su-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.su-chips label, .su-cards label { cursor: pointer; position: relative; }
.su-chips input, .su-cards input { position: absolute; opacity: 0; pointer-events: none; }
.su-chips span { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--text-2); background: var(--surface); transition: .15s; }
.su-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.su-cards span { display: grid; gap: 2px; height: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; background: var(--surface); transition: .15s; }
.su-cards small { color: var(--muted); font-size: 12px; }
.su-chips label:hover span, .su-cards label:hover span { border-color: var(--accent); }
.su-chips input:checked + span, .su-cards input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); }
.su-chips input:focus-visible + span, .su-cards input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.su-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); cursor: pointer; }
.su-check input { margin-top: 2px; accent-color: var(--accent); flex: none; }
.auth-actions { display: flex; gap: 8px; }
.auth-actions .btn-block { flex: 1; }
@media (max-width: 420px) { .su-cards { grid-template-columns: 1fr; } }
.auth-switch { text-align: center; color: var(--muted); font-size: 13px; margin: 18px 0 0; }
.auth-switch a { cursor: pointer; font-weight: 500; }
.auth-foot { color: var(--muted); font-size: 12px; text-align: center; max-width: 400px; }
.lp-foot a, .footer a { color: inherit; text-decoration: underline; }

/* Terms of Use */
.legal-page { background: var(--bg); }
.legal-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, calc(50% - 400px)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.legal-top .brand { color: var(--text); text-decoration: none; }
.legal { max-width: 800px; margin: 0 auto; padding: 36px 16px 64px; line-height: 1.7; color: var(--text-2); font-size: 15px; }
.legal h1 { font-size: 32px; font-weight: 700; color: var(--text); margin: 0; letter-spacing: -0.02em; }
.legal-meta { color: var(--muted); margin: 6px 0 24px; font-size: 13.5px; }
.legal h2 { font-size: 18px; font-weight: 650; color: var(--text); margin: 36px 0 10px; scroll-margin-top: 80px; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal b { color: var(--text); }
.legal .caps, .legal .caps-inline { text-transform: none; font-size: 13.5px; letter-spacing: .01em; color: var(--text); }
.legal-callout { padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-radius: 12px; margin-bottom: 24px; }
.legal-toc { padding: 16px 18px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; }
.legal-toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 28px; font-size: 14px; }
.legal-toc li { break-inside: avoid; margin: 2px 0; }
.legal-foot { margin-top: 40px !important; color: var(--muted); font-size: 13px; }
@media (max-width: 600px) { .legal-toc ol { columns: 1; } .legal h1 { font-size: 26px; } }
@media print { .legal-top { display: none; } .legal { max-width: none; } }

/* ============================================================ settings */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.settings-intro h2 { font-size: 15px; font-weight: 600; }
.settings-intro p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.profile { display: flex; align-items: center; gap: 14px; }
.profile .avatar { width: 44px; height: 44px; font-size: 17px; }
.profile b { font-size: 16px; font-weight: 600; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }

/* ============================================================ dialog + toast */
dialog.modal { border: 1px solid var(--border); border-radius: 14px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); }
dialog.modal::backdrop { background: rgba(10, 13, 19, .45); backdrop-filter: blur(2px); }
.modal-body { padding: 22px 22px 8px; }
.modal-body h2 { font-size: 17px; font-weight: 650; }
.modal-body p { color: var(--text-2); margin: 8px 0 0; }
.modal-body .field { margin-top: 16px; }
.modal-actions { display: flex; flex-direction: row-reverse; justify-content: flex-start; gap: 8px; padding: 18px 22px 20px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--text); color: var(--surface); box-shadow: var(--shadow-md); font-size: 13.5px; animation: toast-in .18s ease-out; }
.toast.error { background: var(--down); color: #fff; }
.toast .icon { margin-top: 2px; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ============================================================ premium layer: glass, gradients, glow */
.bg-mesh {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 45% at 8% -5%, var(--mesh-1), transparent 70%),
    radial-gradient(45% 40% at 95% 5%, var(--mesh-2), transparent 70%),
    radial-gradient(60% 50% at 50% 110%, var(--mesh-3), transparent 70%),
    var(--bg);
}
body { background: var(--bg); }
.topbar { background: var(--glass-strong); backdrop-filter: saturate(1.6) blur(16px); border-bottom-color: var(--glass-border); }
.panel, .stat, .index-tile {
  background: var(--glass); border-color: var(--glass-border);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 10px 30px -18px rgba(15, 23, 40, .35);
}
.panel .stat { background: color-mix(in srgb, var(--surface-2) 70%, transparent); backdrop-filter: none; }
.table th { background: color-mix(in srgb, var(--surface-2) 85%, transparent); }
.panel-head, .panel-foot, .table td, .detail-head { border-color: var(--glass-border); }
.brand-mark { box-shadow: 0 4px 14px -3px rgba(10, 24, 48, .55); }
.btn-primary { background: var(--grad); border-color: transparent; box-shadow: 0 6px 18px -6px var(--glow); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); border-color: transparent; }
.nav-item.active::after { background: var(--grad); height: 2.5px; box-shadow: 0 0 10px var(--glow); }
.switch input:checked + span { background: var(--grad); }
.glow {
  border: 1px solid transparent;
  background: linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box, var(--grad) border-box;
  box-shadow: 0 24px 60px -28px var(--glow), 0 1px 0 rgba(255, 255, 255, .06) inset;
}
.accent-ic { color: var(--accent); vertical-align: -3px; margin-right: 6px; }

/* market status pill */
.mkt { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.mkt .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mkt.open { color: var(--up); }
.mkt.open .dot { animation: ping 1.8s ease-out infinite; }
.mkt.pre, .mkt.post { color: var(--warn); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 7px transparent; } }

/* ticker tape */
.tape { height: 34px; overflow: hidden; border-top: 1px solid var(--glass-border); -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.tape-track { display: inline-flex; height: 100%; align-items: center; white-space: nowrap; animation: tape 60s linear infinite; will-change: transform; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-copy { display: inline-flex; }
.tape-item { display: inline-flex; align-items: baseline; gap: 8px; padding: 0 20px; font-size: 12.5px; border-right: 1px solid var(--glass-border); }
.tape-item b { font-weight: 600; }
.tape-item .tp { color: var(--text-2); }
.tape-item .tc { font-weight: 600; font-size: 12px; }
.tape-wsb { align-self: center; font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 1px 6px; border-radius: 999px;
  color: var(--warn); background: var(--warn-weak); }
.tape-label { display: inline-flex; align-items: center; gap: 6px; align-self: stretch; padding: 0 16px; border: 0; border-right: 1px solid var(--glass-border);
  background: var(--warn-weak); color: var(--warn); font: inherit; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; cursor: pointer; }
.tape-label .icon { width: 13px; height: 13px; }
.tape-item.link { cursor: pointer; }
.tape-item.link:hover b { text-decoration: underline; }
@keyframes tape { to { transform: translateX(-50%); } }

/* motion */
.view.enter { animation: view-in .38s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }
.flash-up, .flash-down { border-radius: 4px; }
.flash-up { animation: flash-up 1.4s ease-out; }
.flash-down { animation: flash-down 1.4s ease-out; }
@keyframes flash-up { 0%, 25% { background: var(--up-weak); color: var(--up); box-shadow: 0 0 0 3px var(--up-weak); } }
@keyframes flash-down { 0%, 25% { background: var(--down-weak); color: var(--down); box-shadow: 0 0 0 3px var(--down-weak); } }
.skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3) 25%, color-mix(in srgb, var(--surface-3) 40%, var(--surface)) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.skel.tall { height: 24px; margin: 8px 0; }
.skeleton-row td { padding-top: 16px; padding-bottom: 16px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* sparklines */
.spark { display: block; overflow: visible; }
.spark.up { color: var(--up); }
.spark.down { color: var(--down); }
.spark-cell { width: 110px; }
.spark-base { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }

/* ============================================================ home */
.hero-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.hero-title {
  font-size: 30px; font-weight: 700; letter-spacing: -.025em; margin-top: 4px;
  background: linear-gradient(95deg, var(--text) 30%, color-mix(in srgb, var(--accent) 80%, #a24dff)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.index-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.index-tile { border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 14px 16px 8px; display: grid; gap: 2px; animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; transition: transform .2s, box-shadow .2s; }
.index-tile:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -22px var(--glow); }
.ix-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.ix-price { font-size: 22px; font-weight: 650; letter-spacing: -.02em; justify-self: start; }
.ix-spark { margin: 6px -4px 0; }
.ix-spark svg { width: 100%; height: 44px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.hero-card { padding: 20px 20px 14px; border-radius: 14px; }
.hero-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.hero-value { font-size: 40px; font-weight: 700; letter-spacing: -.035em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hero-sub { margin-top: 2px; font-size: 13.5px; }
.hero-kpis { display: flex; gap: 28px; flex-wrap: wrap; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi-value { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.hero-chart { height: 250px; margin-top: 14px; }
.hero-chart.is-empty { visibility: hidden; height: 0; }
.hero-foot { font-size: 12px; margin-top: 6px; }
.pick-list { display: grid; padding: 6px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; animation: rise .45s both; transition: background .15s; }
.pick:hover { background: color-mix(in srgb, var(--surface-3) 80%, transparent); }
.pick-sym { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-sym small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; font-weight: 550; }
.ring { position: relative; width: 44px; height: 44px; flex: none; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: var(--surface-3); }
.ring-fg { stroke: var(--muted); stroke-linecap: round; stroke-dashoffset: var(--off); animation: ring 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.ring.buy .ring-fg { stroke: var(--up); filter: drop-shadow(0 0 3px var(--up-weak)); }
.ring.sell .ring-fg { stroke: var(--down); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
@keyframes ring { from { stroke-dashoffset: var(--full); } }
.heatmap { position: relative; border-radius: 10px; overflow: hidden; }
.heat-tile {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 2px solid transparent; background-clip: padding-box !important; border-radius: 9px; padding: 4px; overflow: hidden;
  font: 650 15px var(--font); cursor: pointer; animation: pop .5s cubic-bezier(.2, .7, .2, 1) both; transition: filter .15s, transform .15s;
}
.heat-tile:hover { filter: brightness(1.1) saturate(1.1); z-index: 1; }
.heat-tile span { font-size: 12.5px; font-weight: 500; opacity: .92; }
.heat-tile.small { font-size: 11.5px; }
.heat-tile.small span { display: none; }
.timeline-empty { display: block !important; padding: 0 !important; }
.settled .index-tile, .settled .pick, .settled .heat-tile, .settled .ring-fg { animation: none; }

@media (max-width: 1100px) { .hide-md { display: none; } }
/* nine nav items: tighten them on mid-size screens, then give them their own row */
@media (max-width: 1240px) {
  .nav-item { padding: 0 8px; font-size: 13.5px; }
  .nav-item.active::after { left: 6px; right: 6px; }
  .mkt-label { display: none; }
  .mkt { padding: 0 9px; }
}
@media (max-width: 1000px) and (min-width: 641px) {
  .topbar-inner { flex-wrap: wrap; height: auto; }
  .brand { height: 56px; }
  .nav { order: 3; flex-basis: 100%; height: 42px; border-top: 1px solid var(--glass-border); }
}
@media (max-width: 960px) {
  .index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .mkt { padding: 0 9px; }
  .mkt-label { display: none; }
  .nav { justify-content: flex-start; }
  .index-grid { gap: 10px; }
  .index-tile { padding: 12px 12px 6px; }
  .ix-price { font-size: 18px; }
  .hero-title { font-size: 24px; }
  .hero-value { font-size: 32px; }
  .hero-kpis { gap: 18px; }
  .hero-chart { height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .tape { overflow-x: auto; }
  .tape-track { animation: none !important; }
}

/* ============================================================ responsive */
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .settings { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 0 12px; gap: 0 12px; height: auto; flex-wrap: wrap; }
  .brand { height: 52px; }
  .nav { order: 3; flex-basis: 100%; height: 42px; justify-content: flex-start; border-top: 1px solid var(--glass-border); margin: 0 -12px; padding: 0 4px; }
  .nav-item { padding: 0 7px; font-size: 13.5px; }
  .nav-item.active::after { left: 5px; right: 5px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .user-btn .uname { display: none; }
  .user-btn { padding: 0 4px; }
  .page { padding: 20px 16px 40px; }
  .footer { padding: 0 16px 24px; }
  .page-head h1 { font-size: 20px; }
  .hide-sm { display: none; }
  .chart { height: 280px; }
  .stat-value { font-size: 20px; }
  .detail-head { padding: 14px; }
  .panel-body { padding: 14px; }
  .table th:first-child, .table td:first-child { padding-left: 14px; }
  .table th:last-child, .table td:last-child { padding-right: 14px; }
}

/* ============================================================ landing page (signed out) */
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
a.brand { text-decoration: none; }
.lp { position: relative; z-index: 1; min-height: 100vh; }
.lp-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.lp-nav { position: sticky; top: 0; z-index: 20; background: var(--glass-strong); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--glass-border); }
.lp-nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.lp-links { display: flex; gap: 22px; margin-right: auto; margin-left: 12px; }
.lp-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.lp-links a:hover { color: var(--text); }
.lp-nav-actions { display: flex; align-items: center; gap: 8px; }
.lp-tape { border-top: 0; border-bottom: 1px solid var(--glass-border); }
.lp-tape .tape-item { cursor: default; }

.lp-hero { padding: 72px 0 56px; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--accent); background: var(--glass); border: 1px solid var(--glass-border); }
.lp-eyebrow .icon { width: 14px; height: 14px; }
.lp-hero h1 { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 750; margin: 20px 0 18px; }
.lp-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-sub { font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 540px; margin: 0; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.lp-fine { margin: 14px 0 0; color: var(--muted); font-size: 13px; }

.lp-visual { position: relative; padding: 28px 26px 40px 0; }
.lp-window { position: relative; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow-md), 0 30px 80px -30px var(--glow); overflow: hidden; }
.lp-window-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--glass-border); font-size: 12px; color: var(--muted); }
.lp-window-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.lp-window-bar span { margin-left: 8px; }
.lp-window-head { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px 4px; }
.lp-window-head b { font-size: 15px; }
.lp-price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-chart { display: block; width: 100%; height: 210px; }
.lp-window-foot { display: flex; gap: 16px; padding: 8px 18px 14px; font-size: 11.5px; color: var(--muted); }
.lp-sw { display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin-right: 6px; }
.lp-sw.up { height: 10px; width: 6px; border-radius: 1px; background: var(--up); }
.lp-sw.prev { background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 6px); }
.lp-sw.fc { background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 7px); }
.lp-float { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 14px;
  background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow-md); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: lp-bob 6s ease-in-out infinite; }
.lp-float span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.lp-float b { font-size: 13px; }
.lp-float small { font-size: 11.5px; color: var(--muted); }
.lp-float-a { left: -34px; top: 4px; }
.lp-float-b { right: -6px; top: 46%; animation-delay: -2s; }
.lp-float-c { left: 6%; bottom: 0; animation-delay: -4s; }
.lp-ring, .lp-shield { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--up);
  background: var(--up-weak); box-shadow: inset 0 0 0 3px var(--up); }
.lp-shield { border-radius: 10px; }
@keyframes lp-bob { 50% { transform: translateY(-6px); } }

.lp-section { padding: 84px 0; }
.lp-alt { background: var(--glass); border-block: 1px solid var(--glass-border); }
.lp-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.lp-kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.lp-section h2, .lp-final h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.025em; line-height: 1.15; font-weight: 720; margin: 10px 0 0; }
.lp-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.lp-card { padding: 22px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--glass-border); transition: transform .2s ease, box-shadow .2s ease; }
.lp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.lp-card h3 { font-size: 16px; margin: 14px 0 6px; }
.lp-card p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.lp-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 6px 16px -6px var(--glow); }
.lp-ic .icon { width: 20px; height: 20px; }
.lp-ic-warn { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 6px 16px -6px rgba(245, 158, 11, .5); }
.lp-ic-down { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 6px 16px -6px rgba(244, 63, 94, .5); }
.lp-ic-up { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 6px 16px -6px rgba(16, 185, 129, .5); }

.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: none; }
.lp-steps li { padding: 26px; border-radius: 16px; background: var(--surface); border: 1px solid var(--glass-border); }
.lp-steps li > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--grad); }
.lp-steps h3 { font-size: 17px; margin: 16px 0 6px; }
.lp-steps p { margin: 0; color: var(--text-2); line-height: 1.55; font-size: 14.5px; }

.lp-honest { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.lp-honest p { color: var(--text-2); font-size: 16px; line-height: 1.65; margin: 16px 0 0; }
.lp-checks { list-style: none; margin: 0; padding: 26px; display: grid; gap: 14px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--glass-border); }
.lp-checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; line-height: 1.45; }
.lp-checks .icon { flex: none; width: 20px; height: 20px; padding: 3px; border-radius: 50%; color: var(--up); background: var(--up-weak); stroke-width: 3; }

.lp-final { padding: 80px 0; text-align: center; }
.lp-final .lp-inner { padding: 56px 24px; border-radius: 24px; background: var(--grad); color: #fff; box-shadow: 0 30px 80px -30px var(--glow); max-width: 1112px; }
.lp-final p { margin: 10px 0 26px; opacity: .9; font-size: 17px; }
.lp-final .btn-primary { background: #fff; color: #1b2240; border-color: #fff; box-shadow: none; }
.lp-final .btn-primary:hover { background: #f1f3ff; }
.lp-foot { padding: 8px 0 48px; }
.lp-foot .lp-inner { display: flex; gap: 24px; align-items: flex-start; padding-top: 28px; border-top: 1px solid var(--glass-border); }
.lp-foot p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; max-width: 760px; }
.auth-wrap a.brand { color: var(--text); }

@media (max-width: 1040px) {
  .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .lp-visual { max-width: 560px; margin: 0 auto; width: 100%; padding: 28px 16px 40px; }
  .lp-float-a { left: -4px; }
  .lp-float-b { right: -4px; }
}
@media (max-width: 760px) {
  .lp-links { display: none; }
  .lp-nav-actions { margin-left: auto; }
  .lp-steps, .lp-honest { grid-template-columns: minmax(0, 1fr); }
  .lp-section { padding: 60px 0; }
  .lp-hero { padding: 44px 0 28px; }
}
@media (max-width: 560px) {
  .lp-inner { padding: 0 16px; }
  .lp-features { grid-template-columns: minmax(0, 1fr); }
  .lp-nav-inner { gap: 10px; }
  .lp-nav .btn-ghost { display: none; }
  .lp-theme { display: none; }
  .lp-sub { font-size: 16px; }
  .lp-cta .btn { flex: 1 1 100%; }
  .lp-float { transform: scale(.9); }
  .lp-float-b { display: none; }
  .lp-foot .lp-inner { flex-direction: column; gap: 12px; }
  .lp-final .lp-inner { border-radius: 18px; padding: 40px 18px; }
}
@media (prefers-reduced-motion: reduce) { .lp-float { animation: none; } }
