:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #16191d;
  --muted: #6b7280;
  --line: #e3e6ea;
  --accent: #2f6feb;
  --accent-soft: #e8f0fe;
  --green: #167a3d;
  --green-soft: #e6f5ec;
  --amber: #8a5a00;
  --amber-soft: #fdf3dd;
  --red: #b42318;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a; --card: #1c1f24; --text: #e8eaed; --muted: #9aa2ad;
    --line: #2c3138; --accent: #6f9bff; --accent-soft: #22304d;
    --green: #6fd39a; --green-soft: #1c3328; --amber: #f0c674; --amber-soft: #3a2f14;
    --red: #ff9a90;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 17px; color: var(--text); }
.topbar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar nav a { color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.topbar nav a.on { color: var(--text); border-bottom-color: var(--accent); }

main { max-width: 1280px; margin: 0 auto; padding: 24px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 28px 0 10px; }
.sub { color: var(--muted); margin: 0 0 20px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }
td.wrap { max-width: 420px; word-break: break-word; }
.muted { color: var(--muted); font-size: 13px; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.kw { background: var(--accent-soft); color: var(--accent); }
.tag.tg { background: var(--green-soft); color: var(--green); }
.tag.ext { background: var(--amber-soft); color: var(--amber); }
.tag.gone { background: var(--amber-soft); color: var(--amber); }
.tag.err { background: var(--amber-soft); color: var(--red); }

form.inline { display: inline; }
input[type=text], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit;
}
textarea { min-height: 90px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.checks { display: flex; gap: 18px; flex-wrap: wrap; margin: 8px 0 14px; }
.checks label { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; margin: 0; }

button, .btn {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.sm { padding: 4px 9px; font-size: 13px; }
button.danger { color: var(--red); }
button:hover { filter: brightness(0.97); }

details.add > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin: 0; min-width: 150px; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* --------------------------------------------------------------------- */
/* Реклама и вердикты по лендингам                                        */
/* --------------------------------------------------------------------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }

.stat.bad .n { color: var(--red); }
.stat.warn .n { color: var(--amber); }

.verdict {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--line); color: var(--muted);
}
.verdict.big { font-size: 15px; padding: 6px 14px; }
.verdict.v-prelander { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.verdict.v-suspect   { background: var(--amber-soft); color: var(--amber); }
.verdict.v-crypto_ad { background: var(--accent-soft); color: var(--accent); }
.verdict.v-other     { background: var(--green-soft); color: var(--green); }
.verdict.v-error     { background: var(--line); color: var(--muted); }

.score { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.score-bar { width: 60px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.score-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--amber), var(--red)); }
.score-big { font-size: 26px; font-weight: 700; margin-left: 12px; vertical-align: middle; }

.verdict-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.verdict-head h1 { margin-bottom: 4px; }

table.signals td { vertical-align: top; }
table.signals td.w { width: 56px; }
.weight { display: inline-block; min-width: 40px; text-align: right; font-weight: 700; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.weight.plus { color: var(--red); }
.weight.minus { color: var(--green); }
table.signals tr.neg td { opacity: .75; }
table.signals tr.total td { border-top: 2px solid var(--line); border-bottom: none; }

ol.chain { margin: 0; padding-left: 20px; }
ol.chain li { margin-bottom: 10px; }
.hop-kind {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; padding: 1px 7px; border-radius: 4px;
  background: var(--line); color: var(--muted); margin-right: 6px;
}
.hop-kind.hk-meta, .hop-kind.hk-js { background: var(--amber-soft); color: var(--amber); }
.hop-kind.hk-click { background: var(--accent-soft); color: var(--accent); }

.shot { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.excerpt {
  font-size: 13px; color: var(--muted); max-height: 220px; overflow-y: auto;
  background: var(--bg); border-radius: 8px; padding: 10px; margin: 0;
}
.notice { border-left: 3px solid var(--amber); }
.notice code { display: block; padding: 8px 10px; margin-top: 8px; word-break: break-all; }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
a.danger-link { color: var(--red); font-weight: 600; }
.hop-kind.hk-js_skipped { background: var(--line); color: var(--muted); text-decoration: line-through; }
.hop-kind.hk-page { background: var(--amber-soft); color: var(--amber); }
.hop-kind.hk-click { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.verdict.cloak-confirmed { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.verdict.cloak-suspected { background: var(--amber-soft); color: var(--amber); }
.verdict.cloak-none      { background: var(--green-soft); color: var(--green); }
.verdict.cloak-unknown   { background: var(--line); color: var(--muted); }

/* --------------------------------------------------------------------- */
/* Вход и первичная настройка                                            */
/* --------------------------------------------------------------------- */
body.gate { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 24px; }
.gate-main { width: 100%; max-width: 380px; }
.gate-card { padding: 28px; margin-bottom: 14px; }
.gate-card h1 { font-size: 20px; margin: 0 0 6px; }
.gate-card form { margin-top: 18px; }
.gate-brand { font-weight: 700; font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.gate-error {
  background: var(--amber-soft); color: var(--red);
  padding: 9px 12px; border-radius: 8px; font-size: 14px; margin: 0 0 4px;
}
.gate-foot { text-align: center; line-height: 1.5; }
input[type=password] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit;
}
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar .who .name { color: var(--muted); font-size: 13px; }
.geo {
  display: inline-block; font-family: ui-monospace, Menlo, monospace; font-weight: 700;
  font-size: 12px; letter-spacing: .04em; padding: 2px 8px; border-radius: 5px;
  background: var(--accent-soft); color: var(--accent);
}
.offer { font-weight: 600; }
.page-kind { display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:600; }
.page-kind.k-money { background: var(--green-soft); color: var(--green); }
.page-kind.k-white { background: var(--amber-soft); color: var(--amber); }
.page-kind.k-dead  { background: var(--line); color: var(--muted); }
.geo-picker { max-height: 132px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.geo-picker label { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
button.linky {
  background: none; border: none; padding: 0 0 0 8px; color: var(--accent);
  font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline;
}
button.linky:hover { filter: none; opacity: .8; }
details.group > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap; font-weight: 600;
}
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary::before {
  content: "▸"; color: var(--muted); font-size: 12px; width: 12px;
  transition: transform .12s ease;
}
details.group[open] > summary::before { content: "▾"; }
details.group > summary:hover { color: var(--accent); }
details.group > summary .muted { font-weight: 400; font-size: 14px; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.shot-card { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.shot-card.k-money { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.shot-card.k-white { border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); }
.shot-card img { display: block; width: 100%; height: 190px; object-fit: cover; object-position: top; }
.shot-card figcaption { padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }

/* Удачная попытка перебора: та единственная, где открылась целевая страница.
   Подсвечиваем её, потому что в таблице из двенадцати строк она главная. */
tr.row-hit > td { background: color-mix(in srgb, var(--green) 12%, transparent); }
tr.row-hit > td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.tag.kw { border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); }

/* Полоса занятости. Пользователей несколько, а ядро одно: без неё непонятно,
   почему нажатие «Обойти» ничего не меняет — задача просто ждёт очереди. */
.jobbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
          margin: 0 0 16px; padding: 8px 12px; border-radius: var(--radius);
          background: var(--bg); border: 1px solid var(--line); font-size: 13px; }
.jobbar .job { display: inline-flex; align-items: center; gap: 6px; }
.jobbar .job.wait { opacity: .7; }
.jobbar .spin { width: 10px; height: 10px; border-radius: 50%;
                border: 2px solid var(--accent); border-top-color: transparent;
                animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .jobbar .spin { animation: none; } }
