/* Монитор КМ — общие стили (Р12, Р13).
   Токены — ровно из ДБ §4. Подписи берут цвет из --muted: на фоне страницы это второй текст #44506A,
   на белом и на второй поверхности — #667289 (там он проходит 4,5:1). Цвет подписей напрямую не ставим.
   Градиенты — только у яркой карточки (.bright*) и полосы площадки (.band--*). Скругления — не больше 24 px.
   Поверхности парят: без рамок, с мягкой тенью в тон фона (--shadow-card); яркие карточки — с тенью своего цвета.
   Отступы и промежутки — по сетке 4 px. Кнопок два вида: главная (.btn--primary) и обычная (.btn). */

/* ---------- Шрифт: Humanist Sans из static/vendor (прислал Валерий 21.09.2026), кириллица и латиница в одном файле.
   В семействе насыщенности 100 · 300 · 500 · 700 · 900; диапазоны ниже говорят браузеру, каким файлом рисовать наши 400 и 600,
   чтобы он не утолщал буквы сам. Знаков ₽, → и ↗ в шрифте нет — их рисует системный шрифт, как и раньше. ---------- */
@font-face { font-family: "Humanist Sans"; font-style: normal; font-weight: 100 200; font-display: swap; src: url("../vendor/humanist-sans/humanist-sans-100.woff2") format("woff2"); }
@font-face { font-family: "Humanist Sans"; font-style: italic; font-weight: 100 200; font-display: swap; src: url("../vendor/humanist-sans/humanist-sans-100i.woff2") format("woff2"); }
@font-face { font-family: "Humanist Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../vendor/humanist-sans/humanist-sans-300.woff2") format("woff2"); }
@font-face { font-family: "Humanist Sans"; font-style: italic; font-weight: 300; font-display: swap; src: url("../vendor/humanist-sans/humanist-sans-300i.woff2") format("woff2"); }
@font-face { font-family: "Humanist Sans"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../vendor/humanist-sans/humanist-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Humanist Sans"; font-style: italic; font-weight: 400 500; font-display: swap; src: url("../vendor/humanist-sans/humanist-sans-500i.woff2") format("woff2"); }
@font-face { font-family: "Humanist Sans"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("../vendor/humanist-sans/humanist-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Humanist Sans"; font-style: italic; font-weight: 600 700; font-display: swap; src: url("../vendor/humanist-sans/humanist-sans-700i.woff2") format("woff2"); }
@font-face { font-family: "Humanist Sans"; font-style: normal; font-weight: 800 900; font-display: swap; src: url("../vendor/humanist-sans/humanist-sans-900.woff2") format("woff2"); }
@font-face { font-family: "Humanist Sans"; font-style: italic; font-weight: 800 900; font-display: swap; src: url("../vendor/humanist-sans/humanist-sans-900i.woff2") format("woff2"); }

/* ---------- Токены ---------- */
:root {
  --bg: #F2F5FB;
  --surface: #FFFFFF;
  --surface-2: #F7F9FD;
  --line: #E3E8F2;
  --text: #111A2E;
  --text-2: #44506A;
  --caption: #667289;
  --action: #111A2E;
  --on-action: #FFFFFF;

  --ok-text: #44506A;
  --ok-bg: #F7F9FD;
  --ok-dot: #C9D3E3;
  --ok-line: #1FA855;
  --star: #F0BB44;
  --star-edge: #C6903A;
  --attention-text: #7A5600;
  --attention-bg: #FFF4CC;
  --attention-dot: #F5B400;
  --problem-text: #B4232C;
  --problem-bg: #FDE3E4;
  --problem-dot: #E5484D;
  --no-card-text: #566079;
  --no-card-bg: #EDF0F6;

  --yandex-top: #F26A1B;
  --yandex-bottom: #DB4A12;
  --yandex: #F26A1B;
  --2gis-top: #1FA855;
  --2gis-bottom: #168545;
  --2gis: #1FA855;
  --google-top: #4F7DF9;
  --google-bottom: #3D5AFE;
  --google: #4F7DF9;
  --site-top: #1699CC;
  --site-bottom: #0E7FAE;
  --site: #1597C9;

  --shadow-card: 0 1px 2px rgba(28, 42, 84, .04), 0 12px 32px -12px rgba(28, 42, 84, .14);
  --shadow-lift: 0 2px 4px rgba(28, 42, 84, .06), 0 20px 40px -16px rgba(28, 42, 84, .22);
  --shadow-pop: 0 12px 32px rgba(17, 26, 46, .12);
  --dur: 180ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Humanist Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  --muted: var(--text-2);
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; }
h1 { font-size: 28px; letter-spacing: -0.02em; }
h2 { font-size: 20px; letter-spacing: -0.01em; }
h3 { font-size: 16px; }
img, svg { max-width: 100%; }
a { color: var(--action); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--caption); }   /* линия не утолщается: на глаз это выглядело двойной */
button, input, select, textarea { font: inherit; color: inherit; }
summary { cursor: pointer; }
.num, table, time, .tile__value, .bright__value, .fresh__date, .rating { font-variant-numeric: tabular-nums; }
.icon { display: inline-block; flex: none; vertical-align: -0.2em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.measure { max-width: 72ch; }
/* длинное слово без пробелов (логин до 32 знаков) переносится в любом месте и читается целиком, без многоточия */
.wrap-anywhere { white-space: normal; overflow-wrap: anywhere; }
.stack { display: grid; gap: 16px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* «К содержимому» — первая остановка клавиатуры: видна только в фокусе, минует меню и шапку */
.skip-link { position: fixed; left: 16px; top: 16px; z-index: 100; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 12px; background: var(--action); color: var(--on-action); font-size: 14px; font-weight: 600; text-decoration: none; transform: translateY(-96px); }
.skip-link:focus { transform: none; }

/* Фокус с клавиатуры — на всём нажимаемом, кольцо цвета действия */
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.toggle--open:focus-visible ~ .main .topbar__menu,
.toggle--wide:focus-visible ~ .sidebar .sidebar__expand,
.toggle--more:focus-visible + .tabbar__more { outline: 2px solid var(--action); outline-offset: 2px; }

/* ---------- Каркас: меню слева, шапка, содержимое, правая колонка ---------- */
.app { --menu-w: 248px; --aside-w: 360px; --gutter: 32px; --tile-num: 36px; --bright-h: 188px; --bright-num: 52px; min-height: 100vh; }
.toggle { display: none; position: fixed; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }

.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 30;
  width: var(--menu-w);
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 16px;
  overflow-x: hidden; overflow-y: auto;
  background: var(--surface-2);
  --muted: var(--caption);
}
.sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar .sidebar__close { display: none; }
.sidebar__expand { display: none; }
.sidebar__expand-close { display: none; }
.brand { display: block; padding: 4px; text-decoration: none; }
.brand__logo { display: block; width: 148px; height: auto; }
.brand__key { display: none; width: 40px; height: 40px; border-radius: 10px; }   /* узкое меню: знак как у фавикона */
.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu__link {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 8px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur), color var(--dur);
}
.menu__link:hover { color: var(--text); background: var(--surface); }
.menu__link[aria-current="page"] { color: var(--text); background: var(--surface); font-weight: 600; box-shadow: var(--shadow-card); }
.sidebar__foot { margin-top: auto; display: grid; gap: 16px; }

/* свежесть данных и пользователь */
.fresh { display: grid; gap: 8px; }
.fresh__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fresh__row { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 13px; color: var(--text-2); }
.fresh__name { flex: 1; min-width: 0; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fresh__none { font-size: 13px; color: var(--text-2); }
.user { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border: 1px solid transparent; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); --muted: var(--caption); }
.user__who { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.user__login { font-size: 14px; font-weight: 600; }
.user__role { font-size: 12px; color: var(--muted); }
.logout { margin: 0; }

.scrim { display: none; position: fixed; inset: 0; z-index: 25; background: rgba(17, 26, 46, .32); cursor: pointer; }
.main { margin-left: var(--menu-w); padding: 0 var(--gutter) 40px; min-width: 0; }
.main__inner { max-width: 1760px; margin: 0 auto; }

/* шапка: поиск и период */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 20px 0 16px; }
.topbar__menu { display: none; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; }
.search { flex: 1 1 280px; max-width: 480px; display: flex; gap: 8px; margin: 0; }
.search__field { position: relative; flex: 1; min-width: 0; }
.search__field .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.search .search__input { width: 100%; padding-left: 40px; }
.search__hints { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-pop); }
.search__hints[hidden] { display: none; }
.search__hint { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 12px; color: var(--text); text-decoration: none; cursor: pointer; }
.search__hint:hover, .search__hint.is-active { background: var(--surface-2); }
.search__hint b { font-weight: 600; }
.search__hint span { color: var(--muted); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search__hint .dot { flex: none; width: 8px; height: 8px; border-radius: 4px; background: var(--ok-dot); }
.search__hint .dot--attention { background: var(--attention-dot); }
.search__hint .dot--problem { background: var(--problem-dot); }
.period { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); }
.period__link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 12px; color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.period__link:hover { color: var(--text); background: var(--surface-2); }
.period__link[aria-current="true"] { color: var(--on-action); background: var(--action); font-weight: 600; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin: 4px 0 16px; }
.page-title { font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.page__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.page__grid--aside { grid-template-columns: minmax(0, 1fr) var(--aside-w); }
.content, .aside { min-width: 0; display: grid; gap: 24px; align-content: start; }

/* нижняя панель телефона и лист «Ещё» */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  --muted: var(--caption);
}
.tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 52px; padding: 4px; border-radius: 10px; color: var(--text-2); font-size: 12px; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer; }
.tabbar__item[aria-current="page"], .tabbar__item.is-current { color: var(--text); background: var(--surface-2); font-weight: 700; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; gap: 16px; max-height: 85vh; overflow-y: auto;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0;
  box-shadow: var(--shadow-pop);
  transform: translateY(100%); visibility: hidden;
  transition: transform var(--dur), visibility var(--dur);
  --muted: var(--caption);
}
.toggle--more:checked ~ .sheet { transform: none; visibility: visible; }
.toggle--more:checked ~ .scrim--more { display: block; }
.scrim--more { z-index: 45; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet__title { font-size: 16px; font-weight: 600; }
.sheet__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sheet__link { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 10px; color: var(--text); background: var(--surface-2); font-weight: 500; text-decoration: none; }

/* ---------- Блоки, подписи, плитки ---------- */
.block { min-width: 0; padding: 24px; background: var(--surface); border: 1px solid transparent; border-radius: 20px; box-shadow: var(--shadow-card); --muted: var(--caption); }
.block__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 16px; }
.block__title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.surface-2 { background: var(--surface-2); --muted: var(--caption); }
.section-label { font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.empty { padding: 20px; font-size: 15px; color: var(--muted); }
.first-run { display: grid; gap: 8px; max-width: 72ch; }
.first-run__title { font-size: 20px; font-weight: 600; line-height: 1.3; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px; background: var(--surface); border: 1px solid transparent; border-radius: 20px; box-shadow: var(--shadow-card); --muted: var(--caption); }
.tile__top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tile__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--text); }
/* синяя галочка: синяя заливка и белый значок — на плитке «Обзора» и в блоке «Точки» */
.sign--verified { background: var(--google); color: #FFFFFF; }
.tile__label { font-size: 14px; font-weight: 500; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tile__value { display: flex; align-items: baseline; gap: 4px; min-width: 0; font-size: var(--tile-num, 36px); font-weight: 700; line-height: 1; letter-spacing: -0.02em; white-space: nowrap; }
.tile__unit { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.tile__sep { align-self: stretch; width: 1px; margin: 0 8px; background: var(--line); }
.tile__aside { flex: none; font-size: 12px; color: var(--text-2); }
.tile__note { margin-top: auto; font-size: 13px; color: var(--muted); }
/* плитка-ссылка: подпись — ссылка, растянутая на всю плитку; плитка приподнимается, как строки списков */
.tile__link { color: inherit; text-decoration: none; }
.tile__link::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.tile:has(.tile__link) { transition: box-shadow var(--dur), transform var(--dur); }
.tile:has(.tile__link):hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.tile__go { flex: none; margin-left: auto; color: var(--muted); transition: transform var(--dur), color var(--dur); }
.tile:hover .tile__go { color: var(--text); transform: translate(2px, -2px); }
.tile__aside, .tile__note a { position: relative; z-index: 1; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.delta--bad { color: var(--problem-text); }

/* ---------- Яркие карточки: только четыре на Обзоре и полосы площадок на «Точке» ---------- */
.brights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.bright {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  min-height: var(--bright-h, 188px); padding: 24px;
  border-radius: 24px;
  color: #FFFFFF; text-decoration: none;
  transition: transform var(--dur), box-shadow var(--dur);
}
.bright:hover { transform: translateY(-4px); }
/* волны, как на «кошельках» референса: тонкие белые линии поверх градиента */
.bright::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='240' viewBox='0 0 420 240'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.2' stroke-width='1'%3E%3Cpath d='M-20 20c60-30 110 30 170 0s110-30 170 0 110 30 170 0'/%3E%3Cpath d='M-20 38c60-32 110 28 170-2s110-28 170 2 110 32 170 2'/%3E%3Cpath d='M-20 56c60-34 110 26 170-4s110-26 170 4 110 34 170 4'/%3E%3Cpath d='M-20 74c60-36 110 24 170-6s110-24 170 6 110 36 170 6'/%3E%3Cpath d='M-20 92c60-38 110 22 170-8s110-22 170 8 110 38 170 8'/%3E%3Cpath d='M-20 110c60-40 110 20 170-10s110-20 170 10 110 40 170 10'/%3E%3Cpath d='M-20 128c60-42 110 18 170-12s110-18 170 12 110 42 170 12'/%3E%3Cpath d='M-20 146c60-44 110 16 170-14s110-16 170 14 110 44 170 14'/%3E%3Cpath d='M-20 164c60-46 110 14 170-16s110-14 170 16 110 46 170 16'/%3E%3Cpath d='M-20 182c60-48 110 12 170-18s110-12 170 18 110 48 170 18'/%3E%3Cpath d='M-20 200c60-50 110 10 170-20s110-10 170 20 110 50 170 20'/%3E%3Cpath d='M-20 218c60-52 110 8 170-22s110-8 170 22 110 52 170 22'/%3E%3Cpath d='M-20 236c60-54 110 6 170-24s110-6 170 24 110 54 170 24'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
}
.bright--yandex { background: linear-gradient(160deg, var(--yandex-top), var(--yandex-bottom)); box-shadow: 0 20px 32px -12px rgba(232, 84, 20, .55); }
.bright--2gis { background: linear-gradient(160deg, var(--2gis-top), var(--2gis-bottom)); box-shadow: 0 20px 32px -12px rgba(26, 150, 76, .55); }
.bright--google { background: linear-gradient(160deg, var(--google-top), var(--google-bottom)); box-shadow: 0 20px 32px -12px rgba(70, 108, 252, .55); }
.bright--site { background: linear-gradient(160deg, var(--site-top), var(--site-bottom)); box-shadow: 0 20px 32px -12px rgba(18, 140, 190, .55); }
.bright__head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.bright__value { font-size: var(--bright-num, 52px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.bright__note { font-size: 15px; font-weight: 600; }
.bright .spark { stroke: #FFFFFF; }
.bright .spark-area { fill: #FFFFFF; }
.band { display: flex; align-items: center; height: 52px; padding: 0 16px; border-radius: 20px 20px 0 0; }
.band--yandex { background: linear-gradient(180deg, var(--yandex-top), var(--yandex-bottom)); }
.band--2gis { background: linear-gradient(180deg, var(--2gis-top), var(--2gis-bottom)); }
.band--google { background: linear-gradient(180deg, var(--google-top), var(--google-bottom)); }
.band--site { background: linear-gradient(180deg, var(--site-top), var(--site-bottom)); }
/* на яркой карточке знак площадки — в белом кольце, чтобы красный Яндекс не тонул в оранжевом, а зелёный 2ГИС — в зелёном */
.bright .mono, .band .mono { border: 2px solid #FFFFFF; background: #FFFFFF; }
.bright .mono--ours { border: 0; color: var(--site); }

/* подчёркивание заголовка колонки площадки: 2 px снизу цветом её линии */
.line-yandex { box-shadow: inset 0 -2px 0 var(--yandex); }
.line-2gis { box-shadow: inset 0 -2px 0 var(--2gis); }
.line-google { box-shadow: inset 0 -2px 0 var(--google); }
.line-site { box-shadow: inset 0 -2px 0 var(--site); }

/* ---------- Знаки площадок: настоящие значки Яндекса, 2ГИС и Google Карт картинкой (слово Валерия 21.09.2026), рядом всегда есть
   название; у источника «Сайты» — глобус. У «наших данных» — ключ (.mono--ours): на цветной заливке значок белый, порог для знака — 3:1 ---------- */
.mono { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 12px; font-size: 12px; font-weight: 700; line-height: 1; }
.mono__logo { display: block; width: 100%; height: 100%; }
.mono--ours { background: var(--site); color: #FFFFFF; }
.mono .icon { width: 14px; height: 14px; }
.mono--lg { width: 32px; height: 32px; border-radius: 16px; font-size: 15px; }
.mono--lg .icon { width: 18px; height: 18px; }
.platform { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Состояния: плашка со значком и словом; сегменты; штриховка «нет данных» ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 24px; padding: 0 8px; border: 1px solid transparent; border-radius: 12px; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; }
.badge .icon { width: 14px; height: 14px; }
.badge--ok { color: var(--ok-text); background: var(--ok-bg); border-color: var(--line); }
.badge--attention { color: var(--attention-text); background: var(--attention-bg); }
.badge--problem { color: var(--problem-text); background: var(--problem-bg); }
.badge--no_card { color: var(--no-card-text); background: var(--no-card-bg); border: 1px dashed var(--no-card-text); }
.badge--no_data { color: var(--no-card-text); background: var(--no-card-bg); }

/* состояние словом, без плашки — там, где плашка уже есть рядом и вторая только шумит */
.word { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.word .icon { width: 14px; height: 14px; }
.word--ok { color: var(--muted); }
.word--attention { color: var(--attention-text); }
.word--problem { color: var(--problem-text); }

/* индикатор из трёх сегментов (HTML); полоса monitor.svg.segments() — классы seg--* ниже, не пересекаются */
.indicator { display: inline-flex; align-items: flex-start; gap: 4px; }
.indicator__item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.indicator__item .mono { width: 18px; height: 18px; }
.indicator__item .mono__logo { width: 18px; height: 18px; }
.indicator__seg { display: block; width: 16px; height: 3px; border-radius: 2px; }
.indicator__seg--ok { background: var(--ok-line); }
.indicator__seg--attention { background: var(--attention-dot); }
.indicator__seg--problem { background: var(--problem-dot); }
.indicator__seg--no_card { background: var(--surface); border: 1px dashed var(--no-card-text); }
.indicator__item--no_card .mark { opacity: .35; }
/* штриховка «нет данных»: узор 8×8 задаёт только форму, цвета — токены; тот же узор у графиков (.hatch-bg, .hatch-line) */
.hatch, .indicator__seg--no_data { position: relative; isolation: isolate; overflow: hidden; background-color: var(--surface-2); }
.hatch::before, .indicator__seg--no_data::before { content: ""; position: absolute; inset: 0; z-index: -1; background-color: var(--ok-dot); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M-2 2l4-4M0 8l8-8M6 10l4-4' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") 0 0 / 8px 8px repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M-2 2l4-4M0 8l8-8M6 10l4-4' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") 0 0 / 8px 8px repeat; }
.hatch { display: inline-flex; align-items: center; padding: 4px; border: 1px solid var(--line); border-radius: 10px; }
.hatch__text { padding: 0 8px; border-radius: 8px; background: var(--surface); color: var(--no-card-text); font-size: 13px; white-space: nowrap; }

/* графики monitor.svg: цвета по токенам — правила главнее атрибутов SVG (в атрибутах те же значения) */
.chart-grid { stroke: var(--line); }
.chart-axis { fill: var(--muted); }
.chart-bar { fill: var(--text-2); }
.spark { stroke: var(--text-2); }
.chart-line--yandex { stroke: var(--yandex); }
.chart-line--2gis { stroke: var(--2gis); }
.chart-line--google { stroke: var(--google); }
.chart-line--site { stroke: var(--site); }
.chart-dot--yandex { fill: var(--yandex); }
.chart-dot--2gis { fill: var(--2gis); }
.chart-dot--google { fill: var(--google); }
.chart-dot--site { fill: var(--site); }
.progress-track { fill: var(--line); }
.progress-fill { fill: var(--site); }
.seg--ok { fill: var(--ok-line); }
.seg--attention { fill: var(--attention-dot); }
.seg--problem { fill: var(--problem-dot); }
.seg--none { fill: var(--line); }
.seg--no_card { fill: var(--surface); stroke: var(--no-card-text); stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.hatch-bg { fill: var(--surface-2); }
.hatch-line { stroke: var(--ok-dot); }

/* полоса доли цветом площадки: «Что заполнить» на Обзоре, заполненность на «Точке» */
.meter { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter__bar { display: block; height: 100%; border-radius: 4px; }
.meter__bar--yandex { background: var(--yandex); }
.meter__bar--2gis { background: var(--2gis); }
.meter__bar--google { background: var(--google); }

.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.rating .icon { width: 14px; height: 14px; fill: var(--star); stroke: var(--star-edge); }
.rating--none { color: var(--muted); font-weight: 400; }

/* длинный текст — две строки и многоточие; полностью — наведением (подсказка) и нажатием (фокус) */
.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines, 2); overflow: hidden; overflow-wrap: anywhere; }
.clamp:focus { display: block; -webkit-line-clamp: none; overflow: visible; }
.when { white-space: nowrap; }
.when__exact { display: none; }
.when:focus .when__rel { display: none; }
.when:focus .when__exact { display: inline; }

.photo { display: block; max-width: 100%; height: auto; object-fit: cover; border-radius: 10px; background: var(--no-card-bg); }
.photo--broken { background: var(--no-card-bg); }
.history-stub { display: flex; align-items: center; justify-content: center; min-height: 200px; padding: 24px; border-radius: 16px; background: var(--surface-2); font-size: 15px; text-align: center; color: var(--muted); }
.history-stub--inline { min-height: 0; padding: 0; border: 0; border-radius: 0; font-size: 12px; line-height: 1.3; }

/* ---------- Кнопки, поля, фильтры ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color var(--dur), border-color var(--dur), transform var(--dur);
}
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--surface-2); border-color: var(--ok-dot); }
.btn--primary { background: var(--action); border-color: var(--action); color: var(--on-action); }
.btn--primary:hover { background: var(--text-2); border-color: var(--text-2); }
.btn--icon { width: 40px; padding: 0; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { display: grid; gap: 8px; }
.field__label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.input, input:not([type]), input[type="text"], input[type="search"], input[type="password"], input[type="date"], input[type="number"], input[type="tel"], input[type="url"], input[type="email"], select, textarea {
  min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font-size: 14px; line-height: 1.4;
  --muted: var(--caption);
}
.input { width: 100%; }
::placeholder { color: var(--muted); opacity: 1; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2344506A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
.alert { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 10px; font-size: 14px; }
.alert--problem { color: var(--problem-text); background: var(--problem-bg); }
.alert--attention { color: var(--attention-text); background: var(--attention-bg); }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.filters__check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; cursor: pointer; }
.filters__check input { width: 18px; height: 18px; margin: 0; accent-color: var(--action); }
.js form[data-autosubmit] [data-apply] { display: none; }
.sheet-toggle, .filters__head { display: none; }
.filters-scrim { z-index: 55; }

/* ---------- Таблица: шапка на второй поверхности, числа справа; .table-head — строка шапки вне <table>
   (сетку колонок задаёт страница), её ячейки выглядят как th ---------- */
.table-wrap { max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid transparent; border-radius: 20px; box-shadow: var(--shadow-card); --muted: var(--caption); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table-head > * { padding: 8px 12px; background: var(--surface-2); color: var(--text-2); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; text-align: left; vertical-align: bottom; white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }

/* строки списка — отдельные белые плашки с зазором */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 64px; padding: 16px 20px; background: var(--surface); border: 1px solid transparent; border-radius: 16px; box-shadow: var(--shadow-card); transition: box-shadow var(--dur), transform var(--dur); --muted: var(--caption); }
.row:hover { box-shadow: var(--shadow-lift); }

/* необратимое действие в два шага, без скриптов: кнопка-summary раскрывает подтверждение; повторное нажатие — отмена */
.confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.confirm > summary { list-style: none; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm[open] > summary { background: var(--surface-2); }
.confirm__row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: 8px; font-size: 13px; color: var(--text-2); }

/* меню «⋯» на <details> */
.more-menu { position: relative; display: inline-block; }
.more-menu > summary { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: var(--text-2); list-style: none; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu > summary:hover, .more-menu[open] > summary { background: var(--surface-2); color: var(--text); }
.more-menu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px; display: grid; gap: 4px; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); --muted: var(--caption); }
.more-menu__item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.more-menu__item:hover { background: var(--surface-2); }

/* ---------- Вход и страницы ошибок: карточка по центру, сверху полоса четырёх цветов источников ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.auth__card { position: relative; overflow: hidden; display: grid; gap: 24px; width: 100%; max-width: 420px; margin: 0; padding: 44px 36px 36px; background: var(--surface); border: 1px solid transparent; border-radius: 24px; box-shadow: var(--shadow-lift); --muted: var(--caption); }
.auth__strip { position: absolute; top: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: 8px; }
.auth__strip > i { display: block; }
.auth__strip > i:nth-child(1) { background: var(--yandex); }
.auth__strip > i:nth-child(2) { background: var(--2gis); }
.auth__strip > i:nth-child(3) { background: var(--google); }
.auth__strip > i:nth-child(4) { background: var(--site); }
.auth .brand__logo { width: 176px; }
.auth .input { min-height: 48px; font-size: 16px; }
.auth .btn { min-height: 48px; font-size: 16px; }
.auth__title { font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.auth__note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.auth__code { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.auth__lead { display: grid; gap: 8px; }

/* ---------- Экраны (Р13) ---------- */

/* 1920 и шире: меню 264 */
@media (min-width: 1920px) {
  .app { --menu-w: 264px; }
}

/* ноутбук: 1280–1439, а также 1280–1919 при высоте окна до 864 — меню значками 72 px */
@media (min-width: 1280px) and (max-width: 1439.98px), (min-width: 1280px) and (max-width: 1919.98px) and (max-height: 864px) {
  .app { --menu-w: 72px; --aside-w: 320px; --gutter: 24px; --tile-num: 32px; --bright-h: 156px; --bright-num: 44px; }
  .toggle--wide { display: block; }
  .sidebar { padding: 16px 12px; transition: width var(--dur), box-shadow var(--dur); }
  .sidebar .sb-text, .sidebar .badge__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sidebar .brand { padding: 4px 0; }
  .sidebar .brand__key { display: block; }
  .toggle--wide:checked ~ .sidebar .brand { padding: 4px; }
  .toggle--wide:checked ~ .sidebar .brand__key { display: none; }
  .sidebar__expand { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; white-space: nowrap; cursor: pointer; }
  .sidebar__expand:hover { color: var(--text); background: var(--surface); }
  .sidebar .fresh__row { gap: 4px; }
  .sidebar .fresh { display: none; }                       /* значки источников в узком меню убраны (слово Валерия 23.09) */
  .toggle--wide:checked ~ .sidebar .fresh { display: grid; }
  .sidebar .badge { width: 16px; height: 16px; padding: 0; justify-content: center; }
  .sidebar .user { padding: 0; border-color: transparent; background: transparent; }
  .sidebar .logout .btn { width: 44px; padding: 0; }
  .toggle--wide:checked ~ .sidebar { width: 248px; padding: 16px; box-shadow: var(--shadow-pop); }
  .toggle--wide:checked ~ .sidebar .sb-text, .toggle--wide:checked ~ .sidebar .badge__text { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap; }
  .toggle--wide:checked ~ .sidebar .sidebar__expand-open { display: none; }
  .toggle--wide:checked ~ .sidebar .sidebar__expand-close { display: inline; }
  .toggle--wide:checked ~ .sidebar .badge { width: auto; height: 24px; padding: 0 8px; }
  .toggle--wide:checked ~ .sidebar .user { padding: 8px 8px 8px 12px; border-color: var(--line); background: var(--surface); }
  .toggle--wide:checked ~ .sidebar .logout .btn { width: auto; padding: 0 16px; }
  .block { padding: 20px; }
  .tile { padding: 16px; }
  .tiles, .brights { gap: 16px; }
  .brights > .bright { padding: 20px; }
}

/* планшет и телефон: меню выезжает слева по кнопке в шапке; правая колонка уходит вниз */
@media (max-width: 1279.98px) {
  .app { --menu-w: 0px; --gutter: 24px; }
  .toggle--open { display: block; }
  .sidebar { width: 280px; transform: translateX(-100%); visibility: hidden; transition: transform var(--dur), visibility var(--dur); }
  .toggle--open:checked ~ .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-pop); }
  .toggle--open:checked ~ .scrim--nav { display: block; }
  .sidebar .sidebar__close { display: inline-flex; }
  .topbar__menu { display: inline-flex; }
  .page__grid--aside { grid-template-columns: minmax(0, 1fr); }
  .tiles, .brights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* телефон: одна колонка, нижняя панель, поля 16 px, нажимаемое от 44 px */
@media (max-width: 767.98px) {
  .app { --gutter: 16px; }
  .toggle--open, .sidebar, .scrim--nav, .topbar__menu { display: none; }
  .toggle--more { display: block; }
  .tabbar { display: grid; }
  .main { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .topbar { padding: 12px 0; }
  .search { flex-basis: 100%; max-width: none; }
  .period { margin-left: 0; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { font-size: 16px; }
  .btn, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, summary, .tabbar__item, .menu__link, .period__link, .sheet__link, .more-menu__item { min-height: 44px; }
  .btn--icon, .more-menu > summary { width: 44px; }
  .filters__check { min-height: 44px; font-size: 16px; }
  .page-title { font-size: 24px; }
  .block { padding: 16px; }
  .period__link { padding: 0 12px; }
  .tiles { gap: 12px; }
  .tile { padding: 16px; }
  .tile__top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tile__label { white-space: normal; }
  .brights { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; }
  .brights > .bright { flex: 0 0 86%; scroll-snap-align: start; min-height: 164px; }
  .app { --bright-num: 44px; --tile-num: 32px; }
  .chart--lines { overflow: visible; }
  .chart--lines .chart-axis { font-size: 24px; }
  .chart--lines .chart-value { display: none; }
  .sheet-toggle { display: inline-flex; }
  .js form[data-sheet] {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; gap: 12px; max-height: 85vh; overflow-y: auto; margin: 0;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-pop);
    transform: translateY(100%); visibility: hidden;
    transition: transform var(--dur), visibility var(--dur);
    --muted: var(--caption);
  }
  .js form[data-sheet].is-open { transform: none; visibility: visible; }
  .js form[data-sheet] .filters__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .js form[data-sheet] [data-apply] { display: inline-flex; }
  .filters-scrim.is-open { display: block; }
  .auth { padding: 24px 16px; }
}

/* ---------- Движение: один общий характер — быстро в начале, мягко в конце (--ease); только transform, opacity и штрих.
   Страница собирается при открытии: блоки всплывают по очереди, яркие карточки и плитки — волной слева направо,
   линии графиков дорисовываются, полосы заполняются. Начальное состояние живёт только в кадрах анимации,
   поэтому при «уменьшить движение» (и без анимаций вообще) всё видно сразу. ---------- */
*, *::before, *::after { transition-timing-function: var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes grow { from { transform: scaleX(0); } }
main.content > *:not(.ov):not(.rv), .ov > *, .rv > *, .pt-cols > *, .pt-blocks > * { animation: rise 520ms var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
main.content > :nth-child(2), .ov > :nth-child(2), .rv > :nth-child(2), .pt-cols > :nth-child(2), .pt-blocks > :nth-child(2) { --i: 1; }
main.content > :nth-child(3), .ov > :nth-child(3), .rv > :nth-child(3), .pt-cols > :nth-child(3), .pt-blocks > :nth-child(3) { --i: 2; }
main.content > :nth-child(4), .ov > :nth-child(4), .rv > :nth-child(4), .pt-blocks > :nth-child(4) { --i: 3; }
main.content > :nth-child(n+5), .ov > :nth-child(n+5), .rv > :nth-child(n+5), .pt-blocks > :nth-child(n+5) { --i: 4; }
.brights > .bright, .tiles > .tile { animation: rise 560ms var(--ease) backwards; animation-delay: calc(80ms + var(--i, 0) * 70ms); }
.brights > :nth-child(2), .tiles > :nth-child(2) { --i: 1; }
.brights > :nth-child(3), .tiles > :nth-child(3) { --i: 2; }
.brights > :nth-child(4), .tiles > :nth-child(4) { --i: 3; }
.tiles > :nth-child(5) { --i: 4; }
.chart-line, .spark { stroke-dasharray: 1; animation: draw 1200ms var(--ease) 320ms backwards; }
.spark-area, .chart-dot, .chart-value { animation: fade 600ms var(--ease) 1000ms backwards; }
.meter__bar { transform-origin: left center; animation: grow 900ms var(--ease) 360ms backwards; }
/* нажатие чувствуется: карточка-ссылка и строка чуть подаются */
.bright:active, .tile:has(.tile__link):active, .row:active { transform: scale(.985); }

/* уменьшить движение — без анимаций */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
