:root {
  color-scheme: dark;
  --bg: #05070c;
  --bg-2: #070a11;
  --surface: rgba(17, 22, 33, 0.62);
  --surface-2: rgba(26, 33, 48, 0.55);
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #eef2f9;
  --muted: #94a0b6;
  --faint: #596477;
  --mint: #3ce6a8;
  --mint-soft: rgba(60, 230, 168, 0.12);
  --rose: #ff5f72;
  --rose-soft: rgba(255, 95, 114, 0.12);
  --amber: #ffc65c;
  --violet: #9d8cff;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 18px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(1200px 600px at 50% -20%, rgba(60, 230, 168, 0.05), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 35%);
}

::selection { background: rgba(60, 230, 168, 0.25); color: #fff; }

a { color: inherit; }

button { font-family: inherit; }

/* ---------- ambient ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.blob-a {
  width: 620px;
  height: 620px;
  top: -280px;
  left: -160px;
  background: radial-gradient(circle, rgba(60, 230, 168, 0.22), transparent 65%);
  animation: drift-a 22s ease-in-out infinite alternate;
}

.blob-b {
  width: 560px;
  height: 560px;
  top: -240px;
  right: -180px;
  background: radial-gradient(circle, rgba(157, 140, 255, 0.2), transparent 65%);
  animation: drift-b 26s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(80px, 60px, 0) scale(1.08); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-70px, 50px, 0) scale(1.1); }
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 25%, transparent 75%);
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
  padding: 0 28px;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.mark {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--mint), var(--violet), var(--mint));
  display: grid;
  place-items: center;
  animation: spin 9s linear infinite;
}

.mark span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #05070c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.wordmark {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.brand-tag {
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 0.04em;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.nav {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}

.nav-item:hover { color: var(--text); }
.nav-item.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.live {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint);
}

.live .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(60, 230, 168, 0.5);
  animation: ping 2.4s ease-out infinite;
}

.live.stale { color: var(--faint); }
.live.stale .dot { background: var(--faint); animation: none; box-shadow: none; }

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(60, 230, 168, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(60, 230, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(60, 230, 168, 0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.btn.ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.2); }

.btn.primary {
  position: relative;
  overflow: hidden;
  border: 0;
  color: #04120c;
  font-weight: 600;
  padding: 11px 22px;
  font-size: 13.5px;
  background: linear-gradient(135deg, #52f0b8, #2fd39a 55%, #57c8ff);
  box-shadow: 0 10px 30px -12px rgba(60, 230, 168, 0.65);
}

.btn.primary:hover { transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0) scale(0.99); }
.btn.primary:disabled { opacity: 0.7; cursor: progress; transform: none; }

.btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 700ms var(--ease);
}

.btn.primary:hover .btn-glow { transform: translateX(120%); }

/* ---------- account ---------- */

.account { position: relative; }

.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  color: var(--text);
  cursor: pointer;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #04120c;
  background: linear-gradient(135deg, #52f0b8, #57c8ff);
}

.account-email {
  font-size: 12px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(12, 16, 24, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  z-index: 60;
}

.menu-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
}

.menu-name { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.menu-scope { font-size: 10.5px; color: var(--faint); }

.menu-row {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  font-size: 12px;
  color: var(--muted);
}

.menu-row span:last-child { color: var(--text); font-family: var(--mono); }

.menu-link,
.menu-signout {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-link:hover,
.menu-signout:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.menu-signout { color: var(--rose); }

/* ---------- shell ---------- */

.shell {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 44px 28px 72px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
}

h1 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  max-width: 14ch;
}

h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--mint), #7be7ff 45%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dek {
  margin: 16px 0 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.updated {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 0.03em;
}

/* ---------- kpis ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.kpi {
  min-width: 0;
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(14px);
}

.kpi::after {
  content: "";
  position: absolute;
  inset: -40% 40% 60% -20%;
  background: radial-gradient(circle, rgba(60, 230, 168, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 400ms ease;
}

.kpi:hover::after { opacity: 1; }

.kpi-label {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.kpi-value {
  display: block;
  margin: 8px 0 4px;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.kpi-value.up { color: var(--mint); }
.kpi-value.down { color: var(--rose); }

.kpi-sub {
  font-size: 11px;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* ---------- board head ---------- */

.view { animation: fade 400ms var(--ease) both; }

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.view-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.view-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  max-width: 60ch;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.seg {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}

.seg:hover { color: var(--text); }
.seg.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* ---------- layout ---------- */

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 14px;
  align-items: start;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.9);
}

/* ---------- table ---------- */

.table-scroll { overflow-x: auto; }

.board {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.board thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 12px;
  text-align: left;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  background: rgba(10, 14, 21, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.board th.num, .board td.num { text-align: right; }
.board th.col-rank { width: 38px; text-align: right; padding-right: 4px; }
.board th.col-trend { width: 74px; }

.board tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.board tbody tr {
  animation: rise 520ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 16ms);
  transition: background 180ms ease;
}

.board tbody tr:hover {
  background: linear-gradient(90deg, rgba(60, 230, 168, 0.06), rgba(60, 230, 168, 0.01) 45%, transparent);
}

.board tbody tr:last-child td { border-bottom: 0; }

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.rank {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.cell-market { max-width: 0; width: 44%; }

.q {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.q:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.3); }

.sub-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
}

.sub-line .sep { opacity: 0.4; }

.sub-outcome {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}

.tag-sharp {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--mint);
  border: 1px solid rgba(60, 230, 168, 0.3);
  background: rgba(60, 230, 168, 0.08);
}

.trend svg { display: block; overflow: visible; }

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price { font-size: 13px; color: #dfe7f3; }

.delta.up { color: var(--mint); }
.delta.down { color: var(--rose); }
.delta.zero { color: var(--faint); }

.flow-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-end;
}

.flow-meter {
  width: 30px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.flow-meter i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--mint);
}

.flow-meter.low i { background: var(--faint); }
.flow-meter.mid i { background: var(--amber); }

.orb {
  --s: 0;
  --c: var(--mint);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--s) * 1%), rgba(255, 255, 255, 0.07) 0);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text);
}

.orb::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #0a0e16;
}

.orb span { position: relative; z-index: 1; }
.orb.warm { --c: var(--amber); }
.orb.cool { --c: #46536b; color: var(--muted); }

/* ---------- tape ---------- */

.tape-panel {
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  max-height: 660px;
}

.tape-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.tape-title {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.tape-filter {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
}

.tape-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.print {
  display: grid;
  grid-template-columns: 46px 38px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  animation: slide-in 380ms var(--ease) both;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: none; }
}

.print-time { font-family: var(--mono); font-size: 9.5px; color: var(--faint); }

.print-side {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 2px 0;
  border-radius: 3px;
}

.print-side.buy { color: var(--mint); background: var(--mint-soft); }
.print-side.sell { color: var(--rose); background: var(--rose-soft); }

.print-name {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-amt {
  font-family: var(--mono);
  font-size: 10.5px;
  text-align: right;
  color: var(--text);
}

.tape-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--faint);
  font-size: 11.5px;
}

.tape-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

/* ---------- flow table ---------- */

.flow-table .cell-market { width: 50%; }

.net.up { color: var(--mint); }
.net.down { color: var(--rose); }

/* ---------- signals ---------- */

.feed { display: grid; gap: 10px; }

.signal {
  position: relative;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  animation: rise 520ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}

.signal-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.badges { display: flex; gap: 5px; flex-wrap: wrap; flex-shrink: 0; }

.badge {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--muted);
}

.badge[data-kind="MOMENTUM"] { color: var(--amber); border-color: rgba(255, 198, 92, 0.3); background: rgba(255, 198, 92, 0.07); }
.badge[data-kind="VOLUME_SPIKE"] { color: #7be7ff; border-color: rgba(123, 231, 255, 0.28); background: rgba(123, 231, 255, 0.07); }
.badge[data-kind="RANGE_BREAKOUT"] { color: var(--violet); border-color: rgba(157, 140, 255, 0.3); background: rgba(157, 140, 255, 0.07); }

.signal-q {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.signal-q a { text-decoration: none; }
.signal-q a:hover { text-decoration: underline; text-underline-offset: 3px; }

.signal-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.signal-price .big {
  font-family: var(--mono);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.signal-price .label { font-size: 11px; color: var(--faint); }

.signal-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

.signal-stats b { color: var(--muted); font-weight: 500; }

.signal-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--faint);
}

.signal-foot a { color: var(--muted); text-decoration: none; }
.signal-foot a:hover { color: var(--text); }

/* ---------- empty / foot ---------- */

.empty {
  padding: 56px 24px;
  text-align: center;
}

.empty-title { margin: 0 0 8px; font-size: 14px; font-weight: 500; }
.empty-body { margin: 0 auto; max-width: 40ch; color: var(--muted); font-size: 12.5px; line-height: 1.6; }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--faint);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 11px 18px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: rgba(15, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  font-size: 12.5px;
  color: var(--text);
  z-index: 100;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  animation: toast-in 300ms var(--ease);
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, 0.7);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(420px, 100%);
  padding: 26px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: rgba(13, 18, 27, 0.98);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  animation: rise 300ms var(--ease);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 20px;
  cursor: pointer;
}

.modal-title { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.modal-body { margin: 0 0 16px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.modal-link { color: var(--mint); font-size: 12px; text-decoration: none; }
.modal-link:hover { text-decoration: underline; }

/* ---------- focus / reduced motion ---------- */

:focus-visible {
  outline: 2px solid rgba(60, 230, 168, 0.65);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  .tape-panel { display: none; }
  .brand-tag { display: none; }
}

@media (max-width: 900px) {
  .hide-md { display: none; }
  .col-trend { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero-actions { flex-direction: row; align-items: center; }
  .shell { padding: 32px 20px 56px; }
}

@media (max-width: 680px) {
  .topbar { padding: 0 14px; gap: 10px; height: 58px; }
  .hero-actions { width: 100%; align-items: flex-start; }
  .hero-cta { flex-wrap: wrap; width: 100%; }
  .hero-cta .btn { white-space: nowrap; }
  .updated { flex-basis: 100%; }
  .btn.ghost { padding: 7px 11px; font-size: 11.5px; white-space: nowrap; }
  .brand { gap: 8px; }
  .wordmark { font-size: 13px; }
  .nav { display: none; }
  .live { display: none; }
  .hide-sm { display: none; }
  .account-email { max-width: 110px; }
  .board { font-size: 11.5px; }
  .board thead th { padding: 9px 8px; }
  .board tbody td { padding: 8px; }
  .cell-market { width: 52%; }
  h1 { font-size: 30px; }
  .dek { font-size: 12.5px; }
  .foot { flex-direction: column; gap: 6px; }
}

/* ---------- brand lockup ---------- */

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.brand-a {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.brand-b {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.hero-cta { display: flex; align-items: center; gap: 10px; }

/* ---------- desks ---------- */

.desk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.18); }
.chip:active { transform: scale(0.98); }

.chip .count {
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--faint);
}

.chip.is-active {
  color: #04120c;
  border-color: transparent;
  font-weight: 600;
  background: linear-gradient(135deg, #52f0b8, #57c8ff);
}

.chip.is-active .count { background: rgba(4, 18, 12, 0.16); color: #04120c; }

.desk-sections { display: flex; flex-direction: column; gap: 38px; }

.desk-section header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.desk-title { display: flex; align-items: center; gap: 10px; }

.desk-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.desk-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.desk-blurb { margin: 5px 0 0 18px; font-size: 12px; color: var(--muted); }

.desk-count { font-family: var(--mono); font-size: 11px; color: var(--faint); }

.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.ev {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(140%);
  cursor: pointer;
  transition: transform 200ms var(--ease), border-color 200ms ease, box-shadow 200ms ease;
  animation: rise 480ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

.ev:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 26px 50px -34px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(60, 230, 168, 0.07);
}

.ev:focus-visible { outline: 2px solid rgba(60, 230, 168, 0.65); outline-offset: 2px; }

.ev-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.ev-q {
  margin: 0;
  min-height: 38px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-price { display: flex; align-items: baseline; gap: 9px; }

.ev-price .px { font-family: var(--mono); font-size: 20px; font-variant-numeric: tabular-nums; }

.ev-headline {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ev-spark svg { display: block; width: 100%; height: 36px; }

.ev-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
}

.ev-lock { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }

.desk-badge {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid;
}

.desk-TREND { color: var(--mint); border-color: rgba(60, 230, 168, 0.3); background: rgba(60, 230, 168, 0.07); }
.desk-FLOW { color: #7be7ff; border-color: rgba(123, 231, 255, 0.3); background: rgba(123, 231, 255, 0.07); }
.desk-WHALE { color: var(--violet); border-color: rgba(157, 140, 255, 0.3); background: rgba(157, 140, 255, 0.07); }
.desk-INSIDER { color: #ff8fa0; border-color: rgba(255, 143, 160, 0.32); background: rgba(255, 143, 160, 0.08); }

.desk-note {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

/* ---------- drawer ---------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, 0.72);
  backdrop-filter: blur(8px);
}

.drawer-card {
  position: relative;
  width: min(660px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 30px 30px 48px;
  background: linear-gradient(180deg, #0b1018, #070a10 60%);
  border-left: 1px solid var(--line-2);
  box-shadow: -40px 0 80px -30px rgba(0, 0, 0, 0.9);
  animation: slide-left 360ms var(--ease) both;
}

@keyframes slide-left {
  from { transform: translateX(30px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}

.dr-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

.dr-q {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.dr-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.dr-price .px { font-family: var(--mono); font-size: 30px; font-variant-numeric: tabular-nums; }

.dr-chart { margin: 4px 0 20px; }
.dr-chart svg { display: block; width: 100%; height: 168px; }

.dr-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.015);
  min-width: 0;
}

.stat b {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat span {
  display: block;
  margin-top: 3px;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.dr-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 9px;
}

.dr-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.premium {
  border: 1px solid rgba(60, 230, 168, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(60, 230, 168, 0.07), rgba(60, 230, 168, 0.01));
  padding: 20px;
  margin-bottom: 22px;
}

.premium h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.premium p { margin: 0 0 12px; font-size: 12px; color: var(--muted); line-height: 1.6; }

.premium ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.premium li::before { content: "◦"; color: var(--mint); margin-right: 8px; }

.read {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 14px;
}

.prints { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 10.5px; }

.prints th {
  text-align: left;
  padding: 6px 8px;
  color: var(--faint);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.prints td { padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.prints td.num { text-align: right; }

.dr-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--faint);
}

.dr-foot a { color: var(--mint); text-decoration: none; }
.dr-foot a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .drawer-card { padding: 22px 18px 40px; }
  .dr-stats, .dr-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dr-q { font-size: 18px; }
  .brand-b { font-size: 6.8px; letter-spacing: 0.14em; }
}

@media (max-width: 560px) {
  .ev-grid { grid-template-columns: 1fr; }
}
