/* ============================================================
   Tradero — style.css
   One lean tokenized stylesheet. Dark is the primary theme;
   light is a cool "instrument gray" override, never cream.
   Color rule: green/red are P&L data only; cyan is hairline /
   active / focus only. The interface stays monochrome.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #0a0b0d;
  --surface: #101216;
  --surface-2: #15181d;
  --surface-3: #1b1f26;
  --line: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .11);
  --tx: #e7e9ec;
  --tx-2: #9ca1ac;
  --tx-3: #5e636e;
  --pos: #2fce86;
  --neg: #f05561;
  --warn: #e0a34a;
  --accent: #4fc9e6;
  --accent-dim: rgba(79, 201, 230, .14);
  --btn-bg: #e7e9ec;
  --btn-tx: #0a0b0d;
  --btn-bg-hover: #ffffff;
  --scrim: rgba(4, 5, 7, .62);
  --header-bg: rgba(10, 11, 13, .82);
  --shadow-float: 0 24px 60px rgba(0, 0, 0, .5), 0 6px 18px rgba(0, 0, 0, .35);
  --font-ui: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --r: 4px;
  --r-sm: 3px;
  --r-xs: 2px;
  --container: 1200px;
  --sidebar-w: 232px;
  --sidebar-rail: 60px;
  --topbar-h: 56px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-theme="light"] {
  --bg: #eef0f2;
  --surface: #f8f9fa;
  --surface-2: #ffffff;
  --surface-3: #e4e7ea;
  --line: rgba(16, 22, 32, .09);
  --line-2: rgba(16, 22, 32, .16);
  --tx: #171a1f;
  --tx-2: #545a65;
  --tx-3: #878d98;
  --pos: #148f5c;
  --neg: #cf3944;
  --warn: #9c6c1c;
  --accent: #0c87a6;
  --accent-dim: rgba(12, 135, 166, .12);
  --btn-bg: #171a1f;
  --btn-tx: #f5f6f8;
  --btn-bg-hover: #2a2e36;
  --scrim: rgba(20, 24, 30, .4);
  --header-bg: rgba(238, 240, 242, .85);
  --shadow-float: 0 24px 60px rgba(20, 25, 35, .16), 0 6px 18px rgba(20, 25, 35, .1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--accent-dim); }

:is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--tx-3);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--tx-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  padding: 1px 5px;
  background: var(--surface-2);
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- live dot ---------- */
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pos);
  display: inline-block;
  position: relative;
  flex: none;
}
.dot::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: 50%; border: 1px solid var(--pos);
  opacity: .5; animation: dot-pulse 2s var(--ease) infinite;
}
@keyframes dot-pulse {
  0% { transform: scale(.6); opacity: .7; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}
.dot--idle { background: var(--tx-3); }
.dot--idle::after { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui); font-weight: 500; font-size: 14px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-tx); }
.btn--primary:hover { background: var(--btn-bg-hover); }
.btn--ghost { border-color: var(--line-2); color: var(--tx); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--subtle { background: var(--surface-3); color: var(--tx); }
.btn--subtle:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn--sm { padding: 5px 12px; font-size: 13px; }
.btn--lg { padding: 12px 24px; font-size: 15px; }
.btn--icon { padding: 8px; width: 34px; height: 34px; }
.btn--danger:hover { border-color: var(--neg); color: var(--neg); }
.btn[disabled] { opacity: .45; cursor: default; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- chips, tags, badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px;
  padding: 3px 9px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--tx-2);
  background: var(--surface-2);
}
.tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-2);
  color: var(--tx-2);
}
.tag--pos { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 35%, transparent); }
.tag--neg { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 35%, transparent); }
.badge-risk {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-ui); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 8px; border-radius: var(--r-xs); border: 1px solid;
}
.badge-risk::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-risk--low  { color: var(--tx-2);  border-color: var(--line-2); }
.badge-risk--med  { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.badge-risk--high { color: var(--neg);  border-color: color-mix(in srgb, var(--neg) 40%, transparent); }
.count-badge {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-xs);
  background: var(--surface-3); color: var(--tx-2);
  border: 1px solid var(--line);
}

/* ---------- cards & panels ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.panel__title { font-size: 13px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.panel__body { padding: 16px; }
.panel__body--flush { padding: 0; }
.card-hover { transition: border-color .15s ease, transform .15s var(--ease); }
.card-hover:hover { border-color: var(--line-2); transform: translateY(-2px); }

/* ---------- data tables ---------- */
.tbl { font-size: 13px; }
.tbl th {
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--tx-3); text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s ease; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tbl--right-nums .num { text-align: right; }
.tbl th.num { text-align: right; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--tx-2); }
th.sortable[data-dir]::after { content: " ↓"; color: var(--accent); }
th.sortable[data-dir="asc"]::after { content: " ↑"; }

/* ---------- stat cards ---------- */
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.stat__label { font-family: var(--font-ui); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--tx-3); }
.stat__value { font-family: var(--font-mono); font-size: 22px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.stat__sub { font-family: var(--font-mono); font-size: 12px; color: var(--tx-2); }
.stat__spark { margin-top: 6px; }

/* ---------- sparklines ---------- */
.spark { width: 100%; height: 28px; }
.spark polyline { fill: none; stroke: var(--tx-3); stroke-width: 1.5; }
.spark--pos polyline { stroke: var(--pos); }
.spark--neg polyline { stroke: var(--neg); }
.spark polyline.draw { transition: stroke-dashoffset 1s var(--ease); }

/* ---------- toggle switch ---------- */
.switch { position: relative; display: inline-block; width: 34px; height: 18px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  transition: border-color .15s ease, background .15s ease;
  pointer-events: none;
}
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px;
  background: var(--tx-3);
  border-radius: var(--r-xs);
  transition: transform .18s var(--ease), background .15s ease;
}
.switch input:checked + i { border-color: var(--accent); background: var(--accent-dim); }
.switch input:checked + i::after { transform: translateX(16px); background: var(--accent); }
.switch input:focus-visible + i { outline: 1px solid var(--accent); outline-offset: 2px; }

/* ---------- segmented control ---------- */
.seg {
  display: inline-flex;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 2px;
  gap: 2px;
}
.seg button {
  font-family: var(--font-ui); font-weight: 500; font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--r-xs);
  color: var(--tx-2);
  transition: color .12s ease, background .12s ease;
}
.seg button:hover { color: var(--tx); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--tx); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- in-app tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs button {
  font-size: 13px; font-weight: 500; color: var(--tx-2);
  padding: 9px 14px;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: color .12s ease, border-color .12s ease;
}
.tabs button:hover { color: var(--tx); }
.tabs button[aria-selected="true"] { color: var(--tx); border-bottom-color: var(--accent); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--tx-2); }
.field .hint { font-size: 12px; color: var(--tx-3); }
.field .err { font-size: 12px; color: var(--neg); display: none; }
.field.invalid .err { display: block; }
.field.invalid .input { border-color: var(--neg); }

.input, select.input, textarea.input {
  width: 100%;
  font-family: var(--font-ui); font-size: 14px;
  color: var(--tx);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  transition: border-color .15s ease, background .15s ease;
}
.input::placeholder { color: var(--tx-3); }
.input:hover { border-color: var(--line-2); }
.input:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.input--mono { font-family: var(--font-mono); font-size: 13px; }
select.input { appearance: none; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 12px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--tx-3); border-bottom: 1.5px solid var(--tx-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 40px; }
.input-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-3); border-radius: var(--r-xs);
}
.input-eye:hover { color: var(--tx); }
.input-eye svg { width: 16px; height: 16px; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tx-2); cursor: pointer; }
.check input {
  appearance: none; width: 15px; height: 15px; margin: 0; flex: none;
  border: 1px solid var(--line-2); border-radius: var(--r-xs);
  background: var(--surface-3);
  display: grid; place-content: center;
  transition: border-color .12s ease, background .12s ease;
  cursor: pointer;
}
.check input::before {
  content: ""; width: 8px; height: 4.5px;
  border-left: 1.6px solid var(--btn-tx); border-bottom: 1.6px solid var(--btn-tx);
  transform: rotate(-45deg) translate(0, -1px) scale(0);
  transition: transform .12s ease;
}
.check input:checked { background: var(--tx); border-color: var(--tx); }
.check input:checked::before { transform: rotate(-45deg) translate(0, -1px) scale(1); }

/* ---------- modal ---------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: var(--scrim);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal-scrim.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 440px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow-float);
  transform: translateY(10px);
  transition: transform .22s var(--ease);
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.modal-scrim.open .modal { transform: none; }
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal__title { font-size: 15px; font-weight: 600; }
.modal__x { color: var(--tx-3); width: 28px; height: 28px; display: grid; place-content: center; border-radius: var(--r-xs); }
.modal__x:hover { color: var(--tx); background: var(--surface-3); }
.modal__body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.modal__foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- toasts ---------- */
.toasts {
  position: fixed; top: 16px; right: 16px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  min-width: 260px; max-width: 360px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-float);
  padding: 11px 14px;
  font-size: 13px;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: none; }
.toast--pos { border-left-color: var(--pos); }
.toast--neg { border-left-color: var(--neg); }
.toast__msg { flex: 1; }
.toast__x { color: var(--tx-3); flex: none; margin-top: 1px; }
.toast__x:hover { color: var(--tx); }

/* ---------- empty state ---------- */
.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--tx-3);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.empty svg { width: 26px; height: 26px; opacity: .6; }
.empty strong { color: var(--tx-2); font-weight: 500; font-size: 14px; }
.empty p { font-size: 13px; max-width: 320px; }

/* ---------- brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -.02em; font-size: 16px; color: var(--tx); }
.brand svg { width: 20px; height: 20px; color: var(--tx); }
.brand svg .echo { color: var(--accent); }

/* ---------- theme toggle ---------- */
.theme-btn { color: var(--tx-2); width: 34px; height: 34px; display: grid; place-content: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); transition: color .15s ease, border-color .15s ease; }
.theme-btn:hover { color: var(--tx); border-color: var(--accent); }
.theme-btn svg { width: 15px; height: 15px; }
.theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .sun { display: block; }
[data-theme="dark"] .theme-btn .moon { display: none; }

/* ---------- copy console (signature) ---------- */
.console {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.console__head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--tx-3);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em;
}
.console__head .spacer { flex: 1; }
.console__body { padding: 6px 0; overflow: hidden; }
.console__row {
  display: grid;
  grid-template-columns: 58px 38px 1fr auto auto;
  gap: 10px;
  align-items: baseline;
  padding: 4px 12px;
  white-space: nowrap;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .3s ease, transform .3s var(--ease);
}
.console__row.in { opacity: 1; transform: none; }
.console__row.dim { opacity: .38; }
.console__row .t { color: var(--tx-3); }
.console__row .side { font-weight: 500; }
.console__row .side.b { color: var(--pos); }
.console__row .side.s { color: var(--neg); }
.console__row .what { color: var(--tx); overflow: hidden; text-overflow: ellipsis; }
.console__row .what .w { color: var(--tx-3); }
.console__row .sz { color: var(--tx-2); }
.console__row .lat { color: var(--accent); }
.console--mini .console__row { grid-template-columns: 34px 1fr auto; }
.console--mini .console__row .t, .console--mini .console__row .sz { display: none; }

/* ============================================================
   LANDING
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav__in {
  display: flex; align-items: center; gap: 28px;
  height: 60px;
}
.nav__links { display: flex; gap: 22px; flex: 1; }
.nav__links a { font-size: 13.5px; color: var(--tx-2); transition: color .15s ease; }
.nav__links a:hover { color: var(--tx); }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; }
.nav-mobile {
  display: none;
  flex-direction: column; gap: 4px;
  padding: 10px 24px 16px;
  border-top: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav-mobile a { padding: 9px 0; font-size: 14px; color: var(--tx-2); }
.nav-mobile a:hover { color: var(--tx); }

.hero { padding: 84px 0 64px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 30% 0%, #000 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 30% 0%, #000 0%, transparent 68%);
  pointer-events: none;
}
.hero__in { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); letter-spacing: -.032em; margin: 16px 0 18px; }
.hero__sub { font-size: 16.5px; color: var(--tx-2); max-width: 480px; }
.hero__cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero__proof { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.proof-stat .v { font-family: var(--font-mono); font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.proof-stat .v em { font-style: normal; color: var(--tx-2); font-size: 16px; }
.proof-stat .l { font-family: var(--font-ui); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--tx-3); margin-top: 3px; }
.hero .console { box-shadow: var(--shadow-float); }
.hero .console__body { height: 308px; }

/* ticker */
.ticker { border-block: 1px solid var(--line); overflow: hidden; padding: 10px 0; }
/* items carry the spacing (no track gap) so the -50% loop is seamless */
.ticker__track { display: flex; width: max-content; animation: ticker 46s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker__item { display: inline-flex; align-items: baseline; gap: 8px; margin-right: 40px; font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; }
.ticker__item .s { color: var(--tx); font-weight: 500; }
.ticker__item .p { color: var(--tx-3); }

/* sections */
.section { padding: 88px 0; }
.section__head { max-width: 560px; margin-bottom: 44px; }
.section__head h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 14px; }
.section__head p { color: var(--tx-2); margin-top: 12px; font-size: 15.5px; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.feature { background: var(--surface); padding: 26px 24px; position: relative; transition: background .15s ease; }
.feature:hover { background: var(--surface-2); }
.feature::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: var(--accent); opacity: 0; transition: opacity .2s ease;
}
.feature:hover::before { opacity: 1; }
.feature svg { width: 20px; height: 20px; color: var(--tx-2); margin-bottom: 16px; }
.feature h3 { font-size: 15.5px; margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--tx-2); }
.feature .meta { font-family: var(--font-mono); font-size: 11px; color: var(--tx-3); margin-top: 14px; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { border-top: 1px solid var(--line-2); padding-top: 20px; }
.step .n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.step h3 { font-size: 16px; margin: 10px 0 8px; }
.step p { font-size: 13.5px; color: var(--tx-2); }

/* leaderboard preview */
.lb-preview .panel__head .more { font-size: 13px; color: var(--tx-2); }
.lb-preview .panel__head .more:hover { color: var(--accent); }

/* cta band */
.cta-band {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 56px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .6;
}
.cta-band h2 { font-size: clamp(22px, 2.6vw, 30px); }
.cta-band p { color: var(--tx-2); margin-top: 10px; max-width: 440px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0 32px; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-family: var(--font-ui); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--tx-3); font-weight: 600; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer ul a { font-size: 13px; color: var(--tx-2); }
.footer ul a:hover { color: var(--tx); }
.footer__about p { font-size: 13px; color: var(--tx-2); margin-top: 12px; max-width: 300px; }
.footer__bottom {
  margin-top: 44px; padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--tx-3);
}

/* ============================================================
   LOGIN — centered card, matching the reference structure
   ============================================================ */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; position: relative; }
.auth-page::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000, transparent 72%);
  pointer-events: none;
}
.auth__topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  position: relative;
}
.auth__main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px 20px 40px; position: relative; }
.auth__card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 30px 24px;
  position: relative;
}
.auth__card::before {
  content: ""; position: absolute; top: -1px; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .55;
}
.auth__icon {
  width: 40px; height: 40px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  display: grid; place-content: center;
  color: var(--tx-2);
  margin-bottom: 18px;
}
.auth__icon svg { width: 18px; height: 18px; }
.auth__title { font-size: 22px; }
.auth__lede { color: var(--tx-2); font-size: 14px; margin: 8px 0 20px; }
.auth__tabs { margin-bottom: 20px; display: flex; }
.auth__tabs button { flex: 1; padding-block: 6px; }
.auth__form { display: flex; flex-direction: column; gap: 15px; }
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth__link { font-size: 13px; color: var(--tx-2); }
.auth__link:hover { color: var(--accent); }
.auth__submit { width: 100%; margin-top: 4px; }
.auth__submit.ok { background: var(--pos); color: #06130c; }
.auth__divider {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-ui); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--tx-3);
  margin: 20px 0 14px;
}
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__wallets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth__meta {
  display: flex; justify-content: center; gap: 18px;
  font-family: var(--font-mono); font-size: 11px; color: var(--tx-3);
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.auth__legal { font-size: 12px; color: var(--tx-3); text-align: center; padding: 0 20px 22px; position: relative; }
.auth__legal a { color: var(--tx-2); }
.auth__legal a:hover { color: var(--tx); }

/* ============================================================
   APP SHELL
   ============================================================ */
.app { display: flex; min-height: 100vh; }

/* sidebar */
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  transition: width .22s var(--ease), transform .25s var(--ease);
  z-index: 60;
}
.sidebar__top { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); min-height: var(--topbar-h); }
.sidebar__collapse { color: var(--tx-3); width: 26px; height: 26px; display: grid; place-content: center; border-radius: var(--r-xs); flex: none; }
.sidebar__collapse:hover { color: var(--tx); background: var(--surface-3); }
.sidebar__collapse svg { width: 14px; height: 14px; transition: transform .22s var(--ease); }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 12px 8px; display: flex; flex-direction: column; gap: 18px; }
.sidebar__group-label {
  font-family: var(--font-ui); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--tx-3);
  padding: 0 10px 6px;
  white-space: nowrap; overflow: hidden;
}
.snav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.snav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500;
  color: var(--tx-2);
  position: relative;
  transition: color .12s ease, background .12s ease;
  white-space: nowrap;
}
.snav a::before {
  content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 2px;
  background: var(--accent); border-radius: 1px;
  opacity: 0; transition: opacity .15s ease;
}
.snav a:hover { color: var(--tx); background: var(--surface-2); }
.snav a.active { color: var(--tx); background: var(--surface-3); }
.snav a.active::before { opacity: 1; }
.snav svg { width: 16px; height: 16px; flex: none; }
.snav .txt { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap; overflow: hidden;
}
.avatar {
  width: 28px; height: 28px; flex: none;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  display: grid; place-content: center;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: var(--tx-2);
}
.sidebar__user .who { min-width: 0; }
.sidebar__user .who b { display: block; font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user .who span { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--tx-3); overflow: hidden; text-overflow: ellipsis; }

/* collapsed rail */
.app.rail .sidebar { width: var(--sidebar-rail); }
.app.rail .sidebar .brand span,
.app.rail .snav .txt,
.app.rail .snav .count-badge,
.app.rail .sidebar__group-label,
.app.rail .sidebar__user .who { display: none; }
.app.rail .snav a { justify-content: center; padding: 9px 0; }
.app.rail .snav a::before { left: -6px; }
.app.rail .sidebar__top { justify-content: center; }
.app.rail .sidebar__top .brand { display: none; }
.app.rail .sidebar__collapse svg { transform: rotate(180deg); }
.app.rail .sidebar__user { justify-content: center; }

/* topbar */
.app-scrim {
  position: fixed; inset: 0; z-index: 55;
  background: var(--scrim);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 40;
}
.topbar__burger { display: none; }
.topbar__search { position: relative; width: min(340px, 100%); }
.topbar__search .input { padding: 7px 60px 7px 32px; font-size: 13px; }
.topbar__search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--tx-3); pointer-events: none; }
.topbar__search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance-chip { border-color: var(--line-2); color: var(--tx); }
.iconbtn {
  position: relative;
  width: 34px; height: 34px;
  display: grid; place-content: center;
  color: var(--tx-2);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  transition: color .12s ease, border-color .12s ease;
}
.iconbtn:hover { color: var(--tx); border-color: var(--line-2); }
.iconbtn svg { width: 16px; height: 16px; }
.iconbtn .unread {
  position: absolute; top: 7px; right: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--bg);
}

/* notifications dropdown */
.notif-pop {
  position: absolute; top: calc(var(--topbar-h) - 8px); right: 16px;
  width: 340px; z-index: 70;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow-float);
  display: none;
}
.notif-pop.open { display: block; }
.notif-pop ul { list-style: none; margin: 0; padding: 6px; }
.notif-pop li { padding: 10px 10px; border-radius: var(--r-sm); font-size: 13px; display: flex; gap: 10px; }
.notif-pop li:hover { background: var(--surface-3); }
.notif-pop li .when { font-family: var(--font-mono); font-size: 11px; color: var(--tx-3); flex: none; width: 28px; }
.notif-pop li.unread .when { color: var(--accent); }

/* content */
.content { flex: 1; padding: 22px; display: flex; flex-direction: column; gap: 18px; max-width: 1440px; width: 100%; margin: 0 auto; }
.view { display: none; flex-direction: column; gap: 18px; }
.view.active { display: flex; }
.view__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.view__head h1 { font-size: 20px; }
.view__head .sub { font-size: 13px; color: var(--tx-2); margin-top: 4px; }
.view__head .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* grids */
.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-copy { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.copy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

/* chart */
.chart-wrap { position: relative; height: 240px; }
.chart-wrap svg { width: 100%; height: 100%; display: block; }
.chart-line { fill: none; stroke: var(--tx-2); stroke-width: 1.5; }
.chart-area { fill: var(--accent); opacity: .05; }
.chart-grid line { stroke: var(--line); }
.chart-label { font-family: var(--font-mono); font-size: 10px; fill: var(--tx-3); }

/* copy config card */
.copy-card { display: flex; flex-direction: column; }
.copy-card .panel__body { display: flex; flex-direction: column; gap: 12px; }
.copy-card__pnl { font-family: var(--font-mono); font-size: 18px; font-weight: 500; }
.copy-card__pnl small { font-size: 12px; color: var(--tx-3); font-weight: 400; margin-left: 6px; }
.copy-card__params { display: flex; flex-wrap: wrap; gap: 6px; }
.copy-card__foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 10px 16px; font-size: 12px; color: var(--tx-3); }
.copy-card.off { opacity: .6; }
.copy-card .rm { color: var(--tx-3); font-size: 12px; }
.copy-card .rm:hover { color: var(--neg); }

/* activity feed rows */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.feed li:last-child { border-bottom: 0; }
.feed .when { font-family: var(--font-mono); font-size: 11.5px; color: var(--tx-3); flex: none; width: 58px; }
.feed .what { flex: 1; min-width: 0; }
.feed .what .mono { color: var(--tx-2); }
.feed .lat { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); flex: none; }

/* scanner */
.scan-bar { display: flex; gap: 10px; }
.scan-bar .input-wrap { flex: 1; }
.scan-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.scan-head .addr { font-family: var(--font-mono); font-size: 16px; font-weight: 500; }
.scan-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.flag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.flag-list li { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: flex-start; }
.flag-list li:last-child { border-bottom: 0; }
.scan-loading { display: flex; align-items: center; gap: 10px; padding: 40px 20px; justify-content: center; color: var(--tx-3); font-size: 13px; }
.scan-loading::before {
  content: ""; width: 12px; height: 12px; flex: none;
  border: 1.5px solid var(--line-2); border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* settings */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.settings-grid .panel__body { display: flex; flex-direction: column; gap: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.set-row .desc b { display: block; font-size: 13.5px; font-weight: 500; }
.set-row .desc span { font-size: 12.5px; color: var(--tx-3); }

/* deposit address block */
.addr-block {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-family: var(--font-mono); font-size: 12px;
}
.addr-block code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- count-up ---------- */
.countup { will-change: contents; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .grid-stats, .scan-stats { grid-template-columns: repeat(2, 1fr); }
  .grid-copy { grid-template-columns: 1fr; }
  .copy-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: 560px; }
  .grid-2, .settings-grid, .copy-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }

  /* sidebar → off-canvas drawer */
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); width: var(--sidebar-w) !important; }
  .app.drawer-open .sidebar { transform: none; box-shadow: var(--shadow-float); }
  .app.rail .sidebar .brand span, .app.rail .snav .txt, .app.rail .snav .count-badge,
  .app.rail .sidebar__group-label, .app.rail .sidebar__user .who { display: block; }
  .app.rail .snav .txt { display: block; }
  .app.rail .snav a { justify-content: flex-start; padding: 8px 10px; }
  .app.rail .sidebar__top { justify-content: space-between; }
  .app.rail .sidebar__top .brand { display: inline-flex; }
  .sidebar__collapse { display: none; }
  .topbar__burger { display: grid; }
  .app.drawer-open .app-scrim { opacity: 1; pointer-events: auto; }
}

@media (max-width: 700px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .nav__cta .btn--ghost { display: none; }
  .nav-mobile.open { display: flex; }
  .section { padding: 60px 0; }
  .hero { padding: 52px 0 48px; }
  .hero__proof { gap: 24px; }
  .features, .steps { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 24px; }
  .grid-stats, .scan-stats { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar__search { width: auto; flex: 1; }
  .topbar__search kbd { display: none; }
  .balance-chip, #net-seg { display: none; }
  .content { padding: 14px; }
  .view__head h1 { font-size: 18px; }
  .tbl th, .tbl td { padding: 8px 10px; }
  .tbl .hide-m { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .notif-pop { right: 8px; left: 8px; width: auto; }
}

@media (max-width: 480px) {
  .grid-stats, .scan-stats { grid-template-columns: 1fr; }
  .console__row { grid-template-columns: 38px 1fr auto; }
  .console__row .t, .console__row .sz { display: none; }
}

/* ============================================================
   LANDING — split deep-dives, latency compare, FAQ, polish
   ============================================================ */
[id] { scroll-margin-top: 76px; }

.nav__links a { position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--accent);
  transition: right .2s var(--ease);
}
.nav__links a:hover::after { right: 0; }

.caret { display: inline-block; width: 7px; height: 12px; background: var(--accent); margin-left: 6px; vertical-align: -1px; animation: caret 1.1s step-end infinite; }
@keyframes caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.ticker {
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* alternating deep-dive sections */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.split + .split { margin-top: 96px; }
.split--flip { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.split--flip .split__copy { order: 2; }
.split__copy .section__head { margin-bottom: 22px; }
.split__points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.split__points li { display: flex; gap: 12px; font-size: 14px; color: var(--tx-2); }
.split__points li::before {
  content: ""; width: 5px; height: 5px; flex: none;
  background: var(--accent); margin-top: 8px;
  opacity: .8;
}
.split__points b { color: var(--tx); font-weight: 500; }
.split__cta { margin-top: 24px; }
.split__visual { min-width: 0; }
.split__visual .panel { box-shadow: var(--shadow-float); }
.split__stack { display: flex; flex-direction: column; gap: 12px; }

/* latency comparison bars */
.latency { display: flex; flex-direction: column; gap: 18px; }
.lbar { display: flex; flex-direction: column; gap: 7px; }
.lbar__label { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-mono); font-size: 12px; color: var(--tx-2); }
.lbar__label .ms { color: var(--tx); font-weight: 500; }
.lbar__track { height: 5px; background: var(--surface-3); border-radius: 1px; overflow: hidden; }
.lbar__track i {
  display: block; height: 100%;
  width: var(--w, 50%);
  background: var(--tx-3);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s var(--ease) .2s;
}
.lbar--us .lbar__track i { background: var(--accent); }
.lbar--us .lbar__label .ms { color: var(--accent); }
.reveal.in .lbar__track i { transform: scaleX(1); }
.latency__note { font-family: var(--font-mono); font-size: 11px; color: var(--tx-3); }

/* faq */
.faq { max-width: 720px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 2px;
  font-size: 15px; font-weight: 500;
  transition: color .15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 15px; color: var(--tx-3);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--tx-2); font-size: 14px; padding: 0 2px 18px; max-width: 620px; }

/* section index numbers (real sequence: the page walks the product flow) */
.section__head .eyebrow { display: flex; align-items: center; gap: 10px; }
.section__head .eyebrow::after { content: ""; flex: 0 0 34px; height: 1px; background: var(--line-2); }

@media (max-width: 900px) {
  .split, .split--flip { grid-template-columns: 1fr; gap: 32px; }
  .split--flip .split__copy { order: 0; }
  .split + .split { margin-top: 64px; }
}

/* skip link (visible only on keyboard focus) */
.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 200;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  color: var(--tx);
  padding: 8px 14px;
  font-size: 13px;
}
.skip-link:focus { left: 12px; }

/* boot progress hairline under the topbar while the session loads */
.booting .topbar { overflow: hidden; }
.booting .topbar::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: boot-slide 1s linear infinite;
}
@keyframes boot-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}

/* stat card top hairline detail */
.stat { position: relative; }
.stat::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s ease;
}
.stat:hover::before { opacity: .45; }

/* wallet balances (test ledger) */
.bal-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.bal-row:last-child { border-bottom: 0; }
.bal-row__amt { font-family: var(--font-mono); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bal-row__actions { margin-left: auto; display: flex; gap: 8px; }

/* auth server error */
.form-error {
  font-size: 13px;
  color: var(--neg);
  border: 1px solid color-mix(in srgb, var(--neg) 35%, transparent);
  border-radius: var(--r-sm);
  padding: 9px 12px;
}

/* sidebar sign-out */
.sidebar__user [data-logout] { margin-left: auto; flex: none; width: 28px; height: 28px; }
.sidebar__user [data-logout] svg { width: 14px; height: 14px; }
.app.rail .sidebar__user [data-logout] { display: none; }
@media (max-width: 900px) {
  .app.rail .sidebar__user [data-logout] { display: grid; }
}

/* scanner recent chips */
.scan-recent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scan-recent .lbl { font-family: var(--font-ui); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--tx-3); }
.scan-recent .chip { cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.scan-recent .chip:hover { border-color: var(--accent); color: var(--tx); }

/* ============================================================
   PHASE 2 — live desk, drawer, allocation, dividers
   ============================================================ */

/* overview hero row: chart beside the live feed */
.grid-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.grid-hero .console { display: flex; flex-direction: column; }
.grid-hero .console__body { flex: 1; min-height: 0; }

/* connection state chip */
.conn-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-ui); font-weight: 600; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--tx-3);
  white-space: nowrap;
}
.conn-chip.live { color: var(--tx-2); }

/* chart crosshair */
.xhair-line { stroke: var(--line-2); stroke-width: 1; pointer-events: none; }
.xhair-dot { fill: var(--accent); pointer-events: none; }
.chart-readout {
  position: absolute; top: 8px; right: 10px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--tx-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 2px 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease;
}
.chart-wrap:hover .chart-readout.on { opacity: 1; }

/* live value flash (one pulse per tick) */
@keyframes cell-flash { 0% { background: var(--accent-dim); } 100% { background: transparent; } }
.cell-flash { animation: cell-flash .7s ease-out 1; }
@keyframes val-flash { 0% { opacity: .45; } 100% { opacity: 1; } }
.val-flash { animation: val-flash .45s ease-out 1; }
.lat--warn { color: var(--warn) !important; }

/* copy detail drawer */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 80;
  background: var(--scrim);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 85;
  width: min(440px, 94vw);
  background: var(--surface);
  border-left: 1px solid var(--line-2);
  box-shadow: var(--shadow-float);
  transform: translateX(102%);
  transition: transform .26s var(--ease);
  display: flex; flex-direction: column;
}
.drawer-open-p .drawer { transform: none; }
.drawer-open-p .drawer-scrim { opacity: 1; pointer-events: auto; }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer__title { font-family: var(--font-mono); font-size: 15px; font-weight: 500; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.drawer__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drawer__stats .stat { padding: 10px 12px; }
.drawer__stats .stat__value { font-size: 16px; }
.drawer__params { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drawer__foot {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: space-between; align-items: center;
}

/* allocation bar */
.alloc { display: flex; flex-direction: column; gap: 10px; }
.alloc__bar { display: flex; height: 6px; border-radius: 1px; overflow: hidden; background: var(--surface-3); }
.alloc__bar i { display: block; height: 100%; }
.alloc__bar i:nth-child(odd) { background: var(--tx-3); }
.alloc__bar i:nth-child(even) { background: var(--tx-2); }
.alloc__bar i:first-child { background: var(--accent); opacity: .8; }
.alloc__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--font-mono); font-size: 11px; color: var(--tx-2); }
.alloc__legend b { color: var(--tx); font-weight: 500; }

/* copy rows open the detail drawer */
#ov-copies tbody tr { cursor: pointer; }

/* activity day dividers + load more */
.feed .feed__divider {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 6px;
  font-family: var(--font-ui); font-weight: 600; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--tx-3);
  border-bottom: 1px solid var(--line);
}
.feed__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.feed-more { padding: 12px 16px; text-align: center; border-top: 1px solid var(--line); }

/* scanner compare strip */
.compare-grid { display: grid; grid-template-columns: 140px 1fr 1fr; gap: 0; font-size: 13px; }
.compare-grid > div { padding: 9px 14px; border-bottom: 1px solid var(--line); }
.compare-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.compare-grid .cmp-label { font-family: var(--font-ui); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--tx-3); }
.compare-grid .num { font-family: var(--font-mono); }

/* sessions list */
.sess-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.sess-row:last-child { border-bottom: 0; }
.sess-row .meta { flex: 1; min-width: 0; }
.sess-row .meta b { display: block; font-weight: 500; }
.sess-row .meta span { font-family: var(--font-mono); font-size: 11px; color: var(--tx-3); }

/* skeleton loading blocks */
.skel { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.skel i { display: block; height: 12px; border-radius: var(--r-xs); background: var(--surface-3); }
.skel i:nth-child(1) { width: 40%; }
.skel i:nth-child(2) { width: 85%; }
.skel i:nth-child(3) { width: 65%; }

@media (max-width: 1100px) {
  .grid-hero { grid-template-columns: 1fr; }
  .grid-hero .console__body { height: 200px; }
}

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