/* Drop Radar — тёмная «консоль». Мобильная вёрстка по умолчанию, десктоп ниже по медиазапросам. */

:root {
  --bg: #0a0e13;
  --bg-glass: rgba(10, 14, 19, .86);
  --surface: #121922;
  --surface-2: #17202b;
  --surface-3: #1e2935;
  --line: #222d39;
  --line-2: #2d3a48;
  --text: #e7edf3;
  --text-2: #aab6c3;
  --muted: #8392a1;

  --accent: #3be8a8;
  --accent-ink: #04140e;
  --accent-soft: rgba(59, 232, 168, .12);
  --chart: #22a878;          /* столбики графиков: проверено по контрасту к --surface */
  --warn: #f2b33d;
  --bad: #ff7a7a;

  --radius: 14px;
  --radius-sm: 10px;
  --tabs-h: 46px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* в полноэкранном режиме Telegram отдаёт свои отступы через эти переменные */
  --safe-top: calc(env(safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-top: var(--safe-top);
}

/* едва заметная сетка «экрана» сверху страницы */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 420px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(59, 232, 168, .07), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 28px);
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.h2 { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.h3 { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 650; }

/* ---------- плашка «Открыть в Telegram» ---------- */

.tg-banner {
  background: linear-gradient(90deg, #102a22, #0f1d26 60%, #111821);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.tg-banner__in { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.tg-banner__link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  padding: 8px 0;
  min-width: 0;
}
.tg-banner__link svg { color: var(--accent); flex: none; }
.tg-banner__link:hover { text-decoration: none; }
.tg-banner__link:hover span:not(.tg-banner__arrow) { text-decoration: underline; text-underline-offset: 3px; }
.tg-banner__arrow { color: var(--accent); }
.tg-banner__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: -8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tg-banner__close:hover { color: var(--text); background: var(--surface-2); }

/* ---------- шапка ---------- */

.top__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand status"
    "sites sites";
  align-items: center;
  gap: 10px 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  min-width: 0;
  justify-self: start;
}
.brand:hover { text-decoration: none; }
.brand__icon { width: 30px; height: 30px; flex: none; }
.brand__name { font-weight: 750; font-size: 17px; letter-spacing: -.015em; white-space: nowrap; }
.brand__sweep {
  transform-box: view-box;
  transform-origin: 50% 50%;
  transform: rotate(-35deg);
}
html[data-live="live"] .brand__sweep { animation: sweep 4.5s linear infinite; }
@keyframes sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.status {
  grid-area: status;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  min-width: 0;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px 0 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  color: var(--text-2);
  white-space: nowrap;
}
.live__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.live[data-state="live"] { color: var(--accent); border-color: rgba(59, 232, 168, .28); }
.live[data-state="live"] .live__dot { background: var(--accent); }
.live[data-state="live"] .live__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  animation: ping 2.2s ease-out infinite;
}
.live[data-state="reconnect"], .live[data-state="stale"] { color: var(--warn); border-color: rgba(242, 179, 61, .3); }
.live[data-state="reconnect"] .live__dot, .live[data-state="stale"] .live__dot { background: var(--warn); animation: blink 1.1s steps(2, start) infinite; }
.live[data-state="stale"] .live__dot { animation: none; }
.live[data-state="offline"] { color: var(--bad); border-color: rgba(255, 122, 122, .3); }
.live[data-state="offline"] .live__dot { background: var(--bad); }
.live[data-state="connecting"] .live__dot { animation: blink 1.1s steps(2, start) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
@keyframes blink { to { opacity: .25; } }

.online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.online b { color: var(--text); font-weight: 600; }
.online__word { display: none; }

/* сегментный переключатель (сайт, период) */
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.seg__btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.seg__btn:hover { color: var(--text); background: var(--surface-2); }
.seg__btn[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 0 rgba(0, 0, 0, .3);
}
.seg__btn[aria-pressed="true"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 2px;
}
.seg--sm .seg__btn { min-height: 30px; font-size: 13px; padding: 0 10px; }
.seg--sm .seg__btn[aria-pressed="true"]::before { display: none; }

.sites { grid-area: sites; }

/* ---------- вкладки ---------- */

.tabsbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tab {
  position: relative;
  height: var(--tabs-h);
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(59, 232, 168, .6);
}
.tab:focus-visible { outline-offset: -4px; }

/* ---------- общее ---------- */

.main { padding-top: 16px; padding-bottom: calc(40px + var(--safe-bottom)); }
.panel { animation: panelIn .22s ease-out; }
.panel:focus-visible { outline: none; }
@keyframes panelIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.main.is-loading .panel { opacity: .55; transition: opacity .2s; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
}
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card__head--col { display: block; margin-bottom: 12px; }
.card__sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

.link-btn {
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

.foot { margin: 16px 2px 0; color: var(--muted); font-size: 12.5px; }

/* ---------- плитки ---------- */

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile {
  position: relative;
  min-width: 0;
  padding: 11px 12px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tile__label {
  font: 600 10.5px/1.3 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile__value {
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile__value small { font-size: 14px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.tile__sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tiles--4 .tile__sub { white-space: normal; }
.tile__note {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--text-2);
}

.meter {
  position: relative;
  height: 4px;
  margin-top: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--surface-3), var(--line-2) 50%, var(--surface-3));
}
.meter__mid {
  position: absolute;
  left: 50%;
  top: -3px;
  width: 1px;
  height: 10px;
  background: var(--muted);
}
.meter__mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
  transition: left .6s cubic-bezier(.2, .8, .2, 1);
}
.tile--act.is-empty .meter__mark { display: none; }

/* ---------- лента ---------- */

.feed-side { display: flex; flex-direction: column; gap: 12px; }

/* SCORE: палитра уровней как у оригинальных программ (COLD серый … FIRE жёлтый) */
.score {
  --sc-bg: #121216;
  --sc-fg: #9a9688;
  --sc-bar: #5d5848;
  --sc-line: rgba(93, 88, 72, .55);
  background: var(--sc-bg);
  border: 1px solid var(--sc-line);
  border-radius: var(--radius);
  padding: 14px 16px 13px;
  color: var(--sc-fg);
  transition: background-color .5s ease, border-color .5s ease, color .5s ease;
}
.score[data-level="WARM"] { --sc-bg: #1c1810; --sc-fg: #ffe070; --sc-bar: #c8a010; --sc-line: rgba(200, 160, 16, .45); }
.score[data-level="HOT"]  { --sc-bg: #241c08; --sc-fg: #fbd506; --sc-bar: #e8b800; --sc-line: rgba(232, 184, 0, .55); }
.score[data-level="FIRE"] { --sc-bg: #2c2006; --sc-fg: #fff080; --sc-bar: #fbd506; --sc-line: rgba(251, 213, 6, .7); }
.score.is-empty { --sc-fg: #9a9688; --sc-bar: #5d5848; }

.score__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.score__kicker {
  margin: 0;
  font: 600 10.5px/1.3 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.score__link {
  border: 0;
  background: none;
  padding: 6px 0 6px 8px;
  margin: -6px 0;
  font: 600 12.5px/1.2 var(--font);
  color: var(--sc-fg);
  opacity: .85;
  cursor: pointer;
}
.score__link:hover { opacity: 1; text-decoration: underline; }

.score__main { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.score__num {
  font: 800 56px/1 var(--font);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.score__meta { display: grid; gap: 3px; min-width: 0; }
.score__level { font: 800 22px/1 var(--font); letter-spacing: .02em; }
.score__level:empty { display: none; }
.score__title { font-size: 13.5px; font-weight: 600; color: var(--text-2); }

.score__bar {
  height: 8px;
  margin-top: 12px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .45);
  overflow: hidden;
}
.score__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--sc-bar);
  transition: width .45s ease, background-color .5s ease;
}

.score__why { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--text); }
.score__why:empty { display: none; }

.score__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 14px;
  margin: 10px 0 0;
  font: 12.5px/1.45 var(--mono);
  font-variant-numeric: tabular-nums;
}
.score__stats:empty { display: none; }
.score__stat { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.score__stat dt { color: var(--muted); white-space: nowrap; }
.score__stat dd { margin: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.score__note {
  display: grid;
  gap: 2px;
  margin: 11px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.score__note span:empty { display: none; }

/* проверка SCORE на вкладке «Проверка» */
.score-check { margin-top: 16px; scroll-margin-top: calc(var(--tabs-h) + 12px); }
.score-check__sub { margin: 16px 0 8px; }
.sc-share {
  display: flex;
  height: 14px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-3);
}
.sc-share__seg { display: block; height: 100%; min-width: 2px; }
.sc-share__seg + .sc-share__seg { box-shadow: inset 1px 0 0 rgba(0, 0, 0, .5); }
[data-level="FIRE"] > .sc-legend__dot, .sc-share__seg[data-level="FIRE"] { background: #fbd506; }
[data-level="HOT"] > .sc-legend__dot, .sc-share__seg[data-level="HOT"] { background: #c89a00; }
[data-level="WARM"] > .sc-legend__dot, .sc-share__seg[data-level="WARM"] { background: #8a7420; }
[data-level="COLD"] > .sc-legend__dot, .sc-share__seg[data-level="COLD"] { background: #5d5848; }
.sc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font: 12.5px/1.4 var(--mono);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.sc-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.sc-legend__dot { width: 9px; height: 9px; border-radius: 3px; }
.verdict.verdict--inline { display: block; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.verdict--inline[data-v="no_effect"], .verdict--inline[data-v="constant"] { border-color: rgba(59, 232, 168, .35); }
.verdict--inline[data-v="effect"] { border-color: rgba(242, 179, 61, .4); }
.foot--in { margin: 12px 0 0; }
.side-top { display: none; }

.feed-col { margin-top: 18px; min-width: 0; }
.feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.site-note { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }

.chip-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.chip-btn:hover { color: var(--text); border-color: var(--muted); }
.chip-btn .i-play { display: none; }
.chip-btn[aria-pressed="true"] { color: var(--warn); border-color: rgba(242, 179, 61, .4); }
.chip-btn[aria-pressed="true"] .i-play { display: block; }
.chip-btn[aria-pressed="true"] .i-pause { display: none; }

.new-pill {
  position: sticky;
  top: calc(var(--tabs-h) + 10px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  margin: 0 auto -32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45), 0 0 0 1px rgba(59, 232, 168, .4);
}
.new-pill:focus-visible { outline-color: var(--text); }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.drop {
  --rc: #4b69ff;
  --rc-soft: rgba(75, 105, 255, .18);
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 8px 12px 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.drop::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--rc);
}
.drop.is-new { animation: dropIn .5s cubic-bezier(.2, .8, .2, 1); }
.drop.is-new::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--rc);
  background: linear-gradient(90deg, var(--rc-soft), transparent 55%);
  animation: flash 1.8s ease-out forwards;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }

.thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 52px;
  border-radius: 8px;
  background:
    radial-gradient(closest-side, var(--rc-soft), transparent),
    var(--surface-2);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.thumb--sm { width: 48px; height: 36px; border-radius: 6px; }
.thumb__ph {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px dashed var(--line-2);
}

.drop__body { min-width: 0; }
.drop__name {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drop__sub {
  margin-top: 1px;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drop__meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
  min-width: 0;
}
.drop__user { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop__meta time { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.drop__meta .dot { flex: none; }

.drop__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.price {
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chance {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.src { font-size: 11px; color: var(--muted); white-space: nowrap; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 16px 40px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}
.empty__radar {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  background:
    radial-gradient(circle, transparent 0 13px, var(--line-2) 13.5px 14.5px, transparent 15px 27px, var(--line) 27.5px 28.5px, transparent 29px);
  overflow: hidden;
}
.empty__radar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(59, 232, 168, .5), transparent 25%);
  animation: sweep 3s linear infinite;
}
.empty__title { margin: 0; font-weight: 650; font-size: 15px; }
.empty__text { margin: 6px 0 0; color: var(--muted); font-size: 13px; max-width: 32ch; }
.empty-inline { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- мини-топ и топ-10 ---------- */

.mini-list { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.mini-list li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 18px 3px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.mini-list li:first-child { border-top: 0; padding-top: 2px; }
.mini-list li::before { content: counter(n); font: 600 11px var(--mono); color: var(--muted); }
.mini-list .bar { width: 3px; height: 18px; border-radius: 2px; background: var(--rc); }
.mini-list .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.mini-list .price { font-size: 13px; font-weight: 650; }

.top-list { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.top-item {
  --rc: #4b69ff;
  --rc-soft: rgba(75, 105, 255, .18);
  counter-increment: n;
  display: grid;
  grid-template-columns: 20px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.top-item:first-child { border-top: 0; padding-top: 0; }
.top-item::before { content: counter(n); font: 600 12px var(--mono); color: var(--muted); text-align: right; }
.top-item .drop__name { font-size: 13.5px; }
.top-item .drop__meta { margin-top: 2px; }
.top-item .price { font-size: 14px; }

/* ---------- графики ---------- */

.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
figure.card { margin: 0; }

.chart { position: relative; width: 100%; min-height: 40px; border-radius: 8px; touch-action: pan-y; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--muted); font: 10.5px var(--mono); font-variant-numeric: tabular-nums; }
.chart .lbl { fill: var(--text-2); font: 600 11px var(--font); }
.chart .bar { fill: var(--chart); transition: fill .12s; }
.chart .bar.is-em { fill: var(--accent); }
.chart .bar.is-zero { fill: var(--line-2); }
.chart .bar.is-hover { fill: #47d6a3; }
.chart .bar.is-em.is-hover { fill: #7ff0c6; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hl { fill: rgba(255, 255, 255, .04); }
.chart .ref { stroke: var(--muted); stroke-width: 1; shape-rendering: crispEdges; }
.chart .ci { stroke: var(--chart); stroke-width: 2; stroke-linecap: round; }
.chart .ci-cap { stroke: var(--chart); stroke-width: 2; stroke-linecap: round; }
.chart .pt { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .em-lbl { fill: var(--accent); font: 700 10px var(--mono); letter-spacing: .04em; }
.chart-empty {
  display: grid;
  place-items: center;
  height: 150px;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.tip {
  position: fixed;
  z-index: 60;
  left: 0;
  top: 0;
  max-width: 240px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #0b1118;
  border: 1px solid var(--line-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  pointer-events: none;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-2);
}
.tip b { display: block; color: var(--text); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

.tbl { margin-top: 10px; }
.tbl summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.tbl summary::-webkit-details-marker { display: none; }
.tbl summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s;
}
.tbl[open] summary::before { transform: rotate(45deg) translate(-1px, -1px); }
.tbl summary:hover { color: var(--text); }
.tbl__wrap { overflow-x: auto; }
.tbl table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 11.5px; }

/* ---------- проверка ---------- */

.check-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.check-main { display: grid; gap: 12px; align-content: start; }
.lead { margin: 10px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.check-days { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.check-days__label { font-size: 13px; color: var(--muted); }
.check-days .seg { flex: 1; max-width: 320px; }

.verdict {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-color: var(--line-2);
}
.verdict__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
}
.vi { display: none; }
.verdict[data-v="loading"] .vi--loading { display: block; animation: spin 1s linear infinite; }
.verdict[data-v="no_effect"] .vi--no_effect,
.verdict[data-v="effect"] .vi--effect,
.verdict[data-v="insufficient"] .vi--insufficient,
.verdict[data-v="error"] .vi--error { display: block; }
.verdict[data-v="no_effect"] .verdict__icon { color: var(--accent); background: var(--accent-soft); }
.verdict[data-v="effect"] .verdict__icon { color: var(--warn); background: rgba(242, 179, 61, .12); }
.verdict[data-v="error"] .verdict__icon { color: var(--bad); background: rgba(255, 122, 122, .1); }
@keyframes spin { to { transform: rotate(360deg); } }
.verdict__kicker { font: 600 10.5px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.verdict__title { margin: 4px 0 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.verdict__text { margin: 6px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.verdict__text:empty { display: none; }

.groups { list-style: none; margin: 10px 0 0; padding: 0; }
.group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.group__name { font-size: 13.5px; font-weight: 600; }
.group__ratio { font-size: 15px; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.group__meta { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.group.is-empty .group__ratio { color: var(--muted); font-weight: 600; }

/* ---------- о радаре ---------- */

.about { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.prose { padding: 16px; }
.prose p { margin: 10px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.prose .h3 { margin-top: 18px; }
.prose--accent { border-color: rgba(59, 232, 168, .25); background: linear-gradient(180deg, rgba(59, 232, 168, .05), transparent 40%), var(--surface); }
.notes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.notes li {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 13.5px;
  color: var(--text-2);
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 9px;
}
.notes b { color: var(--text); font-weight: 650; white-space: nowrap; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.link-out {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.link-out:hover { text-decoration: none; border-color: var(--muted); }
.link-out svg { color: var(--muted); }
.link-out--tg svg { color: var(--accent); }

/* ---------- планшет ---------- */

@media (min-width: 600px) {
  .tiles--4, .feed-side > .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .online__word { display: inline; }
}

/* ---------- десктоп ---------- */

@media (min-width: 900px) {
  :root { --tabs-h: 48px; }
  body { font-size: 15px; }

  .top__in {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand sites status";
    gap: 24px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .sites { justify-self: start; min-width: 320px; }
  .brand__icon { width: 32px; height: 32px; }
  .brand__name { font-size: 18px; }

  .tabs { display: flex; gap: 4px; }
  .tab { padding: 0 16px; font-size: 14.5px; }
  .tab[aria-selected="true"]::after { left: 12px; right: 12px; }

  .main { padding-top: 22px; }

  .feed-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
  }
  .feed-side {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: calc(var(--tabs-h) + 16px);
    /* SCORE + плитки + топ выше экрана ноутбука — пусть колонка листается сама */
    max-height: calc(100vh - var(--tabs-h) - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .feed-side > .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-top { display: block; }
  .feed-col { grid-column: 1; grid-row: 1; margin-top: 0; }

  .drop { grid-template-columns: 84px minmax(0, 1fr) auto; min-height: 78px; padding: 9px 16px 9px 16px; gap: 14px; }
  .drop .thumb { width: 84px; height: 60px; }
  .drop__name { font-size: 15px; }
  .price { font-size: 16.5px; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 16px; margin-top: 16px; align-items: start; }
  .cards > .chart-card { grid-column: 1; }
  .cards > #cardTop { grid-column: 2; grid-row: 1 / span 3; }
  .card { padding: 16px 18px; }
  .tiles { gap: 10px; }
  .tile { padding: 12px 14px 11px; }
  .tile__value { font-size: 24px; }

  .check-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .links-card { grid-column: 1 / -1; }
  .prose { padding: 20px 22px; }
}

@media (hover: none) {
  .seg__btn:hover { background: transparent; color: var(--text-2); }
  .seg__btn[aria-pressed="true"]:hover { background: var(--surface-3); color: var(--text); }
}

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

@media (forced-colors: active) {
  .drop::before, .mini-list .bar { background: CanvasText; }
  .tab[aria-selected="true"]::after { background: Highlight; }
}
