/* MP Brand Guard, главный экран, версия 2.
   Одна система размеров: отступы кратны 4, радиусы 6/10/14, шрифт Inter с
   системным запасным. Цвета заданы ролями; тёмная тема подобрана отдельно, а
   не выворачиванием светлой. Цвета рядов графиков взяты из проверенной на
   цветослепоту палитры и поверхностей #fcfcfb / #1a1a19, под которые она
   проверялась. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(inter-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #f4f4f1;
  --surface: #fcfcfb;
  --surface-2: #f3f3f0;
  --surface-3: #e9e9e5;
  --line: #e4e3dc;
  --line-strong: #d2d1c9;
  --ink: #141413;
  --ink-2: #52514e;
  --ink-3: #6b6a65;
  --axis: #898781;
  --grid: #e8e7e1;
  --baseline: #c3c2b7;

  --accent: #256abf;
  --accent-hover: #1c5cab;
  --accent-ink: #1c5cab;
  --accent-soft: rgba(42, 120, 214, .10);
  --on-accent: #ffffff;

  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s-other: #b4b3ab;
  --ord1: #86b6ef;
  --ord2: #5598e7;
  --ord3: #2a78d6;
  --ord4: #1c5cab;

  --good: #0ca30c;
  --good-ink: #006300;
  --good-soft: rgba(12, 163, 12, .10);
  --warn: #fab219;
  --warn-ink: #8a5a00;
  --warn-soft: rgba(250, 178, 25, .18);
  --serious-ink: #b0491f;
  --crit: #d03b3b;
  --crit-ink: #b42323;
  --crit-soft: rgba(208, 59, 59, .10);

  --shadow: 0 1px 2px rgba(20, 20, 19, .04);
  --shadow-pop: 0 16px 40px rgba(20, 20, 19, .16), 0 2px 8px rgba(20, 20, 19, .08);

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --topbar: 56px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0f0e;
    --surface: #1a1a19;
    --surface-2: #222221;
    --surface-3: #2c2c2a;
    --line: #2c2c2a;
    --line-strong: #3b3b38;
    --ink: #f2f1ec;
    --ink-2: #c3c2b7;
    --ink-3: #9d9c93;
    --axis: #898781;
    --grid: #2a2a28;
    --baseline: #45453f;
    --accent: #3987e5;
    --accent-hover: #5598e7;
    --accent-ink: #86b6ef;
    --accent-soft: rgba(57, 135, 229, .16);
    --on-accent: #0b1422;
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s-other: #5c5b56;
    --ord1: #184f95;
    --ord2: #256abf;
    --ord3: #3987e5;
    --ord4: #6da7ec;
    --good-ink: #3ec43e;
    --good-soft: rgba(12, 163, 12, .18);
    --warn-ink: #f5b53a;
    --warn-soft: rgba(250, 178, 25, .14);
    --serious-ink: #ec835a;
    --crit-ink: #f07a7a;
    --crit-soft: rgba(208, 59, 59, .20);
    --shadow: none;
    --shadow-pop: 0 16px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0e;
  --surface: #1a1a19;
  --surface-2: #222221;
  --surface-3: #2c2c2a;
  --line: #2c2c2a;
  --line-strong: #3b3b38;
  --ink: #f2f1ec;
  --ink-2: #c3c2b7;
  --ink-3: #9d9c93;
  --axis: #898781;
  --grid: #2a2a28;
  --baseline: #45453f;
  --accent: #3987e5;
  --accent-hover: #5598e7;
  --accent-ink: #86b6ef;
  --accent-soft: rgba(57, 135, 229, .16);
  --on-accent: #0b1422;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s-other: #5c5b56;
  --ord1: #184f95;
  --ord2: #256abf;
  --ord3: #3987e5;
  --ord4: #6da7ec;
  --good-ink: #3ec43e;
  --good-soft: rgba(12, 163, 12, .18);
  --warn-ink: #f5b53a;
  --warn-soft: rgba(250, 178, 25, .14);
  --serious-ink: #ec835a;
  --crit-ink: #f07a7a;
  --crit-soft: rgba(208, 59, 59, .20);
  --shadow: none;
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 80px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; }

.ic {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--surface); padding: 8px 12px; border-radius: var(--r-sm);
}
.skip:focus { top: 8px; }

/* ── Шапка ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1680px; margin: 0 auto; height: var(--topbar);
  padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 20px;
}
.brandmark { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.logo {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center; background: var(--ink); color: var(--surface);
}
.logo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brandtext { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brandtext b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brandtext span { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }

.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }.live i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 3px var(--good-soft); transition: background .2s, box-shadow .2s;
}
.live.wait i { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.live.off i { background: var(--crit); box-shadow: 0 0 0 3px var(--crit-soft); }
.live.beat i { animation: beat .9s var(--ease); }
@keyframes beat { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
.live a { color: var(--accent-ink); }

.iconbtn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid transparent; background: transparent;
  color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.iconbtn .ic { width: 18px; height: 18px; }

/* ── Переключатели ─────────────────────────────────────────────────── */
.seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.seg > a, .seg > button {
  height: 28px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent;
  color: var(--ink-2); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
}
.seg > a:hover, .seg > button:hover { color: var(--ink); }
.seg > [aria-current="page"], .seg > [aria-pressed="true"] {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip .n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip[aria-pressed="true"] .n { color: var(--surface); opacity: .72; }
.chip.muted { opacity: .72; }
.chip-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }

/* Значок площадки у строки реестра и в переключателе: её цвет и короткое
   название (просьба владельца 03.10.2026: «чтобы быстро считывалось»).
   Wildberries малиновый, Ozon синий; белый текст читается в обеих темах. */
.mk { display: inline-flex; align-items: center; justify-content: center; height: 18px; min-width: 30px;
  padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; line-height: 1;
  color: #fff; vertical-align: 1px; flex: none; }
.mk-wb { background: #cb11ab; }
.mk-ozon { background: #005bff; }
.chip .mk { margin-right: 2px; }

/* ── Кнопки ────────────────────────────────────────────────────────── */
.btn {
  height: 40px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; line-height: 1;
  text-box: trim-both cap alphabetic;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
/* Выключенная главная кнопка не должна кричать синим: подать нечего. */
.btn-primary:disabled { background: var(--surface-2); border-color: var(--line); color: var(--ink-3); opacity: 1; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-primary, .btn-primary.btn-sm { height: 44px; padding: 0 20px; font-size: 15px; font-weight: 600; border-radius: 10px; }
.btn[aria-busy="true"] .ic { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkbtn {
  border: 0; background: none; padding: 4px 6px; margin: -4px -6px 0 0; border-radius: 6px;
  color: var(--ink-3); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.linkbtn:hover, .linkbtn[aria-pressed="true"] { color: var(--ink); background: var(--surface-2); }

/* ── Страница ──────────────────────────────────────────────────────── */
/* Вырез и домашняя полоса телефона: под них отступы, иначе край страницы
   уезжает под скруглённый угол экрана, а низ реестра под полосу. */
.page {
  max-width: 1680px; margin: 0 auto; padding: 28px 24px 72px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
h1 { font-size: 26px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; }
.lede { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; }
.pagehead-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notice {
  margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line); color: var(--ink-2); font-size: 13px;
}

.statusrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; min-height: 28px; }
.sysline { display: contents; }
a.sys-protected { text-decoration: none; }
a.sys-protected:hover { border-color: var(--accent); color: var(--ink); }
.sys-protected::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 2px; }
.viewnav { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2, var(--surface)); border: 1px solid var(--line); }
.viewnav a { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 550; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.viewnav a:hover { color: var(--ink); }
.viewnav a[aria-current="page"] { background: var(--accent); color: #fff; }
.filterbar.is-main:has(#marketgroup[hidden]) { display: none; }
.attn-calm { grid-column: 1 / -1; margin: 0; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.sys {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); white-space: nowrap;
}
.sys .ic { width: 14px; height: 14px; }
.sys.ok .ic { color: var(--good); }
.sys.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.sys.warn .ic { color: var(--warn-ink); }
.sys.crit { border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); color: var(--crit-ink); }
.sys.crit .ic { color: var(--crit-ink); }
.sys b { font-weight: 600; color: var(--ink); }

.queuebar {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 16px;
  padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
}
.queue-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.queue-title span { color: var(--ink-3); font-size: 13px; }
.queue-track { height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; }
.queue-track i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 3px; transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease); }
.queue-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--ink-3); font-size: 13px; }

.filterbar {
  position: sticky; top: calc(var(--topbar) + 8px); z-index: 30;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 28px;
  padding: 10px 12px 10px 16px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.fgroup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.flabel { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
#copyreport { margin-left: auto; }

.section { margin-top: 28px; transition: opacity .2s; }
.section.is-stale { opacity: .55; }
.sechead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; }
h2 { font-size: 18px; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; }
.sechint { font-size: 13px; color: var(--ink-3); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 20px; min-width: 0;
}
.cardhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
h3 { font-size: 15px; line-height: 1.35; font-weight: 600; letter-spacing: -.005em; }
.cardhead p { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }

.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.span8 { grid-column: span 8; }
.span4 { grid-column: span 4; }
.span12 { grid-column: 1 / -1; }
a.linkbtn { text-decoration: none; white-space: nowrap; }
/* Эффективность: группы причин под одним заголовком, полосы те же, что у графиков. */
.effgroup + .effgroup { margin-top: 14px; }
.effgroup h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hero-value small { font-size: 26px; font-weight: 600; color: var(--ink-2); }
/* Справа плитки в свою высоту, под ними причины: плитки одной строкой иначе
   растягивались до высоты большой плитки, и числа уезжали под пустое поле. */
.effkpis { align-items: start; }
.effright { display: grid; gap: 16px; min-width: 0; }
.effright .tile { min-height: 0; }
.effrest .cardhead { align-items: flex-start; }
.tile-value.warn { color: var(--warn-ink); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* ── Требует внимания ──────────────────────────────────────────────── */
.attn { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.acard {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 132px;
  padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink); overflow: hidden;
  transition: border-color .15s, transform .15s var(--ease), box-shadow .15s;
}
a.acard:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.acard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.acard[data-tone="crit"]::before { background: var(--crit); }
.acard[data-tone="warn"]::before { background: var(--warn); }
.acard[data-tone="info"]::before { background: var(--accent); }
.acard-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 500; line-height: 1.3; }
.acard-icon {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none;
  background: var(--surface-2); color: var(--ink-3);
}
.acard[data-tone="crit"] .acard-icon { background: var(--crit-soft); color: var(--crit-ink); }
.acard[data-tone="warn"] .acard-icon { background: var(--warn-soft); color: var(--warn-ink); }
.acard[data-tone="info"] .acard-icon { background: var(--accent-soft); color: var(--accent-ink); }
.acard[data-tone="ok"] .acard-icon { background: var(--good-soft); color: var(--good-ink); }
.acard-value { font-size: 30px; line-height: 1.1; font-weight: 650; letter-spacing: -.02em; margin-top: auto; }
.acard[data-tone="ok"] .acard-value, .acard[data-tone="neutral"] .acard-value.zero { color: var(--ink-3); }
.acard-sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.acard[data-tone="crit"] .acard-sub { color: var(--crit-ink); }
.acard-go { position: absolute; right: 12px; top: 14px; color: var(--ink-3); opacity: 0; transition: opacity .15s, transform .15s var(--ease); }
a.acard:hover .acard-go { opacity: 1; transform: translateX(2px); }

/* ── Итоги периода ─────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-height: 132px; }
.tile-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.tile-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.tile-value { font-size: 28px; line-height: 1.1; font-weight: 650; letter-spacing: -.02em; }
.tile-value small { font-size: 16px; font-weight: 600; color: var(--ink-2); margin-left: 2px; }
.tile-value.na { font-size: 16px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.tile-sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.spark { width: 88px; height: 28px; flex: none; overflow: visible; }
.spark path { fill: none; stroke: var(--axis); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }

.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.delta .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.delta.good { color: var(--good-ink); }
.delta.bad { color: var(--crit-ink); }
.delta.flat { color: var(--ink-3); font-weight: 500; }
.vs { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.deltaline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.hero { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-value { font-size: 52px; line-height: 1; font-weight: 650; letter-spacing: -.03em; margin-top: 4px; }
.hero-sub { font-size: 13px; color: var(--ink-3); }
.meter { display: flex; gap: 2px; height: 10px; margin-top: 10px; }
.meter i { display: block; height: 100%; min-width: 2px; }
.meter i:first-child { border-radius: 4px 0 0 4px; }
.meter i:last-child { border-radius: 0 4px 4px 0; }
.meter i:only-child { border-radius: 4px; }
.meter.empty { background: var(--surface-3); border-radius: 4px; }
.keylist { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.keylist li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.keylist b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
/* Остаток в плитке «Убрано нарушений» ведёт к причинам целой строкой. */
.keylist li.keyrest { display: block; }
.keylist li.keyrest > a, .keylist li.keyrest:not(:has(a)) {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; border-radius: 6px; margin: -4px -6px; padding: 4px 6px;
}
.keylist li.keyrest em { font-style: normal; color: var(--accent-ink); margin-left: 4px; }
.keylist li.keyrest > a:hover { background: var(--surface-2); }
.keylist li.keyrest > a:hover em { text-decoration: underline; }
.keylist li.keyrest > a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Эффективность: исход в нашу пользу и остаток под своими заголовками, кусок
   полосы и его строка подсвечивают друг друга (v2.js, effPaint). */
.hero-note { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.keylist li.keyhead { grid-template-columns: minmax(0, 1fr) auto; margin-top: 6px; font-weight: 600; color: var(--ink); }
.keylist li.keyhead:first-child { margin-top: 4px; }
.keylist li.keyhead.good span { color: var(--good-ink); }
.keylist li[data-eg]:not(.keyrest) { margin: -4px -6px; padding: 4px 6px; border-radius: 6px; }
.keylist li[data-eg], .meter i[data-eg] { transition: opacity .15s, background-color .15s; }
.keylist li[data-eg].on:not(.keyrest), .keylist li.keyrest.on > a, .keylist li.keyrest.on:not(:has(a)) { background: var(--surface-2); }
#eff-hero.eff-dim .meter i[data-eg]:not(.on) { opacity: .3; }
#eff-hero.eff-dim .keylist li[data-eg]:not(.on) { opacity: .55; }
.meter i[data-eg] { cursor: default; }
.effgroup { border-radius: 8px; transition: background-color .15s, box-shadow .15s; }
.effgroup.on { background: var(--surface-2); box-shadow: 0 0 0 6px var(--surface-2); }
.tile.has-tip { cursor: default; transition: border-color .15s; }
.tile.has-tip:hover { border-color: var(--line-strong); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.ln { width: 14px; height: 2px; border-radius: 2px; display: inline-block; flex: none; }

/* ── Графики ───────────────────────────────────────────────────────── */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin: -6px 0 12px; min-height: 18px; }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.chart { position: relative; width: 100%; min-height: 160px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11.5px; fill: var(--axis); font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--baseline); stroke-width: 1; shape-rendering: crispEdges; }
.chart .endlabel { fill: var(--ink); font-weight: 600; font-size: 12px; }
.chart .plotlabel { fill: var(--ink-3); font-size: 12px; font-weight: 500; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; shape-rendering: crispEdges; pointer-events: none; }
/* pan-y оставляет странице прокрутку пальцем вверх и вниз, а движение вдоль
   графика отдаёт самому графику: иначе браузер отменял бы касание прокруткой. */
.chart .hit { fill: transparent; cursor: crosshair; touch-action: pan-y; }
.chart .hit:focus { outline: none; }
.chart .band-overdue { fill: var(--crit-soft); }
.chart .col { transition: opacity .15s; }
.chart .col.dim { opacity: .45; }
.chart-empty { display: grid; place-items: center; min-height: 160px; color: var(--ink-3); font-size: 13px; text-align: center; padding: 16px; }

.minitable { width: 100%; border-collapse: collapse; font-size: 13px; }
.minitable th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.minitable td { padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.minitable .num { text-align: right; }
.minitable-wrap { overflow: auto; max-height: 260px; }

.bars { display: flex; flex-direction: column; gap: 14px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; align-items: baseline; }
.bar-label { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-value span { color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.bar-track { grid-column: 1 / -1; height: 8px; display: flex; gap: 2px; }
.bar-track i { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; transition: width .4s var(--ease); }
.bar-track i + i { border-radius: 0 4px 4px 0; }
.bar-track.stack i:first-child:not(:last-child) { border-radius: 0; }
.bar.dim { opacity: .45; }
/* Строка-ссылка: ведёт туда, где видно, из чего число сложено. */
a.bar.link { color: inherit; text-decoration: none; border-radius: 8px; margin: -5px -8px; padding: 5px 8px; }
a.bar.link .bar-value::after { content: " ›"; color: var(--accent-ink); font-weight: 600; }
a.bar.link:hover { background: var(--surface-2); }
a.bar.link:hover .bar-label { color: var(--ink); text-decoration: underline; }
a.bar.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.funnel .bar-track { height: 18px; }
.bars-empty { color: var(--ink-3); font-size: 13px; padding: 20px 0; text-align: center; }
.bar-note { grid-column: 1 / -1; margin-top: -2px; font-size: 12px; line-height: 1.35; color: var(--ink-3); }

/* ── Реестры ───────────────────────────────────────────────────────── */
.card.regcard { padding: 0; overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] {
  height: 46px; padding: 0 12px; border: 0; background: none; cursor: pointer; white-space: nowrap;
  color: var(--ink-3); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px; transition: color .15s, border-color .15s;
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .count {
  min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2);
  color: var(--ink-2); font-size: 12px; font-weight: 500; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}
.tabs .count:empty { display: none; }
.tabs .count.hot { background: var(--crit-soft); color: var(--crit-ink); }

/* Строка «куда вы попали и что делать»: появляется при переходе с плитки
   «Требует внимания», вместе с короткой подсветкой всего блока реестров. */
.regjump {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--accent-soft);
}
.regjump[hidden] { display: none; }
.regjump-title { font-weight: 600; color: var(--ink); }
.regjump-next { color: var(--ink-2); font-size: 13.5px; }
.regjump .btn { margin-left: auto; }
/* Готовое письмо в поддержку при ручной подаче: во всю ширину, кнопка под ним. */
.regjump-letter { flex: 1 1 100%; display: grid; gap: 8px; }
.regjump-letter textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); resize: vertical; }
.regjump-letter .btn { margin-left: 0; justify-self: start; }
.regcard.flash { animation: regflash 2.2s ease-out 1; }
@keyframes regflash {
  0%   { box-shadow: 0 0 0 3px var(--accent); }
  70%  { box-shadow: 0 0 0 3px var(--accent); }
  100% { box-shadow: 0 0 0 3px transparent; }
}
@media (prefers-reduced-motion: reduce) { .regcard.flash { animation: none; } }

.regtools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px; }
.search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; flex: 0 1 300px; min-width: 200px;
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink-3);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13.5px; height: 100%; }
.qfilters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.qgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.qgroup .flabel { margin-right: 2px; }
.regtools-right { margin-left: auto; display: flex; gap: 4px; }

.tablewrap { overflow: auto; max-height: min(74vh, 920px); border-top: 1px solid var(--line); }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.grid th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--ink-3);
  font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap;
  padding: 0 12px; height: 38px; border-bottom: 1px solid var(--line);
}
table.grid th.num, table.grid td.num { text-align: right; }
table.grid th button {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; height: 100%; color: inherit;
}
table.grid th button:hover { color: var(--ink); }
table.grid th button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
table.grid th[aria-sort="ascending"], table.grid th[aria-sort="descending"] { color: var(--ink); }
table.grid th .sorticon { width: 12px; height: 12px; opacity: 0; }
table.grid th[aria-sort] .sorticon { opacity: 1; }
table.grid th[aria-sort="ascending"] .sorticon { transform: rotate(180deg); }
table.grid td {
  padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle;
  background: var(--surface); transition: background .15s;
}
table.grid tbody tr:hover td { background: var(--surface-2); }
/* Строка целиком ведёт на страницу магазина: курсор говорит об этом, а
   название при наведении на любую клетку подчёркивается, как ссылка. */
table.grid tbody tr.rowgo { cursor: pointer; }
table.grid tbody tr.rowgo:hover .rowlink { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.grid tr.off td { color: var(--ink-3); }
table.grid tr.off .rowlink { text-decoration: line-through; color: var(--ink-3); }
table.grid tr.fresh td { animation: fresh 2.4s var(--ease); }
@keyframes fresh { 0%, 30% { background: var(--accent-soft); } 100% { background: var(--surface); } }
td .sub { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; }
td .of { color: var(--ink-3); font-weight: 400; }
td .good { color: var(--good-ink); font-weight: 600; }
td .dim, .dim { color: var(--ink-3); }
td.wrap { min-width: 220px; max-width: 420px; }
td .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.rowlink { color: var(--ink); font-weight: 550; text-decoration: none; }
.rowlink:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
td.pickcell { width: 44px; text-align: center; padding: 0 6px 0 16px; }
td.pickcell input, th.pickcell input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
th.pickcell { padding-left: 16px; }
td.thumbcell { width: 56px; padding: 6px 4px 6px 16px; }
.thumb { width: 36px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--surface-3); display: block; }
.namecell { min-width: 200px; max-width: 360px; }
.namecell .rowlink, .namecell .clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag {
  display: inline-block; padding: 0 6px; height: 20px; line-height: 19px; border-radius: 5px; margin: 1px 4px 1px 0;
  font-size: 11.5px; font-weight: 500; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--line); margin: 1px 4px 1px 0; vertical-align: middle;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.crit { background: var(--crit-soft); color: var(--crit-ink); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.pill.good { background: var(--good-soft); color: var(--good-ink); border-color: transparent; }
.pill.info { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.pill.muted { color: var(--ink-3); }

.regfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; min-height: 50px; }
.regempty td { text-align: center; color: var(--ink-3); padding: 40px 16px !important; }
.skrow td { padding: 14px 12px; }

/* ── Подсказка, уведомление, окно ──────────────────────────────────── */
/* Знак «?» в правом нижнем углу плитки и графика: что значат числа. */
.card { position: relative; }
.card.has-help { padding-bottom: 46px; }
.help {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  width: 24px; height: 24px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-3);
  font: 600 13px/1 var(--font); cursor: help; transition: color .15s, border-color .15s;
}
.help:hover, .help:focus-visible { color: var(--ink); border-color: var(--ink-3); }
/* Попасть пальцем: касание ловится в квадрате 44 точки, а знак остаётся маленьким. */
.help::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; }
.help-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tile .tile-sub { padding-right: 28px; }
.acard-wrap { position: relative; display: flex; min-width: 0; }
.acard-wrap > .acard { flex: 1; min-width: 0; }
.acard-wrap .acard-sub { padding-right: 26px; }
.tt-help { max-width: 300px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none; min-width: 150px; max-width: min(320px, calc(100vw - 16px));
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-pop); padding: 8px 10px; font-size: 12.5px;
}
.tt-title { color: var(--ink-3); font-size: 12px; margin-bottom: 4px; }
.tt-row { display: flex; align-items: center; gap: 8px; line-height: 1.7; }
.tt-row span { color: var(--ink-2); }
.tt-row b { margin-left: auto; padding-left: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-note { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
/* Подсказка со списком обращений: в неё заводят указатель и нажимают ссылки. */
.tooltip.rich {
  pointer-events: auto; width: max-content; max-width: min(440px, calc(100vw - 16px)); max-height: min(70vh, 560px);
  overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px;
}
.tt-rich .tt-title { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.tt-gh { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-weight: 600; color: var(--ink); }
.tt-title + .tt-gh { margin-top: 4px; }
.tt-case {
  display: flex; flex-direction: column; gap: 1px; margin: 0 -6px; padding: 5px 6px; border-radius: 6px;
  color: inherit; text-decoration: none;
}
.tt-case:hover, .tt-case:focus-visible { background: var(--surface-2); }
.tt-case b { font-weight: 600; color: var(--accent-ink); overflow-wrap: anywhere; }
.tt-case span { color: var(--ink-3); font-size: 12px; }
.tt-case .tt-why { color: var(--ink-2); font-size: 12.5px; line-height: 1.4; }
.tt-case .tt-detail { color: var(--ink-3); font-size: 12px; line-height: 1.4; font-style: italic; overflow-wrap: anywhere; }
.tt-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; line-height: 1.4; }
.tt-foot a { color: var(--accent-ink); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 110; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--surface); font-size: 13.5px; box-shadow: var(--shadow-pop);
  animation: toastin .2s var(--ease);
}
.toast.bad { background: var(--crit); color: #fff; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.modal {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; width: min(520px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop);
}
.modal::backdrop { background: rgba(10, 10, 10, .5); }
.modal form { padding: 22px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.modal h3 { font-size: 17px; }
.modal-body { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.modal-body p { margin: 0 0 8px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ── Заглушки на время первой загрузки ─────────────────────────────── */
.sk {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: sk 1.6s linear infinite;
}
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-card { min-height: 132px; }
.sk-card::after { content: ""; position: absolute; inset: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.6s linear infinite; }
.sk-hero { height: 220px; }
.sk-tile { height: 96px; }
.sk-chart { height: 240px; }
.sk-bars { height: 160px; }

.bump { animation: bump 1.2s var(--ease); border-radius: 6px; }
@keyframes bump { 0%, 25% { background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); } 100% { background: transparent; box-shadow: 0 0 0 4px transparent; } }

/* ── Ширина экрана ─────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .attn { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .span8, .span4 { grid-column: 1 / -1; }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brandtext span { display: none; }
}
@media (max-width: 900px) {
  .filterbar { position: static; }
  #copyreport { margin-left: 0; }
  .who-mail { display: none; }
  .regtools-right { margin-left: 0; }
}
@media (max-width: 760px) {
  :root { --topbar: 52px; }
  .topbar-in { padding: 0 16px; gap: 10px; }
  .brandtext { display: none; }
  .topbar #live-text { display: none; }
  .topbar-right { gap: 8px; }
  .topbar-right > .btn-ghost { display: none; }
  .viewnav a { padding: 5px 10px; }
  .page { padding: 20px 16px 56px; }
  h1 { font-size: 22px; }
  .pagehead { align-items: stretch; }
  .pagehead-actions, .pagehead-actions .btn { width: 100%; }
  .pagehead-actions .btn { flex: 1 1 0; }
  .filterbar { gap: 10px; padding: 12px; }
  .fgroup { flex-wrap: wrap; width: 100%; }
  .fgroup .flabel { width: 100%; }
  #copyreport { width: 100%; }
  .attn { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .acard { min-height: 120px; padding: 14px; }
  .acard-value { font-size: 26px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; min-height: 120px; }
  /* В два столбца заголовки переносятся по-разному, и число, прижатое к низу,
     отрывалось от своего заголовка провалом: на телефоне число идёт сразу
     под заголовком, а строка сравнения переносится, а не уезжает за край. */
  .tile-row { margin-top: 0; }
  .deltaline .vs { white-space: normal; }
  .tile-value { font-size: 24px; }
  .spark { display: none; }
  .hero-value { font-size: 44px; }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  /* Подпись шага воронки на телефоне переносится, а не обрезается: «Вошли в
     обращ…» рядом с «74 % от шага выше» не читалось. */
  .bar-label { white-space: normal; }
  .search { flex: 1 1 100%; }
  /* 🔴 На телефоне реестр не запирается в своё окно прокрутки: два жеста на
     одном месте, и палец вверх листал таблицу вместо страницы. Вбок таблица
     по-прежнему уезжает внутри себя. */
  .tablewrap { max-height: none; }
}
@media (pointer: coarse) {
  .chip, .seg > a, .seg > button { min-height: 40px; }
  .btn { min-height: 42px; }
  .iconbtn { width: 42px; height: 42px; }
  .tabs [role="tab"] { height: 48px; }
  /* Кнопка «Таблица» на карточке графика: на телефоне это главный путь к числам. */
  .linkbtn { min-height: 36px; padding: 8px 10px; }
  /* Флажок «Подаём» решает судьбу магазина, промах по нему дорог. */
  td.pickcell input, th.pickcell input { width: 22px; height: 22px; }
  td.pickcell, th.pickcell { width: 52px; }
  /* Поле мельче 16px заставляет телефон увеличить страницу и так её и оставить. */
  .search input, input, textarea, select { font-size: 16px; }
  /* Наведения нет, поэтому стрелка перехода на плитке видна сразу. */
  .acard-go { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .meter i, .bar-track i { forced-color-adjust: none; }
}

/* Завеса бесплатного тарифа (решение владельца 18.09.2026): закрытое значение
   размыто, под ним заглушка, а не значение; наведение или касание показывает
   кнопку к тарифам. Закрытый блок под реестром: строки-заглушки и числа. */
.freebar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; }
.freebar > span { flex:1 1 420px; }
.freebar .btn { margin-left:auto; flex:0 0 auto; }
/* Плашки конца оплаченного срока и поломки в кабинете клиента (25.09.2026). */
.paidbar, .problembar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; }
.paidbar > span, .problembar > span { flex:1 1 320px; }
.paidbar .btn, .problembar .btn { margin-left:auto; flex:0 0 auto; }
.paidbar { background: var(--warn-soft); border-color: var(--warn); color: var(--ink); }
.problembar, .paidbar.is-ended { background: var(--crit-soft); border-color: var(--crit); color: var(--ink); }
/* Плашка «Поиск закончен, проверьте найденное»: подача ждёт человека (27.09.2026). */
.reviewbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; background: var(--warn-soft); border-color: var(--warn); color: var(--ink); }
.reviewbar > span { flex:1 1 320px; }
.reviewbar .btn { margin-left:auto; flex:0 0 auto; }
.reviewbar .btn.is-asking { background: var(--warn); border-color: var(--warn); }
.reviewbar.is-done { background: var(--good-soft); border-color: var(--good); }
/* Шаги проверки и сверка документов перед первой подачей (16.10.2026). */
.reviewbar { align-items:flex-end; }
.review-body { flex:1 1 420px; min-width:0; }
.review-body p { margin:0; }
.review-steps { margin:6px 0 6px; padding-left:20px; }
.review-steps li { margin:4px 0; }
.review-docs { display:flex; flex-wrap:wrap; gap:4px 14px; margin-top:4px; }
.review-doc { overflow-wrap:anywhere; }
.review-check { margin-top:6px !important; }
.review-ok { color: var(--good); font-weight:600; }
.review-bad { color: var(--ink); }
.review-bad b { color: var(--crit); }
.review-problems { margin:4px 0 0; padding-left:20px; }
.review-problems li { margin:2px 0; overflow-wrap:anywhere; }
.review-wait { color: var(--muted); }
.review-hint { flex:1 0 100%; text-align:right; font-size:13px; }
@media (max-width: 640px) { .reviewbar .btn { width:100%; margin-left:0; white-space:normal; height:auto; padding-block:8px; } .review-hint { text-align:left; } }
.calib { display:block; padding:18px 20px; }
.calib .btn { margin-left:0; }
.calib-head { display:grid; gap:8px; margin-bottom:14px; }
.calib-title { margin:0; font-size:16px; display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; }
.calib-count { font-size:13px; color: var(--ink-2); font-weight:500; }
.calib-lead { margin:0; color: var(--ink-2); font-size:13.5px; max-width:900px; }
.calib-bar { width:100%; height:6px; appearance:none; border:0; border-radius:99px; background: color-mix(in srgb, var(--warn) 22%, transparent); overflow:hidden; }
.calib-bar::-webkit-progress-bar { background: color-mix(in srgb, var(--warn) 22%, transparent); border-radius:99px; }
.calib-bar::-webkit-progress-value { background: var(--good); border-radius:99px; transition: width .4s ease; }
.calib-bar::-moz-progress-bar { background: var(--good); border-radius:99px; }
.calib-steps { list-style:none; margin:0; padding:0; counter-reset: calstep; display:grid; gap:0; }
.calstep { counter-increment: calstep; display:grid; grid-template-columns: 28px 1fr; gap:12px; padding:12px 0; border-top:1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.calstep:first-child { border-top:0; padding-top:4px; }
.calstep-mark { width:26px; height:26px; box-sizing:border-box; border-radius:50%; display:grid; place-items:center; border:1.5px solid var(--warn); background: var(--surface); font-size:13px; font-weight:600; line-height:1; font-variant-numeric: tabular-nums; color: var(--ink); }
.calstep-mark::before { content: counter(calstep); display:block; text-box: trim-both cap alphabetic; }
.calstep-mark svg { display:none; width:15px; height:15px; fill:none; stroke:#fff; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.calstep.is-done .calstep-mark { background: var(--good); border-color: var(--good); }
.calstep.is-done .calstep-mark::before { content: none; }
.calstep.is-done .calstep-mark svg { display:block; }
.calstep-body { min-width:0; display:grid; gap:6px; }
.calstep-body p { margin:0; }
.calstep-title { font-weight:600; font-size:14.5px; }
.calstep.is-done .calstep-title { color: var(--ink-2); }
.calstep-text { font-size:13.5px; color: var(--ink); }
.calstep.is-done .calstep-text { color: var(--ink-3); }
.calstep-acts { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:2px; }
.calooks ~ .calstep-acts, .calstep-text.dim + .calstep-acts { margin-top:14px; }
.calooks { list-style:none; margin:2px 0; padding:0; display:grid; gap:6px; }
.calook { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 12px; padding:8px 10px; border-radius:8px; background: var(--surface); border:1px solid var(--line); }
.calook-main { min-width:0; flex:1 1 280px; display:flex; flex-wrap:wrap; gap:2px 8px; align-items:baseline; }
.calook-main a { font-weight:600; }
.calook-why { flex-basis:100%; font-size:12.5px; color: var(--ink-3); }
.calook-done { font-size:13px; color: var(--good); font-weight:600; }
.calib-foot { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin-top:12px; padding-top:12px; border-top:1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.calib-foot .review-hint { flex:1 1 260px; text-align:left; order:-1; }
.calib-foot .btn { margin-left:auto; }
@media (max-width: 640px) { .calib { padding:14px; } .calib-foot .btn, .calstep-acts .btn { width:100%; } }
.veil { position:relative; display:inline-block; }
.veil-blur { filter:blur(5px); user-select:none; pointer-events:none; color:var(--ink-2, var(--muted)); }
.veil-open { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); white-space:nowrap; padding:3px 9px; border-radius:8px; background:var(--accent); color:var(--on-accent); font-size:12px; font-weight:600; text-decoration:none; opacity:0; transition:opacity .15s; }
.veil:hover .veil-open, .veil:focus-within .veil-open, .veil:focus .veil-open { opacity:1; }
@media (pointer: coarse) { .veil-open { opacity:1; position:static; transform:none; margin-left:8px; } }
.veilrow td { color:var(--ink-2, var(--muted)); }
.veilwall td { padding:0; }
.veilwall-in { display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; margin:-2px 0 0; padding:14px 16px; border-top:1px solid var(--line); background:var(--accent-soft); }
.veilwall-in span { color:var(--ink-2, var(--muted)); font-size:13px; }
.veilwall-in .btn { margin-left:auto; }

/* Вопрос про свой кадр: ваша ли это фотография (27.09.2026). Одна строка на
   кадр: наш снимок, вопрос с числами, до трёх копий и две кнопки. */
#origins[hidden] { display: none; }
#origins.flash .origcard { animation: regflash 2.2s ease-out 1; }
@media (prefers-reduced-motion: reduce) { #origins.flash .origcard { animation: none; } }
.origlead { margin: 0 0 12px; color: var(--ink-2); font-size: 13.5px; max-width: 80ch; }
.origlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.origrow { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.origrow:first-child { border-top: 0; padding-top: 0; }
.origmine { margin: 0; flex: none; width: 82px; }
.origmine img { width: 82px; height: 109px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); display: block; }
.origmine figcaption { margin-top: 4px; font-size: 11.5px; color: var(--ink-3); line-height: 1.3; }
.origbody { flex: 1; min-width: 0; display: grid; gap: 8px; }
.origask { margin: 0; color: var(--ink); font-size: 13.5px; }
.origcopies { display: flex; gap: 6px; flex-wrap: wrap; }
.origcopies img { width: 82px; height: 109px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); }
.origcopies img, .origmine img { overflow: hidden; font-size: 0; color: transparent; }
.origcopy { margin: 0; display: grid; gap: 3px; }
.origcopy figcaption, .origmine figcaption a { font-size: 11.5px; color: var(--ink-3); }
.origcopy a, .origmine figcaption a { color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }
.origcopy a:hover, .origmine figcaption a:hover { color: var(--ink); }
img[data-photo] { cursor: zoom-in; transition: border-color .15s, box-shadow .15s; }
img[data-photo]:hover { border-color: var(--accent, var(--line-strong)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #3b82f6) 35%, transparent); }
.photopeek { position: fixed; left: 0; top: 0; z-index: 80; width: 340px; height: 453px; pointer-events: none; opacity: 0; transition: opacity .12s; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 18px 48px rgba(0,0,0,.35); }
.photopeek.on { opacity: 1; }
.photopeek img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.photobox { position: fixed; inset: 0; z-index: 95; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(0,0,0,.9); padding: 16px; }
.photobox.on { display: flex; }
.photobox img { max-width: min(96vw, 1100px); max-height: calc(100vh - 90px); object-fit: contain; border-radius: 10px; background: #fff; }
.photobox-cap { margin: 0; color: #e8e8e4; font-size: 14px; text-align: center; }
.photobox-nav, .photobox-close { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.photobox-nav:hover, .photobox-close:hover { background: rgba(255,255,255,.24); }
.photobox-nav.is-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.photobox-nav.is-next { right: 16px; top: 50%; transform: translateY(-50%); }
.photobox-close { right: 16px; top: 16px; font-size: 26px; }
@media (max-width: 560px) { .photobox-nav { top: auto; bottom: 16px; transform: none; } }
.origbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.orignote, .origdone { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.origdone:empty { display: none; }
.origrow.is-done .origask, .origrow.is-done .origcopies { opacity: .55; }
.origrow.is-done .origdone { color: var(--ink); font-weight: 500; }
@media (max-width: 560px) {
  .origmine, .origmine img { width: 64px; }
  .origmine img { height: 85px; }
  .origbtns .btn { flex: 1 1 100%; }
}