/* Крот на бирже — общий стиль в духе DEX-терминала: тёмный плоский фон, тонкие линии 1px,
   радиусы 4–6px, моноширинные табличные цифры. Имена переменных ниже используют все страницы. */
:root {
  --bg: #0b0e11;
  --panel: #12161b;
  --panel-2: #181d24;
  --panel-3: #20262f;
  --line: #222932;
  --line-strong: #313a46;
  --text: #e6e9ee;
  --muted: #8a94a3;
  --dim: #5a6472;
  --up: #22c58b;
  --up-ink: #03140d;
  --down: #f0455b;
  --amber: #f0a62b;
  --brand: #4f7cff;
  --tg: #2aabee;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 400 14px/1.35 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: inline-block; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up { color: var(--up); }
.down { color: var(--down); }
.amber { color: var(--amber); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.hidden { display: none !important; }

.label { font-size: 11px; line-height: 14px; font-weight: 500; color: var(--muted); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* Иконки: единый штрих */
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.info-btn { display: inline-grid; place-items: center; width: 20px; height: 20px; margin: -3px 0; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--dim); }
.info-btn .ic { width: 14px; height: 14px; stroke-width: 1.6; }
.info-btn:active { color: var(--text); }

/* Знак токена и идентиконки кошельков */
.logo { flex: none; width: 36px; height: 36px; display: grid; place-items: center; overflow: hidden; background: transparent; }
.logo svg { width: 100%; height: 100%; display: block; }
.av { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1.5px var(--ring, #3a434f); vertical-align: middle; }
.av svg { width: 100%; height: 100%; display: block; }
.av.lg { width: 28px; height: 28px; box-shadow: 0 0 0 2px var(--ring, #3a434f); }

.ticker { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ticker b { font-size: 15px; font-weight: 700; }
.ticker span { display: block; font-size: 11px; color: var(--muted); }

.change { display: inline-flex; align-items: center; gap: 4px; padding: 0 5px; border-radius: 4px; font: 500 12px/18px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.change.up { background: rgba(34,197,139,.12); color: var(--up); }
.change.down { background: rgba(240,69,91,.12); color: var(--down); }

/* Метки кошельков (после разбора) */
.tag { display: inline-block; padding: 0 5px; border-radius: 3px; font: 600 10px/15px var(--sans); white-space: nowrap; margin-left: 5px; vertical-align: 1px; }
.tag-dev { background: rgba(240,69,91,.14); color: var(--down); box-shadow: inset 0 0 0 1px rgba(240,69,91,.4); }
.tag-sniper { background: rgba(240,166,43,.14); color: var(--amber); box-shadow: inset 0 0 0 1px rgba(240,166,43,.4); }
.tag-bot { background: var(--amber); color: #1a1000; }
.tag-you { background: rgba(79,124,255,.16); color: #9db4ff; box-shadow: inset 0 0 0 1px rgba(79,124,255,.45); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 14px; border: 1px solid transparent; border-radius: 5px;
  font-weight: 600; font-size: 14px; user-select: none; transition: filter .12s, opacity .12s; touch-action: manipulation; white-space: nowrap; }
.btn:active:not(:disabled) { filter: brightness(.88); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.buy { background: var(--up); color: var(--up-ink); }
.btn.sell { background: var(--down); color: #fff; }
.btn.ghost { background: var(--panel-2); border-color: var(--line-strong); }
.btn.brand { background: var(--brand); color: #fff; }
.btn.amber { background: var(--amber); color: #1a1000; }
.btn.outline-down { background: transparent; color: var(--down); border-color: rgba(240,69,91,.5); }
.btn.small { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 4px; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; height: 28px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line);
  font-size: 12px; white-space: nowrap; color: var(--text); }
button.chip:active { background: var(--panel-3); }
.chip.on { border-color: var(--brand); color: #c7d4ff; background: rgba(79,124,255,.12); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); flex: none; }
.dot.off { background: var(--down); }
.dot.warn { background: var(--amber); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 3px; font: 600 10px/16px var(--sans); }
.pill.risk { background: rgba(240,69,91,.14); color: var(--down); }
.pill.warn { background: rgba(240,166,43,.14); color: var(--amber); }
.pill.ok { background: rgba(34,197,139,.14); color: var(--up); }

/* Пост в стиле канала (используется проектором) */
.tg-post { display: flex; gap: 10px; padding: 8px 10px; border-radius: 6px; background: #151c24; border: 1px solid #22303d; }
.tg-post .avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #2c3a4a; color: #fff; font: 700 12px/1 var(--sans); }
.tg-post .who { font-weight: 600; font-size: 13px; color: var(--tg); }
.tg-post .meta { font-size: 12px; color: var(--muted); }
.tg-post .text { margin-top: 2px; line-height: 1.4; }
.tg-post.fresh { animation: slide-in .4s cubic-bezier(.16,1,.3,1); }
@keyframes slide-in { from { transform: translateY(-8px); opacity: 0; } }

/* Варианты квиза */
.verdict-ok { --c: var(--up); }
.verdict-risk { --c: var(--amber); }
.verdict-no { --c: var(--down); }

/* Карта связей (SVG) */
.bubbles { width: 100%; height: auto; display: block; }
.bm-link { stroke: var(--down); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: .7; }
.bm-funder { fill: var(--down); }
.bm-node { fill: var(--panel-3); stroke: var(--line-strong); stroke-width: 1; }
.bm-cluster { fill: rgba(240,69,91,.22); stroke: var(--down); }
.bm-me { fill: rgba(79,124,255,.3); stroke: var(--brand); }
.bm-pct { fill: var(--text); font: 600 9px var(--mono); }
.bm-label { fill: var(--down); font: 600 9px var(--mono); }

.conn { position: fixed; right: 10px; top: calc(10px + env(safe-area-inset-top)); z-index: 80; display: none; }
.conn.show { display: inline-flex; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
