/* Штаб bablo.by — комикс-стиль сайта: небо, белые карточки с обводкой и жёсткой тенью. Mobile-first. */

@font-face { font-family: "Shantell Sans"; font-weight: 600; font-display: swap;
  src: url(fonts/shantell-sans-cyrillic-600-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Shantell Sans"; font-weight: 600; font-display: swap;
  src: url(fonts/shantell-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Shantell Sans"; font-weight: 800; font-display: swap;
  src: url(fonts/shantell-sans-cyrillic-800-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Shantell Sans"; font-weight: 800; font-display: swap;
  src: url(fonts/shantell-sans-latin-800-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-weight: 500; font-display: swap;
  src: url(fonts/rubik-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Rubik"; font-weight: 500; font-display: swap;
  src: url(fonts/rubik-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-weight: 700; font-display: swap;
  src: url(fonts/rubik-cyrillic-700-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Rubik"; font-weight: 700; font-display: swap;
  src: url(fonts/rubik-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --sky: #5aacd1;
  --sky-deep: #4598bf;
  --ink: #1d2140;
  --ink-soft: #3b4266;
  --muted: #5f6787;
  --paper: #fff;
  --paper-2: #f4f8fb;
  --pill: #ffd21f;
  --pill-soft: #fff4bf;
  --green: #3f9b4a;
  --green-soft: #e3f3e3;
  --red: #d0403a;
  --red-soft: #fbe5e3;
  --purple: #6c3fd1;
  --line: 2.5px;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --comic: "Shantell Sans", var(--font);
  --tabbar: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--sky);
  color: var(--ink);
  font: 500 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 12px);
}
.page-login { padding-bottom: 0; }
a { color: inherit; }
img { max-width: 100%; }
code { font: 600 0.9em/1 ui-monospace, Menlo, monospace; background: var(--paper-2); padding: 1px 5px; border-radius: 5px; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.dot { color: var(--muted); }
.sr-copy { position: fixed; top: -100px; opacity: 0; }

/* ---------- логотип (как на сайте: белый с обводкой, «.by» жёлтый) ---------- */
.logo {
  display: inline-flex; align-items: baseline;
  font: 800 27px/1 var(--comic);
  letter-spacing: -0.01em;
  color: #fff;
  -webkit-text-stroke: 0.07em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.06em 0.06em 0 var(--ink);
}
.logo__tld { color: var(--pill); }
.logo--xl { font-size: 54px; }
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px 3px;
  background: var(--pill);
  border: 2px solid var(--ink);
  border-radius: 7px;
  font: 800 14px/1.1 var(--comic);
  color: var(--ink);
  transform: rotate(-4deg) translateY(-3px);
  box-shadow: 2px 2px 0 var(--ink);
}
.tag--lg { font-size: 20px; padding: 3px 12px 4px; border-width: 2.5px; }

/* ---------- заголовки ---------- */
.h1, .chead__name, .login__h, .h2, .block__h {
  font-family: var(--comic);
  margin: 0;
}
.h1 {
  font-size: 34px; font-weight: 800; line-height: 1.05;
  color: #fff;
  letter-spacing: -0.01em;
  -webkit-text-stroke: 0.055em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.07em 0.07em 0 var(--ink);
}
.h2 {
  font-size: 24px; font-weight: 800; line-height: 1.1;
  color: #fff;
  -webkit-text-stroke: 0.06em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.07em 0.07em 0 var(--ink);
}
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }

/* ---------- каркас ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 14px 16px 24px; }
.top { position: sticky; top: 0; z-index: 20; background: var(--sky); border-bottom: var(--line) solid var(--ink); }
.top__in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; margin-right: auto; }
.top__out { margin: 0; }

/* Мобилка: нижняя панель под большой палец. */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding: 6px 8px env(safe-area-inset-bottom);
  background: #fff;
  border-top: var(--line) solid var(--ink);
}
.nav__a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--r-sm);
  font: 700 12.5px/1.1 var(--font);
  text-decoration: none; color: var(--ink-soft);
}
.nav__i { font-size: 21px; line-height: 1; }
.nav__a.is-on { background: var(--pill); color: var(--ink); border: 2px solid var(--ink); }

/* ---------- карточки ---------- */
.card {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card--flat { box-shadow: var(--shadow-sm); }
.block { display: flex; flex-direction: column; gap: 12px; }
.block p { margin: 0; }
.block + .block, .cgrid__side > * + * { margin-top: 16px; }
.block__h { font-size: 20px; font-weight: 800; line-height: 1.15; display: flex; align-items: center; gap: 10px; }
.block__sub { margin: 4px 0 0; font: 800 16px/1.2 var(--comic); }
.num {
  flex: none; display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  background: var(--pill); border: 2px solid var(--ink); border-radius: 50%;
  font: 800 15px/1 var(--comic);
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  background: #fff; color: var(--ink);
  border: var(--line) solid var(--ink); border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  font: 800 16px/1.1 var(--comic);
  text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
  user-select: none;
}
.btn:hover { background: var(--paper-2); }
.btn:active:not([disabled]) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--primary { background: var(--pill); }
.btn--primary:hover { background: #ffdc4d; }
.btn--sm { min-height: 42px; padding: 0 14px; font-size: 15px; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; transform: translate(2px, 2px); }
.btn.is-done { background: var(--green-soft); }
.top .btn--sm { min-height: 38px; font-size: 14px; padding: 0 12px; }

/* ---------- бейджи-плашки ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px;
  border: 2px solid var(--ink); border-radius: 8px;
  background: #fff;
  font: 700 12.5px/1.35 var(--font);
  white-space: nowrap;
}
p.badge { margin: 10px 0 0; }
.badge--yellow { background: var(--pill); }
.badge--red { background: var(--red); color: #fff; }
.badge--green { background: var(--green); color: #fff; }
.badge--sky { background: #d8eef8; }
.badge--ink { background: var(--ink); color: #fff; }
.badge--warn { background: #ffe1c2; border-style: dashed; }
.badge--stage-new, .badge--stage-enriched, .badge--stage-checked, .badge--stage-scored { background: var(--paper-2); }
.badge--stage-reported { background: var(--pill-soft); }
.badge--stage-approved { background: #d8eef8; }
.badge--stage-sent { background: #e6dcff; }
.badge--stage-replied { background: var(--green-soft); }
.badge--stage-client { background: var(--green); color: #fff; }
.badge--stage-stop { background: var(--red); color: #fff; }
.lvl { display: inline-flex; align-items: center; gap: 6px; font: 700 15px/1 var(--font); white-space: nowrap; }

/* ---------- иконки (спрайт _icons.html) и уровни находок ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { flex: none; width: 18px; height: 18px; vertical-align: -3px; color: inherit; }
.nav__i .ic { width: 22px; height: 22px; }
.badge .ic { width: 14px; height: 14px; }
.num .ic { width: 16px; height: 16px; }
.lvl__d { flex: none; width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper-2); }
.lvl--red .lvl__d, .lvltag--red .lvl__d { background: var(--red); }
.lvl--yellow .lvl__d, .lvltag--yellow .lvl__d { background: var(--pill); }
.lvltag--green .lvl__d { background: var(--green); }
.lvltag {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 7px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  font: 800 12.5px/1.35 var(--font); text-transform: lowercase; white-space: nowrap;
}
.lvltag--red { background: #ffe0dc; }
.lvltag--yellow { background: var(--pill-soft); }
.lvltag--green { background: var(--green-soft); }

/* ---------- плашки-сообщения ---------- */
.flash {
  margin: 0 0 14px; padding: 12px 14px;
  border: var(--line) solid var(--ink); border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  background: var(--green-soft);
}
.flash--err { background: var(--red-soft); }
.note { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 700; color: #fff; }
.err { margin: 0; color: var(--red); font-weight: 700; }

/* ---------- поля ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__l { font: 700 13.5px/1.2 var(--font); color: var(--ink-soft); }
.input {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: var(--line) solid var(--ink); border-radius: var(--r-sm);
  background: #fff; color: var(--ink);
  font: 500 16px/1.2 var(--font); /* 16px — iOS не зумит при фокусе */
}
.input:focus { outline: none; box-shadow: 0 0 0 4px rgba(108, 63, 209, 0.25); }
select.input {
  appearance: none; -webkit-appearance: none;
  padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%231d2140' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.input--file { padding: 9px 10px; font-size: 15px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.check { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; cursor: pointer; }
.check input, .switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  width: 26px; height: 26px; flex: none;
  border: var(--line) solid var(--ink); border-radius: 7px; background: #fff;
  display: grid; place-items: center;
}
.check input:checked + .check__box { background: var(--pill); }
.check input:checked + .check__box::after { content: "✓"; font: 800 17px/1 var(--comic); }
.check input:focus-visible + .check__box { outline: 3px solid var(--purple); outline-offset: 2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; cursor: pointer; }
.switch__t {
  position: relative; width: 50px; height: 30px; flex: none;
  border: var(--line) solid var(--ink); border-radius: 999px; background: var(--paper-2);
  transition: background 0.15s;
}
.switch__t::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  background: #fff; border: 2px solid var(--ink);
  transition: transform 0.15s;
}
.switch input:checked + .switch__t { background: var(--green); }
.switch input:checked + .switch__t::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__t { outline: 3px solid var(--purple); outline-offset: 2px; }

/* сегменты (канал, исход) */
.seg { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.seg legend { margin-bottom: 8px; padding: 0; }
.seg__i { position: relative; }
.seg__i input { position: absolute; opacity: 0; inset: 0; }
.seg__i span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  font: 700 14.5px/1 var(--font); cursor: pointer;
}
.seg__i input:checked + span { background: var(--pill); box-shadow: 2px 2px 0 var(--ink); }
.seg__i input:focus-visible + span { outline: 3px solid var(--purple); outline-offset: 2px; }
.seg__i--paid input:checked + span, .seg__i--replied input:checked + span, .seg__i--lead input:checked + span { background: var(--green); color: #fff; }
.seg__i--stop input:checked + span { background: var(--red); color: #fff; }

/* ---------- вход ---------- */
.page-login .wrap { min-height: 100vh; display: grid; place-items: center; padding-top: 24px; }
.login { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 22px; position: relative; }
.login__brand { display: flex; align-items: center; }
.login__card { width: 100%; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; }
.login__h { font-size: 22px; font-weight: 800; }
.login__dog { width: 170px; height: auto; align-self: flex-end; margin-top: -10px; }

/* ---------- очередь ---------- */
.counters {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr);
  gap: 10px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 8px;
  scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none;
}
.counters::-webkit-scrollbar { display: none; }
.counter {
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px 11px;
  background: #fff; border: var(--line) solid var(--ink); border-radius: 12px; box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
}
.counter:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.counter.is-on { background: var(--pill); }
.counter__n { font: 800 28px/1 var(--comic); font-variant-numeric: tabular-nums; }
.counter__l { font: 700 13px/1.2 var(--font); color: var(--ink-soft); white-space: nowrap; }

.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: end; margin-bottom: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.filters .check { grid-column: 1 / -1; min-height: 40px; }
.filters__reset { grid-column: 1 / -1; justify-self: start; font-weight: 700; color: var(--ink-soft); }

.bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; padding: 12px 14px; }
.bar__t { font-weight: 600; }

.count { margin: 0 0 8px; color: #fff; font-weight: 700; }
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.qcard {
  display: flex; flex-direction: column; gap: 8px;
  height: 100%;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s;
}
.qcard:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.qcard:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.qcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.qcard__name { font: 800 19px/1.15 var(--comic); overflow-wrap: anywhere; }
.qcard__meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.qcard__site { font-weight: 700; overflow-wrap: anywhere; }
.qcard__hook {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px 10px;
  background: var(--pill-soft); border: 2px solid var(--ink); border-radius: 10px;
  font-weight: 700; font-size: 14.5px; line-height: 1.3;
}
.qcard__hook.is-none { background: var(--paper-2); border-style: dashed; color: var(--muted); font-weight: 600; }
.qcard__hk { flex: none; }
.qcard__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: auto; }
.qcard__go { margin-left: auto; font: 800 20px/1 var(--comic); }

/* ---------- пусто ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 8px 0; }
.empty img { width: 170px; height: auto; }
.empty__t { margin: 0; font: 800 19px/1.2 var(--comic); }
.empty__h { margin: 0; color: var(--muted); }
.empty .btn { margin-top: 10px; }

/* ---------- карточка компании ---------- */
.back { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 6px; font-weight: 700; color: #fff; text-decoration: none; text-shadow: 1px 1px 0 var(--ink); }
.chead { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.chead__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.chead__name { font-size: 26px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.chead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font-size: 15px; }
.link { font-weight: 700; color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 0 13px;
  background: #fff; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink);
  font: 700 14.5px/1 var(--font); text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
}
.chip:active { transform: translate(2px, 2px); box-shadow: none; }
.pgroup { display: inline-flex; }
@media (max-width: 719px) { .contacts .chip { padding: 0 10px; font-size: 14px; gap: 5px; } .contacts { gap: 7px; } }
.pgroup .chip:not(:only-child):first-child { border-radius: 999px 0 0 999px; border-right-width: 1px; }
.pgroup .chip + .chip { border-radius: 0 999px 999px 0; border-left-width: 1px; }
.more { width: 100%; }
.more summary { list-style: none; cursor: pointer; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { margin-bottom: 8px; }
.chip--viber { background: #7b519d; color: #fff; }
.chip--telegram { background: #2aa3df; color: #fff; }
.chip--whatsapp { background: #25b04b; color: #fff; }
.chip--instagram { background: #e1306c; color: #fff; }
.btn.chip--viber:hover { background: #8a60ad; }
.btn.chip--telegram:hover { background: #3aaee6; }
.btn.chip--instagram:hover { background: #e94b80; }
/* контакты: основной первым, где найден — мелко */
.ctc { display: flex; flex-direction: column; gap: 10px; }
.clist { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.crow { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.crow__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crow__badge { margin: 0; box-shadow: 2px 2px 0 var(--ink); }
.crow__label { margin: 0 0 0 4px; font: 700 13px/1.3 var(--font); color: var(--ink-soft); }
.crow__note .ic { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.ctc__tips-h .ic { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.chip .ic { width: 17px; height: 17px; }
.more__s {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px;
  background: var(--paper-2); border: 2px dashed var(--ink); border-radius: 999px;
  font: 700 13.5px/1.25 var(--font); color: var(--ink-soft); list-style: none; cursor: pointer;
}
.more__s::before { content: "+"; font: 800 16px/1 var(--comic); }
.more[open] .more__s::before { content: "−"; }
.clist--more { margin-top: 4px; }
.crow__meta { margin: 0 0 0 4px; font: 600 12.5px/1.3 var(--font); color: var(--muted); }
.crow__note { margin: 0 0 0 4px; font: 700 12.5px/1.3 var(--font); color: #b4561b; }
.crow.is-primary .chip { box-shadow: 3px 3px 0 var(--ink); }
.crow.is-doubt { opacity: 0.55; }
.crow.is-doubt .chip { border-style: dashed; box-shadow: none; }
.ctc__tips { padding: 8px 12px; background: var(--pill-soft); border: 2px solid var(--ink); border-radius: var(--r-sm); box-shadow: 2px 2px 0 var(--ink); }
.ctc__tips-h { margin: 0 0 2px; font: 800 14px/1.3 var(--font); }
.ctc__tips ul { margin: 0; padding-left: 18px; font: 600 14px/1.45 var(--font); }
.chead__scan { padding-top: 10px; border-top: 2px dashed #c9d3e0; }

.scan { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.scan form { margin: 0; }
.scan__st { font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.scan__st--ok { color: var(--green); }
.scan__st--err { color: var(--red); }
.spin {
  width: 16px; height: 16px; flex: none;
  border: 3px solid rgba(29, 33, 64, 0.25); border-top-color: var(--ink); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spin--ink { border-color: rgba(255, 255, 255, 0.4); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.cgrid { display: grid; gap: 20px; }
.cgrid__main { min-width: 0; }
.cgrid__side { min-width: 0; scroll-margin-top: 80px; }
.sechead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.sechead__stat { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sechead__stat .lvl { color: #fff; text-shadow: 1px 1px 0 var(--ink); }

.jump {
  display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 0 0 12px;
  background: #fff; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink);
  font: 800 15px/1 var(--comic); text-decoration: none;
}
@media (min-width: 1080px) { .jump { display: none; } }
.findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.fcard { position: relative; display: flex; flex-direction: column; gap: 8px; padding-left: 20px; overflow: hidden; }
.fcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; border-right: 2px solid var(--ink); background: var(--paper-2); }
.fcard.lvl-red::before { background: var(--red); }
.fcard.lvl-yellow::before { background: var(--pill); }
.fcard.lvl-green::before { background: var(--green); }
.fcard.is-false { background: #f2f3f6; }
.fcard.is-false .fcard__title, .fcard.is-false .fcard__detail { color: var(--muted); }
.fcard.is-false .fcard__title { text-decoration: line-through; text-decoration-thickness: 2px; }
.fcard__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fcard__score { margin-left: auto; font: 700 13px/1 var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.fcard__title { margin: 2px 0 0; font: 800 19px/1.2 var(--comic); }
.fcard__detail, .fcard__verify { margin: 0; }
.fcard__verify { padding: 8px 10px; background: var(--paper-2); border-radius: 8px; font-size: 15px; }

.ev { border: 2px solid var(--ink); border-radius: 10px; background: #fff; }
.ev summary { min-height: 42px; display: flex; align-items: center; padding: 0 12px; font-weight: 700; cursor: pointer; list-style: none; }
.ev summary::-webkit-details-marker { display: none; }
.ev summary::before { content: "▸"; margin-right: 8px; transition: transform 0.15s; }
.ev[open] summary::before { transform: rotate(90deg); }
.ev__list { list-style: none; margin: 0; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.ev__item { display: flex; flex-direction: column; gap: 3px; padding-top: 10px; border-top: 1.5px dashed #c9d3e0; min-width: 0; }
.ev__url { font-size: 14px; word-break: break-all; }
.ev__at { font-size: 13px; color: var(--muted); }
.ev__ex {
  margin: 4px 0 0; padding: 8px 10px; max-height: 160px; overflow: auto;
  background: #1d2140; color: #e8ecf7; border-radius: 8px;
  font: 500 12.5px/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word;
}

.rv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 0; }
.rv__b { min-height: 50px; }
.rv__b--ok.is-on { background: var(--green); color: #fff; }
.rv__b--bad.is-on { background: var(--red); color: #fff; }
.rv__b--ok:not(.is-on):hover { background: var(--green-soft); }
.rv__b--bad:not(.is-on):hover { background: var(--red-soft); }
.rv__b.htmx-request, .rv [disabled] { opacity: 0.6; }

/* ворота */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; counter-reset: s; }
.steps__i { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 13px/1.1 var(--font); color: var(--muted); text-align: center; }
.steps__i span {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 2px solid var(--ink); border-radius: 50%; background: #fff;
  font: 800 15px/1 var(--comic); color: var(--ink);
}
.steps__i.is-done { color: var(--ink); }
.steps__i.is-done span { background: var(--green); color: #fff; }
.gate__t, .gate__why, .gate__ok { margin: 0; font-weight: 600; }
.gate__why { padding: 10px 12px; background: var(--pill-soft); border: 2px dashed var(--ink); border-radius: 10px; }
.gate__ok { padding: 10px 12px; background: var(--green-soft); border: 2px solid var(--green); border-radius: 10px; color: #1f5f27; font-weight: 700; }

.msg {
  margin: 0; padding: 12px 14px;
  background: var(--paper-2); border: 2px solid var(--ink); border-radius: 12px;
  font: 500 15px/1.5 var(--font); white-space: pre-wrap; word-break: break-word;
}
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.sentf, .outf { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 0; padding-top: 12px; border-top: 2px dashed #c9d3e0; }
.say {
  margin: 0; padding: 12px 14px 12px 16px;
  background: var(--pill-soft); border: 2px solid var(--ink); border-left-width: 6px; border-radius: 12px;
  font: 600 16px/1.5 var(--font);
}
.nexts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nexts li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--paper-2); border-radius: 10px; font-size: 14.5px; }
.hist { margin: 0; padding-left: 18px; font-size: 14.5px; }

/* ---------- статистика ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px; }
.tile__n { font: 800 32px/1 var(--comic); font-variant-numeric: tabular-nums; }
.tile__l { font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.tile--money { background: var(--pill); }
.funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.funnel__r { display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; }
.funnel__l { grid-row: 1 / 3; font-weight: 700; font-size: 14.5px; }
.funnel__bar { width: 100%; height: 22px; display: block; }
.funnel__bg { fill: var(--paper-2); }
.funnel__fg { fill: var(--sky); }
.funnel__fg--reported { fill: var(--pill); }
.funnel__fg--approved { fill: #8fc9e6; }
.funnel__fg--sent { fill: #a68ae6; }
.funnel__fg--replied, .funnel__fg--client { fill: var(--green); }
.funnel__n { font-size: 14px; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12.5px; color: var(--ink-soft); padding: 6px 8px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table td { padding: 9px 8px; border-bottom: 1.5px dashed #c9d3e0; white-space: nowrap; }
.table__k { font-weight: 700; }

.addgrid { display: grid; gap: 18px; }
.addgrid form { margin: 0; }

/* тост «скопировано» */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 20px); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 10px;
  font-weight: 700; transition: opacity 0.2s, transform 0.2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- планшет и десктоп ---------- */
@media (min-width: 720px) {
  body { padding-bottom: 32px; }
  .top__in { padding: 12px 24px; }
  .wrap { padding: 22px 24px 40px; }
  .logo { font-size: 30px; }
  .nav {
    position: static; display: flex; gap: 6px; height: auto; padding: 0;
    background: none; border: 0; margin-right: 4px;
  }
  .nav__a {
    flex-direction: row; gap: 7px; min-height: 42px; padding: 0 14px;
    font: 800 16px/1 var(--comic); color: var(--ink);
    border: 2px solid transparent;
  }
  .nav__i { font-size: 16px; }
  .nav__a:hover { background: rgba(255, 255, 255, 0.35); }
  .nav__a.is-on { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
  .toast { bottom: 28px; }
  .h1 { font-size: 44px; }
  .counters { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; margin: 0 0 16px; padding: 0; }
  .counter { padding: 12px 16px 14px; }
  .counter__n { font-size: 34px; }
  .filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
  .filters .field--inline { width: 220px; }
  .filters .check, .filters__reset { grid-column: auto; align-self: center; }
  .filters__reset { align-self: center; }
  .bar { flex-direction: row; align-items: center; justify-content: space-between; }
  .queue { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
  .chead { padding: 20px 22px; }
  .chead__name { font-size: 34px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .funnel__r { grid-template-columns: 130px 1fr 150px; grid-template-rows: auto; }
  .funnel__l { grid-row: auto; }
  .addgrid { grid-template-columns: 1fr 1fr; align-items: start; }
  .tablewrap { margin: 0; padding: 0; }
  .logo--xl { font-size: 64px; }
}

@media (min-width: 1080px) {
  .cgrid { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; gap: 24px; }
  .cgrid__side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding: 0 8px 8px 0; margin-right: -8px; scrollbar-width: thin; }
}

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