/* Whale Tracker — Bloomberg at 2am.
 * Pure black. Hairline rulings. One green accent. Mono-forward. */

:root {
  --bg:       #07090d;       /* near-black with the faintest cool tint */
  --bg-up:    #0f1219;       /* row hover / subtle panel surface */
  --bg-down:  #04050a;       /* depth / sticky-header backdrop */
  --glass:    rgba(255, 255, 255, 0.035);
  --glass-hi: rgba(255, 255, 255, 0.06);
  --text: #f2f2f2;
  --text-dim: rgba(242, 242, 242, 0.62);
  --text-faint: rgba(242, 242, 242, 0.38);
  --text-ghost: rgba(242, 242, 242, 0.18);
  --line:        rgba(242, 242, 242, 0.08);
  --line-strong: rgba(242, 242, 242, 0.14);

  --signal:      #4aff8e;
  --signal-dim:  rgba(74, 255, 142, 0.45);
  --signal-glow: rgba(74, 255, 142, 0.12);

  --good: #4aff8e;
  --bad:  #ff6b83;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --page-pad: 28px;
  --max-w: 1280px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(74, 255, 142, 0.2); color: #fff; }

a { color: inherit; text-decoration: none; }

/* Particle field — fixed behind content --------------------------- */
#particle-field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Layout ---------------------------------------------------------- */
.app {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px var(--page-pad) 60px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* Header ---------------------------------------------------------- */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.05); }
}

.page-title {
  font-family: var(--sans);
  margin: 0 0 10px;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 0.25em;
}

/* Inline whale-shark feed, sized to the title text.
   Radial mask bleeds the rectangle edges into the background. */
.title-video {
  align-self: center;
  height: 1.8em;
  width: calc(1.8em * 16 / 9);
  object-fit: cover;
  background: transparent;
  -webkit-mask-image: radial-gradient(ellipse 62% 78% at 50% 50%, #000 58%, transparent 100%);
          mask-image: radial-gradient(ellipse 62% 78% at 50% 50%, #000 58%, transparent 100%);
  filter: contrast(1.04) saturate(0.85);
  margin-left: 0.3em;
  pointer-events: none;
  user-select: none;
}
.title-accent {
  color: var(--signal);
  font-weight: 500;
}
.page-title em {
  font-style: normal;
  color: var(--text-dim);
  font-weight: 200;
}

.page-tagline {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
  max-width: 640px;
  line-height: 1.55;
}

@media (max-width: 700px) {
  :root { --page-pad: 18px; }
}

/* Stats strip ----------------------------------------------------- */
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.stat__value {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

/* Sections (glass panels) ----------------------------------------- */
.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 24px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Backtest panel — verdict + top-K table */
.backtest-panel { border-color: rgba(168, 200, 255, 0.15); }
.backtest-panel h2 { color: #a8c8ff; }

.backtest-verdict {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  padding: 14px 16px;
  border-left: 3px solid var(--text-faint);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  margin-bottom: 14px;
}
.backtest-verdict.verdict-good  { border-left-color: var(--signal); background: rgba(74, 255, 142, 0.06); }
.backtest-verdict.verdict-warn  { border-left-color: #ffd37a;       background: rgba(255, 211, 122, 0.05); }
.backtest-verdict.verdict-bad   { border-left-color: var(--bad);    background: rgba(255, 107, 131, 0.05); }
.backtest-verdict.verdict-muted { border-left-color: var(--text-faint); }

.backtest-grid {
  display: grid;
  grid-template-columns: 180px 70px 60px 1.3fr 90px 1.4fr 130px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.backtest-grid .bt-cell { line-height: 1.4; }
.backtest-grid .bt-cell .small { display: block; margin-top: 2px; font-size: 10px; }
.backtest-grid .bt-cell.warn { color: #ffd37a; }
.backtest-grid .bt-span-muted { color: var(--text-faint); padding: 11px 12px; border-bottom: 1px solid var(--line); }
.backtest-grid .bt-strat {
  color: var(--text);
  font-weight: 500;
  font-family: var(--sans);
  font-size: 12.5px;
}
.backtest-grid .bt-head {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.backtest-grid .bt-cell {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.backtest-grid .bt-cell.bt-k { color: var(--text-dim); font-weight: 500; }
.backtest-grid .bt-cell.pos { color: var(--signal); }
.backtest-grid .bt-cell.neg { color: var(--bad); }
.backtest-grid .bt-cell.muted { color: var(--text-faint); }
.bt-meta {
  grid-column: 1 / -1;
  padding: 10px 14px;
  font-size: 10.5px;
  color: var(--text-faint);
  background: rgba(255,255,255,0.02);
}
@media (max-width: 900px) {
  .backtest-grid { grid-template-columns: repeat(3, 1fr); }
  .backtest-grid .bt-head:nth-child(n+4),
  .backtest-grid .bt-cell:nth-child(7n+4),
  .backtest-grid .bt-cell:nth-child(7n+5),
  .backtest-grid .bt-cell:nth-child(7n+6),
  .backtest-grid .bt-cell:nth-child(7n+7) { display: none; }
}

/* Smart Money = primary view, gets a green-tinted lift */
.section--primary {
  border-color: rgba(74, 255, 142, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 60px rgba(74, 255, 142, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.35);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 500;
}

.section-head h2.accent { color: var(--signal); }

.section-caption {
  margin: 0;
  color: var(--text-faint);
  font-size: 11.5px;
  font-family: var(--sans);
  flex: 1 1 auto;
  min-width: 0;
}

/* Smart-money feed ------------------------------------------------ */
.signals-feed {
  display: flex;
  flex-direction: column;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.signals-feed::-webkit-scrollbar { width: 6px; }
.signals-feed::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

/* Signal row — CSS Grid layout, bulletproof at all viewport sizes.
   signal-body uses display:contents so its children become direct grid
   participants (flattens the nested structure for layout purposes). */
.signal-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "side  top     trade"
    "side  stats   trade"
    "side  explain trade";
  gap: 6px 14px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
}
.signal-row:hover { background: rgba(74, 255, 142, 0.03); }
.signal-body { display: contents; }
.signal-top     { grid-area: top; }
.signal-stats   { grid-area: stats; }
.signal-explain { grid-area: explain; }
.signal-row .signal-side  { grid-area: side; align-self: start; padding-top: 2px; }
.signal-row .trigger-link { grid-area: trade; align-self: center; }

.signal-side {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 4px;
  min-width: 48px;
}
.signal-side.yes { color: var(--signal); }
.signal-side.no  { color: var(--bad); }

.signal-title {
  display: block;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}
a.signal-title:hover { color: var(--signal); text-decoration: underline; text-decoration-color: var(--signal-dim); text-underline-offset: 3px; }

.signal-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 11px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.signal-stats b { color: var(--text-dim); font-weight: 400; }
.signal-stats .sep { color: var(--text-ghost); }
.signal-stats .drift-pos, .signal-stats .drift-pos b { color: var(--signal); }
.signal-stats .drift-neg, .signal-stats .drift-neg b { color: var(--bad); }
.signal-stats .size   { color: var(--text-dim); }
.signal-stats .whale  { color: var(--text-faint); }
.signal-stats .rank   { color: var(--signal); }

.signal-time {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 10.5px;
  color: var(--text-faint);
  text-align: right;
  min-width: 120px;
}
.signal-time .t-opened { color: var(--text-dim); }
.signal-time .t-closes { color: var(--text-faint); }

.trigger-link {
  flex: 0 0 auto;
  color: var(--signal);
  padding: 7px 14px;
  border: 1px solid var(--signal-dim);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}
.trigger-link:hover {
  background: rgba(74, 255, 142, 0.08);
  border-color: var(--signal);
}

.signal-empty, .consensus-empty, .radar-empty-text {
  padding: 36px 10px;
  text-align: center;
  color: var(--text-faint);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

/* Consensus table -------------------------------------------------- */
.consensus-table {
  border: 1px solid var(--line);
  overflow-x: auto;
}
.consensus-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.consensus-table thead th {
  color: var(--text-faint);
  text-align: left;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.consensus-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.consensus-table tbody tr:last-child td { border-bottom: none; }
.consensus-table tbody tr:hover { background: rgba(74, 255, 142, 0.03); }
.consensus-table .numeric { text-align: right; }
.consensus-table .market {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  max-width: 480px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.consensus-table .side-yes { color: var(--signal); }
.consensus-table .side-no  { color: var(--bad); }

/* Controls -------------------------------------------------------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.control { display: flex; flex-direction: column; gap: 5px; flex: 1 1 140px; min-width: 130px; }

.control label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}

.control input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  padding: 5px 0;
  font-size: 13px;
  font-family: var(--mono);
}

.control input:focus {
  outline: none;
  border-bottom-color: var(--signal);
}

.btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  padding: 7px 14px;
  font-size: 10.5px;
  font-family: var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.btn:hover { color: var(--text); border-color: var(--text-dim); }
.btn.ghost { }
.btn.small { padding: 4px 9px; font-size: 9.5px; }

/* Leaderboard ----------------------------------------------------- */
.leaderboard-wrap {
  border: 1px solid var(--line);
  max-height: 640px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.leaderboard-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.leaderboard-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

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

thead th {
  background: var(--bg-down);
  color: var(--text-faint);
  text-align: left;
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 2;
}

thead th.sortable { cursor: pointer; transition: color 120ms ease; }
thead th.sortable:hover { color: var(--text); }
thead th.sortable-asc::after  { content: " ↑"; color: var(--signal); }
thead th.sortable-desc::after { content: " ↓"; color: var(--signal); }

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
tbody tr:last-child td { border-bottom: none; }

tbody tr.whale-row { cursor: pointer; transition: background 100ms ease; }
tbody tr.whale-row:hover { background: rgba(255, 255, 255, 0.025); }
tbody tr.whale-row.selected {
  background: rgba(74, 255, 142, 0.05);
  box-shadow: inset 2px 0 0 var(--signal);
}

tbody td.empty, td.empty {
  text-align: center;
  padding: 40px;
  color: var(--text-faint);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

th.numeric, td.numeric { text-align: right; }

/* Wallet cells */
.addr-cell { display: inline-flex; align-items: center; gap: 10px; }
.addr { font-size: 12px; color: var(--text); }
.addr-label {
  font-size: 10.5px;
  color: var(--signal);
  padding: 1px 6px;
  border: 1px solid var(--signal-dim);
}
.copy-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-faint);
  padding: 1px 6px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  transition: color 120ms ease, border-color 120ms ease;
}
.copy-btn:hover { color: var(--signal); border-color: var(--signal-dim); }

.score-cell { font-weight: 500; font-size: 13px; color: var(--score-color, var(--text)); }
.pos { color: var(--signal); }
.neg { color: var(--bad); }
.muted { color: var(--text-faint); }
.small { font-size: 11px; }

/* Expanded row — constrained height, its own scroll ---------------- */
.expanded-row td {
  background: rgba(255, 255, 255, 0.015);
  padding: 18px 22px 22px;
  white-space: normal;
}

.expanded-grid {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr 1fr;
  gap: 28px;
  align-items: start;
  overflow: hidden;
}

.expanded-grid > div {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.expanded-grid h3 {
  margin: 0 0 10px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
}

.expanded-grid h3 .count {
  color: var(--signal);
  letter-spacing: 0.08em;
  font-size: 10.5px;
  margin-left: 6px;
}

.subtable {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.subtable::-webkit-scrollbar { width: 5px; }
.subtable::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

.subtable table { font-size: 11.5px; }
.subtable thead th {
  padding: 6px 10px;
  font-size: 9.5px;
  position: sticky;
  top: 0;
  background: #0a0a0a;
}
.subtable tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
}
.subtable .empty {
  color: var(--text-faint);
  padding: 14px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-align: center;
}
.subtable a { color: var(--text); border-bottom: 1px dotted var(--text-ghost); }
.subtable a:hover { color: var(--signal); border-bottom-color: var(--signal-dim); }

/* Live positions table — grouped by market with both-sides net summary */
.subtable .positions-live tbody tr.group-head td {
  padding: 9px 10px 6px;
  background: rgba(255,255,255,0.025);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}
.subtable .positions-live tbody tr.group-head:first-child td {
  border-top: none;
}
.subtable .positions-live tbody tr.group-head a { color: var(--text); }
.subtable .positions-live .net-badge {
  margin-left: 10px;
  display: inline-block;
  padding: 1px 7px;
  font-size: 10px;
  letter-spacing: 0.06em;
  border-radius: 3px;
  border: 1px solid rgba(255,211,122,0.35);
  background: rgba(255,211,122,0.06);
  color: #ffd37a;
  vertical-align: middle;
}
.subtable .positions-live tbody tr:not(.group-head) td:first-child {
  padding-left: 22px;
  font-weight: 500;
}

.category-mix {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  overflow-y: auto;
  max-height: 280px;
}
.cat-pill {
  border: 1px solid var(--line-strong);
  padding: 4px 8px;
  font-size: 10.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.cat-pill strong { color: var(--signal); margin-right: 6px; font-weight: 500; }

@media (max-width: 800px) {
  .expanded-grid { grid-template-columns: 1fr; max-height: none; }
  .subtable { max-height: 240px; }
}

/* Radar panel ----------------------------------------------------- */
.radar-panel { max-width: 720px; }
.radar-wrap { position: relative; height: 320px; }

/* Footer ---------------------------------------------------------- */
.app-footer {
  color: var(--text-faint);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ====================================================================
 * Mobile overrides — kept at end of file so they win the cascade
 * ====================================================================*/

/* Mobile: stack signal-row contents as a single column */
@media (max-width: 700px) {
  .signal-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "side"
      "top"
      "stats"
      "explain"
      "trade";
    gap: 8px;
    padding: 14px;
  }
  .signal-row .signal-side { justify-self: start; }
  .signal-row .signal-title { white-space: normal; line-height: 1.3; }
  .signal-row .trigger-link { justify-self: stretch; text-align: center; }
}

/* ====================================================================
 * Live signal verdict badges + watchlist cards
 * ====================================================================*/

.verdict-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  border-radius: 4px;
  border: 1px solid;
  margin-left: 8px;
  vertical-align: middle;
}
.verdict-badge.verdict-enter { color: var(--signal); border-color: var(--signal-dim); background: rgba(74,255,142,0.08); }
.verdict-badge.verdict-late  { color: #ffd37a; border-color: rgba(255,211,122,0.4); background: rgba(255,211,122,0.05); }
.verdict-badge.verdict-skip  { color: var(--text-faint); border-color: var(--line-strong); background: rgba(255,255,255,0.02); }

.signal-row.verdict-enter { border-left: 3px solid var(--signal); }
.signal-row.verdict-late  { border-left: 3px solid #ffd37a; }
.signal-row.verdict-skip  { opacity: 0.6; }

.signal-top {
  display: flex; align-items: center; flex-wrap: wrap;
  justify-content: space-between; gap: 8px;
  margin-bottom: 4px;
}

.signal-reasons { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.signal-reasons .tag {
  font-size: 10px;
  color: var(--text-faint);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.signal-stats .warn { color: #ffd37a; }

/* Watchlist grid */
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.watch-card {
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.35);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.watch-card.active { border-color: rgba(74,255,142,0.28); box-shadow: 0 0 20px rgba(74,255,142,0.05); }
.watch-card.recent { border-color: rgba(255,211,122,0.22); }
.watch-card.stale  { opacity: 0.65; }

.watch-rank {
  position: absolute; top: 10px; right: 12px;
  font-family: var(--mono); font-size: 11px; color: var(--text-faint);
}
.watch-addr {
  font-size: 12px;
  color: var(--text);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.watch-stats { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.watch-stat {
  display: flex; justify-content: space-between; align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.watch-stat .k { color: var(--text-faint); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.watch-stat .v { color: var(--text); font-family: var(--mono); }
.watch-stat .v.pos { color: var(--signal); }

.watchlist-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* Global: make [hidden] win over any display rule */
[hidden] { display: none !important; }

/* Verdict badge (hover title attribute shows full rationale) */
.verdict-badge {
  cursor: help;
  user-select: none;
  font-family: var(--mono);
}

/* Always-visible inline rationale below the stats line */
.signal-explain {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  color: var(--text-faint);
  cursor: help;
}
.signal-explain .explain-pass { color: var(--signal); }
.signal-explain .explain-warn { color: #ffd37a; }
.signal-explain .explain-fail { color: var(--bad); }
.signal-explain .explain-unknown { color: var(--text-faint); }
.signal-explain .sep { color: var(--text-ghost); }

/* Click-through hint on signal + watchlist cards */
.signal-row, .watch-card { cursor: pointer; }
.signal-row a, .signal-row button, .watch-card a, .watch-card button { cursor: auto; }
.signal-row:focus-visible, .watch-card:focus-visible { outline: 1px solid var(--signal-dim); outline-offset: -1px; }

/* Wallet positions modal */
body.modal-open { overflow: hidden; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px;
  animation: modalFade 120ms ease-out;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(880px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 18px 22px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.modal-eyebrow {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 4px;
}
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 500; }
.modal-close {
  background: transparent; border: none; color: var(--text-dim);
  font-size: 22px; line-height: 1; padding: 0 4px; cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.modal-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px 18px; margin-bottom: 18px;
}
.modal-stat { display: flex; flex-direction: column; gap: 2px; }
.modal-stat .k { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.modal-stat .v { font-family: var(--mono); font-size: 13px; color: var(--text); }
.modal-body h4 {
  margin: 0 0 10px; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-dim); font-weight: 500;
}
